source: WorldVistAEHR/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASECV.m@ 1271

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1EASECV ;ALB/PHH - View an LTC Co-Pay Test ; 20 AUG 2001
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**5,7**;Mar 15, 2001
3 ;
4EN ;Entry point to view an LTC Co-Pay test
5 S DIC("S")="I $D(^DGMT(408.31,""AID"",3,+Y))"
6 S DIC="^DPT(",DIC(0)="AEMQ" W ! D ^DIC K DIC G Q:Y<0 S DFN=+Y
7 ;
8DT S DIC("A")="Select DATE OF TEST: "
9 I $D(^DGMT(408.31,+$$LST^EASECU(DFN,"",DGMTYPT),0)) S DIC("B")=$P(^(0),"^")
10 S DIC("S")="I $P(^(0),U,2)=DFN,$P(^(0),U,19)=DGMTYPT"
11 S DIC="^DGMT(408.31,",DIC(0)="EQZ" W ! D EN^DGMTLK K DIC G Q:Y<0
12 S DGMTI=+Y,DGMTDT=$P(Y,"^",2),DGMT0=Y(0)
13 ;
14EN1 ;Entry point to view an uneditable test
15 ;JAN;12/13/00;DG*5.3*346;Change G EN to G EN1Q. This allowed the code to quit back to VIEWPRT+4^EASECE, then back to DT+9^EASECE then GO to EN^EASECE.
16 D DIS I $D(DTOUT)!($D(DUOUT))!($G(DGERR)) K DGERR,DTOUT,DUOUT G EN1Q
17 S DGMTACT="VEW",DGMTROU=$S($G(DGMTERR):"EN1Q^EASECV",1:"EN^EASECV") G EN^EASECSC
18 ;
19Q K DFN,DGMTACT,DGMTDT,DGMTERR,DGMTI,DGMT0,DGMTROU,DGMTYPT,DTOUT,DUOUT,X,Y
20EN1Q Q
21 ;
22DIS ;Display LTC Co-Pay test data
23 N DA,DGCONTOT,DGDEP,DGINC,DGINR,DGREL,DIC,DIR,DR,Y
24 D ALL^EASECU21(DFN,"VSC",DGMTDT,"IPR",$S($G(DGMTI):DGMTI,1:""))
25 D DISPLAY^EASECU23(DGMTI,DGMTYPT)
26 I '$D(DGREL("V"))!('$D(DGINC("V")))!('$D(DGINR("V"))) D
27 .W !?2,*7,"** DETAILED LTC COPAY TEST INCOME INFORMATION IS NOT "
28 .I $P(DGMT0,U,3)=12!($P(DGMT0,U,14))=1 W "REQUIRED **",!
29 .E W "AVAILABLE **",1
30 .S DGERR=1
31 I '$G(DGERR),$D(^DGMT(408.21,+$G(DGINC("V")),"TOT")),$P(DGMT0,"^",4)]"" S DGCONTOT=^("TOT") D CHK
32 I '$G(DGERR),$P(DGMT0,"^",3)=12 W !?2,*7,"** LTC COPAY TEST IS NO LONGER REQUIRED, INCOME INFORMATION MAY NOT BE ACCURATE **",!
33 S DIR(0)="E" D ^DIR
34 Q
35 ;
36CHK ;Check for spouse and children totals NOT converted
37 N DGCTOT,DGSTOT,DGVIR0
38 S DGVIR0=$G(^DGMT(408.22,+$G(DGINR("V")),0))
39 I '$D(DGINC("S")),$P(DGVIR0,"^",5),($P(DGCONTOT,"^")]""!($P(DGCONTOT,"^",2)]"")) S DGSTOT=$P(DGCONTOT,"^",1,2)
40 I '$D(DGINC("C")),$P(DGVIR0,"^",8),($P(DGCONTOT,"^",3)]""!($P(DGCONTOT,"^",4)]"")) S DGCTOT=$P(DGCONTOT,"^",3,4)
41 D WRT:$D(DGSTOT)!($D(DGCTOT))
42 Q
43 ;
44WRT ;Write spouse and children totals NOT converted
45 W !?2,*7,"DETAILED LTC COPAY TEST INCOME INFORMATION COULD NOT BE CONVERTED FOR THE",!?2,"FOLLOWING RELATIONS ASSOCIATED WITH THIS LTC COPAY TEST:"
46 W !!?27,"INCOME",?37,"NET WORTH",!?27,"------",?37,"---------"
47 W:$D(DGSTOT) !?2,"SPOUSE",?22,$J($$AMT^DGMTSCU1($P(DGSTOT,"^")),11),?35,$J($$AMT^DGMTSCU1($P(DGSTOT,"^",2)),11)
48 W:$D(DGCTOT) !?2,"CHILDREN",?22,$J($$AMT^DGMTSCU1($P(DGCTOT,"^")),11),?35,$J($$AMT^DGMTSCU1($P(DGCTOT,"^",2)),11)
49 W !!?2,"TO COLLECT THE NEW DETAILED DEPENDENT DEMOGRAPHIC AND INCOME INFORMATION",!?2,"THE LTC COPAY TEST WOULD HAVE TO BE EDITED.",!
50 Q
Note: See TracBrowser for help on using the repository browser.