source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Gateway/NhincProxyBPEL/src/NhinProxyDocQuery.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: 21.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<process
3 name="NhinProxyDocQuery"
4 targetNamespace="urn:gov:hhs:fha:nhinc:gateway:nhincproxybpel:nhinproxydocquery"
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:nhincproxybpel:nhinproxydocquery"
11 xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
12 xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
13 xmlns:nccommonproxy="urn:gov:hhs:fha:nhinc:common:nhinccommonproxy"
14 xmlns:nccommon="urn:gov:hhs:fha:nhinc:common:nhinccommon"
15 xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
16 xmlns:soapaddr04="http://schemas.xmlsoap.org/ws/2004/08/addressing"
17 xmlns:conninfo="urn:gov:hhs:fha:nhinc:common:connectionmanagerinfo"
18 xmlns:ihe="urn:ihe:iti:xds-b:2007"
19 xmlns:nccommonadapter="urn:gov:hhs:fha:nhinc:common:nhinccommonadapter"
20 xmlns:auditlog="urn:gov:hhs:fha:nhinc:common:auditlog">
21 <import namespace="urn:gov:hhs:fha:nhinc:nhincproxydocquery" location="Interfaces/wsdl/NhincProxyDocQuery.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
22 <import namespace="http://enterprise.netbeans.org/bpel/NhinDocQueryWrapper" location="NhinDocQueryWrapper.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
23 <import namespace="urn:ihe:iti:xds-b:2007" location="Interfaces/wsdl/NhinDocQuery.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
24 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" location="Interfaces/wsdl/NhincComponentConnectionManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
25 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" location="Interfaces/wsdl/NhincComponentInternalAuditRepository.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
26 <partnerLinks>
27 <partnerLink name="ConnectionManagerPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" partnerLinkType="tns:NhincComponentConnectionManager" partnerRole="NhincComponentConnectionManagerPortTypeRole"/>
28 <partnerLink name="NhinDocQueryPL" xmlns:tns="http://enterprise.netbeans.org/bpel/NhinDocQueryWrapper" partnerLinkType="tns:RespondingGateway_Query_LinkType" partnerRole="RespondingGateway_Query_Role"/>
29 <partnerLink name="NhincProxyDocQueryPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxydocquery" partnerLinkType="tns:NhincProxyDocQuery" myRole="NhincProxyDocQueryPortTypeRole"/>
30 <partnerLink name="AuditRepositoryPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" partnerLinkType="tns:NhincComponentInternalAuditRepository" partnerRole="NhincComponentInternalAuditRepositoryPortTypeRole"/>
31 </partnerLinks>
32 <variables>
33 <variable name="LogAdhocQueryOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogEventResponseMessage"/>
34 <variable name="LogAdhocQueryIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogAdhocQueryRequestMessage"/>
35 <variable name="Proxy_CrossGatewayQueryIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxydocquery" messageType="tns:RespondingGateway_CrossGatewayQueryRequestMessage"/>
36 </variables>
37 <sequence>
38 <receive name="ReceiveProxyDocQuery" createInstance="yes" partnerLink="NhincProxyDocQueryPL" operation="RespondingGateway_CrossGatewayQuery" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxydocquery" portType="tns:NhincProxyDocQueryPortType" variable="Proxy_CrossGatewayQueryIn"/>
39 <assign name="AssignAuditReposDQReq">
40 <copy>
41 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/query:AdhocQueryRequest</from>
42 <to>$LogAdhocQueryIn.LogAdhocQueryRequest/auditlog:message/query:AdhocQueryRequest</to>
43 </copy>
44 <copy>
45 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion</from>
46 <to>$LogAdhocQueryIn.LogAdhocQueryRequest/auditlog:message/auditlog:assertion</to>
47 </copy>
48 <copy>
49 <from>'Inbound'</from>
50 <to>$LogAdhocQueryIn.LogAdhocQueryRequest/auditlog:direction</to>
51 </copy>
52 <copy>
53 <from>'Nhin'</from>
54 <to>$LogAdhocQueryIn.LogAdhocQueryRequest/auditlog:interface</to>
55 </copy>
56 </assign>
57 <invoke name="InvokeAuditReposDQReq" partnerLink="AuditRepositoryPL" operation="LogAdhocQuery" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" portType="tns:NhincComponentInternalAuditRepositoryPortType" inputVariable="LogAdhocQueryIn" outputVariable="LogAdhocQueryOut"/>
58 <scope name="NhinProxyDocQueryScope">
59 <variables>
60 <variable name="LogAdhocQueryResultOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogEventResponseMessage"/>
61 <variable name="LogAdhocQueryResultIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogAdhocQueryResultRequestMessage"/>
62 <variable name="TargetAddress" type="xsd:string"/>
63 <variable name="GetConnectionInfoEndpointByServiceNameOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" messageType="tns:GetConnectionInfoEndpointByServiceNameResponseMessage"/>
64 <variable name="GetConnectionInfoEndpointByServiceNameIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" messageType="tns:GetConnectionInfoEndpointByServiceNameRequestMessage"/>
65 <variable name="Proxy_CrossGatewayQueryOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxydocquery" messageType="tns:RespondingGateway_CrossGatewayQueryResponseMessage"/>
66 <variable name="Nhin_CrossGatewayQueryOut" xmlns:ihe="urn:ihe:iti:xds-b:2007" messageType="ihe:CrossGatewayQueryResponse_Message"/>
67 <variable name="Nhin_CrossGatewayQueryIn" xmlns:ihe="urn:ihe:iti:xds-b:2007" messageType="ihe:CrossGatewayQuery_Message"/>
68 </variables>
69 <faultHandlers>
70 <catch faultName="sxeh:systemFault" faultVariable="systemFaultVar" faultMessageType="sxeh:faultMessage">
71 <sequence name="SystemFaultSeq">
72 <assign name="AssignFaultInfo">
73 <sxt:trace>
74 <sxt:log level="info" location="onStart">
75 <from>'NhinProxyDocQuery.bpel - A system fault was encountered sending a document query to a remote gateway. Fault detial follows...'</from>
76 </sxt:log>
77 <sxt:log level="warning" location="onStart">
78 <bpel:from variable="systemFaultVar"/>
79 </sxt:log>
80 </sxt:trace>
81 <copy>
82 <from>'urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure'</from>
83 <to>$Proxy_CrossGatewayQueryOut.RespondingGateway_CrossGatewayQueryResponse/@status</to>
84 </copy>
85 <copy>
86 <from>'Internal Document Query Processing'</from>
87 <to>$Proxy_CrossGatewayQueryOut.RespondingGateway_CrossGatewayQueryResponse/rs:RegistryErrorList/rs:RegistryError/@codeContext</to>
88 </copy>
89 <copy>
90 <from>'XDSRegistryError'</from>
91 <to>$Proxy_CrossGatewayQueryOut.RespondingGateway_CrossGatewayQueryResponse/rs:RegistryErrorList/rs:RegistryError/@errorCode</to>
92 </copy>
93 <copy>
94 <from>'Error'</from>
95 <to>$Proxy_CrossGatewayQueryOut.RespondingGateway_CrossGatewayQueryResponse/rs:RegistryErrorList/rs:RegistryError/@severity</to>
96 </copy>
97 </assign>
98 <reply name="ReplyFault" partnerLink="NhincProxyDocQueryPL" operation="RespondingGateway_CrossGatewayQuery" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxydocquery" portType="tns:NhincProxyDocQueryPortType" variable="Proxy_CrossGatewayQueryOut"/>
99 <exit name="ExitFaultReply"/>
100 </sequence>
101 </catch>
102 </faultHandlers>
103 <sequence name="NhinProxyDocQuerySeq">
104 <if name="IfHasHomeCommunity">
105 <condition>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:nhinTargetSystem/nccommon:homeCommunity/nccommon:homeCommunityId</condition>
106 <sequence name="Sequence1">
107 <assign name="AssignConnectionManagerInput">
108 <copy>
109 <from>'documentquery'</from>
110 <to>$GetConnectionInfoEndpointByServiceNameIn.GetConnectionInfoEndpointByServiceNameRequest/conninfo:homeCommunityWithServiceName/conninfo:serviceName</to>
111 </copy>
112 <copy>
113 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:nhinTargetSystem/nccommon:homeCommunity</from>
114 <to>$GetConnectionInfoEndpointByServiceNameIn.GetConnectionInfoEndpointByServiceNameRequest/conninfo:homeCommunityWithServiceName/conninfo:homeCommunity</to>
115 </copy>
116 </assign>
117 <invoke name="InvokeConnectionManager" partnerLink="ConnectionManagerPL" operation="GetConnectionInfoEndpointByServiceName" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" portType="tns:NhincComponentConnectionManagerPortType" inputVariable="GetConnectionInfoEndpointByServiceNameIn" outputVariable="GetConnectionInfoEndpointByServiceNameOut"/>
118 <assign name="AssignEprFromConnMgr">
119 <copy>
120 <from>bpel:doXslTransform('urn:stylesheets:wrap2serviceref.xsl', $GetConnectionInfoEndpointByServiceNameOut.ConnectionInfoEndpoint/conninfo:serviceConnectionInfoEndpoints/conninfo:serviceConnectionInfoEndpoint/nccommon:EPR/nccommon:EndpointReference)</from>
121 <to partnerLink="NhinDocQueryPL"/>
122 </copy>
123 <copy>
124 <from>string($GetConnectionInfoEndpointByServiceNameOut.ConnectionInfoEndpoint/conninfo:serviceConnectionInfoEndpoints/conninfo:serviceConnectionInfoEndpoint/nccommon:EPR/nccommon:EndpointReference/soapaddr04:Address)</from>
125 <to variable="TargetAddress"/>
126 </copy>
127 </assign>
128 </sequence>
129 <else>
130 <assign name="AssignProvidedEPR">
131 <copy>
132 <from>string($Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:nhinTargetSystem/nccommon:epr/nccommon:EndpointReference/soapaddr04:Address)</from>
133 <to variable="TargetAddress"/>
134 </copy>
135 <copy>
136 <from>bpel:doXslTransform('urn:stylesheets:wrap2serviceref.xsl', $Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:nhinTargetSystem/nccommon:epr/nccommon:EndpointReference)</from>
137 <to partnerLink="NhinDocQueryPL"/>
138 </copy>
139 </assign>
140 </else>
141 </if>
142 <assign name="AssignNhinInput">
143 <sxt:trace>
144 <sxt:log level="info" location="onStart">
145 <bpel:from>'Doc Query From NHINC Proxy...'</bpel:from>
146 </sxt:log>
147 <sxt:log level="warning" location="onStart">
148 <bpel:from variable="Proxy_CrossGatewayQueryIn"/>
149 </sxt:log>
150 </sxt:trace>
151 <copy>
152 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/query:AdhocQueryRequest</from>
153 <to variable="Nhin_CrossGatewayQueryIn" part="body"/>
154 </copy>
155 <copy>
156 <from>'queryDocuments'</from>
157 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:action"/>
158 </copy>
159 <copy>
160 <from variable="TargetAddress"/>
161 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:resource"/>
162 </copy>
163 <copy>
164 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:claimFormRaw</from>
165 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:content"/>
166 </copy>
167 <copy>
168 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:claimFormRef</from>
169 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:contentReference"/>
170 </copy>
171 <copy>
172 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:expirationDate</from>
173 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:expirationDate"/>
174 </copy>
175 <copy>
176 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:purposeOfDisclosureCoded/nccommon:codeSystem</from>
177 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:purposeForUseCodeSystem"/>
178 </copy>
179 <copy>
180 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:purposeOfDisclosureCoded/nccommon:codeSystemName</from>
181 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:purposeForUseCodeSystemName"/>
182 </copy>
183 <copy>
184 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:purposeOfDisclosureCoded/nccommon:displayName</from>
185 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:purposeForUseDisplayName"/>
186 </copy>
187 <copy>
188 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:purposeOfDisclosureCoded/nccommon:code</from>
189 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:purposeForUseRoleCode"/>
190 </copy>
191 <copy>
192 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:dateOfSignature</from>
193 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:signDate"/>
194 </copy>
195 <copy>
196 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:userInfo/nccommon:personName/nccommon:givenName</from>
197 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:userFirstName"/>
198 </copy>
199 <copy>
200 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:userInfo/nccommon:personName/nccommon:familyName</from>
201 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:userLastName"/>
202 </copy>
203 <copy>
204 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:userInfo/nccommon:personName/nccommon:secondNameOrInitials</from>
205 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:userMiddleName"/>
206 </copy>
207 <copy>
208 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:userInfo/nccommon:userName</from>
209 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:userName"/>
210 </copy>
211 <copy>
212 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:userInfo/nccommon:org/nccommon:name</from>
213 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:userOrganization"/>
214 </copy>
215 <copy>
216 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:userInfo/nccommon:roleCoded/nccommon:code</from>
217 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:userRoleCode"/>
218 </copy>
219 <copy>
220 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:userInfo/nccommon:roleCoded/nccommon:displayName</from>
221 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:userRoleCodeDisplayName"/>
222 </copy>
223 <copy>
224 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:userInfo/nccommon:roleCoded/nccommon:codeSystem</from>
225 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:userRoleCodeSystem"/>
226 </copy>
227 <copy>
228 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion/nccommon:userInfo/nccommon:roleCoded/nccommon:codeSystemName</from>
229 <to variable="Nhin_CrossGatewayQueryIn" property="ihe:userRoleCodeSystemName"/>
230 </copy>
231 </assign>
232 <invoke name="InvokeNhinDocQuery" partnerLink="NhinDocQueryPL" operation="RespondingGateway_CrossGatewayQuery" xmlns:ihe="urn:ihe:iti:xds-b:2007" portType="ihe:RespondingGateway_Query_PortType" inputVariable="Nhin_CrossGatewayQueryIn" outputVariable="Nhin_CrossGatewayQueryOut"/>
233 <assign name="AssignNhinOutput">
234 <sxt:trace>
235 <sxt:log level="info" location="onStart">
236 <bpel:from>'NHIN Doc Query Response...'</bpel:from>
237 </sxt:log>
238 <sxt:log level="warning" location="onStart">
239 <bpel:from variable="Nhin_CrossGatewayQueryOut"/>
240 </sxt:log>
241 </sxt:trace>
242 <copy>
243 <from variable="Nhin_CrossGatewayQueryOut" part="body"/>
244 <to variable="Proxy_CrossGatewayQueryOut" part="RespondingGateway_CrossGatewayQueryResponse"/>
245 </copy>
246 </assign>
247 <assign name="AssignAuditReposDQRes">
248 <copy>
249 <from>$Proxy_CrossGatewayQueryIn.RespondingGateway_CrossGatewayQueryRequest/nccommonproxy:assertion</from>
250 <to>$LogAdhocQueryResultIn.LogAdhocQueryResultRequest/auditlog:message/auditlog:assertion</to>
251 </copy>
252 <copy>
253 <from variable="Nhin_CrossGatewayQueryOut" part="body"/>
254 <to>$LogAdhocQueryResultIn.LogAdhocQueryResultRequest/auditlog:message/query:AdhocQueryResponse</to>
255 </copy>
256 <copy>
257 <from>'Outbound'</from>
258 <to>$LogAdhocQueryResultIn.LogAdhocQueryResultRequest/auditlog:direction</to>
259 </copy>
260 <copy>
261 <from>'Nhin'</from>
262 <to>$LogAdhocQueryResultIn.LogAdhocQueryResultRequest/auditlog:interface</to>
263 </copy>
264 </assign>
265 <invoke name="InvokeAuditReposDQRes" partnerLink="AuditRepositoryPL" operation="LogAdhocQueryResult" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" portType="tns:NhincComponentInternalAuditRepositoryPortType" inputVariable="LogAdhocQueryResultIn" outputVariable="LogAdhocQueryResultOut"/>
266 <reply name="ReplyProxyDocQuery" partnerLink="NhincProxyDocQueryPL" operation="RespondingGateway_CrossGatewayQuery" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxydocquery" portType="tns:NhincProxyDocQueryPortType" variable="Proxy_CrossGatewayQueryOut"/>
267 </sequence>
268 </scope>
269 </sequence>
270</process>
Note: See TracBrowser for help on using the repository browser.