source: WorldVistAEHR/trunk/r/IMAGING-MAG-ZMAG/MAGJUTL5.m@ 619

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

initial load of WorldVistAEHR

File size: 5.9 KB
RevLine 
[613]1MAGJUTL5 ;WOIFO/JHC - VistARad RPCs ; [ 07/3/2006 17:17 ]
2 ;;3.0;IMAGING;**65,76**;Jun 22, 2007;Build 19
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 ;; | |
12 ;; | The Food and Drug Administration classifies this software as |
13 ;; | a medical device. As such, it may not be changed in any way. |
14 ;; | Modifications to this software may result in an adulterated |
15 ;; | medical device under 21CFR820, the use of which is considered |
16 ;; | to be a violation of US Federal Statutes. |
17 ;; +---------------------------------------------------------------+
18 ;;
19 Q
20 ; adapted from MAGGTU4
21GETVER(SVRVER,SVRTVER,ALLOWCL) ;
22 ; The Server Version SVRVER is hardcoded to match the Client
23 ; so this Routine must be edited/distributed with a new Client
24 ; released Client will have the T version that the server expects
25 ;
26 S SVRVER="3.0.76",SVRTVER=14 ; <*> Edit this line for each patch/T-version
27 ;
28 S ALLOWCL="|3.0.65|" ;
29 Q
30 ;
31CHKVER(MAGRY,CLVER,PLC,SVERSION) ;
32 ; Input CLVER is the version of the Client
33 ; format: Major.Minor.Patch.Build# (Build #=T-ver) eg 3.0.18.132
34 ; Ver 3.0.65.n is first client Ver that makes this call
35 ; 3 possible return codes in MAGRY:
36 ; 2^n~msg : Client displays a message and continues
37 ; 1^1~msg : Client continues without displaying a message
38 ; 0^n~msg : Client displays a message then Aborts
39 ; PLC returns 2006.1 pointer
40 ;
41 S CLVER=$G(CLVER),PLC="",MAGRY=""
42 N SV,ST,CV,CT,CP,ALLOWV,TESTFLAG,SVSTAT
43 ; SVERSION = Full Server Version -> (3.0.18.132 or 3.0.18); test has 4, release has 3 parts
44 ; SV = Server Version -> (3.0.18); only 1st 3 parts
45 ; ST = Server T Version -> defined to always match client part-4
46 ; CV = Client Version, w/out build #
47 ; CT = Client T Version alone
48 ; CP = Client Patch alone
49 ; ALLOWV = Hard coded string of allowed clients for this KIDS.
50 ; TESTFLAG = 1/0 -- 1=Test vs of server code; 0=Release vs
51 ;Below is placeholder for future enhancement:
52 ;I $P(CLVER,"|",2)="RIV" D Q
53 ;. S MAGJOB("RIV")=1
54 ;. ; Allowing |RIV clients always
55 ;. S MAGRY="1^1~Allowing Remote Image Connection"
56 ;
57 I $G(DUZ(2)) S PLC=$$PLACE^MAGBAPI(DUZ(2))
58 ; Quit if we don't have a valid DUZ(2) or valid PLACE: ^MAG(2006.1,PLC)
59 I 'PLC S MAGRY="0^4~Error verifying Imaging Site (Place) -- Contact Imaging support." Q
60 ;
61 D GETVER(.SV,.ST,.ALLOWV)
62 S CLVER=$P(CLVER,"|")
63 S CV=$P(CLVER,".",1,3),CT=+$P(CLVER,".",4),CP=+$P(CLVER,".",3)
64 ;
65 D VERSTAT(.SVSTAT,SV)
66 I 'SVSTAT S MAGRY(0)=SVSTAT Q ; KIDS status for this version indeterminate
67 S TESTFLAG=(+SVSTAT=1)
68 S SVERSION=SV
69 I TESTFLAG S SVERSION=SV_"."_ST
70 ; Check Version differences:
71 I (CV'=SV) D Q
72 . I '(ALLOWV[("|"_CV_"|")) D Q
73 . . S MAGRY="0^4~VistARad Workstation software version "_CLVER_" is not compatible with the VistA server version "_SVERSION_". Contact Imaging support. (CNA)"
74 . ; Warn the Client, allow to continue
75 . I TESTFLAG S MAGRY="2^3~VistARad Workstation software version "_CLVER_" is running with VistA server TEST Version "_SVERSION_" -- VistARad will Continue, but contact Imaging Support if problems occur. (Pdif)"
76 . E S MAGRY="2^3~VistARad Workstation software version "_CLVER_" is running with VistA server Version "_SVERSION_" -- VistARad will Continue, but contact Imaging Support to install Released Version. (RPdif)"
77 . Q
78 ; Versions are the Same: If T versions are not, warn the Client if needed.
79 ; Released Client (of any version) will have the T version that the server
80 ; expects, and no warning will be displayed.
81 I CT,(CT'=ST) D Q
82 . I TESTFLAG S MAGRY="2^3~VistARad Workstation software vs. "_CLVER_" is running with VistA server TEST vs. "_SVERSION_" -- VistARad will Continue, but contact Imaging Support " D
83 . . I CT<ST S MAGRY=MAGRY_"to install updated client software. (Tdif-1)"
84 . . E S MAGRY=MAGRY_"to update the Server software. (Tdif-2)"
85 . E S MAGRY="2^3~VistARad Workstation software vs. "_CLVER_" is running with VistA server vs. "_SVERSION_" -- VistARad will Continue, but contact Imaging Support to install Released Version. (RVdif)"
86 . Q
87 ; Client and Server Versions are the same
88 S MAGRY="1^1~Version Check OK. Server: "_SVERSION_" Client: "_CLVER Q
89 Q
90 ;
91P32STOP(RET) ; logic to indicate P32 should no longer function, once the RELEASED P76 is installed
92 ; This is invoked from magjutl3, P76 version, if a P32 client is launched
93 ; RET=1/0 ^ text -- 0 = OK to run P32; 1 = Not OK
94 N SV,ST,ALLOWV,SVSTAT,RELEASED
95 S RET="0^P32 supported" ; init return to allow p32 to function
96 D GETVER(.SV,.ST,.ALLOWV)
97 D VERSTAT(.SVSTAT,SV)
98 I 'SVSTAT S RET="0^Error, but on side of caution, allow running." Q ; KIDS status for this version indeterminate
99 S RELEASED=(+SVSTAT=2)
100 I RELEASED!(SV'="3.0.76") S RET="1^P32 support over" ; don't allow P32 to function
101 Q
102 ;
103VERSTAT(MAGRY,MAGVER) ;
104 ; Returns the status of an Imaging Version
105 ; Input:
106 ; MAGVER - Version number in format MAG*3.0*59 or 3.0.59
107 ; Return: MAGRY = 0/1/2 -- see below; 0: abort; else, OK to proceed
108 ;
109 N VERI,TVER,MAGERR
110 I +MAGVER S MAGVER="MAG*"_$P(MAGVER,".",1,2)_"*"_$P(MAGVER,".",3)
111 S VERI=$$FIND1^DIC(9.6,"","O",MAGVER,"","","MAGERR")
112 I 'VERI S MAGRY="0^4~There is No KIDs Install record."
113 E D
114 . S TVER=$$GET1^DIQ(9.6,VERI_",","ALPHA/BETA TESTING")
115 . I TVER="YES" S MAGRY="1^Alpha/Beta Version"
116 . E I TVER="NO" S MAGRY="2^Released Version"
117 . E S MAGRY="0^4~KIDs Install Status is unknown--contact Customer Support."
118 Q ;
119END ;
Note: See TracBrowser for help on using the repository browser.