source: FOIAVistA/trunk/r/PHARMACY_BENEFITS_MANAGEMENT-PSU/PSUAR5.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1PSUAR5 ;BIR/PDW - PRINT CYCLE CONTROLLER ;25 AUG 1998
2 ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
3EN ;EP for printing reports
4 N PSUQUIT
5 S PSUPG=0
6CATRPT ;
7 ; Printing Device should be opened by PSUDBQUE by now & IO set
8 ;For summary print for each division
9 I '$D(PSUARSUB) S PSUARSUB="PSUAR_"_PSUJOB
10 S PSUDIV=0 F S PSUDIV=$O(^XTMP(PSUARSUB,"REPORT1",PSUDIV)) Q:PSUDIV="" D
11 . S L="" F S L=$O(^XTMP(PSUARSUB,"REPORT1",PSUDIV,L)) Q:L="" S X=^(L) U IO W !,X I L=2 W !,?60,"PAGE: 1"
12 .;VMP-IOFO BAY PINES;ELR;PSU*3.0*26 - REMOVED FORM FEED
13 . ;U IO W @IOF
14 ;
15 D DRUGRPT
16 I '$D(^XTMP("PSU_"_PSUJOB,"CBAMIS")) D PRTAMIS ;Print AR/WS AMIS report
17 Q
18 ;
19PRTAMIS ;Print AMIS summary report
20 ;
21 S PSUPGS("PG")=1
22 D PGHDR1
23 S PSUL=4
24 F S PSUL=$O(^XTMP("PSU_"_PSUJOB,"ARAMIS",PSUL)) Q:PSUL="" D
25 .I (LNCNT+4)>IOSL D PGHDR1
26 .W !,^XTMP("PSU_"_PSUJOB,"ARAMIS",PSUL)
27 .S LNCNT=LNCNT+1
28 Q
29 ;
30DRUGRPT ; Print Drug Summary
31 S PSUDIV=0 F S PSUDIV=$O(^XTMP(PSUARSUB,"REPORT2",PSUDIV)) Q:PSUDIV="" D
32 . S PSUPG("PG")=1 D PGHDR S L=7 F S L=$O(^XTMP(PSUARSUB,"REPORT2",PSUDIV,L)) Q:L="" S X=^(L) U IO W !,X I $Y+4>IOSL D PG Q:$G(PSUQUIT)
33 . U IO W @IOF
34 Q
35 ;
36PG ;EP Page controller
37 S PSUQUIT=0
38 I $Y<(IOSL-4) Q
39 S:'$D(PSUPG("PG")) PSUPG("PG")=0 S PSUPG("PG")=PSUPG("PG")+1
40 I $E(IOST)="C" K DIR S DIR(0)="E" D ^DIR I ($G(DIROUT)!$G(DUOUT)!$G(DTOUT)!$G(DROUT)) S PSUQUIT=1
41 ;
42PGHDR ;PAGE HEADER
43 U IO W @IOF
44 F I=1,2 W !,^XTMP(PSUARSUB,"REPORT2",PSUDIV,I)
45 W !,?60,"Page: ",PSUPG("PG")
46 F I=4:1:7 I $D(^XTMP(PSUARSUB,"REPORT2",PSUDIV,I)) W !,^(I)
47 Q
48PGHDR1 ; Write Page Header (SUBJECT of MAILMESSAGE)
49 U IO W @IOF
50 F I=1,2 W !,^XTMP("PSU_"_PSUJOB,"ARAMIS",I)
51 W !,?68,"Page: ",PSUPG("PG")
52 S PSUPG("PG")=PSUPG("PG")+1
53 S LNCNT=3
54 Q
Note: See TracBrowser for help on using the repository browser.