source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGMTE.m@ 1672

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

initial load of FOIAVistA 6/30/08 version

File size: 4.7 KB
Line 
1DGMTE ;ALB/RMO,CAW,LD,SCG - Edit an Existing Means Test ;03 APR 2002 2:00 pm
2 ;;5.3;Registration;**33,45,182,344,332,433,624**;Aug 13, 1993
3 ;
4EN ;Entry point to edit an existing means test
5 N DGMDOD S DGMDOD=""
6 I DGMTYPT=1 S DIC("S")="I $P(^(0),U,14)"
7 I DGMTYPT=2!(DGMTYPT=4) S DIC("S")="I $D(^DGMT(408.31,""AID"",DGMTYPT,+Y))"
8 I $D(DGMTDFN)#2 D UNLOCK^DGMTUTL(DGMTDFN) K DGMTDFN
9 S DIC="^DPT(",DIC(0)="AEMQ" W ! D ^DIC K DIC G Q:Y<0 S (DFN,DGMTDFN)=+Y
10 I $P($G(^DPT(DFN,.35)),U)'="" S DGMDOD=$P(^DPT(DFN,.35),U)
11 I $G(DGMDOD) W !,"Patient died on: ",$$FMTE^XLFDT(DGMDOD,"1D") Q
12 ;
13 ; check if income test upload in progress
14 D CKUPLOAD^IVMCUPL(DFN)
15 ;
16 ; obtain lock used to synchronize local MT/CT options with income test upload
17 I $$LOCK^DGMTUTL(DFN)
18 ;
19DT S DIC("A")="Select DATE OF TEST: "
20 N FUTFLG,VSITE S FUTFLG=0,VSITE=+$P($$SITE^VASITE(),U,3)
21 I $D(^DGMT(408.31,+$$FUT^DGMTU(DFN,"",DGMTYPT),0)),+$P($G(^(2)),U,5)=VSITE S DIC("B")=$P(^(0),"^"),FUTFLG=1
22 I 'FUTFLG I $D(^DGMT(408.31,+$$LST^DGMTU(DFN,"",DGMTYPT),0)) S DIC("B")=$P(^(0),"^")
23 S DIC("S")="I $P(^(0),U,2)=DFN,$P(^(0),U,19)=DGMTYPT"
24 S:DGMTYPT'=4 DIC("S")=DIC("S")_" I $G(^(""PRIM""))!($P(^(0),U,1)>DT)"
25 S DIC="^DGMT(408.31,",DIC(0)="EQZ" W ! D EN^DGMTLK K DIC G Q:Y<0
26 S DGMTI=+Y,DGMTDT=$P(Y,"^",2),DGMT0=Y(0)
27 ;
28 ;If test is uneditable, print error message and allow user to view test
29 ;or print 10-10EZ/EZR
30 ;
31 I '$P($G(^DG(408.34,+$P(Y(0),U,23),0)),U,2) D D:$G(DGMTERR) VIEWPRT G EN
32 .W !!?3,*7,"Warning: Uneditable "_$S(DGMTYPT=1:"means",1:"copay")_" test. The source of this test is "_$S($$SR^DGMTAUD1(Y(0))]"":$$SR^DGMTAUD1(Y(0)),1:"UNKNOWN")
33 .W !?12,"which has been flagged as an uneditable source.",!
34 .S DIR("A")="Would you like to view the "_$S(DGMTYPT=1:"means",1:"copay")_" test or print the 10-10EZR/EZ",DIR("B")="NO",DIR(0)="Y"
35 .D ^DIR K DIR S DGMTERR=Y I $D(DTOUT)!($D(DUOUT)) K DGMTERR,DTOUT,DUOUT
36 I "^3^10^"[("^"_$P(Y(0),"^",3)_"^") W !?3,*7,$S(DGMTYPT=1:"Means",1:"Copay")_" test is NO LONGER "_$S(DGMTYPT=1:"REQUIRED",1:"APPLICABLE")_", it cannot be edited." G EN
37 I DGMTYPT=4,$P($G(^DGMT(408.31,DGMTI,2)),U,8) D I $G(DGOUT) K DGOUT G EN
38 .N DGMT,DGT S DGMT=$P(^DGMT(408.31,DGMTI,2),U,8),DGT=$P($G(^DGMT(408.31,DGMT,0)),U,19)
39 .I DGT,DGT>2 Q
40 .W !!,?3,"This LTC copay exemption test is linked to the ",$$FTIME^DGMTUTL(+^DGMT(408.31,DGMT,0)),$S(DGT=1:" means",1:" RX copay")," test."
41 .W !,?3,"Changes should be made using the 'Edit an Existing ",$S(DGT=1:"Means",1:"Copay Exemption")," Test'"
42 .W !,?3,"menu option."
43 .S DGOUT=1
44 D DISPLAY^DGMTU23(DGMTI,DGMTYPT),PAUSE I $D(DTOUT)!($D(DUOUT)) K DTOUT,DUOUT G EN
45 ;
46 ;hardship determination, once granted, will remain unless deleted by
47 ;hardship option
48 ;I $P(DGMT0,"^",20),'$$EDIT() G EN ; if hardship
49 ;
50 S DGMTACT="EDT",DGMTROU="EN^DGMTE" G EN^DGMTSC
51 ;
52Q K DFN,DGMTACT,DGMTDT,DGMTERR,DGMT0,DGMTI,DGMTROU,DGMTYPT,DGMTX,DGOUT,DTOUT,DUOUT,X,Y
53 ;
54 ; release lock used to synchronize local MT/CT options with income test upload
55 I $D(DGMTDFN)#2 D UNLOCK^DGMTUTL(DGMTDFN) K DGMTDFN
56 Q
57 ;
58PAUSE S DIR(0)="E" D ^DIR
59 Q
60 ;
61VIEWPRT ; Select 1 to view an uneditable means test or 2 to print a 10-10EZ/EZR
62 ;
63 S DIR(0)="S^1:View Means Test;2:Print Means Test 10-10EZR/EZ",DIR("A")="Select Choice"
64 D ^DIR S DGMTANS=Y G:$D(DTOUT)!($D(DUOUT)) VIEWPRTQ
65 I DGMTANS=1 D EN1^DGMTV
66 I DGMTANS=2 D
67 .N RPTSEL,DGTASK
68 .D FULL^VALM1
69 .S (RPTSEL,DGTASK)=""
70 .I $D(DGFINOP) DO
71 ..W !!,"Options for printing financial assessment information will follow."
72 ..W !,"Generally, you should answer 'YES' to 'PRINT 10-10EZR?' after updating"
73 ..W !,"patient demographic or financial information. Answer 'YES' to 'PRINT"
74 ..W !,"10-10EZ?' after entering new patient demographic and financial information."
75 .S RPTSEL=$$SEL1010^DG1010P("EZR/EZ") ;*Select 1010EZ/R form to print
76 .S:RPTSEL'="-1" DGTASK=$$PRT1010^DG1010P(RPTSEL,DFN,DGMTI) ;*Print 1010EZ/R
77 ;
78VIEWPRTQ ;
79 K DGMTANS,DIR,DTOUT,DUOUT,Y
80 Q
81 ;
82EDIT() ; want to edit even though MT is hardship?
83 ;
84 ; Output: 1 if user wants to edit, 0 otherwise
85 ;
86 N DIR,DTOUT,DUOUT,DIRUT,DIROUT,I,X,Y
87 S DIR("?",1)="WARNING: You are about to access a means test for which a hardship has"
88 S DIR("?",2)=" been authorized. If you proceed, the hardship will be removed"
89 S DIR("?",3)=" and the means test category will be recalculated! To avoid"
90 S DIR("?",4)=" this problem, enter NO at the next prompt and use the 'View"
91 S DIR("?",5)=" a Past Means Test' option should you need to see details of"
92 S DIR("?",6)=" this means test."
93 S DIR("?",7)=" "
94 S DIR("?")="Enter NO to stop editing this means test. Enter YES to continue"
95 F I=1:1 Q:'$D(DIR("?",I)) W !,DIR("?",I)
96 S DIR("A")="Do you want to continue editing this means test? ",DIR("B")="NO",DIR(0)="YA"
97 D ^DIR
98 Q Y
Note: See TracBrowser for help on using the repository browser.