source: FOIAVistA/trunk/r/PHARMACY_BENEFITS_MANAGEMENT-PSU/PSULR6.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

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