1 | DGMTSC ;ALB/RMO,CAW,RTK,PDJ,LBD,EG - Means Test Screen Driver ;05/02/2006
|
---|
2 | ;;5.3;Registration;**182,327,372,433,463,540,566,611**;Aug 13, 1993;Build 3
|
---|
3 | ;
|
---|
4 | ;A series of screens used to collect the means test data
|
---|
5 | ; Input -- DFN Patient IEN
|
---|
6 | ; DGMTACT Means Test Action (ie, ADD to Add a Means Test)
|
---|
7 | ; DGMTDT Date of Test
|
---|
8 | ; DGMTI Annual Means Test IEN
|
---|
9 | ; DTMTYPT Type of Test 1=MT 2=COPAY
|
---|
10 | ; DGMTROU Option Routine Return
|
---|
11 | ; Output -- None
|
---|
12 | ;
|
---|
13 | ;DG*5.3*540 - set 408.21 (Idiv. Ann. Income) ien to 0 to prevent from
|
---|
14 | ; linking to old test incomes for IVM converted cases.
|
---|
15 | ;
|
---|
16 | EN ;Entry point for means test screen driver
|
---|
17 | D PRIOR^DGMTEVT:DGMTACT'="VEW",HOME^%ZIS,SETUP^DGMTSCU I DGERR D MG G Q1
|
---|
18 | N DGREF,DTOUT,DUOUT,DGCAT,DGREF,ANSPFIN,PROVS
|
---|
19 | S ANSPFIN="N"
|
---|
20 | I DGMTACT="ADD"!(DGMTACT="EDT")!(DGMTACT="COM") D DISCF Q:$D(DTOUT)!$D(DUOUT) I $D(DGREF) D Q Q
|
---|
21 | ;
|
---|
22 | EN1 ;Entry point to edit means test if incomplete
|
---|
23 | S DGMTSCI=+$O(DGMTSC(0))
|
---|
24 | I DGMTI,$$GET1^DIQ(408.31,DGMTI,.23)["IVM" S DGVINI=0 ;DG*5.3*540
|
---|
25 | G @($$ROU^DGMTSCU(DGMTSCI))
|
---|
26 | ;
|
---|
27 | ;
|
---|
28 | Q I DGMTACT'="VEW" D EN^DGMTSCC I DGERR G EN1:$$EDT
|
---|
29 | ; Added for LTC Co-pay Phase II - DG*5.3*433
|
---|
30 | I DGMTACT'="VEW",DGMTYPT=4 D G K
|
---|
31 | .Q:$P($G(^DGMT(408.31,DGMTI,0)),U,3)="" ; LTC 4 test is incomplete
|
---|
32 | .D AFTER^DGMTEVT S DGMTINF=0
|
---|
33 | .D EN^DGMTAUD,EN^IVMPMTE
|
---|
34 | .D DATETIME^DGMTU4(DGMTI)
|
---|
35 | .; If LTC copay exemption test is edited, update LTC copay test
|
---|
36 | .I DGMTACT="EDT" D UPLTC3^EASECMT(DGMTI)
|
---|
37 | Q1 I DGMTACT'="VEW" D AFTER^DGMTEVT S DGMTINF=0 D EN^DGMTEVT
|
---|
38 | ;
|
---|
39 | ;If the veteran has agreed to pay copay after previously refusing,
|
---|
40 | ;automatically update their Primary Eligibility (327-Ineligible Project)
|
---|
41 | I $D(DGMTP),$D(DGMTA) D
|
---|
42 | .I $D(^DPT(DFN,.3)),$P(DGMTP,U,11)=0,$P(DGMTA,U,11)=1 D
|
---|
43 | ..N DATA
|
---|
44 | ..I $P(^DPT(DFN,.3),U)="Y" S DATA(.361)=$O(^DIC(8,"B","SC LESS THAN 50%",""))
|
---|
45 | ..E S DATA(.361)=$O(^DIC(8,"B","NSC",""))
|
---|
46 | ..I $$UPD^DGENDBS(2,DFN,.DATA)
|
---|
47 | .;If the veteran has refused to pay copay, update ENROLLMENT
|
---|
48 | .;PRIORITY to null.
|
---|
49 | .I $P(DGMTA,U,11)=0 D
|
---|
50 | ..S CUR=$$FINDCUR^DGENA(DFN)
|
---|
51 | ..N DATA S DATA(.07)="@" I $$UPD^DGENDBS(27.11,CUR,.DATA)
|
---|
52 | ;
|
---|
53 | ; Added for LTC Copay Phase II (DG*5.2*433)
|
---|
54 | ; If means test or copay test is edited and has a LTC copay exemption
|
---|
55 | ; test associated with it, update the LTC copay exemption test.
|
---|
56 | I DGMTACT="EDT",$O(^DGMT(408.31,"AT",DGMTI,0)) D LTC4^EASECMT(DGMTI)
|
---|
57 | ;
|
---|
58 | K K %,DGBL,DGDC,DGDEP,DGDR,DGFCOL,DGFL,DGMT0,DGMTA,DGMTINF,DGMTOUT,DGMTP,DGMTPAR,DGMTSC,DGMTSCI,DGREL,DGRNG,DGRPPR,DGSCOL,DGSEL,DGSELTY,DGVI,DGVINI,DGVIRI,DGVO,DGVPRI,DGX,DGY,DTOUT,DUOUT,Y,Z
|
---|
59 | ;
|
---|
60 | ; Validate record with consistency checks, when adding, editing, or
|
---|
61 | ; completing either a means or copay test.
|
---|
62 | ; For DG*5.3*566 - added a check for Status field to be defined before
|
---|
63 | ; calling the consistency check API (INCON^DGMTUTL1).
|
---|
64 | K IVMERR,IVMAR,IVMAR2
|
---|
65 | ;don't apply consistency checks if user elects to not provide financial information
|
---|
66 | I DGMTACT'="VEW",$P($G(^DGMT(408.31,DGMTI,0)),U,3),'$D(DGREF) D INCON^DGMTUTL1(DFN,DGMTDT,DGMTI,DGMTYPT,.IVMERR),PROB^IVMCMFB(DGMTDT,.IVMERR,1)
|
---|
67 | ;
|
---|
68 | ;Update the TEST-DETERMINED STATUS field (#2.03) in the ANNUAL MEANS
|
---|
69 | ;TEST file (408.31) when adding a means or copay test, completing a
|
---|
70 | ;means test, or editing a means or copay test.
|
---|
71 | I "ADDCOMEDT"[DGMTACT D SAVESTAT^DGMTU4(DGMTI,DGERR)
|
---|
72 | K DGERR,IVMERR,ARRAY,ZIC,ZIR,ZMT,ZDP,IVMAR,IVMAR2,DGREF
|
---|
73 | ;
|
---|
74 | G @(DGMTROU)
|
---|
75 | ;
|
---|
76 | MG ;Print set-up error messages
|
---|
77 | I $D(DGVPRI),DGVPRI'>0 W !!?3,"Patient Relation cannot be setup for patient."
|
---|
78 | I $D(DGVINI),DGVINI'>0 W !!?3,"Individual Annual Income cannot be setup for patient."
|
---|
79 | I $D(DGMTPAR),DGMTPAR']"",DGMTYPT=1 W !!?3,"Means Test Thresholds are not defined."
|
---|
80 | W !?3,*7,"Please contact your site manager."
|
---|
81 | Q
|
---|
82 | ;
|
---|
83 | EDT() ;Edit means/copay test if incomplete
|
---|
84 | N DIR,Y
|
---|
85 | S DIR("A")="Do you wish to edit the "_$S(DGMTYPT=1:"means",1:"copay exemption")_" test"
|
---|
86 | S DIR("B")="YES",DIR(0)="Y" D ^DIR
|
---|
87 | Q +$G(Y)
|
---|
88 | ;
|
---|
89 | DEDUCT() ;
|
---|
90 | N DIR,Y
|
---|
91 | S DIR("A")="Agreed to pay deductible",DIR(0)="Y"
|
---|
92 | D ^DIR
|
---|
93 | Q +$G(Y)
|
---|
94 | ;
|
---|
95 | DISCF ;Check if patient declines to provide income information
|
---|
96 | ;similar to module REF in program DGMTSCC, but the questions
|
---|
97 | ;are negatives of each other
|
---|
98 | N DIR,Y,U,MSG
|
---|
99 | S U="^"
|
---|
100 | S MSG(1)=""
|
---|
101 | S MSG(2)="PROVIDE SPECIFIC INCOME AND/OR ASSET INFORMATION"
|
---|
102 | S MSG(3)="TO HAVE ELIGIBILITY FOR CARE DETERMINED. <YES>"
|
---|
103 | S MSG(4)="Continue, and complete the test with last calendar year's information."
|
---|
104 | S MSG(5)=""
|
---|
105 | S MSG(6)="PROVIDE MY DETAILED FINANCIAL INFORMATION. <NO>"
|
---|
106 | S MSG(7)="The appropriate enrollment priority based on nondisclosure of"
|
---|
107 | S MSG(8)="my financial information will be assigned."
|
---|
108 | S MSG(9)=""
|
---|
109 | D BMES^XPDUTL(.MSG)
|
---|
110 | S DIR("A")="Do you wish to provide financial information? "
|
---|
111 | ;piece 14 says declines to give income info yes or no
|
---|
112 | ;if the user declines to give income info, then provide financial information is no
|
---|
113 | I $P($G(^DGMT(408.31,DGMTI,0)),"^",14)]"" S DIR("B")=$S($P(^DGMT(408.31,DGMTI,0),"^",14):"N",1:"Y")
|
---|
114 | I '$D(DIR("B")) S DIR("B")="YES"
|
---|
115 | S DIR(0)="408.31,.14" D ^DIR K DIR I $D(DTOUT)!($D(DUOUT)) Q
|
---|
116 | S:'Y DGREF="" S ANSPFIN="Y" Q:'$D(DGREF)!($D(DGREF1))!(DGMTYPT'=1) S DGCAT="C" D STA^DGMTSCU2
|
---|
117 | Q
|
---|