source: FOIAVistA/trunk/r/PHARMACY_BENEFITS_MANAGEMENT-PSU/PSUV4.m@ 1128

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

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1PSUV4 ;BIR/CFL - Drug Summary & Record Summary Print Setup ;25 SEP 1998
2 ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
3RECSUM ;EP Generate statistical summary
4 I PSUNOREC Q
5 K PSULINE,J
6 S Y=PSUSDT X ^DD("DD") S PSUDTS=Y
7 S Y=PSUEDT X ^DD("DD") S PSUDTE=Y
8 F I=1:1:17 S J(I)=$P(^XTMP(PSUIVSUB,"SUMMARY",PSUDIV,0),"^",I)
9 S PSULINE(1)="IV Statistical Data Summary for "_PSUDTS_" through "_PSUDTE
10 S PSULINE(2)=" "
11 S X="Total IV orders:",X=$$SETSTR^VALM1(J(1),X,19,$L(J(1))),X=$$SETSTR^VALM1("Total Patients:",X,39,15)
12 S X=$$SETSTR^VALM1(J(2),X,57,$L(J(2)))
13 S PSULINE(3)=X
14 S X="Total IV bags dispensed:",X=$$SETSTR^VALM1(J(3),X,26,$L(J(3)))
15 S X=$$SETSTR^VALM1("Total Cost: $",X,39,13),X=$$SETSTR^VALM1(J(4),X,52,$L(J(4)))
16 S PSULINE(4)=X
17 S PSULINE(5)=" "
18 S PSULINE(6)="Breakdown of IV orders:"
19 S PSULINE(7)=" "
20 S X="Total Outpatient IV orders:",X=$$SETSTR^VALM1(J(5),X,29,$L(J(5)))
21 S X=$$SETSTR^VALM1("Total Outpatient IV bags dispensed:",X,39,35),X=$$SETSTR^VALM1(J(6),X,75,$L(J(6)))
22 S PSULINE(8)=X
23 S X="Total Outpatient Cost: $",X=$$SETSTR^VALM1(J(7),X,25,$L(J(7)))
24 S PSULINE(9)=X
25 S PSULINE(10)=" "
26 S X="Total Piggybacks:",X=$$SETSTR^VALM1(J(8),X,20,$L(J(8)))
27 S X=$$SETSTR^VALM1("Avg. cost per Piggyback: $",X,39,26),X=$$SETSTR^VALM1(J(9),X,65,$L(J(9)))
28 S PSULINE(11)=X
29 S X="Total Hyperals:",X=$$SETSTR^VALM1(J(10),X,17,$L(J(10)))
30 S X=$$SETSTR^VALM1("Avg. cost per Hyperal: $",X,39,24),X=$$SETSTR^VALM1(J(11),X,63,$L(J(11)))
31 S PSULINE(12)=X
32 S X="Total Admixtures:",X=$$SETSTR^VALM1(J(12),X,19,$L(J(12)))
33 S X=$$SETSTR^VALM1("Avg. cost per Admixture: $",X,39,26),X=$$SETSTR^VALM1(J(13),X,65,$L(J(13)))
34 S PSULINE(13)=X
35 S X="Total Chemotherapy:",X=$$SETSTR^VALM1(J(14),X,21,$L(J(14)))
36 S X=$$SETSTR^VALM1("Avg. cost per Chemotherapy: $",X,39,29),X=$$SETSTR^VALM1(J(15),X,68,$L(J(15)))
37 S PSULINE(14)=X
38 S X="Total Syringes:",X=$$SETSTR^VALM1(J(16),X,17,$L(J(16)))
39 S X=$$SETSTR^VALM1("Avg. cost per Syringe: $",X,39,24)
40 S X=$$SETSTR^VALM1(J(17),X,63,$L(J(17)))
41 S PSULINE(15)=X
42 S XMCHAN=1
43 S XMSUB="V. 4.0 PBMIV "_$G(PSUMON)_" "_PSUDIV_" "_PSUDIVNM
44 S XMTEXT="PSULINE("
45 M XMY=PSUXMYS1
46 D ^XMD
47 M ^XTMP(PSUIVSUB,"STATSUM",PSUDIV)=PSULINE
48 Q
49DRUGSUM ; EP generate drug summary
50 S Y=PSUSDT X ^DD("DD") S PSUDTS=Y
51 S Y=PSUEDT X ^DD("DD") S PSUDTE=Y
52 S $P(DASH,"-",79)=""
53 S PSUDRG=""
54 K PSULINE
55 S PSULINE(1)="IV Statistical Data for "_PSUDTS_" through "_PSUDTE
56 S PSULINE(2)=" "
57 S X="",X=$$SETSTR^VALM1("Drug",X,42,4),X=$$SETSTR^VALM1("Total",X,54,5),X=$$SETSTR^VALM1("Number",X,67,6)
58 S PSULINE(3)=X
59 S X="Drug Name",X=$$SETSTR^VALM1("Strength",X,42,8),X=$$SETSTR^VALM1("Dispensed",X,54,9)
60 S X=$$SETSTR^VALM1("of bags",X,67,7)
61 S PSULINE(4)=X
62 S PSULINE(5)=DASH
63 S PSNAME="",PSLN=6,PSUGTD=0,PSUGTB=0
64 F S PSNAME=$O(^XTMP(PSUIVSUB,"DRUG",PSUDIV,PSNAME)) Q:PSNAME="" D
65 .S DATA=^XTMP(PSUIVSUB,"DRUG",PSUDIV,PSNAME)
66 .S PSUNIT=$P(DATA,U),PSDISP=$P(DATA,U,2),PSBAGS=$P(DATA,U,3)
67 .S PSUNON=$P(DATA,U,4),PSUNFI=$P(DATA,U,5)
68 .S PSNAME=PSNAME_" "_$S(PSUNON="N/F":"*",1:"")_$S(PSUNFI=0:"#",1:"")
69 .S LINE=""
70 .S $E(LINE,1,41)=PSNAME
71 .S $E(LINE,42,50)=PSUNIT
72 .S $E(LINE,51,66)=$J(PSDISP,12,2)
73 .S $E(LINE,67,80)=$J(PSBAGS,5,0)
74 .S PSULINE(PSLN)=LINE
75 .S PSLN=PSLN+1,PSUGTD=PSUGTD+PSDISP,PSUGTB=PSUGTB+PSBAGS
76 S PSULINE(PSLN)=DASH
77 S PSLN=PSLN+1
78 S LINE=""
79 S $E(LINE,1,41)="Totals:"
80 S $E(LINE,51,66)=$J(PSUGTD,12,2)
81 S $E(LINE,67,80)=$J(PSUGTB,5,0)
82 S PSULINE(PSLN)=LINE
83 S PSLN=PSLN+1
84 S PSULINE(PSLN)=""
85 S PSLN=PSLN+1
86 S PSULINE(PSLN)="* Non Formulary"
87 S PSLN=PSLN+1
88 S PSULINE(PSLN)="# Not on National Formulary"
89 S XMCHAN=1
90 S XMSUB="V. 4.0 PBMIV "_$G(PSUMON)_" "_PSUDIV_" "_PSUDIVNM
91 M XMY=PSUXMYS2
92 S XMTEXT="PSULINE("
93 D ^XMD
94 M ^XTMP(PSUIVSUB,"DRUGSUM",PSUDIV)=PSULINE
95 Q
Note: See TracBrowser for help on using the repository browser.