BADEENV5 ;IHS/OIT/GAB - BADE ENVIRONMENT CHECK ROUTINE PATCH 4;10-NOV-2015 16:21;GAB
;;1.0;DENTAL/EDR INTERFACE;**5**;FEB 22, 2010;Build 23
;
ENV ;EP
N IN,PATCH,INSTDA,STAT
W !,"Checking environment ....",!
;Check for the installation of the EDR Patch 4
S IN="BADE*1.0*4",INSTDA=""
I '$D(^XPD(9.7,"B",IN)) D Q
.D MES("You must first install the DENTAL/EDR INTERFACE BADE Patch 4 before this patch",2)
S INSTDA=$O(^XPD(9.7,"B",IN,INSTDA),-1)
S STAT=+$P($G(^XPD(9.7,INSTDA,0)),U,9)
I STAT'=3 D Q
.D MES("DENTAL/EDR INTERFACE BADE Patch 4 must be completely installed before installing this patch",2)
; now check the DUZ ..
I '$G(IOM) D HOME^%ZIS
I '$G(DUZ) W !,"YOUR DUZ VARIABLE IS UNDEFINED!! Please login with your Access & Verify." D SORRY(2) Q
I '$L($G(DUZ(0))) W !,"Your DUZ(0) VARIABLE IS UNDEFINED OR NULL." D SORRY(2) Q
I '(DUZ(0)["@") W:'$D(ZTQUEUED) !,"YOUR DUZ(0) VARIABLE DOES NOT CONTAIN AN '@'." D SORRY(2)
Q
MES(TXT,QUIT) ;EP
D BMES^XPDUTL(" "_$G(TXT))
S:$G(QUIT) XPDABORT=QUIT
Q
;
SORRY(X) ;
K DIFQ
S XPDQUIT=X
W *7,!,$$CJ^XLFSTR("Sorry....Please fix it.",40)
Q
BADEENV5 ;IHS/OIT/GAB - BADE ENVIRONMENT CHECK ROUTINE PATCH 4;10-NOV-2015 16:21;GAB
+1 ;;1.0;DENTAL/EDR INTERFACE;**5**;FEB 22, 2010;Build 23
+2 ;
ENV ;EP
+1 NEW IN,PATCH,INSTDA,STAT
+2 WRITE !,"Checking environment ....",!
+3 ;Check for the installation of the EDR Patch 4
+4 SET IN="BADE*1.0*4"
SET INSTDA=""
+5 IF '$DATA(^XPD(9.7,"B",IN))
Begin DoDot:1
+6 DO MES("You must first install the DENTAL/EDR INTERFACE BADE Patch 4 before this patch",2)
End DoDot:1
QUIT
+7 SET INSTDA=$ORDER(^XPD(9.7,"B",IN,INSTDA),-1)
+8 SET STAT=+$PIECE($GET(^XPD(9.7,INSTDA,0)),U,9)
+9 IF STAT'=3
Begin DoDot:1
+10 DO MES("DENTAL/EDR INTERFACE BADE Patch 4 must be completely installed before installing this patch",2)
End DoDot:1
QUIT
+11 ; now check the DUZ ..
+12 IF '$GET(IOM)
DO HOME^%ZIS
+13 IF '$GET(DUZ)
WRITE !,"YOUR DUZ VARIABLE IS UNDEFINED!! Please login with your Access & Verify."
DO SORRY(2)
QUIT
+14 IF '$LENGTH($GET(DUZ(0)))
WRITE !,"Your DUZ(0) VARIABLE IS UNDEFINED OR NULL."
DO SORRY(2)
QUIT
+15 IF '(DUZ(0)["@")
IF '$DATA(ZTQUEUED)
WRITE !,"YOUR DUZ(0) VARIABLE DOES NOT CONTAIN AN '@'."
DO SORRY(2)
+16 QUIT
MES(TXT,QUIT) ;EP
+1 DO BMES^XPDUTL(" "_$GET(TXT))
+2 IF $GET(QUIT)
SET XPDABORT=QUIT
+3 QUIT
+4 ;
SORRY(X) ;
+1 KILL DIFQ
+2 SET XPDQUIT=X
+3 WRITE *7,!,$$CJ^XLFSTR("Sorry....Please fix it.",40)
+4 QUIT