Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: MAGJUTL5

MAGJUTL5.m

Go to the documentation of this file.
  1. MAGJUTL5 ;WOIFO/JHC - VistARad RPCs ; 12/29/2022
  1. ;;3.0;IMAGING;**65,76,101,90,115,104,120,133,152,153,184,199,255,341**;Dec 21, 2022;Build 28
  1. ;; Per VHA Directive 2004-038, this routine should not be modified.
  1. ;; +---------------------------------------------------------------+
  1. ;; | Property of the US Government. |
  1. ;; | No permission to copy or redistribute this software is given. |
  1. ;; | Use of unreleased versions of this software requires the user |
  1. ;; | to execute a written test agreement with the VistA Imaging |
  1. ;; | Development Office of the Department of Veterans Affairs, |
  1. ;; | telephone (301) 734-0100. |
  1. ;; | The Food and Drug Administration classifies this software as |
  1. ;; | a medical device. As such, it may not be changed in any way. |
  1. ;; | Modifications to this software may result in an adulterated |
  1. ;; | medical device under 21CFR820, the use of which is considered |
  1. ;; | to be a violation of US Federal Statutes. |
  1. ;; +---------------------------------------------------------------+
  1. ;;
  1. ; Reference to INSTALDT^XPDUTL in ICR #10141
  1. ;; ISI IMAGING;**99,101,102,106**
  1. Q
  1. ; ISI <*> Version # changes for ISI Rad 1.1.0 -- Jan 2018
  1. GETVER(SVRVER,SVRBVER,ALLOWCL,VIXVER) ;
  1. ; SVRVER -- holds the Server Version that is always hardcoded to match the Client
  1. ; SVRBVER - holds the smallest value for the client build # that is compatible with
  1. ; the current server--the client's value must be equal to or greater than SVRBVER
  1. ;
  1. ; <*> Edit below line whenever both client and server are changing together
  1. ;
  1. S SVRVER="1.1.1",SVRBVER=217 ; min. build version for P110--VA VistARad to ISI Rad conversion
  1. ; Rev-2 enabled in v1.1.1
  1. S ALLOWCL="|3.0.199|3.0.255|" ; back-compatible prior clients (ISI_v1.1.nnn; VA: 3.0.nnn)
  1. S VIXVER=""
  1. ; VIX may present versions different from vrad Client/Server versions; this would
  1. ; happen if M-only changes are made to vrad Server code as part of a VIX patch
  1. ; to support updated VIX-related functionality. VIXVERS contains the version numbers
  1. ; that are to be supported in this fashion; related M changes need to be back-compatible
  1. ; with prior vrad versions' behavior in the interface
  1. N T,VIXVERS
  1. S VIXVERS="|3.0.104|" ; keep compatible with P115 & P90 <*> edit as needed for patches
  1. S T=$G(MAGJOB("VIX"))
  1. I T,VIXVERS[("|"_T_"|") S ALLOWCL=ALLOWCL_T_"|",VIXVER=T
  1. Q
  1. ;
  1. CHKVER(MAGRY,CLVER,PLC,SVERSION) ;
  1. ; Input CLVER is the version of the Client
  1. ; format: ISI_Major . ISI_Minor . Rad_Version . Build# -- e.g., 1.0.0.38
  1. ; 3 possible return codes in MAGRY:
  1. ; 2^n~msg : Client displays a message and continues
  1. ; 1^1~msg : Client continues without displaying a message
  1. ; 0^n~msg : Client displays a message then Aborts
  1. ; PLC returns 2006.1 pointer
  1. ; SVERSION returns the Server version string
  1. ;
  1. S CLVER=$G(CLVER),PLC="",MAGRY=""
  1. N SV,SBUILD,CV,CBUILD,ALLOWV,SVSTAT,VIXVER
  1. ; SVERSION = Full Server Version -> (3.0.18.132)
  1. ; SV = Server Version -> (3.0.18); only 1st 3 parts
  1. ; SBUILD = Server Build # -> define this to correspond to client
  1. ; CV = Client Version, w/out build #
  1. ; CBUILD = Client build # alone
  1. ; ALLOWV = Hard coded string of allowed clients for this KIDS.
  1. ;
  1. ; get VIX version if a VIX session
  1. I $P(CLVER,"|",2)["VIX" S MAGJOB("VIX")=$P(CLVER,"|") ; VIX facade version
  1. ;
  1. I $G(DUZ(2)) S PLC=$$PLACE^MAGBAPI(DUZ(2))
  1. ; Quit if we don't have a valid DUZ(2) or valid PLACE: ^MAG(2006.1,PLC)
  1. I 'PLC S MAGRY="0^4~Error verifying Imaging Site (Place) -- Contact Imaging support." Q
  1. D GETVER(.SV,.SBUILD,.ALLOWV,.VIXVER)
  1. S CLVER=$P(CLVER,"|")
  1. S CV=$P(CLVER,".",1,3),CBUILD=+$P(CLVER,".",4)
  1. S SVERSION=SV_"."_SBUILD
  1. ; Check Version differences:
  1. ; MAG*341--age out Vrad, per end-of-life date defined below
  1. I '$G(MAGJOB("VIX")),$E(CV,1,4)="3.0." D Q ; ISI -- VistARad last gasp; <*> remove "I 0," when final End Date is established
  1. . N ENDDATE,ZJ,X,X1,X2
  1. . I '$$INSTALDT^XPDUTL("MAG*3.0*341",.ZJ) Q ; if false, how did we get here?!
  1. . S X="" S X=$O(ZJ(X),-1) ; most recent install of patch
  1. . S X1=$E(X,1,7),X2=31 D C^%DTC ; get date 31 days out
  1. . S ENDDATE=X
  1. . I '(ALLOWV[("|"_CV_"|")) D Q
  1. . . S MAGRY="0^4~VistARad Workstation software version "_CLVER_" is not compatible with the VistA server version "_SVERSION_". Contact Imaging support. (CNA2)"
  1. . ; Warn the Client, allow to continue if the expiration date is future
  1. . S X1=ENDDATE,X2=DT D ^%DTC
  1. . I X<1 D Q
  1. . . S MAGRY="0^4~VistARad is no longer supported; contact Imaging Support to install ISI Rad workstation software."
  1. . ; Warn the Client, allow to continue
  1. . S MAGRY="2^3~VistARad vs. "_CLVER_" reaches end-of-life "_$S(X>1:"in "_X_" days",1:"TOMORROW")_"; VistARad will Continue, but contact Imaging Support to install ISI Rad workstation software."
  1. . Q
  1. ;
  1. I (CV'=SV) D Q
  1. . I '(ALLOWV[("|"_CV_"|")) D Q
  1. . . S MAGRY="0^4~ISI Rad Workstation software version "_CLVER_" is not compatible with the VistA server version "_SVERSION_". Contact Imaging support. (CNA)"
  1. . ; Warn the Client, allow to continue
  1. . E D
  1. . . I VIXVER]"" S MAGRY="1^1~VIX software vs. "_CLVER_" is running with VistA server vs. "_SVERSION_". (VIXdif)"
  1. . . E D
  1. . . . N PROGNAME S PROGNAME="ISI Rad"
  1. . . . I $E(CV,1,4)="3.0." S PROGNAME="VistARad"
  1. . . . S MAGRY="2^3~"_PROGNAME_" vs. "_CLVER_"; VistA server is "_SVERSION_" - "_PROGNAME_" will Continue, but contact Imaging Support to install newer workstation version. (RPdif)" ; ISI
  1. . Q
  1. ; Versions are the Same: If build #s are not compatible, warn the Client if needed.
  1. ; Released Client (of any version) will have a build # in range that the server
  1. ; expects, so no warning will be displayed.
  1. I CBUILD<SBUILD D Q ; server expects a higher client build #; provide warning
  1. . S MAGRY="2^3~ISI Rad vs. "_CLVER_"; VistA server is "_SVERSION_" - Some features may not function as expected. Contact Imaging Support to install updated client software. (Tdif-1)"
  1. . Q
  1. ; Client and Server Versions are compatible
  1. S MAGRY="1^1~Version Check OK. Server: "_SVERSION_" Client: "_CLVER Q
  1. Q
  1. ;
  1. ; ISI remove deprecated logic
  1. END ;