source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGMT141A.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: 3.9 KB
RevLine 
[613]1DGMT141A ;ALB/ABR - SC 0% MT CHANGES REPORT (PATCH DG*5.3*141) ; 9/25/97
2 ;;5.3;Registration;**141**;Aug 13, 1993
3 ;
4EN ; entry point
5 N DGREPT,I,DIR,POP,TXT,X,Y,%ZIS,ZTSK,ZTSAVE,ZTDESC,ZTRTN
6 ;
7 F I=1:1 S TXT=$P($T(TXT+I),";;",2) Q:TXT["$END" D MES^XPDUTL(TXT) ; print TXT
8 ;
9 S DIR(0)="SM^1:Veterans who now REQUIRE a Means Test;2:Veterans who no longer require a Means Test;3:ALL"
10 S DIR("B")="ALL",DIR("A")="Select REPORT"
11 D ^DIR
12 I '$G(Y) D BMES^XPDUTL(" >> No Report Selected") Q
13 S DGREPT=Y
14 ;check for data
15 I DGREPT=3,'$D(^XTMP("DG53141G",1)),'$D(^XTMP("DG53141G",3)) D BMES^XPDUTL(" No entries to print") D EXIT Q
16 I DGREPT=1,'$D(^XTMP("DG53141G",1)) D BMES^XPDUTL(" No entries to print") D EXIT Q
17 I DGREPT=2,'$D(^XTMP("DG53141G",3)) D BMES^XPDUTL(" No entries to print") D EXIT Q
18 ; select device,queuing
19 S %ZIS="QM" D ^%ZIS I POP D BMES^XPDUTL(" Try again later.") Q
20 ; if queueing
21 I $D(IO("Q")) D Q
22 . S ZTRTN="RPT^DGMT141A",ZTDESC="SC 0% MT CHANGES REPORT",ZTSAVE("DGREPT")=""
23 . D ^%ZTLOAD I '$G(ZTSK) D BMES^XPDUTL(" Report cancelled. Try again later.") Q
24 . D BMES^XPDUTL(" ==> Task "_ZTSK_" queued.")
25 ;
26 U IO
27 D RPT ; report display entry point
28 D ^%ZISC
29 D EXIT
30 Q
31RPT ; run report
32 N DGDTTI,DGHOME,DGST,DGTOT,DGTOT1,DGTOT3,HDR,PAGE,MTSTAT,LID,NAME,COP,COPAY,PRST,PRSTA
33 N DGPT,DGSRT,STR,DGI
34 I IO=IO(0)&($E(IOST,1,2)["C-") S DGHOME=1 ; if home device, to check for paging prompt
35 S DGSRT(1)="Outpatient Encounters: ",DGSRT(2)="Inpatients: ",DGSRT(3)="Future Appointements: ",DGSRT(4)="Current MT or Copay test on file: "
36 ;
37 I DGREPT#2 D D REQ ; vets require mt
38 . S DGTOT1=0 F DGI=1:1:4 S DGTOT1=DGTOT1+$G(^XTMP("DG53141G",1,DGI,0))
39 I $G(DGST) Q ; if ^-out to page prompt
40 I DGREPT>1 D D NOTREQ ; not require mt
41 . S DGTOT3=0 F DGI=1:1:4 S DGTOT3=DGTOT3+$G(^XTMP("DG53141G",3,DGI,0))
42 Q
43REQ ; vets require mt
44 S MTSTAT=1
45 S DGDTTI=$$HTE^XLFDT($H) ; set date/time of report
46 S HDR="SC 0% VETERANS WHO NOW REQUIRE A MEANS TEST: ("_DGTOT1_" vets)",PAGE=0
47 ;
48 D PRINT
49 Q
50NOTREQ ; vets don't require mt
51 S MTSTAT=3
52 S DGDTTI=$$HTE^XLFDT($H) ; set date/time of report
53 S HDR="SC 0% VETERANS WHO NO LONGER REQUIRE A MEANS TEST: ("_DGTOT3_" vets)",PAGE=0
54 ;
55 D PRINT
56 Q
57PRINT ; report printing
58 N DGPT
59 F DGSRT=1:1:4 Q:$G(DGST) S DGPT=0 I $O(^XTMP("DG53141G",MTSTAT,DGSRT,DGPT))]"" D
60 . S DGSRT(DGSRT)=DGSRT(DGSRT)_+$G(^XTMP("DG53141G",MTSTAT,DGSRT,0))_" veteran(s)"
61 . D HDR F S DGPT=$O(^XTMP("DG53141G",MTSTAT,DGSRT,DGPT)) Q:DGPT="" S STR=^(DGPT) D Q:$G(DGST)
62 .. S NAME=$P(DGPT,"_"),PRST=+STR,LID=$P(STR,U,2),COP=$P(STR,U,3)
63 .. S PRSTA=$P($G(^DG(408.32,PRST,0)),U)
64 .. W !,NAME,?48,LID,?60,PRSTA
65 .. I COP S COPAY=$P(^DG(408.32,COP,0),U) W ?82,COPAY
66 .. I $Y>(IOSL-2) D HDR
67 Q
68HDR ; header and paging
69 S PAGE=PAGE+1 I PAGE>1&$G(DGHOME) D Q:$G(DGST)
70 . N X,Y,DIR,CTR
71 . S DIR(0)="E" D ^DIR S DGST='Y
72 W @IOF,!?(IOM-$L(HDR)\2),HDR,!!,"page ",PAGE,?(IOM-23),DGDTTI
73 W !!,"Name",?48,"Long ID",?60,"Previous MT Status",?82,"Current COPAY status, if changed"
74 W ! F I=1:1:IOM-1 W "-"
75 S CTR=IOM-(28+$L(DGSRT(DGSRT)))\2
76 W !,?CTR,"** MT Changes found from ",DGSRT(DGSRT),!
77 Q
78 ;
79EXIT ; clean up variables
80 K DGREPT
81TXT ; report description
82 ;;
83 ;;This report will list those veterans, SC<50%, SC 0% whose Means Test status
84 ;;was changed as a result of the revised Secondary Eligibility checks.
85 ;;
86 ;;The source for this listing is the clean-up that was run as part of
87 ;;patch DG*5.3*141. There are 2 possible reports:
88 ;;
89 ;; 1 - Veterans who now REQUIRE a Means Test
90 ;; 2 - Veterans who no longer require a Means Test.
91 ;;
92 ;;Each of these reports has been divided into 3 parts, based on why
93 ;;the veteran's status was reviewed:
94 ;;
95 ;; If, during the timeframe between the installation of the Tricare
96 ;; patch and the date the clean-up was run, the Veteran:
97 ;; 1) had an Outpatient Encounter.
98 ;; 2) was an inpatient.
99 ;; 3) had a future appointment made.
100 ;; 4) has current Means Test or Copay test on file
101 ;;
102 ;; ** This report requires 132 columns! **
103 ;;
104 ;;$END
Note: See TracBrowser for help on using the repository browser.