LR138PO ; IHS/DIR/AAB - LR*5.2*138 POST INSTALL ROUTINE KIDS INSTALL ;
;;5.2;LR;**1002**;JUN 01, 1998
;;5.2;LAB SERVICE;**138**;Sep 27, 1994
EN ;Builds Laboratory OOS Locations for each LMIP valid WKLD Divison
;
W !!,$$CJ^XLFSTR("Starting Post Install Process",80),!!
L +^LAM(0):2 I $T S:$D(^LAM(0))#2 $P(^(0),U,3)=99999 L -^LAM(0)
L +^LRO(69,"AA"):1 I '$T D G END
. W !?5,"Cant lock ^LRO(69,AA) GLOBAL POST INSTALL ABORTED",!
S X=$$ADD^XPDMENU("LR LIM/WKLD MENU","LR WKLD LOCATION")
W !!,"Option [LR WKLD LOCATIONS] was ",$S(X:"Added",1:"NOT ADDED")," to [LR LIM/WKLD] MENU ",!!
S X=$$ADD^XPDMENU("LR LIM/WKLD MENU","LR WKLD ACC AREA LOCATION")
W !!,"Option [LR WKLD ACC AREA LOCATIONS] was ",$S(X:"Added",1:"NOT ADDED")," to [LR LIM/WKLD] MENU ",!!
LOC ;
S LRPKG=$O(^DIC(9.4,"B","LR",0))
I 'LRPKG S LRPKG=$O(^DIC(9.4,"B","LAB SERVICE",0))
I 'LRPKG D G END
.W !!,$$CJ^XLFSTR("Not able to find 'LAB SERVICE' in your Package (#9.4) file.",80),!,$$CJ^XLFSTR("Contact your IRM Service !!",80),!!,$C(7) H 5 S XPDQUIT=2
. W !,$$CJ^XLFSTR("POST INSTALL ABORTED",80)
W !!,$$CJ^XLFSTR("Creating Laboratory OOS Workload Locations",80),!!
SET S LROK=""
S LRVN=$O(^LRO(67.9,0)) I LRVN S LRDIVN=LRVN D LK I $G(LROK)>0 S ^LAB(69.9,1,.8)=LROK
I $G(LROK)>0 S LRVN1=0 F S LRVN1=$O(^LRO(67.9,LRVN,1,LRVN1)) Q:LRVN1<1 S LRDIVN=LRVN1 D LK
S LRDIVN=+$$SITE^VASITE I LRDIVN D LK I $G(LROK)>0,'$G(^LAB(69.9,1,.8)) S ^(.8)=LROK
I $G(^LAB(69.9,1,.8)) W !,$$CJ^XLFSTR("Database Upgrade Completed Successfully",80),!! D G MSG
. K DA,DIC,DIE S DA=+$G(^LAB(69.9,1,.8)),DIC="^SC(",DR="0:999999"
. W !!,$$CJ^XLFSTR("DEFAULT LAB OOS LOCATION IS",80),!! D EN^DIQ W !
W !! F I=1:1:2 D EQUALS^LRX W $C(7)
W !,$$CJ^XLFSTR(" Database Upgrade was INCOMPLETE ",80)
W !! F I=1:1:2 D EQUALS^LRX W $C(7)
W !
MSG S $P(^LAB(69.9,1,"VSIT"),U)=2
W !,$$CJ^XLFSTR("PCE/VSIT ON (#615) field in LABORATORY SITE (#69.9) file",80)
W !,$$CJ^XLFSTR("has been set to BOTH PCE/VSIT AND STOP CODES",80),!!
END ;
L -^LRO(69,"AA")
Q:$G(LRDBUG)
K DA,DATA,DIE,DIK,DIC,DR,LRDIV,LRDIVN,LRNAME,LROK,LRPKG,LRSCODE,LRVN
K LRVN1,X
Q
LK ;
Q:$G(LRSDCX)
S LRDIV=$S($G(^DIC(4,LRDIVN,99)):$P(^(99),U),1:LRDIVN)
S LRSCODE=108,LRNAME="LAB DIV "_LRDIV_" OOS ID "_LRSCODE
D LOADB^LRCAPPH2
Q
LR138PO ; IHS/DIR/AAB - LR*5.2*138 POST INSTALL ROUTINE KIDS INSTALL ;
+1 ;;5.2;LR;**1002**;JUN 01, 1998
+2 ;;5.2;LAB SERVICE;**138**;Sep 27, 1994
EN ;Builds Laboratory OOS Locations for each LMIP valid WKLD Divison
+1 ;
+2 WRITE !!,$$CJ^XLFSTR("Starting Post Install Process",80),!!
+3 LOCK +^LAM(0):2
IF $TEST
IF $DATA(^LAM(0))#2
SET $PIECE(^(0),U,3)=99999
LOCK -^LAM(0)
+4 LOCK +^LRO(69,"AA"):1
IF '$TEST
Begin DoDot:1
+5 WRITE !?5,"Cant lock ^LRO(69,AA) GLOBAL POST INSTALL ABORTED",!
End DoDot:1
GOTO END
+6 SET X=$$ADD^XPDMENU("LR LIM/WKLD MENU","LR WKLD LOCATION")
+7 WRITE !!,"Option [LR WKLD LOCATIONS] was ",$SELECT(X:"Added",1:"NOT ADDED")," to [LR LIM/WKLD] MENU ",!!
+8 SET X=$$ADD^XPDMENU("LR LIM/WKLD MENU","LR WKLD ACC AREA LOCATION")
+9 WRITE !!,"Option [LR WKLD ACC AREA LOCATIONS] was ",$SELECT(X:"Added",1:"NOT ADDED")," to [LR LIM/WKLD] MENU ",!!
LOC ;
+1 SET LRPKG=$ORDER(^DIC(9.4,"B","LR",0))
+2 IF 'LRPKG
SET LRPKG=$ORDER(^DIC(9.4,"B","LAB SERVICE",0))
+3 IF 'LRPKG
Begin DoDot:1
+4 WRITE !!,$$CJ^XLFSTR("Not able to find 'LAB SERVICE' in your Package (#9.4) file.",80),!,$$CJ^XLFSTR("Contact your IRM Service !!",80),!!,$CHAR(7)
HANG 5
SET XPDQUIT=2
+5 WRITE !,$$CJ^XLFSTR("POST INSTALL ABORTED",80)
End DoDot:1
GOTO END
+6 WRITE !!,$$CJ^XLFSTR("Creating Laboratory OOS Workload Locations",80),!!
SET SET LROK=""
+1 SET LRVN=$ORDER(^LRO(67.9,0))
IF LRVN
SET LRDIVN=LRVN
DO LK
IF $GET(LROK)>0
SET ^LAB(69.9,1,.8)=LROK
+2 IF $GET(LROK)>0
SET LRVN1=0
FOR
SET LRVN1=$ORDER(^LRO(67.9,LRVN,1,LRVN1))
IF LRVN1<1
QUIT
SET LRDIVN=LRVN1
DO LK
+3 SET LRDIVN=+$$SITE^VASITE
IF LRDIVN
DO LK
IF $GET(LROK)>0
IF '$GET(^LAB(69.9,1,.8))
SET ^(.8)=LROK
+4 IF $GET(^LAB(69.9,1,.8))
WRITE !,$$CJ^XLFSTR("Database Upgrade Completed Successfully",80),!!
Begin DoDot:1
+5 KILL DA,DIC,DIE
SET DA=+$GET(^LAB(69.9,1,.8))
SET DIC="^SC("
SET DR="0:999999"
+6 WRITE !!,$$CJ^XLFSTR("DEFAULT LAB OOS LOCATION IS",80),!!
DO EN^DIQ
WRITE !
End DoDot:1
GOTO MSG
+7 WRITE !!
FOR I=1:1:2
DO EQUALS^LRX
WRITE $CHAR(7)
+8 WRITE !,$$CJ^XLFSTR(" Database Upgrade was INCOMPLETE ",80)
+9 WRITE !!
FOR I=1:1:2
DO EQUALS^LRX
WRITE $CHAR(7)
+10 WRITE !
MSG SET $PIECE(^LAB(69.9,1,"VSIT"),U)=2
+1 WRITE !,$$CJ^XLFSTR("PCE/VSIT ON (#615) field in LABORATORY SITE (#69.9) file",80)
+2 WRITE !,$$CJ^XLFSTR("has been set to BOTH PCE/VSIT AND STOP CODES",80),!!
END ;
+1 LOCK -^LRO(69,"AA")
+2 IF $GET(LRDBUG)
QUIT
+3 KILL DA,DATA,DIE,DIK,DIC,DR,LRDIV,LRDIVN,LRNAME,LROK,LRPKG,LRSCODE,LRVN
+4 KILL LRVN1,X
+5 QUIT
LK ;
+1 IF $GET(LRSDCX)
QUIT
+2 SET LRDIV=$SELECT($GET(^DIC(4,LRDIVN,99)):$PIECE(^(99),U),1:LRDIVN)
+3 SET LRSCODE=108
SET LRNAME="LAB DIV "_LRDIV_" OOS ID "_LRSCODE
+4 DO LOADB^LRCAPPH2
+5 QUIT