source: FOIAVistA/trunk/r/CONTROLLED_SUBSTANCES-PSD/PSDRFU.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1PSDRFU ;BIR/JPW,LTL-Nurse RF Delayed Dispensing Liquid ;8 Aug 94
2 ;;3.0; CONTROLLED SUBSTANCES ;**50**;13 Feb 97
3QTY S DIR(0)="NA^.01:"_OQTY_":2",DIR("A")="Amount given: "
4 W ! D ^DIR K DIR G:Y'>0 END S (PSDQ,OQTY)=Y
5WASTE I PSDQ#1 D G:$G(PSDOUT) END
6 .S DIR(0)="Y",DIR("A")="Will you be wasting any of this dose"
7 .W ! D ^DIR K DIR S:$D(DIRUT) PSDOUT=1 Q:Y'=1
8 .W ?44,"Amount to be wasted: ",1-PSDQ#1,! S WQTY=1-PSDQ#1
9WIT .S NUR2=$$WITNESS^XUVERIFY("WITNESS")
10 .I NUR2=DUZ W !!,"Wait a minute, you can't witness yourself!",$C(7) G WIT
11 .I NUR2'>0 S PSDOUT=1 Q
12 .W !!,"Thank you, ",$S($P($G(^VA(200,NUR2,.1)),U,4)]"":$P($G(^(.1)),U,4),1:$P($G(^VA(200,NUR2,0)),U))
13 .S PSDQ=PSDQ+WQTY ;S DUZ=PSDUZ
14 S %DT="AEPRX",%DT(0)="-NOW",%DT("A")="Date/time given: "
15 W ! D ^%DT K %DT G:Y<1 END S PSDT=Y
16 S DIC="^VA(200,",DIC(0)="AEMQ",DIC("A")="Nurse that signed out dose: "
17 ; PSD*3*50 RJS - MODIFY TO CHECK SIGN OUT NURSE AGAINST WITNESS
18ADMN W ! D ^DIC K DIC G:Y<1 END S NUR1=+Y,NUR1(1)=DUZ
19 I $D(NUR2),NUR1=NUR2 W !,"Witness and Sign Out Nurse can not be the same person" G:NUR1=NUR2 ADMN
20 W !!,"Remaining Balance: ",$P(PSDR(1),U,4)-PSDQ," ",$P(PSDR(1),U,8)
21 D UPDAT^PSDRFT G DRUG^PSDRFS
22END W:$G(PSDOUT) !!,"No dose signed out.",$C(7),!! K %,%DT,%H,%I,CNT,CNT1,DA,DIC,DIE,DINUM,DIR,DIROUT,DIRUT,DIWF,DIWL,DIWR,DR,DTOUT,DUOUT,LN,MSG,MSG1
23 K NAOU,NAOUN,NBKU,NPKG,OK,OKTYP,ORD,PSDA,PSDEM,PSDOUT,PSDQTY,PSDRD,PSDR,PSDRN,PSDS,PSDT,PSDUZ,PSDUZN,REQD,TEXT,TYPE,WORD,X,Y
24 Q
25MSG ;display error message
26 W $C(7),!!,?10,"Contact your Pharmacy Coordinator.",!,?10,"This "_$S(MSG=2:"Dispensing Site",MSG=1:"NAOU",1:"Drug")_" is missing "
27 W $S(MSG1=1:"Primary Disp. Site",MSG1=2:"stocked drugs",MSG1=3:"narcotic breakdown unit",MSG1=4:"narcotic package size",1:"data")_".",!
28 Q
Note: See TracBrowser for help on using the repository browser.