source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Gateway/EntityBPEL/src/EntityDocQuery.bpel@ 507

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

NHIN gateway and adaptor for use on linux with VistA EHR and RPMS

File size: 40.6 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<process
3 name="EntityDocQuery"
4 targetNamespace="urn:gov:hhs:fha:nhinc:gateway:entitybpel:entitydocquery"
5 xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
6 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
7 xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace"
8 xmlns:sxed="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor"
9 xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling"
10 xmlns:tns="urn:gov:hhs:fha:nhinc:gateway:entitybpel:entitydocquery"
11 xmlns:nccommonent="urn:gov:hhs:fha:nhinc:common:nhinccommonentity"
12 xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
13 xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"
14 xmlns:nccommon="urn:gov:hhs:fha:nhinc:common:nhinccommon"
15 xmlns:patcorrfacade="urn:gov:hhs:fha:nhinc:common:patientcorrelationfacade"
16 xmlns:agg="urn:gov:hhs:fha:nhinc:gateway:aggregator"
17 xmlns:entcommonintorch="urn:gov:hhs:fha:nhinc:common:entitycommoninternalorch" xmlns:ns0="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns1="urn:gov:hhs:fha:nhinc:common:propertyaccess" xmlns:ns2="urn:gov:hhs:fha:nhinc:common:nhinccommonadapter" xmlns:ns3="urn:gov:hhs:fha:nhinc:common:auditlog">
18 <import namespace="urn:gov:hhs:fha:nhinc:entitydocquery" location="Interfaces/wsdl/EntityDocQuery.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
19 <import namespace="urn:gov:hhs:fha:nhinc:componentpatientcorrelationfacade" location="Interfaces/wsdl/NhincComponentPatientCorrelationFacade.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
20 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" location="Interfaces/wsdl/NhincComponentAggregator.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
21 <import namespace="urn:gov:hhs:fha:nhinc:entitycomponentinternaldocqueryorch" location="Interfaces/wsdl/EntityComponentInternalDocQueryOrch.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
22 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" location="Interfaces/wsdl/NhincComponentPropAccessor.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
23 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" location="Interfaces/wsdl/NhincComponentInternalAuditRepository.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
24 <partnerLinks>
25 <partnerLink name="PropAccessorPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" partnerLinkType="tns:NhincComponentPropAccessor" partnerRole="NhincComponentPropAccessorPortTypeRole"/>
26 <partnerLink name="AggregatorPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" partnerLinkType="tns:NhincComponentAggregator" partnerRole="NhincComponentAggregatorPortTypeRole"/>
27 <partnerLink name="PatientCorrelationPL" xmlns:tns="urn:gov:hhs:fha:nhinc:componentpatientcorrelationfacade" partnerLinkType="tns:PatientCorrelationFacadePartnerLinkType" partnerRole="PatientCorrelationPortTypeRole"/>
28 <partnerLink name="EntityCompIntDocQueryOrchPL" xmlns:tns="urn:gov:hhs:fha:nhinc:entitycomponentinternaldocqueryorch" partnerLinkType="tns:EntityComponentInternalDocQueryOrch" partnerRole="EntityComponentInternalDocQueryOrchPortTypeRole"/>
29 <partnerLink name="AuditRepositoryPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" partnerLinkType="tns:NhincComponentInternalAuditRepository" partnerRole="NhincComponentInternalAuditRepositoryPortTypeRole"/>
30 <partnerLink name="EntityDocQueryPL" xmlns:tns="urn:gov:hhs:fha:nhinc:entitydocquery" partnerLinkType="tns:EntityDocQuery" myRole="EntityDocQueryPortTypeRole"/>
31 </partnerLinks>
32 <variables>
33 <variable name="LogAdhocQueryResultOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogEventResponseMessage"/>
34 <variable name="LogAdhocQueryResultIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogAdhocQueryResultRequestMessage"/>
35 <variable name="LogAdhocQueryOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogEventResponseMessage"/>
36 <variable name="LogAdhocQueryIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogAdhocQueryRequestMessage"/>
37 <variable name="RespondingGateway_CrossGatewayQueryIn" xmlns:tns="urn:gov:hhs:fha:nhinc:entitydocquery" messageType="tns:RespondingGateway_CrossGatewayQueryRequestMessage"/>
38 <variable name="RespondingGateway_CrossGatewayQueryOut" xmlns:tns="urn:gov:hhs:fha:nhinc:entitydocquery" messageType="tns:RespondingGateway_CrossGatewayQueryResponseMessage"/>
39 </variables>
40 <sequence>
41 <receive name="ReceiveEnityDocQuery" createInstance="yes" partnerLink="EntityDocQueryPL" operation="RespondingGateway_CrossGatewayQuery" xmlns:tns="urn:gov:hhs:fha:nhinc:entitydocquery" portType="tns:EntityDocQueryPortType" variable="RespondingGateway_CrossGatewayQueryIn"/>
42 <assign name="AssignAuditReposDQReq">
43 <sxt:trace>
44 <sxt:log level="info" location="onStart">
45 <from>'Begin Receive Entity Doc Query Input Message is: '</from>
46 </sxt:log>
47 <sxt:log level="info" location="onStart">
48 <from variable="RespondingGateway_CrossGatewayQueryIn"/>
49 </sxt:log>
50 </sxt:trace>
51 <copy>
52 <from>$RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/query:AdhocQueryRequest</from>
53 <to>$LogAdhocQueryIn.LogAdhocQueryRequest/ns3:message/query:AdhocQueryRequest</to>
54 </copy>
55 <copy>
56 <from>$RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonent:assertion</from>
57 <to>$LogAdhocQueryIn.LogAdhocQueryRequest/ns3:message/ns3:assertion</to>
58 </copy>
59 <copy>
60 <from>'Inbound'</from>
61 <to>$LogAdhocQueryIn.LogAdhocQueryRequest/ns3:direction</to>
62 </copy>
63 <copy>
64 <from>'Entity'</from>
65 <to>$LogAdhocQueryIn.LogAdhocQueryRequest/ns3:interface</to>
66 </copy>
67 </assign>
68 <invoke name="InvokeAuditReposDQReq" partnerLink="AuditRepositoryPL" operation="LogAdhocQuery" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" portType="tns:NhincComponentInternalAuditRepositoryPortType" inputVariable="LogAdhocQueryIn" outputVariable="LogAdhocQueryOut"/>
69 <scope name="EntityDocQueryScope">
70 <variables>
71 <variable name="QuerySelf" type="xsd:boolean"/>
72 <variable name="GetPropertyOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" messageType="tns:GetPropertyResponseMessage"/>
73 <variable name="GetPropertyIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" messageType="tns:GetPropertyRequestMessage"/>
74 <variable name="CorrelationCount" type="xsd:integer"/>
75 <variable name="SlotCount" type="xsd:integer"/>
76 <variable name="StartTransactionDocQueryOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" messageType="tns:StartTransactionDocQueryResponseMessage"/>
77 <variable name="StartTransactionDocQueryIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" messageType="tns:StartTransactionDocQueryRequestMessage"/>
78 <variable name="RetrievePatientCorrelationsOut" xmlns:tns="urn:gov:hhs:fha:nhinc:componentpatientcorrelationfacade" messageType="tns:RetrievePatientCorrelationsResponseMessage"/>
79 <variable name="RetrievePatientCorrelationsIn" xmlns:tns="urn:gov:hhs:fha:nhinc:componentpatientcorrelationfacade" messageType="tns:RetrievePatientCorrelationsRequestMessage"/>
80 </variables>
81 <faultHandlers>
82 <catch faultName="sxeh:systemFault" faultVariable="systemFaultVar" faultMessageType="sxeh:faultMessage">
83 <sequence name="SystemFaultSeq">
84 <assign name="AssignFromFaultHandler">
85 <sxt:trace>
86 <sxt:log level="info" location="onStart">
87 <from>'EntityDocQuery.bpel - System fault encounterd processing an AdhocQuery request. Fault details follow...'</from>
88 </sxt:log>
89 <sxt:log level="warning" location="onStart">
90 <from variable="systemFaultVar"/>
91 </sxt:log>
92 </sxt:trace>
93 <copy>
94 <from>'urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure'</from>
95 <to>$RespondingGateway_CrossGatewayQueryOut.RespondingGateway_CrossGatewayQueryResponse/@status</to>
96 </copy>
97 <copy>
98 <from>'XDSRegistryError'</from>
99 <to>$RespondingGateway_CrossGatewayQueryOut.RespondingGateway_CrossGatewayQueryResponse/ns0:RegistryErrorList/ns0:RegistryError/@errorCode</to>
100 </copy>
101 <copy>
102 <from>'Error'</from>
103 <to>$RespondingGateway_CrossGatewayQueryOut.RespondingGateway_CrossGatewayQueryResponse/ns0:RegistryErrorList/ns0:RegistryError/@severity</to>
104 </copy>
105 <copy>
106 <from>'Fault encountered processing a document query'</from>
107 <to>$RespondingGateway_CrossGatewayQueryOut.RespondingGateway_CrossGatewayQueryResponse/ns0:RegistryErrorList/ns0:RegistryError/@codeContext</to>
108 </copy>
109 </assign>
110 </sequence>
111 </catch>
112 </faultHandlers>
113 <sequence name="EntityDocQuerySeq">
114 <sequence name="ExtractPatientIdSeq">
115 <assign name="AssignSlotCount">
116 <copy>
117 <from>count($RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/query:AdhocQueryRequest/rim:AdhocQuery/rim:Slot)</from>
118 <to variable="SlotCount"/>
119 </copy>
120 <copy>
121 <from>'DefaultToPreventNull'</from>
122 <to>$RetrievePatientCorrelationsIn.RetrievePatientCorrelationsRequest/patcorrfacade:QualifiedPatientIdentifier/nccommon:SubjectIdentifier</to>
123 </copy>
124 </assign>
125 <forEach name="ForEachSlotList" parallel="no" counterName="SlotListCounter">
126 <startCounterValue>1</startCounterValue>
127 <finalCounterValue>$SlotCount</finalCounterValue>
128 <scope name="CollectPatientIdScope">
129 <variables>
130 <variable name="TargetCommunityCount" type="xsd:integer"/>
131 <variable name="SlotName" type="xsd:string"/>
132 </variables>
133 <faultHandlers>
134 <catch faultName="sxeh:systemFault" faultVariable="collectPatientSystemFaultVar" faultMessageType="sxeh:faultMessage">
135 <empty name="LogError">
136 <sxt:trace>
137 <sxt:log level="info" location="onStart">
138 <from>'EntityDocQuery.bpel - Error collecting patient ideentifier. Fault details follow...'</from>
139 </sxt:log>
140 <sxt:log level="warning" location="onStart">
141 <from variable="collectPatientSystemFaultVar"/>
142 </sxt:log>
143 </sxt:trace>
144 </empty>
145 </catch>
146 </faultHandlers>
147 <sequence name="CollectPatientIdSeq">
148 <assign name="AssignSlotName">
149 <copy>
150 <from>$RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/query:AdhocQueryRequest/rim:AdhocQuery/rim:Slot[$SlotListCounter]/@name</from>
151 <to variable="SlotName"/>
152 </copy>
153 </assign>
154 <if name="IfPatientIdSlot">
155 <condition>'$XDSDocumentEntryPatientId' = $SlotName</condition>
156 <sequence name="PatientIdSlotSeq">
157 <assign name="AssignPatientIdFromSlot">
158 <sxt:trace>
159 <sxt:log level="info" location="onComplete">
160 <from>concat('Extracted patient id: ', $RetrievePatientCorrelationsIn.RetrievePatientCorrelationsRequest/patcorrfacade:QualifiedPatientIdentifier/nccommon:SubjectIdentifier, ', assigning authority: ', $RetrievePatientCorrelationsIn.RetrievePatientCorrelationsRequest/patcorrfacade:QualifiedPatientIdentifier/nccommon:AssigningAuthorityIdentifier)</from>
161 </sxt:log>
162 </sxt:trace>
163 <copy>
164 <from>substring-before($RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/query:AdhocQueryRequest/rim:AdhocQuery/rim:Slot[$SlotListCounter]/rim:ValueList/rim:Value, '^')</from>
165 <to>$RetrievePatientCorrelationsIn.RetrievePatientCorrelationsRequest/patcorrfacade:QualifiedPatientIdentifier/nccommon:SubjectIdentifier</to>
166 </copy>
167 <copy>
168 <from>substring-before(substring-after($RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/query:AdhocQueryRequest/rim:AdhocQuery/rim:Slot[$SlotListCounter]/rim:ValueList/rim:Value, '&amp;'), '&amp;')
169 <sxed:editor>
170 <sxed:predicate path="$RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/query:AdhocQueryRequest/rim:AdhocQuery/rim:Slot[$SlotListCounter]" source="from"/>
171 </sxed:editor>
172 </from>
173 <to>$RetrievePatientCorrelationsIn.RetrievePatientCorrelationsRequest/patcorrfacade:QualifiedPatientIdentifier/nccommon:AssigningAuthorityIdentifier</to>
174 </copy>
175 </assign>
176 <if name="IfHasTargetCommunities">
177 <condition>$RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonent:NhinTargetCommunities</condition>
178 <sequence name="Sequence4">
179 <assign name="AssignTargetCommunityCount">
180 <copy>
181 <from>count($RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonent:NhinTargetCommunities/nccommon:nhinTargetCommunity)</from>
182 <to variable="TargetCommunityCount"/>
183 </copy>
184 </assign>
185 <if name="IfHasCommunities">
186 <condition>$TargetCommunityCount &gt; 0</condition>
187 <forEach name="ForEachTargetCommunity" parallel="no" counterName="TargetCommunityCounter">
188 <startCounterValue>1</startCounterValue>
189 <finalCounterValue>$TargetCommunityCount</finalCounterValue>
190 <scope name="TargetCommunityScope">
191 <assign name="AssignTargetCommunity">
192 <copy>
193 <from>$RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonent:NhinTargetCommunities/nccommon:nhinTargetCommunity[$TargetCommunityCounter]/nccommon:homeCommunity/nccommon:homeCommunityId</from>
194 <to>$RetrievePatientCorrelationsIn.RetrievePatientCorrelationsRequest/patcorrfacade:TargetHomeCommunity[$TargetCommunityCounter]</to>
195 </copy>
196 </assign>
197 </scope>
198 </forEach>
199 </if>
200 </sequence>
201 </if>
202 </sequence>
203 </if>
204 </sequence>
205 </scope>
206 </forEach>
207 </sequence>
208 <invoke name="InvokeRetrieveCorrelations" partnerLink="PatientCorrelationPL" operation="RetrievePatientCorrelations" xmlns:tns="urn:gov:hhs:fha:nhinc:componentpatientcorrelationfacade" portType="tns:PatientCorrelationFacadePortType" inputVariable="RetrievePatientCorrelationsIn" outputVariable="RetrievePatientCorrelationsOut"/>
209 <assign name="AssignAggregatorStartInput">
210 <sxt:trace>
211 <sxt:log level="info" location="onStart">
212 <from>'Completed Call to Patient Correlation Service: '</from>
213 </sxt:log>
214 <sxt:log level="fine" location="onStart">
215 <from variable="RetrievePatientCorrelationsOut"/>
216 </sxt:log>
217 </sxt:trace>
218 <copy>
219 <from>count($RetrievePatientCorrelationsOut.RetrievePatientCorrelationsResponse/patcorrfacade:QualifiedPatientIdentifier)</from>
220 <to variable="CorrelationCount"/>
221 </copy>
222 <copy>
223 <from>$RetrievePatientCorrelationsOut.RetrievePatientCorrelationsResponse/patcorrfacade:QualifiedPatientIdentifier</from>
224 <to>$StartTransactionDocQueryIn.StartTransactionDocQueryRequest/agg:qualifiedPatientIdentifiers/nccommon:QualifiedSubjectIdentifier</to>
225 </copy>
226 </assign>
227 <invoke name="InvokeAggregatorStart" partnerLink="AggregatorPL" operation="StartTransactionDocQuery" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" portType="tns:NhincComponentAggregatorPortType" inputVariable="StartTransactionDocQueryIn" outputVariable="StartTransactionDocQueryOut">
228 <sxt:trace>
229 <sxt:log level="info" location="onComplete">
230 <from>concat('Called start aggregator - transaction id: ', $StartTransactionDocQueryOut.StartTransactionDocQueryResponse/agg:transactionId)</from>
231 </sxt:log>
232 </sxt:trace>
233 </invoke>
234 <assign name="AssignGetQuerySelfInput">
235 <copy>
236 <from>'gateway'</from>
237 <to>$GetPropertyIn.GetPropertyRequest/ns1:propertyFile</to>
238 </copy>
239 <copy>
240 <from>'documentQueryQuerySelf'</from>
241 <to>$GetPropertyIn.GetPropertyRequest/ns1:propertyName</to>
242 </copy>
243 </assign>
244 <invoke name="InvokeGetQuerySelfProperty" partnerLink="PropAccessorPL" operation="GetProperty" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" portType="tns:NhincComponentPropAccessorPortType" inputVariable="GetPropertyIn" outputVariable="GetPropertyOut"/>
245 <assign name="AssignQuerySelfFlag">
246 <copy>
247 <from>$GetPropertyOut.GetPropertyResponse/ns1:propertyValue = 'true'</from>
248 <to variable="QuerySelf"/>
249 </copy>
250 </assign>
251 <forEach name="ForEachCorrelation" parallel="no" counterName="CorrelationCounter">
252 <startCounterValue>1</startCounterValue>
253 <finalCounterValue>$CorrelationCount</finalCounterValue>
254 <scope name="CorrelationScope">
255 <variables>
256 <variable name="SendAdhocQueryOut" xmlns:tns="urn:gov:hhs:fha:nhinc:entitycomponentinternaldocqueryorch" messageType="tns:SendAdhocQueryResponseMessage"/>
257 <variable name="IsHomeCommunity" type="xsd:boolean"/>
258 <variable name="SendAdhocQueryIn" xmlns:tns="urn:gov:hhs:fha:nhinc:entitycomponentinternaldocqueryorch" messageType="tns:SendAdhocQueryRequestMessage"/>
259 </variables>
260 <sequence name="CorrelationSeq">
261 <assign name="AssignIsHomeCommunityFlag">
262 <copy>
263 <from>$RetrievePatientCorrelationsOut.RetrievePatientCorrelationsResponse/patcorrfacade:QualifiedPatientIdentifier[$CorrelationCounter]/nccommon:AssigningAuthorityIdentifier = $RetrievePatientCorrelationsIn.RetrievePatientCorrelationsRequest/patcorrfacade:QualifiedPatientIdentifier/nccommon:AssigningAuthorityIdentifier
264 <sxed:editor>
265 <sxed:predicate path="$RetrievePatientCorrelationsOut.RetrievePatientCorrelationsResponse/patcorrfacade:QualifiedPatientCorrelation/nccommon:QualifiedSubjectIdentifier[$CorrelationCounter]" source="from"/>
266 </sxed:editor>
267 </from>
268 <to variable="IsHomeCommunity"/>
269 </copy>
270 </assign>
271 <if name="IfSendQuery">
272 <condition>$QuerySelf or not($IsHomeCommunity)</condition>
273 <sequence name="NotHomeCommunitySeq">
274 <assign name="AssignDocQuerySenderInput">
275 <copy>
276 <from>$StartTransactionDocQueryOut.StartTransactionDocQueryResponse/agg:transactionId</from>
277 <to>$SendAdhocQueryIn.SendAdhocQueryRequest/entcommonintorch:TransactionId</to>
278 </copy>
279 <copy>
280 <from>$RetrievePatientCorrelationsOut.RetrievePatientCorrelationsResponse/patcorrfacade:QualifiedPatientIdentifier[$CorrelationCounter]</from>
281 <to>$SendAdhocQueryIn.SendAdhocQueryRequest/nccommon:QualifiedSubjectIdentifier</to>
282 </copy>
283 <copy>
284 <from>$RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonent:assertion</from>
285 <to>$SendAdhocQueryIn.SendAdhocQueryRequest/nccommon:Assertion</to>
286 </copy>
287 <copy>
288 <from>$RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/query:AdhocQueryRequest</from>
289 <to>$SendAdhocQueryIn.SendAdhocQueryRequest/query:AdhocQueryRequest</to>
290 </copy>
291 </assign>
292 <invoke name="InvokeInternalDocQueryOrch" partnerLink="EntityCompIntDocQueryOrchPL" operation="SendAdhocQuery" xmlns:tns="urn:gov:hhs:fha:nhinc:entitycomponentinternaldocqueryorch" portType="tns:EntityComponentInternalDocQueryOrchPortType" inputVariable="SendAdhocQueryIn" outputVariable="SendAdhocQueryOut">
293 <sxt:trace>
294 <sxt:log level="warning" location="onStart">
295 <from>'### Sending a message to the entity internal orch'</from>
296 </sxt:log>
297 <sxt:log level="info" location="onStart">
298 <from variable="SendAdhocQueryIn"/>
299 </sxt:log>
300 </sxt:trace>
301 </invoke>
302 <empty name="LogSenderStatus">
303 <sxt:trace>
304 <sxt:log level="info" location="onStart">
305 <from>concat('Status from internal doc query sender: ', $SendAdhocQueryOut.SendAdhocQueryResponse/entcommonintorch:Status)</from>
306 </sxt:log>
307 </sxt:trace>
308 </empty>
309 </sequence>
310 <else>
311 <empty name="LogWasHomeCommunity">
312 <sxt:trace>
313 <sxt:log level="info" location="onStart">
314 <from>concat('Not sending to this assigning authority: ', $RetrievePatientCorrelationsOut.RetrievePatientCorrelationsResponse/patcorrfacade:QualifiedPatientCorrelation/nccommon:QualifiedSubjectIdentifier[$CorrelationCounter]/nccommon:AssigningAuthorityIdentifier)</from>
315 </sxt:log>
316 </sxt:trace>
317 </empty>
318 </else>
319 </if>
320 </sequence>
321 </scope>
322 </forEach>
323 <scope name="PollForResultsScope">
324 <variables>
325 <variable name="AggregationFailed" type="xsd:boolean"/>
326 <variable name="AggregatorCompleted" type="xsd:boolean"/>
327 <variable name="GetAggResultsDocQueryOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" messageType="tns:GetAggResultsDocQueryResponseMessage"/>
328 <variable name="GetAggResultsDocQueryIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" messageType="tns:GetAggResultsDocQueryRequestMessage"/>
329 <variable name="TimedOut" type="xsd:boolean"/>
330 </variables>
331 <eventHandlers>
332 <onAlarm>
333 <for>'P0Y0M0DT0H0M60.0S'</for>
334 <scope name="TimedOutScope">
335 <sequence name="Sequence2">
336 <assign name="AssignTimedOut">
337 <sxt:trace>
338 <sxt:log level="info" location="onStart">
339 <from>'Aggregator timeout reached'</from>
340 </sxt:log>
341 </sxt:trace>
342 <copy>
343 <from>true()</from>
344 <to variable="TimedOut"/>
345 </copy>
346 </assign>
347 <assign name="AssignGetAggResultsInput">
348 <sxt:trace>
349 <sxt:log level="info" location="onStart">
350 <from>'Assigning get agg results input'</from>
351 </sxt:log>
352 </sxt:trace>
353 <copy>
354 <from>$StartTransactionDocQueryOut.StartTransactionDocQueryResponse/agg:transactionId</from>
355 <to>$GetAggResultsDocQueryIn.GetAggResultsDocQueryRequest/agg:transactionId</to>
356 </copy>
357 <copy>
358 <from>true()</from>
359 <to>$GetAggResultsDocQueryIn.GetAggResultsDocQueryRequest/agg:timedOut</to>
360 </copy>
361 </assign>
362 <invoke name="InvokeGetAggResultsFromTimeout" partnerLink="AggregatorPL" operation="GetAggResultsDocQuery" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" portType="tns:NhincComponentAggregatorPortType" inputVariable="GetAggResultsDocQueryIn" outputVariable="GetAggResultsDocQueryOut">
363 <sxt:trace>
364 <sxt:log level="info" location="onStart">
365 <from>'Invoking get agg results from timeout'</from>
366 </sxt:log>
367 </sxt:trace>
368 </invoke>
369 <assign name="AssignGetAggResultsOutput">
370 <sxt:trace>
371 <sxt:log level="info" location="onStart">
372 <from>'Assigning get agg results from timeout output'</from>
373 </sxt:log>
374 </sxt:trace>
375 <copy>
376 <from>$GetAggResultsDocQueryOut.GetAggResultsDocQueryResponse/query:AdhocQueryResponse</from>
377 <to variable="RespondingGateway_CrossGatewayQueryOut" part="RespondingGateway_CrossGatewayQueryResponse"/>
378 </copy>
379 </assign>
380 </sequence>
381 </scope>
382 </onAlarm>
383 </eventHandlers>
384 <sequence name="PollForResultsSeq">
385 <assign name="AssignDefaults">
386 <copy>
387 <from>false()</from>
388 <to variable="AggregationFailed"/>
389 </copy>
390 <copy>
391 <from>false()</from>
392 <to variable="AggregatorCompleted"/>
393 </copy>
394 <copy>
395 <from>false()</from>
396 <to variable="TimedOut"/>
397 </copy>
398 </assign>
399 <repeatUntil name="RepeatUntilHaveResultsOrTimeout">
400 <sequence name="RepeatUntilFinishedSeq">
401 <assign name="AssignGetResultsInput">
402 <copy>
403 <from>$StartTransactionDocQueryOut.StartTransactionDocQueryResponse/agg:transactionId</from>
404 <to>$GetAggResultsDocQueryIn.GetAggResultsDocQueryRequest/agg:transactionId</to>
405 </copy>
406 <copy>
407 <from>false()</from>
408 <to>$GetAggResultsDocQueryIn.GetAggResultsDocQueryRequest/agg:timedOut</to>
409 </copy>
410 </assign>
411 <invoke name="InvokeGetAggResults" partnerLink="AggregatorPL" operation="GetAggResultsDocQuery" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" portType="tns:NhincComponentAggregatorPortType" inputVariable="GetAggResultsDocQueryIn" outputVariable="GetAggResultsDocQueryOut"/>
412 <assign name="AssignCompletedStatus">
413 <copy>
414 <from>$GetAggResultsDocQueryOut.GetAggResultsDocQueryResponse/agg:status = 'COMPLETE'</from>
415 <to variable="AggregatorCompleted"/>
416 </copy>
417 <copy>
418 <from>$GetAggResultsDocQueryOut.GetAggResultsDocQueryResponse/agg:status = 'FAIL'</from>
419 <to variable="AggregationFailed"/>
420 </copy>
421 </assign>
422 <if name="IfResultsComplete">
423 <condition>$AggregatorCompleted</condition>
424 <assign name="AssignAggregatorResults">
425 <sxt:trace>
426 <sxt:log level="info" location="onStart">
427 <from>'Aggregator results complete'</from>
428 </sxt:log>
429 </sxt:trace>
430 <copy>
431 <from>$GetAggResultsDocQueryOut.GetAggResultsDocQueryResponse/query:AdhocQueryResponse</from>
432 <to variable="RespondingGateway_CrossGatewayQueryOut" part="RespondingGateway_CrossGatewayQueryResponse"/>
433 </copy>
434 </assign>
435 <elseif>
436 <condition>$AggregationFailed</condition>
437 <assign name="AssignFailedInfo">
438 <sxt:trace>
439 <sxt:log level="info" location="onStart">
440 <from>'Failure status received from aggregator.'</from>
441 </sxt:log>
442 </sxt:trace>
443 <copy>
444 <from>'urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure'</from>
445 <to>$RespondingGateway_CrossGatewayQueryOut.RespondingGateway_CrossGatewayQueryResponse/@status</to>
446 </copy>
447 <copy>
448 <from>'XDSRegistryError'</from>
449 <to>$RespondingGateway_CrossGatewayQueryOut.RespondingGateway_CrossGatewayQueryResponse/ns0:RegistryErrorList/ns0:RegistryError/@errorCode</to>
450 </copy>
451 <copy>
452 <from>'Error'</from>
453 <to>$RespondingGateway_CrossGatewayQueryOut.RespondingGateway_CrossGatewayQueryResponse/ns0:RegistryErrorList/ns0:RegistryError/@severity</to>
454 </copy>
455 <copy>
456 <from>'Error aggregating query results'</from>
457 <to>$RespondingGateway_CrossGatewayQueryOut.RespondingGateway_CrossGatewayQueryResponse/ns0:RegistryErrorList/ns0:RegistryError/@codeContext</to>
458 </copy>
459 </assign>
460 </elseif>
461 <else>
462 <wait name="Pause">
463 <sxt:trace>
464 <sxt:log level="info" location="onStart">
465 <from>'Pausing while waiting for doc query results'</from>
466 </sxt:log>
467 </sxt:trace>
468 <for>'P0Y0M0DT0H0M1.0S'</for>
469 </wait>
470 </else>
471 </if>
472 </sequence>
473 <condition>$AggregatorCompleted or $AggregationFailed or $TimedOut</condition>
474 </repeatUntil>
475 </sequence>
476 </scope>
477 </sequence>
478 </scope>
479 <assign name="AssignAuditReposDQRes">
480 <copy>
481 <from variable="RespondingGateway_CrossGatewayQueryOut" part="RespondingGateway_CrossGatewayQueryResponse"/>
482 <to>$LogAdhocQueryResultIn.LogAdhocQueryResultRequest/ns3:message/query:AdhocQueryResponse</to>
483 </copy>
484 <copy>
485 <from>$RespondingGateway_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonent:assertion</from>
486 <to>$LogAdhocQueryResultIn.LogAdhocQueryResultRequest/ns3:message/ns3:assertion</to>
487 </copy>
488 <copy>
489 <from>'Outbound'</from>
490 <to>$LogAdhocQueryResultIn.LogAdhocQueryResultRequest/ns3:direction</to>
491 </copy>
492 <copy>
493 <from>'Entity'</from>
494 <to>$LogAdhocQueryResultIn.LogAdhocQueryResultRequest/ns3:interface</to>
495 </copy>
496 </assign>
497 <invoke name="InvokeAuditReposDQRes" partnerLink="AuditRepositoryPL" operation="LogAdhocQueryResult" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" portType="tns:NhincComponentInternalAuditRepositoryPortType" inputVariable="LogAdhocQueryResultIn" outputVariable="LogAdhocQueryResultOut">
498 <sxt:trace>
499 <sxt:log level="info" location="onStart">
500 <from>'End of Entity Doc Query the response is: '</from>
501 </sxt:log>
502 <sxt:log level="info" location="onStart">
503 <from variable="LogAdhocQueryResultOut"/>
504 </sxt:log>
505 </sxt:trace>
506 </invoke>
507 <reply name="ReplyEntityDocQuery" partnerLink="EntityDocQueryPL" operation="RespondingGateway_CrossGatewayQuery" xmlns:tns="urn:gov:hhs:fha:nhinc:entitydocquery" portType="tns:EntityDocQueryPortType" variable="RespondingGateway_CrossGatewayQueryOut"/>
508 </sequence>
509</process>
Note: See TracBrowser for help on using the repository browser.