LEX2I02E ;IHS/OIT/FCJ - LEX*2.0*1002 Env Check FOR IHS patch 1002 ;07/01/2011
;;2.0;LEXICON UTILITY;**1002**;Sep 23, 1996;Build 10
;
;
ENV ;
I '$G(IOM) D HOME^%ZIS
I '$G(DUZ) W !,"DUZ UNDEFINED OR 0." D SORRY(2) Q
I '$L($G(DUZ(0))) W !,"DUZ(0) UNDEFINED OR NULL." D SORRY(2) Q
I '(DUZ(0)["@") W:'$D(ZTQUEUED) !,"DUZ(0) DOES NOT CONTAIN AN '@'." D SORRY(2) Q
;
S X=$$GET1^DIQ(200,DUZ,.01)
W !!,$$CJ^XLFSTR("Hello, "_$P(X,",",2)_" "_$P(X,","),IOM)
W !!,$$CJ^XLFSTR("Checking Environment for "_$P($T(+2),";",4)_" V "_$P($T(+2),";",3)_" Patch "_$P($T(+2),";",5)_".",IOM)
;
NEW IORVON,IORVOFF
S X="IORVON;IORVOFF"
D ENDR^%ZISS
CHK ;
;I $$INSTALLD("LEX*2.0*1002") W !,"LEX*2.0 has already been installed." S XPDQUIT=2 Q
I '$$INSTALLD("ICPT*6.0*1002") S XPDQUIT=2
I '$$INSTALLD("ICD*18.0*1002") S XPDQUIT=2
I '$$INSTALLD("LEX*2.0*1001") S XPDQUIT=2
I $$VCHK("DI","22.0",2,"<")
I $$VCHK("XU","8.0",2,"<")
I '$$INSTALLD("AUT*98.1*24") S XPDQUIT=2
I '$$INSTALLD("AUM*11.0*6") S XPDQUIT=2
;
NEW DA,DIC
S X="LEX",DIC="^DIC(9.4,",DIC(0)="",D="C"
D IX^DIC
I Y<0,$D(^DIC(9.4,"C","LEX")) D
.W !!,*7,*7,$$CJ^XLFSTR("You Have More Than One Entry In The",IOM),!,$$CJ^XLFSTR("PACKAGE File with an ""LEX"" prefix.",IOM)
.W !,$$CJ^XLFSTR(IORVON_"One entry needs to be deleted."_IORVOFF,IOM)
.D SORRY(2)
;
I $G(XPDQUIT) W !,$$CJ^XLFSTR(IORVON_"You must FIX IT, Before Proceeding."_IORVOFF,IOM),!!,*7,*7,*7 Q
W !!,$$CJ^XLFSTR("ENVIRONMENT OK.",IOM)
D HELP^XBHELP("INTROE","LEX2I02E")
I '$$DIR^XBDIR("E","","","","","",1) D SORRY(2) Q
I $G(XPDENV)=1 S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0 D HELP^XBHELP("INTROI","LEX2I02E") I '$$DIR^XBDIR("E","","","","","",1) D SORRY(2)
Q
;
SORRY(X) ;
KILL DIFQ
S XPDQUIT=X
W *7,!,$$CJ^XLFSTR("Sorry....FIX IT!",IOM)
Q
;
VCHK(LEXPRE,LEXVER,LEXQUIT,LEXCOMP) ; Check versions needed.
;
NEW LEXV
S LEXV=$$VERSION^XPDUTL(LEXPRE)
W !,$$CJ^XLFSTR("Need "_$S(LEXCOMP="<":"at least ",1:"")_LEXPRE_" v "_LEXVER_"....."_LEXPRE_" v "_LEXV_" Present",IOM)
I @(LEXV_LEXCOMP_LEXVER) D SORRY(LEXQUIT) Q 0
Q 1
INSTALLD(LEX) ;EP; Determine if patch was installed, where LEX is
; the name of the INSTALL. E.g "AVA*93.2*12".
;
NEW DIC,X,Y
; lookup package.
S X=$P(LEX,"*",1)
S DIC="^DIC(9.4,",DIC(0)="FM",D="C"
D IX^DIC
I Y<1 Q 0
; lookup version.
S DIC=DIC_+Y_",22,",X=$P(LEX,"*",2)
D ^DIC
I Y<1 Q 0
; lookup patch.
S DIC=DIC_+Y_",""PAH"",",X=$P(LEX,"*",3)
D ^DIC
I Y<1 S P=DIC_"""B"","_X_")" I $O(@P)'="" S Y=1
I Y>0 W !,$$CJ^XLFSTR("Need at least "_LEX_"....."_LEX_" Present",IOM)
I Y<0 W !,$$CJ^XLFSTR("Need at least "_LEX_".....",IOM)
Q $S(Y<1:0,1:1)
; -------------------------------------------
INTROE ; Intro text during KIDS Environment check.
;; Distribution contains VA Lexicon patches 54 through 78
;; and patch 81. Patch 81 is an index patch fix which
;; is required. Patch 79 and 80 are data patches,
;; IHS currently releases ICD codes annually, as VA
;; releases quarterly. Patches 79 and 80 will be released
;; with the annual ICD patch in October.
;;
;;
;;###
;
INTROI ; Intro text during KIDS Install.
;;A standard message will be produced by this update.
;;
;;If you run interactively, results are displayed on your screen,
;;in the mail message and in the INSTALL file.
;;If you queue to TaskMan, please read the mail message for results of
;;this update, and remember not to Q to the HOME device.
;;###
LEX2I02E ;IHS/OIT/FCJ - LEX*2.0*1002 Env Check FOR IHS patch 1002 ;07/01/2011
+1 ;;2.0;LEXICON UTILITY;**1002**;Sep 23, 1996;Build 10
+2 ;
+3 ;
ENV ;
+1 IF '$GET(IOM)
DO HOME^%ZIS
+2 IF '$GET(DUZ)
WRITE !,"DUZ UNDEFINED OR 0."
DO SORRY(2)
QUIT
+3 IF '$LENGTH($GET(DUZ(0)))
WRITE !,"DUZ(0) UNDEFINED OR NULL."
DO SORRY(2)
QUIT
+4 IF '(DUZ(0)["@")
IF '$DATA(ZTQUEUED)
WRITE !,"DUZ(0) DOES NOT CONTAIN AN '@'."
DO SORRY(2)
QUIT
+5 ;
+6 SET X=$$GET1^DIQ(200,DUZ,.01)
+7 WRITE !!,$$CJ^XLFSTR("Hello, "_$PIECE(X,",",2)_" "_$PIECE(X,","),IOM)
+8 WRITE !!,$$CJ^XLFSTR("Checking Environment for "_$PIECE($TEXT(+2),";",4)_" V "_$PIECE($TEXT(+2),";",3)_" Patch "_$PIECE($TEXT(+2),";",5)_".",IOM)
+9 ;
+10 NEW IORVON,IORVOFF
+11 SET X="IORVON;IORVOFF"
+12 DO ENDR^%ZISS
CHK ;
+1 ;I $$INSTALLD("LEX*2.0*1002") W !,"LEX*2.0 has already been installed." S XPDQUIT=2 Q
+2 IF '$$INSTALLD("ICPT*6.0*1002")
SET XPDQUIT=2
+3 IF '$$INSTALLD("ICD*18.0*1002")
SET XPDQUIT=2
+4 IF '$$INSTALLD("LEX*2.0*1001")
SET XPDQUIT=2
+5 IF $$VCHK("DI","22.0",2,"<")
+6 IF $$VCHK("XU","8.0",2,"<")
+7 IF '$$INSTALLD("AUT*98.1*24")
SET XPDQUIT=2
+8 IF '$$INSTALLD("AUM*11.0*6")
SET XPDQUIT=2
+9 ;
+10 NEW DA,DIC
+11 SET X="LEX"
SET DIC="^DIC(9.4,"
SET DIC(0)=""
SET D="C"
+12 DO IX^DIC
+13 IF Y<0
IF $DATA(^DIC(9.4,"C","LEX"))
Begin DoDot:1
+14 WRITE !!,*7,*7,$$CJ^XLFSTR("You Have More Than One Entry In The",IOM),!,$$CJ^XLFSTR("PACKAGE File with an ""LEX"" prefix.",IOM)
+15 WRITE !,$$CJ^XLFSTR(IORVON_"One entry needs to be deleted."_IORVOFF,IOM)
+16 DO SORRY(2)
End DoDot:1
+17 ;
+18 IF $GET(XPDQUIT)
WRITE !,$$CJ^XLFSTR(IORVON_"You must FIX IT, Before Proceeding."_IORVOFF,IOM),!!,*7,*7,*7
QUIT
+19 WRITE !!,$$CJ^XLFSTR("ENVIRONMENT OK.",IOM)
+20 DO HELP^XBHELP("INTROE","LEX2I02E")
+21 IF '$$DIR^XBDIR("E","","","","","",1)
DO SORRY(2)
QUIT
+22 IF $GET(XPDENV)=1
SET (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
DO HELP^XBHELP("INTROI","LEX2I02E")
IF '$$DIR^XBDIR("E","","","","","",1)
DO SORRY(2)
+23 QUIT
+24 ;
SORRY(X) ;
+1 KILL DIFQ
+2 SET XPDQUIT=X
+3 WRITE *7,!,$$CJ^XLFSTR("Sorry....FIX IT!",IOM)
+4 QUIT
+5 ;
VCHK(LEXPRE,LEXVER,LEXQUIT,LEXCOMP) ; Check versions needed.
+1 ;
+2 NEW LEXV
+3 SET LEXV=$$VERSION^XPDUTL(LEXPRE)
+4 WRITE !,$$CJ^XLFSTR("Need "_$SELECT(LEXCOMP="<":"at least ",1:"")_LEXPRE_" v "_LEXVER_"....."_LEXPRE_" v "_LEXV_" Present",IOM)
+5 IF @(LEXV_LEXCOMP_LEXVER)
DO SORRY(LEXQUIT)
QUIT 0
+6 QUIT 1
INSTALLD(LEX) ;EP; Determine if patch was installed, where LEX is
+1 ; the name of the INSTALL. E.g "AVA*93.2*12".
+2 ;
+3 NEW DIC,X,Y
+4 ; lookup package.
+5 SET X=$PIECE(LEX,"*",1)
+6 SET DIC="^DIC(9.4,"
SET DIC(0)="FM"
SET D="C"
+7 DO IX^DIC
+8 IF Y<1
QUIT 0
+9 ; lookup version.
+10 SET DIC=DIC_+Y_",22,"
SET X=$PIECE(LEX,"*",2)
+11 DO ^DIC
+12 IF Y<1
QUIT 0
+13 ; lookup patch.
+14 SET DIC=DIC_+Y_",""PAH"","
SET X=$PIECE(LEX,"*",3)
+15 DO ^DIC
+16 IF Y<1
SET P=DIC_"""B"","_X_")"
IF $ORDER(@P)'=""
SET Y=1
+17 IF Y>0
WRITE !,$$CJ^XLFSTR("Need at least "_LEX_"....."_LEX_" Present",IOM)
+18 IF Y<0
WRITE !,$$CJ^XLFSTR("Need at least "_LEX_".....",IOM)
+19 QUIT $SELECT(Y<1:0,1:1)
+20 ; -------------------------------------------
INTROE ; Intro text during KIDS Environment check.
+1 ;; Distribution contains VA Lexicon patches 54 through 78
+2 ;; and patch 81. Patch 81 is an index patch fix which
+3 ;; is required. Patch 79 and 80 are data patches,
+4 ;; IHS currently releases ICD codes annually, as VA
+5 ;; releases quarterly. Patches 79 and 80 will be released
+6 ;; with the annual ICD patch in October.
+7 ;;
+8 ;;
+9 ;;###
+10 ;
INTROI ; Intro text during KIDS Install.
+1 ;;A standard message will be produced by this update.
+2 ;;
+3 ;;If you run interactively, results are displayed on your screen,
+4 ;;in the mail message and in the INSTALL file.
+5 ;;If you queue to TaskMan, please read the mail message for results of
+6 ;;this update, and remember not to Q to the HOME device.
+7 ;;###