source: FOIAVistA/trunk/r/CONTROLLED_SUBSTANCES-PSD/PSDRFV.m@ 1328

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

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1PSDRFV ;BIR/JPW,LTL-Nurse RF Dispensing review; 8 Aug 94
2 ;;3.0; CONTROLLED SUBSTANCES ;**5,12,25,27**;13 Feb 97
3 ;Reference to ^PSD(58.8 are covered by DBIA #2711
4 ;Reference to ^PSD(58.81 are covered by DBIA #2808
5 ;Reference to ^PSDRUG( are covered by DBIA #221
6 ; Reference to VA(200 DBIA # 10060
7 ;
8 ;PAT=PATIENT,PSDR=DRUG
9LOOP N PSD,PSDL S (PSDL,PSDA,PSDT)=0
10 W !!,"Doses signed out in the last ",$S($G(NAOU(1)):NAOU(1),1:"eight")," hours:"
11 S PSDT=$$FMADD^XLFDT($$NOW^XLFDT,0,-$S($G(NAOU(1)):NAOU(1),1:8))
12CHEC ;PSD*3*27 (DAVE B - Do not need to look at every ward - PSDL)
13 S PSDL=$G(NAOU)
14 F S PSDT=$O(^PSD(58.81,"ACT",PSDT)) Q:'PSDT F S PSDA=$O(^PSD(58.81,"ACT",PSDT,PSDL,PSDR,17,PSDA)) Q:'PSDA D:$P($G(^PSD(58.81,PSDA,9)),U)=$G(PAT)
15 .S PSDA(2)=$$FMTE^XLFDT(PSDT,"2P"),PSDA(3)=PSDT
16 .W !!,PSDA(2),?22,$P($G(^PSD(58.81,PSDA,0)),U,6)," ",$S($P($G(^(0)),U,8)]"":$P($G(^(0)),U,8),1:$P($G(^PSDRUG(PSDR,660)),U,8))
17 .W:$P($G(^PSD(58.81,PSDA,9)),U,4) " (",$P($G(^(9)),U,4)," WASTED)"
18 .W:$P($G(^PSD(58.81,PSDA,3)),U,2) " (",$P($G(^(3)),U,2)," RETURNED)"
19 .W " ",$P($G(^VA(200,+$P($G(^PSD(58.81,PSDA,0)),U,7),0)),U)
20 .W:$P($G(^PSD(58.81,PSDA,0)),U,16)]"" !?25,$P($G(^(0)),U,16) S PSDA(4)=$P($G(^(0)),U,7)
21 .S PSDA(1)=PSDA
22END Q
Note: See TracBrowser for help on using the repository browser.