source: WorldVistAEHR/trunk/r/IMAGING-MAG-ZMAG/MAGGTU31.m@ 1036

Last change on this file since 1036 was 623, checked in by George Lilly, 15 years ago

revised back to 6/30/08 version

File size: 2.9 KB
RevLine 
[623]1MAGGTU31 ;WOIFO/GEK - Silent calls for Imaging ; [ 06/20/2001 08:57 ]
2 ;;3.0;IMAGING;**46**;16-February-2007;;Build 1023
3 ;; Per VHA Directive 2004-038, this routine should not be modified.
4 ;; +---------------------------------------------------------------+
5 ;; | Property of the US Government. |
6 ;; | No permission to copy or redistribute this software is given. |
7 ;; | Use of unreleased versions of this software requires the user |
8 ;; | to execute a written test agreement with the VistA Imaging |
9 ;; | Development Office of the Department of Veterans Affairs, |
10 ;; | telephone (301) 734-0100. |
11 ;; | The Food and Drug Administration classifies this software as |
12 ;; | a medical device. As such, it may not be changed in any way. |
13 ;; | Modifications to this software may result in an adulterated |
14 ;; | medical device under 21CFR820, the use of which is considered |
15 ;; | to be a violation of US Federal Statutes. |
16 ;; +---------------------------------------------------------------+
17 ;;
18 Q
19ATTSTAT(IEN) ; Return a sentence saying if the Image was attached
20 ; to the TIU NOte before or after the Note was signed.
21 ; was signed.
22 N SIGNDT,NOTE,MARR,AMMEND,N2,MAGDT,NC,CLOSDT,X
23 S N2=$G(^MAG(2005,IEN,2))
24 I $P(N2,"^",6)'=8925 Q ""
25 S MAGDT=$S($P(N2,"^",11):$P(N2,"^",11),1:$P(N2,"^",1))
26 S NOTE=$P(N2,"^",7)
27 S NC=NOTE_","
28 D GETS^DIQ(8925,NOTE,".01;.06;1501;1606","I","MARR")
29 I $D(DIERR) Q "Error: Note-"_NOTE_" : "_$G(^TMP("DIERR",$J,1,"TEXT",1))
30 I (MARR(8925,NC,".01","I")=81)!(MARR(8925,NC,".06","I")>0) Q "Image is attached to an Addendum"
31 S SIGNDT=MARR(8925,NC,"1501","I")
32 S CLOSDT=MARR(8925,NC,"1606","I")
33 I CLOSDT]"" D Q X
34 . I $P(CLOSDT,".",2)="" S MAGDT=$P(MAGDT,".",1) I MAGDT=CLOSDT S X="Image was attached Same Day as Note was Electronically Filed." Q
35 . I MAGDT>CLOSDT S X="Image was attached After Note was Electronically Filed." Q
36 . S X="Image was attached Before Note was Electronically Filed." Q
37 . Q
38 I SIGNDT="" Q "Image is attached to an UnSigned Note."
39 I $P(SIGNDT,".",2)="" S MAGDT=$P(MAGDT,".",1) I MAGDT=SIGNDT Q "Image was attached Same Day as Note was Signed."
40 I MAGDT>SIGNDT Q "Image was attached After the Note was Signed."
41 Q "Image was attached Before the Note was Signed."
42USERKEYS(MAGK) ; RPC [MAGGUSERKEYS] (called from MAGGTU3)
43 N Y
44 N MAGKS ; list of keys to send to XUS KEY CHECK
45 N MAGKG ; list returned from XUS KEY CHECK
46 N I,J,MAGMED,MAGKEY,MAGPLC
47 K MAGK
48 S MAGPLC=+$$PLACE^MAGBAPI(DUZ(2)) ; DBI - SEB 9/20/2002
49 S MAGKEY=+$P($G(^MAG(2006.1,MAGPLC,"KEYS")),U)
50 I 'MAGKEY S MAGK(0)="CAPTURE KEYS OFF"
51 E S MAGK(0)="CAPTURE KEYS ON"
52 N X S X="MAG",I=0
53 F S X=$O(^XUSEC(X)) Q:$E(X,1,3)'="MAG" D
54 . S I=I+1,MAGKS(I)=X
55 D OWNSKEY^XUSRB(.MAGKG,.MAGKS)
56 S I=0,J=0,MAGMED=0
57 F S I=$O(MAGKG(I)) Q:I="" D
58 . Q:MAGKG(I)=0
59 . S J=J+1,MAGK(J)=MAGKS(I)
60 . I MAGKS(I)["MAGCAP MED" S MAGMED=1
61 I MAGMED S J=J+1,MAGK(J)="MAGCAP MED"
62 Q
Note: See TracBrowser for help on using the repository browser.