source: FOIAVistA/trunk/r/PHARMACY_BENEFITS_MANAGEMENT-PSU/PSUV5.m@ 1569

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

initial load of FOIAVistA 6/30/08 version

File size: 2.9 KB
Line 
1PSUV5 ;BIR/PDW - Pharmacy Benefits Mgt IV Printer Output ;10 JUL 1999
2 ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
3 ;DBIA(s)
4 ; Reference to file #40.8 supported by DBIA 2438
5 ;
6EN ;EP entry for IV statistical output
7 NEW PSUI,PSUH,PSUL,PSUM,PSUPGS,ENDIT
8 D DT^DILF("E",PSUSDT,.EXTD)
9 S PSURP("START")=EXTD(0)
10 D DT^DILF("E",PSUEDT,.EXTD)
11 S PSURP("END")=EXTD(0)
12 ;I '$D(^XTMP(PSUIVSUB,"STATSUM")) D NOSUM
13 S PSUFACN=""
14 F S PSUFACN=$O(^XTMP(PSUIVSUB,"STATSUM",PSUFACN)) Q:PSUFACN="" D
15 .;D PRTSUM ;Eliminate this report with Phase II 7-19-04
16 .I PSUSMRY Q ;Quit if user requests the summary report only
17 .D PRTDRUG
18 ;
19 I '$D(^XTMP("PSU_"_PSUJOB,"CBAMIS")) D PRTAMIS ;Print IV AMIS summary
20 ;
21 D PULL^PSUCP
22 F I=1:1:$L(PSUOPTS,",") S PSUMOD($P(PSUOPTS,",",I))=""
23 ;
24 I $D(PSUMOD(1))&'$D(PSUMOD(2)) D
25 .I '$D(PSUMOD(4)) D
26 ..D IVSUM^PSUDEM0
27 ;
28 Q
29PRTSUM ;Print the statistical summary report
30 U IO
31 ;VMP-IOFO BAY PINES;ELR;PSU*3.0*26 REMOVED FORM FEED
32 ;W @IOF
33 D GETNAME
34 S X=^XTMP(PSUIVSUB,"STATSUM",PSUFACN,1)
35 W !,X_" for "_PSUDIVNM
36 W !!,?68,"Page: 1" ;Statistical summary will always be 1 page only
37 S PSUL=1
38 F S PSUL=$O(^XTMP(PSUIVSUB,"STATSUM",PSUFACN,PSUL)) Q:PSUL="" D
39 .W !,^XTMP(PSUIVSUB,"STATSUM",PSUFACN,PSUL)
40 ;
41 Q
42 ;
43PRTAMIS ;Print the IV AMIS Summary report
44 ;
45 S PSUPGS("PG")=1
46 D PGHDR1
47 S PSUL=3
48 F S PSUL=$O(^XTMP("PSU_"_PSUJOB,"IVAMIS",PSUL)) Q:PSUL="" D
49 .I LNCNT+4>IOSL D PGHDR1
50 .W !,^XTMP("PSU_"_PSUJOB,"IVAMIS",PSUL)
51 .S LNCNT=LNCNT+1
52 ;
53 Q
54 ;
55PRTDRUG ;Print the Statistical Drug Report
56 I '$D(^XTMP(PSUIVSUB,"DRUGSUM")) D NODRUG
57 S PSUPGS("PG")=1
58 D PGHDR
59 S PSUL=5
60 F S PSUL=$O(^XTMP(PSUIVSUB,"DRUGSUM",PSUFACN,PSUL)) Q:PSUL="" D
61 .I LNCNT+4>IOSL D PGHDR
62 .W !,^XTMP(PSUIVSUB,"DRUGSUM",PSUFACN,PSUL)
63 .S LNCNT=LNCNT+1
64 ;
65 Q
66PGHDR ;
67 U IO W @IOF
68 W !,^XTMP(PSUIVSUB,"DRUGSUM",PSUFACN,1)
69 W " for ",PSUDIVNM
70 W !!,?68,"Page: ",PSUPGS("PG")
71 S PSUPGS("PG")=PSUPGS("PG")+1
72 F PSUH=2:1:5 W !,$G(^XTMP(PSUIVSUB,"DRUGSUM",PSUFACN,PSUH))
73 S LNCNT=5
74 Q
75PGHDR1 ;Print headings for statistical report
76 U IO
77 W @IOF
78 W !,^XTMP("PSU_"_PSUJOB,"IVAMIS",1)
79 W !!,?68,"Page: ",PSUPGS("PG")
80 S PSUPGS("PG")=PSUPGS("PG")+1
81 W !,$G(^XTMP("PSU_"_PSUJOB,"IVAMIS",2))
82 S LNCNT=3
83 Q
84NOSUM ;Set up no data to report global if there is no statistical data
85 S ^XTMP(PSUIVSUB,"STATSUM",PSUSNDR,1)="IV Statistical Data Summary for "_PSURP("START")_" through "_PSURP("END")
86 S ^XTMP(PSUIVSUB,"STATSUM",PSUSNDR,2)=""
87 S ^XTMP(PSUIVSUB,"STATSUM",PSUSNDR,3)="No data to report"
88 S PSUFACN=PSUSNDR
89 Q
90NODRUG ;Set up the no data to report temp global if there is no drug data
91 S ^XTMP(PSUIVSUB,"DRUGSUM",PSUSNDR,1)="IV Statistical Data for "_PSURP("START")_" through "_PSURP("END")
92 S ^XTMP(PSUIVSUB,"DRUGSUM",PSUSNDR,2)=""
93 S ^XTMP(PSUIVSUB,"DRUGSUM",PSUSNDR,3)="No data to report"
94 S PSUFACN=PSUSNDR
95GETNAME ;Get the facility name
96 S X=PSUFACN,DIC=40.8,DIC(0)="X",D="C" D IX^DIC ;**1
97 S X=+Y S PSUDIVNM=$$VAL^PSUTL(40.8,X,.01)
98 Q
Note: See TracBrowser for help on using the repository browser.