source: WorldVistAEHR/trunk/r/IMAGING-MAG-ZMAG/MAGGTU4.m@ 1080

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

revised back to 6/30/08 version

File size: 7.8 KB
Line 
1MAGGTU4 ;WOIFO/GEK - Testing callbacks for Delphi Doc Image Prototype ; 02/16/2007 13:37
2 ;;3.0;IMAGING;**8,48,63,45,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
19GETVER(SVRVER,SVRTVER,A) ;
20 ; We Can't compute the Server's current version
21 ; KIDS installs aren't all related to the Delphi Client.
22 ; The Server Version SVRVER needs hardcoded to match the Delphi Client.
23 ; and This Routine must be distributed whenever a new Client is
24 S SVRVER="3.0.46"
25 S SVRTVER=28 ; This is the T version that the server expects
26 ; released Client will have the T version that the server expects
27 S A("3.0.24")=5 ;Sept 2003
28 S A("3.0.33")=11 ;June 2004
29 S A("3.0.8")=49 ;Sept 2004
30 S A("3.0.42")=1 ;n/a
31 S A("3.0.48")=6 ;Mar 2005
32 S A("3.0.63")=4 ;June 2005
33 S A("3.0.45")=8 ;Sept 2005
34 S A("3.0.59")=20 ;July 2006
35 Q
36 ;
37CHKVER(MAGRY,CLVER) ;RPC [MAG4 VERSION CHECK]
38 ; CLVER is the version of the Delphi Client.
39 ; CLVER format = Major,Minor,Patch,T Version
40 ; example : for Version 3.0 Patch 8 T 21 --> CLVER=3.0.8.21
41 ; Ver 2.5P9 (2.5.24.1) is first Delphi Ver that makes this call.
42 ; CLVER may have Parameters attached to it in '|' pieces.
43 ; "CLVER|RIV" this is a remote image view client
44 ; "CLVER|CAPTURE" this is a Capture Client
45 ; "CLVER|DISPLAY" this is a Display Client
46 ; 3 possible return codes in 1st '^' piece of MAGRY(0).
47 ; 0^message : The Client will display the message and continue.
48 ; 1^message : The Client will continue without displaying any message.
49 ; 2^message : The Client will display the message and then Abort. (Terminate)
50 ; The message displayed is the 2nd '^' piece of (0) node
51 ; and all text of any other nodes. i.e. MAGRY(1..n)
52 ;
53 S CLVER=$G(CLVER)
54 ; Bug in 42. the Version comes in as 30.5.42.x (42 wasn't released)
55 I $P(CLVER,".",1)="30" S CLVER="3.0."_$P(CLVER,".",3,99)
56 ;
57 N PLC,SV,ST,SVSTAT,CV,CP,CT,OKVER,WARN,I
58 ; PLC = Entry in 2006.1
59 ; SV = Server Version -> (3.0.8) from (3.0.8.43) Hard coded to Sync with Delphi Clients
60 ; ST = Server T Version -> 43 from full version (3.0.8.43)
61 ; CV = Client Version sent from Client 3.0.8 same format as SV
62 ; CT = Client T Version sent from Client i.e. 43 same format as ST
63 ; OKVER = Array of Supported Versions, and Released T Version OKVER(3.0.48)=6
64 ; WARN = 1|0 Boolean value determines if client needs EKG Warning.
65 ;
66 S PLC=$$PLACE^MAGBAPI($G(DUZ(2)))
67 ; Quit if we don't have a valid DUZ(2) or valid PLACE: ^MAG(2006.1,PLC)
68 I 'PLC D BADPLC^MAGGTU41(.MAGRY) Q
69 ;
70 ; Set up local variables.
71 D GETVER(.SV,.ST,.OKVER)
72 F I=2:1:$L(CLVER,"|") I $P(CLVER,"|",I)]"" S MAGJOB($P(CLVER,"|",I))=1
73 S CLVER=$P(CLVER,"|",1)
74 S CV=$P(CLVER,".",1,3),CP=$P(CLVER,".",3),CT=$P(CLVER,".",4)
75 I CT="" S $P(CLVER,".",4)=0,CT=0
76 ; set WARN to indicate if Warning is needed or not.
77 ;
78 D NEEDWARN(.WARN)
79 ; Quit if site has VERSION CHECKING=0 (OFF) in Imaging Site Params File.
80 I '$$VERCHKON(PLC) D Q
81 . S MAGRY(0)="1^Version Checking is OFF. Allowing All Versions"
82 . ; But, need to Display the warning, even if Version Checking is OFF
83 . I WARN S MAGRY(0)="0^ =========== WARNING ===============" D WARNING
84 . Q
85 ; If Remote Connection , allow it.
86 I $D(MAGJOB("RIV")) S MAGRY(0)="1^Allowing Remote Image Connection" Q
87 ; Is this Server Version Alpha/Beta or Released.
88 D VERSTAT(.SVSTAT,SV)
89 I 'SVSTAT S MAGRY(0)="2^"_$P(SVSTAT,"^",2) Q ; There is not record of a KIDS for this Server.
90 ;
91 ; If Client isn't one of the Supported Clients.
92 I (CV'=SV),'$D(OKVER(CV)) D Q
93 . I +SVSTAT=2 D NOTOKB^MAGGTU41(.MAGRY) Q
94 . D NOTOK^MAGGTU41(.MAGRY) Q
95 . Q
96 ;
97 ; Client is Supported. Only Warn if we are Not In ALPHA/BETA Testing.
98 I (CV'=SV) D Q
99 . I CT<$G(OKVER(CV)) D Q
100 . . I +SVSTAT=2 DO OKBADTB^MAGGTU41(.MAGRY) Q
101 . . DO OKBADT^MAGGTU41(.MAGRY) Q
102 . . Q
103 . I +SVSTAT=2 D OKB^MAGGTU41(.MAGRY)
104 . E D OK^MAGGTU41(.MAGRY)
105 . I WARN D WARNING
106 . Q
107 ;
108 ; At this point, Versions are the Same: If T versions are not, warn the Client.
109 I CT,(CT'=ST) D Q
110 . I +SVSTAT=2 D TNOTOKB^MAGGTU41(.MAGRY) Q
111 . D TNOTOK^MAGGTU41(.MAGRY) Q
112 . Q
113 ; Client and Server Versions are the same, to the T. (Ha, get it)
114 S MAGRY(0)="1^Version Check OK. Server: "_SV_" Client: "_CV Q
115 Q
116 ;
117VERCHKON(PLC) ; Is Version checking on for the site (Place)
118 Q +$P(^MAG(2006.1,PLC,"KEYS"),"^",5)
119 ;
120NEEDWARN(WARN) ; This call determines if Client needs the warning.
121 I $P($G(^MAG(2006.1,PLC,"USERPREF")),U,2)="" S WARN=0 Q ; Not a MUSE Site.
122 I $D(MAGJOB("CAPTURE")) S WARN=0 Q ;Not needed for Capture Clients
123 I CV="3.0.59" S WARN=0 Q ; Client 59 has 63.
124 I CV="3.0.45" S WARN=0 Q ; Client 45 has 63.
125 I CV="3.0.41" S WARN=0 Q ; It is fixed in 41
126 I CV="3.0.63" S WARN=0 Q ; It is fixed in 63
127 I $P(CV,".",1)=2 S WARN=0 Q ;Older Clients don't have the EKG Problem.
128 I '$D(OKVER(CV)) S WARN=0 Q ; Patch 3.0.7, 3.0.2 don't have EKG problem.
129 S WARN=1 ; This means to Show the EKG Warning.
130 Q
131 ;
132WARNING ; This is hard coded for the EKG Warning.
133 ; Put Warning at the End of any Return Message.
134 S MAGRY(1000)=" "
135 S MAGRY(1010)="!*************************************************!"
136 S MAGRY(1015)=" "
137 S MAGRY(1020)=" PATIENT SAFETY NOTIFICATION"
138 S MAGRY(1025)=" "
139 S MAGRY(1030)=" Under certain circumstances, the EKG window will not"
140 S MAGRY(1040)="refresh properly when you select a new patient in CPRS; "
141 S MAGRY(1050)="instead of showing the new patient, the EKG window will "
142 S MAGRY(1060)="continue to show the previous patient. "
143 S MAGRY(1065)=" "
144 S MAGRY(1070)="To prevent this problem:"
145 S MAGRY(1075)=" "
146 S MAGRY(1080)=" Verify that the 'Show MUSE EKGs' option under"
147 S MAGRY(1085)=" Options > View Preferences is checked;"
148 S MAGRY(1090)=" OR"
149 S MAGRY(1100)=" Do not minimize the Imaging Display window while viewing EKGs."
150 S MAGRY(1110)=" "
151 S MAGRY(1115)="This problem will be corrected shortly by Imaging Patch 63."
152 S MAGRY(1120)="!*************************************************!"
153 Q
154VERSTAT(MAGRY,MAGVER) ;RPC - [MAG4 VERSION STATUS]
155 ; Returns the status of an Imaging Version
156 ; Input :
157 ; MAGVER - Version number
158 ; in the format MAG*3.0*59
159 ; or the format 3.0.59
160 ; Return:
161 ; MAGRY = 0^There is No KIDs Install record
162 ; 1^Unknown Release Status
163 ; 2^Alpha/Beta Version
164 ; 3^Released Version
165 ;
166 N VERI,TVER,MAGERR
167 I +MAGVER S MAGVER="MAG*"_$P(MAGVER,".",1,2)_"*"_$P(MAGVER,".",3)
168 S VERI=$$FIND1^DIC(9.6,"","M",MAGVER,"","","MAGERR")
169 I 'VERI S MAGRY="0^There is No KIDs Install record." Q
170 S TVER=$$GET1^DIQ(9.6,VERI_",","ALPHA/BETA TESTING")
171 I TVER="YES" S MAGRY="2^Alpha/Beta Version." Q
172 I TVER="NO" S MAGRY="3^Released Version." Q
173 S MAGRY="1^Unknown Release Status."
174 Q
175ABSJB(MAGRY,MAGIN) ;RPC [MAG ABSJB] SET ABSTRACT AND/OR JUKEBOX QUEUES
176 D ABSJB^MAGGTU71(.MAGRY,.MAGIN)
177 Q
Note: See TracBrowser for help on using the repository browser.