source: WorldVistAEHR/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASEC10E.m@ 701

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

initial load of WorldVistAEHR

File size: 5.0 KB
RevLine 
[613]1EASEC10E ;ALB/BRM,LBD - Print 1010EC LTC Enrollment form ; 9/20/01 1:46pm
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**5,40**;Mar 15, 2001
3 ;
4 ; The EASEC10* routines print a version of the OMB approved
5 ; VA10-10EC form (Long Term Care).
6 ;
7 ; No Local modifications to these routines will be made. Any changes
8 ; will be provided through the National Patch Module release process.
9 ;
10 Q
11OEN ;Entry point to print an LTC Co-Pay test from the menu option
12 ;
13 N DIC,DFN,DGMTI,ZTSK,DGMSGF
14 S DGMSGF=1 ;this flag is set to suppress the financial query
15 S DIC("S")="I $D(^DGMT(408.31,""AID"",3,+Y))"
16 S DIC="^DPT(",DIC(0)="AEMQ" W ! D ^DIC K DIC G Q:Y<0 S DFN=+Y
17 S DIC("A")="Select DATE OF TEST: "
18 I $D(^DGMT(408.31,+$$LST^EASECU(DFN,"",3),0)) S DIC("B")=$P(^(0),"^")
19 S DIC("S")="I $P(^(0),U,2)=DFN,$P(^(0),U,19)=3"
20 S DIC="^DGMT(408.31,",DIC(0)="EQZ" W ! D EN^DGMTLK K DIC G Q:Y<0
21 S DGMTI=+Y
22 S ZTSK=$$QUE(DFN,DGMTI)
23Q Q
24QUE(DFN,DGMTIEN) ; queue the 1010EC print job
25 ; Input:
26 ; DFN - Internal entry number for the #2 (Patient) file
27 ; Output:
28 ; ZTSK - Task Number returned from call to Task Manager
29 ;
30 N ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK,ZUSR,POP,X,ERR
31 W !!?5,$C(7),"This output requires a 132 column printer."
32 W !?5,"Output to SCREEN will be unreadable.",!
33 K IOP,%ZIS
34 S %ZIS="Q" D ^%ZIS G:POP EXIT
35 I $D(IO("Q")) D Q +$G(ZTSK)
36 .S ZTSAVE("ZUSR")=+$G(DUZ)
37 .S ZTRTN="EN^EASEC10E("_DFN_","_$G(DGMTIEN)_")",ZTDESC="1010EC PRINT"
38 .D ^%ZTLOAD
39 .D ^%ZISC,HOME^%ZIS
40 .W !,$S($D(ZTSK):"REQUEST QUEUED!",1:"REQUEST CANCELLED!")
41 D EN(DFN,$G(DGMTIEN))
42EXIT D ^%ZISC,HOME^%ZIS
43 Q +$G(ZTSK)
44 ;
45EN(EASDFN,DGMTIEN) ; Entry point to print the 1010EC form
46 ; Input:
47 ; EASDFN - Internal entry number for the #2 (Patient) file
48 ; DTMTDT - Date of Long Term Care Test to print
49 ; DGMTIEN - IEN of the Long term Care test in the #408.31 file
50 ;
51 U IO
52 Q:'$G(EASDFN)
53 N EALNE,EAINFO
54 S:$G(DGMTIEN) EAINFO("DGMTIEN")=DGMTIEN
55 ; set-up print variables
56 D SETUP(.EALNE,.EAINFO,EASDFN)
57 ; get veteran data to be printed
58 D GETDATA^EASEC100(EASDFN,.EAINFO)
59 ; print page 1
60 D PAGE1^EASEC101(.EALNE,.EAINFO,EASDFN)
61 ; print pages 2 and 3
62 I $G(EAINFO("FORM")) D G ENQUIT
63 .; new 10-10EC format (LTC Phase IV - EAS*1*40)
64 .D PAGE2^EASEC10R(.EALNE,.EAINFO,EASDFN)
65 .D PAGE3^EASEC10R(.EALNE,.EAINFO,EASDFN)
66 E D
67 .; old 10-10EC format
68 .D PAGE2^EASEC102(.EALNE,.EAINFO,EASDFN)
69 .D PAGE3^EASEC103(.EALNE,.EAINFO,EASDFN)
70 ;
71ENQUIT ; cleanup temp globals after printing has completed
72 K ^TMP("1010EC",$J,EASDFN)
73 Q
74 ;
75SETUP(EALNE,EAINFO,EASDFN) ;setup print variables
76 ; Input:
77 ; EALNE - Line format array
78 ; EAINFO - Misc data array
79 ; ("CLRK") - Clerk's Initials
80 ; ("PGE") - Page number
81 ; ("PD") - Print Date
82 ; ("VET") - Veteran's Name
83 ; ("SSN") - Veteran's SSN
84 ; ("MTDT") - Long Term Care Test date
85 ; ("DGMTIEN") - ien of LTC Test in 408.31
86 ; EASDFN - DFN of applicant in the Patient file (#2)
87 ;
88 N X,SSN
89 ;
90 ;Build Line array for printout
91 S EALNE("ULC")=$S('($D(IOST)#2):"-",IOST["C-":"-",1:"_")
92 S EALNE("D")="",EALNE("DD")="",EALNE("UL")=""
93 S $P(EALNE("D"),"-",131)="",$P(EALNE("DD"),"=",131)="",$P(EALNE("UL"),EALNE("ULC"),131)=""
94 S EAINFO("L")="W !,EALNE(""UL"")"
95 S:EALNE("ULC")'="-" EAINFO("L")=$TR(EAINFO("L"),"!,")
96 ;
97 ;Get clerk's initials
98 S ZUSR=$G(ZUSR)
99 S:$G(ZUSR)="" ZUSR=$G(DUZ)
100 I +ZUSR>0 D
101 .S EAINFO("CLRK")=$$GET1^DIQ(200,ZUSR,1)
102 .I EAINFO("CLRK")']"" D
103 ..S X=$$GET1^DIQ(200,ZUSR,.01)
104 ..S EAINFO("CLRK")=$E($P(X,",",2),1)_$E($P(X,","),1)
105 E D
106 .S EAINFO("CLRK")="unk"
107 ;
108 ;Get LTC Test date (if it is not passed, use latest LTC test date)
109 I $G(EAINFO("DGMTIEN")) S EAINFO("MTDT")=$$GET1^DIQ(408.31,EAINFO("DGMTIEN"),.01,"I")
110 E D ;
111 .N MTDTNEG
112 .S MTDTNEG=+$O(^DGMT(408.31,"AID",3,EASDFN,""))
113 .S EAINFO("MTDT")=$TR(MTDTNEG,"-")
114 .S EAINFO("DGMTIEN")=$O(^DGMT(408.31,"AID",3,EASDFN,MTDTNEG,""))
115 ;
116 ;Set data elements
117 S EAINFO("PGE")=0
118 S EAINFO("PD")=$$FMTE^XLFDT($$NOW^XLFDT)
119 S EAINFO("VET")=$$GET1^DIQ(2,EASDFN_",",.01)
120 S SSN=$$GET1^DIQ(2,EASDFN_",",.09)
121 S EAINFO("SSN")=$E(SSN,1,3)_"-"_$E(SSN,4,5)_"-"_$E(SSN,6,9)
122 ;Line added to set new variable to indicate which version of the
123 ;10-10EC form is to be printed. LTC Phase IV (EAS*1*40)
124 S EAINFO("FORM")=$$FORM^EASECU(EAINFO("DGMTIEN"))
125 Q
126 ;
127HDRMAIN(EALNE) ;
128 W @IOF
129 W !,EALNE("DD")
130 W !,"D E P A R T M E N T O F V E T E R A N S A F F A I R S",?90,"APPLICATION FOR EXTENDED CARE SERVICES",!,EALNE("DD")
131 W !?50,"SECTION I - GENERAL INFORMATION",!,EALNE("D")
132 Q
133 ;
134HDR(EALNE,EAINFO) ;
135 W @IOF
136 W EALNE("DD")
137 W !,"APPLICATION FOR EXTENDED CARE SERVICES, Continued"
138 W ?65,"| Veteran's Name",?100,"| Social Security Number"
139 W !?65,"| ",EAINFO("VET"),?100,"| ",EAINFO("SSN")
140 W !,EALNE("DD")
141 Q
142 ;
143FT(EALNE,EAINFO) ;
144 N %,Y
145 W !,EALNE("DD")
146 ;Modified date printed on form if new 10-10EC format.
147 ;Added for LTC Phase IV (EAS*1*40).
148 W !,"VA FORM 10-10EC DEC "_$S(EAINFO("FORM"):"2002",1:"2000"),?40,"PRINTED: ",EAINFO("PD")
149 W ?80,"Clerk: ",EAINFO("CLRK")
150 S EAINFO("PGE")=EAINFO("PGE")+1
151 W ?120,"Page ",EAINFO("PGE"),?131,$C(13)
152 Q
Note: See TracBrowser for help on using the repository browser.