source: FOIAVistA/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASMTL8.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 3.8 KB
Line 
1EASMTL8 ;618/TCM ALB/SCK/PHH - AUTOMATED MEANS TEST LETTER, 20-DAY REPORT OF CONTACT FORM ; 07/17/01
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**3,54**;MAR 15,2001
3 ;
4QUE ;
5 N EASTMP,DIR,DUOUT,DTOUT,DIRUT
6 ;
7 S EASTMP="^TMP(""EASROC"",$J)"
8 K @EASTMP
9 ;
10START ;
11 S DIR(0)="PAO^713.2:EMZ",DIR("A")="Select Patient: "
12 S DIR("?")="Select patient or press ENTER when finished"
13 D ^DIR K DIR
14 Q:$D(DUOUT)!($D(DTOUT))
15 S @EASTMP@(+Y)=""
16 I '$D(DIRUT) G START
17END ;
18 S ZTSAVE("EASTMP")=""
19 D EN^XUTMDEVQ("PRINT^EASMTL8","EAS MT REPORT OF CONTACTS",.ZTSAVE)
20 Q
21 ;
22PRINT ;
23 N EASIEN
24 ;
25 S EASIEN=0
26 F S EASIEN=$O(@EASTMP@(EASIEN)) Q:'EASIEN D Q:$D(DIRUT)
27 . D FORM(EASIEN)
28 . I $E(IOST,1,2)="C-" D
29 . . S DIR(0)="E"
30 . . D ^DIR K DIR
31 . . I 'Y S DIRUT=1
32 . . W @IOF
33 K @EASTMP
34 Q
35 ;
36FORM(EASIEN) ; Print 20 day form
37 N DFN,EASDEM,EASADD,EASHDR,EASFAC,EASLIEN,ULC,ULNE,EASANV,LINE,EASOK,EASDEV,XL,EAX,EASPTR
38 ;
39 S EASANV=$$GET1^DIQ(713.2,EASIEN,3,"I")
40 S EASPTR=$$GET1^DIQ(713.2,EASIEN,2,"I")
41 S DFN=$$GET1^DIQ(713.1,EASPTR,.01,"I")
42 D GETPAT^EASMTL6A(DFN,.EASDEM,.EASADD)
43 D GETFAC^EASMTL6(DFN,.EASFAC)
44 ;
45 ; Merge FileMan data arrays into more usable formats
46 M EASHDR("F")=EASFAC
47 M EASHDR("D")=EASDEM
48 M EASHDR("A")=EASADD
49 ;
50 D HDR(.EASHDR)
51 ;
52 W !?5,"Means Test Anniversary Date: ",$$FMTE^XLFDT($$ADDLEAP^EASMTUTL(EASANV),"D")
53 ;
54 S EASLIEN=$O(^EAS(713.3,"C",3,0))
55 Q:'EASLIEN
56 S EALNE=0
57 I $D(^EAS(713.3,EASLIEN,1)) D S EASOK=1
58 . F S EALNE=$O(^EAS(713.3,EASLIEN,1,EALNE)) Q:'EALNE D
59 . . S LINE=^EAS(713.3,EASLIEN,1,EALNE,0)
60 . . I LINE["|ANNVDT|" W !?6,$P(LINE,"|ANNVDT|",1)," ",$$FMTE^XLFDT(EASANV,"D"),$P(LINE,"|ANNVDT|",2) Q
61 . . W !?6,LINE
62 ;
63 I $D(^EAS(713.3,EASLIEN,2)) D S EASOK=1
64 . S EALNE=0
65 . F S EALNE=$O(^EAS(713.3,EASLIEN,2,EALNE)) Q:'EALNE D
66 . . S LINE=^EAS(713.3,EASLIEN,2,EALNE,0)
67 . . W !,LINE
68 ;
69 F EAX=0:0 Q:($Y+8)>IOSL W !
70 W ! F XL=1:1:IOM-1 W "-"
71 W !,"| Division or Section",?40,"| Executed By (signature and title)",?(IOM-1),"|"
72 W !,"|",?40,"|",?(IOM-1),"|"
73 W !,"|",?40,"|",?(IOM-1),"|"
74 W ! F XL=1:1:IOM-1 W "-"
75 W !,?40,"PRINTED: ",$$FMTE^XLFDT($$NOW^XLFDT,"P")
76 Q
77 ;
78HDR(EASHDR) ; Print form header for report of contact
79 ; Input
80 ; EASHDR - Header information array
81 ;
82 N EALNE,EAX,TS1,TS2,TS3,TS4
83 ;
84 Q:'$D(EASHDR)
85 D SETLNE(.EALNE)
86 ;
87 S TS2=40,TS3=58,TS4=$G(IOM)-1
88 ;W $E(EALNE("DD"),1,IOM)
89 W !,"D E P A R T M E N T O F V E T E R A N A F F A I R S"
90 W !,$E(EALNE("DD"),1,IOM)
91 W !,"| REPORT OF CONTACT",?TS2,"| VA Office",?TS3,"| Identification No.",?TS4,"|"
92 W !,"| Note: This form must be filled out in",?TS2,"|",?TS3,"| ",?TS4,"|"
93 W !,"| ink or on typewriter as it becomes a"
94 W ?TS2,"| ",?TS3,"| ",$P(EASHDR("D",2),U,2),?TS4,"|"
95 W !,"| permanent record in veterans' folders.",?TS2,"|",?TS3,"|",?TS4,"|"
96 W !,$E(EALNE("D"),1,TS4)
97 W !,"| Last Name-First Name-Middle Name (Type or print)",?TS3,"| Date of Contact",?TS4,"|"
98 W !,"|",?TS3,"|",?TS4,"|"
99 W !,"| ",EASHDR("D",1),?TS3,"|",?TS4,"|"
100 W !,$E(EALNE("D"),1,TS4)
101 W !,"| Address of Veteran",?TS3,"| Telephone",?TS4,"|"
102 W !,"| ",EASHDR("A",1),?TS3,"| ",EASHDR("A",8),?TS4,"|"
103 I EASHDR("A",2)]"" W !,"| ",EASHDR("A",2),?TS3,"|",?TS4,"|"
104 I EASHDR("A",3)]"" W !,"| ",EASHDR("A",3),?TS3,"|",?TS4,"|"
105 W !,"| ",EASHDR("A",4)_", "_$P(EASHDR("A",5),U,2)_" "_$P(EASHDR("A",11),U,2),?TS3,"|",?TS4,"|"
106 W !,$E(EALNE("D"),1,TS4)
107 W !,"| Person Contacted",?TS3,"| Type of Contact",?TS4,"|"
108 W !,"|",?TS3,"| Personal/Telephone",?TS4,"|"
109 W !,"|",?TS3,"|",?TS4,"|"
110 W !,$E(EALNE("D"),1,TS4)
111 W !,"| Address of Person Contacted",?TS3,"| Telephone",?TS4,"|"
112 W !,"|",?TS3,"|",?TS4,"|"
113 W !,"|",?TS3,"|",?TS4,"|"
114 W !,"|",?TS3,"|",?TS4,"|"
115 W !,$E(EALNE("D"),1,TS4)
116 W !," Brief statement of information requested and given",!
117EXIT Q
118 ;
119 ;
120SETLNE(EALNE) ;
121 N RMAR
122 ;
123 S RMAR=$G(IOM) S:'RMAR RMAR=80
124 S EALNE("D")="",EALNE("DD")="",EALNE("UL")=""
125 S $P(EALNE("D"),"-",RMAR)=""
126 S $P(EALNE("DD"),"=",RMAR)=""
127 Q
Note: See TracBrowser for help on using the repository browser.