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

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

revised back to 6/30/08 version

File size: 5.7 KB
Line 
1MAGJUTL5 ;WOIFO/JHC - VistARad RPCs ; [ 07/3/2006 17:17 ]
2 ;;3.0;IMAGING;**65**;Jul 27, 2006;Build 28
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.65",SVRTVER=12 ; <*> Edit this line for each patch/T-version
27 ;
28 S ALLOWCL="|3.0.18|" ; note--patch 32 is numbered funny, so is hard-coded below
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 ;
71 ; Patch 32 client is OK:
72 I CLVER="3.0.41.17" S MAGRY="1^1~P32 Client Version Check OK. Server: "_SVERSION_" Client: "_CLVER Q
73 ; Other Version differences:
74 I (CV'=SV) D Q
75 . I '(ALLOWV[("|"_CV_"|")) D Q
76 . . S MAGRY="0^4~VistARad Workstation software version "_CLVER_" is not compatible with the VistA server version "_SVERSION_". Contact Imaging support. (CNA)"
77 . ; Don't allow Test versions of P18
78 . I CP=18,(CT'=132) D Q
79 . . S MAGRY="0^4~VistARad Workstation software version "_CLVER_" is not compatible with the VistA server version "_SVERSION_". Contact Imaging support. (C18T)"
80 . ; Warn the Client, allow to continue
81 . 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)"
82 . 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)"
83 . Q
84 ; Versions are the Same: If T versions are not, warn the Client if needed.
85 ; Released Client (of any version) will have the T version that the server
86 ; expects, and no warning will be displayed.
87 I CT,(CT'=ST) D Q
88 . 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
89 . . I CT<ST S MAGRY=MAGRY_"to install updated client software. (Tdif-1)"
90 . . E S MAGRY=MAGRY_"to update the Server software. (Tdif-2)"
91 . 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)"
92 . Q
93 ; Client and Server Versions are the same
94 S MAGRY="1^1~Version Check OK. Server: "_SVERSION_" Client: "_CLVER Q
95 Q
96 ;
97VERSTAT(MAGRY,MAGVER) ;
98 ; Returns the status of an Imaging Version
99 ; Input:
100 ; MAGVER - Version number in format MAG*3.0*59 or 3.0.59
101 ; Return: MAGRY = 0/1/2 -- see below; 0: abort; else, OK to proceed
102 ;
103 N VERI,TVER,MAGERR
104 I +MAGVER S MAGVER="MAG*"_$P(MAGVER,".",1,2)_"*"_$P(MAGVER,".",3)
105 S VERI=$$FIND1^DIC(9.6,"","",MAGVER,"","","MAGERR")
106 I 'VERI S MAGRY="0^4~There is No KIDs Install record."
107 E D
108 . S TVER=$$GET1^DIQ(9.6,VERI_",","ALPHA/BETA TESTING")
109 . I TVER="YES" S MAGRY="1^Alpha/Beta Version"
110 . E I TVER="NO" S MAGRY="2^Released Version"
111 . E S MAGRY="0^4~KIDs Install Status is unknown--contact Customer Support."
112 Q ;
113END ;
Note: See TracBrowser for help on using the repository browser.