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

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

initial load of WorldVistAEHR

File size: 6.1 KB
Line 
1VAFCMGB3 ;ALB/JRP,LTL,PTD-DEMOGRAPHIC MERGE SCREENS ;07/10/98
2 ;;5.3;Registration;**149,477,479**;Aug 13, 1993
3 ;
4 ;NOTE: This routine contains line tags used to build the display
5 ; screen for a List Manager interface. Refer to routine
6 ; VAFCMGB for a description of input/output variables.
7 ;
8GROUP4 ;Line tag to build logical group number four
9 ;
10 ;Group group contains the following fields
11 ; .301, .302, .323, 391, 1901
12 ;
13 ;Column width is limited to 29 characters
14 ;
15 ;Declare variables
16 N IENS,TARGET,MESSAGE,LINE,DATA,LOCAL,REMOTE,DIFF
17 S TARGET="^TMP(""VAFC-MERGE-TO"","_$J_",""DATA"")"
18 S MESSAGE="^TMP(""VAFC-MERGE-TO"","_$J_",""MESSAGE"")"
19 ;Initialize global locations
20 K @TARGET,@MESSAGE
21 ;Set group index
22 S @VALMAR@("GRP",4)=VALMCNT
23 ;Get local data for patient
24 D GETDATA^VAFCMGU0(VAFCDFN,4,TARGET,MESSAGE)
25 ;Build display
26 S IENS=VAFCDFN_","
27 ;Patient Type
28 ;S LOCAL=$$LOCAL^VAFCMGB0(2,391,IENS,TARGET) ;**477
29 ;S LOCAL=$E(LOCAL,1,29)
30 ;S REMOTE=$$REMOTE^VAFCMGB0(2,391)
31 ;S REMOTE=$E(REMOTE,1,29)
32 ;S DIFF=$$DIFFCHK^VAFCMGB0(2,391,IENS,TARGET)
33 ;S LINE=$S(DIFF:"**",1:" ")
34 ;S:DIFF&($P($G(@VAFCARR@(2,391)),U,2)) LINE="->"
35 ;S DATA="Type: "_LOCAL
36 ;S LINE=$$INSERT^VAFCMGU0(DATA,LINE,11)
37 ;S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
38 ;S @VALMAR@("IDX",VALMCNT,18)=""
39 ;I (DIFF) D
40 ;.S @VALMAR@("E2F",19,1)="2^391"
41 ;.S @VALMAR@("E2G",19)=4
42 ;I ('DIFF) D
43 ;.K @VALMAR@("E2F",19)
44 ;.K @VALMAR@("E2G",19)
45 ;W:(+$G(VAFCDOTS)) "."
46 ;S VALMCNT=VALMCNT+1
47 ;Veteran
48 S LOCAL=$$LOCAL^VAFCMGB0(2,1901,IENS,TARGET)
49 S LOCAL=$E(LOCAL,1,29)
50 S REMOTE=$$REMOTE^VAFCMGB0(2,1901)
51 S REMOTE=$E(REMOTE,1,29)
52 S DIFF=$$DIFFCHK^VAFCMGB0(2,1901,IENS,TARGET)
53 S LINE=$S(DIFF:"**",1:" ")
54 S:DIFF&($P($G(@VAFCARR@(2,1901)),U,2)) LINE="->"
55 S DATA="Veteran: "_LOCAL
56 S LINE=$$INSERT^VAFCMGU0(DATA,LINE,8)
57 S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
58 S (@VALMAR@("IDX",VALMCNT,18),@VALMAR@("IDX",VALMCNT+1,18))=""
59 ;I (DIFF) D
60 ;.S @VALMAR@("E2F",20,1)="2^1901"
61 ;.S @VALMAR@("E2G",20)=4
62 ;I ('DIFF) D
63 ;.K @VALMAR@("E2F",20)
64 ;.K @VALMAR@("E2G",20)
65 W:(+$G(VAFCDOTS)) "."
66 S VALMCNT=VALMCNT+1 ;**479 changed +2 to +1
67 ;Service connected and percentage
68 S LOCAL=$$LOCAL^VAFCMGB0(2,.301,IENS,TARGET)
69 S LOCAL("SC")=$E(LOCAL,1,29)
70 S REMOTE=$$REMOTE^VAFCMGB0(2,.301)
71 S REMOTE("SC")=$E(REMOTE,1,29)
72 S DIFF=$$DIFFCHK^VAFCMGB0(2,.301,IENS,TARGET)
73 S LOCAL("SC%")=$$LOCAL^VAFCMGB0(2,.302,IENS,TARGET)
74 S REMOTE("SC%")=$$REMOTE^VAFCMGB0(2,.302)
75 S:('DIFF) DIFF=$$DIFFCHK^VAFCMGB0(2,.302,IENS,TARGET)
76 S:((LOCAL("SC%")="<No Data Found>")&(LOCAL("SC")="NO")) LOCAL("SC%")="N/A"
77 S:((REMOTE("SC%")="<No Data Found>")&(REMOTE("SC%")="NO")) REMOTE("SC%")="N/A"
78 S REMOTE("SC")=REMOTE("SC")_" "_REMOTE("SC%")
79 S LINE=$S(DIFF:"**",1:" ")
80 S:DIFF&($P($G(@VAFCARR@(2,.301)),U,2)) LINE="->"
81 S DATA="SC: "_LOCAL("SC")_" SC%: "_LOCAL("SC%")
82 S LINE=$$INSERT^VAFCMGU0(DATA,LINE,13)
83 S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE("SC"),LINE,50)
84 ;S DATA="SC %: "_LOCAL("SC%")
85 ;S LINE=$$INSERT^VAFCMGU0(DATA,"",11)
86 ;S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE("SC%"),LINE,54)
87 S @VALMAR@("IDX",VALMCNT,18)=""
88 ;S @VALMAR@("IDX",VALMCNT+1,21)=""
89 ;S @VALMAR@("IDX",VALMCNT+2,21)=""
90 ;I (DIFF) D
91 ;.S @VALMAR@("E2F",21,1)="2^.301"
92 ;.S @VALMAR@("E2F",21,2)="2^.302"
93 ;.S @VALMAR@("E2G",21)=4
94 ;I ('DIFF) D
95 ;.K @VALMAR@("E2F",21)
96 ;.K @VALMAR@("E2G",21)
97 W:(+$G(VAFCDOTS)) "."
98 S VALMCNT=VALMCNT+1
99 ;Period of service
100 S LOCAL=$$LOCAL^VAFCMGB0(2,.323,IENS,TARGET)
101 S LOCAL=$E(LOCAL,1,29)
102 S REMOTE=$$REMOTE^VAFCMGB0(2,.323)
103 S REMOTE=$E(REMOTE,1,29)
104 S DIFF=$$DIFFCHK^VAFCMGB0(2,.323,IENS,TARGET)
105 S LINE=$S(DIFF:"**",1:" ")
106 S:DIFF&($P($G(@VAFCARR@(2,.323)),U,2)) LINE="->"
107 S DATA="POS: "_LOCAL
108 S LINE=$$INSERT^VAFCMGU0(DATA,LINE,12)
109 S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
110 S @VALMAR@("IDX",VALMCNT,18)=""
111 ;I (DIFF) D
112 ;.S @VALMAR@("E2F",22,1)="2^.323"
113 ;.S @VALMAR@("E2G",22)=4
114 ;I ('DIFF) D
115 ;.K @VALMAR@("E2F",22)
116 ;.K @VALMAR@("E2G",22)
117 W:(+$G(VAFCDOTS)) "."
118 S VALMCNT=VALMCNT+1
119 ;Primary Eligibility Code
120 S LOCAL=$$LOCAL^VAFCMGB0(2,.361,IENS,TARGET)
121 S REMOTE=$$REMOTE^VAFCMGB0(2,.361)
122 S DIFF=$$DIFFCHK^VAFCMGB0(2,.361,IENS,TARGET)
123 S LINE=$S(DIFF:"**",1:" ")
124 S:DIFF&($P($G(@VAFCARR@(2,.361)),U,2)) LINE="->"
125 S DATA="Prim Elig Code: "_LOCAL
126 S LINE=$$INSERT^VAFCMGU0(DATA,LINE,3)
127 S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
128 S @VALMAR@("IDX",VALMCNT,18)=""
129 S VALMCNT=VALMCNT+1
130 ;Date of eligibility status
131 S LOCAL=$$LOCAL^VAFCMGB0(2,.3612,IENS,TARGET)
132 S REMOTE=$$FMTE^XLFDT($$REMOTE^VAFCMGB0(2,.3612),1)
133 S DIFF=$$DIFFCHK^VAFCMGB0(2,.3612,IENS,TARGET)
134 S LINE=$S(DIFF:"**",1:" ")
135 S:DIFF&($P($G(@VAFCARR@(2,.3612)),U,2)) LINE="->"
136 S DATA="Date Verified: "_LOCAL
137 S LINE=$$INSERT^VAFCMGU0(DATA,LINE,3)
138 S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
139 S @VALMAR@("IDX",VALMCNT,18)=""
140 S VALMCNT=VALMCNT+1
141 ;Verification method
142 S LOCAL=$$LOCAL^VAFCMGB0(2,.3615,IENS,TARGET)
143 S REMOTE=$$REMOTE^VAFCMGB0(2,.3615)
144 S DIFF=$$DIFFCHK^VAFCMGB0(2,.3615,IENS,TARGET)
145 S LINE=$S(DIFF:"**",1:" ")
146 S:DIFF&($P($G(@VAFCARR@(2,.3615)),U,2)) LINE="->"
147 S DATA="Verification method: "
148 S LINE=$$INSERT^VAFCMGU0(DATA,LINE,3)
149 S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0("",LINE,50)
150 S @VALMAR@("IDX",VALMCNT,18)=""
151 S VALMCNT=VALMCNT+1
152 S LINE="",LINE=$$INSERT^VAFCMGU0(LOCAL,LINE,3)
153 S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
154 S @VALMAR@("IDX",VALMCNT,18)=""
155 S VALMCNT=VALMCNT+1
156 ;Who verified locally (no remote data sent)
157 S LOCAL=$$LOCAL^VAFCMGB0(2,.3616,IENS,TARGET)
158 S REMOTE="<Not Available>"
159 S LINE=" "
160 S DATA="Who verified: "_LOCAL
161 S LINE=$$INSERT^VAFCMGU0(DATA,LINE,3)
162 S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
163 S @VALMAR@("IDX",VALMCNT,18)=""
164 S VALMCNT=VALMCNT+1
165 ;If PATIENT ELIGIBILITIES multiple contains EMPLOYEE, display local data (no remote data sent).
166 S LOCAL=$O(^DIC(8,"B","EMPLOYEE",0)) I LOCAL D
167 .Q:'$D(^DPT(VAFCDFN,"E",LOCAL,0))
168 .;Else patient is an employee
169 .S REMOTE="<Not Available>",LINE=" ",DATA="Other Eligibility: EMPLOYEE"
170 .S LINE=$$INSERT^VAFCMGU0(DATA,LINE,3)
171 .S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
172 .S @VALMAR@("IDX",VALMCNT,18)=""
173 ;Done - cleanup global locations used
174 K @TARGET,@MESSAGE
175 Q
Note: See TracBrowser for help on using the repository browser.