YTQRCRT ;SLC/KCM - MH Reminder Dialog DLL Tools ; 1/25/2017
;;5.01;MENTAL HEALTH;**223**;Dec 30, 1994;Build 22
;
DLLTGL ; Used by option, YS223 TOGGLE WEB DLL
; YS CPRS DLL SAVE stores the following on first install of patch 223
; 1:InitialName
; 2:InitialVersion
; 3:WebName
; 4:WebVersion
N WNDNM,WNDVER,WEBNM,WEBVER,CURNM,CURVER,VERDATA,YS,DIR,DIRUT,DUOUT,X,Y
S WNDNM=$$GET^XPAR("SYS","YSCPRS DLL SAVE",1)
S WNDVER=$$GET^XPAR("SYS","YSCPRS DLL SAVE",2)
S WEBNM=$$GET^XPAR("SYS","YSCPRS DLL SAVE",3)
S WEBVER=$$GET^XPAR("SYS","YSCPRS DLL SAVE",4)
S YS("YSB")="YS BROKER1"
D VERSRV^YTQAPI7(.VERDATA,.YS)
S CURVER=$G(VERDATA(3))
S CURNM=$$GET^XPAR("SYS","YS MHA_A DLL NAME")
I CURVER=WEBVER D
. W !!,"The web version of the Mental Health DLL for CPRS is currently ENABLED."
. W !,"The previous version was ",WNDVER," ("_WNDNM_")."
. W !,"DISABLE the WEB version and reinstate the previous version?"
. S DIR(0)="Y",DIR("B")="NO" D ^DIR
. I Y D SETVER(WNDVER,WNDNM) W !,"done"
E D
. W !!,"The web version of the Mental Health DLL for CPRS is currently DISABLED."
. W !,"The web version is ",WEBVER," ("_WEBNM_")."
. W !,"ENABLE the WEB version and stop using the current version?"
. S DIR(0)="Y",DIR("B")="YES" D ^DIR
. I Y D SETVER(WEBVER,WEBNM) W !,"done"
Q
SETVER(NEWVER,NEWNM) ; set DLL version and name
N YTERR
D UPDVER^YTQAPI7(2,NEWVER)
D EN^XPAR("SYS","YS MHA_A DLL NAME",1,NEWNM,.YTERR)
I YTERR W !,"Error updating DLL name to "_NEWNM
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HYTQRCRT 1523 printed Nov 22, 2024@17:28:48 Page 2
YTQRCRT ;SLC/KCM - MH Reminder Dialog DLL Tools ; 1/25/2017
+1 ;;5.01;MENTAL HEALTH;**223**;Dec 30, 1994;Build 22
+2 ;
DLLTGL ; Used by option, YS223 TOGGLE WEB DLL
+1 ; YS CPRS DLL SAVE stores the following on first install of patch 223
+2 ; 1:InitialName
+3 ; 2:InitialVersion
+4 ; 3:WebName
+5 ; 4:WebVersion
+6 NEW WNDNM,WNDVER,WEBNM,WEBVER,CURNM,CURVER,VERDATA,YS,DIR,DIRUT,DUOUT,X,Y
+7 SET WNDNM=$$GET^XPAR("SYS","YSCPRS DLL SAVE",1)
+8 SET WNDVER=$$GET^XPAR("SYS","YSCPRS DLL SAVE",2)
+9 SET WEBNM=$$GET^XPAR("SYS","YSCPRS DLL SAVE",3)
+10 SET WEBVER=$$GET^XPAR("SYS","YSCPRS DLL SAVE",4)
+11 SET YS("YSB")="YS BROKER1"
+12 DO VERSRV^YTQAPI7(.VERDATA,.YS)
+13 SET CURVER=$GET(VERDATA(3))
+14 SET CURNM=$$GET^XPAR("SYS","YS MHA_A DLL NAME")
+15 IF CURVER=WEBVER
Begin DoDot:1
+16 WRITE !!,"The web version of the Mental Health DLL for CPRS is currently ENABLED."
+17 WRITE !,"The previous version was ",WNDVER," ("_WNDNM_")."
+18 WRITE !,"DISABLE the WEB version and reinstate the previous version?"
+19 SET DIR(0)="Y"
SET DIR("B")="NO"
DO ^DIR
+20 IF Y
DO SETVER(WNDVER,WNDNM)
WRITE !,"done"
End DoDot:1
+21 IF '$TEST
Begin DoDot:1
+22 WRITE !!,"The web version of the Mental Health DLL for CPRS is currently DISABLED."
+23 WRITE !,"The web version is ",WEBVER," ("_WEBNM_")."
+24 WRITE !,"ENABLE the WEB version and stop using the current version?"
+25 SET DIR(0)="Y"
SET DIR("B")="YES"
DO ^DIR
+26 IF Y
DO SETVER(WEBVER,WEBNM)
WRITE !,"done"
End DoDot:1
+27 QUIT
SETVER(NEWVER,NEWNM) ; set DLL version and name
+1 NEW YTERR
+2 DO UPDVER^YTQAPI7(2,NEWVER)
+3 DO EN^XPAR("SYS","YS MHA_A DLL NAME",1,NEWNM,.YTERR)
+4 IF YTERR
WRITE !,"Error updating DLL name to "_NEWNM
+5 QUIT