Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PSSCHPST

PSSCHPST.m

Go to the documentation of this file.
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