VistA-FOIAVistA/r/PHARMACY_DATA_MANAGEMENT-PSS/PSSPOST.m

48 lines
2.0 KiB
Mathematica

PSSPOST ;BIR/WRT-Post-install routine ; 04/07/98 10:19
;;1.0;PHARMACY DATA MANAGEMENT;**10**;9/30/97
; POST-INSTALL ROUTINE
VERSION S:'$D(^PS(59.7,1,80)) ^PS(59.7,1,80)="1.0^0"
D ^PSSDENT,MR,LABM,CLEAN S $P(^PS(59.7,1,80),"^",1)="1.0" D BTEMP,P8 K ^TMP($J,"PSSEXP"),SCH,IEN,OEXP
S:'$D(^PS(59.7,1,31)) ^PS(59.7,1,31)="^IV" I $D(^PS(59.7,1,31)),$P(^PS(59.7,1,31),"^",2)="" S $P(^PS(59.7,1,31),"^",2)="IV"
S X="PSSJXR",Y="55",DMAX="5000" D EN^DIKZ
S X="PSSVX6",Y="52.6",DMAX="5000" D EN^DIKZ
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
CLA K ^PSDRUG("VAC") S DIK="^PSDRUG(",DIK(1)="25" D ENALL^DIK
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
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
LABM K IEN F IEN=0:0 S IEN=$O(^PSDRUG(IEN)) Q:'IEN D LABM1,LABM2,LABM3
Q
LABM1 I $P($G(^PSDRUG(IEN,"CLOZ1")),"^")="LAB MONITOR" S ^PSDRUG(IEN,"CLOZ1")="^1"
Q
LABM2 I $D(^PSDRUG(IEN,"CLOZ1")),$P(^PSDRUG(IEN,"CLOZ1"),"^")="",$D(^PSDRUG(IEN,"CLOZ")) S $P(^PSDRUG(IEN,"CLOZ1"),"^",2)=1
Q
LABM3 I '$D(^PSDRUG(IEN,"CLOZ1")),$D(^PSDRUG(IEN,"CLOZ")) S $P(^PSDRUG(IEN,"CLOZ1"),"^",2)=1
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