source: FOIAVistA/trunk/r/IMAGING-MAG-ZMAG/MAGGTU4.m@ 996

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

initial load of FOIAVistA 6/30/08 version

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