source: WorldVistAEHR/trunk/r/CONTROLLED_SUBSTANCES-PSD/PSDORSU.m@ 701

Last change on this file since 701 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 870 bytes
Line 
1PSDORSU ;BIR/JPW,LTL-Nurse Order Stats Report ; 8 Aug 94
2 ;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
3 W !!,"You are about to adjust the balance upward.",!!
4 W "Before you do, let's check to see if there are any orders that need receiving."
5 N AOU,STAT,ORD S STAT=3
6 S:'$G(NAOU) NAOU=PSDLOC
7 S AOU=NAOU,ORD=0
8 S:$G(PSDRUG) PSDR=PSDRUG
9ORD ;order loop
10 S:'$D(^XUSEC("PSJ RNURSE",DUZ))&('$D(^XUSEC("PSD NURSE",DUZ))) STAT(1)=1
11 F S ORD=$O(^PSD(58.8,"AC",STAT,NAOU,PSDR,ORD)) Q:'ORD D Q:$D(DIRUT)!($G(PSDOUT))
12 .S ORD(1)=$G(^PSD(58.8,NAOU,1,PSDR,3,ORD,0)),PSDA=$P(ORD(1),U,17)
13 .W !!,"Pharmacy Dispensing #: ",$P(ORD(1),U,16)
14 .W " Date/time ordered: ",$$FMTE^XLFDT($P(ORD(1),U,2),"2P")
15 .W " Quantity: ",$P(ORD(1),U,6)
16 .Q:$G(STAT(1))
17 .S DIR(0)="Y",DIR("A")="Receive now" W ! D ^DIR K DIR
18 .S:$D(DIRUT) PSDOUT=1 Q:Y'=1
19 .S Y(0)=$G(^PSD(58.81,+PSDA,0)) D ORD^PSDNRGO
20 Q
Note: See TracBrowser for help on using the repository browser.