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

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

initial load of WorldVistAEHR

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