- MAGGTU4 ;WOIFO/GEK/SG/NST - VERSION CHECKS FOR IMAGING CLIENTS ; 21 Jun, 2023@13:44:31
- ;;3.0;IMAGING;**8,48,63,45,46,59,96,95,72,93,94,356**;Mar 19, 2002;Build 8
- ;; Per VHA Directive 2004-038, this routine should not be modified.
- ;; +---------------------------------------------------------------+
- ;; | Property of the US Government. |
- ;; | No permission to copy or redistribute this software is given. |
- ;; | Use of unreleased versions of this software requires the user |
- ;; | to execute a written test agreement with the VistA Imaging |
- ;; | Development Office of the Department of Veterans Affairs, |
- ;; | telephone (301) 734-0100. |
- ;; | The Food and Drug Administration classifies this software as |
- ;; | a medical device. As such, it may not be changed in any way. |
- ;; | Modifications to this software may result in an adulterated |
- ;; | medical device under 21CFR820, the use of which is considered |
- ;; | to be a violation of US Federal Statutes. |
- ;; +---------------------------------------------------------------+
- ;;
- Q
- ;
- ;***** SETS ABSTRACT AND/OR JUKEBOX QUEUES
- ; RPC: MAG ABSJB
- ;
- ; .MAGRES Reference to a local variable where the result is
- ; returned to.
- ;
- ; .MAGIN IENs of images to be processed
- ; ^01: IEN of the image that needs an abstract
- ; created
- ; ^02: IEN of the image that needs to be copied
- ; to the jukebox
- ;
- ; Return Values
- ; =============
- ;
- ; Result code and corresponding message are returned in the MAGRES
- ; parameter:
- ;
- ; MAGRES Result descriptor
- ; ^01: Result code:
- ; 0 Error
- ; 1 Success
- ; ^02: Message
- ;
- ABSJB(MAGRES,MAGIN) ;RPC [MAG ABSJB]
- D ABSJB^MAGGTU71(.MAGRES,.MAGIN)
- Q
- ;
- ;***** CLIENT/SERVER VERSION CHECKS
- ; RPC: MAG4 VERSION CHECK
- ;
- ; .MAGRES Reference to a local array where results are
- ; returned to.
- ;
- ; CLVER Client application descriptor
- ; |01: Version (Major.Minor.Patch.Build)
- ; |02: empty or "RIV" for remote image view clients
- ; |03: Client name ("CAPTURE", "CLUTILS", "DISPLAY",
- ; "TELEREADER", or "VISTARAD")
- ;
- ; For example, the Clinical Display client Version
- ; 3.0 Patch 8 Build (test version) 21 will pass
- ; "3.0.8.21||DISPLAY" as the value of this parameter.
- ;
- ; Input Variables
- ; ===============
- ; MAGJOB
- ;
- ; Output Variables
- ; ================
- ; MAGJOB
- ;
- ; Return Values
- ; =============
- ;
- ; Result code and message are returned into the MAGRES(0).
- ; The subsequent nodes may contain additional lines of the
- ; message text.
- ;
- ; MAGRES(0) Result descriptor
- ; ^01: Result code:
- ; 0 The client will display the
- ; message and continue.
- ; 1 The client will continue without
- ; displaying any message.
- ; 2 The client will display the
- ; message and then terminate.
- ; ^02: Message
- ;
- ; MAGRES(i) Additional line of the message text
- ;
- ; Notes
- ; =====
- ;
- ; Ver 2.5P9 (2.5.24.1) is the first GUI client (Delphi) that makes
- ; this call.
- ;
- CHKVER(MAGRES,CLVER) ;RPC [MAG4 VERSION CHECK]
- N MAGVCD ; Version control data
- ;
- N CLNAME,CVRC,RC
- S (CVRC,RC)=0
- D
- . N I,N,TMP
- . ;--- Parse the client application descriptor
- . S N=$L(CLVER,"|"),CLNAME=$P(CLVER,"|",3)
- . F I=2:1:N S TMP=$P(CLVER,"|",I) S:TMP'="" MAGJOB(TMP)=1
- . S CLVER=$P(CLVER,"|")
- . I CLNAME="" D Q:RC<0
- . . ;--- Only the client version was sent before the MAG*3.0*59
- . . I CLVER'["|" S CLNAME="DISPLAY" Q
- . . ;--- Currently, the client application name must be provided
- . . S RC=$$ERROR^MAGUERR(-24,,CLNAME)
- . . Q
- . ; If client states it is TeleReader then record this - P356 CD 06/21/2023
- . I CLNAME="TELEREADER" S ^TMP($J,"MAGTELER")=1
- . ;
- . ;--- Check the client version
- . S CVRC=$$CHKVER1^MAGGTU41(.MAGVCD,CLNAME,.CLVER)
- . I CVRC<0 S RC=CVRC Q
- . ;
- . ;--- Load and format the message
- . S RC=$$MESSAGE(CLNAME,CLVER,CVRC)
- . Q
- ;---
- I RC<0 D ERROR^MAGGTU41(.MAGRES,RC) Q
- D WARNING^MAGGTU41(.MAGRES,CLNAME,CLVER,CVRC)
- Q
- ;
- ;+++++ LOADS AND FORMATS THE MESSAGE IN THE MAGRES ARRAY
- ;
- ; CLNAME Client name
- ;
- ; CLVER Client application version (Major.Minor.Patch.Build)
- ;
- ; CVRC Version check code returned by the $$CHKVER1^MAGGTU41
- ;
- ; Input Variables
- ; ===============
- ; DUZ, MAGVCD
- ;
- ; Output Variables
- ; ================
- ; MAGRES
- ;
- ; Return Values
- ; =============
- ; <0 Error descriptor (see $$ERROR^MAGUERR)
- ; 0 The client will display a warning and continue
- ; 1 The client will continue
- ; 2 The client will display a warning and terminate
- ;
- MESSAGE(CLNAME,CLVER,CVRC) ;
- N BETA,CV,DLG,DLG1,MAGPRMS,PLC,RC,SVSTAT,TMP
- K MAGRES
- ;
- ;--- If this is a remote connection, allow it.
- I $D(MAGJOB("RIV")) D Q 1
- . S MAGRES(0)="1^"_$$EZBLD^DIALOG(20050005.013)
- . Q
- ;
- ;--- Get IEN of the Imaging site parameters
- Q:'$G(DUZ(2)) $$ERROR^MAGUERR(-26,,"DUZ(2)")
- S PLC=$$PLACE^MAGBAPI(DUZ(2))
- I 'PLC D Q $$ERROR^MAGUERR(-27,,TMP)
- . S TMP=$P($G(^DIC(4,DUZ(2),0)),U)_" ["_DUZ(2)_"]"
- . Q
- ;
- ;--- Quit if the site has VERSION CHECKING=0 (OFF) in
- ;--- the IMAGING SITE PARAMETERS file (#2006.1)
- ; Patch 94 - don't check for VERSION CHECKING
- ;I '$$VERCHKON(PLC) D Q 1
- ;. S MAGRES(0)="1^"_$$EZBLD^DIALOG(20050005.014)
- ;. Q
- ;
- ;--- Is this server version alpha/beta or released?
- D VERSTAT(.SVSTAT,MAGVCD(CLNAME,"SV"))
- I '$G(SVSTAT) S MAGRES(0)="2^"_$P(SVSTAT,U,2) Q 2
- S BETA=(+SVSTAT=2)
- ;
- ;--- Initilize message parameters
- S (MAGPRMS("CV"),CV)=$P(CLVER,".",1,3) ; Client Major.Minor.Patch
- S MAGPRMS("CP")=$P(CLVER,".",3) ; Client patch number
- S MAGPRMS("CST")=$G(MAGVCD(CLNAME,"ST",CV)) ; Supported client build
- S MAGPRMS("CT")=$P(CLVER,".",4) ; Client build number
- S MAGPRMS("ST")=MAGVCD(CLNAME,"ST") ; Server build number
- S MAGPRMS("SV")=MAGVCD(CLNAME,"SV") ; Server Major.Minor.Patch
- S MAGPRMS("SVSTAT")=$P(SVSTAT,U,2) ; Server version status
- ;
- S DLG=20050005.001,RC=1
- D:CVRC
- . ;--- Latest version but old build (T-version)
- . I CVRC=1 D Q
- . . S RC=0,DLG=$S(BETA:20050005.008,1:20050005.007)
- . . Q
- . ;--- Supported version
- . I CVRC=2 D Q
- . . S RC=$S(BETA:1,1:0),DLG=$S(BETA:20050005.012,1:20050005.011)
- . . S:$P(CV,".")=2 DLG1=20050005.005
- . . Q
- . ;--- Supported version but old build (T-version)
- . I CVRC=3 D Q
- . . S RC=$S(BETA:0,1:2),DLG=$S(BETA:20050005.01,1:20050005.009)
- . . Q
- . ;--- Client is not supported
- . I CVRC=4 D Q
- . . S RC=$S(BETA:0,1:2),DLG=$S(BETA:20050005.004,1:20050005.003)
- . . S:$P(CV,".")=2 DLG1=20050005.006
- . . Q
- ;
- ;--- Load and format the message
- D BLD^DIALOG(DLG,.MAGPRMS,,"MAGRES")
- ; check for "version nag message" only if the server is not in alpha/beta
- I 'BETA D
- . I RC'=0 Q ; the application will terminate or will not show the nag message
- . I '$$NAGMSGON(PLC) S RC=1 ; do not show the nag message
- . Q
- S MAGRES(0)=RC_U_$G(MAGRES(1)) K MAGRES(1)
- D:$G(DLG1)&(RC'=1) BLD^DIALOG(DLG1,,,"MAGRES")
- ;---
- Q RC
- ;
- ;+++++ RETURNS STATUS OF THE VERSION CHECKING FOR THE SITE
- ;
- ; PLC IEN of the Imaging site parameters (file #2006.1)
- ;
- ; Return Values
- ; =============
- ; 0 No version checking
- ; 1 Version checking is enabled
- ;
- VERCHKON(PLC) ;
- Q +$P(^MAG(2006.1,PLC,"KEYS"),U,5)
- ;
- ;+++++ RETURNS STATUS OF THE VERSION NAG MESSAGE FOR THE SITE
- ;
- ; PLC IEN of the Imaging site parameters (file #2006.1)
- ;
- ; Return Values
- ; =============
- ; 0 No nag message
- ; 1 Display nag message
- ;
- NAGMSGON(PLC) ;
- Q +$$GET1^DIQ(2006.1,PLC,132,"I")
- ;
- ;***** RETURNS THE STATUS OF IMAGING VERSION
- ; RPC: MAG4 VERSION STATUS
- ;
- ; .MAGRES Reference to a local variable where the result is
- ; returned to.
- ;
- ; MAGVER Version number (e.g. MAG*3.0*59 or 3.0.59)
- ;
- ; Return Values
- ; =============
- ;
- ; Status code and description are returned into the variable
- ; referenced by the MAGRES parameter. Below is the list of
- ; possible values:
- ;
- ; 0^There is no KIDS Install Record.
- ; 1^Unknown Release Status.
- ; 2^Alpha/Beta Version.
- ; 3^Released Version.
- ;
- VERSTAT(MAGRES,MAGVER) ;RPC [MAG4 VERSION STATUS]
- N TVER,MAGERR,VERI
- S:+MAGVER MAGVER="MAG*"_$P(MAGVER,".",1,2)_"*"_$P(MAGVER,".",3)
- ;--- Search for the installation record
- S VERI=$$FIND1^DIC(9.6,,"MO",MAGVER,,,"MAGERR")
- I 'VERI D Q
- . S MAGRES="0^There is no KIDS Install Record for """_MAGVER_"""."
- ;--- Check the alpha/beta testing status
- S TVER=$$GET1^DIQ(9.6,VERI_",","ALPHA/BETA TESTING",,,"MAGERR")
- I TVER="YES" S MAGRES="2^Alpha/Beta Version." Q
- I TVER="NO" S MAGRES="3^Released Version." Q
- S MAGRES="1^Unknown Release Status."
- Q
- ;
- ;***** IMPLEMENATION OF THE 'MAG CLIENT VERSION REPORT' OPTION
- WSCVCROP ;
- N DA,DIR,DIRUT,DTOUT,DUOUT,MAGSORT,X,Y
- N MAGLLGDT ; Workstation Last Login date
- N MAGWNMB ; Workstation name contains
- N MAGALLW ; Include all workstations in the report
- ;
- ; Get Last login date
- K DIR
- S DIR(0)="N^1:9999:0"
- S DIR("A")="Last login date is within this many days"
- S DIR("?")="Enter the number of days prior to today"
- S DIR("B")=30
- D ^DIR Q:$G(DIRUT)!($G(Y)="")
- S MAGLLGDT=$P($$FMADD^XLFDT($$NOW^XLFDT,-Y),".") ; just get the date
- ;
- ; Get Workstation start with
- K DIR
- S DIR(0)="FO^"
- S DIR("A")="Workstation name contains text"
- S DIR("?")="Enter text that the workstation name must contain to be included in the search."
- D ^DIR Q:$G(Y)="^"
- S MAGWNMB=Y
- ;
- ;--- Include all workstations in the report
- K DIR
- S DIR(0)="Y^"
- S DIR("A")="Include all workstations in the report"
- S DIR("B")="N"
- D ^DIR Q:$G(DIRUT)!($G(Y)="")
- S MAGALLW=Y
- ;
- ;--- Let the user select the report sort mode
- K DIR
- S DIR(0)="SO^"
- S DIR(0)=DIR(0)_"V:Site-Client-Version-Workstation Name;"
- S DIR(0)=DIR(0)_"W:Site-Workstation Name-Client;"
- S DIR("A")="Report Sort Mode"
- S DIR("B")="W"
- D ^DIR Q:$G(DIRUT)!($G(Y)="")
- S MAGSORT=Y
- ;
- ;--- Let the user select the device and queue the report
- W ! S %ZIS="Q" D ^%ZIS Q:$G(POP)
- I $D(IO("Q")) D K IO("Q")
- . N ZTCPU,ZTDESC,ZTDTH,ZTIO,ZTKIL,ZTPRI
- . N ZTRTN,ZTSAVE,ZTSK,ZTSYNC,ZTUCI
- . S ZTRTN="WSCVCRPT^MAGGTU42"
- . S ZTDESC="Imaging Workstations and Clients Report"
- . S ZTSAVE("MAGSORT")=MAGSORT
- . S ZTSAVE("MAGWNMB")=MAGWNMB
- . S ZTSAVE("MAGLLGDT")=MAGLLGDT
- . S ZTSAVE("MAGALLW")=MAGALLW
- . D ^%ZTLOAD,HOME^%ZIS
- . Q
- E U IO D WSCVCRPT^MAGGTU42
- ;---
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGGTU4 11394 printed Feb 18, 2025@23:29:49 Page 2
- MAGGTU4 ;WOIFO/GEK/SG/NST - VERSION CHECKS FOR IMAGING CLIENTS ; 21 Jun, 2023@13:44:31
- +1 ;;3.0;IMAGING;**8,48,63,45,46,59,96,95,72,93,94,356**;Mar 19, 2002;Build 8
- +2 ;; Per VHA Directive 2004-038, this routine should not be modified.
- +3 ;; +---------------------------------------------------------------+
- +4 ;; | Property of the US Government. |
- +5 ;; | No permission to copy or redistribute this software is given. |
- +6 ;; | Use of unreleased versions of this software requires the user |
- +7 ;; | to execute a written test agreement with the VistA Imaging |
- +8 ;; | Development Office of the Department of Veterans Affairs, |
- +9 ;; | telephone (301) 734-0100. |
- +10 ;; | The Food and Drug Administration classifies this software as |
- +11 ;; | a medical device. As such, it may not be changed in any way. |
- +12 ;; | Modifications to this software may result in an adulterated |
- +13 ;; | medical device under 21CFR820, the use of which is considered |
- +14 ;; | to be a violation of US Federal Statutes. |
- +15 ;; +---------------------------------------------------------------+
- +16 ;;
- +17 QUIT
- +18 ;
- +19 ;***** SETS ABSTRACT AND/OR JUKEBOX QUEUES
- +20 ; RPC: MAG ABSJB
- +21 ;
- +22 ; .MAGRES Reference to a local variable where the result is
- +23 ; returned to.
- +24 ;
- +25 ; .MAGIN IENs of images to be processed
- +26 ; ^01: IEN of the image that needs an abstract
- +27 ; created
- +28 ; ^02: IEN of the image that needs to be copied
- +29 ; to the jukebox
- +30 ;
- +31 ; Return Values
- +32 ; =============
- +33 ;
- +34 ; Result code and corresponding message are returned in the MAGRES
- +35 ; parameter:
- +36 ;
- +37 ; MAGRES Result descriptor
- +38 ; ^01: Result code:
- +39 ; 0 Error
- +40 ; 1 Success
- +41 ; ^02: Message
- +42 ;
- ABSJB(MAGRES,MAGIN) ;RPC [MAG ABSJB]
- +1 DO ABSJB^MAGGTU71(.MAGRES,.MAGIN)
- +2 QUIT
- +3 ;
- +4 ;***** CLIENT/SERVER VERSION CHECKS
- +5 ; RPC: MAG4 VERSION CHECK
- +6 ;
- +7 ; .MAGRES Reference to a local array where results are
- +8 ; returned to.
- +9 ;
- +10 ; CLVER Client application descriptor
- +11 ; |01: Version (Major.Minor.Patch.Build)
- +12 ; |02: empty or "RIV" for remote image view clients
- +13 ; |03: Client name ("CAPTURE", "CLUTILS", "DISPLAY",
- +14 ; "TELEREADER", or "VISTARAD")
- +15 ;
- +16 ; For example, the Clinical Display client Version
- +17 ; 3.0 Patch 8 Build (test version) 21 will pass
- +18 ; "3.0.8.21||DISPLAY" as the value of this parameter.
- +19 ;
- +20 ; Input Variables
- +21 ; ===============
- +22 ; MAGJOB
- +23 ;
- +24 ; Output Variables
- +25 ; ================
- +26 ; MAGJOB
- +27 ;
- +28 ; Return Values
- +29 ; =============
- +30 ;
- +31 ; Result code and message are returned into the MAGRES(0).
- +32 ; The subsequent nodes may contain additional lines of the
- +33 ; message text.
- +34 ;
- +35 ; MAGRES(0) Result descriptor
- +36 ; ^01: Result code:
- +37 ; 0 The client will display the
- +38 ; message and continue.
- +39 ; 1 The client will continue without
- +40 ; displaying any message.
- +41 ; 2 The client will display the
- +42 ; message and then terminate.
- +43 ; ^02: Message
- +44 ;
- +45 ; MAGRES(i) Additional line of the message text
- +46 ;
- +47 ; Notes
- +48 ; =====
- +49 ;
- +50 ; Ver 2.5P9 (2.5.24.1) is the first GUI client (Delphi) that makes
- +51 ; this call.
- +52 ;
- CHKVER(MAGRES,CLVER) ;RPC [MAG4 VERSION CHECK]
- +1 ; Version control data
- NEW MAGVCD
- +2 ;
- +3 NEW CLNAME,CVRC,RC
- +4 SET (CVRC,RC)=0
- +5 Begin DoDot:1
- +6 NEW I,N,TMP
- +7 ;--- Parse the client application descriptor
- +8 SET N=$LENGTH(CLVER,"|")
- SET CLNAME=$PIECE(CLVER,"|",3)
- +9 FOR I=2:1:N
- SET TMP=$PIECE(CLVER,"|",I)
- if TMP'=""
- SET MAGJOB(TMP)=1
- +10 SET CLVER=$PIECE(CLVER,"|")
- +11 IF CLNAME=""
- Begin DoDot:2
- +12 ;--- Only the client version was sent before the MAG*3.0*59
- +13 IF CLVER'["|"
- SET CLNAME="DISPLAY"
- QUIT
- +14 ;--- Currently, the client application name must be provided
- +15 SET RC=$$ERROR^MAGUERR(-24,,CLNAME)
- +16 QUIT
- End DoDot:2
- if RC<0
- QUIT
- +17 ; If client states it is TeleReader then record this - P356 CD 06/21/2023
- +18 IF CLNAME="TELEREADER"
- SET ^TMP($JOB,"MAGTELER")=1
- +19 ;
- +20 ;--- Check the client version
- +21 SET CVRC=$$CHKVER1^MAGGTU41(.MAGVCD,CLNAME,.CLVER)
- +22 IF CVRC<0
- SET RC=CVRC
- QUIT
- +23 ;
- +24 ;--- Load and format the message
- +25 SET RC=$$MESSAGE(CLNAME,CLVER,CVRC)
- +26 QUIT
- End DoDot:1
- +27 ;---
- +28 IF RC<0
- DO ERROR^MAGGTU41(.MAGRES,RC)
- QUIT
- +29 DO WARNING^MAGGTU41(.MAGRES,CLNAME,CLVER,CVRC)
- +30 QUIT
- +31 ;
- +32 ;+++++ LOADS AND FORMATS THE MESSAGE IN THE MAGRES ARRAY
- +33 ;
- +34 ; CLNAME Client name
- +35 ;
- +36 ; CLVER Client application version (Major.Minor.Patch.Build)
- +37 ;
- +38 ; CVRC Version check code returned by the $$CHKVER1^MAGGTU41
- +39 ;
- +40 ; Input Variables
- +41 ; ===============
- +42 ; DUZ, MAGVCD
- +43 ;
- +44 ; Output Variables
- +45 ; ================
- +46 ; MAGRES
- +47 ;
- +48 ; Return Values
- +49 ; =============
- +50 ; <0 Error descriptor (see $$ERROR^MAGUERR)
- +51 ; 0 The client will display a warning and continue
- +52 ; 1 The client will continue
- +53 ; 2 The client will display a warning and terminate
- +54 ;
- MESSAGE(CLNAME,CLVER,CVRC) ;
- +1 NEW BETA,CV,DLG,DLG1,MAGPRMS,PLC,RC,SVSTAT,TMP
- +2 KILL MAGRES
- +3 ;
- +4 ;--- If this is a remote connection, allow it.
- +5 IF $DATA(MAGJOB("RIV"))
- Begin DoDot:1
- +6 SET MAGRES(0)="1^"_$$EZBLD^DIALOG(20050005.013)
- +7 QUIT
- End DoDot:1
- QUIT 1
- +8 ;
- +9 ;--- Get IEN of the Imaging site parameters
- +10 if '$GET(DUZ(2))
- QUIT $$ERROR^MAGUERR(-26,,"DUZ(2)")
- +11 SET PLC=$$PLACE^MAGBAPI(DUZ(2))
- +12 IF 'PLC
- Begin DoDot:1
- +13 SET TMP=$PIECE($GET(^DIC(4,DUZ(2),0)),U)_" ["_DUZ(2)_"]"
- +14 QUIT
- End DoDot:1
- QUIT $$ERROR^MAGUERR(-27,,TMP)
- +15 ;
- +16 ;--- Quit if the site has VERSION CHECKING=0 (OFF) in
- +17 ;--- the IMAGING SITE PARAMETERS file (#2006.1)
- +18 ; Patch 94 - don't check for VERSION CHECKING
- +19 ;I '$$VERCHKON(PLC) D Q 1
- +20 ;. S MAGRES(0)="1^"_$$EZBLD^DIALOG(20050005.014)
- +21 ;. Q
- +22 ;
- +23 ;--- Is this server version alpha/beta or released?
- +24 DO VERSTAT(.SVSTAT,MAGVCD(CLNAME,"SV"))
- +25 IF '$GET(SVSTAT)
- SET MAGRES(0)="2^"_$PIECE(SVSTAT,U,2)
- QUIT 2
- +26 SET BETA=(+SVSTAT=2)
- +27 ;
- +28 ;--- Initilize message parameters
- +29 ; Client Major.Minor.Patch
- SET (MAGPRMS("CV"),CV)=$PIECE(CLVER,".",1,3)
- +30 ; Client patch number
- SET MAGPRMS("CP")=$PIECE(CLVER,".",3)
- +31 ; Supported client build
- SET MAGPRMS("CST")=$GET(MAGVCD(CLNAME,"ST",CV))
- +32 ; Client build number
- SET MAGPRMS("CT")=$PIECE(CLVER,".",4)
- +33 ; Server build number
- SET MAGPRMS("ST")=MAGVCD(CLNAME,"ST")
- +34 ; Server Major.Minor.Patch
- SET MAGPRMS("SV")=MAGVCD(CLNAME,"SV")
- +35 ; Server version status
- SET MAGPRMS("SVSTAT")=$PIECE(SVSTAT,U,2)
- +36 ;
- +37 SET DLG=20050005.001
- SET RC=1
- +38 if CVRC
- Begin DoDot:1
- +39 ;--- Latest version but old build (T-version)
- +40 IF CVRC=1
- Begin DoDot:2
- +41 SET RC=0
- SET DLG=$SELECT(BETA:20050005.008,1:20050005.007)
- +42 QUIT
- End DoDot:2
- QUIT
- +43 ;--- Supported version
- +44 IF CVRC=2
- Begin DoDot:2
- +45 SET RC=$SELECT(BETA:1,1:0)
- SET DLG=$SELECT(BETA:20050005.012,1:20050005.011)
- +46 if $PIECE(CV,".")=2
- SET DLG1=20050005.005
- +47 QUIT
- End DoDot:2
- QUIT
- +48 ;--- Supported version but old build (T-version)
- +49 IF CVRC=3
- Begin DoDot:2
- +50 SET RC=$SELECT(BETA:0,1:2)
- SET DLG=$SELECT(BETA:20050005.01,1:20050005.009)
- +51 QUIT
- End DoDot:2
- QUIT
- +52 ;--- Client is not supported
- +53 IF CVRC=4
- Begin DoDot:2
- +54 SET RC=$SELECT(BETA:0,1:2)
- SET DLG=$SELECT(BETA:20050005.004,1:20050005.003)
- +55 if $PIECE(CV,".")=2
- SET DLG1=20050005.006
- +56 QUIT
- End DoDot:2
- QUIT
- End DoDot:1
- +57 ;
- +58 ;--- Load and format the message
- +59 DO BLD^DIALOG(DLG,.MAGPRMS,,"MAGRES")
- +60 ; check for "version nag message" only if the server is not in alpha/beta
- +61 IF 'BETA
- Begin DoDot:1
- +62 ; the application will terminate or will not show the nag message
- IF RC'=0
- QUIT
- +63 ; do not show the nag message
- IF '$$NAGMSGON(PLC)
- SET RC=1
- +64 QUIT
- End DoDot:1
- +65 SET MAGRES(0)=RC_U_$GET(MAGRES(1))
- KILL MAGRES(1)
- +66 if $GET(DLG1)&(RC'=1)
- DO BLD^DIALOG(DLG1,,,"MAGRES")
- +67 ;---
- +68 QUIT RC
- +69 ;
- +70 ;+++++ RETURNS STATUS OF THE VERSION CHECKING FOR THE SITE
- +71 ;
- +72 ; PLC IEN of the Imaging site parameters (file #2006.1)
- +73 ;
- +74 ; Return Values
- +75 ; =============
- +76 ; 0 No version checking
- +77 ; 1 Version checking is enabled
- +78 ;
- VERCHKON(PLC) ;
- +1 QUIT +$PIECE(^MAG(2006.1,PLC,"KEYS"),U,5)
- +2 ;
- +3 ;+++++ RETURNS STATUS OF THE VERSION NAG MESSAGE FOR THE SITE
- +4 ;
- +5 ; PLC IEN of the Imaging site parameters (file #2006.1)
- +6 ;
- +7 ; Return Values
- +8 ; =============
- +9 ; 0 No nag message
- +10 ; 1 Display nag message
- +11 ;
- NAGMSGON(PLC) ;
- +1 QUIT +$$GET1^DIQ(2006.1,PLC,132,"I")
- +2 ;
- +3 ;***** RETURNS THE STATUS OF IMAGING VERSION
- +4 ; RPC: MAG4 VERSION STATUS
- +5 ;
- +6 ; .MAGRES Reference to a local variable where the result is
- +7 ; returned to.
- +8 ;
- +9 ; MAGVER Version number (e.g. MAG*3.0*59 or 3.0.59)
- +10 ;
- +11 ; Return Values
- +12 ; =============
- +13 ;
- +14 ; Status code and description are returned into the variable
- +15 ; referenced by the MAGRES parameter. Below is the list of
- +16 ; possible values:
- +17 ;
- +18 ; 0^There is no KIDS Install Record.
- +19 ; 1^Unknown Release Status.
- +20 ; 2^Alpha/Beta Version.
- +21 ; 3^Released Version.
- +22 ;
- VERSTAT(MAGRES,MAGVER) ;RPC [MAG4 VERSION STATUS]
- +1 NEW TVER,MAGERR,VERI
- +2 if +MAGVER
- SET MAGVER="MAG*"_$PIECE(MAGVER,".",1,2)_"*"_$PIECE(MAGVER,".",3)
- +3 ;--- Search for the installation record
- +4 SET VERI=$$FIND1^DIC(9.6,,"MO",MAGVER,,,"MAGERR")
- +5 IF 'VERI
- Begin DoDot:1
- +6 SET MAGRES="0^There is no KIDS Install Record for """_MAGVER_"""."
- End DoDot:1
- QUIT
- +7 ;--- Check the alpha/beta testing status
- +8 SET TVER=$$GET1^DIQ(9.6,VERI_",","ALPHA/BETA TESTING",,,"MAGERR")
- +9 IF TVER="YES"
- SET MAGRES="2^Alpha/Beta Version."
- QUIT
- +10 IF TVER="NO"
- SET MAGRES="3^Released Version."
- QUIT
- +11 SET MAGRES="1^Unknown Release Status."
- +12 QUIT
- +13 ;
- +14 ;***** IMPLEMENATION OF THE 'MAG CLIENT VERSION REPORT' OPTION
- WSCVCROP ;
- +1 NEW DA,DIR,DIRUT,DTOUT,DUOUT,MAGSORT,X,Y
- +2 ; Workstation Last Login date
- NEW MAGLLGDT
- +3 ; Workstation name contains
- NEW MAGWNMB
- +4 ; Include all workstations in the report
- NEW MAGALLW
- +5 ;
- +6 ; Get Last login date
- +7 KILL DIR
- +8 SET DIR(0)="N^1:9999:0"
- +9 SET DIR("A")="Last login date is within this many days"
- +10 SET DIR("?")="Enter the number of days prior to today"
- +11 SET DIR("B")=30
- +12 DO ^DIR
- if $GET(DIRUT)!($GET(Y)="")
- QUIT
- +13 ; just get the date
- SET MAGLLGDT=$PIECE($$FMADD^XLFDT($$NOW^XLFDT,-Y),".")
- +14 ;
- +15 ; Get Workstation start with
- +16 KILL DIR
- +17 SET DIR(0)="FO^"
- +18 SET DIR("A")="Workstation name contains text"
- +19 SET DIR("?")="Enter text that the workstation name must contain to be included in the search."
- +20 DO ^DIR
- if $GET(Y)="^"
- QUIT
- +21 SET MAGWNMB=Y
- +22 ;
- +23 ;--- Include all workstations in the report
- +24 KILL DIR
- +25 SET DIR(0)="Y^"
- +26 SET DIR("A")="Include all workstations in the report"
- +27 SET DIR("B")="N"
- +28 DO ^DIR
- if $GET(DIRUT)!($GET(Y)="")
- QUIT
- +29 SET MAGALLW=Y
- +30 ;
- +31 ;--- Let the user select the report sort mode
- +32 KILL DIR
- +33 SET DIR(0)="SO^"
- +34 SET DIR(0)=DIR(0)_"V:Site-Client-Version-Workstation Name;"
- +35 SET DIR(0)=DIR(0)_"W:Site-Workstation Name-Client;"
- +36 SET DIR("A")="Report Sort Mode"
- +37 SET DIR("B")="W"
- +38 DO ^DIR
- if $GET(DIRUT)!($GET(Y)="")
- QUIT
- +39 SET MAGSORT=Y
- +40 ;
- +41 ;--- Let the user select the device and queue the report
- +42 WRITE !
- SET %ZIS="Q"
- DO ^%ZIS
- if $GET(POP)
- QUIT
- +43 IF $DATA(IO("Q"))
- Begin DoDot:1
- +44 NEW ZTCPU,ZTDESC,ZTDTH,ZTIO,ZTKIL,ZTPRI
- +45 NEW ZTRTN,ZTSAVE,ZTSK,ZTSYNC,ZTUCI
- +46 SET ZTRTN="WSCVCRPT^MAGGTU42"
- +47 SET ZTDESC="Imaging Workstations and Clients Report"
- +48 SET ZTSAVE("MAGSORT")=MAGSORT
- +49 SET ZTSAVE("MAGWNMB")=MAGWNMB
- +50 SET ZTSAVE("MAGLLGDT")=MAGLLGDT
- +51 SET ZTSAVE("MAGALLW")=MAGALLW
- +52 DO ^%ZTLOAD
- DO HOME^%ZIS
- +53 QUIT
- End DoDot:1
- KILL IO("Q")
- +54 IF '$TEST
- USE IO
- DO WSCVCRPT^MAGGTU42
- +55 ;---
- +56 QUIT