source: FOIAVistA/trunk/r/CONTROLLED_SUBSTANCES-PSD/PSDCOSM.m@ 1318

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1PSDCOSM ;BIR/LTL-Send MM about 0$ in DRUG file (#50), PSDCOST (cont'd) ; 9 Nov 93
2 ;;3.0; CONTROLLED SUBSTANCES ;**17,63**;13 Feb 97;Build 1
3 K PSD,PSDM,PSDM1,PSDN D KILL^XM
4 S XMSUB="DRUG file cost missing",XMDUZ=PSDCHO(1)_" messenger" D XMZ^XMA2
5 I XMZ<1 D KILL^XM Q
6 S XMY(DUZ)=""
7 S PSD(1)=$S($P($G(^VA(200,DUZ,.1)),U,4)]"":$P($G(^(.1)),U,4),1:$P($P($G(^VA(200,DUZ,0)),U),",",2))_", when you ran the "_PSDCHO(1)_" on "_PSDT(1)_","
8 ;
9 ;DAVE B (PSD*3*17 29APR99) - more detailed report
10 S PSD(2)="either the PRICE PER DISPENSE UNIT from the DRUG file (#50), or the quantity"
11 S PSD(3)="recorded for the transaction, had a value of zero for the drug(s) listed below:"
12 S PSD(4)=" "
13 S $P(PSD(5)," ",65)="Price"
14 S $P(PSD(6)," ",65)="Per"
15 S $P(PSD(7)," ",52)="Transaction Disp."
16 S PSD(8)="Drug Name Date/Time Number Unit Qnty"
17 S $P(PSD(9),"-",79)=""
18 S PSDM=0,PSDN=10
19 ;
20 F S PSDM=$O(^TMP("PSDM",$J,PSDM)) Q:PSDM="" D
21 .S DATE=""
22 .F S DATE=$O(^TMP("PSDM",$J,PSDM,DATE)) Q:DATE="" D
23 ..S DATA=^TMP("PSDM",$J,PSDM,DATE)
24 ..Q:DATA=""
25 ..S PSDM1=$P($G(^PSDRUG(PSDM,0)),"^"),DATE=$$FMTE^XLFDT(DATE)
26 ..S XX=$E(PSDM1,1,25),XXX=XX F X=$L(XX):1:29 S XXX=XXX_" "
27 ..S XXX=XXX_DATE_$J($P(DATA,"^",1),9)_$J($P(DATA,"^",2),8,2)_$J($P(DATA,"^",3)+0,8)
28 ..S PSD(PSDN)=XXX,PSDN=PSDN+1,PSD(PSDN)=" ",PSDN=PSDN+1
29 D DONE
30 Q
31 ;
32DONE ;
33 S XMTEXT="PSD(" D ^XMD,KILL^XM Q
Note: See TracBrowser for help on using the repository browser.