source: FOIAVistA/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLDIE773.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 5.7 KB
Line 
1HLDIE773 ;CIOFO-O/LJA - Direct 772 & 773 Sets ; 11/18/2003 11:17
2 ;;1.6;HEALTH LEVEL SEVEN;**109,115**;Oct 13,1995
3 ;
4 ;
5F301 ; 773 - .01 - 0;1 [B] - DATE/TIME ENTERED
6 D UPD^HLDIE772(0,1,VALUE)
7 S XRF("B")=""
8 Q
9 ;
10F32 ; 773 - 2 - 0;2 [C,AH] - MESSAGE ID
11 D UPD^HLDIE772(0,2,VALUE)
12 S XRF("C")="",XRF("AH")=""
13 Q
14 ;
15F3202 ; 773 - 2.02 - 2;2 - FAST PURGE DT/TM
16 ; Only fire ^HLMA(AI) xref when STATUS is changed...
17 D UPD^HLDIE772(2,2,VALUE)
18 Q
19 ;
20F33 ; 773 - 3 - 0;3 - TRANSMISSION TYPE
21 D UPD^HLDIE772(0,3,VALUE)
22 Q
23 ;
24F34 ; 773 - 4 - 0;4 - PRIORITY
25 D UPD^HLDIE772(0,4,VALUE)
26 Q
27 ;
28F35 ; 773 - 5 - 0;5 - HEADER TYPE
29 D UPD^HLDIE772(0,5,VALUE)
30 Q
31 ;
32F36 ; 773 - 6 - 0;6 [AF] - INITIAL MESSAGE
33 D UPD^HLDIE772(0,6,VALUE)
34 S XRF("AF")=""
35 Q
36 ;
37F37 ; 773 - 7 - 0;7 [AC] - INITIAL MESSAGE
38 ; Under no circumstances should DD create AC; only by package!
39 D UPD^HLDIE772(0,7,VALUE)
40 Q
41 ;
42F38 ; 773 - 8 - 0;8 - SUBSCRIBER PROTOCOL
43 D UPD^HLDIE772(0,8,VALUE)
44 Q
45 ;
46F39 ; 773 - 9 - 0;9 - SECURITY
47 D UPD^HLDIE772(0,9,VALUE)
48 Q
49 ;
50F310 ; 773 - 10 - 2;1 - DON'T PURGE
51 D UPD^HLDIE772(2,1,VALUE)
52 Q
53 ;
54F311 ; 773 - 11 - 1;1 - CONTINUATION POINTER
55 D UPD^HLDIE772(1,1,VALUE)
56 Q
57 ;
58F312 ; 773 - 12 - 0;10 - ACKNOWLEDGEMENT TO
59 D UPD^HLDIE772(0,10,VALUE)
60 Q
61 ;
62F313 ; 773 - 13 - 0;11 - SENDING APPLICATION
63 D UPD^HLDIE772(0,11,VALUE)
64 Q
65 ;
66F314 ; 773 - 14 - 0;12 [ae->AH] - RECEIVING APPLICATION
67 D UPD^HLDIE772(0,12,VALUE)
68 S XRF("AH")=""
69 Q
70 ;
71F315 ; 773 - 15 - 0;13 - MESSAGE TYPE
72 D UPD^HLDIE772(0,13,VALUE)
73 Q
74 ;
75F316 ; 773 - 16 - 0;14 - EVENT TYPE
76 D UPD^HLDIE772(0,14,VALUE)
77 Q
78 ;
79F320 ; 773 - 20 - P;1 [AG,AI(index)] - STATUS
80 N LINK,WAY
81 ;
82 D UPD^HLDIE772("P",1,VALUE)
83 S XRF("AG")="",XRF("AI")=""
84 ;
85 ; Quit if status isn't being set to SUCCESSFULLY COMPLETED...
86 QUIT:VALUE'=3 ;->
87 ;
88 ; Get AC's logical link IEN from new field...
89 S WAY=$P($G(NODE(0,0)),U,3) QUIT:WAY']"" ;->
90 ;
91 S LINK=$S(WAY="O":$P($G(NODE(0,0)),U,7),1:$P($G(NODE(0,0)),U,17)) QUIT:LINK'>0 ;->
92 QUIT:+$G(IEN)'>0 ;->
93 ;
94 KILL ^HLMA("AC",WAY,LINK,+IEN)
95 ;
96 Q
97 ;
98F321 ; 773 - 21 - P;2 - STATUS UPDATE DATE/TIME
99 D UPD^HLDIE772("P",2,VALUE)
100 Q
101 ;
102F322 ; 773 - 22 - P;3 - ERROR MESSAGE
103 D UPD^HLDIE772("P",3,VALUE)
104 Q
105 ;
106F323 ; 773 - 23 - P;4 - ERROR TYPE
107 D UPD^HLDIE772("P",4,VALUE)
108 Q
109 ;
110F324 ; 773 - 24 - P;5 - TRANSMISSION ATTEMPTS
111 D UPD^HLDIE772("P",5,VALUE)
112 Q
113 ;
114F325 ; 773 - 25 - P;6 - OPEN ATTEMPTS
115 D UPD^HLDIE772("P",6,VALUE)
116 Q
117 ;
118F326 ; 773 - 26 - P;7 - ACK TIMEOUT
119 D UPD^HLDIE772("P",7,VALUE)
120 Q
121 ;
122F3100 ; 773 - 100 - S;1 [AD] - DATE/TIME PROCESSED
123 ; Only fire ^HLMA(AI) xref when STATUS is changed...
124 D UPD^HLDIE772("S",1,VALUE)
125 S XRF("AD")=""
126 Q
127 ;
128F3200 ; 773 - 200 - MSH - MSH
129 ; VALUE is set in EDITALL^HLDIE to the name of the local array
130 ; holding the MSH segment. Use it...
131 N NO,TXT
132 ;
133 ; Set MSH itself into global...
134 S NO=0,NO(1)=""
135 F S NO=$O(@VALUE@(NO)) Q:NO'>0 D
136 . S TXT=$G(@VALUE@(NO)) QUIT:TXT']"" ;->
137 . S ^HLMA(+IEN,"MSH",NO,0)=TXT
138 . S NO(1)=NO
139 ;
140 ; Add MSH header...
141 S ^HLMA(+IEN,"MSH",0)="^773.01^"_NO(1)_"^"_NO(1)
142 ;
143 Q
144 ;
145 ; =================================================================
146 ;
147XRFAC ; AC XRF kills/sets...
148 ; Under no circumstances should DD create AC; only by package!
149 Q
150 ;
151XRFAD ; AD XRF kills/sets...
152 D XRFSET^HLDIE772(FILE,+IEN,"AD","S",1)
153 Q
154 ;
155XRFAF ; AF XRF kills/sets...
156 D XRFSET^HLDIE772(FILE,+IEN,"AF",0,6)
157 Q
158 ;
159XRFAG ; AG XRF kills/sets...
160 D XRFSET^HLDIE772(FILE,+IEN,"AG","P",1)
161 Q
162 ;
163XRFAH ; AH XRF kills/sets...
164 D XRFSETC^HLDIE772(FILE,+IEN,"AH",0,12,0,2)
165 Q
166 ;
167XRFAI ; AI INDEX code...
168 S STATUS=$P($G(NODE("P",1)),U)
169 D PXREF^HLUOPTF1(+$G(IEN),STATUS)
170 Q
171 ;
172XRFB ; B XRF kills/sets...
173 D XRFSET^HLDIE772(FILE,+IEN,"B",0,1)
174 Q
175 ;
176XRFC ; C XRF kills/sets...
177 D XRFSET^HLDIE772(FILE,IEN,"C",0,2)
178 Q
179 ;
180XRFFPD(IEN772,FPDOLD,FPDNEW) ; This API is called by XRFFPD^HLDIE772 when
181 ; a 772 Fast Purge Date/time has been changed.
182 ;
183 ; ASSUMPTION: The Fast Purge Date/time should be the same in both
184 ; 772 and 773 entries.
185 ;
186 ; ASSUMPTION: If the Fast Purge Date/time is changed in 773, the
187 ; same value should be "echoed" (set into) file 772.
188 ; and vice versa.
189 ;
190 ; ASSUMPTION: The Fast Purge Date/time will NEVER be set unless
191 ; the STATUS of both 772 and 773 entries is equal to
192 ; SUCCESSFULLY COMPLETED. (For this reason, the status
193 ; will never be checked.
194 ;
195 ; The purpose of this call from 772 is to...
196 ;
197 ; * Kill all ^HLMA("AI") xrefs using the old Fast Purge Date/time
198 ; for both files 772 and 773.
199 ; * Reset the Fast Purge Date/time in all 773 entries associated with
200 ; the 772 entry whose Fast Purge Date/time field was just changed.
201 ; * Recreate the ^HLMA("AI") xrefs based on the new Fast Purge
202 ; Date/time.
203 ;
204 N IEN773
205 ;
206 ; Checks of data... (Code commented per Jim Moore's suggestion. LJA)
207 ; QUIT:$G(^HL(772,+IEN772,0))']"" ;->
208 ; QUIT:FPDOLD'?7N1"."1.N ;-> Check the original Fast Purge Date/time...
209 ; QUIT:FPDNEW'?7N1"."1.N ;-> Check the new date...
210 ; QUIT:FPDOLD=FPDNEW ;-> No change!
211 ;
212 ; Kill old 772 AI entry...
213 KILL ^HLMA("AI",FPDOLD,772,+IEN772) ; Kill 772 parent AI...
214 ;
215 ; Remove old 773 entries...
216 S IEN773=0
217 F S IEN773=$O(^HLMA("B",+IEN772,IEN773)) Q:'IEN773 D
218 . KILL ^HLMA("AI",FPDOLD,773,+IEN773) ; Kill 773 child AI...
219 . S $P(^HLMA(+IEN773,2),U,2)=FPDNEW ; Set 773 to match 772...
220 ;
221 ; Now, all AI xrefs killed, and the Fast Purge Date/time in both 772
222 ; and 773 are set to the new value, so set the new xrefs...
223 S IEN773=0
224 F S IEN773=$O(^HLMA("B",+IEN772,IEN773)) Q:'IEN773 D
225 . D PXREF^HLUOPTF1(+IEN773,3)
226 ;
227 Q
228 ;
229XRFLLCT ; LLCNT^HLCSTCP(IEN870,3) XRF kills/sets...
230 ;XXX D LLCNT^HLCSTCP(IEN870,3)
231 Q
232 ;
233EOR ;HLDIE773 - Direct 772 & 773 Sets ; 11/18/2003 11:17
Note: See TracBrowser for help on using the repository browser.