PSDORM ;BIR/LTL-Send MM about one-time request, PSDORNO (cont'd) ; 20 Jan 95
;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
N PSD D KILL^XM
S XMSUB="One Time Request",XMDUZ="NAOU Monitor" D XMZ^XMA2
I XMZ<1 D KILL^XM Q
S XMY(DUZ)="",PSD=0
F S PSD=$O(^XUSEC("PSDMGR",PSD)) Q:'PSD S XMY(PSD)=""
S PSD(1)=$P($P($G(^VA(200,DUZ,0)),U),",",2)_" "_$P($P($G(^(0)),U),",")
S PSD(1)=PSD(1)_" has placed a one time request.",(PSD(2),PSD(4))=""
S PSD(3)="The drug ordered was "_$G(PSDRN)_"."
S PSD(5)="This drug is INACTIVE on "_NAOUN_"."
S XMTEXT="PSD(" D ^XMD,KILL^XM Q
PSDORM ;BIR/LTL-Send MM about one-time request, PSDORNO (cont'd) ; 20 Jan 95
+1 ;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
+2 NEW PSD
DO KILL^XM
+3 SET XMSUB="One Time Request"
SET XMDUZ="NAOU Monitor"
DO XMZ^XMA2
+4 IF XMZ<1
DO KILL^XM
QUIT
+5 SET XMY(DUZ)=""
SET PSD=0
+6 FOR
SET PSD=$ORDER(^XUSEC("PSDMGR",PSD))
IF 'PSD
QUIT
SET XMY(PSD)=""
+7 SET PSD(1)=$PIECE($PIECE($GET(^VA(200,DUZ,0)),U),",",2)_" "_$PIECE($PIECE($GET(^(0)),U),",")
+8 SET PSD(1)=PSD(1)_" has placed a one time request."
SET (PSD(2),PSD(4))=""
+9 SET PSD(3)="The drug ordered was "_$GET(PSDRN)_"."
+10 SET PSD(5)="This drug is INACTIVE on "_NAOUN_"."
+11 SET XMTEXT="PSD("
DO ^XMD
DO KILL^XM
QUIT