source: FOIAVistA/tag/r/PHARMACY_BENEFITS_MANAGEMENT-PSU/PSUPR6.m@ 628

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1PSUPR6 ;BIR/PDW - PBM Procurement Printer Controller ;25 AUG 1998
2 ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
3EN ;EP for printing reports
4 N PSUQUIT
5 S PSUPG=0
6 S PSUPRJOB=PSUJOB
7 S PSUPRSUB="PSUPR_"_PSUPRJOB
8DIVISION ;EP loop by divisions
9 S PSUDIV="" F S PSUDIV=$O(^XTMP(PSUPRSUB,"REPORT1",PSUDIV)) Q:PSUDIV="" D REPORT
10 Q
11 ;
12REPORT ;EP Perform Prints Category & Drug for Division
13 ;
14CATRPT ;
15 ; Printing Device should be opened by PSUDBQUE by now & IO set
16 I $Y>5 U IO W @IOF
17 S L="" F S L=$O(^XTMP(PSUPRSUB,"REPORT1",PSUDIV,L)) Q:L="" S X=^(L) U IO W !,X I L=2 W !,?60,"PAGE: 1"
18 U IO W !!,@IOF
19 ;
20DRUGRPT ; Print Drug Summary
21 I '$D(^XTMP(PSUPRSUB,"REPORT2",PSUDIV)) Q
22 S PSUPG("PG")=1 D PGHDR
23 S L=6 F S L=$O(^XTMP(PSUPRSUB,"REPORT2",PSUDIV,L)) Q:L="" S X=^(L) U IO W !,X I $Y+4>IOSL D PG Q:$G(PSUQUIT)
24 W @IOF
25 Q
26PG ;EP Page controller
27 S PSUQUIT=0
28 I $Y<(IOSL-4) Q
29 S:'$D(PSUPG("PG")) PSUPG("PG")=0 S PSUPG("PG")=PSUPG("PG")+1
30 I $E(IOST)="C" K DIR S DIR(0)="E" D ^DIR I ($G(DIROUT)!$G(DUOUT)!$G(DTOUT)!$G(DROUT)) S PSUQUIT=1
31 U IO W @IOF
32 ;
33PGHDR ; Write Page Header (SUBJECT of MAILMESSAGE)
34 I '$D(^XTMP(PSUPRSUB,"REPORT2",PSUDIV)) Q
35 F I=1,2 W !,^XTMP(PSUPRSUB,"REPORT2",PSUDIV,I)
36 W !,?60,"PAGE: ",PSUPG("PG")
37 F I=3:1:6 I $D(^XTMP(PSUPRSUB,"REPORT2",PSUDIV,I)) W !,^(I)
38 Q
Note: See TracBrowser for help on using the repository browser.