source: WorldVistAEHR/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASSIGOV.m@ 1096

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

initial load of WorldVistAEHR

File size: 3.6 KB
Line 
1EASSIGOV ; ALB/RTK - Means Test Signature summary report ; 1/29/02 11:33am ; 07/22/02 9:40am
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**4,8,13,28**;Mar 15, 2001
3 ;
4 N YRSEL,SIGYES,SIGNO,SIGDEL,SIGNUL,CHKDT,MTIEN,MTSIG,NOW,SITE,CATA,CATC,PENDA,GMT
5 S NOW=$P($$NOW^XLFDT,"."),SITE=$P($$SITE^VASITE,"^",3)
6 S (SIGYES,SIGNO,SIGDEL,SIGNUL)=0
7 N DIR S DIR("A")="Please select income year",DIR(0)="SM^A:PREVIOUS INCOME YEAR;B:CURRENT INCOME YEAR;C:NEXT INCOME YEAR",DIR("B")="B"
8 D ^DIR S YRSEL=Y G END:$D(DTOUT)!($D(DUOUT))
9 D DEVSEL
10END Q
11EN W:$E(IOST,1)="C" @IOF
12 S (CATA,CATC,PENDA,GMT)=""
13 S CATA=$O(^DG(408.32,"B","MT COPAY EXEMPT",CATA))
14 S CATC=$O(^DG(408.32,"B","MT COPAY REQUIRED",CATC))
15 S PENDA=$O(^DG(408.32,"B","PENDING ADJUDICATION",PENDA))
16 S GMT=$O(^DG(408.32,"B","GMT COPAY REQUIRED",GMT))
17 ;Set start date:
18 S CHKDT=$S(YRSEL="A":($E(NOW,1,3)-1)_"0100",YRSEL="B":$E(NOW,1,3)_"1232",YRSEL="C":($E(NOW,1,3)+1)_"1232",1:""),DISPDT=CHKDT
19 I YRSEL="A" D PASTYR
20 I YRSEL'="A" D OTHERYR
21 Q
22PASTYR F S CHKDT=$O(^DGMT(408.31,"B",CHKDT)) Q:$E(CHKDT,1,3)=($E(DISPDT,1,3)+1) D
23 .S MTIEN="" F S MTIEN=$O(^DGMT(408.31,"B",CHKDT,MTIEN)) Q:+MTIEN=0 D
24 ..;Is test primary?
25 ..I $G(^DGMT(408.31,MTIEN,"PRIM"))'=1 Q
26 ..;Is test from this site?
27 ..I +$P($G(^DGMT(408.31,MTIEN,2)),"^",5)'=SITE Q
28 ..;If not a Means Test, ignore
29 ..I $P($G(^DGMT(408.31,MTIEN,0)),"^",19)'=1 Q
30 ..;Check category
31 ..S CAT=$P(^DGMT(408.31,MTIEN,0),"^",3) I CAT'=CATA,CAT'=CATC,CAT'=PENDA,CAT'=GMT Q
32 ..S MTSIG=$P(^DGMT(408.31,MTIEN,0),"^",29)
33 ..;Set counters
34 ..I MTSIG=1 S SIGYES=SIGYES+1 Q
35 ..I MTSIG=0 S SIGNO=SIGNO+1 Q
36 ..I MTSIG=9 S SIGDEL=SIGDEL+1 Q
37 ..I MTSIG="" S SIGNUL=SIGNUL+1
38 D PRINT
39 Q
40OTHERYR F S CHKDT=$O(^DGMT(408.31,"B",CHKDT),-1) Q:$E(CHKDT,1,3)=($E(DISPDT,1,3)-1) D
41 .S MTIEN="" F S MTIEN=$O(^DGMT(408.31,"B",CHKDT,MTIEN)) Q:+MTIEN=0 D
42 ..;Is test primary?
43 ..I $G(^DGMT(408.31,MTIEN,"PRIM"))'=1 Q
44 ..;Is test from this site?
45 ..I +$P($G(^DGMT(408.31,MTIEN,2)),"^",5)'=SITE Q
46 ..;If not a Means Test, ignore
47 ..I $P($G(^DGMT(408.31,MTIEN,0)),"^",19)'=1 Q
48 ..;Check category
49 ..S CAT=$P(^DGMT(408.31,MTIEN,0),"^",3) I CAT'=CATA,CAT'=CATC,CAT'=PENDA,CAT'=GMT Q
50 ..S MTSIG=$P(^DGMT(408.31,MTIEN,0),"^",29)
51 ..;Set counters
52 ..I MTSIG=1 S SIGYES=SIGYES+1 Q
53 ..I MTSIG=0 S SIGNO=SIGNO+1 Q
54 ..I MTSIG=9 S SIGDEL=SIGDEL+1 Q
55 ..I MTSIG="" S SIGNUL=SIGNUL+1
56 D PRINT
57 Q
58PRINT ;
59 U IO
60 W !,?2,"The purpose of this report is to help sites monitor the Means Test images"
61 W !?2,"returned to them by the HEC. The report only shows signature indicators"
62 W !?2,"for MTs that were submitted by the local site (which may or may not be"
63 W !?2,"designated as the primary site). It does NOT take into account that the"
64 W !?2,"HEC may already have a signature on file for the vet as sent from a"
65 W !?2,"different, primary site."
66 W !!,?2,"Means Test Signature Data for Income Year ",$E(DISPDT,1,3)+1699,":",!
67 W !,?2,"Local Site Means Test with Signature Indicator = YES",?60,SIGYES
68 W !,?2,"Local Site Means Test with Signature Indicator = NO",?60,SIGNO
69 W !,?2,"Local Site Means Test with Signature Indicator = DELETED",?60,SIGDEL
70 W !,?2,"Local Site Means Test with Signature Indicator = NULL",?60,SIGNUL
71 W ! F I=1:1:80 W "_"
72 W !,?50,"Total",?60,(SIGYES+SIGNO+SIGDEL+SIGNUL)
73 D ^%ZISC
74 Q
75DEVSEL ;Select IO Device
76 K DIRUT
77 S %ZIS="Q" D ^%ZIS
78 I POP W !!?5,"Report cancelled!" D ^%ZISC Q
79 I $D(IO("Q")) D QUEUE Q
80 D EN
81 Q
82QUEUE ;
83 S ZTRTN="EN^EASSIGOV",ZTDESC="MT Signature Summary Rpt"
84 S (ZTSAVE("YRSEL"),ZTSAVE("NOW"),ZTSAVE("SIGNO"),ZTSAVE("SIGNUL"),ZTSAVE("SIGYES"),ZTSAVE("SIGDEL"),ZTSAVE("SITE"))=""
85 D ^%ZTLOAD
86 I $D(ZTSK)[0 W !!?5,"Report cancelled!"
87 E W !!?5,"Report queued!"
88 D HOME^%ZIS Q
Note: See TracBrowser for help on using the repository browser.