PSGSET ;BIR/CML3-INPATIENT SIGN-ON ;25 SEP 95 / 1:39 PM
;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
K %DT,%ZIS,IO("Q") D HOME^%ZIS K IOP S X=$P($G(^PS(59.7,1,20)),"^",2) W !!,"(Inpatient Medications - Version "_$P($T(PSGSET+1),";",3) W " ",$E(X,4,5),"/",$E(X,6,7),"/",$E(X,2,3),")"
D ENCV^PSGSETU
I $S($D(DUZ)[0:1,DUZ'=+DUZ:1,1:'$D(^VA(200,DUZ,0))) W $C(7),$C(7),!!," BUT I DON'T KNOW WHO YOU ARE!! (DUZ TROUBLE)" S XQUIT=1 D ENKV^PSGSETU Q
I $D(^VA(200,DUZ,.1)),$P(^(.1),"^",4)]"" S N=$P(^(.1),"^",4)
E S N=$P(^VA(200,DUZ,0),"^")
S X=$R(6)+1 W !!,$P("HI^HELLO^GREETINGS^WELCOME^HOWDY^GOOD ^","^",X),$S(X'=6:"",PSGDT#1<.12:"MORNING",PSGDT#1<.18:"AFTERNOON",1:"EVENING"),", ",N,"! ("
S X=$P(PSJSYSU,";",3) W $S(X=3:"PHARMACIST",X=2:"PHARMACY TECHNICIAN",X=1:"NURSE",$P(PSJSYSU,";",2):"PROVIDER",1:"WARD STAFF") W:X&$P(PSJSYSU,";",2) " & PROVIDER" W ")"
;
DONE ;
D ENKV^PSGSETU Q
;
BRJCHK ;
S X1=DT,X2=-2 D C^%DTC W:'$O(^PS(53.42,X)) $C(7),$C(7),$C(7),$C(7),$C(7),!!?16,"*** WARNING! THE UNIT DOSE BACKGROUND JOB ***",!?16,"*** (PSJU BRJ) DOES NOT SEEM TO BE RUNNING! ***",! Q
;
ENDLP ;
S PSGION=$S($D(ION):ION,1:"HOME") K %ZIS S %ZIS="QN",IOP=X D ^%ZIS I POP S IOP=PSGION D ^%ZIS K %ZIS,IOP,PSGION K X Q
W $S(X=$E(ION,1,$L(X)):$E(ION,$L(X)+1,$L(ION)),1:" "_ION) S X=ION D ^%ZISC K %ZIS,PSGION,IOP Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSGSET 1335 printed Dec 13, 2024@02:03:10 Page 2
PSGSET ;BIR/CML3-INPATIENT SIGN-ON ;25 SEP 95 / 1:39 PM
+1 ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
+2 KILL %DT,%ZIS,IO("Q")
DO HOME^%ZIS
KILL IOP
SET X=$PIECE($GET(^PS(59.7,1,20)),"^",2)
WRITE !!,"(Inpatient Medications - Version "_$PIECE($TEXT(PSGSET+1),";",3)
WRITE " ",$EXTRACT(X,4,5),"/",$EXTRACT(X,6,7),"/",$EXTRACT(X,2,3),")"
+3 DO ENCV^PSGSETU
+4 IF $SELECT($DATA(DUZ)[0:1,DUZ'=+DUZ:1,1:'$DATA(^VA(200,DUZ,0)))
WRITE $CHAR(7),$CHAR(7),!!," BUT I DON'T KNOW WHO YOU ARE!! (DUZ TROUBLE)"
SET XQUIT=1
DO ENKV^PSGSETU
QUIT
+5 IF $DATA(^VA(200,DUZ,.1))
IF $PIECE(^(.1),"^",4)]""
SET N=$PIECE(^(.1),"^",4)
+6 IF '$TEST
SET N=$PIECE(^VA(200,DUZ,0),"^")
+7 SET X=$RANDOM(6)+1
WRITE !!,$PIECE("HI^HELLO^GREETINGS^WELCOME^HOWDY^GOOD ^","^",X),$SELECT(X'=6:"",PSGDT#1<.12:"MORNING",PSGDT#1<.18:"AFTERNOON",1:"EVENING"),", ",N,"! ("
+8 SET X=$PIECE(PSJSYSU,";",3)
WRITE $SELECT(X=3:"PHARMACIST",X=2:"PHARMACY TECHNICIAN",X=1:"NURSE",$PIECE(PSJSYSU,";",2):"PROVIDER",1:"WARD STAFF")
if X&$PIECE(PSJSYSU,";",2)
WRITE " & PROVIDER"
WRITE ")"
+9 ;
DONE ;
+1 DO ENKV^PSGSETU
QUIT
+2 ;
BRJCHK ;
+1 SET X1=DT
SET X2=-2
DO C^%DTC
if '$ORDER(^PS(53.42,X))
WRITE $CHAR(7),$CHAR(7),$CHAR(7),$CHAR(7),$CHAR(7),!!?16,"*** WARNING! THE UNIT DOSE BACKGROUND JOB ***",!?16,"*** (PSJU BRJ) DOES NOT SEEM TO BE RUNNING! ***",!
QUIT
+2 ;
ENDLP ;
+1 SET PSGION=$SELECT($DATA(ION):ION,1:"HOME")
KILL %ZIS
SET %ZIS="QN"
SET IOP=X
DO ^%ZIS
IF POP
SET IOP=PSGION
DO ^%ZIS
KILL %ZIS,IOP,PSGION
KILL X
QUIT
+2 WRITE $SELECT(X=$EXTRACT(ION,1,$LENGTH(X)):$EXTRACT(ION,$LENGTH(X)+1,$LENGTH(ION)),1:" "_ION)
SET X=ION
DO ^%ZISC
KILL %ZIS,PSGION,IOP
QUIT