source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGMTSC31.m@ 1663

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

initial load of WorldVistAEHR

File size: 2.5 KB
RevLine 
[613]1DGMTSC31 ;ALB/RMO - Means Test Screen Deductible Expenses Cont. ; 13 MAR 92
2 ;;5.3;Registration;**45**;Aug 13, 1993
3 ;
4 ; Input -- DFN Patient IEN
5 ; DGMTDT Date of Test
6 ; DGMTPAR Annual Means Test Parameter Array
7 ; Output -- None
8 ;
9EN ;Entry point for dependent children
10 S DGFL=0 K DGDCS D SET
11 W !!,"Enter: R to REDISPLAY information on dependent children"
12 I DGDEP W !?8,"1-",DGDEP," to edit information for the child listed after that number"
13 R !,"Enter CHOICE: ",X:DTIME I '$T!(X["^") S DGFL=$S(X["^":-1,1:-2) G Q
14 G:X']"" Q I X["?" G EN
15 S X=$E(X) D UP^DGHELP
16 I X="R" D DIS G EN:'DGFL,Q
17 I 'X!'$D(DGDCS(X)) G EN ; not numeric or bad answer
18 S DGINI=+$G(DGINC("C",DGDCS(X)))
19 I $G(^DGMT(408.21,DGINI,0)),($P(^(0),"^",14)-$P(DGMTPAR,"^",17))'>0 W !!?8,"Post-secondary education expenses are not applicable for this child." G EN
20 D EDT:DGINI G EN:'DGFL
21Q I DGFL<0 S DGMTOUT=1
22 K DGDCS,DGDEP,DGFL,DGINC,DGINR,DGINI,DGREL,DTOUT,DUOUT,X
23 Q
24 ;
25SET ;Set variables for selectable dependent children ;DGMTP also calls
26 N DGCNT,Y
27 D ALL^DGMTU21(DFN,"C",DGMTDT,"IPR",$S($G(DGMTI):DGMTI,1:""))
28 I $P(DGMTPAR,"^",17)']"" G SETQ ;quit if no child's income exclusion
29 S (DGCNT,DGDEP)=0 F S DGCNT=$O(DGREL("C",DGCNT)) Q:'DGCNT D
30 .D CHK I Y S DGDEP=DGDEP+1,DGDCS(DGDEP)=DGCNT
31SETQ Q
32 ;
33DIS ;Display dependent children with employment income
34 N DGLP
35 W !!?8,"Child's",?24,"Employment",?36,"Post-secondary"
36 W !?8,"First Name",?24,"Income",?36,"Education Expenses"
37 W !?8,"------------",?24,"----------",?36,"------------------"
38 S DGLP=0 F S DGLP=$O(DGDCS(DGLP)) Q:'DGLP S DGCNT=DGDCS(DGLP) D CHILD
39 Q
40 ;
41CHILD ;Display employment income and expenses for a dependent child
42 N DGIN0,DGIN1
43 S DGIN0=$G(^DGMT(408.21,+$G(DGINC("C",DGCNT)),0)),DGIN1=$G(^(1))
44 W !?4,DGLP,".",?8,$E($P($$NAME^DGMTU1(+DGREL("C",DGCNT)),",",2),1,12)
45 W ?24,$J($$AMT^DGMTSCU1($P(DGIN0,"^",14)),10)
46 W ?44,$J($S(($P(DGIN0,"^",14)-$P(DGMTPAR,"^",17))>0:$$AMT^DGMTSCU1($P(DGIN1,"^",3)),1:"N/A"),10)
47 Q
48 ;
49CHK ;Check if child has income available to the veteran and his/her own
50 ;employment income
51 S Y=0
52 I $D(^DGMT(408.22,+$G(DGINR("C",DGCNT)),0)),$P(^(0),"^",11),$P(^(0),"^",12),$P($G(^DGMT(408.21,+$G(DGINC("C",DGCNT)),0)),"^",14) S Y=1
53 Q
54 ;
55EDT ;Edit dependent child expenses
56 N DA,DGFIN,DGIN1,DIE,DR
57 S DGIN1=$G(^DGMT(408.21,DGINI,1))
58 S DA=DGINI,DIE="^DGMT(408.21,",DR="[DGMT ENTER/EDIT CHILD EXPENSES]" D ^DIE
59 S:'$D(DGFIN) DGFL=$S($D(DTOUT):-2,$D(DUOUT):-1,1:0)
60 I DGIN1'=$G(^DGMT(408.21,DGINI,1)) S DR="103////^S X=DUZ;104///^S X=""NOW""" D ^DIE
61 Q
Note: See TracBrowser for help on using the repository browser.