PSSCHPST ;BIR/WRT-CMOP-Host post-install routine ; 09/30/97 14:56
;;1.0;PHARMACY DATA MANAGEMENT;;9/30/97
; POST-INSTALL ROUTINE-CMOP HOST
VERSION S:'$D(^PS(59.7,1,80)) ^PS(59.7,1,80)="1.0^0"
D ^PSSDENT,MR,CLEAN S $P(^PS(59.7,1,80),"^",1)="1.0" D BTEMP,P8 K ^TMP($J,"PSSEXP"),SCH,IEN,OEXP
Q
CLEAN F IFN=0:0 S IFN=$O(^PSDRUG(IFN)) Q:'IFN K:$D(^PSDRUG(IFN,"CH")) ^PSDRUG(IFN,"CH") K:$D(^PSDRUG(IFN,"PS")) ^PSDRUG(IFN,"PS") K:$D(^PSDRUG(IFN,"IV")) ^PSDRUG(IFN,"IV")
Q
P8 S SCH="" F S SCH=$O(^TMP($J,"PSSEXP",SCH)) Q:SCH="" S OEXP=$O(^TMP($J,"PSSEXP",SCH,0)) I $D(^PS(51.1,"AC","PSJ",SCH)) S IEN=$O(^PS(51.1,"AC","PSJ",SCH,0)) S:$P(^PS(51.1,IEN,0),"^",8)="" $P(^PS(51.1,IEN,0),"^",8)=OEXP
Q
BTEMP F GG=0:1 S HH=$P($T(DATA+GG),";",3,20) Q:HH="" S RCD=$P(HH,"^",1),EXP=$P(HH,"^",2) D BTEMP1
K GG,HH,RCD,EXP Q
BTEMP1 S ^TMP($J,"PSSEXP",RCD,EXP)=""
Q
MR N ROOT,I,J,X,LINE
S ROOT=$NA(@XPDGREF@("DATA"))
F J=1:1 Q:'$D(@ROOT@(J)) S LINE=^(J) D MR1
Q
MR1 I $D(^PS(51.2,"B",$P(LINE,"^",1))) S DA=$O(^PS(51.2,"B",$P(LINE,"^",1),0)) S $P(^PS(51.2,DA,0),"^",2)=$P(LINE,"^",2)
Q
DATA ;;QD^EVERY DAY
;;BID^TWICE A DAY
;;Q4H^EVERY 4 HOURS
;;Q3H^EVERY 3 HOURS
;;Q8H^EVERY 8 HOURS
;;QAM^EVERY MORNING
;;Q6H^EVERY 6 HOURS
;;TID^THREE TIMES A DAY
;;QID^FOUR TIMES A DAY
;;Q12H^EVERY 12 HOURS
;;QOD^EVERY OTHER DAY
;;QHS^AT BEDTIME
;;Q24H^EVERY 24 HOURS
;;Q2H^EVERY 2 HOURS
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSSCHPST 1414 printed Oct 16, 2024@18:31:10 Page 2
PSSCHPST ;BIR/WRT-CMOP-Host post-install routine ; 09/30/97 14:56
+1 ;;1.0;PHARMACY DATA MANAGEMENT;;9/30/97
+2 ; POST-INSTALL ROUTINE-CMOP HOST
VERSION if '$DATA(^PS(59.7,1,80))
SET ^PS(59.7,1,80)="1.0^0"
+1 DO ^PSSDENT
DO MR
DO CLEAN
SET $PIECE(^PS(59.7,1,80),"^",1)="1.0"
DO BTEMP
DO P8
KILL ^TMP($JOB,"PSSEXP"),SCH,IEN,OEXP
+2 QUIT
CLEAN FOR IFN=0:0
SET IFN=$ORDER(^PSDRUG(IFN))
if 'IFN
QUIT
if $DATA(^PSDRUG(IFN,"CH"))
KILL ^PSDRUG(IFN,"CH")
if $DATA(^PSDRUG(IFN,"PS"))
KILL ^PSDRUG(IFN,"PS")
if $DATA(^PSDRUG(IFN,"IV"))
KILL ^PSDRUG(IFN,"IV")
+1 QUIT
P8 SET SCH=""
FOR
SET SCH=$ORDER(^TMP($JOB,"PSSEXP",SCH))
if SCH=""
QUIT
SET OEXP=$ORDER(^TMP($JOB,"PSSEXP",SCH,0))
IF $DATA(^PS(51.1,"AC","PSJ",SCH))
SET IEN=$ORDER(^PS(51.1,"AC","PSJ",SCH,0))
if $PIECE(^PS(51.1,IEN,0),"^",8)=""
SET $PIECE(^PS(51.1,IEN,0),"^",8)=OEXP
+1 QUIT
BTEMP FOR GG=0:1
SET HH=$PIECE($TEXT(DATA+GG),";",3,20)
if HH=""
QUIT
SET RCD=$PIECE(HH,"^",1)
SET EXP=$PIECE(HH,"^",2)
DO BTEMP1
+1 KILL GG,HH,RCD,EXP
QUIT
BTEMP1 SET ^TMP($JOB,"PSSEXP",RCD,EXP)=""
+1 QUIT
MR NEW ROOT,I,J,X,LINE
+1 SET ROOT=$NAME(@XPDGREF@("DATA"))
+2 FOR J=1:1
if '$DATA(@ROOT@(J))
QUIT
SET LINE=^(J)
DO MR1
+3 QUIT
MR1 IF $DATA(^PS(51.2,"B",$PIECE(LINE,"^",1)))
SET DA=$ORDER(^PS(51.2,"B",$PIECE(LINE,"^",1),0))
SET $PIECE(^PS(51.2,DA,0),"^",2)=$PIECE(LINE,"^",2)
+1 QUIT
DATA ;;QD^EVERY DAY
+1 ;;BID^TWICE A DAY
+2 ;;Q4H^EVERY 4 HOURS
+3 ;;Q3H^EVERY 3 HOURS
+4 ;;Q8H^EVERY 8 HOURS
+5 ;;QAM^EVERY MORNING
+6 ;;Q6H^EVERY 6 HOURS
+7 ;;TID^THREE TIMES A DAY
+8 ;;QID^FOUR TIMES A DAY
+9 ;;Q12H^EVERY 12 HOURS
+10 ;;QOD^EVERY OTHER DAY
+11 ;;QHS^AT BEDTIME
+12 ;;Q24H^EVERY 24 HOURS
+13 ;;Q2H^EVERY 2 HOURS