source: FOIAVistA/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASECA.m@ 1470

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

initial load of FOIAVistA 6/30/08 version

File size: 3.8 KB
Line 
1EASECA ;ALB/PHH,LBD - Add a New LTC Co-Pay Test ;10 AUG 2001
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**5,7,34,40**;Mar 15, 2001
3 ;
4EN ;Entry point to add a new LTC Co-Pay test
5 N DGMDOD S DGMDOD=""
6 S DGMTYPT=3
7 I $D(DGMTDFN)#2 K DGMTDFN
8 S DIC="^DPT(",DIC(0)="AEMQ" W !! D ^DIC K DIC G Q:Y<0 S (DFN,DGMTDFN)=+Y
9 I $P($G(^DPT(DFN,.35)),U)'="" S DGMDOD=$P(^DPT(DFN,.35),U)
10 I $G(DGMDOD) W !!,"Patient died on: ",$$FMTE^XLFDT(DGMDOD,"1D") Q
11 ; Is patient a veteran? Added for LTC III (EAS*1*34)
12 I $P($G(^DPT(DFN,"VET")),U)'="Y" W !!,"Patient is not a Veteran." Q
13 ;
14 S DGLDT=$$LST^EASECU(DFN,"",DGMTYPT),DGLD=$P(DGLDT,U,2),DGLDYR=$E(DGLD,1,3)_"1231"
15 ;
16DT S %DT("A")="Date of LTC Copay Test: ",%DT="AEX",%DT(0)="-NOW",%DT("B")="NOW" W ! D ^%DT K %DT G Q:Y<0 S DGMTDT=Y
17 I DGLD,DGMTDT'>DGLD W !?3,*7,"The date of test must be after the date of the last test on " S Y=DGLD X ^DD("DD") W Y,"." G DT
18 ; LTC III (EAS*1*34) - change to allow multiple tests within a year
19 I DGLD S X1=DGMTDT,X2=DGLD D ^%DTC I X<365 D G EN:$G(Y)'=1
20 .W !?3,*7,"An LTC Copay Test already exists on " S Y=DGLD X ^DD("DD") W Y,"."
21 .S DIR(0)="Y",DIR("A")="Are you sure you want to add a new test",DIR("B")="NO" D ^DIR K DIR
22 .;S DGTTYP="LTC COPAY "
23 .;W !,$S($P($G(^DG(408.34,+$P($G(^DGMT(408.31,+DGLDT,0)),U,23),0)),U)="VAMC":" Use the 'EASEC "_DGTTYP_"TEST EDIT' Option.",1:" Use the 'EASEC "_DGTTYP_"TEST VIEW' Option.")
24 ;
25 D ADD G EN:DGMTI<0
26 ;
27EXMPT ; Is veteran exempt from LTC copayments?
28 S DGEXMPT=$$EXMPT^EASECU(DFN)
29 I DGEXMPT D EXMPT^EASECSCC(DFN,DGMTI,DGEXMPT) D Q G EN
30 ; Is veteran exempt for reason other than low income?
31 ; LTC Phase IV (EAS*1*40)
32 W !!
33 S DIR("A")="Is veteran EXEMPT from LTC copayments",DIR("B")="NO",DIR(0)="Y",DIR("?")="Enter either 'Y' or 'N'."
34 S DIR("?",1)="Answer 'Yes' if the veteran is exempt from LTC copayments"
35 S DIR("?",2)="for a reason other than low income.",DIR("?",3)=""
36 D ^DIR K DIR I $D(DTOUT)!($D(DUOUT)) D DEL,Q G EN
37 I Y D D Q G EN
38 .; Get reason for exemption
39 .S DIR("A")="Reason for Exemption",DIR(0)="P^714.1:EM"
40 .S DIR("S")="I $P(^(0),U,2),""^1^2^12^""'[(U_Y_U)"
41 .D ^DIR K DIR I 'Y!($D(DUOUT))!($D(DTOUT)) D D DEL Q
42 ..W !!,"A reason for exemption must be entered. LTC Copay Test cannot be added.",!
43 .D EXMPT^EASECSCC(DFN,DGMTI,+Y)
44 ; Check if veteran's income is below the pension threshold
45 D EN^EASECMT I $G(DGOUT) D DEL,Q G EN
46 I DGEXMPT D EXMPT^EASECSCC(DFN,DGMTI,2) D Q G EN
47 W !! F I=1:1:80 W "="
48 W !!,?10,"Veteran is NOT EXEMPT from Long Term Care copayments based"
49 W !,?10,"on last year's income and must complete a 10-10EC form."
50 W !! F I=1:1:80 W "="
51 ; Does veteran decline to provide income information?
52 W !!
53 D REF^EASECSCC I $D(DTOUT)!($D(DUOUT)) D Q G EN
54 I $D(DGREF) D D Q G EN
55 .; Ask if veteran agrees to pay copayments; complete LTC copay test
56 .D AGREE^EASECSCC Q:$D(DTOUT)!($D(DUOUT))
57 .S DGSTA="NON-EXEMPT",DGCAT="T" D STA^DGMTSCU2 S (DGINT,DGDET,DGNWT)=""
58 .D UPD^EASECSCC
59 ; Go to LTC co-pay test (1010-EC) input screens
60 S DGMTACT="ADD",DGMTROU="EN^EASECA" G EN^EASECSC
61 ;
62Q K DA,DFN,DGADDF,DGBL,DGCAT,DGEXMPT,DGFL,DGFLD,DGIRO,DGLD,DGLDT,DGLDYR
63 K DGMTACT,DGMTCOR,DGMTDT,DGMTI,DGMTROU,DGMTYPT,DGOUT,DGREQF,DGSTA
64 K DGTTYP,DGVI,DGVO,DTOUT,DUOUT,X,X1,X2,Y
65 Q
66 ;
67ADD ;Add LTC Copay test
68 ; Input -- DFN Patient IEN
69 ; DGMTDT Date
70 ; DGMTYPT Type of Test 3 = LTC Copay
71 ; Output -- DGMTI Annual LTC Copay Test IEN
72 N DA,DD,DIC,DIK,DINUM,DLAYGO,DO,DS,X,D0,DGSITE
73 ;
74 S X=DGMTDT,(DIC,DIK)="^DGMT(408.31,",DIC(0)="L",DLAYGO=408.31
75 S DGSITE=$$GETSITE^DGMTU4(.DUZ)
76 ; For LTC IV (EAS*1*40) - set 1010EC Form field (#2.1) = 1
77 S DIC("DR")=".02////"_DFN_";.019////"_DGMTYPT_";.23////1;2.05////"_DGSITE_";2.1////1"
78 K DD,D0
79 D FILE^DICN S DGMTI=+Y
80ADDQ Q
81 ;
82DEL ;Delete incomplete LTC Copay test
83 ; Input -- DGMTI LTC Copay test IEN
84 N DA,DIK
85 Q:'$G(DGMTI) Q:$P($G(^DGMT(408.31,DGMTI,0)),U,19)'=3
86 S DA=DGMTI,DIK="^DGMT(408.31,"
87 D ^DIK
88 Q
Note: See TracBrowser for help on using the repository browser.