<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project name="Smart Forms SOAPUI Project" resourceRoot="" soapui-version="4.5.1" activeEnvironment="Default" abortOnError="false" runType="SEQUENTIAL" defaultScriptLanguage="Groovy" xmlns:con="http://eviware.com/soapui/config"><con:settings><con:setting id="ProjectSettings@hermesConfig">${HERMES_CFG}</con:setting><con:setting id="com.eviware.soapui.impl.wsdl.actions.iface.tools.soapui.TestRunnerAction@values-local"><![CDATA[<xml-fragment xmlns:con="http://eviware.com/soapui/config">
  <con:entry key="Environment" value="Default"/>
  <con:entry key="Global Properties" value=""/>
  <con:entry key="TestSuite" value="&lt;all>"/>
  <con:entry key="Report to Generate" value=""/>
  <con:entry key="Password" value=""/>
  <con:entry key="soapui-setings.xml Password" value=""/>
  <con:entry key="TestRunner Path" value=""/>
  <con:entry key="Tool Args" value=""/>
  <con:entry key="Ignore Errors" value="false"/>
  <con:entry key="Host:Port" value=""/>
  <con:entry key="WSS Password Type" value=""/>
  <con:entry key="Save Project" value="false"/>
  <con:entry key="Enable UI" value="false"/>
  <con:entry key="System Properties" value=""/>
  <con:entry key="Domain" value=""/>
  <con:entry key="Coverage Report" value="false"/>
  <con:entry key="Export JUnit Results" value="false"/>
  <con:entry key="Open Report" value="false"/>
  <con:entry key="Project Properties" value=""/>
  <con:entry key="Project Password" value=""/>
  <con:entry key="Export All" value="false"/>
  <con:entry key="Report Format(s)" value=""/>
  <con:entry key="TestCase" value="&lt;all>"/>
  <con:entry key="Print Report" value="false"/>
  <con:entry key="Username" value=""/>
  <con:entry key="Root Folder" value=""/>
  <con:entry key="Save After" value="false"/>
  <con:entry key="Add Settings" value="false"/>
  <con:entry key="Endpoint" value=""/>
</xml-fragment>]]></con:setting></con:settings><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="ClinicalDataServiceSynchronousInterfaceHttpBinding" type="wsdl" bindingName="{http://client.cds.URL       }ClinicalDataServiceSynchronousInterfaceHttpBinding" soapVersion="1_1" anonymous="optional" definition="http://IP              /cds-wsclient/cds-service?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://IP              /cds-wsclient/cds-service?wsdl"><con:part><con:url>http://IP              /cds-wsclient/cds-service?wsdl</con:url><con:content><![CDATA[<wsdl:definitions targetNamespace="http://client.cds.URL       " xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="http://client.cds.URL       " xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <wsdl:message name="updateClinicalDataResponse">
    <wsdl:part name="out" type="xsd:string"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="createClinicalDataResponse">
    <wsdl:part name="out" type="xsd:string"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="appendClinicalDataRequest">
    <wsdl:part name="in0" type="xsd:string"></wsdl:part>
    <wsdl:part name="in1" type="xsd:string"></wsdl:part>
    <wsdl:part name="in2" type="xsd:string"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="deleteClinicalDataRequest">
    <wsdl:part name="in0" type="xsd:string"></wsdl:part>
    <wsdl:part name="in1" type="xsd:string"></wsdl:part>
    <wsdl:part name="in2" type="xsd:string"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="deleteClinicalDataResponse">
    <wsdl:part name="out" type="xsd:string"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="isAliveResponse">
    <wsdl:part name="out" type="xsd:boolean"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="readClinicalData1Request">
    <wsdl:part name="in0" type="xsd:string"></wsdl:part>
    <wsdl:part name="in1" type="xsd:string"></wsdl:part>
    <wsdl:part name="in2" type="xsd:string"></wsdl:part>
    <wsdl:part name="in3" type="xsd:string"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="createClinicalDataRequest">
    <wsdl:part name="in0" type="xsd:string"></wsdl:part>
    <wsdl:part name="in1" type="xsd:string"></wsdl:part>
    <wsdl:part name="in2" type="xsd:string"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="readClinicalDataRequest">
    <wsdl:part name="in0" type="xsd:string"></wsdl:part>
    <wsdl:part name="in1" type="xsd:string"></wsdl:part>
    <wsdl:part name="in2" type="xsd:string"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="readClinicalData1Response">
    <wsdl:part name="out" type="xsd:string"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="readClinicalDataResponse">
    <wsdl:part name="out" type="xsd:string"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="isAliveRequest"></wsdl:message>
  <wsdl:message name="appendClinicalDataResponse">
    <wsdl:part name="out" type="xsd:string"></wsdl:part>
  </wsdl:message>
  <wsdl:message name="updateClinicalDataRequest">
    <wsdl:part name="in0" type="xsd:string"></wsdl:part>
    <wsdl:part name="in1" type="xsd:string"></wsdl:part>
    <wsdl:part name="in2" type="xsd:string"></wsdl:part>
  </wsdl:message>
  <wsdl:portType name="ClinicalDataServiceSynchronousInterfacePortType">
    <wsdl:operation name="deleteClinicalData">
      <wsdl:input name="deleteClinicalDataRequest" message="tns:deleteClinicalDataRequest"></wsdl:input>
      <wsdl:output name="deleteClinicalDataResponse" message="tns:deleteClinicalDataResponse"></wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="createClinicalData">
      <wsdl:input name="createClinicalDataRequest" message="tns:createClinicalDataRequest"></wsdl:input>
      <wsdl:output name="createClinicalDataResponse" message="tns:createClinicalDataResponse"></wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="readClinicalData1">
      <wsdl:input name="readClinicalData1Request" message="tns:readClinicalData1Request"></wsdl:input>
      <wsdl:output name="readClinicalData1Response" message="tns:readClinicalData1Response"></wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="appendClinicalData">
      <wsdl:input name="appendClinicalDataRequest" message="tns:appendClinicalDataRequest"></wsdl:input>
      <wsdl:output name="appendClinicalDataResponse" message="tns:appendClinicalDataResponse"></wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="readClinicalData">
      <wsdl:input name="readClinicalDataRequest" message="tns:readClinicalDataRequest"></wsdl:input>
      <wsdl:output name="readClinicalDataResponse" message="tns:readClinicalDataResponse"></wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="isAlive">
      <wsdl:input name="isAliveRequest" message="tns:isAliveRequest"></wsdl:input>
      <wsdl:output name="isAliveResponse" message="tns:isAliveResponse"></wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="updateClinicalData">
      <wsdl:input name="updateClinicalDataRequest" message="tns:updateClinicalDataRequest"></wsdl:input>
      <wsdl:output name="updateClinicalDataResponse" message="tns:updateClinicalDataResponse"></wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ClinicalDataServiceSynchronousInterfaceHttpBinding" type="tns:ClinicalDataServiceSynchronousInterfacePortType">
    <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="deleteClinicalData">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="deleteClinicalDataRequest">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:input>
      <wsdl:output name="deleteClinicalDataResponse">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="createClinicalData">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="createClinicalDataRequest">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:input>
      <wsdl:output name="createClinicalDataResponse">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="readClinicalData1">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="readClinicalData1Request">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:input>
      <wsdl:output name="readClinicalData1Response">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="appendClinicalData">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="appendClinicalDataRequest">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:input>
      <wsdl:output name="appendClinicalDataResponse">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="readClinicalData">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="readClinicalDataRequest">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:input>
      <wsdl:output name="readClinicalDataResponse">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="isAlive">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="isAliveRequest">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:input>
      <wsdl:output name="isAliveResponse">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="updateClinicalData">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="updateClinicalDataRequest">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:input>
      <wsdl:output name="updateClinicalDataResponse">
        <wsdlsoap:body use="literal" namespace="http://client.cds.URL       "/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="ClinicalDataServiceSynchronousInterface">
    <wsdl:port name="ClinicalDataServiceSynchronousInterfaceHttpPort" binding="tns:ClinicalDataServiceSynchronousInterfaceHttpBinding">
      <wsdlsoap:address location="http://IP              /cds-wsclient/cds-service"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>jms://${CDS_DBQ_JMS_ENDPOINT}</con:endpoint><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint></con:endpoints><con:operation isOneWay="false" action="" name="appendClinicalData" bindingOperationName="appendClinicalData" type="Request-Response" outputName="appendClinicalDataResponse" inputName="appendClinicalDataRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1" outgoingWss="" incomingWss=""><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_DBQ_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:appendClinicalData>
         <in0>?</in0>
         <in1>?</in1>
         <in2>?</in2>
      </cli:appendClinicalData>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://client.cds.URL       /ClinicalDataServiceSynchronousInterfacePortType/appendClinicalDataRequest"/></con:call></con:operation><con:operation isOneWay="false" action="" name="createClinicalData" bindingOperationName="createClinicalData" type="Request-Response" outputName="createClinicalDataResponse" inputName="createClinicalDataRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1" outgoingWss="" incomingWss=""><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:createClinicalData>
         <in0>?</in0>
         <in1>?</in1>
         <in2>?</in2>
      </cli:createClinicalData>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://client.cds.URL       /ClinicalDataServiceSynchronousInterfacePortType/createClinicalDataRequest"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="deleteClinicalData" bindingOperationName="deleteClinicalData" type="Request-Response" outputName="deleteClinicalDataResponse" inputName="deleteClinicalDataRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1" outgoingWss="" incomingWss=""><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:deleteClinicalData>
         <in0>?</in0>
         <in1>?</in1>
         <in2>?</in2>
      </cli:deleteClinicalData>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://client.cds.URL       /ClinicalDataServiceSynchronousInterfacePortType/deleteClinicalDataRequest"/></con:call></con:operation><con:operation isOneWay="false" action="" name="isAlive" bindingOperationName="isAlive" type="Request-Response" outputName="isAliveResponse" inputName="isAliveRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1" outgoingWss="" incomingWss=""><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:isAlive/>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/></con:credentials><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://client.cds.URL       /ClinicalDataServiceSynchronousInterfacePortType/isAliveRequest"/></con:call></con:operation><con:operation isOneWay="false" action="" name="readClinicalData" bindingOperationName="readClinicalData" type="Request-Response" outputName="readClinicalDataResponse" inputName="readClinicalDataRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData>
         <in0>?</in0>
         <in1>?</in1>
         <in2>?</in2>
      </cli:readClinicalData>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://client.cds.URL       /ClinicalDataServiceSynchronousInterfacePortType/readClinicalDataRequest"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="readClinicalData1" bindingOperationName="readClinicalData1" type="Request-Response" outputName="readClinicalData1Response" inputName="readClinicalData1Request" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1" outgoingWss="" incomingWss=""><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>?</in0>
         <in1>?</in1>
         <in2>?</in2>
         <in3>?</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://client.cds.URL       /ClinicalDataServiceSynchronousInterfacePortType/readClinicalData1Request"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="updateClinicalData" bindingOperationName="updateClinicalData" type="Request-Response" outputName="updateClinicalDataResponse" inputName="updateClinicalDataRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1" outgoingWss="" incomingWss=""><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:updateClinicalData>
         <in0>?</in0>
         <in1>?</in1>
         <in2>?</in2>
      </cli:updateClinicalData>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://client.cds.URL       /ClinicalDataServiceSynchronousInterfacePortType/updateClinicalDataRequest"/></con:call></con:operation></con:interface><con:testSuite name="Smart Forms Basic Create Test Suite"><con:description/><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="SmartFormCreateValid" searchProperties="true" id="4f7cb89a-d5a1-4ae5-b18a-b234316b98f2"><con:settings/><con:testStep type="groovy" name="Setup Test Data"><con:settings/><con:config><script>import java.util.UUID;  
import org.apache.commons.lang.time.DateFormatUtils;
context.CLIENT_REQUEST_INIT_TIME = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.REQUEST_ID = UUID.randomUUID().toString(); 
context.DOCUMENTIDENTIFIER_IDENTITY = UUID.randomUUID().toString(); 
context.DOCUMENT_NATIVE_ID = new Random().nextInt(9999+1); 

context.ASSERTION_IDENTITY1 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY2 = UUID.randomUUID().toString(); 

context.DOCUMENT_START_DT = '20121231170000-0700'; 
context.DOCUMENT_END_DT = '20121231170000-0700'; 

context.ASSERTION_START_DT = '20121231170000-0700'; 
context.ASSERTION_END_DT = '20121231170000-0700'; 

context.APRV_BY_NAME_FAMILY = 'FamilyName';
context.APRV_BY_NAME_GIVEN = 'Given';
context.APRV_BY_NAME_MIDDLE = 'MiddleName';
context.APRV_BY_NAME_PREFIX = 'Prefix';
context.APRV_BY_NAME_SUFFIX = 'Suffix';
context.APRV_BY_NAME_TITLE = 'Title';
context.APRV_BY_PERSON_ASGNING_AUTH = 'USVHA';
context.APRV_BY_PERSON_ASGNING_FCLT = 'DefaultAssigningFacility';
context.APRV_BY_PERSON_IDENTITY = 'test_AUTHORID_1003';
context.APRV_BY_PRACTITIONER_COMMENTS = 'Approved By Comment';
context.APRV_BY_PRACTITIONER_ID_S = 'IdSourceTable';
context.APRV_BY_PRACTITIONER_DT = '20120501162517-0600';
context.APRV_BY_PRACTITIONER_DT_UTC = ''; //set by system
context.FACILITY_ASSIGNING_AUTHORITY = 'AssigningAuthNamespaceId';
context.FACILITY_IDENTITY = 'OrganizationId';
context.FACILITY_NAME = 'OrganizationName';
context.INITIATING_SYSTEM = 'InitiatingSystem';
context.MESSAGE_INSERTION_TIME = ''; //entered by system? 5/10/2012 2:28:41.116285 PM
context.PATIENT_ASSIGNING_AUTHORITY = 'USVHA';
context.PATIENT_ASSIGNING_FACILITY = '402';
context.PATIENT_IDENTITY = 'test_10004';
context.PATIENT_NAME_FAMILY = 'FamilyName';
context.PATIENT_NAME_GIVEN = 'Given';
context.PATIENT_NAME_MIDDLE = 'MiddleName';
context.PATIENT_NAME_PREFIX = 'Prefix';
context.PATIENT_NAME_SUFFIX = 'Suffix';
context.PATIENT_NAME_TITLE = 'Title';
context.SMART_FORM_DOC_ID = ''; //DB Primary Key?
context.RECORDIDENTIFIER_IDENTITY = null;
context.RECORD_VERSION = 3;
</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data - Valid"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data - Valid" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.support.AbstractHttpRequest@follow-redirects">true</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<templateId>SmartFormCreate1</templateId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME}</clientRequestInitiationTime>
	<patient>
		<smartFormDocuments>
			<smartFormDocument>
				<documentNativeId>1</documentNativeId>
				<documentUUID>${DOCUMENTIDENTIFIER_IDENTITY}</documentUUID>
				<sourceName>SOAPUI</sourceName>
				<templateVersion>1.1</templateVersion>
				<documentStartDate>
					<literal>${DOCUMENT_START_DT}</literal>
				</documentStartDate>
				<documentEndDate>
					<literal>${DOCUMENT_END_DT}</literal>
				</documentEndDate>
				<patient>
					<identifier>
						<identity>${PATIENT_IDENTITY}</identity>
						<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
						<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${PATIENT_NAME_PREFIX}</prefix>
						<given>${PATIENT_NAME_GIVEN}</given>
						<middle>${PATIENT_NAME_MIDDLE}</middle>
						<family>${PATIENT_NAME_FAMILY}</family>
						<suffix>${PATIENT_NAME_SUFFIX}</suffix>
						<title>${PATIENT_NAME_TITLE}</title>
					</name>
				</patient>
				<provider>
					<identifier>
						<identity>${APRV_BY_PERSON_IDENTITY}</identity>
						<assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
						<assigningAuthority>${APRV_BY_PERSON_ASGNING_AUTH}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${APRV_BY_NAME_PREFIX}</prefix>
						<given>${APRV_BY_NAME_GIVEN}</given>
						<middle>${APRV_BY_NAME_MIDDLE}</middle>
						<family>${APRV_BY_NAME_FAMILY}</family>
						<suffix>${APRV_BY_NAME_SUFFIX}</suffix>
						<title>${APRV_BY_NAME_TITLE}</title>
					</name>
				</provider>
	               <facility>
					<identity>${FACILITY_IDENTITY}</identity>
					<name>${FACILITY_NAME}</name>
					<assigningAuthority>${FACILITY_ASSIGNING_AUTHORITY}</assigningAuthority>
				</facility>
				<assertions>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY1}</assertionUUID>
						<seqInDoc>1</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY2}</assertionUUID>
						<seqInDoc>0</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
				</assertions>
			</smartFormDocument>
		</smartFormDocuments>
	</patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="XPath Match"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="groovy" name="Validation Script"><con:settings/><con:config><script>import groovy.sql.Sql;

def dbUrl = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "DB_URL" );
def dbUser = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "DB_USER" );
def dbPassword = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "DB_PASSWORD" );

def db = [url:dbUrl,
          user:dbUser,
          password:dbPassword,
          driver:'oracle.jdbc.OracleDriver']
          
def sql = Sql.newInstance(db.url, db.user, db.password, db.driver);

columns = """DOCUMENT_END_DT, DOCUMENT_END_DT_UTC, DOCUMENT_START_DT, DOCUMENT_START_DT_UTC, DOCUMENT_UUID, FACILITY_ASSIGNING_AUTHORITY, FACILITY_IDENTITY, 
FACILITY_NAME, MESSAGE_INSERTION_TIME, PATIENT_ASSIGNING_AUTHORITY, PATIENT_ASSIGNING_FACILITY, PATIENT_IDENTITY, PATIENT_NAME_FAMILY, PATIENT_NAME_GIVEN, 
PATIENT_NAME_MIDDLE, PATIENT_NAME_PREFIX, PATIENT_NAME_SUFFIX, PATIENT_NAME_TITLE, PROVIDER_ASSIGNING_AUTHORITY, PROVIDER_ASSIGNING_FACILITY, PROVIDER_IDENTITY, 
PROVIDER_NAME_FAMILY, PROVIDER_NAME_GIVEN, PROVIDER_NAME_MIDDLE, PROVIDER_NAME_PREFIX, PROVIDER_NAME_SUFFIX, PROVIDER_NAME_TITLE, RECORDIDENTIFIER_IDENTITY, 
RECORDIDENTIFIER_NAMESPACEID, RECORDIDENTIFIER_UNIVERSALID, RECORDIDENTIFIER_UNIVERSTYP, REQUEST_ID, SMART_FORM_DOC_ID""";

row = sql.firstRow("select ${columns} from SMART_FORM_DOC q where DOCUMENT_UUID = :doc_id", 
					[doc_id:context.DOCUMENTIDENTIFIER_IDENTITY]);
assert row.DOCUMENT_UUID == context.DOCUMENTIDENTIFIER_IDENTITY;
assert row.FACILITY_ASSIGNING_AUTHORITY == context.FACILITY_ASSIGNING_AUTHORITY;
assert row.FACILITY_IDENTITY == context.FACILITY_IDENTITY;
assert row.FACILITY_NAME == context.FACILITY_NAME;
assert row.MESSAGE_INSERTION_TIME != null;
assert row.PATIENT_ASSIGNING_AUTHORITY == context.PATIENT_ASSIGNING_AUTHORITY;
assert row.PATIENT_ASSIGNING_FACILITY == context.PATIENT_ASSIGNING_FACILITY;
assert row.PATIENT_IDENTITY == context.PATIENT_IDENTITY;
assert row.PATIENT_NAME_FAMILY == context.PATIENT_NAME_FAMILY;
assert row.PATIENT_NAME_GIVEN == context.PATIENT_NAME_GIVEN;
assert row.PATIENT_NAME_MIDDLE == context.PATIENT_NAME_MIDDLE;
assert row.PATIENT_NAME_PREFIX == context.PATIENT_NAME_PREFIX;
assert row.PATIENT_NAME_SUFFIX == context.PATIENT_NAME_SUFFIX;
assert row.PATIENT_NAME_TITLE == context.PATIENT_NAME_TITLE;

assert row.PROVIDER_NAME_FAMILY == context.APRV_BY_NAME_FAMILY;
assert row.PROVIDER_NAME_GIVEN == context.APRV_BY_NAME_GIVEN;
assert row.PROVIDER_NAME_MIDDLE == context.APRV_BY_NAME_MIDDLE;
assert row.PROVIDER_NAME_PREFIX == context.APRV_BY_NAME_PREFIX;
assert row.PROVIDER_NAME_SUFFIX == context.APRV_BY_NAME_SUFFIX;
assert row.PROVIDER_NAME_TITLE == context.APRV_BY_NAME_TITLE;
assert row.PROVIDER_ASSIGNING_AUTHORITY == context.APRV_BY_PERSON_ASGNING_AUTH;
assert row.PROVIDER_ASSIGNING_FACILITY == context.APRV_BY_PERSON_ASGNING_FCLT;
assert row.PROVIDER_IDENTITY == context.APRV_BY_PERSON_IDENTITY;

assert row.SMART_FORM_DOC_ID != null;
assert row.RECORDIDENTIFIER_IDENTITY == "1"; // Integer.toString(context.DOCUMENT_NATIVE_ID);

// Check Audit for clientRequestInitiationTime and clientId
auditColumns = """FACILITY_ID, REQUEST_ID, RECEIVED_DATE_TIME, MESSAGE_DATE_TIME, MESSAGE_TYP, CLIENT_IDENTIFIER, TEMPLATE_NAME_ID, CLIENT_REQUEST_TM""";
auditRow = sql.firstRow("select ${auditColumns} from AUDIT_CLOB_STR a where REQUEST_ID = :request_id", 
					[request_id:context.REQUEST_ID]);
assert auditRow.CLIENT_REQUEST_TM == context.CLIENT_REQUEST_INIT_TIME;
assert auditRow.CLIENT_IDENTIFIER == 'SOAP UI';</script></con:config></con:testStep><con:properties/></con:testCase><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="SmartFormCreateInvalid" searchProperties="true" id="18fdc599-7b7c-4d8a-aad6-d735f0bfd506"><con:settings/><con:testStep type="groovy" name="Setup Test Data" id="d4b7fd10-0e51-4b21-bb07-64c3cafdc09c"><con:settings/><con:config><script>import java.util.UUID;  
import org.apache.commons.lang.time.DateFormatUtils;
context.CLIENT_REQUEST_INIT_TIME = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.REQUEST_ID = UUID.randomUUID().toString(); 
context.DOCUMENTIDENTIFIER_IDENTITY = UUID.randomUUID().toString(); 
context.PATIENT_ASSIGNING_FACILITY = "402";

</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data - Invalid" id="648e5e82-5c25-4f22-949b-0ecbd343e461"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data - Invalid"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<templateId>SmartFormCreate1</templateId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME}</clientRequestInitiationTime>
	<patient>
		<smartFormDocuments>
			<smartFormDocument>
				<documentNativeId>1</documentNativeId>
				<documentUUID>${DOCUMENTIDENTIFIER_IDENTITY}</documentUUID>
				<sourceName>SOAPUI</sourceName>
				<templateVersion>1.1</templateVersion>
				<documentStartDate>
					<literal>${DOCUMENT_START_DT}</literal>
				</documentStartDate>
				<documentEndDate>
					<literal>${DOCUMENT_END_DT}</literal>
				</documentEndDate>
				<patient>
					<identifier>
						<identity>${PATIENT_IDENTITY}</identity>
						<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
						<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${PATIENT_NAME_PREFIX}</prefix>
						<given>${PATIENT_NAME_GIVEN}</given>
						<middle>${PATIENT_NAME_MIDDLE}</middle>
						<family>${PATIENT_NAME_FAMILY}</family>
						<suffix>${PATIENT_NAME_SUFFIX}</suffix>
						<title>${PATIENT_NAME_TITLE}</title>
					</name>
				</patient>
				<provider>
					<identifier>
						<identity>${APRV_BY_PERSON_IDENTITY}</identity>
						<assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
						<assigningAuthority>${APRV_BY_PRACTITIONER_ID_S}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${APRV_BY_NAME_PREFIX}</prefix>
						<given>${APRV_BY_NAME_GIVEN}</given>
						<middle>${APRV_BY_NAME_MIDDLE}</middle>
						<family>${APRV_BY_NAME_FAMILY}</family>
						<suffix>${APRV_BY_NAME_SUFFIX}</suffix>
						<title>${APRV_BY_NAME_TITLE}</title>
					</name>
				</provider>
	               <facility>
					<identity>${FACILITY_IDENTITY}</identity>
					<name>${FACILITY_NAME}</name>
					<assigningAuthority>${FACILITY_ASSIGNING_AUTHORITY}</assigningAuthority>
				</facility>
				<assertions>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY1}</assertionUUID>
						<seqInDoc>1</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY2}</assertionUUID>
						<seqInDoc>0</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
				</assertions>
			</smartFormDocument>
		</smartFormDocuments>
	</patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="Matches Request ID"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion type="XPath Match" name="Response returns fatalError"><con:configuration><path>count(//errorSection/fatalErrors/fatalError)</path><content>1</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion type="XPath Match" name="Check Response for Schema Validation Failed Error"><con:configuration><path>//exceptionMessage</path><content>HDRII_OPERATION_FAILED</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="groovy" name="Validation Script" id="38374c76-3ef8-44cc-9c2f-5897f59125b3"><con:settings/><con:config><script>import groovy.sql.Sql;

def dbUrl = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "DB_URL" );
def dbUser = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "DB_USER" );
def dbPassword = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "DB_PASSWORD" );

def db = [url:dbUrl,
          user:dbUser,
          password:dbPassword,
          driver:'oracle.jdbc.OracleDriver']
          
def sql = Sql.newInstance(db.url, db.user, db.password, db.driver);

// Check Audit for clientRequestInitiationTime and clientId
auditColumns = """FACILITY_ID, REQUEST_ID, RECEIVED_DATE_TIME, MESSAGE_DATE_TIME, MESSAGE_TYP, CLIENT_IDENTIFIER, TEMPLATE_NAME_ID, CLIENT_REQUEST_TM""";
auditRow = sql.firstRow("select ${auditColumns} from AUDIT_CLOB_STR a where REQUEST_ID = :request_id", 
					[request_id:context.REQUEST_ID]);
assert auditRow.CLIENT_REQUEST_TM == context.CLIENT_REQUEST_INIT_TIME;
assert auditRow.CLIENT_IDENTIFIER == 'SOAP UI';

</script></con:config></con:testStep><con:properties/></con:testCase><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="SmartFormCreateInvalidAssertionDate" searchProperties="true" id="d325b354-7962-46a7-8580-6bfc91a17343"><con:settings/><con:testStep type="groovy" name="Setup Test Data"><con:settings/><con:config><script>import java.util.UUID;  
import org.apache.commons.lang.time.DateFormatUtils;
context.CLIENT_REQUEST_INIT_TIME = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.REQUEST_ID = UUID.randomUUID().toString(); 
context.DOCUMENTIDENTIFIER_IDENTITY = UUID.randomUUID().toString(); 
context.DOCUMENT_NATIVE_ID = new Random().nextInt(9999+1); 

context.ASSERTION_IDENTITY1 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY2 = UUID.randomUUID().toString(); 

context.DOCUMENT_START_DT = '20121231170000-0700'; 
context.DOCUMENT_END_DT = '20121231170000-0700'; 

context.ASSERTION_START_DT = '20121394170000-0700'; 
context.ASSERTION_END_DT = '20121231170000-0700'; 

context.APRV_BY_NAME_FAMILY = 'FamilyName';
context.APRV_BY_NAME_GIVEN = 'Given';
context.APRV_BY_NAME_MIDDLE = 'MiddleName';
context.APRV_BY_NAME_PREFIX = 'Prefix';
context.APRV_BY_NAME_SUFFIX = 'Suffix';
context.APRV_BY_NAME_TITLE = 'Title';
context.APRV_BY_PERSON_ASGNING_AUTH = 'USVHA';
context.APRV_BY_PERSON_ASGNING_FCLT = 'DefaultAssigningFacility';
context.APRV_BY_PERSON_IDENTITY = 'test_AUTHORID_1003';
context.APRV_BY_PRACTITIONER_COMMENTS = 'Approved By Comment';
context.APRV_BY_PRACTITIONER_ID_S = 'IdSourceTable';
context.APRV_BY_PRACTITIONER_DT = '20120501162517-0600';
context.APRV_BY_PRACTITIONER_DT_UTC = ''; //set by system
context.FACILITY_ASSIGNING_AUTHORITY = 'AssigningAuthNamespaceId';
context.FACILITY_IDENTITY = 'OrganizationId';
context.FACILITY_NAME = 'OrganizationName';
context.INITIATING_SYSTEM = 'InitiatingSystem';
context.MESSAGE_INSERTION_TIME = ''; //entered by system? 5/10/2012 2:28:41.116285 PM
context.PATIENT_ASSIGNING_AUTHORITY = 'USVHA';
context.PATIENT_ASSIGNING_FACILITY = '402';
context.PATIENT_IDENTITY = 'test_10004';
context.PATIENT_NAME_FAMILY = 'FamilyName';
context.PATIENT_NAME_GIVEN = 'Given';
context.PATIENT_NAME_MIDDLE = 'MiddleName';
context.PATIENT_NAME_PREFIX = 'Prefix';
context.PATIENT_NAME_SUFFIX = 'Suffix';
context.PATIENT_NAME_TITLE = 'Title';
context.SMART_FORM_DOC_ID = ''; //DB Primary Key?
context.RECORDIDENTIFIER_IDENTITY = null;
context.RECORD_VERSION = 3;
</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data - Invalid Assertion Date"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data - Invalid Assertion Date" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.support.AbstractHttpRequest@follow-redirects">true</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<templateId>SmartFormCreate1</templateId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME}</clientRequestInitiationTime>
	<patient>
		<smartFormDocuments>
			<smartFormDocument>
				<documentNativeId>1</documentNativeId>
				<documentUUID>${DOCUMENTIDENTIFIER_IDENTITY}</documentUUID>
				<sourceName>SOAPUI</sourceName>
				<templateVersion>1.1</templateVersion>
				<documentStartDate>
					<literal>${DOCUMENT_START_DT}</literal>
				</documentStartDate>
				<documentEndDate>
					<literal>${DOCUMENT_END_DT}</literal>
				</documentEndDate>
				<patient>
					<identifier>
						<identity>${PATIENT_IDENTITY}</identity>
						<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
						<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${PATIENT_NAME_PREFIX}</prefix>
						<given>${PATIENT_NAME_GIVEN}</given>
						<middle>${PATIENT_NAME_MIDDLE}</middle>
						<family>${PATIENT_NAME_FAMILY}</family>
						<suffix>${PATIENT_NAME_SUFFIX}</suffix>
						<title>${PATIENT_NAME_TITLE}</title>
					</name>
				</patient>
				<provider>
					<identifier>
						<identity>${APRV_BY_PERSON_IDENTITY}</identity>
						<assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
						<assigningAuthority>${APRV_BY_PERSON_ASGNING_AUTH}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${APRV_BY_NAME_PREFIX}</prefix>
						<given>${APRV_BY_NAME_GIVEN}</given>
						<middle>${APRV_BY_NAME_MIDDLE}</middle>
						<family>${APRV_BY_NAME_FAMILY}</family>
						<suffix>${APRV_BY_NAME_SUFFIX}</suffix>
						<title>${APRV_BY_NAME_TITLE}</title>
					</name>
				</provider>
	               <facility>
					<identity>${FACILITY_IDENTITY}</identity>
					<name>${FACILITY_NAME}</name>
					<assigningAuthority>${FACILITY_ASSIGNING_AUTHORITY}</assigningAuthority>
				</facility>
				<assertions>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY1}</assertionUUID>
						<seqInDoc>1</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY2}</assertionUUID>
						<seqInDoc>0</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
				</assertions>
			</smartFormDocument>
		</smartFormDocuments>
	</patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="XPath Match"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains"><con:configuration><token>Unparseable date: "20121394170000-0700"</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="SmartFormCreateDuplicateDocumentUUID" searchProperties="true" id="894e9e2b-4a95-42c5-a7c8-020b08ac8f31"><con:settings/><con:testStep type="groovy" name="Setup Test Data"><con:settings/><con:config><script>import java.util.UUID;  
import org.apache.commons.lang.time.DateFormatUtils;
context.CLIENT_REQUEST_INIT_TIME = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.REQUEST_ID = UUID.randomUUID().toString(); 
context.DOCUMENTIDENTIFIER_IDENTITY = UUID.randomUUID().toString(); 
context.DOCUMENT_NATIVE_ID = new Random().nextInt(9999+1); 

context.ASSERTION_IDENTITY1 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY2 = UUID.randomUUID().toString(); 

context.DOCUMENT_START_DT = '20121231170000-0700'; 
context.DOCUMENT_END_DT = '20121231170000-0700'; 

context.ASSERTION_START_DT = '20121231170000-0700'; 
context.ASSERTION_END_DT = '20121231170000-0700'; 

context.APRV_BY_NAME_FAMILY = 'FamilyName';
context.APRV_BY_NAME_GIVEN = 'Given';
context.APRV_BY_NAME_MIDDLE = 'MiddleName';
context.APRV_BY_NAME_PREFIX = 'Prefix';
context.APRV_BY_NAME_SUFFIX = 'Suffix';
context.APRV_BY_NAME_TITLE = 'Title';
context.APRV_BY_PERSON_ASGNING_AUTH = 'USVHA';
context.APRV_BY_PERSON_ASGNING_FCLT = 'DefaultAssigningFacility';
context.APRV_BY_PERSON_IDENTITY = 'test_AUTHORID_1003';
context.APRV_BY_PRACTITIONER_COMMENTS = 'Approved By Comment';
context.APRV_BY_PRACTITIONER_ID_S = 'IdSourceTable';
context.APRV_BY_PRACTITIONER_DT = '20120501162517-0600';
context.APRV_BY_PRACTITIONER_DT_UTC = ''; //set by system
context.FACILITY_ASSIGNING_AUTHORITY = 'AssigningAuthNamespaceId';
context.FACILITY_IDENTITY = 'OrganizationId';
context.FACILITY_NAME = 'OrganizationName';
context.INITIATING_SYSTEM = 'InitiatingSystem';
context.MESSAGE_INSERTION_TIME = ''; //entered by system? 5/10/2012 2:28:41.116285 PM
context.PATIENT_ASSIGNING_AUTHORITY = 'USVHA';
context.PATIENT_ASSIGNING_FACILITY = '402';
context.PATIENT_IDENTITY = 'test_10004';
context.PATIENT_NAME_FAMILY = 'FamilyName';
context.PATIENT_NAME_GIVEN = 'Given';
context.PATIENT_NAME_MIDDLE = 'MiddleName';
context.PATIENT_NAME_PREFIX = 'Prefix';
context.PATIENT_NAME_SUFFIX = 'Suffix';
context.PATIENT_NAME_TITLE = 'Title';
context.SMART_FORM_DOC_ID = ''; //DB Primary Key?
context.RECORDIDENTIFIER_IDENTITY = null;
context.RECORD_VERSION = 3;
</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data - Valid"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data - Valid" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.support.AbstractHttpRequest@follow-redirects">true</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<templateId>SmartFormCreate1</templateId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME}</clientRequestInitiationTime>
	<patient>
		<smartFormDocuments>
			<smartFormDocument>
				<documentNativeId>1</documentNativeId>
				<documentUUID>${DOCUMENTIDENTIFIER_IDENTITY}</documentUUID>
				<sourceName>SOAPUI</sourceName>
				<templateVersion>1.1</templateVersion>
				<documentStartDate>
					<literal>${DOCUMENT_START_DT}</literal>
				</documentStartDate>
				<documentEndDate>
					<literal>${DOCUMENT_END_DT}</literal>
				</documentEndDate>
				<patient>
					<identifier>
						<identity>${PATIENT_IDENTITY}</identity>
						<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
						<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${PATIENT_NAME_PREFIX}</prefix>
						<given>${PATIENT_NAME_GIVEN}</given>
						<middle>${PATIENT_NAME_MIDDLE}</middle>
						<family>${PATIENT_NAME_FAMILY}</family>
						<suffix>${PATIENT_NAME_SUFFIX}</suffix>
						<title>${PATIENT_NAME_TITLE}</title>
					</name>
				</patient>
				<provider>
					<identifier>
						<identity>${APRV_BY_PERSON_IDENTITY}</identity>
						<assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
						<assigningAuthority>${APRV_BY_PERSON_ASGNING_AUTH}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${APRV_BY_NAME_PREFIX}</prefix>
						<given>${APRV_BY_NAME_GIVEN}</given>
						<middle>${APRV_BY_NAME_MIDDLE}</middle>
						<family>${APRV_BY_NAME_FAMILY}</family>
						<suffix>${APRV_BY_NAME_SUFFIX}</suffix>
						<title>${APRV_BY_NAME_TITLE}</title>
					</name>
				</provider>
	               <facility>
					<identity>${FACILITY_IDENTITY}</identity>
					<name>${FACILITY_NAME}</name>
					<assigningAuthority>${FACILITY_ASSIGNING_AUTHORITY}</assigningAuthority>
				</facility>
				<assertions>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY1}</assertionUUID>
						<seqInDoc>1</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY2}</assertionUUID>
						<seqInDoc>0</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
				</assertions>
			</smartFormDocument>
		</smartFormDocuments>
	</patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="XPath Match"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion type="XPath Match" name="No Errors"><con:configuration><path>count(//errorSection/*)</path><content>0</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data - Duplicate Document ID"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data - Duplicate Document ID" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.support.AbstractHttpRequest@follow-redirects">true</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<templateId>SmartFormCreate1</templateId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME}</clientRequestInitiationTime>
	<patient>
		<smartFormDocuments>
			<smartFormDocument>
				<documentNativeId>1</documentNativeId>
				<documentUUID>${DOCUMENTIDENTIFIER_IDENTITY}</documentUUID>
				<sourceName>SOAPUI</sourceName>
				<templateVersion>1.1</templateVersion>
				<documentStartDate>
					<literal>${DOCUMENT_START_DT}</literal>
				</documentStartDate>
				<documentEndDate>
					<literal>${DOCUMENT_END_DT}</literal>
				</documentEndDate>
				<patient>
					<identifier>
						<identity>${PATIENT_IDENTITY}</identity>
						<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
						<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${PATIENT_NAME_PREFIX}</prefix>
						<given>${PATIENT_NAME_GIVEN}</given>
						<middle>${PATIENT_NAME_MIDDLE}</middle>
						<family>${PATIENT_NAME_FAMILY}</family>
						<suffix>${PATIENT_NAME_SUFFIX}</suffix>
						<title>${PATIENT_NAME_TITLE}</title>
					</name>
				</patient>
				<provider>
					<identifier>
						<identity>${APRV_BY_PERSON_IDENTITY}</identity>
						<assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
						<assigningAuthority>${APRV_BY_PERSON_ASGNING_AUTH}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${APRV_BY_NAME_PREFIX}</prefix>
						<given>${APRV_BY_NAME_GIVEN}</given>
						<middle>${APRV_BY_NAME_MIDDLE}</middle>
						<family>${APRV_BY_NAME_FAMILY}</family>
						<suffix>${APRV_BY_NAME_SUFFIX}</suffix>
						<title>${APRV_BY_NAME_TITLE}</title>
					</name>
				</provider>
	               <facility>
					<identity>${FACILITY_IDENTITY}</identity>
					<name>${FACILITY_NAME}</name>
					<assigningAuthority>${FACILITY_ASSIGNING_AUTHORITY}</assigningAuthority>
				</facility>
				<assertions>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY1}</assertionUUID>
						<seqInDoc>1</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY2}</assertionUUID>
						<seqInDoc>0</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
				</assertions>
			</smartFormDocument>
		</smartFormDocuments>
	</patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="XPath Match"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains"><con:configuration><token>SMRTFRMD_DOCUUID_UNQ_I) violated</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="SmartFormCreateDuplicateAssertionUUID" searchProperties="true" id="d0d95644-43c2-4da6-9d7f-3be236cd132f"><con:settings/><con:testStep type="groovy" name="Setup Test Data"><con:settings/><con:config><script>import java.util.UUID;  
import org.apache.commons.lang.time.DateFormatUtils;
context.CLIENT_REQUEST_INIT_TIME = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.REQUEST_ID = UUID.randomUUID().toString(); 
context.DOCUMENTIDENTIFIER_IDENTITY1 = UUID.randomUUID().toString(); 
context.DOCUMENTIDENTIFIER_IDENTITY2 = UUID.randomUUID().toString(); 
context.DOCUMENT_NATIVE_ID = new Random().nextInt(9999+1); 

context.ASSERTION_IDENTITY1 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY2 = UUID.randomUUID().toString(); 

context.DOCUMENT_START_DT = '20121231170000-0700'; 
context.DOCUMENT_END_DT = '20121231170000-0700'; 

context.ASSERTION_START_DT = '20121231170000-0700'; 
context.ASSERTION_END_DT = '20121231170000-0700'; 

context.APRV_BY_NAME_FAMILY = 'FamilyName';
context.APRV_BY_NAME_GIVEN = 'Given';
context.APRV_BY_NAME_MIDDLE = 'MiddleName';
context.APRV_BY_NAME_PREFIX = 'Prefix';
context.APRV_BY_NAME_SUFFIX = 'Suffix';
context.APRV_BY_NAME_TITLE = 'Title';
context.APRV_BY_PERSON_ASGNING_AUTH = 'USVHA';
context.APRV_BY_PERSON_ASGNING_FCLT = 'DefaultAssigningFacility';
context.APRV_BY_PERSON_IDENTITY = 'test_AUTHORID_1003';
context.APRV_BY_PRACTITIONER_COMMENTS = 'Approved By Comment';
context.APRV_BY_PRACTITIONER_ID_S = 'IdSourceTable';
context.APRV_BY_PRACTITIONER_DT = '20120501162517-0600';
context.APRV_BY_PRACTITIONER_DT_UTC = ''; //set by system
context.FACILITY_ASSIGNING_AUTHORITY = 'AssigningAuthNamespaceId';
context.FACILITY_IDENTITY = 'OrganizationId';
context.FACILITY_NAME = 'OrganizationName';
context.INITIATING_SYSTEM = 'InitiatingSystem';
context.MESSAGE_INSERTION_TIME = ''; //entered by system? 5/10/2012 2:28:41.116285 PM
context.PATIENT_ASSIGNING_AUTHORITY = 'USVHA';
context.PATIENT_ASSIGNING_FACILITY = '402';
context.PATIENT_IDENTITY = 'test_10004';
context.PATIENT_NAME_FAMILY = 'FamilyName';
context.PATIENT_NAME_GIVEN = 'Given';
context.PATIENT_NAME_MIDDLE = 'MiddleName';
context.PATIENT_NAME_PREFIX = 'Prefix';
context.PATIENT_NAME_SUFFIX = 'Suffix';
context.PATIENT_NAME_TITLE = 'Title';
context.SMART_FORM_DOC_ID = ''; //DB Primary Key?
context.RECORDIDENTIFIER_IDENTITY = null;
context.RECORD_VERSION = 3;
</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data - Valid"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data - Valid" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.support.AbstractHttpRequest@follow-redirects">true</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<templateId>SmartFormCreate1</templateId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME}</clientRequestInitiationTime>
	<patient>
		<smartFormDocuments>
			<smartFormDocument>
				<documentNativeId>1</documentNativeId>
				<documentUUID>${DOCUMENTIDENTIFIER_IDENTITY1}</documentUUID>
				<sourceName>SOAPUI</sourceName>
				<templateVersion>1.1</templateVersion>
				<documentStartDate>
					<literal>${DOCUMENT_START_DT}</literal>
				</documentStartDate>
				<documentEndDate>
					<literal>${DOCUMENT_END_DT}</literal>
				</documentEndDate>
				<patient>
					<identifier>
						<identity>${PATIENT_IDENTITY}</identity>
						<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
						<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${PATIENT_NAME_PREFIX}</prefix>
						<given>${PATIENT_NAME_GIVEN}</given>
						<middle>${PATIENT_NAME_MIDDLE}</middle>
						<family>${PATIENT_NAME_FAMILY}</family>
						<suffix>${PATIENT_NAME_SUFFIX}</suffix>
						<title>${PATIENT_NAME_TITLE}</title>
					</name>
				</patient>
				<provider>
					<identifier>
						<identity>${APRV_BY_PERSON_IDENTITY}</identity>
						<assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
						<assigningAuthority>${APRV_BY_PERSON_ASGNING_AUTH}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${APRV_BY_NAME_PREFIX}</prefix>
						<given>${APRV_BY_NAME_GIVEN}</given>
						<middle>${APRV_BY_NAME_MIDDLE}</middle>
						<family>${APRV_BY_NAME_FAMILY}</family>
						<suffix>${APRV_BY_NAME_SUFFIX}</suffix>
						<title>${APRV_BY_NAME_TITLE}</title>
					</name>
				</provider>
	               <facility>
					<identity>${FACILITY_IDENTITY}</identity>
					<name>${FACILITY_NAME}</name>
					<assigningAuthority>${FACILITY_ASSIGNING_AUTHORITY}</assigningAuthority>
				</facility>
				<assertions>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY1}</assertionUUID>
						<seqInDoc>1</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY2}</assertionUUID>
						<seqInDoc>0</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
				</assertions>
			</smartFormDocument>
		</smartFormDocuments>
	</patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="XPath Match"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion type="XPath Match" name="No Errors"><con:configuration><path>count(//errorSection/*)</path><content>0</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data - Duplicate Document ID"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data - Duplicate Document ID" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.support.AbstractHttpRequest@follow-redirects">true</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<templateId>SmartFormCreate1</templateId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME}</clientRequestInitiationTime>
	<patient>
		<smartFormDocuments>
			<smartFormDocument>
				<documentNativeId>1</documentNativeId>
				<documentUUID>${DOCUMENTIDENTIFIER_IDENTITY2}</documentUUID>
				<sourceName>SOAPUI</sourceName>
				<templateVersion>1.1</templateVersion>
				<documentStartDate>
					<literal>${DOCUMENT_START_DT}</literal>
				</documentStartDate>
				<documentEndDate>
					<literal>${DOCUMENT_END_DT}</literal>
				</documentEndDate>
				<patient>
					<identifier>
						<identity>${PATIENT_IDENTITY}</identity>
						<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
						<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${PATIENT_NAME_PREFIX}</prefix>
						<given>${PATIENT_NAME_GIVEN}</given>
						<middle>${PATIENT_NAME_MIDDLE}</middle>
						<family>${PATIENT_NAME_FAMILY}</family>
						<suffix>${PATIENT_NAME_SUFFIX}</suffix>
						<title>${PATIENT_NAME_TITLE}</title>
					</name>
				</patient>
				<provider>
					<identifier>
						<identity>${APRV_BY_PERSON_IDENTITY}</identity>
						<assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
						<assigningAuthority>${APRV_BY_PERSON_ASGNING_AUTH}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${APRV_BY_NAME_PREFIX}</prefix>
						<given>${APRV_BY_NAME_GIVEN}</given>
						<middle>${APRV_BY_NAME_MIDDLE}</middle>
						<family>${APRV_BY_NAME_FAMILY}</family>
						<suffix>${APRV_BY_NAME_SUFFIX}</suffix>
						<title>${APRV_BY_NAME_TITLE}</title>
					</name>
				</provider>
	               <facility>
					<identity>${FACILITY_IDENTITY}</identity>
					<name>${FACILITY_NAME}</name>
					<assigningAuthority>${FACILITY_ASSIGNING_AUTHORITY}</assigningAuthority>
				</facility>
				<assertions>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY1}</assertionUUID>
						<seqInDoc>1</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY2}</assertionUUID>
						<seqInDoc>0</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
				</assertions>
			</smartFormDocument>
		</smartFormDocuments>
	</patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="XPath Match"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains"><con:configuration><token>ASSERT_ASSERTIONUUID_UNQ_I</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="SmartFormCreateValidDuplicateSeqInDoc" searchProperties="true" id="f02e4e05-d8d7-4700-bd45-72f70749e5f5"><con:settings/><con:testStep type="groovy" name="Setup Test Data"><con:settings/><con:config><script>import java.util.UUID;  
import org.apache.commons.lang.time.DateFormatUtils;
context.CLIENT_REQUEST_INIT_TIME = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.REQUEST_ID = UUID.randomUUID().toString(); 
context.DOCUMENTIDENTIFIER_IDENTITY = UUID.randomUUID().toString(); 
context.DOCUMENT_NATIVE_ID = new Random().nextInt(9999+1); 

context.ASSERTION_IDENTITY1 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY2 = UUID.randomUUID().toString(); 

context.DOCUMENT_START_DT = '20121231170000-0700'; 
context.DOCUMENT_END_DT = '20121231170000-0700'; 

context.ASSERTION_START_DT = '20121231170000-0700'; 
context.ASSERTION_END_DT = '20121231170000-0700'; 

context.APRV_BY_NAME_FAMILY = 'FamilyName';
context.APRV_BY_NAME_GIVEN = 'Given';
context.APRV_BY_NAME_MIDDLE = 'MiddleName';
context.APRV_BY_NAME_PREFIX = 'Prefix';
context.APRV_BY_NAME_SUFFIX = 'Suffix';
context.APRV_BY_NAME_TITLE = 'Title';
context.APRV_BY_PERSON_ASGNING_AUTH = 'USVHA';
context.APRV_BY_PERSON_ASGNING_FCLT = 'DefaultAssigningFacility';
context.APRV_BY_PERSON_IDENTITY = 'test_AUTHORID_1003';
context.APRV_BY_PRACTITIONER_COMMENTS = 'Approved By Comment';
context.APRV_BY_PRACTITIONER_ID_S = 'IdSourceTable';
context.APRV_BY_PRACTITIONER_DT = '20120501162517-0600';
context.APRV_BY_PRACTITIONER_DT_UTC = ''; //set by system
context.FACILITY_ASSIGNING_AUTHORITY = 'AssigningAuthNamespaceId';
context.FACILITY_IDENTITY = 'OrganizationId';
context.FACILITY_NAME = 'OrganizationName';
context.INITIATING_SYSTEM = 'InitiatingSystem';
context.MESSAGE_INSERTION_TIME = ''; //entered by system? 5/10/2012 2:28:41.116285 PM
context.PATIENT_ASSIGNING_AUTHORITY = 'USVHA';
context.PATIENT_ASSIGNING_FACILITY = '402';
context.PATIENT_IDENTITY = 'test_10004';
context.PATIENT_NAME_FAMILY = 'FamilyName';
context.PATIENT_NAME_GIVEN = 'Given';
context.PATIENT_NAME_MIDDLE = 'MiddleName';
context.PATIENT_NAME_PREFIX = 'Prefix';
context.PATIENT_NAME_SUFFIX = 'Suffix';
context.PATIENT_NAME_TITLE = 'Title';
context.SMART_FORM_DOC_ID = ''; //DB Primary Key?
context.RECORDIDENTIFIER_IDENTITY = null;
context.RECORD_VERSION = 3;
</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data - Valid"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data - Valid" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.support.AbstractHttpRequest@follow-redirects">true</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<templateId>SmartFormCreate1</templateId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME}</clientRequestInitiationTime>
	<patient>
		<smartFormDocuments>
			<smartFormDocument>
				<documentNativeId>1</documentNativeId>
				<documentUUID>${DOCUMENTIDENTIFIER_IDENTITY}</documentUUID>
				<sourceName>SOAPUI</sourceName>
				<templateVersion>1.1</templateVersion>
				<documentStartDate>
					<literal>${DOCUMENT_START_DT}</literal>
				</documentStartDate>
				<documentEndDate>
					<literal>${DOCUMENT_END_DT}</literal>
				</documentEndDate>
				<patient>
					<identifier>
						<identity>${PATIENT_IDENTITY}</identity>
						<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
						<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${PATIENT_NAME_PREFIX}</prefix>
						<given>${PATIENT_NAME_GIVEN}</given>
						<middle>${PATIENT_NAME_MIDDLE}</middle>
						<family>${PATIENT_NAME_FAMILY}</family>
						<suffix>${PATIENT_NAME_SUFFIX}</suffix>
						<title>${PATIENT_NAME_TITLE}</title>
					</name>
				</patient>
				<provider>
					<identifier>
						<identity>${APRV_BY_PERSON_IDENTITY}</identity>
						<assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
						<assigningAuthority>${APRV_BY_PERSON_ASGNING_AUTH}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${APRV_BY_NAME_PREFIX}</prefix>
						<given>${APRV_BY_NAME_GIVEN}</given>
						<middle>${APRV_BY_NAME_MIDDLE}</middle>
						<family>${APRV_BY_NAME_FAMILY}</family>
						<suffix>${APRV_BY_NAME_SUFFIX}</suffix>
						<title>${APRV_BY_NAME_TITLE}</title>
					</name>
				</provider>
	               <facility>
					<identity>${FACILITY_IDENTITY}</identity>
					<name>${FACILITY_NAME}</name>
					<assigningAuthority>${FACILITY_ASSIGNING_AUTHORITY}</assigningAuthority>
				</facility>
				<assertions>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY1}</assertionUUID>
						<seqInDoc>0</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY2}</assertionUUID>
						<seqInDoc>0</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
				</assertions>
			</smartFormDocument>
		</smartFormDocuments>
	</patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="XPath Match"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains"><con:configuration><token>ASSERT_DOC_SEQINDOC_UNQ_I</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="SmartFormCreateInvalidSeqId" searchProperties="true" id="67f4d099-8511-4abe-85bd-ae5aff04f92b"><con:settings/><con:testStep type="groovy" name="Setup Test Data"><con:settings/><con:config><script>import java.util.UUID;  
import org.apache.commons.lang.time.DateFormatUtils;
context.CLIENT_REQUEST_INIT_TIME = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.REQUEST_ID = UUID.randomUUID().toString(); 
context.DOCUMENTIDENTIFIER_IDENTITY = UUID.randomUUID().toString(); 
context.DOCUMENT_NATIVE_ID = new Random().nextInt(9999+1); 

context.ASSERTION_IDENTITY1 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY2 = UUID.randomUUID().toString(); 

context.DOCUMENT_START_DT = '20121231170000-0700'; 
context.DOCUMENT_END_DT = '20121231170000-0700'; 

context.ASSERTION_START_DT = '20121231170000-0700'; 
context.ASSERTION_END_DT = '20121231170000-0700'; 

context.APRV_BY_NAME_FAMILY = 'FamilyName';
context.APRV_BY_NAME_GIVEN = 'Given';
context.APRV_BY_NAME_MIDDLE = 'MiddleName';
context.APRV_BY_NAME_PREFIX = 'Prefix';
context.APRV_BY_NAME_SUFFIX = 'Suffix';
context.APRV_BY_NAME_TITLE = 'Title';
context.APRV_BY_PERSON_ASGNING_AUTH = 'USVHA';
context.APRV_BY_PERSON_ASGNING_FCLT = 'DefaultAssigningFacility';
context.APRV_BY_PERSON_IDENTITY = 'test_AUTHORID_1003';
context.APRV_BY_PRACTITIONER_COMMENTS = 'Approved By Comment';
context.APRV_BY_PRACTITIONER_ID_S = 'IdSourceTable';
context.APRV_BY_PRACTITIONER_DT = '20120501162517-0600';
context.APRV_BY_PRACTITIONER_DT_UTC = ''; //set by system
context.FACILITY_ASSIGNING_AUTHORITY = 'AssigningAuthNamespaceId';
context.FACILITY_IDENTITY = 'OrganizationId';
context.FACILITY_NAME = 'OrganizationName';
context.INITIATING_SYSTEM = 'InitiatingSystem';
context.MESSAGE_INSERTION_TIME = ''; //entered by system? 5/10/2012 2:28:41.116285 PM
context.PATIENT_ASSIGNING_AUTHORITY = 'USVHA';
context.PATIENT_ASSIGNING_FACILITY = '402';
context.PATIENT_IDENTITY = 'test_10004';
context.PATIENT_NAME_FAMILY = 'FamilyName';
context.PATIENT_NAME_GIVEN = 'Given';
context.PATIENT_NAME_MIDDLE = 'MiddleName';
context.PATIENT_NAME_PREFIX = 'Prefix';
context.PATIENT_NAME_SUFFIX = 'Suffix';
context.PATIENT_NAME_TITLE = 'Title';
context.SMART_FORM_DOC_ID = ''; //DB Primary Key?
context.RECORDIDENTIFIER_IDENTITY = null;
context.RECORD_VERSION = 3;
</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data - Invalid Sequence ID"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data - Invalid Sequence ID" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.support.AbstractHttpRequest@follow-redirects">true</con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<templateId>SmartFormCreate1</templateId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME}</clientRequestInitiationTime>
	<patient>
		<smartFormDocuments>
			<smartFormDocument>
				<documentNativeId>1</documentNativeId>
				<documentUUID>${DOCUMENTIDENTIFIER_IDENTITY}</documentUUID>
				<sourceName>SOAPUI</sourceName>
				<templateVersion>1.1</templateVersion>
				<documentStartDate>
					<literal>${DOCUMENT_START_DT}</literal>
				</documentStartDate>
				<documentEndDate>
					<literal>${DOCUMENT_END_DT}</literal>
				</documentEndDate>
				<patient>
					<identifier>
						<identity>${PATIENT_IDENTITY}</identity>
						<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
						<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${PATIENT_NAME_PREFIX}</prefix>
						<given>${PATIENT_NAME_GIVEN}</given>
						<middle>${PATIENT_NAME_MIDDLE}</middle>
						<family>${PATIENT_NAME_FAMILY}</family>
						<suffix>${PATIENT_NAME_SUFFIX}</suffix>
						<title>${PATIENT_NAME_TITLE}</title>
					</name>
				</patient>
				<provider>
					<identifier>
						<identity>${APRV_BY_PERSON_IDENTITY}</identity>
						<assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
						<assigningAuthority>${APRV_BY_PERSON_ASGNING_AUTH}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${APRV_BY_NAME_PREFIX}</prefix>
						<given>${APRV_BY_NAME_GIVEN}</given>
						<middle>${APRV_BY_NAME_MIDDLE}</middle>
						<family>${APRV_BY_NAME_FAMILY}</family>
						<suffix>${APRV_BY_NAME_SUFFIX}</suffix>
						<title>${APRV_BY_NAME_TITLE}</title>
					</name>
				</provider>
	               <facility>
					<identity>${FACILITY_IDENTITY}</identity>
					<name>${FACILITY_NAME}</name>
					<assigningAuthority>${FACILITY_ASSIGNING_AUTHORITY}</assigningAuthority>
				</facility>
				<assertions>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY1}</assertionUUID>
						<seqInDoc>1</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY2}</assertionUUID>
						<seqInDoc>3243888888</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
				</assertions>
			</smartFormDocument>
		</smartFormDocuments>
	</patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="XPath Match"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains"><con:configuration><token>Create Error:  For input string: "3243888888"</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:testSuite name="Smart Forms Read Test Suite"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Smart Form Read Test" searchProperties="true" id="ff3e164b-d274-4417-a9bd-5263f156146f"><con:settings/><con:testStep type="groovy" name="Setup Test Data"><con:settings/><con:config><script><![CDATA[import java.util.UUID;  
import org.apache.commons.lang.time.DateFormatUtils;
import groovy.sql.Sql;

def dbUrl = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "DB_URL" );
def dbUser = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "DB_USER" );
def dbPassword = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "DB_PASSWORD" );

def db = [url:dbUrl,
          user:dbUser,
          password:dbPassword,
          driver:'oracle.jdbc.OracleDriver']
          
def sql = Sql.newInstance(db.url, db.user, db.password, db.driver);
row = sql.firstRow("SELECT SMART_FORM_DOC_SEQ_ID.nextval as DOC_ID_SEQ1 from dual");
context.DOC_ID_SEQ1= row.DOC_ID_SEQ1;

row = sql.firstRow("SELECT SMART_FORM_DOC_SEQ_ID.nextval as DOC_ID_SEQ2 from dual");
context.DOC_ID_SEQ2= row.DOC_ID_SEQ2;

context.FILTER_REQUEST_ID = UUID.randomUUID().toString();

context.CLIENT_REQUEST_INIT_TIME = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.REQUEST_ID = UUID.randomUUID().toString(); 
context.DOCUMENTIDENTIFIER_IDENTITY = UUID.randomUUID().toString(); 

context.ASSERTION_IDENTITY1 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY2 = UUID.randomUUID().toString(); 

context.ASSERTION_IDENTITY3 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY4 = UUID.randomUUID().toString();

context.DOCUMENT_START_DT = '20121231170000-0700'; 
context.DOCUMENT_END_DT = '20121231170000-0700'; 

context.ASSERTION_START_DT2 = '20060131170000-0700'; 
context.ASSERTION_END_DT2 = '20060131170000-0700'; 

context.CLIENT_REQUEST_INIT_TIME2 = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.REQUEST_ID2 = UUID.randomUUID().toString(); 
context.DOCUMENTIDENTIFIER_IDENTITY2 = UUID.randomUUID().toString(); 

context.ASSERTION_IDENTITY1 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY2 = UUID.randomUUID().toString(); 

context.DOCUMENT_START_DT2 = '20111231170000-0700'; 
context.DOCUMENT_END_DT2 = '20111231170000-0700'; 

context.ASSERTION_START_DT = '20111231170000-0700'; 
context.ASSERTION_END_DT = '20111231170000-0700'; 

context.APPROVED_FLAG = 'APPROVED';
context.APRV_BY_NAME_FAMILY = 'FamilyName';
context.APRV_BY_NAME_GIVEN = 'Given';
context.APRV_BY_NAME_MIDDLE = 'MiddleName';
context.APRV_BY_NAME_PREFIX = 'Prefix';
context.APRV_BY_NAME_SUFFIX = 'Suffix';
context.APRV_BY_NAME_TITLE = 'Title';
context.APRV_BY_PERSON_ASGNING_AUTH = 'USVHA';
context.APRV_BY_PERSON_ASGNING_FCLT = 'DefaultAssigningFacility';
context.APRV_BY_PERSON_IDENTITY = 'test_AUTHORID_1003';
context.APRV_BY_PRACTITIONER_COMMENTS = 'Approved By Comment';
context.APRV_BY_PRACTITIONER_ID_S = 'IdSourceTable';
context.APRV_BY_PRACTITIONER_DT = '20120501162517-0600';
context.APRV_BY_PRACTITIONER_DT_UTC = ''; //set by system
context.AUTH_NAME_FAMILY = 'FamilyName';
context.AUTH_NAME_GIVEN = 'Given';
context.AUTH_NAME_MIDDLE = 'MiddleName';
context.AUTH_NAME_PREFIX = 'Prefix';
context.AUTH_NAME_SUFFIX = 'Suffix';
context.AUTH_NAME_TITLE = 'Title';
context.AUTH_PERSON_ASGNING_AUTHORITY = 'USVHA';
context.AUTH_PERSON_ASGNING_FACILITY = 'DefaultAssigningFacility';
context.AUTH_PERSON_IDENTITY = 'test_AUTHORID_1003';
context.AUTH_PRACTITIONER_COMMENTS = 'Author Comment';
context.AUTH_PRACTITIONER_ID_SRC_TBL = 'IdSourceTable';
context.AUTH_PRACTITIONER_DT = '20120501162517-0600';
context.AUTH_PRACTITIONER_DT_UTC = ''; //set by system
context.DATE_MODIFIED__DT = null; 
context.DATE_MODIFIED__DT_UTC = null; 
context.DETAIL_XML = '<gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease>  <id>7553</id>  <version>0</version>  <dateCreated class="sql-timestamp">2012-01-10 09:45:51.397</dateCreated>  <dateModified class="sql-timestamp">2012-01-10 09:45:51.397</dateModified>  <formType>FORM_TYPE_DBQ_IHD</formType>  <vetSsn>941288701</vetSsn>  <documentStatusType>COMPLETE</documentStatusType>  <documentChannelType>ONLINE</documentChannelType>  <formFileNetStatus>    <id>5760</id>    <version>1</version>    <dateCreated class="sql-timestamp">2012-01-10 09:45:51.437</dateCreated>    <dateModified>2012-01-10 09:45:51.507 EST</dateModified>    <formFnStatusType>PROCESSOR_PROCESSING</formFnStatusType>    <formEntity class="gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease" reference="../.."/>  </formFileNetStatus>  <webFormType>IHD_DBQ</webFormType>  <veteranFirstName>Test</veteranFirstName>  <veteranLastName>Test</veteranLastName>  <physicianFirstName>Dr</physicianFirstName>  <physicianLastName>Test</physicianLastName>  <medicalLicenseNumber>12</medicalLicenseNumber>  <country>US</country>  <addressLine1>Test</addressLine1>  <addressLine2></addressLine2>  <addressLine3></addressLine3>  <city>Test</city>  <state>DELAWARE</state>  <zip>12345</zip>  <physicianPhoneNumber>1231221312</physicianPhoneNumber>  <privacyActAck>true</privacyActAck>  <physicianSignature>true</physicianSignature>  <impactsAbilityToWork>false</impactsAbilityToWork>  <remarks></remarks>  <dateSigned class="sql-timestamp">2012-01-10 09:45:51.397</dateSigned>  <diagnoses class="org.hibernate.collection.PersistentBag">    <initialized>true</initialized>    <owner class="gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease" reference="../.."/>    <cachedSize>-1</cachedSize>    <role>gov.va.agentorange.fasttrack.model.dbq.DbqFormEntity.diagnoses</role>    <key class="long">7553</key>    <dirty>false</dirty>    <storedSnapshot class="list"/>    <bag/>  </diagnoses>  <medications class="org.hibernate.collection.PersistentBag">    <initialized>true</initialized>    <owner class="gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease" reference="../.."/>    <cachedSize>-1</cachedSize>    <role>gov.va.agentorange.fasttrack.model.dbq.DbqFormEntity.medications</role>    <key class="long">7553</key>    <dirty>false</dirty>    <storedSnapshot class="list"/>    <bag/>  </medications>  <diagnosticTests class="org.hibernate.collection.PersistentBag">    <initialized>true</initialized>    <owner class="gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease" reference="../.."/>    <cachedSize>-1</cachedSize>    <role>gov.va.agentorange.fasttrack.model.dbq.DbqFormEntity.diagnosticTests</role>    <key class="long">7553</key>    <dirty>false</dirty>    <storedSnapshot class="list"/>    <bag/>  </diagnosticTests>  <hasIschemicHeartDisease>true</hasIschemicHeartDisease>  <takesContinuousMedication>false</takesContinuousMedication>  <hasPercutaneousCoronaryIntervention>false</hasPercutaneousCoronaryIntervention>  <hasMyocardialInfarction>false</hasMyocardialInfarction>  <hasCoronaryBypassSurgery>false</hasCoronaryBypassSurgery>  <hasHeartTransplant>false</hasHeartTransplant>  <hasImplantedCardiacPacemaker>false</hasImplantedCardiacPacemaker>  <hasImplantedAicd>false</hasImplantedAicd>  <doesVeteranHaveCHF>false</doesVeteranHaveCHF>  <hasExerciseTestBeenConducted>false</hasExerciseTestBeenConducted>  <metsLevel>metsLevel13</metsLevel>  <hasDyspnea>false</hasDyspnea>  <hasFatigue>false</hasFatigue>  <hasAngina>false</hasAngina>  <hasDizziness>false</hasDizziness>  <hasSyncope>true</hasSyncope>  <isEvidenceOfHypertrophyOrDil>false</isEvidenceOfHypertrophyOrDil>  <hasEkg>false</hasEkg>  <hasChestXRay>false</hasChestXRay>  <hasEchocardiogram>false</hasEchocardiogram>  <hasOtherTest>false</hasOtherTest>  <hasLVEF>false</hasLVEF></gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease>';
context.DOCUMENTIDENTIFIER_NAMESPACEID = 'DefaultAssigningFacility';
context.DOCUMENTIDENTIFIER_UNIVERSALID = 'UID_13359111174322';
context.DOCUMENTIDENTIFIER_UNIVERSTYP = 'universalIdType';
context.DOCUMENT_TYPE = 'Document Type';
context.FACILITY_ASSIGNING_AUTHORITY = 'AssigningAuthNamespaceId';
context.FACILITY_IDENTITY = 'OrganizationId';
context.FACILITY_NAME = 'OrganizationName';
context.INITIATING_SYSTEM = 'InitiatingSystem';
context.MESSAGE_INSERTION_TIME = ''; //entered by system? 5/10/2012 2:28:41.116285 PM
context.PATIENT_ASSIGNING_AUTHORITY = 'USVHA';
context.PATIENT_ASSIGNING_FACILITY = '200HD';
context.PATIENT_IDENTITY = UUID.randomUUID().toString();
context.PATIENT_NAME_FAMILY = 'FamilyName';
context.PATIENT_NAME_GIVEN = 'Given';
context.PATIENT_NAME_MIDDLE = 'MiddleName';
context.PATIENT_NAME_PREFIX = 'Prefix';
context.PATIENT_NAME_SUFFIX = 'Suffix';
context.PATIENT_NAME_TITLE = 'Title';
context.QUESTIONNAIRE_RESULT_ID = ''; //DB Primary Key?
context.RECORDIDENTIFIER_IDENTITY = null;
context.RECORDIDENTIFIER_NAMESPACEID = null;
context.RECORDIDENTIFIER_UNIVERSALID = null;
context.RECORDIDENTIFIER_UNIVERSTYP = null;
context.RECORD_UPDATE_DT = '19691231170000-0700'; //Updated by system?
context.RECORD_UPDATE_DT_UTC = ''; //set by system
context.RECORD_VERSION = 3;
//log.info("REQUEST_ID: " + context.REQUEST_ID);;
//log.info("RECORDIDENTIFIER_IDENTITY: " + context.REQUEST_ID);  ]]></script></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data - Valid1"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data - Valid1" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <templateId>SmartFormCreate1</templateId>
   <clientName>SOAP UI</clientName>
   <clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME}</clientRequestInitiationTime>
   <patient>
      <smartFormDocuments>
         <smartFormDocument>
            <documentNativeId>${DOC_ID_SEQ1}</documentNativeId>
            <documentUUID>${DOCUMENTIDENTIFIER_IDENTITY}</documentUUID>
            <sourceName>SOAPUI</sourceName>
		  <templateVersion>1.1</templateVersion>
		  <documentStartDate>
               <literal>${DOCUMENT_START_DT}</literal>
            </documentStartDate>
            <documentEndDate>
               <literal>${DOCUMENT_END_DT}</literal>
            </documentEndDate>
            <patient>
               <identifier>
                  <identity>${PATIENT_IDENTITY}</identity>
                  <assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
                  <assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
               </identifier>
               <name>
                  <prefix>${PATIENT_NAME_PREFIX}</prefix>
                  <given>${PATIENT_NAME_GIVEN}</given>
                  <middle>${PATIENT_NAME_MIDDLE}</middle>
                  <family>${PATIENT_NAME_FAMILY}</family>
                  <suffix>${PATIENT_NAME_SUFFIX}</suffix>
                  <title>${PATIENT_NAME_TITLE}</title>
               </name>
            </patient>
            <provider>
               <identifier>
                  <identity>${APRV_BY_PERSON_IDENTITY}</identity>
                  <assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
                  <assigningAuthority>${APRV_BY_PRACTITIONER_ID_S}</assigningAuthority>
               </identifier>
               <name>
                  <prefix>${APRV_BY_NAME_PREFIX}</prefix>
                  <given>${APRV_BY_NAME_GIVEN}</given>
                  <middle>${APRV_BY_NAME_MIDDLE}</middle>
                  <family>${APRV_BY_NAME_FAMILY}</family>
                  <suffix>${APRV_BY_NAME_SUFFIX}</suffix>
                  <title>${APRV_BY_NAME_TITLE}</title>
               </name>
            </provider>
            <facility>
               <identity>${FACILITY_IDENTITY}</identity>
               <name>${FACILITY_NAME}</name>
               <assigningAuthority>${FACILITY_ASSIGNING_AUTHORITY}</assigningAuthority>
            </facility>
            <assertions>
               <assertion>
                  <assertionUUID>${ASSERTION_IDENTITY1}</assertionUUID>
                  <seqInDoc>1</seqInDoc>
                  <assertionStartDate>
                     <literal>${ASSERTION_START_DT}</literal>
                  </assertionStartDate>
                  <assertionEndDate>
                     <literal>${ASSERTION_END_DT}</literal>
                  </assertionEndDate>
                  <sectionENID>0</sectionENID>
                  <discernibleENID>0</discernibleENID>
                  <qualifierENID>0</qualifierENID>
                  <valueENID>0</valueENID>
               </assertion>
               <assertion>
                  <assertionUUID>${ASSERTION_IDENTITY2}</assertionUUID>
                  <seqInDoc>0</seqInDoc>
                  <assertionStartDate>
                     <literal>${ASSERTION_START_DT2}</literal>
                  </assertionStartDate>
                  <assertionEndDate>
                     <literal>${ASSERTION_END_DT2}</literal>
                  </assertionEndDate>
                  <sectionENID>0</sectionENID>
                  <discernibleENID>0</discernibleENID>
                  <qualifierENID>0</qualifierENID>
                  <valueENID>0</valueENID>
               </assertion>
            </assertions>
         </smartFormDocument>
      </smartFormDocuments>
   </patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="Matches Request ID"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data - Valid2"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data - Valid2" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<templateId>SmartFormCreate1</templateId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME2}</clientRequestInitiationTime>
	<patient>
		<smartFormDocuments>
			<smartFormDocument>
				<documentNativeId>${DOC_ID_SEQ2}</documentNativeId>
				<documentUUID>${DOCUMENTIDENTIFIER_IDENTITY2}</documentUUID>
				<sourceName>SOAPUI</sourceName>
		  		<templateVersion>1.1</templateVersion>
		  		<documentStartDate>
					<literal>${DOCUMENT_START_DT2}</literal>
				</documentStartDate>
				<documentEndDate>
					<literal>${DOCUMENT_END_DT2}</literal>
				</documentEndDate>
				<patient>
					<identifier>
						<identity>${PATIENT_IDENTITY}</identity>
						<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
						<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${PATIENT_NAME_PREFIX}</prefix>
						<given>${PATIENT_NAME_GIVEN}</given>
						<middle>${PATIENT_NAME_MIDDLE}</middle>
						<family>${PATIENT_NAME_FAMILY}</family>
						<suffix>${PATIENT_NAME_SUFFIX}</suffix>
						<title>${PATIENT_NAME_TITLE}</title>
					</name>
				</patient>
				<provider>
					<identifier>
						<identity>${APRV_BY_PERSON_IDENTITY}</identity>
						<assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
						<assigningAuthority>${APRV_BY_PRACTITIONER_ID_S}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${APRV_BY_NAME_PREFIX}</prefix>
						<given>${APRV_BY_NAME_GIVEN}</given>
						<middle>${APRV_BY_NAME_MIDDLE}</middle>
						<family>${APRV_BY_NAME_FAMILY}</family>
						<suffix>${APRV_BY_NAME_SUFFIX}</suffix>
						<title>${APRV_BY_NAME_TITLE}</title>
					</name>
				</provider>
	               <facility>
					<identity>${FACILITY_IDENTITY}</identity>
					<name>${FACILITY_NAME}</name>
					<assigningAuthority>${FACILITY_ASSIGNING_AUTHORITY}</assigningAuthority>
				</facility>
				<assertions>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY3}</assertionUUID>
						<seqInDoc>1</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY4}</assertionUUID>
						<seqInDoc>0</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT2}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT2}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
				</assertions>
			</smartFormDocument>
		</smartFormDocuments>
	</patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="Matches Request ID"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" name="Smart Form Read All By National ID - No Records"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read All By National ID - No Records"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_Single_Patient_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_SINGLE_PATIENT_ALL_DATA_FILTER</filterId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>2012-07-18T17:47:12-07:00</clientRequestInitiationTime>
	<patients>
		<NationalId>1008523096V381537</NationalId>
	</patients>
	<entryPointFilter queryName="ID_1">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_SINGLE_PATIENT_ALL_DATA_FILTER</in2>
         <in3>a17281d2-8e31-40a7-a555-a81430e58e2d</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="request" name="Smart Form Read All By Patient"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read All By Patient"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_Single_Patient_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_SINGLE_PATIENT_ALL_DATA_FILTER</filterId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>2012-07-18T17:47:12-07:00</clientRequestInitiationTime>
	<patients>
		<resolvedIdentifiers>
				<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
				<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
				<identity>${PATIENT_IDENTITY}</identity>
		</resolvedIdentifiers>
	</patients>
	<entryPointFilter queryName="ID_1">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_SINGLE_PATIENT_ALL_DATA_FILTER</in2>
         <in3>a17281d2-8e31-40a7-a555-a81430e58e2d</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read All By Patient"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read All By Patient#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

def holder = groovyUtils.getXmlHolder( content ) ;
def recordCount = holder["count(//assertion)"]
assert recordCount == "4"</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read By Patient &amp; Date Range"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read By Patient &amp; Date Range"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_Single_Patient_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_SINGLE_PATIENT_ALL_DATA_FILTER</filterId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>2012-07-18T17:47:12-07:00</clientRequestInitiationTime>
	<patients>
		<resolvedIdentifiers>
				<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
				<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
				<identity>${PATIENT_IDENTITY}</identity>
		</resolvedIdentifiers>
	</patients>
	<entryPointFilter queryName="ID_1">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<startDate>2004-06-01-05:00</startDate>
		<endDate>2011-12-31-05:00</endDate>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_SINGLE_PATIENT_ALL_DATA_FILTER</in2>
         <in3>a17281d2-8e31-40a7-a555-a81430e58e2d</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Patient &amp; Date Range"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read By Patient &amp; Date Range#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

def holder = groovyUtils.getXmlHolder( content ) ;
def recordCount = holder["count(//assertion)"]
assert recordCount == "2"</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read By Patient &amp; Date Range - No Records"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read By Patient &amp; Date Range - No Records"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_Single_Patient_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_SINGLE_PATIENT_ALL_DATA_FILTER</filterId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>2012-07-18T17:47:12-07:00</clientRequestInitiationTime>
	<patients>
		<resolvedIdentifiers>
				<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
				<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
				<identity>${PATIENT_IDENTITY}</identity>
		</resolvedIdentifiers>
	</patients>
	<entryPointFilter queryName="ID_1">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<startDate>2013-06-01-05:00</startDate>
		<endDate>2015-12-31-05:00</endDate>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_SINGLE_PATIENT_ALL_DATA_FILTER</in2>
         <in3>a17281d2-8e31-40a7-a555-a81430e58e2d</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Patient &amp; Date Range - No Records"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read By Patient &amp; Date Range - No Records#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

def holder = groovyUtils.getXmlHolder( content ) ;
def recordCount = holder["count(//assertion)"]
assert recordCount == "0"</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read By Patient &amp; Date Range - Single Record"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read By Patient &amp; Date Range - Single Record"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_Single_Patient_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_SINGLE_PATIENT_ALL_DATA_FILTER</filterId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>2012-07-18T17:47:12-07:00</clientRequestInitiationTime>
	<patients>
		<resolvedIdentifiers>
				<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
				<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
				<identity>${PATIENT_IDENTITY}</identity>
		</resolvedIdentifiers>
	</patients>
	<entryPointFilter queryName="ID_1">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<startDate>2012-06-01-05:00</startDate>
		<endDate>2015-12-31-05:00</endDate>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_SINGLE_PATIENT_ALL_DATA_FILTER</in2>
         <in3>a17281d2-8e31-40a7-a555-a81430e58e2d</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Patient &amp; Date Range - Single Record"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read By Patient &amp; Date Range - Single Record#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

def holder = groovyUtils.getXmlHolder( content ) ;
def recordCount = holder["count(//assertion)"]
assert recordCount == "2"</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read All By Patient &amp; Document Native ID"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read All By Patient &amp; Document Native ID"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_Single_Patient_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_SINGLE_PATIENT_ALL_DATA_FILTER</filterId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>2012-07-18T17:47:12-07:00</clientRequestInitiationTime>
	<patients>
		<resolvedIdentifiers>
				<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
				<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
				<identity>${PATIENT_IDENTITY}</identity>
		</resolvedIdentifiers>
	</patients>
	<entryPointFilter queryName="ID_1">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<otherQueryParameters>
			<documentNativeId>${DOC_ID_SEQ2}</documentNativeId>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_SINGLE_PATIENT_ALL_DATA_FILTER</in2>
         <in3>a17281d2-8e31-40a7-a555-a81430e58e2d</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Patient &amp; Document Native ID"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read All By Patient &amp; Document Native ID#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

def holder = groovyUtils.getXmlHolder( content ) ;
def recordCount = holder["count(//assertion)"]
assert recordCount == "2"
def documentStartDate = holder["//documentStartDate/literal/text()"];
assert documentStartDate == context.DOCUMENT_START_DT2;
def documentEndDate = holder["//documentEndDate/literal/text()"];
assert documentEndDate == context.DOCUMENT_END_DT2;
def assertionStartDate = holder["//assertion[1]/assertionStartDate/literal/text()"];
assert assertionStartDate == context.ASSERTION_START_DT2;
def assertionEndDate = holder["//assertion[1]/assertionEndDate/literal/text()"];
assert assertionEndDate == context.ASSERTION_END_DT2;
def assertionStartDate2 = holder["//assertion[2]/assertionStartDate/literal/text()"];
assert assertionStartDate2 == context.ASSERTION_START_DT;
def assertionEndDate2 = holder["//assertion[2]/assertionEndDate/literal/text()"];
assert assertionEndDate2 == context.ASSERTION_END_DT;


</script></con:config></con:testStep><con:properties><con:property><con:name>CDataSection</con:name><con:value><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<clinicaldata:ClinicalData xmlns:clinicaldata="Clinicaldata"><templateId>DBQListRead1</templateId><requestId>9a3cdb14-effb-411b-8003-83808bd73e57</requestId><patients><patient><requestedResolvedIdentifiers><requestedResolvedIdentifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></requestedResolvedIdentifier></requestedResolvedIdentifiers><resultantIdentifiers><resultantIdentifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></resultantIdentifier></resultantIdentifiers><questionnaireResults><questionnaireResult><patient><identifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><given>Given1</given><middle>MiddleName1</middle><family>FamilyName1</family><suffix>Suffix1</suffix><title>Title1</title></name></patient><documentType>Ischemic_Heart_Disease</documentType><recordIdentifier><identity>102</identity></recordIdentifier><documentIdentifier><identity>8e5a422d-cdcc-4608-9825-bd0e01b0e24b</identity><namespaceId>DefaultAssigningFacility</namespaceId><universalId>UID_13359111174322</universalId><universalIdType>universalIdType</universalIdType></documentIdentifier><initiatingSystem>SOAP UI</initiatingSystem><facilityIdentifier><identity>OrganizationId</identity><name>OrganizationName</name><assigningAuthority>AssigningAuthNamespaceId</assigningAuthority></facilityIdentifier><approvedFlag>APPROVED</approvedFlag><author><comment>Author Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></author><approvedBy><comment>Approved By Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></approvedBy><dateCreated><literal>19991231170000-0700</literal></dateCreated><recordVersion>3</recordVersion></questionnaireResult><questionnaireResult><patient><identifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><given>Given2</given><middle>MiddleName2</middle><family>FamilyName2</family><suffix>Suffix2</suffix><title>Title2</title></name></patient><documentType>Ischemic_Heart_Disease</documentType><recordIdentifier><identity>103</identity></recordIdentifier><documentIdentifier><identity>200c22fd-5c04-4b68-bf04-efa257c64285</identity><namespaceId>DefaultAssigningFacility</namespaceId><universalId>UID_13359111174322</universalId><universalIdType>universalIdType</universalIdType></documentIdentifier><initiatingSystem>SOAP UI</initiatingSystem><facilityIdentifier><identity>OrganizationId</identity><name>OrganizationName</name><assigningAuthority>AssigningAuthNamespaceId</assigningAuthority></facilityIdentifier><approvedFlag>APPROVED</approvedFlag><author><comment>Author Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></author><approvedBy><comment>Approved By Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></approvedBy><dateCreated><literal>20011231170000-0700</literal></dateCreated><recordVersion>3</recordVersion></questionnaireResult><questionnaireResult><patient><identifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><given>Given3</given><middle>MiddleName3</middle><family>FamilyName3</family><suffix>Suffix3</suffix><title>Title3</title></name></patient><documentType>Hematologic_and_Lymphatic_Conditions</documentType><recordIdentifier><identity>104</identity></recordIdentifier><documentIdentifier><identity>c829ec75-d865-413d-be02-d53956e6fa30</identity><namespaceId>DefaultAssigningFacility</namespaceId><universalId>UID_13359111174322</universalId><universalIdType>universalIdType</universalIdType></documentIdentifier><initiatingSystem>SOAP UI</initiatingSystem><facilityIdentifier><identity>OrganizationId</identity><name>OrganizationName</name><assigningAuthority>AssigningAuthNamespaceId</assigningAuthority></facilityIdentifier><approvedFlag>APPROVED</approvedFlag><author><comment>Author Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></author><approvedBy><comment>Approved By Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></approvedBy><dateCreated><literal>20051231170000-0700</literal></dateCreated><recordVersion>3</recordVersion></questionnaireResult></questionnaireResults></patient></patients></clinicaldata:ClinicalData>]]></con:value></con:property><con:property><con:name>RecordId1</con:name><con:value>102</con:value></con:property><con:property><con:name>RecordId2</con:name><con:value>103</con:value></con:property><con:property><con:name>RecordId3</con:name><con:value>104</con:value></con:property><con:property><con:name>RecordId4</con:name><con:value>105</con:value></con:property></con:properties></con:testCase><con:properties/></con:testSuite><con:testSuite name="HDR 3.4 Smart Forms Read Test Suite"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Smart Form Read by Facility Test" searchProperties="true" id="50af8383-6f90-456e-9510-ae6b63b2b607"><con:settings/><con:testStep type="groovy" name="Setup Test Data"><con:settings/><con:config><script><![CDATA[import java.util.UUID;  
import org.apache.commons.lang.time.DateFormatUtils;

context.CLIENT_REQUEST_INIT_TIME = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.FILTER_REQUEST_ID1 = UUID.randomUUID().toString();
context.FILTER_REQUEST_ID2 = UUID.randomUUID().toString();
context.FILTER_REQUEST_ID3 = UUID.randomUUID().toString();
context.FILTER_REQUEST_ID4 = UUID.randomUUID().toString();

// Record 1
context.REQUEST_ID = UUID.randomUUID().toString(); 
context.DOC_ID_SEQ1 = 1;
context.DOCUMENTIDENTIFIER_IDENTITY = UUID.randomUUID().toString(); 
context.FACILITY1_IDENTITY=UUID.randomUUID().toString()
context.FACILITY1_NAME='FACILITY1';
context.ASSERTION_IDENTITY1 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY2 = UUID.randomUUID().toString(); 
context.DOCUMENT_START_DT = '20121231170000-0700'; 
context.DOCUMENT_END_DT = '20121231170000-0700'; 

// Record 2
context.REQUEST_ID2 = UUID.randomUUID().toString(); 
context.DOC_ID_SEQ2 = 2;
context.DOCUMENTIDENTIFIER_IDENTITY2 = UUID.randomUUID().toString(); 
context.FACILITY2_IDENTITY=UUID.randomUUID().toString()
context.FACILITY2_NAME='FACILITY2';
context.ASSERTION_IDENTITY3 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY4 = UUID.randomUUID().toString();
context.ASSERTION_START_DT2 = '20060131170000-0700'; 
context.ASSERTION_END_DT2 = '20060131170000-0700'; 
context.CLIENT_REQUEST_INIT_TIME2 = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.DOCUMENT_START_DT2 = '20111231170000-0700'; 
context.DOCUMENT_END_DT2 = '20111231170000-0700'; 

// Common Data
context.ASSERTION_START_DT = '20111231170000-0700'; 
context.ASSERTION_END_DT = '20111231170000-0700'; 
context.APPROVED_FLAG = 'APPROVED';
context.APRV_BY_NAME_FAMILY = 'FamilyName';
context.APRV_BY_NAME_GIVEN = 'Given';
context.APRV_BY_NAME_MIDDLE = 'MiddleName';
context.APRV_BY_NAME_PREFIX = 'Prefix';
context.APRV_BY_NAME_SUFFIX = 'Suffix';
context.APRV_BY_NAME_TITLE = 'Title';
context.APRV_BY_PERSON_ASGNING_AUTH = 'USVHA';
context.APRV_BY_PERSON_ASGNING_FCLT = 'DefaultAssigningFacility';
context.APRV_BY_PERSON_IDENTITY = 'test_AUTHORID_1003';
context.APRV_BY_PRACTITIONER_COMMENTS = 'Approved By Comment';
context.APRV_BY_PRACTITIONER_ID_S = 'IdSourceTable';
context.APRV_BY_PRACTITIONER_DT = '20120501162517-0600';
context.APRV_BY_PRACTITIONER_DT_UTC = ''; //set by system
context.AUTH_NAME_FAMILY = 'FamilyName';
context.AUTH_NAME_GIVEN = 'Given';
context.AUTH_NAME_MIDDLE = 'MiddleName';
context.AUTH_NAME_PREFIX = 'Prefix';
context.AUTH_NAME_SUFFIX = 'Suffix';
context.AUTH_NAME_TITLE = 'Title';
context.AUTH_PERSON_ASGNING_AUTHORITY = 'USVHA';
context.AUTH_PERSON_ASGNING_FACILITY = 'DefaultAssigningFacility';
context.AUTH_PERSON_IDENTITY = 'test_AUTHORID_1003';
context.AUTH_PRACTITIONER_COMMENTS = 'Author Comment';
context.AUTH_PRACTITIONER_ID_SRC_TBL = 'IdSourceTable';
context.AUTH_PRACTITIONER_DT = '20120501162517-0600';
context.AUTH_PRACTITIONER_DT_UTC = ''; //set by system
context.DATE_MODIFIED__DT = null; 
context.DATE_MODIFIED__DT_UTC = null; 
context.DETAIL_XML = '<gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease>  <id>7553</id>  <version>0</version>  <dateCreated class="sql-timestamp">2012-01-10 09:45:51.397</dateCreated>  <dateModified class="sql-timestamp">2012-01-10 09:45:51.397</dateModified>  <formType>FORM_TYPE_DBQ_IHD</formType>  <vetSsn>941288701</vetSsn>  <documentStatusType>COMPLETE</documentStatusType>  <documentChannelType>ONLINE</documentChannelType>  <formFileNetStatus>    <id>5760</id>    <version>1</version>    <dateCreated class="sql-timestamp">2012-01-10 09:45:51.437</dateCreated>    <dateModified>2012-01-10 09:45:51.507 EST</dateModified>    <formFnStatusType>PROCESSOR_PROCESSING</formFnStatusType>    <formEntity class="gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease" reference="../.."/>  </formFileNetStatus>  <webFormType>IHD_DBQ</webFormType>  <veteranFirstName>Test</veteranFirstName>  <veteranLastName>Test</veteranLastName>  <physicianFirstName>Dr</physicianFirstName>  <physicianLastName>Test</physicianLastName>  <medicalLicenseNumber>12</medicalLicenseNumber>  <country>US</country>  <addressLine1>Test</addressLine1>  <addressLine2></addressLine2>  <addressLine3></addressLine3>  <city>Test</city>  <state>DELAWARE</state>  <zip>12345</zip>  <physicianPhoneNumber>1231221312</physicianPhoneNumber>  <privacyActAck>true</privacyActAck>  <physicianSignature>true</physicianSignature>  <impactsAbilityToWork>false</impactsAbilityToWork>  <remarks></remarks>  <dateSigned class="sql-timestamp">2012-01-10 09:45:51.397</dateSigned>  <diagnoses class="org.hibernate.collection.PersistentBag">    <initialized>true</initialized>    <owner class="gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease" reference="../.."/>    <cachedSize>-1</cachedSize>    <role>gov.va.agentorange.fasttrack.model.dbq.DbqFormEntity.diagnoses</role>    <key class="long">7553</key>    <dirty>false</dirty>    <storedSnapshot class="list"/>    <bag/>  </diagnoses>  <medications class="org.hibernate.collection.PersistentBag">    <initialized>true</initialized>    <owner class="gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease" reference="../.."/>    <cachedSize>-1</cachedSize>    <role>gov.va.agentorange.fasttrack.model.dbq.DbqFormEntity.medications</role>    <key class="long">7553</key>    <dirty>false</dirty>    <storedSnapshot class="list"/>    <bag/>  </medications>  <diagnosticTests class="org.hibernate.collection.PersistentBag">    <initialized>true</initialized>    <owner class="gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease" reference="../.."/>    <cachedSize>-1</cachedSize>    <role>gov.va.agentorange.fasttrack.model.dbq.DbqFormEntity.diagnosticTests</role>    <key class="long">7553</key>    <dirty>false</dirty>    <storedSnapshot class="list"/>    <bag/>  </diagnosticTests>  <hasIschemicHeartDisease>true</hasIschemicHeartDisease>  <takesContinuousMedication>false</takesContinuousMedication>  <hasPercutaneousCoronaryIntervention>false</hasPercutaneousCoronaryIntervention>  <hasMyocardialInfarction>false</hasMyocardialInfarction>  <hasCoronaryBypassSurgery>false</hasCoronaryBypassSurgery>  <hasHeartTransplant>false</hasHeartTransplant>  <hasImplantedCardiacPacemaker>false</hasImplantedCardiacPacemaker>  <hasImplantedAicd>false</hasImplantedAicd>  <doesVeteranHaveCHF>false</doesVeteranHaveCHF>  <hasExerciseTestBeenConducted>false</hasExerciseTestBeenConducted>  <metsLevel>metsLevel13</metsLevel>  <hasDyspnea>false</hasDyspnea>  <hasFatigue>false</hasFatigue>  <hasAngina>false</hasAngina>  <hasDizziness>false</hasDizziness>  <hasSyncope>true</hasSyncope>  <isEvidenceOfHypertrophyOrDil>false</isEvidenceOfHypertrophyOrDil>  <hasEkg>false</hasEkg>  <hasChestXRay>false</hasChestXRay>  <hasEchocardiogram>false</hasEchocardiogram>  <hasOtherTest>false</hasOtherTest>  <hasLVEF>false</hasLVEF></gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease>';
context.DOCUMENTIDENTIFIER_NAMESPACEID = 'DefaultAssigningFacility';
context.DOCUMENTIDENTIFIER_UNIVERSALID = 'UID_13359111174322';
context.DOCUMENTIDENTIFIER_UNIVERSTYP = 'universalIdType';
context.DOCUMENT_TYPE = 'Document Type';
context.INITIATING_SYSTEM = 'InitiatingSystem';
context.MESSAGE_INSERTION_TIME = ''; //entered by system? 5/10/2012 2:28:41.116285 PM
context.PATIENT_ASSIGNING_AUTHORITY = 'USVHA';
context.PATIENT_ASSIGNING_FACILITY = '200HD';
context.PATIENT_IDENTITY = UUID.randomUUID().toString();
context.PATIENT_NAME_FAMILY = 'FamilyName';
context.PATIENT_NAME_GIVEN = 'Given';
context.PATIENT_NAME_MIDDLE = 'MiddleName';
context.PATIENT_NAME_PREFIX = 'Prefix';
context.PATIENT_NAME_SUFFIX = 'Suffix';
context.PATIENT_NAME_TITLE = 'Title';
context.QUESTIONNAIRE_RESULT_ID = ''; //DB Primary Key?
context.RECORDIDENTIFIER_IDENTITY = null;
context.RECORDIDENTIFIER_NAMESPACEID = null;
context.RECORDIDENTIFIER_UNIVERSALID = null;
context.RECORDIDENTIFIER_UNIVERSTYP = null;
context.RECORD_UPDATE_DT = '19691231170000-0700'; //Updated by system?
context.RECORD_UPDATE_DT_UTC = ''; //set by system
context.RECORD_VERSION = 3;
//log.info("REQUEST_ID: " + context.REQUEST_ID);;
//log.info("RECORDIDENTIFIER_IDENTITY: " + context.REQUEST_ID);  ]]></script></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data Facility 1 - Valid1"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data Facility 1 - Valid1" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <templateId>SmartFormCreate1</templateId>
   <clientName>SOAP UI</clientName>
   <clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME}</clientRequestInitiationTime>
   <patient>
      <smartFormDocuments>
         <smartFormDocument>
            <documentNativeId>${DOC_ID_SEQ1}</documentNativeId>
            <documentUUID>${DOCUMENTIDENTIFIER_IDENTITY}</documentUUID>
            <sourceName>SOAPUI</sourceName>
		  <templateVersion>1.1</templateVersion>
		  <documentStartDate>
               <literal>${DOCUMENT_START_DT}</literal>
            </documentStartDate>
            <documentEndDate>
               <literal>${DOCUMENT_END_DT}</literal>
            </documentEndDate>
            <patient>
               <identifier>
                  <identity>${PATIENT_IDENTITY}</identity>
                  <assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
                  <assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
               </identifier>
               <name>
                  <prefix>${PATIENT_NAME_PREFIX}</prefix>
                  <given>${PATIENT_NAME_GIVEN}</given>
                  <middle>${PATIENT_NAME_MIDDLE}</middle>
                  <family>${PATIENT_NAME_FAMILY}</family>
                  <suffix>${PATIENT_NAME_SUFFIX}</suffix>
                  <title>${PATIENT_NAME_TITLE}</title>
               </name>
            </patient>
            <provider>
               <identifier>
                  <identity>${APRV_BY_PERSON_IDENTITY}</identity>
                  <assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
                  <assigningAuthority>${APRV_BY_PRACTITIONER_ID_S}</assigningAuthority>
               </identifier>
               <name>
                  <prefix>${APRV_BY_NAME_PREFIX}</prefix>
                  <given>${APRV_BY_NAME_GIVEN}</given>
                  <middle>${APRV_BY_NAME_MIDDLE}</middle>
                  <family>${APRV_BY_NAME_FAMILY}</family>
                  <suffix>${APRV_BY_NAME_SUFFIX}</suffix>
                  <title>${APRV_BY_NAME_TITLE}</title>
               </name>
            </provider>
            <facility>
               <identity>${FACILITY1_IDENTITY}</identity>
               <name>${FACILITY1_NAME}</name>
               <assigningAuthority>USVHA</assigningAuthority>
            </facility>
            <assertions>
               <assertion>
                  <assertionUUID>${ASSERTION_IDENTITY1}</assertionUUID>
                  <seqInDoc>1</seqInDoc>
                  <assertionStartDate>
                     <literal>${ASSERTION_START_DT}</literal>
                  </assertionStartDate>
                  <assertionEndDate>
                     <literal>${ASSERTION_END_DT}</literal>
                  </assertionEndDate>
                  <sectionENID>0</sectionENID>
                  <discernibleENID>0</discernibleENID>
                  <qualifierENID>0</qualifierENID>
                  <valueENID>0</valueENID>
               </assertion>
               <assertion>
                  <assertionUUID>${ASSERTION_IDENTITY2}</assertionUUID>
                  <seqInDoc>0</seqInDoc>
                  <assertionStartDate>
                     <literal>${ASSERTION_START_DT2}</literal>
                  </assertionStartDate>
                  <assertionEndDate>
                     <literal>${ASSERTION_END_DT2}</literal>
                  </assertionEndDate>
                  <sectionENID>0</sectionENID>
                  <discernibleENID>0</discernibleENID>
                  <qualifierENID>0</qualifierENID>
                  <valueENID>0</valueENID>
               </assertion>
            </assertions>
         </smartFormDocument>
      </smartFormDocuments>
   </patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="Matches Request ID"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data Facility 2 - Valid (No Client Name / Init Time)2"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data Facility 2 - Valid (No Client Name / Init Time)2" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<templateId>SmartFormCreate1</templateId>
	<patient>
		<smartFormDocuments>
			<smartFormDocument>
				<documentNativeId>${DOC_ID_SEQ2}</documentNativeId>
				<documentUUID>${DOCUMENTIDENTIFIER_IDENTITY2}</documentUUID>
				<sourceName>SOAPUI</sourceName>
		  		<templateVersion>1.1</templateVersion>
		  		<documentStartDate>
					<literal>${DOCUMENT_START_DT2}</literal>
				</documentStartDate>
				<documentEndDate>
					<literal>${DOCUMENT_END_DT2}</literal>
				</documentEndDate>
				<patient>
					<identifier>
						<identity>${PATIENT_IDENTITY}</identity>
						<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
						<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${PATIENT_NAME_PREFIX}</prefix>
						<given>${PATIENT_NAME_GIVEN}</given>
						<middle>${PATIENT_NAME_MIDDLE}</middle>
						<family>${PATIENT_NAME_FAMILY}</family>
						<suffix>${PATIENT_NAME_SUFFIX}</suffix>
						<title>${PATIENT_NAME_TITLE}</title>
					</name>
				</patient>
				<provider>
					<identifier>
						<identity>${APRV_BY_PERSON_IDENTITY}</identity>
						<assigningFacility>${APRV_BY_PERSON_ASGNING_FCLT}</assigningFacility>
						<assigningAuthority>${APRV_BY_PRACTITIONER_ID_S}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${APRV_BY_NAME_PREFIX}</prefix>
						<given>${APRV_BY_NAME_GIVEN}</given>
						<middle>${APRV_BY_NAME_MIDDLE}</middle>
						<family>${APRV_BY_NAME_FAMILY}</family>
						<suffix>${APRV_BY_NAME_SUFFIX}</suffix>
						<title>${APRV_BY_NAME_TITLE}</title>
					</name>
				</provider>
	               <facility>
					<identity>${FACILITY2_IDENTITY}</identity>
					<name>${FACILITY2_NAME}</name>
					<assigningAuthority>USVHA</assigningAuthority>
				</facility>
				<assertions>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY3}</assertionUUID>
						<seqInDoc>1</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY4}</assertionUUID>
						<seqInDoc>0</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT2}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT2}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
				</assertions>
			</smartFormDocument>
		</smartFormDocuments>
	</patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="Matches Request ID"><con:configuration><path>//requestId</path><content>${REQUEST_ID2}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID2}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" name="Smart Form Read All By Facility 1"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read All By Facility 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_ALL_DATA_FILTER</filterId>
	<clientName>SOAPUI</clientName>
	<clientRequestInitiationTime>2013-01-09T09:30:47Z</clientRequestInitiationTime>
	<entryPointFilter queryName="ByFacility" isPatientCentric="false">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<otherQueryParameters>
			<facilityIdentifier>
				<identity>${FACILITY1_IDENTITY}</identity>
			</facilityIdentifier>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_ALL_DATA_FILTER</in2>
         <in3>${FILTER_REQUEST_ID1}</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Facility 1"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read All By Facility 1#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

// check to make sure that we got back only what we expected to get back.
def holder = groovyUtils.getXmlHolder( content ) ;
assert "1" == holder["count(//smartFormDocument)"]
assert context.FACILITY1_IDENTITY == holder["//smartFormDocument/facility/identity"]</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read All By Facility 2"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read All By Facility 2"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_ALL_DATA_FILTER</filterId>
	<clientName>SOAPUI</clientName>
	<clientRequestInitiationTime>2013-01-09T10:30:47Z</clientRequestInitiationTime>
	<entryPointFilter queryName="ByFacility" isPatientCentric="false">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<otherQueryParameters>
			<facilityIdentifier>
				<identity>${FACILITY2_IDENTITY}</identity>
			</facilityIdentifier>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_ALL_DATA_FILTER</in2>
         <in3>${FILTER_REQUEST_ID2}</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Facility 2"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read All By Facility 2#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

// check to make sure that we got back only what we expected to get back.
def holder = groovyUtils.getXmlHolder( content ) ;
assert "1" == holder["count(//smartFormDocument)"]
assert context.FACILITY2_IDENTITY == holder["//smartFormDocument/facility/identity"]</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read By Facility 1 &amp; Date Range"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read By Facility 1 &amp; Date Range"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_ALL_DATA_FILTER</filterId>
	<clientName>SOAPUI</clientName>
	<clientRequestInitiationTime>2013-01-09T09:30:47Z</clientRequestInitiationTime>
	<entryPointFilter queryName="ByFacility" isPatientCentric="false">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<startDate>2012-12-31</startDate>
		<endDate>2013-01-31</endDate>
		<otherQueryParameters>
			<facilityIdentifier>
				<identity>${FACILITY1_IDENTITY}</identity>
			</facilityIdentifier>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_ALL_DATA_FILTER</in2>
         <in3>${FILTER_REQUEST_ID1}</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Facility 1 &amp; Date Range"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read By Facility 1 &amp; Date Range#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

// check to make sure that we got back only what we expected to get back.
def holder = groovyUtils.getXmlHolder( content ) ;
assert "1" == holder["count(//smartFormDocument)"]
assert context.FACILITY1_IDENTITY == holder["//smartFormDocument/facility/identity"]</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read By Facility 3 &amp; Date Range - No Records (No Client Name / Init Time)"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read By Facility 3 &amp; Date Range - No Records (No Client Name / Init Time)"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_ALL_DATA_FILTER</filterId>
	<entryPointFilter queryName="ByFacility" isPatientCentric="false">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<startDate>2012-12-31</startDate>
		<endDate>2013-01-31</endDate>
		<otherQueryParameters>
			<facilityIdentifier>
				<identity>${FACILITY3_IDENTITY}</identity>
			</facilityIdentifier>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_ALL_DATA_FILTER</in2>
         <in3>${FILTER_REQUEST_ID1}</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Facility 3 &amp; Date Range - No Records"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read By Facility 3 &amp; Date Range - No Records (No Client Name / Init Time)#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

// check to make sure that we got back only what we expected to get back.
def holder = groovyUtils.getXmlHolder( content ) ;
assert "0" == holder["count(//smartFormDocument)"]</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read By Facility 1 &amp; Bad Date Range - No Records"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read By Facility 1 &amp; Bad Date Range - No Records"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_ALL_DATA_FILTER</filterId>
	<clientName>SOAPUI</clientName>
	<clientRequestInitiationTime>2013-01-09T09:30:47Z</clientRequestInitiationTime>
	<entryPointFilter queryName="ByFacility" isPatientCentric="false">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<startDate>2014-12-31</startDate>
		<endDate>2015-01-31</endDate>
		<otherQueryParameters>
			<facilityIdentifier>
				<identity>${FACILITY1_IDENTITY}</identity>
			</facilityIdentifier>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_ALL_DATA_FILTER</in2>
         <in3>${FILTER_REQUEST_ID1}</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Facility 1 &amp; Bad Date Range - No Records"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read By Facility 1 &amp; Bad Date Range - No Records#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

// check to make sure that we got back only what we expected to get back.
def holder = groovyUtils.getXmlHolder( content ) ;
assert "0" == holder["count(//smartFormDocument)"]</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read All By Facility 1 &amp; 2 - Validation Exception"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read All By Facility 1 &amp; 2 - Validation Exception"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_ALL_DATA_FILTER</filterId>
	<clientName>SOAPUI</clientName>
	<clientRequestInitiationTime>2013-01-09T09:30:47Z</clientRequestInitiationTime>
	<entryPointFilter queryName="ByFacility" isPatientCentric="false">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<otherQueryParameters>
			<facilityIdentifier>
				<identity>${FACILITY1_IDENTITY}</identity>
				<assigningFacility>${FACILITY1_NAME}</assigningFacility>
			</facilityIdentifier>
			<facilityIdentifier>
				<identity>${FACILITY2_IDENTITY}</identity>
			</facilityIdentifier>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_ALL_DATA_FILTER</in2>
         <in3>${FILTER_REQUEST_ID1}</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token>ValidationException</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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:properties><con:property><con:name>CDataSection</con:name><con:value><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<clinicaldata:ClinicalData xmlns:clinicaldata="Clinicaldata"><templateId>DBQListRead1</templateId><requestId>9a3cdb14-effb-411b-8003-83808bd73e57</requestId><patients><patient><requestedResolvedIdentifiers><requestedResolvedIdentifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></requestedResolvedIdentifier></requestedResolvedIdentifiers><resultantIdentifiers><resultantIdentifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></resultantIdentifier></resultantIdentifiers><questionnaireResults><questionnaireResult><patient><identifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><given>Given1</given><middle>MiddleName1</middle><family>FamilyName1</family><suffix>Suffix1</suffix><title>Title1</title></name></patient><documentType>Ischemic_Heart_Disease</documentType><recordIdentifier><identity>102</identity></recordIdentifier><documentIdentifier><identity>8e5a422d-cdcc-4608-9825-bd0e01b0e24b</identity><namespaceId>DefaultAssigningFacility</namespaceId><universalId>UID_13359111174322</universalId><universalIdType>universalIdType</universalIdType></documentIdentifier><initiatingSystem>SOAP UI</initiatingSystem><facilityIdentifier><identity>OrganizationId</identity><name>OrganizationName</name><assigningAuthority>AssigningAuthNamespaceId</assigningAuthority></facilityIdentifier><approvedFlag>APPROVED</approvedFlag><author><comment>Author Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></author><approvedBy><comment>Approved By Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></approvedBy><dateCreated><literal>19991231170000-0700</literal></dateCreated><recordVersion>3</recordVersion></questionnaireResult><questionnaireResult><patient><identifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><given>Given2</given><middle>MiddleName2</middle><family>FamilyName2</family><suffix>Suffix2</suffix><title>Title2</title></name></patient><documentType>Ischemic_Heart_Disease</documentType><recordIdentifier><identity>103</identity></recordIdentifier><documentIdentifier><identity>200c22fd-5c04-4b68-bf04-efa257c64285</identity><namespaceId>DefaultAssigningFacility</namespaceId><universalId>UID_13359111174322</universalId><universalIdType>universalIdType</universalIdType></documentIdentifier><initiatingSystem>SOAP UI</initiatingSystem><facilityIdentifier><identity>OrganizationId</identity><name>OrganizationName</name><assigningAuthority>AssigningAuthNamespaceId</assigningAuthority></facilityIdentifier><approvedFlag>APPROVED</approvedFlag><author><comment>Author Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></author><approvedBy><comment>Approved By Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></approvedBy><dateCreated><literal>20011231170000-0700</literal></dateCreated><recordVersion>3</recordVersion></questionnaireResult><questionnaireResult><patient><identifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><given>Given3</given><middle>MiddleName3</middle><family>FamilyName3</family><suffix>Suffix3</suffix><title>Title3</title></name></patient><documentType>Hematologic_and_Lymphatic_Conditions</documentType><recordIdentifier><identity>104</identity></recordIdentifier><documentIdentifier><identity>c829ec75-d865-413d-be02-d53956e6fa30</identity><namespaceId>DefaultAssigningFacility</namespaceId><universalId>UID_13359111174322</universalId><universalIdType>universalIdType</universalIdType></documentIdentifier><initiatingSystem>SOAP UI</initiatingSystem><facilityIdentifier><identity>OrganizationId</identity><name>OrganizationName</name><assigningAuthority>AssigningAuthNamespaceId</assigningAuthority></facilityIdentifier><approvedFlag>APPROVED</approvedFlag><author><comment>Author Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></author><approvedBy><comment>Approved By Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></approvedBy><dateCreated><literal>20051231170000-0700</literal></dateCreated><recordVersion>3</recordVersion></questionnaireResult></questionnaireResults></patient></patients></clinicaldata:ClinicalData>]]></con:value></con:property><con:property><con:name>RecordId1</con:name><con:value>102</con:value></con:property><con:property><con:name>RecordId2</con:name><con:value>103</con:value></con:property><con:property><con:name>RecordId3</con:name><con:value>104</con:value></con:property><con:property><con:name>RecordId4</con:name><con:value>105</con:value></con:property></con:properties></con:testCase><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Smart Form Read by Provider Test" searchProperties="true" id="cb97edaa-5ac2-4e3c-8f0c-8a1cdbc83f2d"><con:settings/><con:testStep type="groovy" name="Setup Test Data"><con:settings/><con:config><script><![CDATA[import java.util.UUID;  
import org.apache.commons.lang.time.DateFormatUtils;

context.CLIENT_REQUEST_INIT_TIME = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.FILTER_REQUEST_ID1 = UUID.randomUUID().toString();
context.FILTER_REQUEST_ID2 = UUID.randomUUID().toString();
context.FILTER_REQUEST_ID3 = UUID.randomUUID().toString();
context.FILTER_REQUEST_ID4 = UUID.randomUUID().toString();

// Record 1
context.REQUEST_ID = UUID.randomUUID().toString(); 
context.DOC_ID_SEQ1 = 1;
context.DOCUMENTIDENTIFIER_IDENTITY = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY1 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY2 = UUID.randomUUID().toString(); 
context.DOCUMENT_START_DT = '20121231170000-0700'; 
context.DOCUMENT_END_DT = '20121231170000-0700'; 
context.PROVIDER1_FAMILY = 'Provider1';
context.PROVIDER1_GIVEN = 'Given';
context.PROVIDER1_MIDDLE = 'MiddleName';
context.PROVIDER1_PREFIX = 'Prefix';
context.PROVIDER1_SUFFIX = 'Suffix';
context.PROVIDER1_TITLE = 'Title';
context.PROVIDER1_ASSIGNING_FACILITY = '111';
context.PROVIDER1_IDENTITY = UUID.randomUUID().toString(); 
context.PROVIDER1_COMMENTS = 'Approved By Comment';
context.PROVIDER1_ID_S = 'IdSourceTable';
context.PROVIDER1_DT = '20120501162517-0600';
context.PROVIDER1_DT_UTC = ''; //set by system

// Record 2
context.REQUEST_ID2 = UUID.randomUUID().toString(); 
context.DOC_ID_SEQ2 = 2;
context.DOCUMENTIDENTIFIER_IDENTITY2 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY3 = UUID.randomUUID().toString(); 
context.ASSERTION_IDENTITY4 = UUID.randomUUID().toString();
context.ASSERTION_START_DT2 = '20060131170000-0700'; 
context.ASSERTION_END_DT2 = '20060131170000-0700'; 
context.CLIENT_REQUEST_INIT_TIME2 = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( new Date() );
context.DOCUMENT_START_DT2 = '20111231170000-0700'; 
context.DOCUMENT_END_DT2 = '20111231170000-0700'; 
context.PROVIDER2_FAMILY = 'Provider2';
context.PROVIDER2_GIVEN = 'Given';
context.PROVIDER2_MIDDLE = 'MiddleName';
context.PROVIDER2_PREFIX = 'Prefix';
context.PROVIDER2_SUFFIX = 'Suffix';
context.PROVIDER2_TITLE = 'Title';
context.PROVIDER2_ASGNING_AUTHORITY = 'USVHA';
context.PROVIDER2_ASSIGNING_FACILITY = '222';
context.PROVIDER2_IDENTITY = UUID.randomUUID().toString(); 
context.PROVIDER2_COMMENTS = 'Author Comment';
context.PROVIDER2_ID_SRC_TBL = 'IdSourceTable';
context.PROVIDER2_DT = '20120501162517-0600';
context.PROVIDER2_DT_UTC = ''; //set by system

// Common Data
context.ASSERTION_START_DT = '20111231170000-0700'; 
context.ASSERTION_END_DT = '20111231170000-0700'; 
context.APPROVED_FLAG = 'APPROVED';
context.DATE_MODIFIED__DT = null; 
context.DATE_MODIFIED__DT_UTC = null; 
context.DETAIL_XML = '<gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease>  <id>7553</id>  <version>0</version>  <dateCreated class="sql-timestamp">2012-01-10 09:45:51.397</dateCreated>  <dateModified class="sql-timestamp">2012-01-10 09:45:51.397</dateModified>  <formType>FORM_TYPE_DBQ_IHD</formType>  <vetSsn>941288701</vetSsn>  <documentStatusType>COMPLETE</documentStatusType>  <documentChannelType>ONLINE</documentChannelType>  <formFileNetStatus>    <id>5760</id>    <version>1</version>    <dateCreated class="sql-timestamp">2012-01-10 09:45:51.437</dateCreated>    <dateModified>2012-01-10 09:45:51.507 EST</dateModified>    <formFnStatusType>PROCESSOR_PROCESSING</formFnStatusType>    <formEntity class="gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease" reference="../.."/>  </formFileNetStatus>  <webFormType>IHD_DBQ</webFormType>  <veteranFirstName>Test</veteranFirstName>  <veteranLastName>Test</veteranLastName>  <physicianFirstName>Dr</physicianFirstName>  <physicianLastName>Test</physicianLastName>  <medicalLicenseNumber>12</medicalLicenseNumber>  <country>US</country>  <addressLine1>Test</addressLine1>  <addressLine2></addressLine2>  <addressLine3></addressLine3>  <city>Test</city>  <state>DELAWARE</state>  <zip>12345</zip>  <physicianPhoneNumber>1231221312</physicianPhoneNumber>  <privacyActAck>true</privacyActAck>  <physicianSignature>true</physicianSignature>  <impactsAbilityToWork>false</impactsAbilityToWork>  <remarks></remarks>  <dateSigned class="sql-timestamp">2012-01-10 09:45:51.397</dateSigned>  <diagnoses class="org.hibernate.collection.PersistentBag">    <initialized>true</initialized>    <owner class="gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease" reference="../.."/>    <cachedSize>-1</cachedSize>    <role>gov.va.agentorange.fasttrack.model.dbq.DbqFormEntity.diagnoses</role>    <key class="long">7553</key>    <dirty>false</dirty>    <storedSnapshot class="list"/>    <bag/>  </diagnoses>  <medications class="org.hibernate.collection.PersistentBag">    <initialized>true</initialized>    <owner class="gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease" reference="../.."/>    <cachedSize>-1</cachedSize>    <role>gov.va.agentorange.fasttrack.model.dbq.DbqFormEntity.medications</role>    <key class="long">7553</key>    <dirty>false</dirty>    <storedSnapshot class="list"/>    <bag/>  </medications>  <diagnosticTests class="org.hibernate.collection.PersistentBag">    <initialized>true</initialized>    <owner class="gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease" reference="../.."/>    <cachedSize>-1</cachedSize>    <role>gov.va.agentorange.fasttrack.model.dbq.DbqFormEntity.diagnosticTests</role>    <key class="long">7553</key>    <dirty>false</dirty>    <storedSnapshot class="list"/>    <bag/>  </diagnosticTests>  <hasIschemicHeartDisease>true</hasIschemicHeartDisease>  <takesContinuousMedication>false</takesContinuousMedication>  <hasPercutaneousCoronaryIntervention>false</hasPercutaneousCoronaryIntervention>  <hasMyocardialInfarction>false</hasMyocardialInfarction>  <hasCoronaryBypassSurgery>false</hasCoronaryBypassSurgery>  <hasHeartTransplant>false</hasHeartTransplant>  <hasImplantedCardiacPacemaker>false</hasImplantedCardiacPacemaker>  <hasImplantedAicd>false</hasImplantedAicd>  <doesVeteranHaveCHF>false</doesVeteranHaveCHF>  <hasExerciseTestBeenConducted>false</hasExerciseTestBeenConducted>  <metsLevel>metsLevel13</metsLevel>  <hasDyspnea>false</hasDyspnea>  <hasFatigue>false</hasFatigue>  <hasAngina>false</hasAngina>  <hasDizziness>false</hasDizziness>  <hasSyncope>true</hasSyncope>  <isEvidenceOfHypertrophyOrDil>false</isEvidenceOfHypertrophyOrDil>  <hasEkg>false</hasEkg>  <hasChestXRay>false</hasChestXRay>  <hasEchocardiogram>false</hasEchocardiogram>  <hasOtherTest>false</hasOtherTest>  <hasLVEF>false</hasLVEF></gov.va.agentorange.fasttrack.model.dbq.ihd.IschemicHeartDisease>';
context.DOCUMENTIDENTIFIER_NAMESPACEID = 'DefaultAssigningFacility';
context.DOCUMENTIDENTIFIER_UNIVERSALID = 'UID_13359111174322';
context.DOCUMENTIDENTIFIER_UNIVERSTYP = 'universalIdType';
context.DOCUMENT_TYPE = 'Document Type';
context.FACILITY_IDENTITY=UUID.randomUUID().toString()
context.FACILITY_NAME='FACILITY1';
context.INITIATING_SYSTEM = 'InitiatingSystem';
context.MESSAGE_INSERTION_TIME = ''; //entered by system? 5/10/2012 2:28:41.116285 PM
context.PATIENT_ASSIGNING_AUTHORITY = 'USVHA';
context.PATIENT_ASSIGNING_FACILITY = '200HD';
context.PATIENT_IDENTITY = UUID.randomUUID().toString();
context.PATIENT_NAME_FAMILY = 'FamilyName';
context.PATIENT_NAME_GIVEN = 'Given';
context.PATIENT_NAME_MIDDLE = 'MiddleName';
context.PATIENT_NAME_PREFIX = 'Prefix';
context.PATIENT_NAME_SUFFIX = 'Suffix';
context.PATIENT_NAME_TITLE = 'Title';
context.QUESTIONNAIRE_RESULT_ID = ''; //DB Primary Key?
context.RECORDIDENTIFIER_IDENTITY = null;
context.RECORDIDENTIFIER_NAMESPACEID = null;
context.RECORDIDENTIFIER_UNIVERSALID = null;
context.RECORDIDENTIFIER_UNIVERSTYP = null;
context.RECORD_UPDATE_DT = '19691231170000-0700'; //Updated by system?
context.RECORD_UPDATE_DT_UTC = ''; //set by system
context.RECORD_VERSION = 3;
//log.info("REQUEST_ID: " + context.REQUEST_ID);;
//log.info("RECORDIDENTIFIER_IDENTITY: " + context.REQUEST_ID);  ]]></script></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data Provider 1 - Valid1"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data Provider 1 - Valid1" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <templateId>SmartFormCreate1</templateId>
   <clientName>SOAP UI</clientName>
   <clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME}</clientRequestInitiationTime>
   <patient>
      <smartFormDocuments>
         <smartFormDocument>
            <documentNativeId>${DOC_ID_SEQ1}</documentNativeId>
            <documentUUID>${DOCUMENTIDENTIFIER_IDENTITY}</documentUUID>
            <sourceName>SOAPUI</sourceName>
		  <templateVersion>1.1</templateVersion>
		  <documentStartDate>
               <literal>${DOCUMENT_START_DT}</literal>
            </documentStartDate>
            <documentEndDate>
               <literal>${DOCUMENT_END_DT}</literal>
            </documentEndDate>
            <patient>
               <identifier>
                  <identity>${PATIENT_IDENTITY}</identity>
                  <assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
                  <assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
               </identifier>
               <name>
                  <prefix>${PATIENT_NAME_PREFIX}</prefix>
                  <given>${PATIENT_NAME_GIVEN}</given>
                  <middle>${PATIENT_NAME_MIDDLE}</middle>
                  <family>${PATIENT_NAME_FAMILY}</family>
                  <suffix>${PATIENT_NAME_SUFFIX}</suffix>
                  <title>${PATIENT_NAME_TITLE}</title>
               </name>
            </patient>
            <provider>
               <identifier>
                  <identity>${PROVIDER1_IDENTITY}</identity>
                  <assigningFacility>${PROVIDER1_ASSIGNING_FACILITY}</assigningFacility>
                  <assigningAuthority>USVHA</assigningAuthority>
               </identifier>
               <name>
                  <prefix>${PROVIDER1_PREFIX}</prefix>
                  <given>${PROVIDER1_GIVEN}</given>
                  <middle>${PROVIDER1_MIDDLE}</middle>
                  <family>${PROVIDER1_FAMILY}</family>
                  <suffix>${PROVIDER1_SUFFIX}</suffix>
                  <title>${PROVIDER1_TITLE}</title>
               </name>
            </provider>
            <facility>
               <identity>${FACILITY1_IDENTITY}</identity>
               <name>${FACILITY1_NAME}</name>
               <assigningAuthority>USVHA</assigningAuthority>
            </facility>
            <assertions>
               <assertion>
                  <assertionUUID>${ASSERTION_IDENTITY1}</assertionUUID>
                  <seqInDoc>1</seqInDoc>
                  <assertionStartDate>
                     <literal>${ASSERTION_START_DT}</literal>
                  </assertionStartDate>
                  <assertionEndDate>
                     <literal>${ASSERTION_END_DT}</literal>
                  </assertionEndDate>
                  <sectionENID>0</sectionENID>
                  <discernibleENID>0</discernibleENID>
                  <qualifierENID>0</qualifierENID>
                  <valueENID>0</valueENID>
               </assertion>
               <assertion>
                  <assertionUUID>${ASSERTION_IDENTITY2}</assertionUUID>
                  <seqInDoc>0</seqInDoc>
                  <assertionStartDate>
                     <literal>${ASSERTION_START_DT2}</literal>
                  </assertionStartDate>
                  <assertionEndDate>
                     <literal>${ASSERTION_END_DT2}</literal>
                  </assertionEndDate>
                  <sectionENID>0</sectionENID>
                  <discernibleENID>0</discernibleENID>
                  <qualifierENID>0</qualifierENID>
                  <valueENID>0</valueENID>
               </assertion>
            </assertions>
         </smartFormDocument>
      </smartFormDocuments>
   </patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="Matches Request ID"><con:configuration><path>//requestId</path><content>${REQUEST_ID}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" name="Smart Form Create Data Provider 2 - Valid2"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>appendClinicalData</con:operation><con:request name="Smart Form Create Data Provider 2 - Valid2" outgoingWss="" incomingWss=""><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>jms://${CDS_SMART_FORM_JMS_ENDPOINT}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2012 rel. 2 sp1 (http://www.altova.com)-->
<clinicaldata:ClinicalData xsi:schemaLocation="Clinicaldata SmartFormCreate1.xsd" xmlns:clinicaldata="Clinicaldata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<templateId>SmartFormCreate1</templateId>
	<clientName>SOAP UI</clientName>
	<clientRequestInitiationTime>${CLIENT_REQUEST_INIT_TIME2}</clientRequestInitiationTime>
	<patient>
		<smartFormDocuments>
			<smartFormDocument>
				<documentNativeId>${DOC_ID_SEQ2}</documentNativeId>
				<documentUUID>${DOCUMENTIDENTIFIER_IDENTITY2}</documentUUID>
				<sourceName>SOAPUI</sourceName>
		  		<templateVersion>1.1</templateVersion>
		  		<documentStartDate>
					<literal>${DOCUMENT_START_DT2}</literal>
				</documentStartDate>
				<documentEndDate>
					<literal>${DOCUMENT_END_DT2}</literal>
				</documentEndDate>
				<patient>
					<identifier>
						<identity>${PATIENT_IDENTITY}</identity>
						<assigningFacility>${PATIENT_ASSIGNING_FACILITY}</assigningFacility>
						<assigningAuthority>${PATIENT_ASSIGNING_AUTHORITY}</assigningAuthority>
					</identifier>
					<name>
						<prefix>${PATIENT_NAME_PREFIX}</prefix>
						<given>${PATIENT_NAME_GIVEN}</given>
						<middle>${PATIENT_NAME_MIDDLE}</middle>
						<family>${PATIENT_NAME_FAMILY}</family>
						<suffix>${PATIENT_NAME_SUFFIX}</suffix>
						<title>${PATIENT_NAME_TITLE}</title>
					</name>
				</patient>
				<provider>
		               <identifier>
		                  <identity>${PROVIDER2_IDENTITY}</identity>
		                  <assigningFacility>${PROVIDER2_ASSIGNING_FACILITY}</assigningFacility>
		                  <assigningAuthority>USVHA</assigningAuthority>
		               </identifier>
		               <name>
		                  <prefix>${PROVIDER2_PREFIX}</prefix>
		                  <given>${PROVIDER2_GIVEN}</given>
		                  <middle>${PROVIDER2_MIDDLE}</middle>
		                  <family>${PROVIDER2_FAMILY}</family>
		                  <suffix>${PROVIDER2_SUFFIX}</suffix>
		                  <title>${PROVIDER2_TITLE}</title>
		               </name>
		            </provider>
	               <facility>
					<identity>${FACILITY2_IDENTITY}</identity>
					<name>${FACILITY2_NAME}</name>
					<assigningAuthority>USVHA</assigningAuthority>
				</facility>
				<assertions>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY3}</assertionUUID>
						<seqInDoc>1</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
					<assertion>
						<assertionUUID>${ASSERTION_IDENTITY4}</assertionUUID>
						<seqInDoc>0</seqInDoc>
						<assertionStartDate>
							<literal>${ASSERTION_START_DT2}</literal>
						</assertionStartDate>
						<assertionEndDate>
							<literal>${ASSERTION_END_DT2}</literal>
						</assertionEndDate>
						<sectionENID>0</sectionENID>
						<discernibleENID>0</discernibleENID>
						<qualifierENID>0</qualifierENID>
						<valueENID>0</valueENID>
					</assertion>
				</assertions>
			</smartFormDocument>
		</smartFormDocuments>
	</patient>
</clinicaldata:ClinicalData>]]></con:request><con:assertion type="XPath Match" name="Matches Request ID"><con:configuration><path>//requestId</path><content>${REQUEST_ID2}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>true</ignoreNamspaceDifferences><ignoreComments>false</ignoreComments></con:configuration></con:assertion><con:credentials><con:username xsi:nil="true"/><con:password xsi:nil="true"/><con:domain xsi:nil="true"/><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT" messageSelector="" TimeToLive=""/><con:jmsPropertyConfig><con:jmsProperties name="TEMPLATE_ID" value="SmartFormCreate1"/><con:jmsProperties name="REQUEST_ID" value="${REQUEST_ID2}"/></con:jmsPropertyConfig><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" name="Smart Form Read All By Provider 1"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read All By Provider 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_ALL_DATA_FILTER</filterId>
	<clientName>SOAPUI</clientName>
	<clientRequestInitiationTime>2013-01-09T09:30:47Z</clientRequestInitiationTime>
	<entryPointFilter queryName="ByProvider" isPatientCentric="false">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<otherQueryParameters>
			<providerIdentifier>
				<identity>${PROVIDER1_IDENTITY}</identity>
				<assigningFacility>${PROVIDER1_ASSIGNING_FACILITY}</assigningFacility>
			</providerIdentifier>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_ALL_DATA_FILTER</in2>
         <in3>${FILTER_REQUEST_ID1}</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Provider 1"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read All By Provider 1#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

// check to make sure that we got back only what we expected to get back.
def holder = groovyUtils.getXmlHolder( content ) ;
assert "1" == holder["count(//smartFormDocument)"]
assert context.PROVIDER1_IDENTITY == holder["//smartFormDocument/provider/identifier/identity"]</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read All By Provider 2"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read All By Provider 2"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_ALL_DATA_FILTER</filterId>
	<clientName>SOAPUI</clientName>
	<clientRequestInitiationTime>2013-01-09T09:30:47Z</clientRequestInitiationTime>
	<entryPointFilter queryName="ByProvider" isPatientCentric="false">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<otherQueryParameters>
			<providerIdentifier>
				<identity>${PROVIDER2_IDENTITY}</identity>
				<assigningFacility>${PROVIDER2_ASSIGNING_FACILITY}</assigningFacility>
			</providerIdentifier>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_ALL_DATA_FILTER</in2>
         <in3>${FILTER_REQUEST_ID2}</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Provider 2"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read All By Provider 2#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

// check to make sure that we got back only what we expected to get back.
def holder = groovyUtils.getXmlHolder( content ) ;
assert "1" == holder["count(//smartFormDocument)"]
assert context.PROVIDER2_IDENTITY == holder["//smartFormDocument/provider/identifier/identity"]</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read By Provider 1 &amp; Date Range"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read By Provider 1 &amp; Date Range"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_ALL_DATA_FILTER</filterId>
	<clientName>SOAPUI</clientName>
	<clientRequestInitiationTime>2013-01-09T09:30:47Z</clientRequestInitiationTime>
	<entryPointFilter queryName="ByProvider" isPatientCentric="false">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<startDate>2012-12-31</startDate>
		<endDate>2013-01-31</endDate>
		<otherQueryParameters>
			<providerIdentifier>
				<identity>${PROVIDER1_IDENTITY}</identity>
				<assigningFacility>${PROVIDER1_ASSIGNING_FACILITY}</assigningFacility>
			</providerIdentifier>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_ALL_DATA_FILTER</in2>
         <in3>${FILTER_REQUEST_ID3}</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Provider 1 &amp; Date Range"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read By Provider 1 &amp; Date Range#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

// check to make sure that we got back only what we expected to get back.
def holder = groovyUtils.getXmlHolder( content ) ;
assert "1" == holder["count(//smartFormDocument)"]
assert context.PROVIDER1_IDENTITY == holder["//smartFormDocument/provider/identifier/identity"]</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read By Provider 3 &amp; Date Range - No Records"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read By Provider 3 &amp; Date Range - No Records"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_ALL_DATA_FILTER</filterId>
	<clientName>SOAPUI</clientName>
	<clientRequestInitiationTime>2013-01-09T09:30:47Z</clientRequestInitiationTime>
	<entryPointFilter queryName="ByProvider" isPatientCentric="false">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<startDate>2012-12-31</startDate>
		<endDate>2013-01-31</endDate>
		<otherQueryParameters>
			<providerIdentifier>
				<identity>3</identity>
				<assigningFacility>333</assigningFacility>
			</providerIdentifier>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_ALL_DATA_FILTER</in2>
         <in3>${FILTER_REQUEST_ID3}</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Provider 3 &amp; Date Range - No Records"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read By Provider 3 &amp; Date Range - No Records#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

// check to make sure that we got back only what we expected to get back.
def holder = groovyUtils.getXmlHolder( content ) ;
assert "0" == holder["count(//smartFormDocument)"]</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read By Provider 1 &amp; Bad Date Range - No Records"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read By Provider 1 &amp; Bad Date Range - No Records"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_ALL_DATA_FILTER</filterId>
	<clientName>SOAPUI</clientName>
	<clientRequestInitiationTime>2013-01-09T09:30:47Z</clientRequestInitiationTime>
	<entryPointFilter queryName="ByProvider" isPatientCentric="false">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<startDate>2014-12-31</startDate>
		<endDate>2015-01-31</endDate>
		<otherQueryParameters>
			<providerIdentifier>
				<identity>${PROVIDER1_IDENTITY}</identity>
				<assigningFacility>${PROVIDER1_ASSIGNING_FACILITY}</assigningFacility>
			</providerIdentifier>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_ALL_DATA_FILTER</in2>
         <in3>${FILTER_REQUEST_ID4}</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token/><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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="Check Smart Form Read By Provider 1 &amp; Bad Date Range - No Records"><con:settings/><con:config><script>import com.eviware.soapui.support.XmlHolder 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

def soapResponseHolder = groovyUtils.getXmlHolder( "Smart Form Read By Provider 1 &amp; Bad Date Range - No Records#Response" ) ;
def content = soapResponseHolder["//out"] ;
content = content.replaceAll( "&lt;!\\[CDATA\\[", "" ) 
content = content.replaceAll( "]]&gt;", "" ) 

// check to make sure that we got back only what we expected to get back.
def holder = groovyUtils.getXmlHolder( content ) ;
assert "0" == holder["count(//smartFormDocument)"]</script></con:config></con:testStep><con:testStep type="request" name="Smart Form Read All By Provider 1 &amp; 2 - Validation Exception"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ClinicalDataServiceSynchronousInterfaceHttpBinding</con:interface><con:operation>readClinicalData1</con:operation><con:request name="Smart Form Read All By Provider 1 &amp; 2 - Validation Exception"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${CDS_SERVICE_SOAP_ENDPOINT}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1>
         <in0>SmartFormRead1</in0>
         <in1><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<filter:filter vhimVersion="Vhim_4_00" xsi:schemaLocation="Filter Smart_Form_All_Data_Filter.xsd" xmlns:filter="Filter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<filterId>SMART_FORM_ALL_DATA_FILTER</filterId>
	<clientName>SOAPUI</clientName>
	<clientRequestInitiationTime>2013-01-09T09:30:47Z</clientRequestInitiationTime>
	<entryPointFilter queryName="ByProvider" isPatientCentric="false">
		<domainEntryPoint>SmartFormDocument</domainEntryPoint>
		<otherQueryParameters>
			<providerIdentifier>
				<identity>${PROVIDER1_IDENTITY}</identity>
				<assigningFacility>${PROVIDER1_ASSIGNING_FACILITY}</assigningFacility>
			</providerIdentifier>
			<providerIdentifier>
				<identity>${PROVIDER2_IDENTITY}</identity>
				<assigningFacility>${PROVIDER2_ASSIGNING_FACILITY}</assigningFacility>
			</providerIdentifier>
			<facilityIdentifier>
				<identity>${FACILITY2_IDENTITY}</identity>
				<assigningFacility>${FACILITY2_NAME}</assigningFacility>
			</facilityIdentifier>
		</otherQueryParameters>
	</entryPointFilter>
</filter:filter>
         ]]]]>><![CDATA[</in1>
         <in2>SMART_FORM_ALL_DATA_FILTER</in2>
         <in3>${FILTER_REQUEST_ID1}</in3>
      </cli:readClinicalData1>
   </soapenv:Body>
</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="Simple Contains" name="Contains"><con:configuration><token>ValidationException</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></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:properties><con:property><con:name>CDataSection</con:name><con:value><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<clinicaldata:ClinicalData xmlns:clinicaldata="Clinicaldata"><templateId>DBQListRead1</templateId><requestId>9a3cdb14-effb-411b-8003-83808bd73e57</requestId><patients><patient><requestedResolvedIdentifiers><requestedResolvedIdentifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></requestedResolvedIdentifier></requestedResolvedIdentifiers><resultantIdentifiers><resultantIdentifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></resultantIdentifier></resultantIdentifiers><questionnaireResults><questionnaireResult><patient><identifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><given>Given1</given><middle>MiddleName1</middle><family>FamilyName1</family><suffix>Suffix1</suffix><title>Title1</title></name></patient><documentType>Ischemic_Heart_Disease</documentType><recordIdentifier><identity>102</identity></recordIdentifier><documentIdentifier><identity>8e5a422d-cdcc-4608-9825-bd0e01b0e24b</identity><namespaceId>DefaultAssigningFacility</namespaceId><universalId>UID_13359111174322</universalId><universalIdType>universalIdType</universalIdType></documentIdentifier><initiatingSystem>SOAP UI</initiatingSystem><facilityIdentifier><identity>OrganizationId</identity><name>OrganizationName</name><assigningAuthority>AssigningAuthNamespaceId</assigningAuthority></facilityIdentifier><approvedFlag>APPROVED</approvedFlag><author><comment>Author Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></author><approvedBy><comment>Approved By Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></approvedBy><dateCreated><literal>19991231170000-0700</literal></dateCreated><recordVersion>3</recordVersion></questionnaireResult><questionnaireResult><patient><identifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><given>Given2</given><middle>MiddleName2</middle><family>FamilyName2</family><suffix>Suffix2</suffix><title>Title2</title></name></patient><documentType>Ischemic_Heart_Disease</documentType><recordIdentifier><identity>103</identity></recordIdentifier><documentIdentifier><identity>200c22fd-5c04-4b68-bf04-efa257c64285</identity><namespaceId>DefaultAssigningFacility</namespaceId><universalId>UID_13359111174322</universalId><universalIdType>universalIdType</universalIdType></documentIdentifier><initiatingSystem>SOAP UI</initiatingSystem><facilityIdentifier><identity>OrganizationId</identity><name>OrganizationName</name><assigningAuthority>AssigningAuthNamespaceId</assigningAuthority></facilityIdentifier><approvedFlag>APPROVED</approvedFlag><author><comment>Author Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></author><approvedBy><comment>Approved By Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></approvedBy><dateCreated><literal>20011231170000-0700</literal></dateCreated><recordVersion>3</recordVersion></questionnaireResult><questionnaireResult><patient><identifier><identity>8b1b01f1-228c-420d-972e-aad5c7d639f7</identity><assigningFacility>200HD</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><given>Given3</given><middle>MiddleName3</middle><family>FamilyName3</family><suffix>Suffix3</suffix><title>Title3</title></name></patient><documentType>Hematologic_and_Lymphatic_Conditions</documentType><recordIdentifier><identity>104</identity></recordIdentifier><documentIdentifier><identity>c829ec75-d865-413d-be02-d53956e6fa30</identity><namespaceId>DefaultAssigningFacility</namespaceId><universalId>UID_13359111174322</universalId><universalIdType>universalIdType</universalIdType></documentIdentifier><initiatingSystem>SOAP UI</initiatingSystem><facilityIdentifier><identity>OrganizationId</identity><name>OrganizationName</name><assigningAuthority>AssigningAuthNamespaceId</assigningAuthority></facilityIdentifier><approvedFlag>APPROVED</approvedFlag><author><comment>Author Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></author><approvedBy><comment>Approved By Comment</comment><time><literal>20120501162517-0600</literal></time><practitioner><identifier><identity>test_AUTHORID_1003</identity><assigningFacility>DefaultAssigningFacility</assigningFacility><assigningAuthority>USVHA</assigningAuthority></identifier><name><prefix>Prefix</prefix><given>Given</given><middle>MiddleName</middle><family>FamilyName</family><suffix>Suffix</suffix><title>Title</title></name></practitioner></approvedBy><dateCreated><literal>20051231170000-0700</literal></dateCreated><recordVersion>3</recordVersion></questionnaireResult></questionnaireResults></patient></patients></clinicaldata:ClinicalData>]]></con:value></con:property><con:property><con:name>RecordId1</con:name><con:value>102</con:value></con:property><con:property><con:name>RecordId2</con:name><con:value>103</con:value></con:property><con:property><con:name>RecordId3</con:name><con:value>104</con:value></con:property><con:property><con:name>RecordId4</con:name><con:value>105</con:value></con:property></con:properties></con:testCase><con:properties/></con:testSuite><con:mockService port="8088" path="/mockClinicalDataServiceSynchronousInterfaceHttpBinding" host="ISL-EGBERTB-LT" name="ClinicalDataServiceSynchronousInterfaceHttpBinding MockService"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.mock.WsdlMockService@require-soap-action">false</con:setting></con:settings><con:mockOperation name="createClinicalData" interface="ClinicalDataServiceSynchronousInterfaceHttpBinding" operation="createClinicalData"><con:settings/><con:dispatchStyle>SEQUENCE</con:dispatchStyle><con:defaultResponse>Response 1</con:defaultResponse><con:response name="Response 1" encoding="UTF-8"><con:settings/><con:responseContent><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:createClinicalDataResponse>
         <out>?</out>
      </cli:createClinicalDataResponse>
   </soapenv:Body>
</soapenv:Envelope>]]></con:responseContent><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://client.cds.URL       /ClinicalDataServiceSynchronousInterfacePortType/createClinicalDataResponse"/></con:response><con:dispatchConfig/></con:mockOperation><con:mockOperation name="readClinicalData" interface="ClinicalDataServiceSynchronousInterfaceHttpBinding" operation="readClinicalData"><con:settings/><con:dispatchStyle>SEQUENCE</con:dispatchStyle><con:defaultResponse>Response 1</con:defaultResponse><con:response name="Response 1" encoding="UTF-8"><con:settings/><con:responseContent><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalDataResponse>
         <out>?</out>
      </cli:readClinicalDataResponse>
   </soapenv:Body>
</soapenv:Envelope>]]></con:responseContent><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://client.cds.URL       /ClinicalDataServiceSynchronousInterfacePortType/readClinicalDataResponse"/></con:response><con:dispatchConfig/></con:mockOperation><con:mockOperation name="readClinicalData1" interface="ClinicalDataServiceSynchronousInterfaceHttpBinding" operation="readClinicalData1"><con:settings/><con:dispatchStyle>SEQUENCE</con:dispatchStyle><con:defaultResponse>Response 1</con:defaultResponse><con:response name="Response 1" encoding="UTF-8"><con:settings/><con:responseContent><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://client.cds.URL       ">
   <soapenv:Header/>
   <soapenv:Body>
      <cli:readClinicalData1Response>
         <out>?</out>
      </cli:readClinicalData1Response>
   </soapenv:Body>
</soapenv:Envelope>]]></con:responseContent><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://client.cds.URL       /ClinicalDataServiceSynchronousInterfacePortType/readClinicalData1Response"/></con:response><con:dispatchConfig/></con:mockOperation><con:properties/></con:mockService><con:properties/><con:wssContainer/><con:beforeRunScript>com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("oracle.jdbc.OracleDriver")</con:beforeRunScript><con:sensitiveInformation/></con:soapui-project>