source: WorldVistAEHR/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASMTRP2.m@ 1042

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

initial load of WorldVistAEHR

File size: 2.7 KB
Line 
1EASMTRP2 ; ALB/SCK - MEANS TEST REPORTS 2 ; 2/19/02
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**3,15,22**;MAR 15,2001
3 ;
4QUE ; Que pending letter count (letters flagged to print)
5 N ZTSAVE,DIR,EASUM,Y
6 ;
7 S DIR(0)="YAO",DIR("A")="Print Summary Only? ",DIR("B")="YES"
8 S DIR("?")="'YES' will print a summary total only, 'NO' will print the summary and a detail listing by scheduled print date"
9 D ^DIR K DIR
10 Q:$D(DIRUT)
11 S EASUM=+Y
12 S ZTSAVE("EASUM")=""
13 D EN^XUTMDEVQ("PEND^EASMTRP2","EAS LETTERS DETAILED PENDING REPORT",.ZTSAVE)
14 Q
15PEND ; Print report
16 N CNT,EASIEN,PCNT,RCNT,EASX,TOT,PAGE,EAS0,EAS4,EAS6,EASPDT,EAX,TOTALS,DUOUT
17 ;
18 K ^TMP("EASPND",$J)
19 F EAX=0,30,60 S TOTALS(EAX)=0
20 S EASIEN=0
21 F S EASIEN=$O(^EAS(713.2,"AC",0,EASIEN)) Q:'EASIEN D
22 . I $P($G(^EAS(713.2,EASIEN,"Z")),U,2) D Q
23 . . S EAS0=$P($G(^EAS(713.2,EASIEN,"Z")),U,1)
24 . . S ^TMP("EASPND",$J,EAS0,0)=$G(^TMP("EASPND",$J,EAS0,0))+1
25 . . S TOTALS(0)=TOTALS(0)+1
26 . ;
27 . I $P($G(^EAS(713.2,EASIEN,4)),U,2) D Q
28 . . S EAS4=$P($G(^EAS(713.2,EASIEN,4)),U,1)
29 . . S ^TMP("EASPND",$J,EAS4,4)=$G(^TMP("EASPND",$J,EAS4,4))+1
30 . . S TOTALS(30)=TOTALS(30)+1
31 . ;
32 . I $P($G(^EAS(713.2,EASIEN,6)),U,2) D
33 . . S EAS6=$P($G(^EAS(713.2,EASIEN,6)),U,1)
34 . . S ^TMP("EASPND",$J,EAS6,6)=$G(^TMP("EASPND",$J,EAS6,6))+1
35 . . S TOTALS(60)=TOTALS(60)+1
36 ;
37 D HDR1
38 I 'EASUM,$E(IOST,1,2)="C-" D Q:$D(DUOUT)
39 . S DIR(0)="FAO",DIR("A")="Press any key to continue..."
40 . D ^DIR K DIR
41 . Q:$D(DUOUT)
42 ;
43 D:'EASUM DETAIL
44 Q
45 ;
46DETAIL ; Print details section
47 N EASPDT,DIRUT
48 ;
49 D HDR
50 S EASPDT=0
51 F S EASPDT=$O(^TMP("EASPND",$J,EASPDT)) Q:'EASPDT D Q:$D(DIRUT)
52 . I ($Y+4)>IOSL D Q:$D(DIRUT)
53 . . I $E(IOST,1,2)="C-" D Q:$D(DIRUT)
54 . . . S DIR(0)="E"
55 . . . D ^DIR K DIR
56 . . D HDR
57 . W !?4,$$FMTE^XLFDT(EASPDT),?20
58 . S TOT=0
59 . F EAX=6,4,0 D
60 . . S CNT=$G(^TMP("EASPND",$J,EASPDT,EAX))
61 . . W $J(+CNT,6)," "
62 . . S TOT=$G(TOT)+(+CNT)
63 . W $J(TOT,8)
64 ;
65 K ^TMP("EASPND",$J)
66 Q
67 ;
68HDR1 ;
69 N TAB,LINE,DASH
70 ;
71 W @IOF
72 S LINE(1)="Count of Letters Pending to Print (Flag to Print marked 'YES')"
73 S LINE(2)="Printed: "_$$FMTE^XLFDT($$NOW^XLFDT)
74 S LINE(60)="60-Day letters flagged to print: "_$FN(TOTALS(60),",")
75 S LINE(30)="30-Day letters flagged to print: "_$FN(TOTALS(30),",")
76 S LINE(0)=" 0-Day letters flagged to print: "_$FN(TOTALS(0),",")
77 ;
78 S TAB=(IOM-$L(LINE(1)))/2
79 W !?TAB,LINE(1)
80 W !?TAB,LINE(2)
81 S $P(DASH,"=",IOM)=""
82 W !,DASH
83 ;
84 F EAX=60,30,0 D
85 . S TAB=(IOM-$L(LINE(EAX)))/2
86 . W !?TAB,LINE(EAX)
87 Q
88 ;
89HDR ;
90 N TAB,LINE
91 ;
92 W @IOF
93 W !,"Detailed List of Letters Flagged to Print"
94 W !,"Printed: "_$$FMTE^XLFDT($$NOW^XLFDT)
95 S PAGE=$G(PAGE)+1
96 S TAB=IOM-8
97 W ?TAB,"PAGE: ",PAGE
98 W !!?4,"Sched. Date",?20,"60-Day"," ","30-Day"," "," 0-day"," "," TOTAL"
99 S $P(LINE,"=",IOM)="" W !,LINE
100 Q
Note: See TracBrowser for help on using the repository browser.