text:
<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project activeEnvironment="Default" name="AuditLogging-Passthrough" resourceRoot="${projectDir}" soapui-version="4.5.1" abortOnError="false" runType="SEQUENTIAL" xmlns:con="http://eviware.com/soapui/config">
	<con:settings/>
	<con:interface anonymous="optional" bindingName="{urn:gov:hhs:fha:nhinc:entityadmindistribution}AdministrativeDistribution_Binding_Soap12" definition="../../../target/wsdl/EntityAdminDist_g1.wsdl" name="AdministrativeDistribution_Binding_Soap12_g1" soapVersion="1_2" type="wsdl" wsaVersion="NONE" xsi:type="con:WsdlInterface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:settings/>
		<con:endpoints>
			<con:endpoint>http://localhost:${HttpDefaultPort}/Gateway/AdminDistribution/2_0/AdministrativeDistribution_Service</con:endpoint>
		</con:endpoints>
		<con:operation action="urn:oasis:names:tc:emergency:EDXL:DE:1.0:SendAlertMessage" bindingOperationName="SendAlertMessage" inputName="" isOneWay="false" name="SendAlertMessage" sendsAttachments="false" type="One-Way">
			<con:settings/>
		</con:operation>
	</con:interface>

	<con:interface anonymous="optional" bindingName="{urn:gov:hhs:fha:nhinc:nhincentityxdr}EntityXDR_Binding" definition="../../../target/wsdl/EntityXDR.wsdl" name="EntityXDR_Binding" soapVersion="1_2" type="wsdl" wsaVersion="NONE" xsi:type="con:WsdlInterface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:settings/>

		<con:endpoints>
			<con:endpoint>http://localhost:8080/CONNECTGateway/EntityService/EntityDocSubmissionUnsecured</con:endpoint>
			<con:endpoint>${#TestSuite#Endpoint-XDREntity}</con:endpoint>
			<con:endpoint>http://localhost:${HttpDefaultPort}/Gateway/DocumentSubmission/1_1/EntityService/EntityDocSubmissionUnsecured</con:endpoint>
		</con:endpoints>
		<con:operation action="" anonymous="optional" bindingOperationName="ProvideAndRegisterDocumentSet-b" inputName="" isOneWay="false" name="ProvideAndRegisterDocumentSet-b" receivesAttachments="false" sendsAttachments="false" type="Request-Response">
			<con:settings/>

		</con:operation>
	</con:interface>
	<con:interface anonymous="optional" bindingName="{urn:gov:hhs:fha:nhinc:nhincentityxdr:async:response}EntityXDRAsyncResponse_Binding" definition="../../../target/wsdl/EntityXDRResponse.wsdl" name="EntityXDRAsyncResponse_Binding" soapVersion="1_2" type="wsdl" wsaVersion="NONE" xsi:type="con:WsdlInterface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:settings/>
		<con:endpoints>
			<con:endpoint>http://localhost:${HttpDefaultPort}/EntityService/EntityXDRAsyncResponse</con:endpoint>
			<con:endpoint>${#TestSuite#Endpoint-DSDeferredResp}</con:endpoint>
		</con:endpoints>
		<con:operation action="" anonymous="optional" bindingOperationName="ProvideAndRegisterDocumentSet-bAsyncResponse" inputName="" isOneWay="false" name="ProvideAndRegisterDocumentSet-bAsyncResponse" receivesAttachments="false" sendsAttachments="false" type="Request-Response">
			<con:settings/>
		</con:operation>
	</con:interface>

	<con:interface anonymous="optional" bindingName="{urn:gov:hhs:fha:nhinc:nhincentityxdr:async:request}EntityXDRAsyncRequest_Binding" definition="../../../target/wsdl/EntityXDRRequest.wsdl" name="EntityXDRAsyncRequest_Binding" soapVersion="1_2" type="wsdl" wsaVersion="NONE" xsi:type="con:WsdlInterface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:settings/>

		<con:endpoints>
			<con:endpoint>http://localhost:${HttpDefaultPort}/EntityService/EntityXDRRequest</con:endpoint>
			<con:endpoint>http://localhost:8080/CONNECTAdapter/EntityProxyService/EntityXDRRequest</con:endpoint>
			<con:endpoint>${#TestSuite#Endpoint-EntityXDRRequest}</con:endpoint>
			<con:endpoint>http://localhost:${HttpDefaultPort}/EntityService/EntityXDRAsyncRequest</con:endpoint>
		</con:endpoints>
		<con:operation action="tns:ProvideAndRegisterDocumentSet-bAsyncRequest" anonymous="optional" bindingOperationName="ProvideAndRegisterDocumentSet-bAsyncRequest" inputName="" isOneWay="false" name="ProvideAndRegisterDocumentSet-bAsyncRequest" receivesAttachments="false" sendsAttachments="false" type="Request-Response">
			<con:settings/>

		</con:operation>
	</con:interface>
	<con:interface anonymous="optional" bindingName="{urn:gov:hhs:fha:nhinc:entitypatientdiscovery}EntityPatientDiscoveryBindingSoap" definition="../../../target/wsdl/EntityPatientDiscovery.wsdl" name="EntityPatientDiscoveryBindingSoap" soapVersion="1_2" type="wsdl" wsaVersion="NONE" xsi:type="con:WsdlInterface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:settings/>

		<con:endpoints>
			<con:endpoint>http://localhost:8080/CONNECTGateway/EntityPatientDiscovery</con:endpoint>
			<con:endpoint>http://localhost:${HttpDefaultPort}/Gateway/PatientDiscovery/1_0/EntityPatientDiscovery</con:endpoint>
		</con:endpoints>
		<con:operation action="urn:gov:hhs:fha:nhinc:entitypatientdiscovery:RespondingGateway_PRPA_IN201305UV02RequestMessage" bindingOperationName="RespondingGateway_PRPA_IN201305UV02" inputName="RespondingGateway_PRPA_IN201305UV02Request" isOneWay="false" name="RespondingGateway_PRPA_IN201305UV02" outputName="RespondingGateway_PRPA_IN201306UV02Response" receivesAttachments="false" sendsAttachments="false" type="Request-Response" anonymous="optional">
			<con:settings/>
		</con:operation>
	</con:interface>
	<con:interface anonymous="optional" bindingName="{urn:gov:hhs:fha:nhinc:entitypatientdiscoveryasyncreq}EntityPatientDiscoveryAsyncReqBindingSoap" definition="../../../target/wsdl/EntityPatientDiscoveryAsyncReq.wsdl" name="EntityPatientDiscoveryAsyncReqBindingSoap" soapVersion="1_2" type="wsdl" wsaVersion="NONE" xsi:type="con:WsdlInterface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:settings/>

		<con:endpoints>
			<con:endpoint>${#TestSuite#Endpoint-PatientDiscoveryAsyncReq}</con:endpoint>
			<con:endpoint>http://localhost/NhinConnect/EntityPatientDiscoveryAsyncReq</con:endpoint>
		</con:endpoints>
		<con:operation action="urn:ProcessPatientDiscoveryAsyncReq" anonymous="optional" bindingOperationName="ProcessPatientDiscoveryAsyncReq" inputName="ProcessPatientDiscoveryAsyncReqAsyncRequest" isOneWay="false" name="ProcessPatientDiscoveryAsyncReq" outputName="ProcessPatientDiscoveryAsyncReqAsyncResponse" receivesAttachments="false" sendsAttachments="false" type="Request-Response">
			<con:settings/>
		</con:operation>
	</con:interface>
	<con:interface anonymous="optional" bindingName="{urn:gov:hhs:fha:nhinc:entitydocretrieve}EntityDocRetrieveBindingSoap" definition="../../../target/wsdl/EntityDocRetrieve.wsdl" name="EntityDocRetrieveBindingSoap" soapVersion="1_2" type="wsdl" wsaVersion="NONE" xsi:type="con:WsdlInterface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:settings/>

		<con:endpoints>
			<con:endpoint>http://localhost:${HttpDefaultPort}/NhinConnect/EntityDocRetrieve</con:endpoint>
			<con:endpoint>http://localhost:${HttpDefaultPort}/Gateway/DocumentRetrieve/2_0/EntityService/EntityDocRetrieve</con:endpoint>
		</con:endpoints>
		<con:operation action="urn:gov:hhs:fha:nhinc:entitydocretrieve:RespondingGateway_CrossGatewayRetrieveRequestMessage" anonymous="optional" bindingOperationName="RespondingGateway_CrossGatewayRetrieve" inputName="RespondingGateway_CrossGatewayRetrieveRequest" isOneWay="false" name="RespondingGateway_CrossGatewayRetrieve" outputName="RespondingGateway_CrossGatewayRetrieveResponse" receivesAttachments="false" sendsAttachments="false" type="Request-Response">
			<con:settings/>
		</con:operation>
	</con:interface>
	<con:interface anonymous="optional" bindingName="{urn:gov:hhs:fha:nhinc:entitypatientdiscoveryasyncresp}EntityPatientDiscoveryAsyncRespBindingSoap" definition="../../../target/wsdl/EntityPatientDiscoveryAsyncResp.wsdl" name="EntityPatientDiscoveryAsyncRespBindingSoap" soapVersion="1_2" type="wsdl" wsaVersion="NONE" xsi:type="con:WsdlInterface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:settings/>

		<con:endpoints>
			<con:endpoint>http://localhost/NhinConnect/EntityPatientDiscoveryAsyncResp</con:endpoint>
			<con:endpoint>${#TestSuite#Endpoint-PatientDiscoveryAsyncResp}</con:endpoint>
			<con:endpoint>http://localhost:${HttpDefaultPort}/Gateway/PatientDiscovery/1_0/EntityService/EntityPatientDiscoveryDeferredResponseUnsecured</con:endpoint>
		</con:endpoints>
		<con:operation action="" bindingOperationName="ProcessPatientDiscoveryAsyncResp" inputName="ProcessPatientDiscoveryAsyncRespAsyncRequest" isOneWay="false" name="ProcessPatientDiscoveryAsyncResp" outputName="ProcessPatientDiscoveryAsyncRespAsyncResponse" receivesAttachments="false" sendsAttachments="false" type="Request-Response" anonymous="optional">
			<con:settings/>
		</con:operation>
	</con:interface>
	<con:interface anonymous="optional" bindingName="{urn:gov:hhs:fha:nhinc:entitydocquery}EntityDocQueryBindingSoap" definition="../../../target/wsdl/EntityDocQuery.wsdl" name="EntityDocQueryBindingSoap" soapVersion="1_2" type="wsdl" wsaVersion="NONE" xsi:type="con:WsdlInterface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:settings/>

		<con:endpoints>
			<con:endpoint>http://localhost:${HttpDefaultPort}/NhinConnect/EntityDocQuery</con:endpoint>
			<con:endpoint>http://localhost:${HttpDefaultPort}/Gateway/DocumentQuery/2_0/EntityService/EntityDocQueryUnsecured</con:endpoint>
		</con:endpoints>
		<con:operation action="urn:gov:hhs:fha:nhinc:entitydocquery:RespondingGateway_CrossGatewayQueryRequest" anonymous="optional" bindingOperationName="RespondingGateway_CrossGatewayQuery" inputName="RespondingGateway_CrossGatewayQueryRequest" isOneWay="false" name="RespondingGateway_CrossGatewayQuery" outputName="RespondingGateway_CrossGatewayQueryResponse" receivesAttachments="false" sendsAttachments="false" type="Request-Response">
			<con:settings/>
		</con:operation>
	</con:interface>
	<con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="AdministrativeDistribution_Binding_Soap12_g0" type="wsdl" bindingName="{urn:gov:hhs:fha:nhinc:entityadmindistribution}AdministrativeDistribution_Binding_Soap12" soapVersion="1_2" anonymous="optional" definition="../../../target/wsdl/EntityAdminDist.wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:settings/>
		<con:endpoints>
			<con:endpoint>http://localhost:${HttpDefaultPort}/Gateway/AdminDistribution/1_0/AdministrativeDistribution_Service</con:endpoint>
		</con:endpoints>
		<con:operation isOneWay="false" action="urn:oasis:names:tc:emergency:EDXL:DE:1.0:SendAlertMessage" name="SendAlertMessage" bindingOperationName="SendAlertMessage" type="One-Way" inputName="" sendsAttachments="false" anonymous="optional">
			<con:settings/>
		</con:operation>
	</con:interface>
	<con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="AdapterPatientDiscoveryBindingSoap" type="wsdl" bindingName="{urn:gov:hhs:fha:nhinc:adapterpatientdiscovery}AdapterPatientDiscoveryBindingSoap" soapVersion="1_2" anonymous="optional" definition="../../../target/wsdl/AdapterPatientDiscovery.wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:endpoints><con:endpoint>https://localhost:${HttpsDefaultPort}/Adapter/PatientDiscovery/A_0/AdapterPatientDiscovery</con:endpoint></con:endpoints><con:operation isOneWay="false" action="urn:RespondingGateway_PRPA_IN201305UV02" name="RespondingGateway_PRPA_IN201305UV02" bindingOperationName="RespondingGateway_PRPA_IN201305UV02" type="Request-Response" outputName="RespondingGateway_PRPA_IN201306UV02Response" inputName="RespondingGateway_PRPA_IN201305UV02Request" receivesAttachments="false" sendsAttachments="false"><con:settings/></con:operation></con:interface><con:testSuite name="g1">
		<con:settings/>
		<con:runType>SEQUENTIAL</con:runType>
		<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Document Submission Deferred Req" searchProperties="true" id="7e685188-254a-4e21-9f18-98674d0f4a82">
			<con:settings/>
			<con:testStep type="groovy" name="Clear Audit Logs">
				<con:settings/>
				<con:config>
					<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
			}</script>
			</con:config>
		</con:testStep>
		<con:testStep name="Doc Submission Deferred Req" type="request">
			<con:settings/>
			<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
				<con:interface>EntityXDRAsyncRequest_Binding</con:interface>
				<con:operation>ProvideAndRegisterDocumentSet-bAsyncRequest</con:operation>
				<con:request incomingWss="" name="Doc Submission Deferred Req" outgoingWss="" useWsAddressing="true" wssPasswordType="">
					<con:settings>
						<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
			</con:settings>
			<con:encoding>UTF-8</con:encoding>
			<con:endpoint>${#TestSuite#Endpoint-EntityXDRRequest}</con:endpoint>
			<con:request><![CDATA[

					<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:urn2="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:urn3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:urn4="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:urn5="urn:ihe:iti:xds-b:2007">
   <soap:Header/>
   <soap:Body testSuite="Entity_g1" testCase="Document Submission Deferred Req">
      <urn:RespondingGateway_ProvideAndRegisterDocumentSetRequest>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>AddrCity</urn1:city>
               <urn1:country>AddrCountry</urn1:country>
               <urn1:state>AddrState</urn1:state>
               <urn1:streetAddress>AddrStreet</urn1:streetAddress>
               <urn1:zipCode>AddrZip</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>06/04/1959 05:21:00</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>Electronic</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>false</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>false</urn1:haveSignature>
            <urn1:haveWitnessSignature>false</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>${#Project#LocalHCDescription}</urn1:description>
               <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
               <urn1:name>${#Project#LocalHCDescription}</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sandy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
               <urn1:fullName>Sandy S. Smith</urn1:fullName>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5436</urn1:extension>
               <urn1:localNumber>253-6849</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>Addr2City</urn1:city>
               <urn1:country>Addr2Country</urn1:country>
               <urn1:state>Addr2State</urn1:state>
               <urn1:streetAddress>Addr2Street</urn1:streetAddress>
               <urn1:zipCode>Addr2Zip</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sammy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>s</urn1:secondNameOrInitials>
               <urn1:fullName>Sammy S. Smith</urn1:fullName>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5424</urn1:extension>
               <urn1:localNumber>542-6823</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>253-98-7546</urn1:SSN>
            <urn1:uniquePatientId>500000000^^^&1.1&ISO</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>addrCode</urn1:code>
                  <urn1:codeSystem>addrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>addrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>addrCode</urn1:displayName>
                  <urn1:originalText>addrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>Burnell</urn1:city>
               <urn1:country>USA</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>825 North</urn1:streetAddress>
               <urn1:zipCode>32184</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Scott</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S.</urn1:secondNameOrInitials>
               <urn1:fullName>Scott S. Smith</urn1:fullName>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>8432</urn1:extension>
               <urn1:localNumber>985-2239</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>Skagerberg</urn1:familyName>
                  <urn1:givenName>Karl</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>nameCode</urn1:code>
                     <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                     <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                     <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                     <urn1:displayName>nameCode</urn1:displayName>
                     <urn1:originalText>nameCode</urn1:originalText>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
                  <urn1:fullName>Kasrl S. Skagerberg</urn1:fullName>
               </urn1:personName>
               <urn1:userName>kskagerb</urn1:userName>
               <urn1:org>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:org>
               <urn1:roleCoded>
                  <urn1:code>307969004</urn1:code>
                  <urn1:codeSystem>2.16.840.1.113883.6.96</urn1:codeSystem>
                  <urn1:codeSystemName>SNOMED_CT</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>Public Health</urn1:displayName>
                  <urn1:originalText>Public Health</urn1:originalText>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>true</urn1:authorized>
            <urn1:purposeOfDisclosureCoded>
               <urn1:code>PUBLICHEALTHKIERAN</urn1:code>
               <urn1:codeSystem>2.16.840.1.113883.3.18.7.1</urn1:codeSystem>
               <urn1:codeSystemName>nhin-purpose</urn1:codeSystemName>
               <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
               <urn1:displayName>Use or disclosure of Psychotherapy Notes</urn1:displayName>
               <urn1:originalText>Use or disclosure of Psychotherapy Notes</urn1:originalText>
            </urn1:purposeOfDisclosureCoded>
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-04-16T13:15:39Z</urn1:authInstant>
               <urn1:sessionIndex>987</urn1:sessionIndex>
               <urn1:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>158.147.185.168</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>cs.myharris.net</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn1:resource>
               <urn1:action>TestSaml</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn1:id>
                     <urn1:issueInstant>2009-04-16T13:10:39.093Z</urn1:issueInstant>
                     <urn1:version>2.0</urn1:version>
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <urn1:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn1:issuer>
                     <urn1:conditions>
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <urn1:accessConsentPolicy>Claim-Ref-1234</urn1:accessConsentPolicy>
                     <urn1:instanceAccessConsentPolicy>Claim-Instance-1</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
         </urn:assertion>

         <urn:nhinTargetCommunities>
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
            </urn1:nhinTargetCommunity>
         </urn:nhinTargetCommunities>

         <urn:ProvideAndRegisterDocumentSetRequest>
            <urn2:SubmitObjectsRequest id="123" comment="comme">
               <!--Optional:-->

               <urn4:RegistryObjectList>
                  <urn4:ExtrinsicObject id="Document01" mimeType="text/xml" objectType="urn:uuid:7edca82f-054d-47f2-a032-9b2a5b5186c1">
                     <urn4:Slot name="creationTime">
                        <urn4:ValueList>
                           <urn4:Value>20051224</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="languageCode">
                        <urn4:ValueList>
                           <urn4:Value>en-us</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="serviceStartTime">
                        <urn4:ValueList>
                           <urn4:Value>200412230800</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="serviceStopTime">
                        <urn4:ValueList>
                           <urn4:Value>200412230801</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="sourcePatientId">
                        <urn4:ValueList>
                           <urn4:Value>ST-1000^^^&1.3.6.1.4.1.21367.2003.3.9&ISO</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="sourcePatientInfo">
                        <urn4:ValueList>
                           <urn4:Value>PID-3|ST-1000^^^&1.3.6.1.4.1.21367.2003.3.9&ISO</urn4:Value>
                           <urn4:Value>PID-5|Doe^John^^^</urn4:Value>
                           <urn4:Value>PID-7|19560527</urn4:Value>
                           <urn4:Value>PID-8|M</urn4:Value>
                           <urn4:Value>PID-11|100 Main St^^Metropolis^Il^44130^USA</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Name>
                        <urn4:LocalizedString value="Physical"/>
                     </urn4:Name>
                     <urn4:Description/>
                     <urn4:Classification id="cl01" classificationScheme="urn:uuid:93606bcf-9494-43ec-9b4e-a7748d1a838d" classifiedObject="Document01">
                        <urn4:Slot name="authorPerson">
                           <urn4:ValueList>
                              <urn4:Value>Gerald Smitty</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorInstitution">
                           <urn4:ValueList>
                              <urn4:Value>Cleveland Clinic</urn4:Value>
                              <urn4:Value>Parma Community</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorRole">
                           <urn4:ValueList>
                              <urn4:Value>Attending</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorSpecialty">
                           <urn4:ValueList>
                              <urn4:Value>Orthopedic</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                     </urn4:Classification>
                     <urn4:Classification id="cl02" classificationScheme="urn:uuid:41a5887f-8865-4c09-adf7-e362475b143a" classifiedObject="Document01" nodeRepresentation="History and Physical">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon classCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="History and Physical"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl03" classificationScheme="urn:uuid:f4f85eac-e6cb-4883-b524-f2705394840f" classifiedObject="Document01" nodeRepresentation="1.3.6.1.4.1.21367.2006.7.101">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon confidentialityCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="Clinical-Staff"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl04" classificationScheme="urn:uuid:a09d5840-386c-46f2-b5ad-9c3699a4309d" classifiedObject="Document01" nodeRepresentation="CDAR2/IHE 1.0">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon formatCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="CDAR2/IHE 1.0"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl05" classificationScheme="urn:uuid:f33fb8ac-18af-42cc-ae0e-ed0b0bdb91e1" classifiedObject="Document01" nodeRepresentation="Outpatient">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon healthcareFacilityTypeCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="Outpatient"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl06" classificationScheme="urn:uuid:cccf5598-8b07-4b77-a05e-ae952c785ead" classifiedObject="Document01" nodeRepresentation="General Medicine">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon practiceSettingCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="General Medicine"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl07" classificationScheme="urn:uuid:f0306f51-975f-434e-a61c-c59651d33983" classifiedObject="Document01" nodeRepresentation="34108-1">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>LOINC</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="Outpatient Evaluation And Management"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:ExternalIdentifier id="ei01" registryObject="Document01" identificationScheme="urn:uuid:58a6f841-87b3-4a3e-92fd-a8ffeff98427" value="SELF-5^^^&1.3.6.1.4.1.21367.2005.3.7&ISO">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSDocumentEntry.patientId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                     <urn4:ExternalIdentifier id="ei02" registryObject="Document01" identificationScheme="urn:uuid:2e82c1f6-a085-4c72-9da3-8640a32e42ab" value="1.3.6.1.4.1.21367.2005.3.9999.32">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSDocumentEntry.uniqueId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                  </urn4:ExtrinsicObject>
                  <urn4:RegistryPackage id="SubmissionSet01">
                     <urn4:Slot name="submissionTime">
                        <urn4:ValueList>
                           <urn4:Value>20041225235050</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Name>
                        <urn4:LocalizedString value="Physical"/>
                     </urn4:Name>
                     <urn4:Description>
                        <urn4:LocalizedString value="Annual physical"/>
                     </urn4:Description>
                     <urn4:Classification id="cl08" classificationScheme="urn:uuid:a7058bb9-b4e4-4307-ba5b-e3f0ab85e12d" classifiedObject="SubmissionSet01">
                        <urn4:Slot name="authorPerson">
                           <urn4:ValueList>
                              <urn4:Value>Sherry Dopplemeyer</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorInstitution">
                           <urn4:ValueList>
                              <urn4:Value>Cleveland Clinic</urn4:Value>
                              <urn4:Value>Berea Community</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorRole">
                           <urn4:ValueList>
                              <urn4:Value>Purn4ary Surgon</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorSpecialty">
                           <urn4:ValueList>
                              <urn4:Value>Orthopedic</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                     </urn4:Classification>
                     <urn4:Classification id="cl09" classificationScheme="urn:uuid:aa543740-bdda-424e-8c96-df4873be8500" classifiedObject="SubmissionSet01" nodeRepresentation="History and Physical">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon contentTypeCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="History and Physical"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:ExternalIdentifier id="ei03" registryObject="SubmissionSet01" identificationScheme="urn:uuid:96fdda7c-d067-4183-912e-bf5ee74998a8" value="1.3.6.1.4.1.21367.2005.3.9999.33">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSSubmissionSet.uniqueId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                     <urn4:ExternalIdentifier id="ei04" registryObject="SubmissionSet01" identificationScheme="urn:uuid:554ac39e-e3fe-47fe-b233-965d2a147832" value="3670984664">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSSubmissionSet.sourceId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                     <urn4:ExternalIdentifier id="ei05" registryObject="SubmissionSet01" identificationScheme="urn:uuid:6b5aea1a-874d-4603-a4bc-96a0a7b38446" value="SELF-5^^^&1.3.6.1.4.1.21367.2005.3.7&ISO">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSSubmissionSet.patientId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                  </urn4:RegistryPackage>
                  <urn4:Classification id="cl10" classifiedObject="SubmissionSet01" classificationNode="urn:uuid:a54d6aa5-d40d-43f9-88c5-b4633d873bdd"/>
                  <urn4:Association id="as01" associationType="HasMember" sourceObject="SubmissionSet01" targetObject="Document01">
                     <urn4:Slot name="SubmissionSetStatus">
                        <urn4:ValueList>
                           <urn4:Value>Original</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                  </urn4:Association>
               </urn4:RegistryObjectList>

            </urn2:SubmitObjectsRequest>
            <!--1 or more repetitions:-->
            <urn5:Document id="Document01">UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</urn5:Document>
         </urn:ProvideAndRegisterDocumentSetRequest>
      </urn:RespondingGateway_ProvideAndRegisterDocumentSetRequest>
   </soap:Body>
</soap:Envelope>]]></con:request>
			<con:assertion type="SOAP Response"/>
			<con:assertion type="SOAP Fault Assertion"/>
			<con:assertion name="Match content of [@status]" type="XPath Match">
				<con:configuration>
					<path>declare namespace ns10='http://www.hhs.gov/healthit/nhin';
							//ns10:XDRAcknowledgement[1]/ns10:message[1]/@status</path>
					<content>urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:RequestAccepted</content>
					<allowWildcards>false</allowWildcards>
					<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
				</con:configuration>
			</con:assertion>
			<con:assertion name="Schema Compliance" type="Schema Compliance">
				<con:configuration>
					<definition/>
				</con:configuration>
			</con:assertion>
			<con:credentials>
				<con:authType>Global HTTP Settings</con:authType>
			</con:credentials>
			<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
			<con:jmsPropertyConfig/>
			<con:wsaConfig action="urn:gov:hhs:fha:nhinc:nhincentityxdr:async:request:ProvideAndRegisterDocumentSet-bAsyncRequest_RequestMessage" generateMessageId="true" mustUnderstand="NONE" version="200508"/>
			<con:wsrmConfig version="1.2"/>
		</con:request>
	</con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config><script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script></con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");
</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2014-04-01T18:06:44Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2014-04-01T18:16:44Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>04/01/2014 18:06:44</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2014-05-01T00:00:00Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>

<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Document Submission Deferred Resp" searchProperties="true" id="28f122a1-cdca-487c-ba68-f9d985f97826">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
			}</script>
	</con:config>
</con:testStep>
<con:testStep name="Doc Submission Deferred Resp" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityXDRAsyncResponse_Binding</con:interface>
		<con:operation>ProvideAndRegisterDocumentSet-bAsyncResponse</con:operation>
		<con:request name="Doc Submission Deferred Resp">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-DSDeferredResp}</con:endpoint>
	<con:request><![CDATA[

			<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:urn2="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:urn3="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
   <soap:Header/>
   <soap:Body>
      <urn:RespondingGateway_ProvideAndRegisterDocumentSetResponseRequest>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:addressType>
               <urn1:city>AddrCity</urn1:city>
               <urn1:country>AddrCountry</urn1:country>
               <urn1:state>AddrState</urn1:state>
               <urn1:streetAddress>AddrStreet</urn1:streetAddress>
               <urn1:zipCode>AddrZip</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>06/04/1959 05:21:00</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>Electronic</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>false</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>false</urn1:haveSignature>
            <urn1:haveWitnessSignature>false</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>${#Project#LocalHCDescription}</urn1:description>
               <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
               <urn1:name>${#Project#LocalHCDescription}</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sandy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
               <urn1:fullName>Sandy S. Smith</urn1:fullName>
               <urn1:prefix>Ms.</urn1:prefix>
               <urn1:suffix>?</urn1:suffix>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5436</urn1:extension>
               <urn1:localNumber>253-6849</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:addressType>
               <urn1:city>Addr2City</urn1:city>
               <urn1:country>Addr2Country</urn1:country>
               <urn1:state>Addr2State</urn1:state>
               <urn1:streetAddress>Addr2Street</urn1:streetAddress>
               <urn1:zipCode>Addr2Zip</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sammy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:nameType>
               <urn1:secondNameOrInitials>s</urn1:secondNameOrInitials>
               <urn1:fullName>Sammy S. Smith</urn1:fullName>
               <urn1:prefix>Mr.</urn1:prefix>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5424</urn1:extension>
               <urn1:localNumber>542-6823</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>253-98-7546</urn1:SSN>
            <!--1 or more repetitions:-->
            <urn1:uniquePatientId>500000000^^^&1.1&ISO</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>addrCode</urn1:code>
                  <urn1:codeSystem>addrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>addrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>?addrCode</urn1:displayName>
                  <urn1:originalText>addrCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:addressType>
               <urn1:city>Burnell</urn1:city>
               <urn1:country>USA</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>825 North</urn1:streetAddress>
               <urn1:zipCode>32184</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Scott</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
               <urn1:fullName>Scott S. Smith</urn1:fullName>
               <urn1:prefix>Mr.</urn1:prefix>
               <urn1:suffix>?</urn1:suffix>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>8432</urn1:extension>
               <urn1:localNumber>985-2239</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>SkagerBerg</urn1:familyName>
                  <urn1:givenName>Karl</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>nameCode</urn1:code>
                     <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                     <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                     <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                     <urn1:displayName>nameCode</urn1:displayName>
                     <urn1:originalText>nameCode</urn1:originalText>
                     <!--Zero or more repetitions:-->
                     <urn1:translation/>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
                  <urn1:fullName>Karl S. Skagerberg</urn1:fullName>
                  <urn1:prefix>?</urn1:prefix>
                  <urn1:suffix>?</urn1:suffix>
               </urn1:personName>
               <urn1:userName>kskagerb</urn1:userName>
               <urn1:org>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:org>
               <!--Optional:-->
               <urn1:roleCoded>
                  <urn1:code>307969004</urn1:code>
                  <urn1:codeSystem>2.16.840.1.113883.6.96</urn1:codeSystem>
                  <urn1:codeSystemName>SNOMED_CT</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>Public Health</urn1:displayName>
                  <urn1:originalText>Public Health</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>true</urn1:authorized>
            <!--Optional:-->
            <urn1:purposeOfDisclosureCoded>
               <urn1:code>PUBLICHEALTHKIERAN</urn1:code>
               <urn1:codeSystem>2.16.840.1.113883.3.18.7.1</urn1:codeSystem>
               <urn1:codeSystemName>nhin-purpose</urn1:codeSystemName>
               <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
               <urn1:displayName>Use or disclosure of Psychotherapy notes</urn1:displayName>
               <urn1:originalText>Use or disclosure of Psychotherapy notes</urn1:originalText>
               <!--Zero or more repetitions:-->
               <urn1:translation/>
            </urn1:purposeOfDisclosureCoded>
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-04-16T13:15:39Z</urn1:authInstant>
               <urn1:sessionIndex>987</urn1:sessionIndex>
               <urn1:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>158.147.185.168</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>cs.myharris.net</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn1:resource>
               <urn1:action>TestSaml</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn1:id>
                     <urn1:issueInstant>2009-04-16T13:10:39.093Z</urn1:issueInstant>
                     <!--Optional:-->
                     <urn1:version>2.0</urn1:version>
                     <!--Optional:-->
                     <urn1:issuer>CN=SAML User,OU=Harris,0=HITS,L=Melbourne,ST=FL,C=US</urn1:issuer>
                     <!--Optional:-->
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <!--Optional:-->
                     <urn1:conditions>
                        <!--Optional:-->
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <!--Optional:-->
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <!--Zero or more repetitions:-->
                     <urn1:accessConsentPolicy>Claim-Ref-1234</urn1:accessConsentPolicy>
                     <!--Zero or more repetitions:-->
                     <urn1:instanceAccessConsentPolicy>Claim-Instance-1</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
            <!--Optional:-->
            <urn1:samlSignature>
               <!--Optional:-->
               <urn1:keyInfo>
                  <!--Optional:-->
                  <urn1:rsaKeyValueModulus>cid:721645965035</urn1:rsaKeyValueModulus>
                  <!--Optional:-->
                  <urn1:rsaKeyValueExponent>cid:146207300753</urn1:rsaKeyValueExponent>
               </urn1:keyInfo>
               <!--Optional:-->
               <urn1:signatureValue>cid:783710993742</urn1:signatureValue>
            </urn1:samlSignature>
            <!--Optional:-->
            <urn1:samlIssuer>
               <!--Optional:-->
               <urn1:issuer>?</urn1:issuer>
               <!--Optional:-->
               <urn1:issuerFormat>?</urn1:issuerFormat>
            </urn1:samlIssuer>
            <!--Optional:-->
            <urn1:messageId>?</urn1:messageId>
            <!--1 or more repetitions:-->
            <urn1:relatesToList>uuid:088a26e8-6b03-4bf8-84f1-737dc94be2e0</urn1:relatesToList>
         </urn:assertion>
         <!--Optional:-->
         <urn:nhinTargetCommunities>
            <!--1 or more repetitions:-->
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
            </urn1:nhinTargetCommunity>
         </urn:nhinTargetCommunities>
         <urn:RegistryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success" requestId="?"><!--Optional:-->
            <urn2:ResponseSlotList>
               <!--Zero or more repetitions:-->
               <urn3:Slot name="?" slotType="?">
                  <urn3:ValueList>
                     <urn3:Value>?</urn3:Value>
                  </urn3:ValueList>
               </urn3:Slot>
            </urn2:ResponseSlotList>
            <!--Optional:-->
            <urn2:RegistryErrorList highestSeverity="?">
               <!--1 or more repetitions:-->
               <urn2:RegistryError codeContext="?" errorCode="?" severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error" location="?">?</urn2:RegistryError>
            </urn2:RegistryErrorList>
         </urn:RegistryResponse>
      </urn:RespondingGateway_ProvideAndRegisterDocumentSetResponseRequest>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion type="Schema Compliance">
		<con:configuration/>
	</con:assertion>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion type="XPath Match">
		<con:configuration>
			<path>declare namespace ns10='http://www.hhs.gov/healthit/nhin';
					//ns10:XDRAcknowledgement[1]/ns10:message[1]/@status</path>
			<content>urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:ResponseAccepted</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2014-04-01T18:06:46Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2014-04-01T18:16:46Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>04/01/2014 18:06:46</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2014-05-01T00:00:00Z</con:value>
	</con:property>
</con:properties>
</con:testCase>
<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Document Submission" searchProperties="true" id="bfb21e63-366d-4679-9fe6-33293702838f">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>
<con:testStep name="Doc Submission" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityXDR_Binding</con:interface>
		<con:operation>ProvideAndRegisterDocumentSet-b</con:operation>
		<con:request incomingWss="" name="Doc Submission" outgoingWss="" wssPasswordType="">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-XDREntity}</con:endpoint>
	<con:request><![CDATA[

			<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:add="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:urn2="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:urn3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:urn4="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:urn5="urn:ihe:iti:xds-b:2007">
   <soap:Header/>
   <soap:Body testSuite="Entity_g1" testCase="Document Submission">
      <urn:RespondingGateway_ProvideAndRegisterDocumentSetRequest>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>AddrCity</urn1:city>
               <urn1:country>AddrCountry</urn1:country>
               <urn1:state>AddrState</urn1:state>
               <urn1:streetAddress>AddrStreet</urn1:streetAddress>
               <urn1:zipCode>AddrZip</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>06/04/1959 05:21:00</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>Electronic</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>false</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>false</urn1:haveSignature>
            <urn1:haveWitnessSignature>false</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>${#Project#LocalHCDescription}</urn1:description>
               <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
               <urn1:name>${#Project#LocalHCDescription}</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sandy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
               <urn1:fullName>Sandy S. Smith</urn1:fullName>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5436</urn1:extension>
               <urn1:localNumber>253-6849</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>Addr2City</urn1:city>
               <urn1:country>Addr2Country</urn1:country>
               <urn1:state>Addr2State</urn1:state>
               <urn1:streetAddress>Addr2Street</urn1:streetAddress>
               <urn1:zipCode>Addr2Zip</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sammy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>s</urn1:secondNameOrInitials>
               <urn1:fullName>Sammy S. Smith</urn1:fullName>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5424</urn1:extension>
               <urn1:localNumber>542-6823</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>253-98-7546</urn1:SSN>
            <urn1:uniquePatientId>500000000^^^&1.1&ISO</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>addrCode</urn1:code>
                  <urn1:codeSystem>addrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>addrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>addrCode</urn1:displayName>
                  <urn1:originalText>addrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>Burnell</urn1:city>
               <urn1:country>USA</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>825 North</urn1:streetAddress>
               <urn1:zipCode>32184</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Scott</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S.</urn1:secondNameOrInitials>
               <urn1:fullName>Scott S. Smith</urn1:fullName>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>8432</urn1:extension>
               <urn1:localNumber>985-2239</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>Skagerberg</urn1:familyName>
                  <urn1:givenName>Karl</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>nameCode</urn1:code>
                     <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                     <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                     <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                     <urn1:displayName>nameCode</urn1:displayName>
                     <urn1:originalText>nameCode</urn1:originalText>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
                  <urn1:fullName>Kasrl S. Skagerberg</urn1:fullName>
               </urn1:personName>
               <urn1:userName>kskagerb</urn1:userName>
               <urn1:org>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:org>
               <urn1:roleCoded>
                  <urn1:code>307969004</urn1:code>
                  <urn1:codeSystem>2.16.840.1.113883.6.96</urn1:codeSystem>
                  <urn1:codeSystemName>SNOMED_CT</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>Public Health</urn1:displayName>
                  <urn1:originalText>Public Health</urn1:originalText>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>true</urn1:authorized>
            <urn1:purposeOfDisclosureCoded>
               <urn1:code>PUBLICHEALTHKIERAN</urn1:code>
               <urn1:codeSystem>2.16.840.1.113883.3.18.7.1</urn1:codeSystem>
               <urn1:codeSystemName>nhin-purpose</urn1:codeSystemName>
               <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
               <urn1:displayName>Use or disclosure of Psychotherapy Notes</urn1:displayName>
               <urn1:originalText>Use or disclosure of Psychotherapy Notes</urn1:originalText>
            </urn1:purposeOfDisclosureCoded>
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-04-16T13:15:39Z</urn1:authInstant>
               <urn1:sessionIndex>987</urn1:sessionIndex>
               <urn1:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>158.147.185.168</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>cs.myharris.net</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn1:resource>
               <urn1:action>TestSaml</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn1:id>
                     <urn1:issueInstant>2009-04-16T13:10:39.093Z</urn1:issueInstant>
                     <urn1:version>2.0</urn1:version>
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <urn1:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn1:issuer>
                     <urn1:conditions>
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <urn1:accessConsentPolicy>Claim-Ref-1234</urn1:accessConsentPolicy>
                     <urn1:instanceAccessConsentPolicy>Claim-Instance-1</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
         </urn:assertion>

         <urn:nhinTargetCommunities>
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
            </urn1:nhinTargetCommunity>
         </urn:nhinTargetCommunities>

         <urn:ProvideAndRegisterDocumentSetRequest>
            <urn2:SubmitObjectsRequest id="123" comment="comme">
               <!--Optional:-->

               <urn4:RegistryObjectList>
                  <urn4:ExtrinsicObject id="Document01" mimeType="text/xml" objectType="urn:uuid:7edca82f-054d-47f2-a032-9b2a5b5186c1">
                     <urn4:Slot name="creationTime">
                        <urn4:ValueList>
                           <urn4:Value>20051224</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="languageCode">
                        <urn4:ValueList>
                           <urn4:Value>en-us</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="serviceStartTime">
                        <urn4:ValueList>
                           <urn4:Value>200412230800</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="serviceStopTime">
                        <urn4:ValueList>
                           <urn4:Value>200412230801</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="sourcePatientId">
                        <urn4:ValueList>
                           <urn4:Value>ST-1000^^^&1.3.6.1.4.1.21367.2003.3.9&ISO</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="sourcePatientInfo">
                        <urn4:ValueList>
                           <urn4:Value>PID-3|ST-1000^^^&1.3.6.1.4.1.21367.2003.3.9&ISO</urn4:Value>
                           <urn4:Value>PID-5|Doe^John^^^</urn4:Value>
                           <urn4:Value>PID-7|19560527</urn4:Value>
                           <urn4:Value>PID-8|M</urn4:Value>
                           <urn4:Value>PID-11|100 Main St^^Metropolis^Il^44130^USA</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Name>
                        <urn4:LocalizedString value="Physical"/>
                     </urn4:Name>
                     <urn4:Description/>
                     <urn4:Classification id="cl01" classificationScheme="urn:uuid:93606bcf-9494-43ec-9b4e-a7748d1a838d" classifiedObject="Document01">
                        <urn4:Slot name="authorPerson">
                           <urn4:ValueList>
                              <urn4:Value>Gerald Smitty</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorInstitution">
                           <urn4:ValueList>
                              <urn4:Value>Cleveland Clinic</urn4:Value>
                              <urn4:Value>Parma Community</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorRole">
                           <urn4:ValueList>
                              <urn4:Value>Attending</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorSpecialty">
                           <urn4:ValueList>
                              <urn4:Value>Orthopedic</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                     </urn4:Classification>
                     <urn4:Classification id="cl02" classificationScheme="urn:uuid:41a5887f-8865-4c09-adf7-e362475b143a" classifiedObject="Document01" nodeRepresentation="History and Physical">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon classCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="History and Physical"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl03" classificationScheme="urn:uuid:f4f85eac-e6cb-4883-b524-f2705394840f" classifiedObject="Document01" nodeRepresentation="1.3.6.1.4.1.21367.2006.7.101">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon confidentialityCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="Clinical-Staff"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl04" classificationScheme="urn:uuid:a09d5840-386c-46f2-b5ad-9c3699a4309d" classifiedObject="Document01" nodeRepresentation="CDAR2/IHE 1.0">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon formatCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="CDAR2/IHE 1.0"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl05" classificationScheme="urn:uuid:f33fb8ac-18af-42cc-ae0e-ed0b0bdb91e1" classifiedObject="Document01" nodeRepresentation="Outpatient">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon healthcareFacilityTypeCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="Outpatient"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl06" classificationScheme="urn:uuid:cccf5598-8b07-4b77-a05e-ae952c785ead" classifiedObject="Document01" nodeRepresentation="General Medicine">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon practiceSettingCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="General Medicine"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl07" classificationScheme="urn:uuid:f0306f51-975f-434e-a61c-c59651d33983" classifiedObject="Document01" nodeRepresentation="34108-1">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>LOINC</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="Outpatient Evaluation And Management"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:ExternalIdentifier id="ei01" registryObject="Document01" identificationScheme="urn:uuid:58a6f841-87b3-4a3e-92fd-a8ffeff98427" value="SELF-5^^^&1.3.6.1.4.1.21367.2005.3.7&ISO">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSDocumentEntry.patientId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                     <urn4:ExternalIdentifier id="ei02" registryObject="Document01" identificationScheme="urn:uuid:2e82c1f6-a085-4c72-9da3-8640a32e42ab" value="1.3.6.1.4.1.21367.2005.3.9999.32">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSDocumentEntry.uniqueId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                  </urn4:ExtrinsicObject>
                  <urn4:RegistryPackage id="SubmissionSet01">
                     <urn4:Slot name="submissionTime">
                        <urn4:ValueList>
                           <urn4:Value>20041225235050</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Name>
                        <urn4:LocalizedString value="Physical"/>
                     </urn4:Name>
                     <urn4:Description>
                        <urn4:LocalizedString value="Annual physical"/>
                     </urn4:Description>
                     <urn4:Classification id="cl08" classificationScheme="urn:uuid:a7058bb9-b4e4-4307-ba5b-e3f0ab85e12d" classifiedObject="SubmissionSet01">
                        <urn4:Slot name="authorPerson">
                           <urn4:ValueList>
                              <urn4:Value>Sherry Dopplemeyer</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorInstitution">
                           <urn4:ValueList>
                              <urn4:Value>Cleveland Clinic</urn4:Value>
                              <urn4:Value>Berea Community</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorRole">
                           <urn4:ValueList>
                              <urn4:Value>Purn4ary Surgon</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorSpecialty">
                           <urn4:ValueList>
                              <urn4:Value>Orthopedic</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                     </urn4:Classification>
                     <urn4:Classification id="cl09" classificationScheme="urn:uuid:aa543740-bdda-424e-8c96-df4873be8500" classifiedObject="SubmissionSet01" nodeRepresentation="History and Physical">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon contentTypeCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="History and Physical"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:ExternalIdentifier id="ei03" registryObject="SubmissionSet01" identificationScheme="urn:uuid:96fdda7c-d067-4183-912e-bf5ee74998a8" value="1.3.6.1.4.1.21367.2005.3.9999.33">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSSubmissionSet.uniqueId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                     <urn4:ExternalIdentifier id="ei04" registryObject="SubmissionSet01" identificationScheme="urn:uuid:554ac39e-e3fe-47fe-b233-965d2a147832" value="3670984664">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSSubmissionSet.sourceId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                     <urn4:ExternalIdentifier id="ei05" registryObject="SubmissionSet01" identificationScheme="urn:uuid:6b5aea1a-874d-4603-a4bc-96a0a7b38446" value="SELF-5^^^&1.3.6.1.4.1.21367.2005.3.7&ISO">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSSubmissionSet.patientId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                  </urn4:RegistryPackage>
                  <urn4:Classification id="cl10" classifiedObject="SubmissionSet01" classificationNode="urn:uuid:a54d6aa5-d40d-43f9-88c5-b4633d873bdd"/>
                  <urn4:Association id="as01" associationType="HasMember" sourceObject="SubmissionSet01" targetObject="Document01">
                     <urn4:Slot name="SubmissionSetStatus">
                        <urn4:ValueList>
                           <urn4:Value>Original</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                  </urn4:Association>
               </urn4:RegistryObjectList>

            </urn2:SubmitObjectsRequest>
            <!--1 or more repetitions:-->
            <urn5:Document id="Document01">UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</urn5:Document>
         </urn:ProvideAndRegisterDocumentSetRequest>
      </urn:RespondingGateway_ProvideAndRegisterDocumentSetRequest>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion type="XPath Match">
		<con:configuration>
			<path>declare namespace ns11='urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0';
							//ns11:RegistryResponse[1]/@status</path>
			<content>urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Schema Compliance" type="Schema Compliance">
		<con:configuration>
			<definition/>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig action="{urn:gov:hhs:fha:nhinc:nhincentityxdr}ProvideAndRegisterDocumentSet-b" mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2014-04-01T18:06:48Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2014-04-01T18:16:48Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>04/01/2014 18:06:48</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2014-05-01T00:00:00Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>
<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Patient Discovery Deferred Req" searchProperties="true" id="722d7a11-28b2-47ff-93a2-1393fc42abb3">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>
<con:testStep name="Patient Discovery Deferred Req" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityPatientDiscoveryAsyncReqBindingSoap</con:interface>
		<con:operation>ProcessPatientDiscoveryAsyncReq</con:operation>
		<con:request name="Patient Discovery Deferred Req" useWsAddressing="true">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-PatientDiscoveryAsyncReq}</con:endpoint>
	<con:request><![CDATA[
		<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:hl7-org:v3" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
   <soap:Header/>
   <soap:Body testSuite="Entity_g1" testCase="Patient Discovery Deferred Req">
      <urn:RespondingGateway_PRPA_IN201305UV02Request>
         <urn:PRPA_IN201305UV02 ITSVersion="XML_1.0">
            <urn:id root="1.1" extension="-5a3e95b1:11d1fa33d45:-7f9b"/>
            <urn:creationTime value="20091116084800"/>
            <urn:interactionId root="2.16.840.1.113883.1.6" extension="PRPA_IN201305UV02"/>
            <urn:processingCode code="T"/>
            <urn:processingModeCode code="T"/>
            <urn:acceptAckCode code="AL"/>
            <urn:receiver typeCode="RCV">
               <urn:device classCode="DEV" determinerCode="INSTANCE">
                  <urn:id root="1.2.345.678.999"/>
                  <urn:asAgent classCode="AGNT">
                     <urn:representedOrganization classCode="ORG" determinerCode="INSTANCE">
                        <urn:id root="${#Project#RemoteHCID}"/>
                     </urn:representedOrganization>
                  </urn:asAgent>
               </urn:device>
            </urn:receiver>
            <urn:sender typeCode="SND">
               <urn:device classCode="DEV" determinerCode="INSTANCE">
                  <urn:id root="1.2.345.678.999"/>
                  <urn:asAgent classCode="AGNT">
                     <urn:representedOrganization classCode="ORG" determinerCode="INSTANCE">
                        <urn:id root="${#Project#LocalHCID}"/>
                     </urn:representedOrganization>
                  </urn:asAgent>
               </urn:device>
            </urn:sender>
            <urn:controlActProcess classCode="CACT" moodCode="EVN">
               <urn:authorOrPerformer typeCode="AUT">
                  <urn:assignedDevice>
                     <urn:id root="${#Project#LocalAA}"/>
                  </urn:assignedDevice>
               </urn:authorOrPerformer>
               <urn:queryByParameter>
                  <urn:queryId root="${#Project#RemoteHCID}" extension="-abd3453dcd24wkkks545"/>
                  <urn:statusCode code="new"/>
                  <urn:responseModalityCode code="R"/>
                  <urn:responsePriorityCode code="I"/>
                  <urn:parameterList>
                     <urn:livingSubjectAdministrativeGender>
                        <urn:value code="${#Project#Gender}"/>
                        <urn:semanticsText representation="TXT">LivingSubject.administrativeGender</urn:semanticsText>
                     </urn:livingSubjectAdministrativeGender>
                     <urn:livingSubjectBirthTime>
                        <urn:value value="${#Project#BirthTime}"/>
                        <urn:semanticsText representation="TXT">LivingSubject.birthTime</urn:semanticsText>
                     </urn:livingSubjectBirthTime>
                     <urn:livingSubjectName>
                        <urn:value>
                           <urn:family partType="FAM">${#Project#FamilyName}</urn:family>
                           <urn:given partType="GIV">${#Project#GivenName}</urn:given>
                        </urn:value>
                        <urn:semanticsText representation="TXT">LivingSubject.name</urn:semanticsText>
                     </urn:livingSubjectName>
                     <urn:livingSubjectId>
                        <urn:value root="${#Project#LocalAA}" extension="${#Project#LocalPatientID}"/>
                        <urn:semanticsText representation="TXT"/>
                     </urn:livingSubjectId>
                  </urn:parameterList>
               </urn:queryByParameter>
            </urn:controlActProcess>
         </urn:PRPA_IN201305UV02>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>LEESBURG</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>123 Johnson Rd</urn1:streetAddress>
               <urn1:zipCode>20176</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>19990627</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>NEEDED</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>true</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>true</urn1:haveSignature>
            <urn1:haveWitnessSignature>true</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>Test HCID1</urn1:description>
               <urn1:homeCommunityId>2.16.840.1.113883.3.337</urn1:homeCommunityId>
               <urn1:name>HCID1</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>YOUNGER</urn1:familyName>
               <urn1:givenName>GALLOW</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>FJ</urn1:secondNameOrInitials>
               <urn1:fullName>Joe Smith</urn1:fullName>
               <urn1:prefix>Mr</urn1:prefix>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>123</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>1234</urn1:extension>
               <urn1:localNumber>3456789</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>W</urn1:code>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>Melbourne</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>123 Johnson Rd</urn1:streetAddress>
               <urn1:zipCode>12345</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Hughes</urn1:familyName>
               <urn1:givenName>Howie</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>HH</urn1:secondNameOrInitials>
               <urn1:fullName>Howie Hughes</urn1:fullName>
               <urn1:prefix>Dr</urn1:prefix>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>123</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>1546</urn1:extension>
               <urn1:localNumber>4567892</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>W</urn1:code>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>123456789</urn1:SSN>
            <!--1 or more repetitions:-->
            <urn1:uniquePatientId>D123401^^^&amp;2.16.840.1.113883.3.337&amp;ISO</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>Frankfort</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>MN</urn1:state>
               <urn1:streetAddress>432 Jackson St</urn1:streetAddress>
               <urn1:zipCode>65498</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Ugble</urn1:familyName>
               <urn1:givenName>Gary</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>GU</urn1:secondNameOrInitials>
               <urn1:fullName>Gary Ugble</urn1:fullName>
               <urn1:prefix>Mr</urn1:prefix>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>987</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>6549</urn1:extension>
               <urn1:localNumber>2222222</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>H</urn1:code>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>Anderson</urn1:familyName>
                  <urn1:givenName>Wilma</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>G</urn1:code>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>WA</urn1:secondNameOrInitials>
                  <urn1:fullName>Wilma Anderson</urn1:fullName>
                  <urn1:prefix>Mrs</urn1:prefix>
               </urn1:personName>
               <urn1:userName>wanderson</urn1:userName>
               <urn1:org>
                  <urn1:description>Test HCID1</urn1:description>
                  <urn1:homeCommunityId>2.16.840.1.113883.3.337</urn1:homeCommunityId>
                  <urn1:name>HCID1</urn1:name>
               </urn1:org>
               <!--Optional:-->
               <urn1:roleCoded>
                  <urn1:code>Code</urn1:code>
                  <urn1:codeSystem>CodeSystem</urn1:codeSystem>
                  <urn1:codeSystemName>CodeSystemName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>codeSystemVersion</urn1:codeSystemVersion>
                  <urn1:displayName>displayName</urn1:displayName>
                  <urn1:originalText>originalText</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>authorized</urn1:authorized>
            <!--Optional:-->
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-04-16T13:15:39Z</urn1:authInstant>
               <urn1:sessionIndex>987</urn1:sessionIndex>
               <urn1:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>158.147.185.168</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>cs.myharris.net</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn1:resource>
               <urn1:action>TestSaml</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn1:id>
                     <urn1:issueInstant>2009-04-16T13:10:39.093Z</urn1:issueInstant>
                     <urn1:version>2.0</urn1:version>
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <urn1:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn1:issuer>
                     <urn1:conditions>
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <urn1:accessConsentPolicy>Claim-Ref-1234</urn1:accessConsentPolicy>
                     <urn1:instanceAccessConsentPolicy>Claim-Instance-1</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
            <!--Optional:-->
            <urn1:samlSignature>
               <!--Optional:-->
               <urn1:keyInfo>
                  <!--Optional:-->
                  <urn1:rsaKeyValueModulus>cid:1157111506023</urn1:rsaKeyValueModulus>
                  <!--Optional:-->
                  <urn1:rsaKeyValueExponent>cid:136268302631</urn1:rsaKeyValueExponent>
               </urn1:keyInfo>
               <!--Optional:-->
               <urn1:signatureValue>cid:880867232879</urn1:signatureValue>
            </urn1:samlSignature>
         </urn:assertion>
         <!--Optional:-->
         <urn:NhinTargetCommunities>
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
            </urn1:nhinTargetCommunity>
         </urn:NhinTargetCommunities>
      </urn:RespondingGateway_PRPA_IN201305UV02Request>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion name="Verify Receiver" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns3='urn:hl7-org:v3';
							//ns3:MCCI_IN000002UV01[1]/ns3:receiver[1]/ns3:device[1]/ns3:asAgent[1]/ns3:representedOrganization[1]/ns3:id[1]/@root</path>
			<content>1.1</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Verify Sender" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns3='urn:hl7-org:v3';
							//ns3:MCCI_IN000002UV01[1]/ns3:sender[1]/ns3:device[1]/ns3:asAgent[1]/ns3:representedOrganization[1]/ns3:id[1]/@root</path>
			<content>2.2</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Verify Message" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns3='urn:hl7-org:v3';
							//ns3:MCCI_IN000002UV01[1]/ns3:acknowledgement[1]/ns3:acknowledgementDetail[1]/ns3:text[1]/text()</path>
			<content>Success</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Verify RelatesTo" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns1='http://www.w3.org/2005/08/addressing';
							//ns1:RelatesTo[1]/text()</path>
			<content>uuid:6666666666.66666.666.66</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Schema Compliance" type="Schema Compliance">
		<con:configuration>
			<definition/>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig action="urn:gov:hhs:fha:nhinc:entitypatientdiscoveryasyncreq:ProcessPatientDiscoveryAsyncReqAsyncRequest" addDefaultTo="true" messageID="uuid:6666666666.66666.666.66" mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>LocalHCID</con:name>
		<con:value>1.1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalAA</con:name>
		<con:value>1.1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalHCDescription</con:name>
		<con:value>InternalTest1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteHCID</con:name>
		<con:value>2.2</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteAA</con:name>
		<con:value>2.2</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteHCDescription</con:name>
		<con:value>InternalTest2</con:value>
	</con:property>
	<con:property>
		<con:name>RemotePatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>NHINGatewayConfigDir</con:name>
		<con:value>C:/Sun/AppServer/domains/domain1/config/nhin</con:value>
	</con:property>
	<con:property>
		<con:name>MPIDir</con:name>
		<con:value>C:/Sun/AppServer/domains/domain1/config</con:value>
	</con:property>
	<con:property>
		<con:name>LocalConfigDir</con:name>
		<con:value>C:/SelfTest/EndToEndSelfTest</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DocQuery</con:name>
		<con:value>http://localhost:8080/CONNECTGateway/EntityService/EntityDocQueryUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DocRetrieve</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityDocRetrieve</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Reidentification</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntitySubjectDiscovery</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Subscribe</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityNotificationProducer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Notify</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityNotificationConsumer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Unsubscribe</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntitySubscriptionManager</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-AuditLogQuery</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityAuditQuery</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscoveryAsyncReq</con:name>
		<con:value>http://localhost:8080/CONNECTGateway/EntityService/EntityPatientDiscoveryDeferredRequestUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>DBHost</con:name>
		<con:value>localhost</con:value>
	</con:property>
	<con:property>
		<con:name>DBPort</con:name>
		<con:value>3306</con:value>
	</con:property>
	<con:property>
		<con:name>DBUser</con:name>
		<con:value>nhincuser</con:value>
	</con:property>
	<con:property>
		<con:name>DBPass</con:name>
		<con:value>nhincpass</con:value>
	</con:property>
	<con:property>
		<con:name>PatientCorrelationDB</con:name>
		<con:value>patientcorrelationdb</con:value>
	</con:property>
	<con:property>
		<con:name>PatientCorrelationTable</con:name>
		<con:value>correlatedidentifiers</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionDB</con:name>
		<con:value>subscriptionrepository</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionTable</con:name>
		<con:value>subscription</con:value>
	</con:property>
	<con:property>
		<con:name>AAMappingDB</con:name>
		<con:value>assigningauthoritydb</con:value>
	</con:property>
	<con:property>
		<con:name>AAMappingTable</con:name>
		<con:value>aa_to_home_community_mapping</con:value>
	</con:property>
	<con:property>
		<con:name>PseudonymAA</con:name>
		<con:value>ABC</con:value>
	</con:property>
	<con:property>
		<con:name>PseudonymPatientID</con:name>
		<con:value>PSEUDO001</con:value>
	</con:property>
	<con:property>
		<con:name>RealAA</con:name>
		<con:value>1.1.1</con:value>
	</con:property>
	<con:property>
		<con:name>RealPatientID</con:name>
		<con:value>D1234010050</con:value>
	</con:property>
	<con:property>
		<con:name>DQDocID</con:name>
		<con:value>1.123401.11111</con:value>
	</con:property>
	<con:property>
		<con:name>DQPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>DynamicDQDocID</con:name>
		<con:value>103.8.9284320.020.3590.75^1266324032288</con:value>
	</con:property>
	<con:property>
		<con:name>DRDocID</con:name>
		<con:value>1.123407.777777</con:value>
	</con:property>
	<con:property>
		<con:name>DRRepoID</con:name>
		<con:value>1</con:value>
	</con:property>
	<con:property>
		<con:name>NotificationEndpoint</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/NotificationConsumerService/HiemNotify</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionEndpoint</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/NotificationProducerService/HiemSubscription</con:value>
	</con:property>
	<con:property>
		<con:name>SubscribePatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>NotifySubscriptionID</con:name>
		<con:value>-f7c1a5d:1204e50e42e:-79eb</con:value>
	</con:property>
	<con:property>
		<con:name>NotifySubscriptionManagerEndpointAddress</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/SubscriptionManagerService/HiemUnsubscribe</con:value>
	</con:property>
	<con:property>
		<con:name>UnSubscriptionID</con:name>
		<con:value>3e74139f-5271-4db1-98c0-88748fa3e4e3</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionManagerEndpointAddress</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/SubscriptionManagerService/HiemUnsubscribe</con:value>
	</con:property>
	<con:property>
		<con:name>AQUserID</con:name>
		<con:value>kskagerb</con:value>
	</con:property>
	<con:property>
		<con:name>AQPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-EntityXDRRequest</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityProxyService/EntityXDRRequest</con:value>
	</con:property>
	<con:property>
		<con:name>AsyncMsgDB</con:name>
		<con:value>asyncmsgs</con:value>
	</con:property>
	<con:property>
		<con:name>AsyncMsgTable</con:name>
		<con:value>asyncmsgrepo</con:value>
	</con:property>
	<con:property>
		<con:name>Gender</con:name>
		<con:value>M</con:value>
	</con:property>
	<con:property>
		<con:name>BirthTime</con:name>
		<con:value>19630804</con:value>
	</con:property>
	<con:property>
		<con:name>FamilyName</con:name>
		<con:value>Younger</con:value>
	</con:property>
	<con:property>
		<con:name>GivenName</con:name>
		<con:value>Gallow</con:value>
	</con:property>
	<con:property>
		<con:name>SubjectID</con:name>
		<con:value>1111</con:value>
	</con:property>
	<con:property>
		<con:name>UniquePatientId</con:name>
		<con:value>1111^^^&amp;1.1&amp;ISO</con:value>
	</con:property>
	<con:property>
		<con:name>StreetAddress</con:name>
		<con:value>123 Johnson Rd</con:value>
	</con:property>
	<con:property>
		<con:name>City</con:name>
		<con:value>Melbourne</con:value>
	</con:property>
	<con:property>
		<con:name>State</con:name>
		<con:value>FL</con:value>
	</con:property>
	<con:property>
		<con:name>ZipCode</con:name>
		<con:value>12345</con:value>
	</con:property>
	<con:property>
		<con:name>Country</con:name>
		<con:value>US</con:value>
	</con:property>
	<con:property>
		<con:name>SSN</con:name>
		<con:value>123456789</con:value>
	</con:property>
	<con:property>
		<con:name>PurposeOfDisclosure</con:name>
		<con:value>Mental</con:value>
	</con:property>
	<con:property>
		<con:name>ExpirationDate</con:name>
		<con:value>20100520</con:value>
	</con:property>
	<con:property>
		<con:name>DOB</con:name>
		<con:value>19800516</con:value>
	</con:property>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2014-04-01T18:06:50Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2014-04-01T18:16:50Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>04/01/2014 18:06:50</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2014-05-01T00:00:00Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>
<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Patient Discovery Deferred Resp" searchProperties="true" id="1bb2218d-381d-4724-8ba6-a019f2532778">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>
<con:testStep name="Patient Discovery Deferred Resp" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityPatientDiscoveryAsyncRespBindingSoap</con:interface>
		<con:operation>ProcessPatientDiscoveryAsyncResp</con:operation>
		<con:request name="Patient Discovery Deferred Resp">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-PatientDiscoveryAsyncResp}</con:endpoint>
	<con:request><![CDATA[<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:hl7-org:v3" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
   <soap:Header xmlns:add="SoapUI_Test/ValidationSuite/2-EndToEndSelfTest-soapui-project.xml">
      <add:Action>urn:gov:hhs:fha:nhinc:entitypatientdiscoveryasyncresp:ProcessPatientDiscoveryAsyncRespAsyncRequest</add:Action>
      <add:MessageID>uuid:12bcfc1e-f422-4d1d-af99-ff83d050313e</add:MessageID>
      <add:RelatesTo>uuid:6666666666.66666.666.66</add:RelatesTo>
      <add:To>${#TestSuite#Endpoint-PatientDiscoveryAsyncResp}</add:To>
   </soap:Header>
   <soap:Body testSuite="Entity_g1" testCase="Patient Discovery Deferred Resp">
      <urn:RespondingGateway_PRPA_IN201306UV02Request>
         <urn:PRPA_IN201306UV02 ITSVersion="XML_1.0">
            <urn:id root="2.2" extension="-5a3e95b1:11d1fa33d45:-8e45"/>
            <urn:creationTime value="20091116084800"/>
            <urn:interactionId root="2.16.840.1.113883.1.6" extension="PRPA_IN201306UV02"/>
            <urn:processingCode code="T"/>
            <urn:processingModeCode code="T"/>
            <urn:acceptAckCode code="AL"/>
            <!--1 or more repetitions:-->
            <urn:receiver typeCode="RCV">
               <urn:device classCode="DEV" determinerCode="INSTANCE">
                  <urn:id root="1.2.345.678.999"/>
                  <urn:asAgent classCode="AGNT">
                     <urn:representedOrganization classCode="ORG" determinerCode="INSTANCE">
                        <urn:id root="${#Project#RemoteHCID}"/>
                     </urn:representedOrganization>
                  </urn:asAgent>
               </urn:device>
            </urn:receiver>
            <urn:sender typeCode="SND">
               <urn:device classCode="DEV" determinerCode="INSTANCE">
                  <urn:id root="1.2.345.678.999"/>
                  <urn:asAgent classCode="AGNT">
                     <urn:representedOrganization classCode="ORG" determinerCode="INSTANCE">
                        <urn:id root="${#Project#LocalHCID}"/>
                     </urn:representedOrganization>
                  </urn:asAgent>
               </urn:device>
            </urn:sender>
            <urn:controlActProcess classCode="CACT" moodCode="EVN">
               <urn:code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV"/>
               <urn:authorOrPerformer typeCode="AUT">
                  <urn:assignedDevice>
                     <urn:id root="2.2"/>
                  </urn:assignedDevice>
               </urn:authorOrPerformer>
               <urn:subject typeCode="SUBJ">
                  <urn:registrationEvent classCode="REG" moodCode="EVN">
                     <urn:id nullFlavor="NA"/>
                     <urn:statusCode code="active"/>
                     <urn:subject1 typeCode="SBJ">
                        <urn:patient classCode="PAT">
                           <urn:id extension="D123402" root="2.2"/>
                           <urn:statusCode code="SD"/>
                           <urn:patientPerson>
                              <urn:name>
                                 <urn:family partType="FAM">Younger</urn:family>
                                 <urn:given partType="GIV">Gallow</urn:given>
                              </urn:name>
                              <urn:administrativeGenderCode code="M"/>
                              <urn:birthTime value="19630804"/>
                              <urn:addr>
                                 <urn:city>LEESBURG</urn:city>
                                 <urn:state>VA</urn:state>
                                 <urn:postalCode>20176</urn:postalCode>
                              </urn:addr>
                           </urn:patientPerson>
                           <urn:providerOrganization determinerCode="" classCode="">
                              <urn:id root="2.2"/>
                              <urn:contactParty xsi:nil="true" classCode="CON" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                           </urn:providerOrganization>
                        </urn:patient>
                     </urn:subject1>
                     <urn:custodian typeCode="">
                        <urn:assignedEntity classCode="">
                           <urn:id root="2.2"/>
                        </urn:assignedEntity>
                     </urn:custodian>
                  </urn:registrationEvent>
               </urn:subject>
               <urn:queryAck>
                  <urn:queryId extension="-abd3453dcd24wkkks545" root="2.2"/>
                  <urn:queryResponseCode code="OK"/>
                  <urn:resultTotalQuantity value="1"/>
                  <urn:resultCurrentQuantity value="1"/>
                  <urn:resultRemainingQuantity value="0"/>
               </urn:queryAck>
               <urn:queryByParameter>
                  <urn:queryId extension="-abd3453dcd24wkkks545" root="2.2"/>
                  <urn:statusCode code="new"/>
                  <urn:responseModalityCode code="R"/>
                  <urn:responsePriorityCode code="I"/>
                  <urn:parameterList>
                     <urn:livingSubjectAdministrativeGender>
                        <urn:value code="M"/>
                        <urn:semanticsText representation="TXT"/>
                     </urn:livingSubjectAdministrativeGender>
                     <urn:livingSubjectBirthTime>
                        <urn:value value="19630804"/>
                        <urn:semanticsText representation="TXT"/>
                     </urn:livingSubjectBirthTime>
                     <urn:livingSubjectId>
                        <urn:value extension="D123401" root="1.1"/>
                        <urn:semanticsText representation="TXT"/>
                     </urn:livingSubjectId>
                     <urn:livingSubjectName>
                        <urn:value>
                           <urn:family partType="FAM">Younger</urn:family>
                           <urn:given partType="GIV">Gallow</urn:given>
                        </urn:value>
                        <urn:semanticsText representation="TXT"/>
                     </urn:livingSubjectName>
                  </urn:parameterList>
               </urn:queryByParameter>
            </urn:controlActProcess>
         </urn:PRPA_IN201306UV02>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>LEESBURG</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>123 Johnson Rd</urn1:streetAddress>
               <urn1:zipCode>20176</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>19990627</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>NEEDED</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>true</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>true</urn1:haveSignature>
            <urn1:haveWitnessSignature>true</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>Test HCID1</urn1:description>
               <urn1:homeCommunityId>2.16.840.1.113883.3.337</urn1:homeCommunityId>
               <urn1:name>HCID1</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>YOUNGER</urn1:familyName>
               <urn1:givenName>GALLOW</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>FJ</urn1:secondNameOrInitials>
               <urn1:fullName>Joe Smith</urn1:fullName>
               <urn1:prefix>Mr</urn1:prefix>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>123</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>1234</urn1:extension>
               <urn1:localNumber>3456789</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>W</urn1:code>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>Melbourne</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>123 Johnson Rd</urn1:streetAddress>
               <urn1:zipCode>12345</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Hughes</urn1:familyName>
               <urn1:givenName>Howie</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>HH</urn1:secondNameOrInitials>
               <urn1:fullName>Howie Hughes</urn1:fullName>
               <urn1:prefix>Dr</urn1:prefix>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>123</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>1546</urn1:extension>
               <urn1:localNumber>4567892</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>W</urn1:code>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>123456789</urn1:SSN>
            <!--1 or more repetitions:-->
            <urn1:uniquePatientId>D123401^^^&amp;2.16.840.1.113883.3.337&amp;ISO</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>Frankfort</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>MN</urn1:state>
               <urn1:streetAddress>432 Jackson St</urn1:streetAddress>
               <urn1:zipCode>65498</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Ugble</urn1:familyName>
               <urn1:givenName>Gary</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>GU</urn1:secondNameOrInitials>
               <urn1:fullName>Gary Ugble</urn1:fullName>
               <urn1:prefix>Mr</urn1:prefix>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>987</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>6549</urn1:extension>
               <urn1:localNumber>2222222</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>H</urn1:code>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>Anderson</urn1:familyName>
                  <urn1:givenName>Wilma</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>G</urn1:code>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>WA</urn1:secondNameOrInitials>
                  <urn1:fullName>Wilma Anderson</urn1:fullName>
                  <urn1:prefix>Mrs</urn1:prefix>
               </urn1:personName>
               <urn1:userName>wanderson</urn1:userName>
               <urn1:org>
                  <urn1:description>Test HCID1</urn1:description>
                  <urn1:homeCommunityId>2.16.840.1.113883.3.337</urn1:homeCommunityId>
                  <urn1:name>HCID1</urn1:name>
               </urn1:org>
               <!--Optional:-->
               <urn1:roleCoded>
                  <urn1:code>Code</urn1:code>
                  <urn1:codeSystem>CodeSystem</urn1:codeSystem>
                  <urn1:codeSystemName>CodeSystemName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>codeSystemVersion</urn1:codeSystemVersion>
                  <urn1:displayName>displayName</urn1:displayName>
                  <urn1:originalText>originalText</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>authorized</urn1:authorized>
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-04-16T13:15:39Z</urn1:authInstant>
               <urn1:sessionIndex>987</urn1:sessionIndex>
               <urn1:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>158.147.185.168</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>cs.myharris.net</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn1:resource>
               <urn1:action>TestSaml</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn1:id>
                     <urn1:issueInstant>2009-04-16T13:10:39.093Z</urn1:issueInstant>
                     <urn1:version>2.0</urn1:version>
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <urn1:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn1:issuer>
                     <urn1:conditions>
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <urn1:accessConsentPolicy>Claim-Ref-1234</urn1:accessConsentPolicy>
                     <urn1:instanceAccessConsentPolicy>Claim-Instance-1</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
            <!--Optional:-->
            <urn1:samlSignature>
               <!--Optional:-->
               <urn1:keyInfo>
                  <!--Optional:-->
                  <urn1:rsaKeyValueModulus>cid:1157111506023</urn1:rsaKeyValueModulus>
                  <!--Optional:-->
                  <urn1:rsaKeyValueExponent>cid:136268302631</urn1:rsaKeyValueExponent>
               </urn1:keyInfo>
               <!--Optional:-->
               <urn1:signatureValue>cid:880867232879</urn1:signatureValue>
            </urn1:samlSignature>
         </urn:assertion>
         <urn:NhinTargetCommunities>
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
            </urn1:nhinTargetCommunity>
         </urn:NhinTargetCommunities>
      </urn:RespondingGateway_PRPA_IN201306UV02Request>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion name="Match content of [typeCode/@code]" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns2='urn:hl7-org:v3';//ns2:MCCI_IN000002UV01[1]/ns2:acknowledgement[1]/ns2:typeCode[1]/@code</path>
			<content>CA</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>

	<con:assertion name="Match content of [acknowledgementDetail/text/text()]" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns2='urn:hl7-org:v3';//ns2:MCCI_IN000002UV01[1]/ns2:acknowledgement[1]/ns2:acknowledgementDetail[1]/ns2:text/text()</path>
			<content>Success</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Schema Compliance" type="Schema Compliance">
		<con:configuration>
			<definition/>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>LocalHCID</con:name>
		<con:value>1.1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalAA</con:name>
		<con:value>1.1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalHCDescription</con:name>
		<con:value>InternalTest1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteHCID</con:name>
		<con:value>2.2</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteAA</con:name>
		<con:value>2.2</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteHCDescription</con:name>
		<con:value>InternalTest2</con:value>
	</con:property>
	<con:property>
		<con:name>RemotePatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>NHINGatewayConfigDir</con:name>
		<con:value>C:/Sun/AppServer/domains/domain1/config/nhin</con:value>
	</con:property>
	<con:property>
		<con:name>MPIDir</con:name>
		<con:value>C:/Sun/AppServer/domains/domain1/config</con:value>
	</con:property>
	<con:property>
		<con:name>LocalConfigDir</con:name>
		<con:value>C:/SelfTest/EndToEndSelfTest</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DocQuery</con:name>
		<con:value>http://localhost:8080/CONNECTGateway/EntityService/EntityDocQueryUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DocRetrieve</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityDocRetrieve</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Reidentification</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntitySubjectDiscovery</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Subscribe</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityNotificationProducer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Notify</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityNotificationConsumer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Unsubscribe</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntitySubscriptionManager</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-AuditLogQuery</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityAuditQuery</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscoveryAsyncReq</con:name>
		<con:value>http://localhost:8080/CONNECTGateway/EntityService/EntityPatientDiscoveryDeferredRequestUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscoveryAsyncResp</con:name>
		<con:value>http://localhost:8080/CONNECTGateway/EntityService/EntityPatientDiscoveryDeferredResponseUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>DBHost</con:name>
		<con:value>localhost</con:value>
	</con:property>
	<con:property>
		<con:name>DBPort</con:name>
		<con:value>3306</con:value>
	</con:property>
	<con:property>
		<con:name>DBUser</con:name>
		<con:value>nhincuser</con:value>
	</con:property>
	<con:property>
		<con:name>DBPass</con:name>
		<con:value>nhincpass</con:value>
	</con:property>
	<con:property>
		<con:name>PatientCorrelationDB</con:name>
		<con:value>patientcorrelationdb</con:value>
	</con:property>
	<con:property>
		<con:name>PatientCorrelationTable</con:name>
		<con:value>correlatedidentifiers</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionDB</con:name>
		<con:value>subscriptionrepository</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionTable</con:name>
		<con:value>subscription</con:value>
	</con:property>
	<con:property>
		<con:name>AAMappingDB</con:name>
		<con:value>assigningauthoritydb</con:value>
	</con:property>
	<con:property>
		<con:name>AAMappingTable</con:name>
		<con:value>aa_to_home_community_mapping</con:value>
	</con:property>
	<con:property>
		<con:name>AsyncMsgDB</con:name>
		<con:value>asyncmsgs</con:value>
	</con:property>
	<con:property>
		<con:name>AsyncMsgTable</con:name>
		<con:value>asyncmsgrepo</con:value>
	</con:property>
	<con:property>
		<con:name>PseudonymAA</con:name>
		<con:value>ABC</con:value>
	</con:property>
	<con:property>
		<con:name>PseudonymPatientID</con:name>
		<con:value>PSEUDO001</con:value>
	</con:property>
	<con:property>
		<con:name>RealAA</con:name>
		<con:value>1.1.1</con:value>
	</con:property>
	<con:property>
		<con:name>RealPatientID</con:name>
		<con:value>D1234010050</con:value>
	</con:property>
	<con:property>
		<con:name>DQDocID</con:name>
		<con:value>1.123401.11111</con:value>
	</con:property>
	<con:property>
		<con:name>DQPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>DynamicDQDocID</con:name>
		<con:value>103.8.9284320.020.3590.75^1266324032288</con:value>
	</con:property>
	<con:property>
		<con:name>DRDocID</con:name>
		<con:value>1.123407.777777</con:value>
	</con:property>
	<con:property>
		<con:name>DRRepoID</con:name>
		<con:value>1</con:value>
	</con:property>
	<con:property>
		<con:name>NotificationEndpoint</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/NotificationConsumerService/HiemNotify</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionEndpoint</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/NotificationProducerService/HiemSubscription</con:value>
	</con:property>
	<con:property>
		<con:name>SubscribePatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>NotifySubscriptionID</con:name>
		<con:value>-f7c1a5d:1204e50e42e:-79eb</con:value>
	</con:property>
	<con:property>
		<con:name>NotifySubscriptionManagerEndpointAddress</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/SubscriptionManagerService/HiemUnsubscribe</con:value>
	</con:property>
	<con:property>
		<con:name>UnSubscriptionID</con:name>
		<con:value>3e74139f-5271-4db1-98c0-88748fa3e4e3</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionManagerEndpointAddress</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/SubscriptionManagerService/HiemUnsubscribe</con:value>
	</con:property>
	<con:property>
		<con:name>AQUserID</con:name>
		<con:value>kskagerb</con:value>
	</con:property>
	<con:property>
		<con:name>AQPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-EntityXDRRequest</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityProxyService/EntityXDRRequest</con:value>
	</con:property>
	<con:property>
		<con:name>Gender</con:name>
		<con:value>M</con:value>
	</con:property>
	<con:property>
		<con:name>BirthTime</con:name>
		<con:value>19630804</con:value>
	</con:property>
	<con:property>
		<con:name>FamilyName</con:name>
		<con:value>Younger</con:value>
	</con:property>
	<con:property>
		<con:name>GivenName</con:name>
		<con:value>Gallow</con:value>
	</con:property>
	<con:property>
		<con:name>SubjectID</con:name>
		<con:value>1111</con:value>
	</con:property>
	<con:property>
		<con:name>UniquePatientId</con:name>
		<con:value>1111^^^&amp;1.1&amp;ISO</con:value>
	</con:property>
	<con:property>
		<con:name>StreetAddress</con:name>
		<con:value>123 Johnson Rd</con:value>
	</con:property>
	<con:property>
		<con:name>City</con:name>
		<con:value>Melbourne</con:value>
	</con:property>
	<con:property>
		<con:name>State</con:name>
		<con:value>FL</con:value>
	</con:property>
	<con:property>
		<con:name>ZipCode</con:name>
		<con:value>12345</con:value>
	</con:property>
	<con:property>
		<con:name>Country</con:name>
		<con:value>US</con:value>
	</con:property>
	<con:property>
		<con:name>SSN</con:name>
		<con:value>123456789</con:value>
	</con:property>
	<con:property>
		<con:name>PurposeOfDisclosure</con:name>
		<con:value>Mental</con:value>
	</con:property>
	<con:property>
		<con:name>ExpirationDate</con:name>
		<con:value>20100520</con:value>
	</con:property>
	<con:property>
		<con:name>DOB</con:name>
		<con:value>19800516</con:value>
	</con:property>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2014-04-01T18:06:52Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2014-04-01T18:16:52Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>04/01/2014 18:06:52</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2014-05-01T00:00:00Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>
<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Patient Discovery" searchProperties="true" id="c7e1d2d1-838b-4836-afa3-1c655cf5c329">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>

<con:testStep type="groovy" name="Set Up PassThru"><con:settings/><con:config><script>log.info "Setting Patient Discovery Adapter to unsecured";
def dir = context.findProperty('GatewayPropDir');
nhinc.FileUtils.backupFile(dir, "PatientDiscoveryProxyConfig.xml", log);
def alias = 'adapterpatientdiscovery'
def aliasName= 'adapterpatientdiscoverywssecured';
def replaceAlias = 'adapterpatientdiscoverywsunsecured';

nhinc.FileUtils.updateSpringConfig(dir, "PatientDiscoveryProxyConfig.xml",
	alias, aliasName, replaceAlias, log);
/**
def pdConfigFile = new File(dir + "/" + "PatientDiscoveryProxyConfig.xml");
def pdConfigFileNew = new File(dir + "/" + "PatientDiscoveryProxyConfig.xml.NEW");
pdConfigFile.eachLine() {
	line ->
	if(line.contains(alias)) {
		pdConfigFileNew << replaceAlias + ln;
	} else {
		pdConfigFileNew << line + ln;
	}
}

pdConfigFile.delete();
pdConfigFileNew.renameTo(new File(dir + "/" + "PatientDiscoveryProxyConfig.xml"));
**/
log.info "Modifying internalConnectionInfo for adapterpatientdiscovery mock."

nhinc.FileUtils.createOrUpdateConnection("internalConnectionInfo.xml", dir, "1.1",
	"adapterpatientdiscovery", "http://localhost:1720/MockPDAdapter", "2.0",
	log);
	</script></con:config></con:testStep>
<con:testStep name="Patient Discovery" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityPatientDiscoveryBindingSoap</con:interface>
		<con:operation>RespondingGateway_PRPA_IN201305UV02</con:operation>
		<con:request name="Patient Discovery">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-PatientDiscovery}</con:endpoint>
	<con:request><![CDATA[
		<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:hl7-org:v3" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:add="http://schemas.xmlsoap.org/ws/2004/08/addressing">
   <soap:Header/>
   <soap:Body testSuite="Entity_g1" testCase="Patient Discovery">
      <urn:RespondingGateway_PRPA_IN201305UV02Request>
         <urn:PRPA_IN201305UV02 ITSVersion="XML_1.0">
            <urn:id root="1.1" extension="-5a3e95b1:11d1fa33d45:-7f9b"/>
            <urn:creationTime value="20091116084800"/>
            <urn:interactionId root="2.16.840.1.113883.1.6" extension="PRPA_IN201305UV02"/>
            <urn:processingCode code="T"/>
            <urn:processingModeCode code="T"/>
            <urn:acceptAckCode code="AL"/>
            <urn:receiver typeCode="RCV">
               <urn:device classCode="DEV" determinerCode="INSTANCE">
                  <urn:id root="1.2.345.678.999"/>
                  <urn:asAgent classCode="AGNT">
                     <urn:representedOrganization classCode="ORG" determinerCode="INSTANCE">
                        <urn:id root="${#Project#RemoteHCID}"/>
                     </urn:representedOrganization>
                  </urn:asAgent>
               </urn:device>
            </urn:receiver>
            <urn:sender typeCode="SND">
               <urn:device classCode="DEV" determinerCode="INSTANCE">
                  <urn:id root="1.2.345.678.999"/>
                  <urn:asAgent classCode="AGNT">
                     <urn:representedOrganization classCode="ORG" determinerCode="INSTANCE">
                        <urn:id root="${#Project#LocalHCID}"/>
                     </urn:representedOrganization>
                  </urn:asAgent>
               </urn:device>
            </urn:sender>
            <urn:controlActProcess classCode="CACT" moodCode="EVN">
               <urn:authorOrPerformer typeCode="AUT">
                  <urn:assignedDevice>
                     <urn:id root="${#Project#LocalAA}"/>
                  </urn:assignedDevice>
               </urn:authorOrPerformer>
               <urn:queryByParameter>
                  <urn:queryId root="${#Project#LocalHCID}" extension="-abd3453dcd24wkkks545"/>
                  <urn:statusCode code="new"/>
                  <urn:responseModalityCode code="R"/>
                  <urn:responsePriorityCode code="I"/>
                  <urn:parameterList>
                     <urn:livingSubjectAdministrativeGender>
                        <urn:value code="${#Project#Gender}"/>
                        <urn:semanticsText representation="TXT">LivingSubject.administrativeGender</urn:semanticsText>
                     </urn:livingSubjectAdministrativeGender>
                     <urn:livingSubjectBirthTime>
                        <urn:value value="${#Project#BirthTime}"/>
                        <urn:semanticsText representation="TXT">LivingSubject.birthTime</urn:semanticsText>
                     </urn:livingSubjectBirthTime>
                     <urn:livingSubjectName>
                        <urn:value>
                           <urn:family partType="FAM">${#Project#FamilyName}</urn:family>
                           <urn:given partType="GIV">${#Project#GivenName}</urn:given>
                        </urn:value>
                        <urn:semanticsText representation="TXT">LivingSubject.name</urn:semanticsText>
                     </urn:livingSubjectName>
                     <urn:livingSubjectId>
                        <urn:value root="${#Project#LocalAA}" extension="${#Project#SubjectID}"/>
                        <urn:semanticsText representation="TXT"/>
                     </urn:livingSubjectId>
                  </urn:parameterList>
               </urn:queryByParameter>
            </urn:controlActProcess>
         </urn:PRPA_IN201305UV02>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>${#Project#City}</urn1:city>
               <urn1:country>${#Project#Country}</urn1:country>
               <urn1:state>${#Project#State}</urn1:state>
               <urn1:streetAddress>${#Project#StreetAddress}</urn1:streetAddress>
               <urn1:zipCode>${#Project#ZipCode}</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>${#Project#DOB}</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>NEEDED</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>true</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>true</urn1:haveSignature>
            <urn1:haveWitnessSignature>true</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>${#Project#LocalHCDescription}</urn1:description>
               <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
               <urn1:name>${#Project#LocalHCDescription}</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>${#Project#FamilyName}</urn1:familyName>
               <urn1:givenName>${#Project#GivenName}</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>FJ</urn1:secondNameOrInitials>
               <urn1:fullName>Joe Smith</urn1:fullName>
               <urn1:prefix>Mr</urn1:prefix>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>123</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>1234</urn1:extension>
               <urn1:localNumber>3456789</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>W</urn1:code>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>Melbourne</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>123 Johnson Rd</urn1:streetAddress>
               <urn1:zipCode>12345</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Hughes</urn1:familyName>
               <urn1:givenName>Howie</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>HH</urn1:secondNameOrInitials>
               <urn1:fullName>Howie Hughes</urn1:fullName>
               <urn1:prefix>Dr</urn1:prefix>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>123</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>1546</urn1:extension>
               <urn1:localNumber>4567892</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>W</urn1:code>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>${#Project#SSN}</urn1:SSN>
            <urn1:uniquePatientId>${#Project#UniquePatientId}</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>Frankfort</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>MN</urn1:state>
               <urn1:streetAddress>432 Jackson St</urn1:streetAddress>
               <urn1:zipCode>65498</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Ugble</urn1:familyName>
               <urn1:givenName>Gary</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>GU</urn1:secondNameOrInitials>
               <urn1:fullName>Gary Ugble</urn1:fullName>
               <urn1:prefix>Mr</urn1:prefix>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>987</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>6549</urn1:extension>
               <urn1:localNumber>2222222</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>H</urn1:code>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>Anderson</urn1:familyName>
                  <urn1:givenName>Wilma</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>G</urn1:code>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>WA</urn1:secondNameOrInitials>
                  <urn1:fullName>Wilma Anderson</urn1:fullName>
                  <urn1:prefix>Mrs</urn1:prefix>
               </urn1:personName>
               <urn1:userName>wanderson</urn1:userName>
               <urn1:org>
                  <urn1:description>${#Project#LocalHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#LocalHCDescription}</urn1:name>
               </urn1:org>
               <urn1:roleCoded>
                  <urn1:code>307969004</urn1:code>
                  <urn1:codeSystem>2.16.840.1.113883.6.96</urn1:codeSystem>
                  <urn1:codeSystemName>SNOMED_CT</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>Public Health</urn1:displayName>
                  <urn1:originalText>Public Health</urn1:originalText>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>true</urn1:authorized>
            <urn1:purposeOfDisclosureCoded>
               <urn1:code>PUBLICHEALTH</urn1:code>
               <urn1:codeSystem>2.16.840.1.113883.3.18.7.1</urn1:codeSystem>
               <urn1:codeSystemName>nhin-purpose</urn1:codeSystemName>
               <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
               <urn1:displayName>Use or disclosure of Psychotherapy Notes</urn1:displayName>
               <urn1:originalText>Use or disclosure of Psychotherapy Notes</urn1:originalText>
            </urn1:purposeOfDisclosureCoded>
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-04-16T13:15:39Z</urn1:authInstant>
               <urn1:sessionIndex>987</urn1:sessionIndex>
               <urn1:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>158.147.185.168</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>cs.myharris.net</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn1:resource>
               <urn1:action>TestSaml</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn1:id>
                     <urn1:issueInstant>2009-04-16T13:10:39.093Z</urn1:issueInstant>
                     <urn1:version>2.0</urn1:version>
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <urn1:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn1:issuer>
                     <urn1:conditions>
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <urn1:accessConsentPolicy>Claim-Ref-1234</urn1:accessConsentPolicy>
                     <urn1:instanceAccessConsentPolicy>Claim-Instance-1</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
         </urn:assertion>
         <urn:NhinTargetCommunities>
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
            </urn1:nhinTargetCommunity>
         </urn:NhinTargetCommunities>
      </urn:RespondingGateway_PRPA_IN201305UV02Request>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion disabled="true" type="Schema Compliance">
		<con:configuration>
			<definition/>
		</con:configuration>
	</con:assertion>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion name="Check for existance of [ns3:controlActProcess]" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns3='urn:hl7-org:v3';
				exists( //ns3:PRPA_IN201306UV02/ns3:controlActProcess)</path>
			<content>true</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Given Name XPath Match" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns1='urn:hl7-org:v3';
				//ns1:PRPA_IN201306UV02[1]/ns1:controlActProcess[1]/ns1:subject[1]/ns1:registrationEvent[1]/ns1:subject1[1]/ns1:patient[1]/ns1:patientPerson[1]/ns1:name[1]/ns1:given[1]</path>
			<content>${#Project#GivenName}</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Family Name XPath Match" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns1='urn:hl7-org:v3';
				//ns1:PRPA_IN201306UV02[1]/ns1:controlActProcess[1]/ns1:subject[1]/ns1:registrationEvent[1]/ns1:subject1[1]/ns1:patient[1]/ns1:patientPerson[1]/ns1:name[1]/ns1:family[1]</path>
			<content>${#Project#FamilyName}</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep type="mockresponse" name="Mock Response"><con:settings/><con:config xsi:type="con:MockResponseStep" startStep="Patient Discovery" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>AdapterPatientDiscoveryBindingSoap</con:interface><con:operation>RespondingGateway_PRPA_IN201305UV02</con:operation><con:path>/MockPDAdapter</con:path><con:port>1720</con:port><con:response><con:settings/><con:responseContent><![CDATA[<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:hl7-org:v3">
   <soap:Header/>
   <soap:Body>
   <PRPA_IN201306UV02 xmlns="urn:hl7-org:v3" xmlns:ns2="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:ns3="http://www.w3.org/2005/08/addressing" xmlns:ns4="urn:gov:hhs:fha:nhinc:common:patientcorrelationfacade" ITSVersion="XML_1.0">
   <id root="1.1" extension="13318247:13b4e0b839b:-7ff4"/>
   <creationTime value="20121129212833"/>
   <interactionId root="2.16.840.1.113883.1.6" extension="PRPA_IN201306UV02"/>
   <processingCode code="P"/>
   <processingModeCode code="T"/>
   <acceptAckCode code="NE"/>
   <receiver typeCode="RCV">
   	<device classCode="DEV" determinerCode="INSTANCE">
   		<id root="1.2.345.678.999"/>
   		<asAgent classCode="AGNT">
   			<representedOrganization classCode="ORG" determinerCode="INSTANCE">
   				<id root="1.1"/>
   			</representedOrganization>
   		</asAgent>
   	</device>
   </receiver>
   <sender typeCode="SND">
   	<device classCode="DEV" determinerCode="INSTANCE">
   		<id root="2.2"/>
   		<asAgent classCode="AGNT">
   			<representedOrganization classCode="ORG" determinerCode="INSTANCE">
   				<id root="2.2"/>
   			</representedOrganization>
   		</asAgent>
   	</device>
   </sender>
   <acknowledgement>
   	<typeId root="2.16.840.1.113883.1.6" extension="PRPA_IN201305UV02"/>
   	<typeCode code="AA"/><targetMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
   </acknowledgement>
   <controlActProcess classCode="CACT" moodCode="EVN">
   	<code code="PRPA_TE201306UV" codeSystem="2.16.840.1.113883.1.6"/>
   	<subject typeCode="SUBJ">
   		<registrationEvent classCode="REG" moodCode="EVN">
   			<id nullFlavor="NA"/>
   			<statusCode code="active"/>
   				<subject1 typeCode="SBJ">
   					<patient classCode="PAT">
   						<id root="1.1" extension="D123401"/>
   						<statusCode code="SD"/>
   						<patientPerson classCode="PSN" determinerCode="INSTANCE">
   							<name>
   								<family partType="FAM">Younger</family>
   								<given partType="GIV">Gallow</given>
   							</name>
   							<telecom value="tel:+1-888-555-1234"/>
   							<administrativeGenderCode code="M"/>
   							<birthTime value="19630804"/>
   							<addr><city>LEESBURG</city><state>VA</state><postalCode>20176</postalCode></addr>
   							<asOtherIDs classCode="SD">
   								<id root="2.16.840.1.113883.4.1" extension="999123401"/>
   								<scopingOrganization classCode="ORG" determinerCode="INSTANCE">
   									<id root="2.16.840.1.113883.4.1"/>
   								</scopingOrganization>
   							</asOtherIDs>
   						</patientPerson>
   						<providerOrganization classCode="ORG" determinerCode="INSTANCE">
   							<id root="1.1"/>
   							<contactParty xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
   							</providerOrganization>
   							<subjectOf1>
   								<queryMatchObservation classCode="CASE" moodCode="EVN">
   									<code code="IHE_PDQ"/>
   									<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="INT" value="100"/>
   								</queryMatchObservation>
   							</subjectOf1>
   						</patient>
   					</subject1>
   					<custodian typeCode="CST">
   						<assignedEntity classCode="ASSIGNED">
   							<id root="1.1"/>
   							<code code="NotHealthDataLocator" codeSystem="1.3.6.1.4.1.19376.1.2.27.2"/>
   						</assignedEntity>
   					</custodian>
   				</registrationEvent>
   			</subject>
   			<queryAck>
   				<queryId root="1.1" extension="-abd3453dcd24wkkks545"/>
   				<queryResponseCode code="OK"/>
   			</queryAck>
   			<queryByParameter>
   				<queryId root="1.1" extension="-abd3453dcd24wkkks545"/>
   				<statusCode code="new"/>
   				<responseModalityCode code="R"/>
   				<responsePriorityCode code="I"/>
   				<parameterList>
   					<livingSubjectAdministrativeGender>
   						<value code="M"/>
   						<semanticsText representation="TXT"/>
   					</livingSubjectAdministrativeGender>
   					<livingSubjectBirthTime>
   						<value value="19630804"/>
   						<semanticsText representation="TXT"/>
   					</livingSubjectBirthTime>
   					<livingSubjectId>
   						<value root="1.1" extension="1111"/>
   						<semanticsText representation="TXT"/>
   					</livingSubjectId>
   					<livingSubjectName>
   						<value>
   							<family partType="FAM">Younger</family>
   							<given partType="GIV">Gallow</given>
                        		</value>
                        		<semanticsText representation="TXT"/>
                        	</livingSubjectName>
                     </parameterList>
                 </queryByParameter>
             </controlActProcess>
     </PRPA_IN201306UV02>
   </soap:Body>
</soap:Envelope>]]></con:responseContent><con:wsaConfig mustUnderstand="NONE" version="200508"/></con:response></con:config></con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep><con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2014-04-01T18:06:54Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2014-04-01T18:16:54Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>04/01/2014 18:06:54</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2014-05-01T00:00:00Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>
<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Document Query" searchProperties="true" id="8271858b-0d6d-4d2f-81e5-d8591b2274ae">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>

<con:testStep name="update config" type="groovy">
	<con:settings/>
	<con:config>
		<script>nhinc.FileUtils.updateProperty(context.findProperty('GatewayPropDir'), "gateway.properties", "documentQueryQuerySelf", "false", log);</script>
	</con:config>
</con:testStep>
<con:testStep name="Clear Correlation Table & Add Correlation" type="groovy">
	<con:settings/>
	<con:config>
		<script>context.withSql('PatientCorrelationDB') { sql ->
		def table = context.findProperty('PatientCorrelationTable')

		sql.execute('delete from ' + table)

		def localAA = context.findProperty( "LocalAA" )
		def localPatientID = context.findProperty("LocalPatientID")
		def remoteAA = context.findProperty( "RemoteAA" )
		def remotePatientID = context.findProperty("RemotePatientID")
		def insertSql = "insert into " + table + " (correlationId, PatientAssigningAuthorityId, PatientId, CorrelatedPatientAssignAuthId, CorrelatedPatientId) " +
		"values (1, ?, ?, ?, ?)"
		sql.executeUpdate(insertSql, [localAA, localPatientID, remoteAA, remotePatientID])
		}</script>
</con:config>
</con:testStep>
<con:testStep name="Clear AA Mapping Table & Add Mapping" type="groovy">
	<con:settings/>
	<con:config>
		<script>context.withSql('AAMappingDB') { sql ->
		def table = context.findProperty('AAMappingTable')

		sql.execute('delete from ' + table)

		def remoteAA = context.findProperty( "RemoteAA" )
		def remoteHCID = context.findProperty("RemoteHCID")
		def insertSql = "insert into " + table + " (id, assigningauthorityid, homecommunityid) " +
		"values (1, ?, ?)"
		sql.executeUpdate(insertSql, [remoteAA, remoteHCID])
		}</script>
</con:config>
</con:testStep>
<con:testStep name="Document Query" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityDocQueryBindingSoap</con:interface>
		<con:operation>RespondingGateway_CrossGatewayQuery</con:operation>
		<con:request name="Document Query">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-DocQuery}</con:endpoint>
	<con:request><![CDATA[

		<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:urn1="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:urn2="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:urn3="urn:gov:hhs:fha:nhinc:common:nhinccommon">
   <soap:Header/>
   <soap:Body testSuite="Entity_g1" testCase="Document Query">
      <urn:RespondingGateway_CrossGatewayQueryRequest>
         <urn1:AdhocQueryRequest federated="false" startIndex="0" maxResults="-1">
            <urn1:ResponseOption returnType="LeafClass" returnComposedObjects="false"/>
            <urn2:AdhocQuery home="urn:oid:1.1" id="urn:uuid:14d4debf-8f97-4251-9a74-a90016b0af0d">
               <urn2:Slot name="$XDSDocumentEntryPatientId">
                  <urn2:ValueList>
                     <urn2:Value>'${#Project#DQPatientID}^^^&${#Project#LocalAA}&ISO'</urn2:Value>
                  </urn2:ValueList>
               </urn2:Slot>
               <urn2:Slot name="$XDSDocumentEntryStatus">
                  <urn2:ValueList>
                     <urn2:Value>('urn:oasis:names:tc:ebxml-regrep:StatusType:Approved')</urn2:Value>
                  </urn2:ValueList>
               </urn2:Slot>
         <urn2:Slot name="$XDSDocumentEntryClassCode">
            <urn2:ValueList>
                    <urn2:Value>34133-9</urn2:Value>
                  </urn2:ValueList>
               </urn2:Slot>
               <urn2:Slot name="$XDSDocumentEntryClassCodeScheme">
                  <urn2:ValueList>
                     <urn2:Value>2.16.840.1.113883.6.1</urn2:Value>
                  </urn2:ValueList>
               </urn2:Slot>
            </urn2:AdhocQuery>
         </urn1:AdhocQueryRequest>
         <urn:assertion>
            <urn3:address xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:addressType>
                  <urn3:code>AddrCode</urn3:code>
                  <urn3:codeSystem>AddrCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>AddrCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>AddrCode</urn3:displayName>
                  <urn3:originalText>AddrCode</urn3:originalText>
               </urn3:addressType>
               <urn3:city>AddrCity</urn3:city>
               <urn3:country>AddrCountry</urn3:country>
               <urn3:state>AddrState</urn3:state>
               <urn3:streetAddress>AddrStreet</urn3:streetAddress>
               <urn3:zipCode>AddrZip</urn3:zipCode>
            </urn3:address>
            <urn3:dateOfBirth xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">06/04/1959 05:21:00</urn3:dateOfBirth>
            <urn3:explanationNonClaimantSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">Electronic</urn3:explanationNonClaimantSignature>
            <urn3:haveSecondWitnessSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">false</urn3:haveSecondWitnessSignature>
            <urn3:haveSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">false</urn3:haveSignature>
            <urn3:haveWitnessSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">false</urn3:haveWitnessSignature>
            <urn3:homeCommunity xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:description>${#Project#LocalHCDescription}</urn3:description>
               <urn3:homeCommunityId>${#Project#LocalHCID}</urn3:homeCommunityId>
               <urn3:name>${#Project#LocalHCDescription}</urn3:name>
            </urn3:homeCommunity>
            <urn3:personName xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:familyName>Smith</urn3:familyName>
               <urn3:givenName>Sandy</urn3:givenName>
               <urn3:nameType>
                  <urn3:code>nameCode</urn3:code>
                  <urn3:codeSystem>nameCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>nameCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>nameCode</urn3:displayName>
                  <urn3:originalText>nameCode</urn3:originalText>
               </urn3:nameType>
               <urn3:secondNameOrInitials>S</urn3:secondNameOrInitials>
               <urn3:fullName>Sandy S. Smith</urn3:fullName>
            </urn3:personName>
            <urn3:phoneNumber xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:areaCode>321</urn3:areaCode>
               <urn3:countryCode>1</urn3:countryCode>
               <urn3:extension>5436</urn3:extension>
               <urn3:localNumber>253-6849</urn3:localNumber>
               <urn3:phoneNumberType>
                  <urn3:code>phoneCode</urn3:code>
                  <urn3:codeSystem>phoneCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>phoneCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>phoneCode</urn3:displayName>
                  <urn3:originalText>phoneCode</urn3:originalText>
               </urn3:phoneNumberType>
            </urn3:phoneNumber>
            <urn3:secondWitnessAddress xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:addressType>
                  <urn3:code>AddrCode</urn3:code>
                  <urn3:codeSystem>AddrCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>AddrCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>AddrCode</urn3:displayName>
                  <urn3:originalText>AddrCode</urn3:originalText>
               </urn3:addressType>
               <urn3:city>Addr2City</urn3:city>
               <urn3:country>Addr2Country</urn3:country>
               <urn3:state>Addr2State</urn3:state>
               <urn3:streetAddress>Addr2Street</urn3:streetAddress>
               <urn3:zipCode>Addr2Zip</urn3:zipCode>
            </urn3:secondWitnessAddress>
            <urn3:secondWitnessName xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:familyName>Smith</urn3:familyName>
               <urn3:givenName>Sammy</urn3:givenName>
               <urn3:nameType>
                  <urn3:code>nameCode</urn3:code>
                  <urn3:codeSystem>nameCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>nameCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>nameCode</urn3:displayName>
                  <urn3:originalText>nameCode</urn3:originalText>
               </urn3:nameType>
               <urn3:secondNameOrInitials>s</urn3:secondNameOrInitials>
               <urn3:fullName>Sammy S. Smith</urn3:fullName>
            </urn3:secondWitnessName>
            <urn3:secondWitnessPhone xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:areaCode>321</urn3:areaCode>
               <urn3:countryCode>1</urn3:countryCode>
               <urn3:extension>5424</urn3:extension>
               <urn3:localNumber>542-6823</urn3:localNumber>
               <urn3:phoneNumberType>
                  <urn3:code>phoneCode</urn3:code>
                  <urn3:codeSystem>phoneCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>phoneCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>phoneCode</urn3:displayName>
                  <urn3:originalText>phoneCode</urn3:originalText>
               </urn3:phoneNumberType>
            </urn3:secondWitnessPhone>
            <urn3:SSN xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">253-98-7546</urn3:SSN>
            <urn3:uniquePatientId xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">500000000^^^&1.1&ISO</urn3:uniquePatientId>
            <urn3:witnessAddress xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:addressType>
                  <urn3:code>addrCode</urn3:code>
                  <urn3:codeSystem>addrCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>addrCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>addrCode</urn3:displayName>
                  <urn3:originalText>addrCode</urn3:originalText>
               </urn3:addressType>
               <urn3:city>Burnell</urn3:city>
               <urn3:country>USA</urn3:country>
               <urn3:state>FL</urn3:state>
               <urn3:streetAddress>825 North</urn3:streetAddress>
               <urn3:zipCode>32184</urn3:zipCode>
            </urn3:witnessAddress>
            <urn3:witnessName xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:familyName>Smith</urn3:familyName>
               <urn3:givenName>Scott</urn3:givenName>
               <urn3:nameType>
                  <urn3:code>nameCode</urn3:code>
                  <urn3:codeSystem>nameCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>nameCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>nameCode</urn3:displayName>
                  <urn3:originalText>nameCode</urn3:originalText>
               </urn3:nameType>
               <urn3:secondNameOrInitials>S.</urn3:secondNameOrInitials>
               <urn3:fullName>Scott S. Smith</urn3:fullName>
            </urn3:witnessName>
            <urn3:witnessPhone xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:areaCode>321</urn3:areaCode>
               <urn3:countryCode>1</urn3:countryCode>
               <urn3:extension>8432</urn3:extension>
               <urn3:localNumber>985-2239</urn3:localNumber>
               <urn3:phoneNumberType>
                  <urn3:code>phoneCode</urn3:code>
                  <urn3:codeSystem>phoneCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>phoneCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>phoneCode</urn3:displayName>
                  <urn3:originalText>phoneCode</urn3:originalText>
               </urn3:phoneNumberType>
            </urn3:witnessPhone>
            <urn3:userInfo xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:personName>
                  <urn3:familyName>Skagerberg</urn3:familyName>
                  <urn3:givenName>Karl</urn3:givenName>
                  <urn3:nameType>
                     <urn3:code>nameCode</urn3:code>
                     <urn3:codeSystem>nameCodeSyst</urn3:codeSystem>
                     <urn3:codeSystemName>nameCodeSystName</urn3:codeSystemName>
                     <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                     <urn3:displayName>nameCode</urn3:displayName>
                     <urn3:originalText>nameCode</urn3:originalText>
                  </urn3:nameType>
                  <urn3:secondNameOrInitials>S</urn3:secondNameOrInitials>
                  <urn3:fullName>Kasrl S. Skagerberg</urn3:fullName>
               </urn3:personName>
               <urn3:userName>kskagerberg</urn3:userName>
               <urn3:org>
                  <urn3:description>${#Project#LocalHCDescription}</urn3:description>
                  <urn3:homeCommunityId>${#Project#LocalHCID}</urn3:homeCommunityId>
                  <urn3:name>${#Project#LocalHCDescription}</urn3:name>
               </urn3:org>
               <urn3:roleCoded>
                  <urn3:code>307969004</urn3:code>
                  <urn3:codeSystem>2.16.840.1.113883.6.96</urn3:codeSystem>
                  <urn3:codeSystemName>SNOMED_CT</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>Public Health</urn3:displayName>
                  <urn3:originalText>Public Health</urn3:originalText>
               </urn3:roleCoded>
            </urn3:userInfo>
            <urn3:authorized xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">true</urn3:authorized>
            <urn3:purposeOfDisclosureCoded xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:code>PUBLICHEALTH</urn3:code>
               <urn3:codeSystem>2.16.840.1.113883.3.18.7.1</urn3:codeSystem>
               <urn3:codeSystemName>nhin-purpose</urn3:codeSystemName>
               <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
               <urn3:displayName>Use or disclosure of Psychotherapy Notes</urn3:displayName>
               <urn3:originalText>Use or disclosure of Psychotherapy Notes</urn3:originalText>
            </urn3:purposeOfDisclosureCoded>
            <urn3:samlAuthnStatement xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:authInstant>2009-04-16T13:15:39Z</urn3:authInstant>
               <urn3:sessionIndex>987</urn3:sessionIndex>
               <urn3:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn3:authContextClassRef>
               <urn3:subjectLocalityAddress>158.147.185.168</urn3:subjectLocalityAddress>
               <urn3:subjectLocalityDNSName>cs.myharris.net</urn3:subjectLocalityDNSName>
            </urn3:samlAuthnStatement>
         <urn3:samlAuthzDecisionStatement xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:decision>Permit</urn3:decision>
               <urn3:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn3:resource>
               <urn3:action>TestSaml</urn3:action>
               <urn3:evidence>
                  <urn3:assertion>
                     <urn3:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn3:id>
                     <urn3:issueInstant>2009-04-16T13:10:39.093Z</urn3:issueInstant>
                     <urn3:version>2.0</urn3:version>
                     <urn3:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn3:issuerFormat>
                     <urn3:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn3:issuer>
                     <urn3:conditions>
                        <urn3:notBefore>2009-04-16T13:10:39.093Z</urn3:notBefore>
                        <urn3:notOnOrAfter>2009-12-31T12:00:00.000Z</urn3:notOnOrAfter>
                     </urn3:conditions>
                     <urn3:accessConsentPolicy>urn:oid:1.2.3.4</urn3:accessConsentPolicy>
                     <urn3:instanceAccessConsentPolicy>urn:oid:1.2.3.4.123456789</urn3:instanceAccessConsentPolicy>
                  </urn3:assertion>
               </urn3:evidence>
            </urn3:samlAuthzDecisionStatement>
         </urn:assertion>
         <urn:NhinTargetCommunities>
            <urn3:nhinTargetCommunity>
               <urn3:homeCommunity>
                  <urn3:description>${#Project#RemoteHCDescription}</urn3:description>
                  <urn3:homeCommunityId>${#Project#RemoteHCID}</urn3:homeCommunityId>
                  <urn3:name>${#Project#RemoteHCDescription}</urn3:name>
               </urn3:homeCommunity>
            </urn3:nhinTargetCommunity>
         </urn:NhinTargetCommunities>
      </urn:RespondingGateway_CrossGatewayQueryRequest>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion type="Schema Compliance">
		<con:configuration/>
	</con:assertion>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion name="DocID Match" type="GroovyScriptAssertion">
		<con:configuration>
			<scriptText>def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
				def holder = groovyUtils.getXmlHolder( messageExchange.responseContent );
				holder.namespaces["ns1"] = "urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0";
				holder.namespaces["ns3"] = "urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0";

				def documentID = context.findProperty('DQDocID')
				def msgDocID = holder["//ns1:AdhocQueryResponse[1]/ns3:RegistryObjectList[1]/ns3:ExtrinsicObject[1]/ns3:ExternalIdentifier[@identificationScheme='urn:uuid:2e82c1f6-a085-4c72-9da3-8640a32e42ab']/@value"];
				assert (documentID == msgDocID)</scriptText>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>

<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2014-04-01T18:06:56Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2014-04-01T18:16:56Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>04/01/2014 18:06:56</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2014-05-01T00:00:00Z</con:value>
	</con:property>
	<con:property>
		<con:name>FullPatientID</con:name>
		<con:value>'D123401^^^&amp;1.1&amp;ISO'</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>
<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Document Retrieve" searchProperties="true" id="aaab3ed0-71f1-4f72-83f0-cc840ec185cd">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>
<con:testStep name="Document Retrieve" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityDocRetrieveBindingSoap</con:interface>
		<con:operation>RespondingGateway_CrossGatewayRetrieve</con:operation>
		<con:request incomingWss="" name="Document Retrieve" outgoingWss="" wssPasswordType="">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@expand-mtom-attachments">true</con:setting>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-DocRetrieve}</con:endpoint>
	<con:request><![CDATA[

			<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:urn1="urn:ihe:iti:xds-b:2007" xmlns:urn2="urn:gov:hhs:fha:nhinc:common:nhinccommon">
   <soap:Header/>
   <soap:Body testSuite="Entity_g1" testCase="Document Retrieve">
      <urn:RespondingGateway_CrossGatewayRetrieveRequest>
         <urn1:RetrieveDocumentSetRequest>
            <urn1:DocumentRequest>
               <urn1:HomeCommunityId>urn:oid:${#Project#RemoteHCID}</urn1:HomeCommunityId>
               <urn1:RepositoryUniqueId>${#Project#DRRepoID}</urn1:RepositoryUniqueId>
               <urn1:DocumentUniqueId>${#Project#DRDocID}</urn1:DocumentUniqueId>
            </urn1:DocumentRequest>
         </urn1:RetrieveDocumentSetRequest>
         <urn:assertion>
            <urn2:address xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:addressType>
                  <urn2:code>AddrCode</urn2:code>
                  <urn2:codeSystem>AddrCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>AddrCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>AddrCode</urn2:displayName>
                  <urn2:originalText>AddrCode</urn2:originalText>
               </urn2:addressType>
               <urn2:city>AddrCity</urn2:city>
               <urn2:country>AddrCountry</urn2:country>
               <urn2:state>AddrState</urn2:state>
               <urn2:streetAddress>AddrStreet</urn2:streetAddress>
               <urn2:zipCode>AddrZip</urn2:zipCode>
            </urn2:address>
            <urn2:dateOfBirth xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">06/04/1959 05:21:00</urn2:dateOfBirth>
            <urn2:explanationNonClaimantSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">Electronic</urn2:explanationNonClaimantSignature>
            <urn2:haveSecondWitnessSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">false</urn2:haveSecondWitnessSignature>
            <urn2:haveSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">false</urn2:haveSignature>
            <urn2:haveWitnessSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">false</urn2:haveWitnessSignature>
            <urn2:homeCommunity xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:description>${#Project#LocalHCDescription}</urn2:description>
               <urn2:homeCommunityId>${#Project#LocalHCID}</urn2:homeCommunityId>
               <urn2:name>${#Project#LocalHCDescription}</urn2:name>
            </urn2:homeCommunity>
            <urn2:personName xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:familyName>Smith</urn2:familyName>
               <urn2:givenName>Sandy</urn2:givenName>
               <urn2:nameType>
                  <urn2:code>nameCode</urn2:code>
                  <urn2:codeSystem>nameCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>nameCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>nameCode</urn2:displayName>
                  <urn2:originalText>nameCode</urn2:originalText>
               </urn2:nameType>
               <urn2:secondNameOrInitials>S</urn2:secondNameOrInitials>
               <urn2:fullName>Sandy S. Smith</urn2:fullName>
            </urn2:personName>
            <urn2:phoneNumber xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:areaCode>321</urn2:areaCode>
               <urn2:countryCode>1</urn2:countryCode>
               <urn2:extension>5436</urn2:extension>
               <urn2:localNumber>253-6849</urn2:localNumber>
               <urn2:phoneNumberType>
                  <urn2:code>phoneCode</urn2:code>
                  <urn2:codeSystem>phoneCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>phoneCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>phoneCode</urn2:displayName>
                  <urn2:originalText>phoneCode</urn2:originalText>
               </urn2:phoneNumberType>
            </urn2:phoneNumber>
            <urn2:secondWitnessAddress xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:addressType>
                  <urn2:code>AddrCode</urn2:code>
                  <urn2:codeSystem>AddrCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>AddrCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>AddrCode</urn2:displayName>
                  <urn2:originalText>AddrCode</urn2:originalText>
               </urn2:addressType>
               <urn2:city>Addr2City</urn2:city>
               <urn2:country>Addr2Country</urn2:country>
               <urn2:state>Addr2State</urn2:state>
               <urn2:streetAddress>Addr2Street</urn2:streetAddress>
               <urn2:zipCode>Addr2Zip</urn2:zipCode>
            </urn2:secondWitnessAddress>
            <urn2:secondWitnessName xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:familyName>Smith</urn2:familyName>
               <urn2:givenName>Sammy</urn2:givenName>
               <urn2:nameType>
                  <urn2:code>nameCode</urn2:code>
                  <urn2:codeSystem>nameCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>nameCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>nameCode</urn2:displayName>
                  <urn2:originalText>nameCode</urn2:originalText>
               </urn2:nameType>
               <urn2:secondNameOrInitials>s</urn2:secondNameOrInitials>
               <urn2:fullName>Sammy S. Smith</urn2:fullName>
            </urn2:secondWitnessName>
            <urn2:secondWitnessPhone xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:areaCode>321</urn2:areaCode>
               <urn2:countryCode>1</urn2:countryCode>
               <urn2:extension>5424</urn2:extension>
               <urn2:localNumber>542-6823</urn2:localNumber>
               <urn2:phoneNumberType>
                  <urn2:code>phoneCode</urn2:code>
                  <urn2:codeSystem>phoneCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>phoneCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>phoneCode</urn2:displayName>
                  <urn2:originalText>phoneCode</urn2:originalText>
               </urn2:phoneNumberType>
            </urn2:secondWitnessPhone>
            <urn2:SSN xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">253-98-7546</urn2:SSN>
            <urn2:uniquePatientId xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">500000000^^^&1.1&ISO</urn2:uniquePatientId>
            <urn2:witnessAddress xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:addressType>
                  <urn2:code>addrCode</urn2:code>
                  <urn2:codeSystem>addrCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>addrCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>addrCode</urn2:displayName>
                  <urn2:originalText>addrCode</urn2:originalText>
               </urn2:addressType>
               <urn2:city>Burnell</urn2:city>
               <urn2:country>USA</urn2:country>
               <urn2:state>FL</urn2:state>
               <urn2:streetAddress>825 North</urn2:streetAddress>
               <urn2:zipCode>32184</urn2:zipCode>
            </urn2:witnessAddress>
            <urn2:witnessName xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:familyName>Smith</urn2:familyName>
               <urn2:givenName>Scott</urn2:givenName>
               <urn2:nameType>
                  <urn2:code>nameCode</urn2:code>
                  <urn2:codeSystem>nameCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>nameCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>nameCode</urn2:displayName>
                  <urn2:originalText>nameCode</urn2:originalText>
               </urn2:nameType>
               <urn2:secondNameOrInitials>S.</urn2:secondNameOrInitials>
               <urn2:fullName>Scott S. Smith</urn2:fullName>
            </urn2:witnessName>
            <urn2:witnessPhone xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:areaCode>321</urn2:areaCode>
               <urn2:countryCode>1</urn2:countryCode>
               <urn2:extension>8432</urn2:extension>
               <urn2:localNumber>985-2239</urn2:localNumber>
               <urn2:phoneNumberType>
                  <urn2:code>phoneCode</urn2:code>
                  <urn2:codeSystem>phoneCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>phoneCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>phoneCode</urn2:displayName>
                  <urn2:originalText>phoneCode</urn2:originalText>
               </urn2:phoneNumberType>
            </urn2:witnessPhone>
            <urn2:userInfo xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:personName>
                  <urn2:familyName>Skagerberg</urn2:familyName>
                  <urn2:givenName>Karl</urn2:givenName>
                  <urn2:nameType>
                     <urn2:code>nameCode</urn2:code>
                     <urn2:codeSystem>nameCodeSyst</urn2:codeSystem>
                     <urn2:codeSystemName>nameCodeSystName</urn2:codeSystemName>
                     <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                     <urn2:displayName>nameCode</urn2:displayName>
                     <urn2:originalText>nameCode</urn2:originalText>
                  </urn2:nameType>
                  <urn2:secondNameOrInitials>S</urn2:secondNameOrInitials>
                  <urn2:fullName>Kasrl S. Skagerberg</urn2:fullName>
               </urn2:personName>
               <urn2:userName>kskagerb</urn2:userName>
               <urn2:org>
                  <urn2:description>${#Project#LocalHCDescription}</urn2:description>
                  <urn2:homeCommunityId>${#Project#LocalHCID}</urn2:homeCommunityId>
                  <urn2:name>${#Project#LocalHCDescription}</urn2:name>
               </urn2:org>
               <urn2:roleCoded>
                  <urn2:code>307969004</urn2:code>
                  <urn2:codeSystem>2.16.840.1.113883.6.96</urn2:codeSystem>
                  <urn2:codeSystemName>SNOMED_CT</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>Public Health</urn2:displayName>
                  <urn2:originalText>Public Health</urn2:originalText>
               </urn2:roleCoded>
            </urn2:userInfo>
            <urn2:authorized xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">true</urn2:authorized>
            <urn2:purposeOfDisclosureCoded xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:code>PUBLICHEALTH</urn2:code>
               <urn2:codeSystem>2.16.840.1.113883.3.18.7.1</urn2:codeSystem>
               <urn2:codeSystemName>nhin-purpose</urn2:codeSystemName>
               <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
               <urn2:displayName>Use or disclosure of Psychotherapy Notes</urn2:displayName>
               <urn2:originalText>Use or disclosure of Psychotherapy Notes</urn2:originalText>
            </urn2:purposeOfDisclosureCoded>
            <urn2:samlAuthnStatement xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:authInstant>2009-04-16T13:15:39Z</urn2:authInstant>
               <urn2:sessionIndex>987</urn2:sessionIndex>
               <urn2:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn2:authContextClassRef>
               <urn2:subjectLocalityAddress>158.147.185.168</urn2:subjectLocalityAddress>
               <urn2:subjectLocalityDNSName>cs.myharris.net</urn2:subjectLocalityDNSName>
            </urn2:samlAuthnStatement>
            <urn2:samlAuthzDecisionStatement xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:decision>Permit</urn2:decision>
               <urn2:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn2:resource>
               <urn2:action>TestSaml</urn2:action>
               <urn2:evidence>
                  <urn2:assertion>
                     <urn2:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn2:id>
                     <urn2:issueInstant>2009-04-16T13:10:39.093Z</urn2:issueInstant>
                     <urn2:version>2.0</urn2:version>
                     <urn2:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn2:issuerFormat>
                     <urn2:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn2:issuer>
                     <urn2:conditions>
                        <urn2:notBefore>2009-04-16T13:10:39.093Z</urn2:notBefore>
                        <urn2:notOnOrAfter>2009-12-31T12:00:00.000Z</urn2:notOnOrAfter>
                     </urn2:conditions>
                     <urn2:accessConsentPolicy>urn:oid:1.2.3.4</urn2:accessConsentPolicy>
                     <urn2:instanceAccessConsentPolicy>urn:oid:1.2.3.4.123456789</urn2:instanceAccessConsentPolicy>
                  </urn2:assertion>
               </urn2:evidence>
            </urn2:samlAuthzDecisionStatement>
         </urn:assertion>
         <urn:NhinTargetCommunities>
            <urn2:nhinTargetCommunity>
               <urn2:homeCommunity>
                  <urn2:description>${#Project#RemoteHCDescription}</urn2:description>
                  <urn2:homeCommunityId>${#Project#RemoteHCID}</urn2:homeCommunityId>
                  <urn2:name>${#Project#RemoteHCDescription}</urn2:name>
               </urn2:homeCommunity>
            </urn2:nhinTargetCommunity>
         </urn:NhinTargetCommunities>
      </urn:RespondingGateway_CrossGatewayRetrieveRequest>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion type="Schema Compliance" disabled="true">
		<con:configuration>
			<definition/>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Doc Repository ID" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns5='urn:ihe:iti:xds-b:2007';
					//ns5:RetrieveDocumentSetResponse[1]/ns5:DocumentResponse[1]/ns5:RepositoryUniqueId[1]</path>
			<content>${#Project#DRRepoID}</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Doc ID" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns5='urn:ihe:iti:xds-b:2007';
					//ns5:RetrieveDocumentSetResponse[1]/ns5:DocumentResponse[1]/ns5:DocumentUniqueId[1]</path>
			<content>${#Project#DRDocID}</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Document Data" type="GroovyScriptAssertion">
		<con:configuration>
			<scriptText>def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
					def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
					holder.namespaces["ns"]="urn:ihe:iti:xds-b:2007"
					def docData = holder["//ns:RetrieveDocumentSetResponse[1]/ns:DocumentResponse[1]/ns:Document[1]"]
					log.info docData.toString()
					assert (docData.size() != 0)</scriptText>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig action="urn:gov:hhs:fha:nhinc:entitydocretrieve/EntityDocRetrievePortType/RespondingGateway_CrossGatewayRetrieveRequest" mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>CorrectedRemoteHCID</con:name>
		<con:value>urn:oid:2.2</con:value>
	</con:property>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2014-04-01T18:06:58Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2014-04-01T18:16:58Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>04/01/2014 18:06:58</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2014-05-01T00:00:00Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>

<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Admin Distribution" searchProperties="true" id="5783cde4-97f8-4dfb-bdda-ea9d97aee5d1">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>
<con:testStep name="Admin Distribution" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>AdministrativeDistribution_Binding_Soap12_g1</con:interface>
		<con:operation>SendAlertMessage</con:operation>
		<con:request name="Admin Distribution">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-EntityAdminDist}</con:endpoint>
	<con:request><![CDATA[

			<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:urn2="urn:oasis:names:tc:emergency:EDXL:DE:1.0">
   <soap:Header/>
   <soap:Body testSuite="Entity_g1" testCase="Admin Distribution">
      <urn:RespondingGateway_SendAlertMessage>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>AddrCity</urn1:city>
               <urn1:country>AddrCountry</urn1:country>
               <urn1:state>AddrState</urn1:state>
               <urn1:streetAddress>AddrStreet</urn1:streetAddress>
               <urn1:zipCode>AddrZip</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>06/04/1959 05:21:00</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>Electronic</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>false</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>false</urn1:haveSignature>
            <urn1:haveWitnessSignature>false</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>${#Project#LocalHCDescription}</urn1:description>
               <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
               <urn1:name>${#Project#LocalHCDescription}</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sandy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
               <urn1:fullName>Sandy S. Smith</urn1:fullName>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5436</urn1:extension>
               <urn1:localNumber>253-6849</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>Addr2City</urn1:city>
               <urn1:country>Addr2Country</urn1:country>
               <urn1:state>Addr2State</urn1:state>
               <urn1:streetAddress>Addr2Street</urn1:streetAddress>
               <urn1:zipCode>Addr2Zip</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sammy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>s</urn1:secondNameOrInitials>
               <urn1:fullName>Sammy S. Smith</urn1:fullName>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5424</urn1:extension>
               <urn1:localNumber>542-6823</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>253987546</urn1:SSN>
            <!--1 or more repetitions:-->
            <urn1:uniquePatientId>500000000^^^&1.1&ISO</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>addrCode</urn1:code>
                  <urn1:codeSystem>addrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>addrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>addrCode</urn1:displayName>
                  <urn1:originalText>addrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>Burnell</urn1:city>
               <urn1:country>USA</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>825 North</urn1:streetAddress>
               <urn1:zipCode>32184</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Scott</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S.</urn1:secondNameOrInitials>
               <urn1:fullName>Scott S. Smith</urn1:fullName>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>8432</urn1:extension>
               <urn1:localNumber>985-2239</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>Skagerberg</urn1:familyName>
                  <urn1:givenName>Karl</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>nameCode</urn1:code>
                     <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                     <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                     <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                     <urn1:displayName>nameCode</urn1:displayName>
                     <urn1:originalText>nameCode</urn1:originalText>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
                  <urn1:fullName>Kasrl S. Skagerberg</urn1:fullName>
               </urn1:personName>
               <urn1:userName>${#TestCase#UserId}</urn1:userName>
               <urn1:org>
                  <urn1:description>${#Project#LocalHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#LocalHCDescription}</urn1:name>
               </urn1:org>
               <urn1:roleCoded>
                  <urn1:code>80584001</urn1:code>
                  <urn1:codeSystem>2.16.840.1.113883.6.96</urn1:codeSystem>
                  <urn1:codeSystemName>SNOMED_CT</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>Psychiatrist</urn1:displayName>
                  <urn1:originalText>Psychiatrist</urn1:originalText>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>true</urn1:authorized>
            <urn1:purposeOfDisclosureCoded>
               <urn1:code>PSYCHOTHERAPY</urn1:code>
               <urn1:codeSystem>2.16.840.1.113883.3.18.7.1</urn1:codeSystem>
               <urn1:codeSystemName>nhin-purpose</urn1:codeSystemName>
               <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
               <urn1:displayName>Use or disclosure of Psychotherapy Notes</urn1:displayName>
               <urn1:originalText>Psychotherapy Notes</urn1:originalText>
            </urn1:purposeOfDisclosureCoded>
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-09-01T13:00:00.000Z</urn1:authInstant>
               <urn1:sessionIndex>mySessionIndex</urn1:sessionIndex>
               <urn1:authContextClassRef>myContextClassRef</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>mySubjectLocalityAddress</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>mySubjectLocalityDns</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>myAuthzDecisionStatementResource</urn1:resource>
               <urn1:action>myAuthzDecisionStatementAction</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>AuthzDecisionStatementEvidenceAssertionId</urn1:id>
                     <urn1:issueInstant>2009-09-02T14:00:00.000Z</urn1:issueInstant>
                     <urn1:version>2.0</urn1:version>
                     <urn1:issuer>CN=Mr Saml User,OU=SU,O=Mr SAML Org,L=Chantilly,ST=VA,C=US</urn1:issuer>
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <urn1:conditions>
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <urn1:accessConsentPolicy>urn:oid:1.2.3.4</urn1:accessConsentPolicy>
                     <urn1:instanceAccessConsentPolicy>urn:oid:1.2.3.4.123456789</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
            <urn1:samlSignature>
               <!--Optional:-->
               <urn1:keyInfo>
                  <!--Optional:-->
                  <urn1:rsaKeyValueModulus>cid:243113487404</urn1:rsaKeyValueModulus>
                  <!--Optional:-->
                  <urn1:rsaKeyValueExponent>cid:159355901562</urn1:rsaKeyValueExponent>
               </urn1:keyInfo>
               <!--Optional:-->
               <urn1:signatureValue>cid:383675305350</urn1:signatureValue>
            </urn1:samlSignature>
            </urn:assertion>
         <!--Optional:-->
         <urn:nhinTargetCommunities>
            <!--1 or more repetitions:-->
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
               <urn1:list>?</urn1:list>
               <urn1:region>?</urn1:region>
            </urn1:nhinTargetCommunity>
         </urn:nhinTargetCommunities>
         <urn2:EDXLDistribution>
            <urn2:distributionID>633990682441061250</urn2:distributionID>
            <urn2:senderID>actor@2.16.840.1.113883.3.166</urn2:senderID>
            <urn2:dateTimeSent>2010-08-14T12:18:13.512375-08:00</urn2:dateTimeSent>
            <urn2:distributionStatus>Actual</urn2:distributionStatus>
            <urn2:distributionType>Update</urn2:distributionType>
            <urn2:combinedConfidentiality>Public</urn2:combinedConfidentiality>
            <!--Optional:-->
            <urn2:language>?</urn2:language>
            <!--Zero or more repetitions:-->
            <urn2:senderRole>
               <urn2:valueListUrn>?</urn2:valueListUrn>
               <!--1 or more repetitions:-->
               <urn2:value>?</urn2:value>
            </urn2:senderRole>
            <!--Zero or more repetitions:-->
            <urn2:recipientRole>
               <urn2:valueListUrn>?</urn2:valueListUrn>
               <!--1 or more repetitions:-->
               <urn2:value>?</urn2:value>
            </urn2:recipientRole>
            <!--Zero or more repetitions:-->
            <urn2:keyword>
               <urn2:valueListUrn>?</urn2:valueListUrn>
               <!--1 or more repetitions:-->
               <urn2:value>?</urn2:value>
            </urn2:keyword>
            <!--Zero or more repetitions:-->
            <urn2:distributionReference>?</urn2:distributionReference>
            <!--Zero or more repetitions:-->
            <urn2:explicitAddress>
               <urn2:explicitAddressScheme>modified_IHEIntendedRecipient</urn2:explicitAddressScheme>
               <!--1 or more repetitions:-->
               <urn2:explicitAddressValue>^^^^^^^^^2.16.840.1.113883.3.166|0000000001</urn2:explicitAddressValue>
            </urn2:explicitAddress>
            <!--Zero or more repetitions:-->
            <urn2:targetArea>
               <!--Zero or more repetitions:-->
               <urn2:circle>?</urn2:circle>
               <!--Zero or more repetitions:-->
               <urn2:polygon>?</urn2:polygon>
               <!--Zero or more repetitions:-->
               <urn2:country>?</urn2:country>
               <!--Zero or more repetitions:-->
               <urn2:subdivision>?</urn2:subdivision>
               <!--Zero or more repetitions:-->
               <urn2:locCodeUN>?</urn2:locCodeUN>
            </urn2:targetArea>
            <!--Zero or more repetitions:-->
            <urn2:contentObject>
               <!--Optional:-->
               <urn2:contentDescription>PH Alert Message</urn2:contentDescription>
               <!--Zero or more repetitions:-->
               <urn2:contentKeyword>
                  <urn2:valueListUrn>?</urn2:valueListUrn>
                  <!--1 or more repetitions:-->
                  <urn2:value>?</urn2:value>
               </urn2:contentKeyword>
               <!--Optional:-->
               <urn2:incidentID>TEST</urn2:incidentID>
               <!--Optional:-->
               <urn2:incidentDescription>This is a test message</urn2:incidentDescription>
               <!--Zero or more repetitions:-->
               <urn2:originatorRole>
                  <urn2:valueListUrn>?</urn2:valueListUrn>
                  <!--1 or more repetitions:-->
                  <urn2:value>?</urn2:value>
               </urn2:originatorRole>
               <!--Zero or more repetitions:-->
               <urn2:consumerRole>
                  <urn2:valueListUrn>?</urn2:valueListUrn>
                  <!--1 or more repetitions:-->
                  <urn2:value>?</urn2:value>
               </urn2:consumerRole>
               <!--Optional:-->
               <urn2:confidentiality>Public</urn2:confidentiality>
               <!--You have a CHOICE of the next 2 items at this level-->
		<urn2:nonXMLContent>
                  <urn2:mimeType>application/pdf</urn2:mimeType>
                  <!--Optional:-->
                  <urn2:size>19</urn2:size>
                  <!--Optional:-->
                  <urn2:digest>?</urn2:digest>
                  <!--Optional:-->
                  <urn2:uri>?</urn2:uri>
                  <!--Optional:-->
                  <urn2:contentData>LDLIHAPIISDALKDF902383K1182K4J49DFNF3KR0482HJ1029F393</urn2:contentData>
               </urn2:nonXMLContent>
               <!--You may enter ANY elements at this point-->
            </urn2:contentObject>
         </urn2:EDXLDistribution>
      </urn:RespondingGateway_SendAlertMessage>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes"><con:configuration><codes>202</codes></con:configuration></con:assertion><con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep name="Delay" type="delay">
	<con:settings/>
	<con:config><delay>3000</delay></con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config><script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 2 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
}</script></con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2014-04-01T18:07:01Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2014-04-01T18:17:01Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>04/01/2014 18:07:01</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2014-05-01T00:00:00Z</con:value>
	</con:property>
</con:properties>
</con:testCase>
<con:properties>
	<con:property>
		<con:name>Endpoint-DocRetrieve</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentRetrieve/3_0/EntityService/EntityDocRetrieve</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DSDeferredResp</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentSubmission/2_0/EntityService/EntityDocSubmissionDeferredResponseUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-EntityAdminDist</con:name>
		<con:value>http://localhost:8080/Gateway/AdminDistribution/2_0/AdministrativeDistribution_Service</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-EntityXDRRequest</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentSubmission/2_0/EntityService/EntityDocSubmissionDeferredRequestUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-XDREntity</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentSubmission/2_0/EntityService/EntityDocSubmissionUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DocQuery</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentQuery/2_0/EntityService/EntityDocQueryUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Notify</con:name>
		<con:value>http://localhost:8080/Gateway/HIEM/2_0/EntityNotificationConsumer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscovery</con:name>
		<con:value>http://localhost:8080/Gateway/PatientDiscovery/1_0/EntityPatientDiscovery</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscoveryAsyncReq</con:name>
		<con:value>http://localhost:8080/Gateway/PatientDiscovery/1_0/EntityService/EntityPatientDiscoveryDeferredRequestUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscoveryAsyncResp</con:name>
		<con:value>http://localhost:8080/Gateway/PatientDiscovery/1_0/EntityService/EntityPatientDiscoveryDeferredResponseUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Subscribe</con:name>
		<con:value>http://localhost:8080/Gateway/HIEM/2_0/EntityNotificationProducer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Unsubscribe</con:name>
		<con:value>http://localhost:8080/Gateway/HIEM/2_0/EntitySubscriptionManager</con:value>
	</con:property>
</con:properties>
<con:setupScript/>
<con:tearDownScript/>
<con:reportParameters/>
</con:testSuite>
<con:testSuite name="g0">
	<con:settings/>
	<con:runType>SEQUENTIAL</con:runType>
	<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Document Submission Deferred Req" searchProperties="true" id="94e4f365-297e-4c77-aba9-1de42c5decb5">
		<con:settings/>
		<con:testStep type="groovy" name="Clear Audit Logs">
			<con:settings/>
			<con:config>
				<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
		</con:config>
	</con:testStep>
	<con:testStep name="Doc Submission Deferred Req" type="request">
		<con:settings/>
		<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
			<con:interface>EntityXDRAsyncRequest_Binding</con:interface>
			<con:operation>ProvideAndRegisterDocumentSet-bAsyncRequest</con:operation>
			<con:request incomingWss="" name="Doc Submission Deferred Req" outgoingWss="" useWsAddressing="true" wssPasswordType="">
				<con:settings>
					<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
		</con:settings>
		<con:encoding>UTF-8</con:encoding>
		<con:endpoint>${#TestSuite#Endpoint-EntityXDRRequest}</con:endpoint>
		<con:request><![CDATA[

				<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:urn2="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:urn3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:urn4="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:urn5="urn:ihe:iti:xds-b:2007">
   <soap:Header/>
   <soap:Body testSuite="Entity_g0" testCase="Document Submission Deferred Request">
      <urn:RespondingGateway_ProvideAndRegisterDocumentSetRequest>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>AddrCity</urn1:city>
               <urn1:country>AddrCountry</urn1:country>
               <urn1:state>AddrState</urn1:state>
               <urn1:streetAddress>AddrStreet</urn1:streetAddress>
               <urn1:zipCode>AddrZip</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>06/04/1959 05:21:00</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>Electronic</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>false</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>false</urn1:haveSignature>
            <urn1:haveWitnessSignature>false</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>${#Project#LocalHCDescription}</urn1:description>
               <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
               <urn1:name>${#Project#LocalHCDescription}</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sandy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
               <urn1:fullName>Sandy S. Smith</urn1:fullName>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5436</urn1:extension>
               <urn1:localNumber>253-6849</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>Addr2City</urn1:city>
               <urn1:country>Addr2Country</urn1:country>
               <urn1:state>Addr2State</urn1:state>
               <urn1:streetAddress>Addr2Street</urn1:streetAddress>
               <urn1:zipCode>Addr2Zip</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sammy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>s</urn1:secondNameOrInitials>
               <urn1:fullName>Sammy S. Smith</urn1:fullName>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5424</urn1:extension>
               <urn1:localNumber>542-6823</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>253-98-7546</urn1:SSN>
            <urn1:uniquePatientId>500000000^^^&1.1&ISO</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>addrCode</urn1:code>
                  <urn1:codeSystem>addrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>addrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>addrCode</urn1:displayName>
                  <urn1:originalText>addrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>Burnell</urn1:city>
               <urn1:country>USA</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>825 North</urn1:streetAddress>
               <urn1:zipCode>32184</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Scott</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S.</urn1:secondNameOrInitials>
               <urn1:fullName>Scott S. Smith</urn1:fullName>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>8432</urn1:extension>
               <urn1:localNumber>985-2239</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>Skagerberg</urn1:familyName>
                  <urn1:givenName>Karl</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>nameCode</urn1:code>
                     <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                     <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                     <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                     <urn1:displayName>nameCode</urn1:displayName>
                     <urn1:originalText>nameCode</urn1:originalText>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
                  <urn1:fullName>Kasrl S. Skagerberg</urn1:fullName>
               </urn1:personName>
               <urn1:userName>kskagerb</urn1:userName>
               <urn1:org>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:org>
               <urn1:roleCoded>
                  <urn1:code>307969004</urn1:code>
                  <urn1:codeSystem>2.16.840.1.113883.6.96</urn1:codeSystem>
                  <urn1:codeSystemName>SNOMED_CT</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>Public Health</urn1:displayName>
                  <urn1:originalText>Public Health</urn1:originalText>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>true</urn1:authorized>
            <urn1:purposeOfDisclosureCoded>
               <urn1:code>PUBLICHEALTHKIERAN</urn1:code>
               <urn1:codeSystem>2.16.840.1.113883.3.18.7.1</urn1:codeSystem>
               <urn1:codeSystemName>nhin-purpose</urn1:codeSystemName>
               <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
               <urn1:displayName>Use or disclosure of Psychotherapy Notes</urn1:displayName>
               <urn1:originalText>Use or disclosure of Psychotherapy Notes</urn1:originalText>
            </urn1:purposeOfDisclosureCoded>
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-04-16T13:15:39Z</urn1:authInstant>
               <urn1:sessionIndex>987</urn1:sessionIndex>
               <urn1:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>158.147.185.168</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>cs.myharris.net</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn1:resource>
               <urn1:action>TestSaml</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn1:id>
                     <urn1:issueInstant>2009-04-16T13:10:39.093Z</urn1:issueInstant>
                     <urn1:version>2.0</urn1:version>
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <urn1:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn1:issuer>
                     <urn1:conditions>
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <urn1:accessConsentPolicy>Claim-Ref-1234</urn1:accessConsentPolicy>
                     <urn1:instanceAccessConsentPolicy>Claim-Instance-1</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
         </urn:assertion>

         <urn:nhinTargetCommunities>
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
            </urn1:nhinTargetCommunity>
         </urn:nhinTargetCommunities>

         <urn:ProvideAndRegisterDocumentSetRequest>
            <urn2:SubmitObjectsRequest id="123" comment="comme">
               <!--Optional:-->

               <urn4:RegistryObjectList>
                  <urn4:ExtrinsicObject id="Document01" mimeType="text/xml" objectType="urn:uuid:7edca82f-054d-47f2-a032-9b2a5b5186c1">
                     <urn4:Slot name="creationTime">
                        <urn4:ValueList>
                           <urn4:Value>20051224</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="languageCode">
                        <urn4:ValueList>
                           <urn4:Value>en-us</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="serviceStartTime">
                        <urn4:ValueList>
                           <urn4:Value>200412230800</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="serviceStopTime">
                        <urn4:ValueList>
                           <urn4:Value>200412230801</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="sourcePatientId">
                        <urn4:ValueList>
                           <urn4:Value>ST-1000^^^&1.3.6.1.4.1.21367.2003.3.9&ISO</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="sourcePatientInfo">
                        <urn4:ValueList>
                           <urn4:Value>PID-3|ST-1000^^^&1.3.6.1.4.1.21367.2003.3.9&ISO</urn4:Value>
                           <urn4:Value>PID-5|Doe^John^^^</urn4:Value>
                           <urn4:Value>PID-7|19560527</urn4:Value>
                           <urn4:Value>PID-8|M</urn4:Value>
                           <urn4:Value>PID-11|100 Main St^^Metropolis^Il^44130^USA</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Name>
                        <urn4:LocalizedString value="Physical"/>
                     </urn4:Name>
                     <urn4:Description/>
                     <urn4:Classification id="cl01" classificationScheme="urn:uuid:93606bcf-9494-43ec-9b4e-a7748d1a838d" classifiedObject="Document01">
                        <urn4:Slot name="authorPerson">
                           <urn4:ValueList>
                              <urn4:Value>Gerald Smitty</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorInstitution">
                           <urn4:ValueList>
                              <urn4:Value>Cleveland Clinic</urn4:Value>
                              <urn4:Value>Parma Community</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorRole">
                           <urn4:ValueList>
                              <urn4:Value>Attending</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorSpecialty">
                           <urn4:ValueList>
                              <urn4:Value>Orthopedic</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                     </urn4:Classification>
                     <urn4:Classification id="cl02" classificationScheme="urn:uuid:41a5887f-8865-4c09-adf7-e362475b143a" classifiedObject="Document01" nodeRepresentation="History and Physical">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon classCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="History and Physical"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl03" classificationScheme="urn:uuid:f4f85eac-e6cb-4883-b524-f2705394840f" classifiedObject="Document01" nodeRepresentation="1.3.6.1.4.1.21367.2006.7.101">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon confidentialityCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="Clinical-Staff"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl04" classificationScheme="urn:uuid:a09d5840-386c-46f2-b5ad-9c3699a4309d" classifiedObject="Document01" nodeRepresentation="CDAR2/IHE 1.0">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon formatCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="CDAR2/IHE 1.0"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl05" classificationScheme="urn:uuid:f33fb8ac-18af-42cc-ae0e-ed0b0bdb91e1" classifiedObject="Document01" nodeRepresentation="Outpatient">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon healthcareFacilityTypeCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="Outpatient"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl06" classificationScheme="urn:uuid:cccf5598-8b07-4b77-a05e-ae952c785ead" classifiedObject="Document01" nodeRepresentation="General Medicine">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon practiceSettingCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="General Medicine"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl07" classificationScheme="urn:uuid:f0306f51-975f-434e-a61c-c59651d33983" classifiedObject="Document01" nodeRepresentation="34108-1">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>LOINC</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="Outpatient Evaluation And Management"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:ExternalIdentifier id="ei01" registryObject="Document01" identificationScheme="urn:uuid:58a6f841-87b3-4a3e-92fd-a8ffeff98427" value="SELF-5^^^&1.3.6.1.4.1.21367.2005.3.7&ISO">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSDocumentEntry.patientId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                     <urn4:ExternalIdentifier id="ei02" registryObject="Document01" identificationScheme="urn:uuid:2e82c1f6-a085-4c72-9da3-8640a32e42ab" value="1.3.6.1.4.1.21367.2005.3.9999.32">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSDocumentEntry.uniqueId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                  </urn4:ExtrinsicObject>
                  <urn4:RegistryPackage id="SubmissionSet01">
                     <urn4:Slot name="submissionTime">
                        <urn4:ValueList>
                           <urn4:Value>20041225235050</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Name>
                        <urn4:LocalizedString value="Physical"/>
                     </urn4:Name>
                     <urn4:Description>
                        <urn4:LocalizedString value="Annual physical"/>
                     </urn4:Description>
                     <urn4:Classification id="cl08" classificationScheme="urn:uuid:a7058bb9-b4e4-4307-ba5b-e3f0ab85e12d" classifiedObject="SubmissionSet01">
                        <urn4:Slot name="authorPerson">
                           <urn4:ValueList>
                              <urn4:Value>Sherry Dopplemeyer</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorInstitution">
                           <urn4:ValueList>
                              <urn4:Value>Cleveland Clinic</urn4:Value>
                              <urn4:Value>Berea Community</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorRole">
                           <urn4:ValueList>
                              <urn4:Value>Purn4ary Surgon</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorSpecialty">
                           <urn4:ValueList>
                              <urn4:Value>Orthopedic</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                     </urn4:Classification>
                     <urn4:Classification id="cl09" classificationScheme="urn:uuid:aa543740-bdda-424e-8c96-df4873be8500" classifiedObject="SubmissionSet01" nodeRepresentation="History and Physical">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon contentTypeCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="History and Physical"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:ExternalIdentifier id="ei03" registryObject="SubmissionSet01" identificationScheme="urn:uuid:96fdda7c-d067-4183-912e-bf5ee74998a8" value="1.3.6.1.4.1.21367.2005.3.9999.33">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSSubmissionSet.uniqueId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                     <urn4:ExternalIdentifier id="ei04" registryObject="SubmissionSet01" identificationScheme="urn:uuid:554ac39e-e3fe-47fe-b233-965d2a147832" value="3670984664">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSSubmissionSet.sourceId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                     <urn4:ExternalIdentifier id="ei05" registryObject="SubmissionSet01" identificationScheme="urn:uuid:6b5aea1a-874d-4603-a4bc-96a0a7b38446" value="SELF-5^^^&1.3.6.1.4.1.21367.2005.3.7&ISO">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSSubmissionSet.patientId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                  </urn4:RegistryPackage>
                  <urn4:Classification id="cl10" classifiedObject="SubmissionSet01" classificationNode="urn:uuid:a54d6aa5-d40d-43f9-88c5-b4633d873bdd"/>
                  <urn4:Association id="as01" associationType="HasMember" sourceObject="SubmissionSet01" targetObject="Document01">
                     <urn4:Slot name="SubmissionSetStatus">
                        <urn4:ValueList>
                           <urn4:Value>Original</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                  </urn4:Association>
               </urn4:RegistryObjectList>

            </urn2:SubmitObjectsRequest>
            <!--1 or more repetitions:-->
            <urn5:Document id="Document01">UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</urn5:Document>
         </urn:ProvideAndRegisterDocumentSetRequest>
      </urn:RespondingGateway_ProvideAndRegisterDocumentSetRequest>
   </soap:Body>
</soap:Envelope>]]></con:request>
		<con:assertion type="SOAP Response"/>
		<con:assertion type="SOAP Fault Assertion"/>
		<con:assertion name="Match content of [@status]" type="XPath Match">
			<con:configuration>
				<path>declare namespace ns10='http://www.hhs.gov/healthit/nhin';
							//ns10:XDRAcknowledgement[1]/ns10:message[1]/@status</path>
				<content>urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:RequestAccepted</content>
				<allowWildcards>false</allowWildcards>
				<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
			</con:configuration>
		</con:assertion>
		<con:assertion name="Schema Compliance" type="Schema Compliance">
			<con:configuration>
				<definition/>
			</con:configuration>
		</con:assertion>
		<con:assertion type="Schema Compliance">
			<con:configuration/>
		</con:assertion>
		<con:credentials>
			<con:authType>Global HTTP Settings</con:authType>
		</con:credentials>
		<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
		<con:jmsPropertyConfig/>
		<con:wsaConfig action="urn:gov:hhs:fha:nhinc:nhincentityxdr:async:request:ProvideAndRegisterDocumentSet-bAsyncRequest_RequestMessage" generateMessageId="true" mustUnderstand="NONE" version="200508"/>
		<con:wsrmConfig version="1.2"/>
	</con:request>
</con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2013-09-26T21:35:58Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2013-09-26T21:45:58Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>09/26/2013 21:35:58</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2013-10-26T00:00:00Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>
<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Document Submission Deferred Resp" searchProperties="true" id="fffd46f0-f42b-442d-a5f4-3c91df14ea93">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>
<con:testStep name="Doc Submission Deferred Resp" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityXDRAsyncResponse_Binding</con:interface>
		<con:operation>ProvideAndRegisterDocumentSet-bAsyncResponse</con:operation>
		<con:request name="Doc Submission Deferred Resp">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-DSDeferredResp}</con:endpoint>
	<con:request><![CDATA[

			<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:urn2="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:urn3="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
   <soap:Header/>
   <soap:Body testSuite="Entity_g0" testCase="Document Submission Deferred Resp">
      <urn:RespondingGateway_ProvideAndRegisterDocumentSetResponseRequest>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:addressType>
               <urn1:city>AddrCity</urn1:city>
               <urn1:country>AddrCountry</urn1:country>
               <urn1:state>AddrState</urn1:state>
               <urn1:streetAddress>AddrStreet</urn1:streetAddress>
               <urn1:zipCode>AddrZip</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>06/04/1959 05:21:00</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>Electronic</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>false</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>false</urn1:haveSignature>
            <urn1:haveWitnessSignature>false</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>${#Project#LocalHCDescription}</urn1:description>
               <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
               <urn1:name>${#Project#LocalHCDescription}</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sandy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
               <urn1:fullName>Sandy S. Smith</urn1:fullName>
               <urn1:prefix>Ms.</urn1:prefix>
               <urn1:suffix>?</urn1:suffix>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5436</urn1:extension>
               <urn1:localNumber>253-6849</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:addressType>
               <urn1:city>Addr2City</urn1:city>
               <urn1:country>Addr2Country</urn1:country>
               <urn1:state>Addr2State</urn1:state>
               <urn1:streetAddress>Addr2Street</urn1:streetAddress>
               <urn1:zipCode>Addr2Zip</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sammy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:nameType>
               <urn1:secondNameOrInitials>s</urn1:secondNameOrInitials>
               <urn1:fullName>Sammy S. Smith</urn1:fullName>
               <urn1:prefix>Mr.</urn1:prefix>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5424</urn1:extension>
               <urn1:localNumber>542-6823</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>253-98-7546</urn1:SSN>
            <!--1 or more repetitions:-->
            <urn1:uniquePatientId>500000000^^^&1.1&ISO</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>addrCode</urn1:code>
                  <urn1:codeSystem>addrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>addrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>?addrCode</urn1:displayName>
                  <urn1:originalText>addrCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:addressType>
               <urn1:city>Burnell</urn1:city>
               <urn1:country>USA</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>825 North</urn1:streetAddress>
               <urn1:zipCode>32184</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Scott</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
               <urn1:fullName>Scott S. Smith</urn1:fullName>
               <urn1:prefix>Mr.</urn1:prefix>
               <urn1:suffix>?</urn1:suffix>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>8432</urn1:extension>
               <urn1:localNumber>985-2239</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>SkagerBerg</urn1:familyName>
                  <urn1:givenName>Karl</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>nameCode</urn1:code>
                     <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                     <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                     <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                     <urn1:displayName>nameCode</urn1:displayName>
                     <urn1:originalText>nameCode</urn1:originalText>
                     <!--Zero or more repetitions:-->
                     <urn1:translation/>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
                  <urn1:fullName>Karl S. Skagerberg</urn1:fullName>
                  <urn1:prefix>?</urn1:prefix>
                  <urn1:suffix>?</urn1:suffix>
               </urn1:personName>
               <urn1:userName>kskagerb</urn1:userName>
               <urn1:org>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:org>
               <!--Optional:-->
               <urn1:roleCoded>
                  <urn1:code>307969004</urn1:code>
                  <urn1:codeSystem>2.16.840.1.113883.6.96</urn1:codeSystem>
                  <urn1:codeSystemName>SNOMED_CT</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>Public Health</urn1:displayName>
                  <urn1:originalText>Public Health</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>true</urn1:authorized>
            <!--Optional:-->
            <urn1:purposeOfDisclosureCoded>
               <urn1:code>PUBLICHEALTHKIERAN</urn1:code>
               <urn1:codeSystem>2.16.840.1.113883.3.18.7.1</urn1:codeSystem>
               <urn1:codeSystemName>nhin-purpose</urn1:codeSystemName>
               <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
               <urn1:displayName>Use or disclosure of Psychotherapy notes</urn1:displayName>
               <urn1:originalText>Use or disclosure of Psychotherapy notes</urn1:originalText>
               <!--Zero or more repetitions:-->
               <urn1:translation/>
            </urn1:purposeOfDisclosureCoded>
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-04-16T13:15:39Z</urn1:authInstant>
               <urn1:sessionIndex>987</urn1:sessionIndex>
               <urn1:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>158.147.185.168</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>cs.myharris.net</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn1:resource>
               <urn1:action>TestSaml</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn1:id>
                     <urn1:issueInstant>2009-04-16T13:10:39.093Z</urn1:issueInstant>
                     <!--Optional:-->
                     <urn1:version>2.0</urn1:version>
                     <!--Optional:-->
                     <urn1:issuer>CN=SAML User,OU=Harris,0=HITS,L=Melbourne,ST=FL,C=US</urn1:issuer>
                     <!--Optional:-->
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <!--Optional:-->
                     <urn1:conditions>
                        <!--Optional:-->
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <!--Optional:-->
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <!--Zero or more repetitions:-->
                     <urn1:accessConsentPolicy>Claim-Ref-1234</urn1:accessConsentPolicy>
                     <!--Zero or more repetitions:-->
                     <urn1:instanceAccessConsentPolicy>Claim-Instance-1</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
            <!--Optional:-->
            <urn1:samlSignature>
               <!--Optional:-->
               <urn1:keyInfo>
                  <!--Optional:-->
                  <urn1:rsaKeyValueModulus>cid:721645965035</urn1:rsaKeyValueModulus>
                  <!--Optional:-->
                  <urn1:rsaKeyValueExponent>cid:146207300753</urn1:rsaKeyValueExponent>
               </urn1:keyInfo>
               <!--Optional:-->
               <urn1:signatureValue>cid:783710993742</urn1:signatureValue>
            </urn1:samlSignature>
            <!--Optional:-->
            <urn1:samlIssuer>
               <!--Optional:-->
               <urn1:issuer>?</urn1:issuer>
               <!--Optional:-->
               <urn1:issuerFormat>?</urn1:issuerFormat>
            </urn1:samlIssuer>
            <!--Optional:-->
            <urn1:messageId>?</urn1:messageId>
            <!--1 or more repetitions:-->
            <urn1:relatesToList>uuid:088a26e8-6b03-4bf8-84f1-737dc94be2e0</urn1:relatesToList>
         </urn:assertion>
         <!--Optional:-->
         <urn:nhinTargetCommunities>
            <!--1 or more repetitions:-->
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
            </urn1:nhinTargetCommunity>
         </urn:nhinTargetCommunities>
         <urn:RegistryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success" requestId="?"><!--Optional:-->
            <urn2:ResponseSlotList>
               <!--Zero or more repetitions:-->
               <urn3:Slot name="?" slotType="?">
                  <urn3:ValueList>
                     <urn3:Value>?</urn3:Value>
                  </urn3:ValueList>
               </urn3:Slot>
            </urn2:ResponseSlotList>
            <!--Optional:-->
            <urn2:RegistryErrorList highestSeverity="?">
               <!--1 or more repetitions:-->
               <urn2:RegistryError codeContext="?" errorCode="?" severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error" location="?">?</urn2:RegistryError>
            </urn2:RegistryErrorList>
         </urn:RegistryResponse>
      </urn:RespondingGateway_ProvideAndRegisterDocumentSetResponseRequest>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion type="Schema Compliance">
		<con:configuration/>
	</con:assertion>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion type="XPath Match">
		<con:configuration>
			<path>declare namespace ns10='http://www.hhs.gov/healthit/nhin';
//ns10:XDRAcknowledgement[1]/ns10:message[1]/@status</path>
			<content>urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:ResponseAccepted</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2013-09-26T21:36:00Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2013-09-26T21:46:00Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>09/26/2013 21:36:00</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2013-10-26T00:00:00Z</con:value>
	</con:property>
</con:properties>
</con:testCase>
<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Document Submission" searchProperties="true" id="fb0a6077-5978-4615-ae36-a77a19ceef7d">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>
<con:testStep name="Doc Submission" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityXDR_Binding</con:interface>
		<con:operation>ProvideAndRegisterDocumentSet-b</con:operation>
		<con:request incomingWss="" name="Doc Submission" outgoingWss="" wssPasswordType="">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-XDREntity}</con:endpoint>
	<con:request><![CDATA[
		<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:add="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:urn2="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:urn3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:urn4="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:urn5="urn:ihe:iti:xds-b:2007">
   <soap:Header/>
   <soap:Body testSuite="Entity_g0" testCase="Document Submission">
      <urn:RespondingGateway_ProvideAndRegisterDocumentSetRequest>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>AddrCity</urn1:city>
               <urn1:country>AddrCountry</urn1:country>
               <urn1:state>AddrState</urn1:state>
               <urn1:streetAddress>AddrStreet</urn1:streetAddress>
               <urn1:zipCode>AddrZip</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>06/04/1959 05:21:00</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>Electronic</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>false</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>false</urn1:haveSignature>
            <urn1:haveWitnessSignature>false</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>${#Project#LocalHCDescription}</urn1:description>
               <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
               <urn1:name>${#Project#LocalHCDescription}</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sandy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
               <urn1:fullName>Sandy S. Smith</urn1:fullName>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5436</urn1:extension>
               <urn1:localNumber>253-6849</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>Addr2City</urn1:city>
               <urn1:country>Addr2Country</urn1:country>
               <urn1:state>Addr2State</urn1:state>
               <urn1:streetAddress>Addr2Street</urn1:streetAddress>
               <urn1:zipCode>Addr2Zip</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sammy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>s</urn1:secondNameOrInitials>
               <urn1:fullName>Sammy S. Smith</urn1:fullName>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5424</urn1:extension>
               <urn1:localNumber>542-6823</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>253-98-7546</urn1:SSN>
            <urn1:uniquePatientId>500000000^^^&1.1&ISO</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>addrCode</urn1:code>
                  <urn1:codeSystem>addrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>addrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>addrCode</urn1:displayName>
                  <urn1:originalText>addrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>Burnell</urn1:city>
               <urn1:country>USA</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>825 North</urn1:streetAddress>
               <urn1:zipCode>32184</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Scott</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S.</urn1:secondNameOrInitials>
               <urn1:fullName>Scott S. Smith</urn1:fullName>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>8432</urn1:extension>
               <urn1:localNumber>985-2239</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>Skagerberg</urn1:familyName>
                  <urn1:givenName>Karl</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>nameCode</urn1:code>
                     <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                     <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                     <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                     <urn1:displayName>nameCode</urn1:displayName>
                     <urn1:originalText>nameCode</urn1:originalText>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
                  <urn1:fullName>Kasrl S. Skagerberg</urn1:fullName>
               </urn1:personName>
               <urn1:userName>kskagerb</urn1:userName>
               <urn1:org>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:org>
               <urn1:roleCoded>
                  <urn1:code>307969004</urn1:code>
                  <urn1:codeSystem>2.16.840.1.113883.6.96</urn1:codeSystem>
                  <urn1:codeSystemName>SNOMED_CT</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>Public Health</urn1:displayName>
                  <urn1:originalText>Public Health</urn1:originalText>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>true</urn1:authorized>
            <urn1:purposeOfDisclosureCoded>
               <urn1:code>PUBLICHEALTHKIERAN</urn1:code>
               <urn1:codeSystem>2.16.840.1.113883.3.18.7.1</urn1:codeSystem>
               <urn1:codeSystemName>nhin-purpose</urn1:codeSystemName>
               <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
               <urn1:displayName>Use or disclosure of Psychotherapy Notes</urn1:displayName>
               <urn1:originalText>Use or disclosure of Psychotherapy Notes</urn1:originalText>
            </urn1:purposeOfDisclosureCoded>
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-04-16T13:15:39Z</urn1:authInstant>
               <urn1:sessionIndex>987</urn1:sessionIndex>
               <urn1:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>158.147.185.168</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>cs.myharris.net</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn1:resource>
               <urn1:action>TestSaml</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn1:id>
                     <urn1:issueInstant>2009-04-16T13:10:39.093Z</urn1:issueInstant>
                     <urn1:version>2.0</urn1:version>
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <urn1:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn1:issuer>
                     <urn1:conditions>
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <urn1:accessConsentPolicy>Claim-Ref-1234</urn1:accessConsentPolicy>
                     <urn1:instanceAccessConsentPolicy>Claim-Instance-1</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
         </urn:assertion>

         <urn:nhinTargetCommunities>
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
            </urn1:nhinTargetCommunity>
         </urn:nhinTargetCommunities>

         <urn:ProvideAndRegisterDocumentSetRequest>
            <urn2:SubmitObjectsRequest id="123" comment="comme">
               <!--Optional:-->

               <urn4:RegistryObjectList>
                  <urn4:ExtrinsicObject id="Document01" mimeType="text/xml" objectType="urn:uuid:7edca82f-054d-47f2-a032-9b2a5b5186c1">
                     <urn4:Slot name="creationTime">
                        <urn4:ValueList>
                           <urn4:Value>20051224</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="languageCode">
                        <urn4:ValueList>
                           <urn4:Value>en-us</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="serviceStartTime">
                        <urn4:ValueList>
                           <urn4:Value>200412230800</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="serviceStopTime">
                        <urn4:ValueList>
                           <urn4:Value>200412230801</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="sourcePatientId">
                        <urn4:ValueList>
                           <urn4:Value>ST-1000^^^&1.3.6.1.4.1.21367.2003.3.9&ISO</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Slot name="sourcePatientInfo">
                        <urn4:ValueList>
                           <urn4:Value>PID-3|ST-1000^^^&1.3.6.1.4.1.21367.2003.3.9&ISO</urn4:Value>
                           <urn4:Value>PID-5|Doe^John^^^</urn4:Value>
                           <urn4:Value>PID-7|19560527</urn4:Value>
                           <urn4:Value>PID-8|M</urn4:Value>
                           <urn4:Value>PID-11|100 Main St^^Metropolis^Il^44130^USA</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Name>
                        <urn4:LocalizedString value="Physical"/>
                     </urn4:Name>
                     <urn4:Description/>
                     <urn4:Classification id="cl01" classificationScheme="urn:uuid:93606bcf-9494-43ec-9b4e-a7748d1a838d" classifiedObject="Document01">
                        <urn4:Slot name="authorPerson">
                           <urn4:ValueList>
                              <urn4:Value>Gerald Smitty</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorInstitution">
                           <urn4:ValueList>
                              <urn4:Value>Cleveland Clinic</urn4:Value>
                              <urn4:Value>Parma Community</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorRole">
                           <urn4:ValueList>
                              <urn4:Value>Attending</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorSpecialty">
                           <urn4:ValueList>
                              <urn4:Value>Orthopedic</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                     </urn4:Classification>
                     <urn4:Classification id="cl02" classificationScheme="urn:uuid:41a5887f-8865-4c09-adf7-e362475b143a" classifiedObject="Document01" nodeRepresentation="History and Physical">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon classCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="History and Physical"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl03" classificationScheme="urn:uuid:f4f85eac-e6cb-4883-b524-f2705394840f" classifiedObject="Document01" nodeRepresentation="1.3.6.1.4.1.21367.2006.7.101">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon confidentialityCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="Clinical-Staff"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl04" classificationScheme="urn:uuid:a09d5840-386c-46f2-b5ad-9c3699a4309d" classifiedObject="Document01" nodeRepresentation="CDAR2/IHE 1.0">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon formatCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="CDAR2/IHE 1.0"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl05" classificationScheme="urn:uuid:f33fb8ac-18af-42cc-ae0e-ed0b0bdb91e1" classifiedObject="Document01" nodeRepresentation="Outpatient">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon healthcareFacilityTypeCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="Outpatient"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl06" classificationScheme="urn:uuid:cccf5598-8b07-4b77-a05e-ae952c785ead" classifiedObject="Document01" nodeRepresentation="General Medicine">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon practiceSettingCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="General Medicine"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:Classification id="cl07" classificationScheme="urn:uuid:f0306f51-975f-434e-a61c-c59651d33983" classifiedObject="Document01" nodeRepresentation="34108-1">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>LOINC</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="Outpatient Evaluation And Management"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:ExternalIdentifier id="ei01" registryObject="Document01" identificationScheme="urn:uuid:58a6f841-87b3-4a3e-92fd-a8ffeff98427" value="SELF-5^^^&1.3.6.1.4.1.21367.2005.3.7&ISO">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSDocumentEntry.patientId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                     <urn4:ExternalIdentifier id="ei02" registryObject="Document01" identificationScheme="urn:uuid:2e82c1f6-a085-4c72-9da3-8640a32e42ab" value="1.3.6.1.4.1.21367.2005.3.9999.32">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSDocumentEntry.uniqueId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                  </urn4:ExtrinsicObject>
                  <urn4:RegistryPackage id="SubmissionSet01">
                     <urn4:Slot name="submissionTime">
                        <urn4:ValueList>
                           <urn4:Value>20041225235050</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                     <urn4:Name>
                        <urn4:LocalizedString value="Physical"/>
                     </urn4:Name>
                     <urn4:Description>
                        <urn4:LocalizedString value="Annual physical"/>
                     </urn4:Description>
                     <urn4:Classification id="cl08" classificationScheme="urn:uuid:a7058bb9-b4e4-4307-ba5b-e3f0ab85e12d" classifiedObject="SubmissionSet01">
                        <urn4:Slot name="authorPerson">
                           <urn4:ValueList>
                              <urn4:Value>Sherry Dopplemeyer</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorInstitution">
                           <urn4:ValueList>
                              <urn4:Value>Cleveland Clinic</urn4:Value>
                              <urn4:Value>Berea Community</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorRole">
                           <urn4:ValueList>
                              <urn4:Value>Purn4ary Surgon</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Slot name="authorSpecialty">
                           <urn4:ValueList>
                              <urn4:Value>Orthopedic</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                     </urn4:Classification>
                     <urn4:Classification id="cl09" classificationScheme="urn:uuid:aa543740-bdda-424e-8c96-df4873be8500" classifiedObject="SubmissionSet01" nodeRepresentation="History and Physical">
                        <urn4:Slot name="codingScheme">
                           <urn4:ValueList>
                              <urn4:Value>Connect-a-thon contentTypeCodes</urn4:Value>
                           </urn4:ValueList>
                        </urn4:Slot>
                        <urn4:Name>
                           <urn4:LocalizedString value="History and Physical"/>
                        </urn4:Name>
                     </urn4:Classification>
                     <urn4:ExternalIdentifier id="ei03" registryObject="SubmissionSet01" identificationScheme="urn:uuid:96fdda7c-d067-4183-912e-bf5ee74998a8" value="1.3.6.1.4.1.21367.2005.3.9999.33">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSSubmissionSet.uniqueId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                     <urn4:ExternalIdentifier id="ei04" registryObject="SubmissionSet01" identificationScheme="urn:uuid:554ac39e-e3fe-47fe-b233-965d2a147832" value="3670984664">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSSubmissionSet.sourceId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                     <urn4:ExternalIdentifier id="ei05" registryObject="SubmissionSet01" identificationScheme="urn:uuid:6b5aea1a-874d-4603-a4bc-96a0a7b38446" value="SELF-5^^^&1.3.6.1.4.1.21367.2005.3.7&ISO">
                        <urn4:Name>
                           <urn4:LocalizedString value="XDSSubmissionSet.patientId"/>
                        </urn4:Name>
                     </urn4:ExternalIdentifier>
                  </urn4:RegistryPackage>
                  <urn4:Classification id="cl10" classifiedObject="SubmissionSet01" classificationNode="urn:uuid:a54d6aa5-d40d-43f9-88c5-b4633d873bdd"/>
                  <urn4:Association id="as01" associationType="HasMember" sourceObject="SubmissionSet01" targetObject="Document01">
                     <urn4:Slot name="SubmissionSetStatus">
                        <urn4:ValueList>
                           <urn4:Value>Original</urn4:Value>
                        </urn4:ValueList>
                     </urn4:Slot>
                  </urn4:Association>
               </urn4:RegistryObjectList>

            </urn2:SubmitObjectsRequest>
            <!--1 or more repetitions:-->
            <urn5:Document id="Document01">UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</urn5:Document>
         </urn:ProvideAndRegisterDocumentSetRequest>
      </urn:RespondingGateway_ProvideAndRegisterDocumentSetRequest>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion type="XPath Match">
		<con:configuration>
			<path>declare namespace ns11='urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0';
							//ns11:RegistryResponse[1]/@status</path>
			<content>urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Schema Compliance" type="Schema Compliance">
		<con:configuration>
			<definition/>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig action="{urn:gov:hhs:fha:nhinc:nhincentityxdr}ProvideAndRegisterDocumentSet-b" mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2013-09-26T21:36:01Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2013-09-26T21:46:01Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>09/26/2013 21:36:01</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2013-10-26T00:00:00Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>

<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Patient Discovery Deferred Req" searchProperties="true" id="2d01ba9b-8e2f-4495-9afb-0df274e6ff49">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>
<con:testStep name="Patient Discovery Deferred Req" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityPatientDiscoveryAsyncReqBindingSoap</con:interface>
		<con:operation>ProcessPatientDiscoveryAsyncReq</con:operation>
		<con:request name="Patient Discovery Deferred Req" useWsAddressing="true">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-PatientDiscoveryAsyncReq}</con:endpoint>
	<con:request><![CDATA[

			<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:hl7-org:v3" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
   <soap:Header/>
   <soap:Body testSuite="Entity_g0" testCase="Patient Discovery Deferred Req">
      <urn:RespondingGateway_PRPA_IN201305UV02Request>
         <urn:PRPA_IN201305UV02 ITSVersion="XML_1.0">
            <urn:id root="1.1" extension="-5a3e95b1:11d1fa33d45:-7f9b"/>
            <urn:creationTime value="20091116084800"/>
            <urn:interactionId root="2.16.840.1.113883.1.6" extension="PRPA_IN201305UV02"/>
            <urn:processingCode code="T"/>
            <urn:processingModeCode code="T"/>
            <urn:acceptAckCode code="AL"/>
            <urn:receiver typeCode="RCV">
               <urn:device classCode="DEV" determinerCode="INSTANCE">
                  <urn:id root="1.2.345.678.999"/>
                  <urn:asAgent classCode="AGNT">
                     <urn:representedOrganization classCode="ORG" determinerCode="INSTANCE">
                        <urn:id root="${#Project#RemoteHCID}"/>
                     </urn:representedOrganization>
                  </urn:asAgent>
               </urn:device>
            </urn:receiver>
            <urn:sender typeCode="SND">
               <urn:device classCode="DEV" determinerCode="INSTANCE">
                  <urn:id root="1.2.345.678.999"/>
                  <urn:asAgent classCode="AGNT">
                     <urn:representedOrganization classCode="ORG" determinerCode="INSTANCE">
                        <urn:id root="${#Project#LocalHCID}"/>
                     </urn:representedOrganization>
                  </urn:asAgent>
               </urn:device>
            </urn:sender>
            <urn:controlActProcess classCode="CACT" moodCode="EVN">
               <urn:authorOrPerformer typeCode="AUT">
                  <urn:assignedDevice>
                     <urn:id root="${#Project#LocalAA}"/>
                  </urn:assignedDevice>
               </urn:authorOrPerformer>
               <urn:queryByParameter>
                  <urn:queryId root="${#Project#RemoteHCID}" extension="-abd3453dcd24wkkks545"/>
                  <urn:statusCode code="new"/>
                  <urn:responseModalityCode code="R"/>
                  <urn:responsePriorityCode code="I"/>
                  <urn:parameterList>
                     <urn:livingSubjectAdministrativeGender>
                        <urn:value code="${#Project#Gender}"/>
                        <urn:semanticsText representation="TXT">LivingSubject.administrativeGender</urn:semanticsText>
                     </urn:livingSubjectAdministrativeGender>
                     <urn:livingSubjectBirthTime>
                        <urn:value value="${#Project#BirthTime}"/>
                        <urn:semanticsText representation="TXT">LivingSubject.birthTime</urn:semanticsText>
                     </urn:livingSubjectBirthTime>
                     <urn:livingSubjectName>
                        <urn:value>
                           <urn:family partType="FAM">${#Project#FamilyName}</urn:family>
                           <urn:given partType="GIV">${#Project#GivenName}</urn:given>
                        </urn:value>
                        <urn:semanticsText representation="TXT">LivingSubject.name</urn:semanticsText>
                     </urn:livingSubjectName>
                     <urn:livingSubjectId>
                        <urn:value root="${#Project#LocalAA}" extension="${#Project#LocalPatientID}"/>
                        <urn:semanticsText representation="TXT"/>
                     </urn:livingSubjectId>
                  </urn:parameterList>
               </urn:queryByParameter>
            </urn:controlActProcess>
         </urn:PRPA_IN201305UV02>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>LEESBURG</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>123 Johnson Rd</urn1:streetAddress>
               <urn1:zipCode>20176</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>19990627</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>NEEDED</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>true</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>true</urn1:haveSignature>
            <urn1:haveWitnessSignature>true</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>Test HCID1</urn1:description>
               <urn1:homeCommunityId>2.16.840.1.113883.3.337</urn1:homeCommunityId>
               <urn1:name>HCID1</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>YOUNGER</urn1:familyName>
               <urn1:givenName>GALLOW</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>FJ</urn1:secondNameOrInitials>
               <urn1:fullName>Joe Smith</urn1:fullName>
               <urn1:prefix>Mr</urn1:prefix>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>123</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>1234</urn1:extension>
               <urn1:localNumber>3456789</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>W</urn1:code>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>Melbourne</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>123 Johnson Rd</urn1:streetAddress>
               <urn1:zipCode>12345</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Hughes</urn1:familyName>
               <urn1:givenName>Howie</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>HH</urn1:secondNameOrInitials>
               <urn1:fullName>Howie Hughes</urn1:fullName>
               <urn1:prefix>Dr</urn1:prefix>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>123</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>1546</urn1:extension>
               <urn1:localNumber>4567892</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>W</urn1:code>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>123456789</urn1:SSN>
            <!--1 or more repetitions:-->
            <urn1:uniquePatientId>D123401^^^&amp;2.16.840.1.113883.3.337&amp;ISO</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>Frankfort</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>MN</urn1:state>
               <urn1:streetAddress>432 Jackson St</urn1:streetAddress>
               <urn1:zipCode>65498</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Ugble</urn1:familyName>
               <urn1:givenName>Gary</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>GU</urn1:secondNameOrInitials>
               <urn1:fullName>Gary Ugble</urn1:fullName>
               <urn1:prefix>Mr</urn1:prefix>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>987</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>6549</urn1:extension>
               <urn1:localNumber>2222222</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>H</urn1:code>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>Anderson</urn1:familyName>
                  <urn1:givenName>Wilma</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>G</urn1:code>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>WA</urn1:secondNameOrInitials>
                  <urn1:fullName>Wilma Anderson</urn1:fullName>
                  <urn1:prefix>Mrs</urn1:prefix>
               </urn1:personName>
               <urn1:userName>wanderson</urn1:userName>
               <urn1:org>
                  <urn1:description>Test HCID1</urn1:description>
                  <urn1:homeCommunityId>2.16.840.1.113883.3.337</urn1:homeCommunityId>
                  <urn1:name>HCID1</urn1:name>
               </urn1:org>
               <!--Optional:-->
               <urn1:roleCoded>
                  <urn1:code>Code</urn1:code>
                  <urn1:codeSystem>CodeSystem</urn1:codeSystem>
                  <urn1:codeSystemName>CodeSystemName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>codeSystemVersion</urn1:codeSystemVersion>
                  <urn1:displayName>displayName</urn1:displayName>
                  <urn1:originalText>originalText</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>authorized</urn1:authorized>
            <!--Optional:-->
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-04-16T13:15:39Z</urn1:authInstant>
               <urn1:sessionIndex>987</urn1:sessionIndex>
               <urn1:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>158.147.185.168</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>cs.myharris.net</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn1:resource>
               <urn1:action>TestSaml</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn1:id>
                     <urn1:issueInstant>2009-04-16T13:10:39.093Z</urn1:issueInstant>
                     <urn1:version>2.0</urn1:version>
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <urn1:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn1:issuer>
                     <urn1:conditions>
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <urn1:accessConsentPolicy>Claim-Ref-1234</urn1:accessConsentPolicy>
                     <urn1:instanceAccessConsentPolicy>Claim-Instance-1</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
            <!--Optional:-->
            <urn1:samlSignature>
               <!--Optional:-->
               <urn1:keyInfo>
                  <!--Optional:-->
                  <urn1:rsaKeyValueModulus>cid:1157111506023</urn1:rsaKeyValueModulus>
                  <!--Optional:-->
                  <urn1:rsaKeyValueExponent>cid:136268302631</urn1:rsaKeyValueExponent>
               </urn1:keyInfo>
               <!--Optional:-->
               <urn1:signatureValue>cid:880867232879</urn1:signatureValue>
            </urn1:samlSignature>
         </urn:assertion>
         <!--Optional:-->
         <urn:NhinTargetCommunities>
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
            </urn1:nhinTargetCommunity>
         </urn:NhinTargetCommunities>
      </urn:RespondingGateway_PRPA_IN201305UV02Request>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion name="Verify Receiver" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns3='urn:hl7-org:v3';
							//ns3:MCCI_IN000002UV01[1]/ns3:receiver[1]/ns3:device[1]/ns3:asAgent[1]/ns3:representedOrganization[1]/ns3:id[1]/@root</path>
			<content>1.1</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Verify Sender" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns3='urn:hl7-org:v3';
							//ns3:MCCI_IN000002UV01[1]/ns3:sender[1]/ns3:device[1]/ns3:asAgent[1]/ns3:representedOrganization[1]/ns3:id[1]/@root</path>
			<content>2.2</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Verify Message" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns3='urn:hl7-org:v3';
							//ns3:MCCI_IN000002UV01[1]/ns3:acknowledgement[1]/ns3:acknowledgementDetail[1]/ns3:text[1]/text()</path>
			<content>Success</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Verify RelatesTo" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns1='http://www.w3.org/2005/08/addressing';
							//ns1:RelatesTo[1]/text()</path>
			<content>uuid:6666666666.66666.666.66</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Schema Compliance" type="Schema Compliance">
		<con:configuration>
			<definition/>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig action="urn:gov:hhs:fha:nhinc:entitypatientdiscoveryasyncreq:ProcessPatientDiscoveryAsyncReqAsyncRequest" addDefaultTo="true" messageID="uuid:6666666666.66666.666.66" mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>LocalHCID</con:name>
		<con:value>1.1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalAA</con:name>
		<con:value>1.1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalHCDescription</con:name>
		<con:value>InternalTest1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteHCID</con:name>
		<con:value>2.2</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteAA</con:name>
		<con:value>2.2</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteHCDescription</con:name>
		<con:value>InternalTest2</con:value>
	</con:property>
	<con:property>
		<con:name>RemotePatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>NHINGatewayConfigDir</con:name>
		<con:value>C:/Sun/AppServer/domains/domain1/config/nhin</con:value>
	</con:property>
	<con:property>
		<con:name>MPIDir</con:name>
		<con:value>C:/Sun/AppServer/domains/domain1/config</con:value>
	</con:property>
	<con:property>
		<con:name>LocalConfigDir</con:name>
		<con:value>C:/SelfTest/EndToEndSelfTest</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DocQuery</con:name>
		<con:value>http://localhost:8080/CONNECTGateway/EntityService/EntityDocQueryUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DocRetrieve</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityDocRetrieve</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Reidentification</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntitySubjectDiscovery</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Subscribe</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityNotificationProducer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Notify</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityNotificationConsumer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Unsubscribe</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntitySubscriptionManager</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-AuditLogQuery</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityAuditQuery</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscoveryAsyncReq</con:name>
		<con:value>http://localhost:8080/CONNECTGateway/EntityService/EntityPatientDiscoveryDeferredRequestUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>DBHost</con:name>
		<con:value>localhost</con:value>
	</con:property>
	<con:property>
		<con:name>DBPort</con:name>
		<con:value>3306</con:value>
	</con:property>
	<con:property>
		<con:name>DBUser</con:name>
		<con:value>nhincuser</con:value>
	</con:property>
	<con:property>
		<con:name>DBPass</con:name>
		<con:value>nhincpass</con:value>
	</con:property>
	<con:property>
		<con:name>PatientCorrelationDB</con:name>
		<con:value>patientcorrelationdb</con:value>
	</con:property>
	<con:property>
		<con:name>PatientCorrelationTable</con:name>
		<con:value>correlatedidentifiers</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionDB</con:name>
		<con:value>subscriptionrepository</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionTable</con:name>
		<con:value>subscription</con:value>
	</con:property>
	<con:property>
		<con:name>AAMappingDB</con:name>
		<con:value>assigningauthoritydb</con:value>
	</con:property>
	<con:property>
		<con:name>AAMappingTable</con:name>
		<con:value>aa_to_home_community_mapping</con:value>
	</con:property>
	<con:property>
		<con:name>PseudonymAA</con:name>
		<con:value>ABC</con:value>
	</con:property>
	<con:property>
		<con:name>PseudonymPatientID</con:name>
		<con:value>PSEUDO001</con:value>
	</con:property>
	<con:property>
		<con:name>RealAA</con:name>
		<con:value>1.1.1</con:value>
	</con:property>
	<con:property>
		<con:name>RealPatientID</con:name>
		<con:value>D1234010050</con:value>
	</con:property>
	<con:property>
		<con:name>DQDocID</con:name>
		<con:value>1.123401.11111</con:value>
	</con:property>
	<con:property>
		<con:name>DQPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>DynamicDQDocID</con:name>
		<con:value>103.8.9284320.020.3590.75^1266324032288</con:value>
	</con:property>
	<con:property>
		<con:name>DRDocID</con:name>
		<con:value>1.123407.777777</con:value>
	</con:property>
	<con:property>
		<con:name>DRRepoID</con:name>
		<con:value>1</con:value>
	</con:property>
	<con:property>
		<con:name>NotificationEndpoint</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/NotificationConsumerService/HiemNotify</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionEndpoint</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/NotificationProducerService/HiemSubscription</con:value>
	</con:property>
	<con:property>
		<con:name>SubscribePatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>NotifySubscriptionID</con:name>
		<con:value>-f7c1a5d:1204e50e42e:-79eb</con:value>
	</con:property>
	<con:property>
		<con:name>NotifySubscriptionManagerEndpointAddress</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/SubscriptionManagerService/HiemUnsubscribe</con:value>
	</con:property>
	<con:property>
		<con:name>UnSubscriptionID</con:name>
		<con:value>3e74139f-5271-4db1-98c0-88748fa3e4e3</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionManagerEndpointAddress</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/SubscriptionManagerService/HiemUnsubscribe</con:value>
	</con:property>
	<con:property>
		<con:name>AQUserID</con:name>
		<con:value>kskagerb</con:value>
	</con:property>
	<con:property>
		<con:name>AQPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-EntityXDRRequest</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityProxyService/EntityXDRRequest</con:value>
	</con:property>
	<con:property>
		<con:name>AsyncMsgDB</con:name>
		<con:value>asyncmsgs</con:value>
	</con:property>
	<con:property>
		<con:name>AsyncMsgTable</con:name>
		<con:value>asyncmsgrepo</con:value>
	</con:property>
	<con:property>
		<con:name>Gender</con:name>
		<con:value>M</con:value>
	</con:property>
	<con:property>
		<con:name>BirthTime</con:name>
		<con:value>19630804</con:value>
	</con:property>
	<con:property>
		<con:name>FamilyName</con:name>
		<con:value>Younger</con:value>
	</con:property>
	<con:property>
		<con:name>GivenName</con:name>
		<con:value>Gallow</con:value>
	</con:property>
	<con:property>
		<con:name>SubjectID</con:name>
		<con:value>1111</con:value>
	</con:property>
	<con:property>
		<con:name>UniquePatientId</con:name>
		<con:value>1111^^^&amp;1.1&amp;ISO</con:value>
	</con:property>
	<con:property>
		<con:name>StreetAddress</con:name>
		<con:value>123 Johnson Rd</con:value>
	</con:property>
	<con:property>
		<con:name>City</con:name>
		<con:value>Melbourne</con:value>
	</con:property>
	<con:property>
		<con:name>State</con:name>
		<con:value>FL</con:value>
	</con:property>
	<con:property>
		<con:name>ZipCode</con:name>
		<con:value>12345</con:value>
	</con:property>
	<con:property>
		<con:name>Country</con:name>
		<con:value>US</con:value>
	</con:property>
	<con:property>
		<con:name>SSN</con:name>
		<con:value>123456789</con:value>
	</con:property>
	<con:property>
		<con:name>PurposeOfDisclosure</con:name>
		<con:value>Mental</con:value>
	</con:property>
	<con:property>
		<con:name>ExpirationDate</con:name>
		<con:value>20100520</con:value>
	</con:property>
	<con:property>
		<con:name>DOB</con:name>
		<con:value>19800516</con:value>
	</con:property>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2013-09-26T21:36:02Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2013-09-26T21:46:02Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>09/26/2013 21:36:02</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2013-10-26T00:00:00Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>

<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Patient Discovery Deferred Resp" searchProperties="true" id="62a59f14-2e37-40a3-90c8-4afd3041d32d">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>
<con:testStep name="Patient Discovery Deferred Resp" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityPatientDiscoveryAsyncRespBindingSoap</con:interface>
		<con:operation>ProcessPatientDiscoveryAsyncResp</con:operation>
		<con:request name="Patient Discovery Deferred Resp">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-PatientDiscoveryAsyncResp}</con:endpoint>
	<con:request><![CDATA[<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:hl7-org:v3" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
   <soap:Header xmlns:add="SoapUI_Test/ValidationSuite/2-EndToEndSelfTest-soapui-project.xml">
      <add:Action>urn:gov:hhs:fha:nhinc:entitypatientdiscoveryasyncresp:ProcessPatientDiscoveryAsyncRespAsyncRequest</add:Action>
      <add:MessageID>uuid:12bcfc1e-f422-4d1d-af99-ff83d050313e</add:MessageID>
      <add:RelatesTo>uuid:6666666666.66666.666.66</add:RelatesTo>
      <add:To>${#TestSuite#Endpoint-PatientDiscoveryAsyncResp}</add:To>
   </soap:Header>
   <soap:Body testSuite="Entity_g0" testCase="Patient Discovery Deferred Resp">
      <urn:RespondingGateway_PRPA_IN201306UV02Request>
         <urn:PRPA_IN201306UV02 ITSVersion="XML_1.0">
            <urn:id root="2.2" extension="-5a3e95b1:11d1fa33d45:-8e45"/>
            <urn:creationTime value="20091116084800"/>
            <urn:interactionId root="2.16.840.1.113883.1.6" extension="PRPA_IN201306UV02"/>
            <urn:processingCode code="T"/>
            <urn:processingModeCode code="T"/>
            <urn:acceptAckCode code="AL"/>
            <!--1 or more repetitions:-->
            <urn:receiver typeCode="RCV">
               <urn:device classCode="DEV" determinerCode="INSTANCE">
                  <urn:id root="1.2.345.678.999"/>
                  <urn:asAgent classCode="AGNT">
                     <urn:representedOrganization classCode="ORG" determinerCode="INSTANCE">
                        <urn:id root="${#Project#RemoteHCID}"/>
                     </urn:representedOrganization>
                  </urn:asAgent>
               </urn:device>
            </urn:receiver>
            <urn:sender typeCode="SND">
               <urn:device classCode="DEV" determinerCode="INSTANCE">
                  <urn:id root="1.2.345.678.999"/>
                  <urn:asAgent classCode="AGNT">
                     <urn:representedOrganization classCode="ORG" determinerCode="INSTANCE">
                        <urn:id root="${#Project#LocalHCID}"/>
                     </urn:representedOrganization>
                  </urn:asAgent>
               </urn:device>
            </urn:sender>
            <urn:controlActProcess classCode="CACT" moodCode="EVN">
               <urn:code codeSystem="2.16.840.1.113883.1.6" code="PRPA_TE201306UV"/>
               <urn:authorOrPerformer typeCode="AUT">
                  <urn:assignedDevice>
                     <urn:id root="2.2"/>
                  </urn:assignedDevice>
               </urn:authorOrPerformer>
               <urn:subject typeCode="SUBJ">
                  <urn:registrationEvent classCode="REG" moodCode="EVN">
                     <urn:id nullFlavor="NA"/>
                     <urn:statusCode code="active"/>
                     <urn:subject1 typeCode="SBJ">
                        <urn:patient classCode="PAT">
                           <urn:id extension="D123402" root="2.2"/>
                           <urn:statusCode code="SD"/>
                           <urn:patientPerson>
                              <urn:name>
                                 <urn:family partType="FAM">Younger</urn:family>
                                 <urn:given partType="GIV">Gallow</urn:given>
                              </urn:name>
                              <urn:administrativeGenderCode code="M"/>
                              <urn:birthTime value="19630804"/>
                              <urn:addr>
                                 <urn:city>LEESBURG</urn:city>
                                 <urn:state>VA</urn:state>
                                 <urn:postalCode>20176</urn:postalCode>
                              </urn:addr>
                           </urn:patientPerson>
                           <urn:providerOrganization determinerCode="" classCode="">
                              <urn:id root="2.2"/>
                              <urn:contactParty xsi:nil="true" classCode="CON" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                           </urn:providerOrganization>
                        </urn:patient>
                     </urn:subject1>
                     <urn:custodian typeCode="">
                        <urn:assignedEntity classCode="">
                           <urn:id root="2.2"/>
                        </urn:assignedEntity>
                     </urn:custodian>
                  </urn:registrationEvent>
               </urn:subject>
               <urn:queryAck>
                  <urn:queryId extension="-abd3453dcd24wkkks545" root="2.2"/>
                  <urn:queryResponseCode code="OK"/>
                  <urn:resultTotalQuantity value="1"/>
                  <urn:resultCurrentQuantity value="1"/>
                  <urn:resultRemainingQuantity value="0"/>
               </urn:queryAck>
               <urn:queryByParameter>
                  <urn:queryId extension="-abd3453dcd24wkkks545" root="2.2"/>
                  <urn:statusCode code="new"/>
                  <urn:responseModalityCode code="R"/>
                  <urn:responsePriorityCode code="I"/>
                  <urn:parameterList>
                     <urn:livingSubjectAdministrativeGender>
                        <urn:value code="M"/>
                        <urn:semanticsText representation="TXT"/>
                     </urn:livingSubjectAdministrativeGender>
                     <urn:livingSubjectBirthTime>
                        <urn:value value="19630804"/>
                        <urn:semanticsText representation="TXT"/>
                     </urn:livingSubjectBirthTime>
                     <urn:livingSubjectId>
                        <urn:value extension="D123401" root="1.1"/>
                        <urn:semanticsText representation="TXT"/>
                     </urn:livingSubjectId>
                     <urn:livingSubjectName>
                        <urn:value>
                           <urn:family partType="FAM">Younger</urn:family>
                           <urn:given partType="GIV">Gallow</urn:given>
                        </urn:value>
                        <urn:semanticsText representation="TXT"/>
                     </urn:livingSubjectName>
                  </urn:parameterList>
               </urn:queryByParameter>
            </urn:controlActProcess>
         </urn:PRPA_IN201306UV02>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>LEESBURG</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>123 Johnson Rd</urn1:streetAddress>
               <urn1:zipCode>20176</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>19990627</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>NEEDED</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>true</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>true</urn1:haveSignature>
            <urn1:haveWitnessSignature>true</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>Test HCID1</urn1:description>
               <urn1:homeCommunityId>2.16.840.1.113883.3.337</urn1:homeCommunityId>
               <urn1:name>HCID1</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>YOUNGER</urn1:familyName>
               <urn1:givenName>GALLOW</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>FJ</urn1:secondNameOrInitials>
               <urn1:fullName>Joe Smith</urn1:fullName>
               <urn1:prefix>Mr</urn1:prefix>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>123</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>1234</urn1:extension>
               <urn1:localNumber>3456789</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>W</urn1:code>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>Melbourne</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>123 Johnson Rd</urn1:streetAddress>
               <urn1:zipCode>12345</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Hughes</urn1:familyName>
               <urn1:givenName>Howie</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>HH</urn1:secondNameOrInitials>
               <urn1:fullName>Howie Hughes</urn1:fullName>
               <urn1:prefix>Dr</urn1:prefix>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>123</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>1546</urn1:extension>
               <urn1:localNumber>4567892</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>W</urn1:code>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>123456789</urn1:SSN>
            <!--1 or more repetitions:-->
            <urn1:uniquePatientId>D123401^^^&amp;2.16.840.1.113883.3.337&amp;ISO</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>Frankfort</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>MN</urn1:state>
               <urn1:streetAddress>432 Jackson St</urn1:streetAddress>
               <urn1:zipCode>65498</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Ugble</urn1:familyName>
               <urn1:givenName>Gary</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>GU</urn1:secondNameOrInitials>
               <urn1:fullName>Gary Ugble</urn1:fullName>
               <urn1:prefix>Mr</urn1:prefix>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>987</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>6549</urn1:extension>
               <urn1:localNumber>2222222</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>H</urn1:code>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>Anderson</urn1:familyName>
                  <urn1:givenName>Wilma</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>G</urn1:code>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>WA</urn1:secondNameOrInitials>
                  <urn1:fullName>Wilma Anderson</urn1:fullName>
                  <urn1:prefix>Mrs</urn1:prefix>
               </urn1:personName>
               <urn1:userName>wanderson</urn1:userName>
               <urn1:org>
                  <urn1:description>Test HCID1</urn1:description>
                  <urn1:homeCommunityId>2.16.840.1.113883.3.337</urn1:homeCommunityId>
                  <urn1:name>HCID1</urn1:name>
               </urn1:org>
               <!--Optional:-->
               <urn1:roleCoded>
                  <urn1:code>Code</urn1:code>
                  <urn1:codeSystem>CodeSystem</urn1:codeSystem>
                  <urn1:codeSystemName>CodeSystemName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>codeSystemVersion</urn1:codeSystemVersion>
                  <urn1:displayName>displayName</urn1:displayName>
                  <urn1:originalText>originalText</urn1:originalText>
                  <!--Zero or more repetitions:-->
                  <urn1:translation/>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>authorized</urn1:authorized>
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-04-16T13:15:39Z</urn1:authInstant>
               <urn1:sessionIndex>987</urn1:sessionIndex>
               <urn1:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>158.147.185.168</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>cs.myharris.net</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn1:resource>
               <urn1:action>TestSaml</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn1:id>
                     <urn1:issueInstant>2009-04-16T13:10:39.093Z</urn1:issueInstant>
                     <urn1:version>2.0</urn1:version>
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <urn1:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn1:issuer>
                     <urn1:conditions>
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <urn1:accessConsentPolicy>Claim-Ref-1234</urn1:accessConsentPolicy>
                     <urn1:instanceAccessConsentPolicy>Claim-Instance-1</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
            <!--Optional:-->
            <urn1:samlSignature>
               <!--Optional:-->
               <urn1:keyInfo>
                  <!--Optional:-->
                  <urn1:rsaKeyValueModulus>cid:1157111506023</urn1:rsaKeyValueModulus>
                  <!--Optional:-->
                  <urn1:rsaKeyValueExponent>cid:136268302631</urn1:rsaKeyValueExponent>
               </urn1:keyInfo>
               <!--Optional:-->
               <urn1:signatureValue>cid:880867232879</urn1:signatureValue>
            </urn1:samlSignature>
         </urn:assertion>
         <urn:NhinTargetCommunities>
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
            </urn1:nhinTargetCommunity>
         </urn:NhinTargetCommunities>
      </urn:RespondingGateway_PRPA_IN201306UV02Request>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion name="Match content of [typeCode/@code]" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns2='urn:hl7-org:v3';//ns2:MCCI_IN000002UV01[1]/ns2:acknowledgement[1]/ns2:typeCode[1]/@code</path>
			<content>CA</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>

	<con:assertion name="Match content of [acknowledgementDetail/text/text()]" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns2='urn:hl7-org:v3';//ns2:MCCI_IN000002UV01[1]/ns2:acknowledgement[1]/ns2:acknowledgementDetail[1]/ns2:text/text()</path>
			<content>Success</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Schema Compliance" type="Schema Compliance">
		<con:configuration>
			<definition/>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>LocalHCID</con:name>
		<con:value>1.1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalAA</con:name>
		<con:value>1.1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalHCDescription</con:name>
		<con:value>InternalTest1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteHCID</con:name>
		<con:value>2.2</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteAA</con:name>
		<con:value>2.2</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteHCDescription</con:name>
		<con:value>InternalTest2</con:value>
	</con:property>
	<con:property>
		<con:name>RemotePatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>NHINGatewayConfigDir</con:name>
		<con:value>C:/Sun/AppServer/domains/domain1/config/nhin</con:value>
	</con:property>
	<con:property>
		<con:name>MPIDir</con:name>
		<con:value>C:/Sun/AppServer/domains/domain1/config</con:value>
	</con:property>
	<con:property>
		<con:name>LocalConfigDir</con:name>
		<con:value>C:/SelfTest/EndToEndSelfTest</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DocQuery</con:name>
		<con:value>http://localhost:8080/CONNECTGateway/EntityService/EntityDocQueryUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DocRetrieve</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityDocRetrieve</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Reidentification</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntitySubjectDiscovery</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Subscribe</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityNotificationProducer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Notify</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityNotificationConsumer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Unsubscribe</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntitySubscriptionManager</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-AuditLogQuery</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityAuditQuery</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscoveryAsyncReq</con:name>
		<con:value>http://localhost:8080/CONNECTGateway/EntityService/EntityPatientDiscoveryDeferredRequestUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscoveryAsyncResp</con:name>
		<con:value>http://localhost:8080/CONNECTGateway/EntityService/EntityPatientDiscoveryDeferredResponseUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>DBHost</con:name>
		<con:value>localhost</con:value>
	</con:property>
	<con:property>
		<con:name>DBPort</con:name>
		<con:value>3306</con:value>
	</con:property>
	<con:property>
		<con:name>DBUser</con:name>
		<con:value>nhincuser</con:value>
	</con:property>
	<con:property>
		<con:name>DBPass</con:name>
		<con:value>nhincpass</con:value>
	</con:property>
	<con:property>
		<con:name>PatientCorrelationDB</con:name>
		<con:value>patientcorrelationdb</con:value>
	</con:property>
	<con:property>
		<con:name>PatientCorrelationTable</con:name>
		<con:value>correlatedidentifiers</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionDB</con:name>
		<con:value>subscriptionrepository</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionTable</con:name>
		<con:value>subscription</con:value>
	</con:property>
	<con:property>
		<con:name>AAMappingDB</con:name>
		<con:value>assigningauthoritydb</con:value>
	</con:property>
	<con:property>
		<con:name>AAMappingTable</con:name>
		<con:value>aa_to_home_community_mapping</con:value>
	</con:property>
	<con:property>
		<con:name>AsyncMsgDB</con:name>
		<con:value>asyncmsgs</con:value>
	</con:property>
	<con:property>
		<con:name>AsyncMsgTable</con:name>
		<con:value>asyncmsgrepo</con:value>
	</con:property>
	<con:property>
		<con:name>PseudonymAA</con:name>
		<con:value>ABC</con:value>
	</con:property>
	<con:property>
		<con:name>PseudonymPatientID</con:name>
		<con:value>PSEUDO001</con:value>
	</con:property>
	<con:property>
		<con:name>RealAA</con:name>
		<con:value>1.1.1</con:value>
	</con:property>
	<con:property>
		<con:name>RealPatientID</con:name>
		<con:value>D1234010050</con:value>
	</con:property>
	<con:property>
		<con:name>DQDocID</con:name>
		<con:value>1.123401.11111</con:value>
	</con:property>
	<con:property>
		<con:name>DQPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>DynamicDQDocID</con:name>
		<con:value>103.8.9284320.020.3590.75^1266324032288</con:value>
	</con:property>
	<con:property>
		<con:name>DRDocID</con:name>
		<con:value>1.123407.777777</con:value>
	</con:property>
	<con:property>
		<con:name>DRRepoID</con:name>
		<con:value>1</con:value>
	</con:property>
	<con:property>
		<con:name>NotificationEndpoint</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/NotificationConsumerService/HiemNotify</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionEndpoint</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/NotificationProducerService/HiemSubscription</con:value>
	</con:property>
	<con:property>
		<con:name>SubscribePatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>NotifySubscriptionID</con:name>
		<con:value>-f7c1a5d:1204e50e42e:-79eb</con:value>
	</con:property>
	<con:property>
		<con:name>NotifySubscriptionManagerEndpointAddress</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/SubscriptionManagerService/HiemUnsubscribe</con:value>
	</con:property>
	<con:property>
		<con:name>UnSubscriptionID</con:name>
		<con:value>3e74139f-5271-4db1-98c0-88748fa3e4e3</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionManagerEndpointAddress</con:name>
		<con:value>https://localhost:8181/CONNECTNhinServicesWeb/NhinService/SubscriptionManagerService/HiemUnsubscribe</con:value>
	</con:property>
	<con:property>
		<con:name>AQUserID</con:name>
		<con:value>kskagerb</con:value>
	</con:property>
	<con:property>
		<con:name>AQPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-EntityXDRRequest</con:name>
		<con:value>http://localhost:8080/CONNECTAdapter/EntityProxyService/EntityXDRRequest</con:value>
	</con:property>
	<con:property>
		<con:name>Gender</con:name>
		<con:value>M</con:value>
	</con:property>
	<con:property>
		<con:name>BirthTime</con:name>
		<con:value>19630804</con:value>
	</con:property>
	<con:property>
		<con:name>FamilyName</con:name>
		<con:value>Younger</con:value>
	</con:property>
	<con:property>
		<con:name>GivenName</con:name>
		<con:value>Gallow</con:value>
	</con:property>
	<con:property>
		<con:name>SubjectID</con:name>
		<con:value>1111</con:value>
	</con:property>
	<con:property>
		<con:name>UniquePatientId</con:name>
		<con:value>1111^^^&amp;1.1&amp;ISO</con:value>
	</con:property>
	<con:property>
		<con:name>StreetAddress</con:name>
		<con:value>123 Johnson Rd</con:value>
	</con:property>
	<con:property>
		<con:name>City</con:name>
		<con:value>Melbourne</con:value>
	</con:property>
	<con:property>
		<con:name>State</con:name>
		<con:value>FL</con:value>
	</con:property>
	<con:property>
		<con:name>ZipCode</con:name>
		<con:value>12345</con:value>
	</con:property>
	<con:property>
		<con:name>Country</con:name>
		<con:value>US</con:value>
	</con:property>
	<con:property>
		<con:name>SSN</con:name>
		<con:value>123456789</con:value>
	</con:property>
	<con:property>
		<con:name>PurposeOfDisclosure</con:name>
		<con:value>Mental</con:value>
	</con:property>
	<con:property>
		<con:name>ExpirationDate</con:name>
		<con:value>20100520</con:value>
	</con:property>
	<con:property>
		<con:name>DOB</con:name>
		<con:value>19800516</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2013-09-26T21:46:03Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>09/26/2013 21:36:03</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2013-10-26T00:00:00Z</con:value>
	</con:property>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2013-09-26T21:36:03Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>
<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Patient Discovery" searchProperties="true" id="a2f144ec-2c70-4d77-a7ea-81f9a550fee7">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>

<con:testStep type="groovy" name="Set Up PassThru"><con:settings/><con:config><script>log.info "Setting Patient Discovery Adapter to unsecured";
def dir = context.findProperty('GatewayPropDir');
nhinc.FileUtils.backupFile(dir, "PatientDiscoveryProxyConfig.xml", log);
def alias = 'adapterpatientdiscovery'
def aliasName= 'adapterpatientdiscoverywssecured';
def replaceAlias = 'adapterpatientdiscoverywsunsecured';

nhinc.FileUtils.updateSpringConfig(dir, "PatientDiscoveryProxyConfig.xml",
	alias, aliasName, replaceAlias, log);
/**
def pdConfigFile = new File(dir + "/" + "PatientDiscoveryProxyConfig.xml");
def pdConfigFileNew = new File(dir + "/" + "PatientDiscoveryProxyConfig.xml.NEW");
pdConfigFile.eachLine() {
	line ->
	if(line.contains(alias)) {
		pdConfigFileNew << replaceAlias + ln;
	} else {
		pdConfigFileNew << line + ln;
	}
}

pdConfigFile.delete();
pdConfigFileNew.renameTo(new File(dir + "/" + "PatientDiscoveryProxyConfig.xml"));
**/
log.info "Modifying internalConnectionInfo for adapterpatientdiscovery mock."

nhinc.FileUtils.createOrUpdateConnection("internalConnectionInfo.xml", dir, "1.1",
	"adapterpatientdiscovery", "http://localhost:1720/MockPDAdapter", "2.0",
	log);
	</script></con:config></con:testStep>

<con:testStep name="Patient Discovery" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityPatientDiscoveryBindingSoap</con:interface>
		<con:operation>RespondingGateway_PRPA_IN201305UV02</con:operation>
		<con:request name="Patient Discovery">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-PatientDiscovery}</con:endpoint>
	<con:request><![CDATA[

		<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:hl7-org:v3" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:add="http://schemas.xmlsoap.org/ws/2004/08/addressing">
   <soap:Header/>
   <soap:Body testSuite="Entity_g0" testCase="Patient Discovery">
      <urn:RespondingGateway_PRPA_IN201305UV02Request>
         <urn:PRPA_IN201305UV02 ITSVersion="XML_1.0">
            <urn:id root="1.1" extension="-5a3e95b1:11d1fa33d45:-7f9b"/>
            <urn:creationTime value="20091116084800"/>
            <urn:interactionId root="2.16.840.1.113883.1.6" extension="PRPA_IN201305UV02"/>
            <urn:processingCode code="T"/>
            <urn:processingModeCode code="T"/>
            <urn:acceptAckCode code="AL"/>
            <urn:receiver typeCode="RCV">
               <urn:device classCode="DEV" determinerCode="INSTANCE">
                  <urn:id root="1.2.345.678.999"/>
                  <urn:asAgent classCode="AGNT">
                     <urn:representedOrganization classCode="ORG" determinerCode="INSTANCE">
                        <urn:id root="${#Project#RemoteHCID}"/>
                     </urn:representedOrganization>
                  </urn:asAgent>
               </urn:device>
            </urn:receiver>
            <urn:sender typeCode="SND">
               <urn:device classCode="DEV" determinerCode="INSTANCE">
                  <urn:id root="1.2.345.678.999"/>
                  <urn:asAgent classCode="AGNT">
                     <urn:representedOrganization classCode="ORG" determinerCode="INSTANCE">
                        <urn:id root="${#Project#LocalHCID}"/>
                     </urn:representedOrganization>
                  </urn:asAgent>
               </urn:device>
            </urn:sender>
            <urn:controlActProcess classCode="CACT" moodCode="EVN">
               <urn:authorOrPerformer typeCode="AUT">
                  <urn:assignedDevice>
                     <urn:id root="${#Project#LocalAA}"/>
                  </urn:assignedDevice>
               </urn:authorOrPerformer>
               <urn:queryByParameter>
                  <urn:queryId root="${#Project#LocalHCID}" extension="-abd3453dcd24wkkks545"/>
                  <urn:statusCode code="new"/>
                  <urn:responseModalityCode code="R"/>
                  <urn:responsePriorityCode code="I"/>
                  <urn:parameterList>
                     <urn:livingSubjectAdministrativeGender>
                        <urn:value code="${#Project#Gender}"/>
                        <urn:semanticsText representation="TXT">LivingSubject.administrativeGender</urn:semanticsText>
                     </urn:livingSubjectAdministrativeGender>
                     <urn:livingSubjectBirthTime>
                        <urn:value value="${#Project#BirthTime}"/>
                        <urn:semanticsText representation="TXT">LivingSubject.birthTime</urn:semanticsText>
                     </urn:livingSubjectBirthTime>
                     <urn:livingSubjectName>
                        <urn:value>
                           <urn:family partType="FAM">${#Project#FamilyName}</urn:family>
                           <urn:given partType="GIV">${#Project#GivenName}</urn:given>
                        </urn:value>
                        <urn:semanticsText representation="TXT">LivingSubject.name</urn:semanticsText>
                     </urn:livingSubjectName>
                     <urn:livingSubjectId>
                        <urn:value root="${#Project#LocalAA}" extension="${#Project#SubjectID}"/>
                        <urn:semanticsText representation="TXT"/>
                     </urn:livingSubjectId>
                  </urn:parameterList>
               </urn:queryByParameter>
            </urn:controlActProcess>
         </urn:PRPA_IN201305UV02>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>${#Project#City}</urn1:city>
               <urn1:country>${#Project#Country}</urn1:country>
               <urn1:state>${#Project#State}</urn1:state>
               <urn1:streetAddress>${#Project#StreetAddress}</urn1:streetAddress>
               <urn1:zipCode>${#Project#ZipCode}</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>${#Project#DOB}</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>NEEDED</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>true</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>true</urn1:haveSignature>
            <urn1:haveWitnessSignature>true</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>${#Project#LocalHCDescription}</urn1:description>
               <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
               <urn1:name>${#Project#LocalHCDescription}</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>${#Project#FamilyName}</urn1:familyName>
               <urn1:givenName>${#Project#GivenName}</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>FJ</urn1:secondNameOrInitials>
               <urn1:fullName>Joe Smith</urn1:fullName>
               <urn1:prefix>Mr</urn1:prefix>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>123</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>1234</urn1:extension>
               <urn1:localNumber>3456789</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>W</urn1:code>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>Melbourne</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>123 Johnson Rd</urn1:streetAddress>
               <urn1:zipCode>12345</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Hughes</urn1:familyName>
               <urn1:givenName>Howie</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>HH</urn1:secondNameOrInitials>
               <urn1:fullName>Howie Hughes</urn1:fullName>
               <urn1:prefix>Dr</urn1:prefix>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>123</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>1546</urn1:extension>
               <urn1:localNumber>4567892</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>W</urn1:code>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>${#Project#SSN}</urn1:SSN>
            <urn1:uniquePatientId>${#Project#UniquePatientId}</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>W</urn1:code>
               </urn1:addressType>
               <urn1:city>Frankfort</urn1:city>
               <urn1:country>US</urn1:country>
               <urn1:state>MN</urn1:state>
               <urn1:streetAddress>432 Jackson St</urn1:streetAddress>
               <urn1:zipCode>65498</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Ugble</urn1:familyName>
               <urn1:givenName>Gary</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>G</urn1:code>
               </urn1:nameType>
               <urn1:secondNameOrInitials>GU</urn1:secondNameOrInitials>
               <urn1:fullName>Gary Ugble</urn1:fullName>
               <urn1:prefix>Mr</urn1:prefix>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>987</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>6549</urn1:extension>
               <urn1:localNumber>2222222</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>H</urn1:code>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>Anderson</urn1:familyName>
                  <urn1:givenName>Wilma</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>G</urn1:code>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>WA</urn1:secondNameOrInitials>
                  <urn1:fullName>Wilma Anderson</urn1:fullName>
                  <urn1:prefix>Mrs</urn1:prefix>
               </urn1:personName>
               <urn1:userName>wanderson</urn1:userName>
               <urn1:org>
                  <urn1:description>${#Project#LocalHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#LocalHCDescription}</urn1:name>
               </urn1:org>
               <urn1:roleCoded>
                  <urn1:code>307969004</urn1:code>
                  <urn1:codeSystem>2.16.840.1.113883.6.96</urn1:codeSystem>
                  <urn1:codeSystemName>SNOMED_CT</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>Public Health</urn1:displayName>
                  <urn1:originalText>Public Health</urn1:originalText>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>true</urn1:authorized>
            <urn1:purposeOfDisclosureCoded>
               <urn1:code>PUBLICHEALTH</urn1:code>
               <urn1:codeSystem>2.16.840.1.113883.3.18.7.1</urn1:codeSystem>
               <urn1:codeSystemName>nhin-purpose</urn1:codeSystemName>
               <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
               <urn1:displayName>Use or disclosure of Psychotherapy Notes</urn1:displayName>
               <urn1:originalText>Use or disclosure of Psychotherapy Notes</urn1:originalText>
            </urn1:purposeOfDisclosureCoded>
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-04-16T13:15:39Z</urn1:authInstant>
               <urn1:sessionIndex>987</urn1:sessionIndex>
               <urn1:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>158.147.185.168</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>cs.myharris.net</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn1:resource>
               <urn1:action>TestSaml</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn1:id>
                     <urn1:issueInstant>2009-04-16T13:10:39.093Z</urn1:issueInstant>
                     <urn1:version>2.0</urn1:version>
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <urn1:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn1:issuer>
                     <urn1:conditions>
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <urn1:accessConsentPolicy>Claim-Ref-1234</urn1:accessConsentPolicy>
                     <urn1:instanceAccessConsentPolicy>Claim-Instance-1</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
         </urn:assertion>
         <urn:NhinTargetCommunities>
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
               <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
               <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
               <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
            </urn1:nhinTargetCommunity>
         </urn:NhinTargetCommunities>
      </urn:RespondingGateway_PRPA_IN201305UV02Request>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion disabled="true" type="Schema Compliance">
		<con:configuration>
			<definition/>
		</con:configuration>
	</con:assertion>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion name="Check for existance of [ns3:controlActProcess]" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns3='urn:hl7-org:v3';
				exists( //ns3:PRPA_IN201306UV02/ns3:controlActProcess)</path>
			<content>true</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Given Name XPath Match" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns1='urn:hl7-org:v3';
				//ns1:PRPA_IN201306UV02[1]/ns1:controlActProcess[1]/ns1:subject[1]/ns1:registrationEvent[1]/ns1:subject1[1]/ns1:patient[1]/ns1:patientPerson[1]/ns1:name[1]/ns1:given[1]</path>
			<content>${#Project#GivenName}</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Family Name XPath Match" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns1='urn:hl7-org:v3';
				//ns1:PRPA_IN201306UV02[1]/ns1:controlActProcess[1]/ns1:subject[1]/ns1:registrationEvent[1]/ns1:subject1[1]/ns1:patient[1]/ns1:patientPerson[1]/ns1:name[1]/ns1:family[1]</path>
			<content>${#Project#FamilyName}</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep type="mockresponse" name="Mock Response"><con:settings/><con:config xsi:type="con:MockResponseStep" startStep="Clear Audit Logs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>AdapterPatientDiscoveryBindingSoap</con:interface><con:operation>RespondingGateway_PRPA_IN201305UV02</con:operation><con:path>/MockPDAdapter</con:path><con:port>1720</con:port><con:response><con:settings/><con:responseContent><![CDATA[<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:hl7-org:v3">
   <soap:Header/>
   <soap:Body>
   <PRPA_IN201306UV02 xmlns="urn:hl7-org:v3" xmlns:ns2="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:ns3="http://www.w3.org/2005/08/addressing" xmlns:ns4="urn:gov:hhs:fha:nhinc:common:patientcorrelationfacade" ITSVersion="XML_1.0">
   <id root="1.1" extension="13318247:13b4e0b839b:-7ff4"/>
   <creationTime value="20121129212833"/>
   <interactionId root="2.16.840.1.113883.1.6" extension="PRPA_IN201306UV02"/>
   <processingCode code="P"/>
   <processingModeCode code="T"/>
   <acceptAckCode code="NE"/>
   <receiver typeCode="RCV">
   	<device classCode="DEV" determinerCode="INSTANCE">
   		<id root="1.2.345.678.999"/>
   		<asAgent classCode="AGNT">
   			<representedOrganization classCode="ORG" determinerCode="INSTANCE">
   				<id root="1.1"/>
   			</representedOrganization>
   		</asAgent>
   	</device>
   </receiver>
   <sender typeCode="SND">
   	<device classCode="DEV" determinerCode="INSTANCE">
   		<id root="2.2"/>
   		<asAgent classCode="AGNT">
   			<representedOrganization classCode="ORG" determinerCode="INSTANCE">
   				<id root="2.2"/>
   			</representedOrganization>
   		</asAgent>
   	</device>
   </sender>
   <acknowledgement>
   	<typeId root="2.16.840.1.113883.1.6" extension="PRPA_IN201305UV02"/>
   	<typeCode code="AA"/><targetMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
   </acknowledgement>
   <controlActProcess classCode="CACT" moodCode="EVN">
   	<code code="PRPA_TE201306UV" codeSystem="2.16.840.1.113883.1.6"/>
   	<subject typeCode="SUBJ">
   		<registrationEvent classCode="REG" moodCode="EVN">
   			<id nullFlavor="NA"/>
   			<statusCode code="active"/>
   				<subject1 typeCode="SBJ">
   					<patient classCode="PAT">
   						<id root="1.1" extension="D123401"/>
   						<statusCode code="SD"/>
   						<patientPerson classCode="PSN" determinerCode="INSTANCE">
   							<name>
   								<family partType="FAM">Younger</family>
   								<given partType="GIV">Gallow</given>
   							</name>
   							<telecom value="tel:+1-888-555-1234"/>
   							<administrativeGenderCode code="M"/>
   							<birthTime value="19630804"/>
   							<addr><city>LEESBURG</city><state>VA</state><postalCode>20176</postalCode></addr>
   							<asOtherIDs classCode="SD">
   								<id root="2.16.840.1.113883.4.1" extension="999123401"/>
   								<scopingOrganization classCode="ORG" determinerCode="INSTANCE">
   									<id root="2.16.840.1.113883.4.1"/>
   								</scopingOrganization>
   							</asOtherIDs>
   						</patientPerson>
   						<providerOrganization classCode="ORG" determinerCode="INSTANCE">
   							<id root="1.1"/>
   							<contactParty xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
   							</providerOrganization>
   							<subjectOf1>
   								<queryMatchObservation classCode="CASE" moodCode="EVN">
   									<code code="IHE_PDQ"/>
   									<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="INT" value="100"/>
   								</queryMatchObservation>
   							</subjectOf1>
   						</patient>
   					</subject1>
   					<custodian typeCode="CST">
   						<assignedEntity classCode="ASSIGNED">
   							<id root="1.1"/>
   							<code code="NotHealthDataLocator" codeSystem="1.3.6.1.4.1.19376.1.2.27.2"/>
   						</assignedEntity>
   					</custodian>
   				</registrationEvent>
   			</subject>
   			<queryAck>
   				<queryId root="1.1" extension="-abd3453dcd24wkkks545"/>
   				<queryResponseCode code="OK"/>
   			</queryAck>
   			<queryByParameter>
   				<queryId root="1.1" extension="-abd3453dcd24wkkks545"/>
   				<statusCode code="new"/>
   				<responseModalityCode code="R"/>
   				<responsePriorityCode code="I"/>
   				<parameterList>
   					<livingSubjectAdministrativeGender>
   						<value code="M"/>
   						<semanticsText representation="TXT"/>
   					</livingSubjectAdministrativeGender>
   					<livingSubjectBirthTime>
   						<value value="19630804"/>
   						<semanticsText representation="TXT"/>
   					</livingSubjectBirthTime>
   					<livingSubjectId>
   						<value root="1.1" extension="1111"/>
   						<semanticsText representation="TXT"/>
   					</livingSubjectId>
   					<livingSubjectName>
   						<value>
   							<family partType="FAM">Younger</family>
   							<given partType="GIV">Gallow</given>
                        		</value>
                        		<semanticsText representation="TXT"/>
                        	</livingSubjectName>
                     </parameterList>
                 </queryByParameter>
             </controlActProcess>
     </PRPA_IN201306UV02>
   </soap:Body>
</soap:Envelope>]]></con:responseContent><con:wsaConfig mustUnderstand="NONE" version="200508"/></con:response></con:config></con:testStep><con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep><con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2013-09-26T21:36:05Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2013-09-26T21:46:05Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>09/26/2013 21:36:05</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2013-10-26T00:00:00Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>
<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Document Query" searchProperties="true" id="9ef7d334-39f5-4693-a2ce-bc5609f8a972">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>
<con:testStep name="update config" type="groovy">
	<con:settings/>
	<con:config>
		<script>nhinc.FileUtils.updateProperty(context.findProperty('GatewayPropDir'), "gateway.properties", "documentQueryQuerySelf", "false", log);</script>
	</con:config>
</con:testStep>
<con:testStep name="Clear Correlation Table & Add Correlation" type="groovy">
	<con:settings/>
	<con:config>
		<script>context.withSql('PatientCorrelationDB') { sql ->
		def table = context.findProperty('PatientCorrelationTable')

		sql.execute('delete from ' + table)

		def localAA = context.findProperty( "LocalAA" )
		def localPatientID = context.findProperty("LocalPatientID")
		def remoteAA = context.findProperty( "RemoteAA" )
		def remotePatientID = context.findProperty("RemotePatientID")
		def insertSql = "insert into " + table + " (correlationId, PatientAssigningAuthorityId, PatientId, CorrelatedPatientAssignAuthId, CorrelatedPatientId) " +
		"values (1, ?, ?, ?, ?)"
		sql.executeUpdate(insertSql, [localAA, localPatientID, remoteAA, remotePatientID])
		}</script>
</con:config>
</con:testStep>
<con:testStep name="Clear AA Mapping Table & Add Mapping" type="groovy">
	<con:settings/>
	<con:config>
		<script>context.withSql('AAMappingDB') { sql ->
		def table = context.findProperty('AAMappingTable')

		sql.execute('delete from ' + table)

		def remoteAA = context.findProperty( "RemoteAA" )
		def remoteHCID = context.findProperty("RemoteHCID")
		def insertSql = "insert into " + table + " (id, assigningauthorityid, homecommunityid) " +
		"values (1, ?, ?)"
		sql.executeUpdate(insertSql, [remoteAA, remoteHCID])
		}</script>
</con:config>
</con:testStep>
<con:testStep name="Document Query" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityDocQueryBindingSoap</con:interface>
		<con:operation>RespondingGateway_CrossGatewayQuery</con:operation>
		<con:request name="Document Query">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-DocQuery}</con:endpoint>
	<con:request><![CDATA[

		<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:urn1="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:urn2="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:urn3="urn:gov:hhs:fha:nhinc:common:nhinccommon">
   <soap:Header/>
   <soap:Body testSuite="Entity_g0" testCase="Document Query">
      <urn:RespondingGateway_CrossGatewayQueryRequest>
         <urn1:AdhocQueryRequest federated="false" startIndex="0" maxResults="-1">
            <urn1:ResponseOption returnType="LeafClass" returnComposedObjects="false"/>
            <urn2:AdhocQuery home="urn:oid:1.1" id="urn:uuid:14d4debf-8f97-4251-9a74-a90016b0af0d">
               <urn2:Slot name="$XDSDocumentEntryPatientId">
                  <urn2:ValueList>
                     <urn2:Value>'${#Project#DQPatientID}^^^&${#Project#LocalAA}&ISO'</urn2:Value>
                  </urn2:ValueList>
               </urn2:Slot>
               <urn2:Slot name="$XDSDocumentEntryStatus">
                  <urn2:ValueList>
                     <urn2:Value>('urn:oasis:names:tc:ebxml-regrep:StatusType:Approved')</urn2:Value>
                  </urn2:ValueList>
               </urn2:Slot>
         <urn2:Slot name="$XDSDocumentEntryClassCode">
            <urn2:ValueList>
                    <urn2:Value>34133-9</urn2:Value>
                  </urn2:ValueList>
               </urn2:Slot>
               <urn2:Slot name="$XDSDocumentEntryClassCodeScheme">
                  <urn2:ValueList>
                     <urn2:Value>2.16.840.1.113883.6.1</urn2:Value>
                  </urn2:ValueList>
               </urn2:Slot>
            </urn2:AdhocQuery>
         </urn1:AdhocQueryRequest>
         <urn:assertion>
            <urn3:address xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:addressType>
                  <urn3:code>AddrCode</urn3:code>
                  <urn3:codeSystem>AddrCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>AddrCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>AddrCode</urn3:displayName>
                  <urn3:originalText>AddrCode</urn3:originalText>
               </urn3:addressType>
               <urn3:city>AddrCity</urn3:city>
               <urn3:country>AddrCountry</urn3:country>
               <urn3:state>AddrState</urn3:state>
               <urn3:streetAddress>AddrStreet</urn3:streetAddress>
               <urn3:zipCode>AddrZip</urn3:zipCode>
            </urn3:address>
            <urn3:dateOfBirth xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">06/04/1959 05:21:00</urn3:dateOfBirth>
            <urn3:explanationNonClaimantSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">Electronic</urn3:explanationNonClaimantSignature>
            <urn3:haveSecondWitnessSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">false</urn3:haveSecondWitnessSignature>
            <urn3:haveSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">false</urn3:haveSignature>
            <urn3:haveWitnessSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">false</urn3:haveWitnessSignature>
            <urn3:homeCommunity xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:description>${#Project#LocalHCDescription}</urn3:description>
               <urn3:homeCommunityId>${#Project#LocalHCID}</urn3:homeCommunityId>
               <urn3:name>${#Project#LocalHCDescription}</urn3:name>
            </urn3:homeCommunity>
            <urn3:personName xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:familyName>Smith</urn3:familyName>
               <urn3:givenName>Sandy</urn3:givenName>
               <urn3:nameType>
                  <urn3:code>nameCode</urn3:code>
                  <urn3:codeSystem>nameCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>nameCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>nameCode</urn3:displayName>
                  <urn3:originalText>nameCode</urn3:originalText>
               </urn3:nameType>
               <urn3:secondNameOrInitials>S</urn3:secondNameOrInitials>
               <urn3:fullName>Sandy S. Smith</urn3:fullName>
            </urn3:personName>
            <urn3:phoneNumber xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:areaCode>321</urn3:areaCode>
               <urn3:countryCode>1</urn3:countryCode>
               <urn3:extension>5436</urn3:extension>
               <urn3:localNumber>253-6849</urn3:localNumber>
               <urn3:phoneNumberType>
                  <urn3:code>phoneCode</urn3:code>
                  <urn3:codeSystem>phoneCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>phoneCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>phoneCode</urn3:displayName>
                  <urn3:originalText>phoneCode</urn3:originalText>
               </urn3:phoneNumberType>
            </urn3:phoneNumber>
            <urn3:secondWitnessAddress xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:addressType>
                  <urn3:code>AddrCode</urn3:code>
                  <urn3:codeSystem>AddrCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>AddrCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>AddrCode</urn3:displayName>
                  <urn3:originalText>AddrCode</urn3:originalText>
               </urn3:addressType>
               <urn3:city>Addr2City</urn3:city>
               <urn3:country>Addr2Country</urn3:country>
               <urn3:state>Addr2State</urn3:state>
               <urn3:streetAddress>Addr2Street</urn3:streetAddress>
               <urn3:zipCode>Addr2Zip</urn3:zipCode>
            </urn3:secondWitnessAddress>
            <urn3:secondWitnessName xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:familyName>Smith</urn3:familyName>
               <urn3:givenName>Sammy</urn3:givenName>
               <urn3:nameType>
                  <urn3:code>nameCode</urn3:code>
                  <urn3:codeSystem>nameCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>nameCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>nameCode</urn3:displayName>
                  <urn3:originalText>nameCode</urn3:originalText>
               </urn3:nameType>
               <urn3:secondNameOrInitials>s</urn3:secondNameOrInitials>
               <urn3:fullName>Sammy S. Smith</urn3:fullName>
            </urn3:secondWitnessName>
            <urn3:secondWitnessPhone xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:areaCode>321</urn3:areaCode>
               <urn3:countryCode>1</urn3:countryCode>
               <urn3:extension>5424</urn3:extension>
               <urn3:localNumber>542-6823</urn3:localNumber>
               <urn3:phoneNumberType>
                  <urn3:code>phoneCode</urn3:code>
                  <urn3:codeSystem>phoneCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>phoneCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>phoneCode</urn3:displayName>
                  <urn3:originalText>phoneCode</urn3:originalText>
               </urn3:phoneNumberType>
            </urn3:secondWitnessPhone>
            <urn3:SSN xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">253-98-7546</urn3:SSN>
            <urn3:uniquePatientId xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">500000000^^^&1.1&ISO</urn3:uniquePatientId>
            <urn3:witnessAddress xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:addressType>
                  <urn3:code>addrCode</urn3:code>
                  <urn3:codeSystem>addrCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>addrCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>addrCode</urn3:displayName>
                  <urn3:originalText>addrCode</urn3:originalText>
               </urn3:addressType>
               <urn3:city>Burnell</urn3:city>
               <urn3:country>USA</urn3:country>
               <urn3:state>FL</urn3:state>
               <urn3:streetAddress>825 North</urn3:streetAddress>
               <urn3:zipCode>32184</urn3:zipCode>
            </urn3:witnessAddress>
            <urn3:witnessName xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:familyName>Smith</urn3:familyName>
               <urn3:givenName>Scott</urn3:givenName>
               <urn3:nameType>
                  <urn3:code>nameCode</urn3:code>
                  <urn3:codeSystem>nameCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>nameCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>nameCode</urn3:displayName>
                  <urn3:originalText>nameCode</urn3:originalText>
               </urn3:nameType>
               <urn3:secondNameOrInitials>S.</urn3:secondNameOrInitials>
               <urn3:fullName>Scott S. Smith</urn3:fullName>
            </urn3:witnessName>
            <urn3:witnessPhone xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:areaCode>321</urn3:areaCode>
               <urn3:countryCode>1</urn3:countryCode>
               <urn3:extension>8432</urn3:extension>
               <urn3:localNumber>985-2239</urn3:localNumber>
               <urn3:phoneNumberType>
                  <urn3:code>phoneCode</urn3:code>
                  <urn3:codeSystem>phoneCodeSyst</urn3:codeSystem>
                  <urn3:codeSystemName>phoneCodeSystName</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>phoneCode</urn3:displayName>
                  <urn3:originalText>phoneCode</urn3:originalText>
               </urn3:phoneNumberType>
            </urn3:witnessPhone>
            <urn3:userInfo xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:personName>
                  <urn3:familyName>Skagerberg</urn3:familyName>
                  <urn3:givenName>Karl</urn3:givenName>
                  <urn3:nameType>
                     <urn3:code>nameCode</urn3:code>
                     <urn3:codeSystem>nameCodeSyst</urn3:codeSystem>
                     <urn3:codeSystemName>nameCodeSystName</urn3:codeSystemName>
                     <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                     <urn3:displayName>nameCode</urn3:displayName>
                     <urn3:originalText>nameCode</urn3:originalText>
                  </urn3:nameType>
                  <urn3:secondNameOrInitials>S</urn3:secondNameOrInitials>
                  <urn3:fullName>Kasrl S. Skagerberg</urn3:fullName>
               </urn3:personName>
               <urn3:userName>kskagerberg</urn3:userName>
               <urn3:org>
                  <urn3:description>${#Project#LocalHCDescription}</urn3:description>
                  <urn3:homeCommunityId>${#Project#LocalHCID}</urn3:homeCommunityId>
                  <urn3:name>${#Project#LocalHCDescription}</urn3:name>
               </urn3:org>
               <urn3:roleCoded>
                  <urn3:code>307969004</urn3:code>
                  <urn3:codeSystem>2.16.840.1.113883.6.96</urn3:codeSystem>
                  <urn3:codeSystemName>SNOMED_CT</urn3:codeSystemName>
                  <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
                  <urn3:displayName>Public Health</urn3:displayName>
                  <urn3:originalText>Public Health</urn3:originalText>
               </urn3:roleCoded>
            </urn3:userInfo>
            <urn3:authorized xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">true</urn3:authorized>
            <urn3:purposeOfDisclosureCoded xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:code>PUBLICHEALTH</urn3:code>
               <urn3:codeSystem>2.16.840.1.113883.3.18.7.1</urn3:codeSystem>
               <urn3:codeSystemName>nhin-purpose</urn3:codeSystemName>
               <urn3:codeSystemVersion>1.0</urn3:codeSystemVersion>
               <urn3:displayName>Use or disclosure of Psychotherapy Notes</urn3:displayName>
               <urn3:originalText>Use or disclosure of Psychotherapy Notes</urn3:originalText>
            </urn3:purposeOfDisclosureCoded>
            <urn3:samlAuthnStatement xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:authInstant>2009-04-16T13:15:39Z</urn3:authInstant>
               <urn3:sessionIndex>987</urn3:sessionIndex>
               <urn3:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn3:authContextClassRef>
               <urn3:subjectLocalityAddress>158.147.185.168</urn3:subjectLocalityAddress>
               <urn3:subjectLocalityDNSName>cs.myharris.net</urn3:subjectLocalityDNSName>
            </urn3:samlAuthnStatement>
         <urn3:samlAuthzDecisionStatement xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn3:decision>Permit</urn3:decision>
               <urn3:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn3:resource>
               <urn3:action>TestSaml</urn3:action>
               <urn3:evidence>
                  <urn3:assertion>
                     <urn3:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn3:id>
                     <urn3:issueInstant>2009-04-16T13:10:39.093Z</urn3:issueInstant>
                     <urn3:version>2.0</urn3:version>
                     <urn3:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn3:issuerFormat>
                     <urn3:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn3:issuer>
                     <urn3:conditions>
                        <urn3:notBefore>2009-04-16T13:10:39.093Z</urn3:notBefore>
                        <urn3:notOnOrAfter>2009-12-31T12:00:00.000Z</urn3:notOnOrAfter>
                     </urn3:conditions>
                     <urn3:accessConsentPolicy>urn:oid:1.2.3.4</urn3:accessConsentPolicy>
                     <urn3:instanceAccessConsentPolicy>urn:oid:1.2.3.4.123456789</urn3:instanceAccessConsentPolicy>
                  </urn3:assertion>
               </urn3:evidence>
            </urn3:samlAuthzDecisionStatement>
         </urn:assertion>
         <urn:NhinTargetCommunities>
            <urn3:nhinTargetCommunity>
               <urn3:homeCommunity>
                  <urn3:description>${#Project#RemoteHCDescription}</urn3:description>
                  <urn3:homeCommunityId>${#Project#RemoteHCID}</urn3:homeCommunityId>
                  <urn3:name>${#Project#RemoteHCDescription}</urn3:name>
               </urn3:homeCommunity>
            </urn3:nhinTargetCommunity>
         </urn:NhinTargetCommunities>
      </urn:RespondingGateway_CrossGatewayQueryRequest>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion type="Schema Compliance">
		<con:configuration/>
	</con:assertion>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion name="DocID Match" type="GroovyScriptAssertion">
		<con:configuration>
			<scriptText>def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
				def holder = groovyUtils.getXmlHolder( messageExchange.responseContent );
				holder.namespaces["ns1"] = "urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0";
				holder.namespaces["ns3"] = "urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0";

				def documentID = context.findProperty('DQDocID')
				def msgDocID = holder["//ns1:AdhocQueryResponse[1]/ns3:RegistryObjectList[1]/ns3:ExtrinsicObject[1]/ns3:ExternalIdentifier[@identificationScheme='urn:uuid:2e82c1f6-a085-4c72-9da3-8640a32e42ab']/@value"];
				assert (documentID == msgDocID)</scriptText>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>

<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2013-09-26T21:36:07Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2013-09-26T21:46:07Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>09/26/2013 21:36:07</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2013-10-26T00:00:00Z</con:value>
	</con:property>
	<con:property>
		<con:name>FullPatientID</con:name>
		<con:value>'D123401^^^&amp;1.1&amp;ISO'</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>
<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Document Retrieve" searchProperties="true" id="057be88f-5e6a-47ef-96d8-6ffdef5db6a6">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>
<con:testStep name="Document Retrieve" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>EntityDocRetrieveBindingSoap</con:interface>
		<con:operation>RespondingGateway_CrossGatewayRetrieve</con:operation>
		<con:request incomingWss="" name="Document Retrieve" outgoingWss="" wssPasswordType="">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@expand-mtom-attachments">true</con:setting>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-DocRetrieve}</con:endpoint>
	<con:request><![CDATA[

			<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:urn1="urn:ihe:iti:xds-b:2007" xmlns:urn2="urn:gov:hhs:fha:nhinc:common:nhinccommon">
   <soap:Header/>
   <soap:Body testSuite="Entity_g0" testCase="Document Retrieve">
      <urn:RespondingGateway_CrossGatewayRetrieveRequest>
         <urn1:RetrieveDocumentSetRequest>
            <urn1:DocumentRequest>
               <urn1:HomeCommunityId>urn:oid:${#Project#RemoteHCID}</urn1:HomeCommunityId>
               <urn1:RepositoryUniqueId>${#Project#DRRepoID}</urn1:RepositoryUniqueId>
               <urn1:DocumentUniqueId>${#Project#DRDocID}</urn1:DocumentUniqueId>
            </urn1:DocumentRequest>
         </urn1:RetrieveDocumentSetRequest>
         <urn:assertion>
            <urn2:address xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:addressType>
                  <urn2:code>AddrCode</urn2:code>
                  <urn2:codeSystem>AddrCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>AddrCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>AddrCode</urn2:displayName>
                  <urn2:originalText>AddrCode</urn2:originalText>
               </urn2:addressType>
               <urn2:city>AddrCity</urn2:city>
               <urn2:country>AddrCountry</urn2:country>
               <urn2:state>AddrState</urn2:state>
               <urn2:streetAddress>AddrStreet</urn2:streetAddress>
               <urn2:zipCode>AddrZip</urn2:zipCode>
            </urn2:address>
            <urn2:dateOfBirth xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">06/04/1959 05:21:00</urn2:dateOfBirth>
            <urn2:explanationNonClaimantSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">Electronic</urn2:explanationNonClaimantSignature>
            <urn2:haveSecondWitnessSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">false</urn2:haveSecondWitnessSignature>
            <urn2:haveSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">false</urn2:haveSignature>
            <urn2:haveWitnessSignature xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">false</urn2:haveWitnessSignature>
            <urn2:homeCommunity xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:description>${#Project#LocalHCDescription}</urn2:description>
               <urn2:homeCommunityId>${#Project#LocalHCID}</urn2:homeCommunityId>
               <urn2:name>${#Project#LocalHCDescription}</urn2:name>
            </urn2:homeCommunity>
            <urn2:personName xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:familyName>Smith</urn2:familyName>
               <urn2:givenName>Sandy</urn2:givenName>
               <urn2:nameType>
                  <urn2:code>nameCode</urn2:code>
                  <urn2:codeSystem>nameCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>nameCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>nameCode</urn2:displayName>
                  <urn2:originalText>nameCode</urn2:originalText>
               </urn2:nameType>
               <urn2:secondNameOrInitials>S</urn2:secondNameOrInitials>
               <urn2:fullName>Sandy S. Smith</urn2:fullName>
            </urn2:personName>
            <urn2:phoneNumber xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:areaCode>321</urn2:areaCode>
               <urn2:countryCode>1</urn2:countryCode>
               <urn2:extension>5436</urn2:extension>
               <urn2:localNumber>253-6849</urn2:localNumber>
               <urn2:phoneNumberType>
                  <urn2:code>phoneCode</urn2:code>
                  <urn2:codeSystem>phoneCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>phoneCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>phoneCode</urn2:displayName>
                  <urn2:originalText>phoneCode</urn2:originalText>
               </urn2:phoneNumberType>
            </urn2:phoneNumber>
            <urn2:secondWitnessAddress xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:addressType>
                  <urn2:code>AddrCode</urn2:code>
                  <urn2:codeSystem>AddrCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>AddrCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>AddrCode</urn2:displayName>
                  <urn2:originalText>AddrCode</urn2:originalText>
               </urn2:addressType>
               <urn2:city>Addr2City</urn2:city>
               <urn2:country>Addr2Country</urn2:country>
               <urn2:state>Addr2State</urn2:state>
               <urn2:streetAddress>Addr2Street</urn2:streetAddress>
               <urn2:zipCode>Addr2Zip</urn2:zipCode>
            </urn2:secondWitnessAddress>
            <urn2:secondWitnessName xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:familyName>Smith</urn2:familyName>
               <urn2:givenName>Sammy</urn2:givenName>
               <urn2:nameType>
                  <urn2:code>nameCode</urn2:code>
                  <urn2:codeSystem>nameCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>nameCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>nameCode</urn2:displayName>
                  <urn2:originalText>nameCode</urn2:originalText>
               </urn2:nameType>
               <urn2:secondNameOrInitials>s</urn2:secondNameOrInitials>
               <urn2:fullName>Sammy S. Smith</urn2:fullName>
            </urn2:secondWitnessName>
            <urn2:secondWitnessPhone xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:areaCode>321</urn2:areaCode>
               <urn2:countryCode>1</urn2:countryCode>
               <urn2:extension>5424</urn2:extension>
               <urn2:localNumber>542-6823</urn2:localNumber>
               <urn2:phoneNumberType>
                  <urn2:code>phoneCode</urn2:code>
                  <urn2:codeSystem>phoneCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>phoneCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>phoneCode</urn2:displayName>
                  <urn2:originalText>phoneCode</urn2:originalText>
               </urn2:phoneNumberType>
            </urn2:secondWitnessPhone>
            <urn2:SSN xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">253-98-7546</urn2:SSN>
            <urn2:uniquePatientId xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">500000000^^^&1.1&ISO</urn2:uniquePatientId>
            <urn2:witnessAddress xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:addressType>
                  <urn2:code>addrCode</urn2:code>
                  <urn2:codeSystem>addrCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>addrCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>addrCode</urn2:displayName>
                  <urn2:originalText>addrCode</urn2:originalText>
               </urn2:addressType>
               <urn2:city>Burnell</urn2:city>
               <urn2:country>USA</urn2:country>
               <urn2:state>FL</urn2:state>
               <urn2:streetAddress>825 North</urn2:streetAddress>
               <urn2:zipCode>32184</urn2:zipCode>
            </urn2:witnessAddress>
            <urn2:witnessName xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:familyName>Smith</urn2:familyName>
               <urn2:givenName>Scott</urn2:givenName>
               <urn2:nameType>
                  <urn2:code>nameCode</urn2:code>
                  <urn2:codeSystem>nameCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>nameCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>nameCode</urn2:displayName>
                  <urn2:originalText>nameCode</urn2:originalText>
               </urn2:nameType>
               <urn2:secondNameOrInitials>S.</urn2:secondNameOrInitials>
               <urn2:fullName>Scott S. Smith</urn2:fullName>
            </urn2:witnessName>
            <urn2:witnessPhone xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:areaCode>321</urn2:areaCode>
               <urn2:countryCode>1</urn2:countryCode>
               <urn2:extension>8432</urn2:extension>
               <urn2:localNumber>985-2239</urn2:localNumber>
               <urn2:phoneNumberType>
                  <urn2:code>phoneCode</urn2:code>
                  <urn2:codeSystem>phoneCodeSyst</urn2:codeSystem>
                  <urn2:codeSystemName>phoneCodeSystName</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>phoneCode</urn2:displayName>
                  <urn2:originalText>phoneCode</urn2:originalText>
               </urn2:phoneNumberType>
            </urn2:witnessPhone>
            <urn2:userInfo xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:personName>
                  <urn2:familyName>Skagerberg</urn2:familyName>
                  <urn2:givenName>Karl</urn2:givenName>
                  <urn2:nameType>
                     <urn2:code>nameCode</urn2:code>
                     <urn2:codeSystem>nameCodeSyst</urn2:codeSystem>
                     <urn2:codeSystemName>nameCodeSystName</urn2:codeSystemName>
                     <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                     <urn2:displayName>nameCode</urn2:displayName>
                     <urn2:originalText>nameCode</urn2:originalText>
                  </urn2:nameType>
                  <urn2:secondNameOrInitials>S</urn2:secondNameOrInitials>
                  <urn2:fullName>Kasrl S. Skagerberg</urn2:fullName>
               </urn2:personName>
               <urn2:userName>kskagerb</urn2:userName>
               <urn2:org>
                  <urn2:description>${#Project#LocalHCDescription}</urn2:description>
                  <urn2:homeCommunityId>${#Project#LocalHCID}</urn2:homeCommunityId>
                  <urn2:name>${#Project#LocalHCDescription}</urn2:name>
               </urn2:org>
               <urn2:roleCoded>
                  <urn2:code>307969004</urn2:code>
                  <urn2:codeSystem>2.16.840.1.113883.6.96</urn2:codeSystem>
                  <urn2:codeSystemName>SNOMED_CT</urn2:codeSystemName>
                  <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
                  <urn2:displayName>Public Health</urn2:displayName>
                  <urn2:originalText>Public Health</urn2:originalText>
               </urn2:roleCoded>
            </urn2:userInfo>
            <urn2:authorized xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">true</urn2:authorized>
            <urn2:purposeOfDisclosureCoded xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:code>PUBLICHEALTH</urn2:code>
               <urn2:codeSystem>2.16.840.1.113883.3.18.7.1</urn2:codeSystem>
               <urn2:codeSystemName>nhin-purpose</urn2:codeSystemName>
               <urn2:codeSystemVersion>1.0</urn2:codeSystemVersion>
               <urn2:displayName>Use or disclosure of Psychotherapy Notes</urn2:displayName>
               <urn2:originalText>Use or disclosure of Psychotherapy Notes</urn2:originalText>
            </urn2:purposeOfDisclosureCoded>
            <urn2:samlAuthnStatement xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:authInstant>2009-04-16T13:15:39Z</urn2:authInstant>
               <urn2:sessionIndex>987</urn2:sessionIndex>
               <urn2:authContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</urn2:authContextClassRef>
               <urn2:subjectLocalityAddress>158.147.185.168</urn2:subjectLocalityAddress>
               <urn2:subjectLocalityDNSName>cs.myharris.net</urn2:subjectLocalityDNSName>
            </urn2:samlAuthnStatement>
            <urn2:samlAuthzDecisionStatement xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">
               <urn2:decision>Permit</urn2:decision>
               <urn2:resource>https://158.147.185.168:8181/SamlReceiveService/SamlProcessWS</urn2:resource>
               <urn2:action>TestSaml</urn2:action>
               <urn2:evidence>
                  <urn2:assertion>
                     <urn2:id>40df7c0a-ff3e-4b26-baeb-f2910f6d05a9</urn2:id>
                     <urn2:issueInstant>2009-04-16T13:10:39.093Z</urn2:issueInstant>
                     <urn2:version>2.0</urn2:version>
                     <urn2:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn2:issuerFormat>
                     <urn2:issuer>CN=SAML User,OU=Harris,O=HITS,L=Melbourne,ST=FL,C=US</urn2:issuer>
                     <urn2:conditions>
                        <urn2:notBefore>2009-04-16T13:10:39.093Z</urn2:notBefore>
                        <urn2:notOnOrAfter>2009-12-31T12:00:00.000Z</urn2:notOnOrAfter>
                     </urn2:conditions>
                     <urn2:accessConsentPolicy>urn:oid:1.2.3.4</urn2:accessConsentPolicy>
                     <urn2:instanceAccessConsentPolicy>urn:oid:1.2.3.4.123456789</urn2:instanceAccessConsentPolicy>
                  </urn2:assertion>
               </urn2:evidence>
            </urn2:samlAuthzDecisionStatement>
         </urn:assertion>
         <urn:NhinTargetCommunities>
            <urn2:nhinTargetCommunity>
               <urn2:homeCommunity>
                  <urn2:description>${#Project#RemoteHCDescription}</urn2:description>
                  <urn2:homeCommunityId>${#Project#RemoteHCID}</urn2:homeCommunityId>
                  <urn2:name>${#Project#RemoteHCDescription}</urn2:name>
               </urn2:homeCommunity>
            </urn2:nhinTargetCommunity>
         </urn:NhinTargetCommunities>
      </urn:RespondingGateway_CrossGatewayRetrieveRequest>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:assertion type="SOAP Response"/>
	<con:assertion type="SOAP Fault Assertion"/>
	<con:assertion type="Schema Compliance" disabled="true">
		<con:configuration>
			<definition/>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Doc Repository ID" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns5='urn:ihe:iti:xds-b:2007';
					//ns5:RetrieveDocumentSetResponse[1]/ns5:DocumentResponse[1]/ns5:RepositoryUniqueId[1]</path>
			<content>${#Project#DRRepoID}</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Doc ID" type="XPath Match">
		<con:configuration>
			<path>declare namespace ns5='urn:ihe:iti:xds-b:2007';
					//ns5:RetrieveDocumentSetResponse[1]/ns5:DocumentResponse[1]/ns5:DocumentUniqueId[1]</path>
			<content>${#Project#DRDocID}</content>
			<allowWildcards>false</allowWildcards>
			<ignoreNamspaceDifferences>false</ignoreNamspaceDifferences>
		</con:configuration>
	</con:assertion>
	<con:assertion name="Document Data" type="GroovyScriptAssertion">
		<con:configuration>
			<scriptText>def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
					def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
					holder.namespaces["ns"]="urn:ihe:iti:xds-b:2007"
					def docData = holder["//ns:RetrieveDocumentSetResponse[1]/ns:DocumentResponse[1]/ns:Document[1]"]
					log.info docData.toString()
					assert (docData.size() != 0)</scriptText>
		</con:configuration>
	</con:assertion>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig action="urn:gov:hhs:fha:nhinc:entitydocretrieve/EntityDocRetrievePortType/RespondingGateway_CrossGatewayRetrieveRequest" mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config>
		<script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 4 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 3 and messageType="Nhin Outbound" and communityId="1.1"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 4 and messageType="Nhin Inbound" and communityId="2.2"')[0]
}</script>
</con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>CorrectedRemoteHCID</con:name>
		<con:value>urn:oid:2.2</con:value>
	</con:property>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2013-09-26T21:36:09Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2013-09-26T21:46:09Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>09/26/2013 21:36:09</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2013-10-26T00:00:00Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>

<con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Admin Distribution" searchProperties="true" id="30b2d3bb-0976-4d6a-b7f1-3d6b31875764">
	<con:settings/>
	<con:testStep type="groovy" name="Clear Audit Logs">
		<con:settings/>
		<con:config>
			<script>context.withSql(context.findProperty('AuditRepoDB')) { sql ->
	sql.execute('delete from ' + context.findProperty('AuditRepoTable'))
	sql.execute('alter table ' + context.findProperty('AuditRepoTable') + ' AUTO_INCREMENT=1')
}</script>
	</con:config>
</con:testStep>
<con:testStep name="Admin Distribution" type="request">
	<con:settings/>
	<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<con:interface>AdministrativeDistribution_Binding_Soap12_g0</con:interface>
		<con:operation>SendAlertMessage</con:operation>
		<con:request name="Admin Distribution">
			<con:settings>
				<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
	</con:settings>
	<con:encoding>UTF-8</con:encoding>
	<con:endpoint>${#TestSuite#Endpoint-EntityAdminDist}</con:endpoint>
	<con:request><![CDATA[

			<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:urn2="urn:oasis:names:tc:emergency:EDXL:DE:1.0">
   <soap:Header/>
   <soap:Body testSuite="Entity_g0" testCase="Admin Distribution">
      <urn:RespondingGateway_SendAlertMessage>
         <urn:assertion>
            <urn1:address>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>AddrCity</urn1:city>
               <urn1:country>AddrCountry</urn1:country>
               <urn1:state>AddrState</urn1:state>
               <urn1:streetAddress>AddrStreet</urn1:streetAddress>
               <urn1:zipCode>AddrZip</urn1:zipCode>
            </urn1:address>
            <urn1:dateOfBirth>06/04/1959 05:21:00</urn1:dateOfBirth>
            <urn1:explanationNonClaimantSignature>Electronic</urn1:explanationNonClaimantSignature>
            <urn1:haveSecondWitnessSignature>false</urn1:haveSecondWitnessSignature>
            <urn1:haveSignature>false</urn1:haveSignature>
            <urn1:haveWitnessSignature>false</urn1:haveWitnessSignature>
            <urn1:homeCommunity>
               <urn1:description>${#Project#LocalHCDescription}</urn1:description>
               <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
               <urn1:name>${#Project#LocalHCDescription}</urn1:name>
            </urn1:homeCommunity>
            <urn1:personName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sandy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
               <urn1:fullName>Sandy S. Smith</urn1:fullName>
            </urn1:personName>
            <urn1:phoneNumber>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5436</urn1:extension>
               <urn1:localNumber>253-6849</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:phoneNumber>
            <urn1:secondWitnessAddress>
               <urn1:addressType>
                  <urn1:code>AddrCode</urn1:code>
                  <urn1:codeSystem>AddrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>AddrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>AddrCode</urn1:displayName>
                  <urn1:originalText>AddrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>Addr2City</urn1:city>
               <urn1:country>Addr2Country</urn1:country>
               <urn1:state>Addr2State</urn1:state>
               <urn1:streetAddress>Addr2Street</urn1:streetAddress>
               <urn1:zipCode>Addr2Zip</urn1:zipCode>
            </urn1:secondWitnessAddress>
            <urn1:secondWitnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Sammy</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>s</urn1:secondNameOrInitials>
               <urn1:fullName>Sammy S. Smith</urn1:fullName>
            </urn1:secondWitnessName>
            <urn1:secondWitnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>5424</urn1:extension>
               <urn1:localNumber>542-6823</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:secondWitnessPhone>
            <urn1:SSN>253987546</urn1:SSN>
            <!--1 or more repetitions:-->
            <urn1:uniquePatientId>500000000^^^&1.1&ISO</urn1:uniquePatientId>
            <urn1:witnessAddress>
               <urn1:addressType>
                  <urn1:code>addrCode</urn1:code>
                  <urn1:codeSystem>addrCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>addrCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>addrCode</urn1:displayName>
                  <urn1:originalText>addrCode</urn1:originalText>
               </urn1:addressType>
               <urn1:city>Burnell</urn1:city>
               <urn1:country>USA</urn1:country>
               <urn1:state>FL</urn1:state>
               <urn1:streetAddress>825 North</urn1:streetAddress>
               <urn1:zipCode>32184</urn1:zipCode>
            </urn1:witnessAddress>
            <urn1:witnessName>
               <urn1:familyName>Smith</urn1:familyName>
               <urn1:givenName>Scott</urn1:givenName>
               <urn1:nameType>
                  <urn1:code>nameCode</urn1:code>
                  <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>nameCode</urn1:displayName>
                  <urn1:originalText>nameCode</urn1:originalText>
               </urn1:nameType>
               <urn1:secondNameOrInitials>S.</urn1:secondNameOrInitials>
               <urn1:fullName>Scott S. Smith</urn1:fullName>
            </urn1:witnessName>
            <urn1:witnessPhone>
               <urn1:areaCode>321</urn1:areaCode>
               <urn1:countryCode>1</urn1:countryCode>
               <urn1:extension>8432</urn1:extension>
               <urn1:localNumber>985-2239</urn1:localNumber>
               <urn1:phoneNumberType>
                  <urn1:code>phoneCode</urn1:code>
                  <urn1:codeSystem>phoneCodeSyst</urn1:codeSystem>
                  <urn1:codeSystemName>phoneCodeSystName</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>phoneCode</urn1:displayName>
                  <urn1:originalText>phoneCode</urn1:originalText>
               </urn1:phoneNumberType>
            </urn1:witnessPhone>
            <urn1:userInfo>
               <urn1:personName>
                  <urn1:familyName>Skagerberg</urn1:familyName>
                  <urn1:givenName>Karl</urn1:givenName>
                  <urn1:nameType>
                     <urn1:code>nameCode</urn1:code>
                     <urn1:codeSystem>nameCodeSyst</urn1:codeSystem>
                     <urn1:codeSystemName>nameCodeSystName</urn1:codeSystemName>
                     <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                     <urn1:displayName>nameCode</urn1:displayName>
                     <urn1:originalText>nameCode</urn1:originalText>
                  </urn1:nameType>
                  <urn1:secondNameOrInitials>S</urn1:secondNameOrInitials>
                  <urn1:fullName>Kasrl S. Skagerberg</urn1:fullName>
               </urn1:personName>
               <urn1:userName>${#TestCase#UserId}</urn1:userName>
               <urn1:org>
                  <urn1:description>${#Project#LocalHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#LocalHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#LocalHCDescription}</urn1:name>
               </urn1:org>
               <urn1:roleCoded>
                  <urn1:code>80584001</urn1:code>
                  <urn1:codeSystem>2.16.840.1.113883.6.96</urn1:codeSystem>
                  <urn1:codeSystemName>SNOMED_CT</urn1:codeSystemName>
                  <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
                  <urn1:displayName>Psychiatrist</urn1:displayName>
                  <urn1:originalText>Psychiatrist</urn1:originalText>
               </urn1:roleCoded>
            </urn1:userInfo>
            <urn1:authorized>true</urn1:authorized>
            <urn1:purposeOfDisclosureCoded>
               <urn1:code>PSYCHOTHERAPY</urn1:code>
               <urn1:codeSystem>2.16.840.1.113883.3.18.7.1</urn1:codeSystem>
               <urn1:codeSystemName>nhin-purpose</urn1:codeSystemName>
               <urn1:codeSystemVersion>1.0</urn1:codeSystemVersion>
               <urn1:displayName>Use or disclosure of Psychotherapy Notes</urn1:displayName>
               <urn1:originalText>Psychotherapy Notes</urn1:originalText>
            </urn1:purposeOfDisclosureCoded>
            <urn1:samlAuthnStatement>
               <urn1:authInstant>2009-09-01T13:00:00.000Z</urn1:authInstant>
               <urn1:sessionIndex>mySessionIndex</urn1:sessionIndex>
               <urn1:authContextClassRef>myContextClassRef</urn1:authContextClassRef>
               <urn1:subjectLocalityAddress>mySubjectLocalityAddress</urn1:subjectLocalityAddress>
               <urn1:subjectLocalityDNSName>mySubjectLocalityDns</urn1:subjectLocalityDNSName>
            </urn1:samlAuthnStatement>
            <urn1:samlAuthzDecisionStatement>
               <urn1:decision>Permit</urn1:decision>
               <urn1:resource>myAuthzDecisionStatementResource</urn1:resource>
               <urn1:action>myAuthzDecisionStatementAction</urn1:action>
               <urn1:evidence>
                  <urn1:assertion>
                     <urn1:id>AuthzDecisionStatementEvidenceAssertionId</urn1:id>
                     <urn1:issueInstant>2009-09-02T14:00:00.000Z</urn1:issueInstant>
                     <urn1:version>2.0</urn1:version>
                     <urn1:issuer>CN=Mr Saml User,OU=SU,O=Mr SAML Org,L=Chantilly,ST=VA,C=US</urn1:issuer>
                     <urn1:issuerFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</urn1:issuerFormat>
                     <urn1:conditions>
                        <urn1:notBefore>2009-04-16T13:10:39.093Z</urn1:notBefore>
                        <urn1:notOnOrAfter>2009-12-31T12:00:00.000Z</urn1:notOnOrAfter>
                     </urn1:conditions>
                     <urn1:accessConsentPolicy>urn:oid:1.2.3.4</urn1:accessConsentPolicy>
                     <urn1:instanceAccessConsentPolicy>urn:oid:1.2.3.4.123456789</urn1:instanceAccessConsentPolicy>
                  </urn1:assertion>
               </urn1:evidence>
            </urn1:samlAuthzDecisionStatement>
            <urn1:samlSignature>
               <!--Optional:-->
               <urn1:keyInfo>
                  <!--Optional:-->
                  <urn1:rsaKeyValueModulus>cid:921853060605</urn1:rsaKeyValueModulus>
                  <!--Optional:-->
                  <urn1:rsaKeyValueExponent>cid:507157468547</urn1:rsaKeyValueExponent>
               </urn1:keyInfo>
               <!--Optional:-->
               <urn1:signatureValue>cid:175264679488</urn1:signatureValue>
            </urn1:samlSignature>
         </urn:assertion>
         <!--Optional:-->
         <urn:nhinTargetCommunities>
            <!--1 or more repetitions:-->
            <urn1:nhinTargetCommunity>
               <urn1:homeCommunity>
                  <urn1:description>${#Project#RemoteHCDescription}</urn1:description>
                  <urn1:homeCommunityId>${#Project#RemoteHCID}</urn1:homeCommunityId>
                  <urn1:name>${#Project#RemoteHCDescription}</urn1:name>
               </urn1:homeCommunity>
               <urn1:list>?</urn1:list>
               <urn1:region>?</urn1:region>
            </urn1:nhinTargetCommunity>
         </urn:nhinTargetCommunities>
         <urn2:EDXLDistribution>
            <urn2:distributionID>633990682441061250</urn2:distributionID>
            <urn2:senderID>actor@2.16.840.1.113883.3.166</urn2:senderID>
            <urn2:dateTimeSent>2010-08-14T12:18:13.512375-08:00</urn2:dateTimeSent>
            <urn2:distributionStatus>Actual</urn2:distributionStatus>
            <urn2:distributionType>Update</urn2:distributionType>
            <urn2:combinedConfidentiality>Public</urn2:combinedConfidentiality>
            <!--Optional:-->
            <urn2:language>?</urn2:language>
            <!--Zero or more repetitions:-->
            <urn2:senderRole>
               <urn2:valueListUrn>?</urn2:valueListUrn>
               <!--1 or more repetitions:-->
               <urn2:value>?</urn2:value>
            </urn2:senderRole>
            <!--Zero or more repetitions:-->
            <urn2:recipientRole>
               <urn2:valueListUrn>?</urn2:valueListUrn>
               <!--1 or more repetitions:-->
               <urn2:value>?</urn2:value>
            </urn2:recipientRole>
            <!--Zero or more repetitions:-->
            <urn2:keyword>
               <urn2:valueListUrn>?</urn2:valueListUrn>
               <!--1 or more repetitions:-->
               <urn2:value>?</urn2:value>
            </urn2:keyword>
            <!--Zero or more repetitions:-->
            <urn2:distributionReference>?</urn2:distributionReference>
            <!--Zero or more repetitions:-->
            <urn2:explicitAddress>
               <urn2:explicitAddressScheme>modified_IHEIntendedRecipient</urn2:explicitAddressScheme>
               <!--1 or more repetitions:-->
               <urn2:explicitAddressValue>^^^^^^^^^2.16.840.1.113883.3.166|0000000001</urn2:explicitAddressValue>
            </urn2:explicitAddress>
            <!--Zero or more repetitions:-->
            <urn2:targetArea>
               <!--Zero or more repetitions:-->
               <urn2:circle>?</urn2:circle>
               <!--Zero or more repetitions:-->
               <urn2:polygon>?</urn2:polygon>
               <!--Zero or more repetitions:-->
               <urn2:country>?</urn2:country>
               <!--Zero or more repetitions:-->
               <urn2:subdivision>?</urn2:subdivision>
               <!--Zero or more repetitions:-->
               <urn2:locCodeUN>?</urn2:locCodeUN>
            </urn2:targetArea>
            <!--Zero or more repetitions:-->
            <urn2:contentObject>
               <!--Optional:-->
               <urn2:contentDescription>PH Alert Message</urn2:contentDescription>
               <!--Zero or more repetitions:-->
               <urn2:contentKeyword>
                  <urn2:valueListUrn>?</urn2:valueListUrn>
                  <!--1 or more repetitions:-->
                  <urn2:value>?</urn2:value>
               </urn2:contentKeyword>
               <!--Optional:-->
               <urn2:incidentID>TEST</urn2:incidentID>
               <!--Optional:-->
               <urn2:incidentDescription>This is a test message</urn2:incidentDescription>
               <!--Zero or more repetitions:-->
               <urn2:originatorRole>
                  <urn2:valueListUrn>?</urn2:valueListUrn>
                  <!--1 or more repetitions:-->
                  <urn2:value>?</urn2:value>
               </urn2:originatorRole>
               <!--Zero or more repetitions:-->
               <urn2:consumerRole>
                  <urn2:valueListUrn>?</urn2:valueListUrn>
                  <!--1 or more repetitions:-->
                  <urn2:value>?</urn2:value>
               </urn2:consumerRole>
               <!--Optional:-->
               <urn2:confidentiality>Public</urn2:confidentiality>
               <!--You have a CHOICE of the next 2 items at this level-->
    <urn2:nonXMLContent>
                  <urn2:mimeType>application/pdf</urn2:mimeType>
                  <!--Optional:-->
                  <urn2:size>19</urn2:size>
                  <!--Optional:-->
                  <urn2:digest>?</urn2:digest>
                  <!--Optional:-->
                  <urn2:uri>?</urn2:uri>
                  <!--Optional:-->
                  <urn2:contentData>LDLIHAPIISDALKDF902383K1182K4J49DFNF3KR0482HJ1029F393</urn2:contentData>
               </urn2:nonXMLContent>
               <!--You may enter ANY elements at this point-->
            </urn2:contentObject>
         </urn2:EDXLDistribution>
      </urn:RespondingGateway_SendAlertMessage>
   </soap:Body>
</soap:Envelope>]]></con:request>
	<con:credentials>
		<con:authType>Global HTTP Settings</con:authType>
	</con:credentials>
	<con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
	<con:jmsPropertyConfig/>
	<con:wsaConfig mustUnderstand="NONE" version="200508"/>
	<con:wsrmConfig version="1.2"/>
</con:request>
</con:config>
</con:testStep>
<con:testStep name="Delay" type="delay">
	<con:settings/>
	<con:config><delay>3000</delay></con:config>
</con:testStep>
<con:testStep type="groovy" name="Verify Audit Logs">
	<con:settings/>
	<con:config><script>context.withSql(context.findProperty('AuditRepoDB')) {sql ->
	assert 2 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable'))[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 1 and messageType="Nhin Outbound" and communityId="2.2"')[0]
	assert 1 == sql.firstRow('select count(*) from ' + context.findProperty('AuditRepoTable') + ' where id = 2 and messageType="Nhin Inbound" and communityId="1.1"')[0]
}</script></con:config>
</con:testStep>
<con:setupScript>nhinc.FileUtils.backupConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(false);
log.info ("Setting the gateway to Passthrough");</con:setupScript>
<con:tearDownScript>nhinc.FileUtils.restoreConfiguration(context.findProperty("GatewayPropDir"), log);
context.setGatewayStandard(true);
log.info ("Setting the gateway to Standard");</con:tearDownScript>
<con:properties>
	<con:property>
		<con:name>startDate</con:name>
		<con:value>2013-09-26T21:36:10Z</con:value>
	</con:property>
	<con:property>
		<con:name>endDate</con:name>
		<con:value>2013-09-26T21:46:10Z</con:value>
	</con:property>
	<con:property>
		<con:name>sigDate</con:name>
		<con:value>09/26/2013 21:36:10</con:value>
	</con:property>
	<con:property>
		<con:name>expireDate</con:name>
		<con:value>2013-10-26T00:00:00Z</con:value>
	</con:property>
</con:properties>
<con:reportParameters/>
</con:testCase>
<con:properties>
	<con:property>
		<con:name>Endpoint-DocQuery</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentQuery/2_0/EntityService/EntityDocQueryUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DocRetrieve</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentRetrieve/2_0/EntityService/EntityDocRetrieve</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DSDeferredResp</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentSubmission/1_1/EntityService/EntityDocSubmissionDeferredResponseUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-EntityAdminDist</con:name>
		<con:value>http://localhost:8080/Gateway/AdminDistribution/1_0/AdministrativeDistribution_Service</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-EntityXDRRequest</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentSubmission/1_1/EntityService/EntityDocSubmissionDeferredRequestUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Notify</con:name>
		<con:value>http://localhost:8080/Gateway/HIEM/2_0/EntityNotificationConsumer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscovery</con:name>
		<con:value>http://localhost:8080/Gateway/PatientDiscovery/1_0/EntityPatientDiscovery</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscoveryAsyncReq</con:name>
		<con:value>http://localhost:8080/Gateway/PatientDiscovery/1_0/EntityService/EntityPatientDiscoveryDeferredRequestUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscoveryAsyncResp</con:name>
		<con:value>http://localhost:8080/Gateway/PatientDiscovery/1_0/EntityService/EntityPatientDiscoveryDeferredResponseUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Subscribe</con:name>
		<con:value>http://localhost:8080/Gateway/HIEM/2_0/EntityNotificationProducer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Unsubscribe</con:name>
		<con:value>http://localhost:8080/Gateway/HIEM/2_0/EntitySubscriptionManager</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-XDREntity</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentSubmission/1_1/EntityService/EntityDocSubmissionUnsecured</con:value>
	</con:property>
</con:properties>
<con:setupScript/>
<con:tearDownScript/>
<con:reportParameters/>
</con:testSuite>
<con:properties>
	<con:property>
		<con:name>AAMappingDB</con:name>
		<con:value>assigningauthoritydb</con:value>
	</con:property>
	<con:property>
		<con:name>AAMappingTable</con:name>
		<con:value>aa_to_home_community_mapping</con:value>
	</con:property>
	<con:property>
		<con:name>AsyncMsgDB</con:name>
		<con:value>asyncmsgs</con:value>
	</con:property>
	<con:property>
		<con:name>AsyncMsgTable</con:name>
		<con:value>asyncmsgrepo</con:value>
	</con:property>
	<con:property>
		<con:name>AuditRepoDB</con:name>
		<con:value>auditrepo</con:value>
	</con:property>
	<con:property>
		<con:name>AuditRepoTable</con:name>
		<con:value>auditrepository</con:value>
	</con:property>
	<con:property>
		<con:name>BirthTime</con:name>
		<con:value>19630804</con:value>
	</con:property>
	<con:property>
		<con:name>City</con:name>
		<con:value>Melbourne</con:value>
	</con:property>
	<con:property>
		<con:name>Country</con:name>
		<con:value>US</con:value>
	</con:property>
	<con:property>
		<con:name>DBHost</con:name>
		<con:value>localhost</con:value>
	</con:property>
	<con:property>
		<con:name>DBPass</con:name>
		<con:value>nhincpass</con:value>
	</con:property>
	<con:property>
		<con:name>DBPort</con:name>
		<con:value>3306</con:value>
	</con:property>
	<con:property>
		<con:name>DBUser</con:name>
		<con:value>nhincuser</con:value>
	</con:property>
	<con:property>
		<con:name>DeferredPatientDiscoveryReqMessageID</con:name>
		<con:value>uuid:6666666666.66666.666.66</con:value>
	</con:property>
	<con:property>
		<con:name>DOB</con:name>
		<con:value>19800516</con:value>
	</con:property>
	<con:property>
		<con:name>DQDocID</con:name>
		<con:value>1.123401.11111</con:value>
	</con:property>
	<con:property>
		<con:name>DQPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>DRDocID</con:name>
		<con:value>1.123407.777777</con:value>
	</con:property>
	<con:property>
		<con:name>DRRepoID</con:name>
		<con:value>1</con:value>
	</con:property>
	<con:property>
		<con:name>DynamicDQDocID</con:name>
		<con:value>103.8.9284320.020.3590.75^1266324032288</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DocQuery</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentQuery/2_0/EntityService/EntityDocQueryUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DocRetrieve</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentRetrieve/2_0/EntityService/EntityDocRetrieve</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-DSDeferredResp</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentSubmission/1_1/EntityService/EntityDocSubmissionDeferredResponseUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-EntityAdminDist</con:name>
		<con:value>http://localhost:8080/Gateway/AdminDistribution/1_0/AdministrativeDistribution_Service</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-EntityXDRRequest</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentSubmission/1_1/EntityService/EntityDocSubmissionDeferredRequestUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Notify</con:name>
		<con:value>http://localhost:8080/Gateway/HIEM/2_0/EntityNotificationConsumer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscovery</con:name>
		<con:value>http://localhost:8080/Gateway/PatientDiscovery/1_0/EntityPatientDiscovery</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscoveryAsyncReq</con:name>
		<con:value>http://localhost:8080/Gateway/PatientDiscovery/1_0/EntityService/EntityPatientDiscoveryDeferredRequestUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-PatientDiscoveryAsyncResp</con:name>
		<con:value>http://localhost:8080/Gateway/PatientDiscovery/1_0/EntityService/EntityPatientDiscoveryDeferredResponseUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Subscribe</con:name>
		<con:value>http://localhost:8080/Gateway/HIEM/2_0/EntityNotificationProducer</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-Unsubscribe</con:name>
		<con:value>http://localhost:8080/Gateway/HIEM/2_0/EntitySubscriptionManager</con:value>
	</con:property>
	<con:property>
		<con:name>Endpoint-XDREntity</con:name>
		<con:value>http://localhost:8080/Gateway/DocumentSubmission/1_1/EntityService/EntityDocSubmissionUnsecured</con:value>
	</con:property>
	<con:property>
		<con:name>ExpirationDate</con:name>
		<con:value>20100520</con:value>
	</con:property>
	<con:property>
		<con:name>FamilyName</con:name>
		<con:value>Younger</con:value>
	</con:property>
	<con:property>
		<con:name>GatewayPropDir</con:name>
		<con:value>C:\glassfish3\glassfish\domains\domain1\config\nhin</con:value>
	</con:property>
	<con:property>
		<con:name>Gender</con:name>
		<con:value>M</con:value>
	</con:property>
	<con:property>
		<con:name>GivenName</con:name>
		<con:value>Gallow</con:value>
	</con:property>
	<con:property>
		<con:name>LocalAA</con:name>
		<con:value>1.1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalHCDescription</con:name>
		<con:value>InternalTest1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalHCID</con:name>
		<con:value>1.1</con:value>
	</con:property>
	<con:property>
		<con:name>LocalPatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>NotificationEndpoint</con:name>
		<con:value>https://localhost:8181/Gateway/HIEM/2_0/NhinService/NotificationConsumerService/HiemNotify</con:value>
	</con:property>
	<con:property>
		<con:name>NotifySubscriptionID</con:name>
		<con:value>f2064549-c802-41be-bb0d-6319c6437072</con:value>
	</con:property>
	<con:property>
		<con:name>NotifySubscriptionManagerEndpointAddress</con:name>
		<con:value>https://localhost:8181/Gateway/HIEM/2_0/NhinService/SubscriptionManagerService/HiemUnsubscribe</con:value>
	</con:property>
	<con:property>
		<con:name>PatientCorrelationDB</con:name>
		<con:value>patientcorrelationdb</con:value>
	</con:property>
	<con:property>
		<con:name>PatientCorrelationTable</con:name>
		<con:value>correlatedidentifiers</con:value>
	</con:property>
	<con:property>
		<con:name>project.name</con:name>
		<con:value>EntityValidation</con:value>
	</con:property>
	<con:property>
		<con:name>PurposeOfDisclosure</con:name>
		<con:value>Mental</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteAA</con:name>
		<con:value>2.2</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteHCDescription</con:name>
		<con:value>InternalTest2</con:value>
	</con:property>
	<con:property>
		<con:name>RemoteHCID</con:name>
		<con:value>2.2</con:value>
	</con:property>
	<con:property>
		<con:name>RemotePatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>SSN</con:name>
		<con:value>123456789</con:value>
	</con:property>
	<con:property>
		<con:name>State</con:name>
		<con:value>FL</con:value>
	</con:property>
	<con:property>
		<con:name>StreetAddress</con:name>
		<con:value>123 Johnson Rd</con:value>
	</con:property>
	<con:property>
		<con:name>SubjectID</con:name>
		<con:value>1111</con:value>
	</con:property>
	<con:property>
		<con:name>SubscribePatientID</con:name>
		<con:value>D123401</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionDB</con:name>
		<con:value>subscriptionrepository</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionEndpoint</con:name>
		<con:value>https://localhost:8181/Gateway/HIEM/2_0/NhinService/NotificationProducerService/HiemSubscription</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionManagerEndpointAddress</con:name>
		<con:value>https://localhost:8181/Gateway/HIEM/2_0/NhinService/SubscriptionManagerService/HiemUnsubscribe</con:value>
	</con:property>
	<con:property>
		<con:name>SubscriptionTable</con:name>
		<con:value>subscription</con:value>
	</con:property>
	<con:property>
		<con:name>UniquePatientId</con:name>
		<con:value>1111^^^&amp;1.1&amp;ISO</con:value>
	</con:property>
	<con:property>
		<con:name>UnSubscriptionID</con:name>
		<con:value>664f3c6e-ea88-4dae-a88e-b58661d8c253</con:value>
	</con:property>
	<con:property>
		<con:name>ZipCode</con:name>
		<con:value>12345</con:value>
	</con:property>
<con:property><con:name>ASUsername</con:name><con:value>admin</con:value></con:property><con:property><con:name>ASPassword</con:name><con:value>adminadmin</con:value></con:property><con:property><con:name>JMXHost</con:name><con:value>localhost</con:value></con:property><con:property><con:name>JMXPort</con:name><con:value>8686</con:value></con:property></con:properties>
<con:afterLoadScript>def propertiesFilename = project.path[0..(project.path.size()-4)] + 'properties'
def propertiesFile = new File(propertiesFilename)
if (propertiesFile.exists()) {
	def props = new Properties()
	props.load(new FileInputStream(propertiesFile))
	props.each { key, value ->
	    project.setPropertyValue(key, value)
	}
}

TimeZone.setDefault(TimeZone.getTimeZone("UTC"))
def testRunListener = [
afterRun: { testRunner, runContext -> },
afterStep: { testRunner, runContext, result -> },
beforeStep: { testRunner, runContext -> },
beforeStep: { testRunner, runContext, testStep -> },
beforeRun: { testRunner, runContext ->
use (org.codehaus.groovy.runtime.TimeCategory) {
def startDate = 5.minutes.ago
def endDate = 5.minutes.from.now
def expireDate = 30.days.from.now

def df = "yyyy-MM-dd'T'HH:mm:ss'Z'"
def dfSig = "MM/dd/yyyy' 'HH:mm:ss"

runContext.testCase.setPropertyValue("startDate", startDate.format(df))
runContext.testCase.setPropertyValue("endDate", endDate.format(df))
runContext.testCase.setPropertyValue("sigDate", startDate.format(dfSig))
runContext.testCase.setPropertyValue("expireDate", expireDate.format(df))
}
}
] as com.eviware.soapui.model.testsuite.TestRunListener

project.testSuiteList*.testCaseList.flatten()*.addTestRunListener(testRunListener)

com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext.metaClass.findProperty = { propertyName ->
return delegate.getProperty(propertyName) ?:
delegate.testCase.getPropertyValue(propertyName) ?:
delegate.testCase.testSuite.getPropertyValue(propertyName) ?:
delegate.testCase.testSuite.project.getPropertyValue(propertyName)
}

com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext.metaClass.withSql = { dbOrPropertyName, block ->
def dbName = delegate.findProperty(dbOrPropertyName) ?: dbOrPropertyName
def host = delegate.findProperty('DBHost')
def port = delegate.findProperty('DBPort')
def user = delegate.findProperty('DBUser')
def pass = delegate.findProperty('DBPass')

def connectString = "jdbc:mysql://${host}:${port}/${dbName}"
def sql = groovy.sql.Sql.newInstance(connectString, user, pass, "com.mysql.jdbc.Driver");
try {
block(sql)
} finally {
sql.close()
}
}

import javax.management.remote.JMXConnectorFactory as JmxFactory
import javax.management.remote.JMXServiceURL as JmxUrl
import javax.management.remote.*;

com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext.metaClass.setGatewayStandard = { standard ->
  def username = delegate.findProperty("ASUsername");
  def password = delegate.findProperty("ASPassword");
  def jmxHost = delegate.findProperty("JMXHost");
  def jmxPort = delegate.findProperty("JMXPort");
  // use jmx to set passthru mode
  def env = [
    (JMXConnector.CREDENTIALS): (String[])[username, password]
  ];
  def serverUrl = 'service:jmx:rmi://' + jmxHost + ':' + jmxPort + '/jndi/rmi://' + jmxHost + ':' + jmxPort +
'/jmxrmi';
  def server = JmxFactory.connect(new JmxUrl(serverUrl), env);
  def config = new GroovyMBean(server.MBeanServerConnection, 'org.connectopensource.mbeans:type=Configuration');
  //set the Gateway to Standard Mode
    if (standard){
  	config.setStandardMode();
  }
  else{
     config.setPassthruMode();
  }
  server.close();
  return true;
}

com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext.metaClass.isStandard = { serviceName, direction ->
  def username = delegate.findProperty("ASUsername");
  def password = delegate.findProperty("ASPassword");
  def jmxHost = delegate.findProperty("JMXHost");
  def jmxPort = delegate.findProperty("JMXPort");
  // use jmx to set passthru mode
  def env = [
    (JMXConnector.CREDENTIALS): (String[])[username, password]
  ];
  def serverUrl = 'service:jmx:rmi://' + jmxHost + ':' + jmxPort + '/jndi/rmi://' + jmxHost + ':' + jmxPort +
'/jmxrmi';

  def server = JmxFactory.connect(new JmxUrl(serverUrl), env);
  def config = new GroovyMBean(server.MBeanServerConnection, 'org.connectopensource.mbeans:type=Configuration');
  //set the Gateway to Standard Mode
  def isStandard = config.isStandard(serviceName, direction);
  server.close();
  return isStandard;
}

com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext.metaClass.setGatewayStandard = { standard, serviceName, direction ->
  def username = delegate.findProperty("ASUsername");
  def password = delegate.findProperty("ASPassword");
  def jmxHost = delegate.findProperty("JMXHost");
  def jmxPort = delegate.findProperty("JMXPort");
  log.info "Value of the Param Name -->"+name;
  // use jmx to set passthru mode
  def env = [
    (JMXConnector.CREDENTIALS): (String[])[username, password]
  ];
  def serverUrl = 'service:jmx:rmi://' + jmxHost + ':' + jmxPort + '/jndi/rmi://' + jmxHost + ':' + jmxPort +
'/jmxrmi';
  log.info "Standard valud-->"+standard
  def server = JmxFactory.connect(new JmxUrl(serverUrl), env);
  def config = new GroovyMBean(server.MBeanServerConnection, 'org.connectopensource.mbeans:type=Configuration');
  //set the Gateway to Standard Mode
    if (standard){
  	config.setStandardMode(serviceName, direction);
  }
  else{
     config.setPassthruMode(serviceName, direction);
  }
  server.close();
  return true;
}
</con:afterLoadScript>
<con:wssContainer/>
<con:sensitiveInformation/>
</con:soapui-project>