Test Script

Name/FHIR3-3-0-Advanced/Patient/05-delete/fhir-api-r4-patient-delete-03-conditional-multiple
DescriptionFHIR API R4 (v3.3.0) Advanced Operation Tests - Patient delete conditional test suite against a single server that supports deletion of multiple resources for a known valid resource instance, a non-existent resource instance and a known deleted resource instance. The destination server must also support the create, read and search operations in order to setup (create) the required resource instances and verify the deleted resource instances. Assertions test all required and optional response HTTP Headers and validate the returned payload.
Version2Latest2
Content
<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">  
    <id value="fhir-api-r4-patient-delete-03-conditional-multiple"/>  
    <text> 
        <status value="generated"/>  
        <div xmlns="http://www.w3.org/1999/xhtml">  
            <p>FHIR API R4 (v3.3.0) - Patient Delete Conditional Multiple Resource Suite</p> 
        </div> 
    </text>  
    <url value="http://wildfhir.aegis.net/fhir3-3-0/TestScript/fhir-api-r4-patient-delete-03-conditional-multiple"/>  
    <name value="FHIR API R4 (v3.3.0) - Patient Delete Conditional Multiple Resource Suite"/>  
    <status value="active"/>  
    <date value="2018-04-06"/>  
    <publisher value="AEGIS.net, Inc."/>  
    <contact> 
        <name value="Touchstone Support"/>  
        <telecom> 
            <system value="email"/>  
            <value value="Touchstone_Support@aegis.net"/>  
            <use value="work"/> 
        </telecom> 
    </contact>  
    <description value="FHIR API R4 (v3.3.0) Advanced Operation Tests - Patient delete conditional test suite against a single server that supports deletion of multiple resources for a known valid resource instance, a non-existent resource instance and a known deleted resource instance. The destination server must also support the create, read and search operations in order to setup (create) the required resource instances and verify the deleted resource instances. Assertions test all required and optional response HTTP Headers and validate the returned payload."/>  
    <copyright value="© AEGIS.net, Inc. 2015+"/>  
    <fixture id="resource-delete-conditional-multiple-01-json-single"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-delete-conditional-multiple-01-json-single.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-delete-conditional-multiple-01-json-multiple1"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-delete-conditional-multiple-01-json-multiple1.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-delete-conditional-multiple-01-json-multiple2"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-delete-conditional-multiple-01-json-multiple2.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-delete-conditional-multiple-02-xml-single"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-delete-conditional-multiple-02-xml-single.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-delete-conditional-multiple-02-xml-multiple1"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-delete-conditional-multiple-02-xml-multiple1.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-delete-conditional-multiple-02-xml-multiple2"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-delete-conditional-multiple-02-xml-multiple2.xml"/> 
        </resource> 
    </fixture>  
    <profile id="resource-profile"> 
        <reference value="http://hl7.org/fhir/StructureDefinition/Patient"/> 
    </profile>  
    <profile id="resource-bundle-profile"> 
        <reference value="http://hl7.org/fhir/StructureDefinition/Bundle"/> 
    </profile>  
    <profile id="resource-operationoutcome-profile"> 
        <reference value="http://hl7.org/fhir/StructureDefinition/OperationOutcome"/> 
    </profile>  
    <variable> 
        <name value="delete-conditional-multiple-01-json-single-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="delete-conditional-multiple-01-json-single-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-01-json-single-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-delete-conditional-multiple-01-json-single"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-01-json-single-family"/>  
        <path value="Patient/name[1]/family"/>  
        <sourceId value="resource-delete-conditional-multiple-01-json-single"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-01-json-single-given"/>  
        <path value="Patient/name[1]/given[1]"/>  
        <sourceId value="resource-delete-conditional-multiple-01-json-single"/> 
    </variable>  
    <variable> 
        <name value="delete-conditional-multiple-01-json-multiple1-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="delete-conditional-multiple-01-json-multiple1-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-01-json-multiple1-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-delete-conditional-multiple-01-json-multiple1"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-01-json-multiple1-family"/>  
        <path value="Patient/name[1]/family"/>  
        <sourceId value="resource-delete-conditional-multiple-01-json-multiple1"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-01-json-multiple1-given"/>  
        <path value="Patient/name[1]/given[1]"/>  
        <sourceId value="resource-delete-conditional-multiple-01-json-multiple1"/> 
    </variable>  
    <variable> 
        <name value="delete-conditional-multiple-01-json-multiple2-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="delete-conditional-multiple-01-json-multiple2-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-01-json-multiple2-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-delete-conditional-multiple-01-json-multiple2"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-01-json-multiple2-family"/>  
        <path value="Patient/name[1]/family"/>  
        <sourceId value="resource-delete-conditional-multiple-01-json-multiple2"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-01-json-multiple2-given"/>  
        <path value="Patient/name[1]/given[1]"/>  
        <sourceId value="resource-delete-conditional-multiple-01-json-multiple2"/> 
    </variable>  
    <variable> 
        <name value="delete-conditional-multiple-02-xml-single-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="delete-conditional-multiple-02-xml-single-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-02-xml-single-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-delete-conditional-multiple-02-xml-single"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-02-xml-single-family"/>  
        <path value="Patient/name[1]/family"/>  
        <sourceId value="resource-delete-conditional-multiple-02-xml-single"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-02-xml-single-given"/>  
        <path value="Patient/name[1]/given[1]"/>  
        <sourceId value="resource-delete-conditional-multiple-02-xml-single"/> 
    </variable>  
    <variable> 
        <name value="delete-conditional-multiple-02-xml-multiple1-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="delete-conditional-multiple-02-xml-multiple1-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-02-xml-multiple1-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-delete-conditional-multiple-02-xml-multiple1"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-02-xml-multiple1-family"/>  
        <path value="Patient/name[1]/family"/>  
        <sourceId value="resource-delete-conditional-multiple-02-xml-multiple1"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-02-xml-multiple1-given"/>  
        <path value="Patient/name[1]/given[1]"/>  
        <sourceId value="resource-delete-conditional-multiple-02-xml-multiple1"/> 
    </variable>  
    <variable> 
        <name value="delete-conditional-multiple-02-xml-multiple2-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="delete-conditional-multiple-02-xml-multiple2-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-02-xml-multiple2-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-delete-conditional-multiple-02-xml-multiple2"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-02-xml-multiple2-family"/>  
        <path value="Patient/name[1]/family"/>  
        <sourceId value="resource-delete-conditional-multiple-02-xml-multiple2"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-multiple-02-xml-multiple2-given"/>  
        <path value="Patient/name[1]/given[1]"/>  
        <sourceId value="resource-delete-conditional-multiple-02-xml-multiple2"/> 
    </variable>  
    <ruleset id="ruleset-deletevalid-headers-body"> 
        <resource> 
            <reference value="/FHIRCommon/_reference/ruleset/RuleSet-DeleteValidHeadersBody-Groovy.xml"/> 
        </resource>  
        <rule> 
            <ruleId value="assertResponseCodeOkIfBody"/> 
        </rule>  
        <rule> 
            <ruleId value="assertResponseCodeNoContentIfNoBody"/> 
        </rule>  
        <rule> 
            <ruleId value="assertETagIfSupported"/> 
        </rule>  
        <rule> 
            <ruleId value="assertContentTypeIfBody"/> 
        </rule>  
        <rule> 
            <ruleId value="assertContentTypeCharsetIfBody"/> 
        </rule>  
        <rule> 
            <ruleId value="assertOperationOutcomeIfError"/> 
        </rule>  
        <rule> 
            <ruleId value="assertProfileIfOperationOutcome"/>  
            <param> 
                <name value="validateProfileId"/>  
                <value value="resource-operationoutcome-profile"/> 
            </param> 
        </rule> 
    </ruleset>  
    <ruleset id="ruleset-deletenotexists-headers-body"> 
        <resource> 
            <reference value="/FHIRCommon/_reference/ruleset/RuleSet-DeleteNotExistsHeadersBody-Groovy.xml"/> 
        </resource>  
        <rule> 
            <ruleId value="assertResponseCodeOkIfBody"/> 
        </rule>  
        <rule> 
            <ruleId value="assertResponseCodeNoContentIfNoBody"/> 
        </rule>  
        <rule> 
            <ruleId value="assertContentTypeIfBody"/> 
        </rule>  
        <rule> 
            <ruleId value="assertContentTypeCharsetIfBody"/> 
        </rule>  
        <rule> 
            <ruleId value="assertOperationOutcomeIfError"/> 
        </rule>  
        <rule> 
            <ruleId value="assertProfileIfOperationOutcome"/>  
            <param> 
                <name value="validateProfileId"/>  
                <value value="resource-operationoutcome-profile"/> 
            </param> 
        </rule> 
    </ruleset>  
    <setup> 
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="System-generated search and delete operations from conditional delete to insure the single Patient resource for testing in JSON format does not exist on the server."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-01-json-single-identifier}&amp;given=${search-delete-conditional-multiple-01-json-single-given}&amp;family=${search-delete-conditional-multiple-01-json-single-family}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Create the Patient resource for testing in JSON format a single match on the destination server."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-delete-conditional-multiple-01-json-single"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the JSON formatted created test Patient by the unique identifier."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-01-json-single-identifier}"/>  
                <responseId value="delete-conditional-multiple-01-json-single-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-delete-conditional-multiple-01-json-single"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="System-generated search and delete operations from conditional delete to insure the multiple1 Patient resource for testing in JSON format does not exist on the server."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-01-json-multiple1-identifier}&amp;given=${search-delete-conditional-multiple-01-json-multiple1-given}&amp;family=${search-delete-conditional-multiple-01-json-multiple1-family}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Create the first Patient resource for testing in JSON format multiple matches on the destination server."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-delete-conditional-multiple-01-json-multiple1"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the JSON formatted created test Patient by the unique identifier."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-01-json-multiple1-identifier}"/>  
                <responseId value="delete-conditional-multiple-01-json-multiple1-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-delete-conditional-multiple-01-json-multiple1"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="System-generated search and delete operations from conditional delete to insure the multiple2 Patient resource for testing in JSON format does not exist on the server."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-01-json-multiple2-identifier}&amp;given=${search-delete-conditional-multiple-01-json-multiple2-given}&amp;family=${search-delete-conditional-multiple-01-json-multiple2-family}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Create the second Patient resource for testing in JSON format multiple matches on the destination server."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-delete-conditional-multiple-01-json-multiple2"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the JSON formatted created test Patient by the unique identifier."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-01-json-multiple2-identifier}"/>  
                <responseId value="delete-conditional-multiple-01-json-multiple2-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-delete-conditional-multiple-01-json-multiple2"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="System-generated search and delete operations from conditional delete to insure the single Patient resource for testing in XML format does not exist on the server."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-02-xml-single-identifier}&amp;given=${search-delete-conditional-multiple-02-xml-single-given}&amp;family=${search-delete-conditional-multiple-02-xml-single-family}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Create the Patient resource for testing in XML format a single match on the destination server."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-delete-conditional-multiple-02-xml-single"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the XML formatted created test Patient by the unique identifier."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-02-xml-single-identifier}"/>  
                <responseId value="delete-conditional-multiple-02-xml-single-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <contentType value="xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-delete-conditional-multiple-02-xml-single"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="System-generated search and delete operations from conditional delete to insure the multiple1 Patient resource for testing in XML format does not exist on the server."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-02-xml-multiple1-identifier}&amp;given=${search-delete-conditional-multiple-02-xml-multiple1-given}&amp;family=${search-delete-conditional-multiple-02-xml-multiple1-family}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Create the first Patient resource for testing in XML format multiple matches on the destination server."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-delete-conditional-multiple-02-xml-multiple1"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the JSON formatted created test Patient by the unique identifier."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-02-xml-multiple1-identifier}"/>  
                <responseId value="delete-conditional-multiple-02-xml-multiple1-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <contentType value="xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-delete-conditional-multiple-02-xml-multiple1"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="System-generated search and delete operations from conditional delete to insure the multiple2 Patient resource for testing in XML format does not exist on the server."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-02-xml-multiple2-identifier}&amp;given=${search-delete-conditional-multiple-02-xml-multiple2-given}&amp;family=${search-delete-conditional-multiple-02-xml-multiple2-family}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Create the second Patient resource for testing in XML format multiple matches on the destination server."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-delete-conditional-multiple-02-xml-multiple2"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the JSON formatted created test Patient by the unique identifier."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-02-xml-multiple2-identifier}"/>  
                <responseId value="delete-conditional-multiple-02-xml-multiple2-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <contentType value="xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-delete-conditional-multiple-02-xml-multiple2"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </setup>  
    <test id="01-DeleteConditionalNoMatchJSON"> 
        <name value="DeleteConditionalNoMatchJSON"/>  
        <description value="Test the conditional delete operation using JSON formatting where no matches are found. The expected response is either a 200 (OK) with an optional OperationOutcome in JSON format or 204 (No Content) and the content is empty; i.e. no content."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="deleteCondMultiple"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient conditional delete operation where no matches are found."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?family=NOMATCHESFOUNDLASTNAMEJSON&amp;given=NOMATCHESFOUNDFIRSTNAMEJSON"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200 (OK), 204 (No Content) or 404 (Not Found)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="200,204,404"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected delete ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-deletenotexists-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+json"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="02-DeleteConditionalNoMatchXML"> 
        <name value="DeleteConditionalNoMatchXML"/>  
        <description value="Test the conditional delete operation using XML formatting where no matches are found. The expected response is either a 200 (OK) with an optional OperationOutcome in XML format or 204 (No Content) and the content is empty; i.e. no content."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="deleteCondMultiple"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient conditional delete operation where no matches are found."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?family=NOMATCHESFOUNDLASTNAMEXML&amp;given=NOMATCHESFOUNDFIRSTNAMEXML"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200 (OK), 204 (No Content) or 404 (Not Found)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="200,204,404"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected delete ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-deletenotexists-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+xml"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="03-DeleteConditionalOneMatchJSON"> 
        <name value="DeleteConditionalOneMatchJSON"/>  
        <description value="Test the conditional delete operation with a match on a single known valid resource instance using JSON formatting. The expected response is either a 200 (OK) with an optional OperationOutcome in JSON format or 204 (No Content) and the content is empty; i.e. no content."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="deleteCondMultiple"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient conditional delete operation of a known valid resource instance."/>  
                <accept value="none"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?family=${search-delete-conditional-multiple-01-json-single-family}&amp;given=${search-delete-conditional-multiple-01-json-single-given}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200 (OK), 204 (No Content) or 404 (Not Found)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="200,204,404"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected delete ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-deletevalid-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+json"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="read"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Read the deleted Patient and verify the response is 410 (Gone) or 404 (Not Found) for servers that do not support versioning. The Accept header JSON format is defined for an optionally returned OperationOutcome resource."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${delete-conditional-multiple-01-json-single-id}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 404(Not Found) or 410(Gone)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="404,410"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the deleted Patient by the unique identifier and verify that no matching resource instances are found."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-01-json-single-identifier}"/>  
                <responseId value="delete-conditional-multiple-01-json-single-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <direction value="response"/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <direction value="response"/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Bundle conforms to the base FHIR specification."/>  
                <direction value="response"/>  
                <validateProfileId value="resource-bundle-profile"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that there are no records returned."/>  
                <direction value="response"/>  
                <operator value="equals"/>  
                <path value="/Bundle/total"/>  
                <value value="0"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that no entries exist in the Bundle"/>  
                <direction value="response"/>  
                <expression value="where(entry.resource).empty()"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="04-DeleteConditionalOneMatchXML"> 
        <name value="DeleteConditionalOneMatchXML"/>  
        <description value="Test the conditional delete operation with a match on a single known valid resource instance using XML formatting. The expected response is either a 200 (OK) with an optional OperationOutcome in XML format or 204 (No Content) and the content is empty; i.e. no content."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="deleteCondMultiple"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient conditional delete operation of a known valid resource instance."/>  
                <accept value="none"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?family=${search-delete-conditional-multiple-02-xml-single-family}&amp;given=${search-delete-conditional-multiple-02-xml-single-given}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200 (OK), 204 (No Content) or 404 (Not Found)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="200,204,404"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected delete ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-deletevalid-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+xml"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="read"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Read the deleted Patient and verify the response is 410 (Gone) or 404 (Not Found) for servers that do not support versioning. The Accept header XML format is defined for an optionally returned OperationOutcome resource."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${delete-conditional-multiple-02-xml-single-id}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 404(Not Found) or 410(Gone)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="404,410"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the deleted Patient by the unique identifier and verify that no matching resource instances are found."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-delete-conditional-multiple-02-xml-single-identifier}"/>  
                <responseId value="delete-conditional-multiple-02-xml-single-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <direction value="response"/>  
                <contentType value="xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <direction value="response"/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Bundle conforms to the base FHIR specification."/>  
                <direction value="response"/>  
                <validateProfileId value="resource-bundle-profile"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that there are no records returned."/>  
                <direction value="response"/>  
                <operator value="equals"/>  
                <path value="/Bundle/total"/>  
                <value value="0"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that no entries exist in the Bundle"/>  
                <direction value="response"/>  
                <expression value="where(entry.resource).empty()"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="05-DeleteConditionalMultipleMatchesJSON"> 
        <name value="DeleteConditionalMultipleMatchesJSON"/>  
        <description value="Test the conditional delete operation with a match on multiple known valid resource instances using JSON formatting. The expected response is either a 200 (OK) with an optional OperationOutcome in JSON format or 204 (No Content) and the content is empty; i.e. no content."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="deleteCondMultiple"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient conditional delete operation with a match on multiple known valid resource instances."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?family=LastnameMJSON"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200 (OK), 204 (No Content) or 404 (Not Found)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="200,204,404"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected delete ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-deletenotexists-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+json"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="read"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Read the multiple1 deleted Patient and verify the response is 410 (Gone) or 404 (Not Found) for servers that do not support versioning. The Accept header JSON format is defined for an optionally returned OperationOutcome resource."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${delete-conditional-multiple-01-json-multiple1-id}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 404(Not Found) or 410(Gone)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="404,410"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="read"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Read the multiple2 deleted Patient and verify the response is 410 (Gone) or 404 (Not Found) for servers that do not support versioning. The Accept header JSON format is defined for an optionally returned OperationOutcome resource."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${delete-conditional-multiple-01-json-multiple2-id}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 404(Not Found) or 410(Gone)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="404,410"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the deleted Patients by the family name and verify that no matching resource instances are found."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?family=LastnameMJSON"/>  
                <responseId value="delete-conditional-multiple-01-json-single-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <direction value="response"/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <direction value="response"/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Bundle conforms to the base FHIR specification."/>  
                <direction value="response"/>  
                <validateProfileId value="resource-bundle-profile"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that there are no records returned."/>  
                <direction value="response"/>  
                <operator value="equals"/>  
                <path value="/Bundle/total"/>  
                <value value="0"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that no entries exist in the Bundle"/>  
                <direction value="response"/>  
                <expression value="where(entry.resource).empty()"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="06-DeleteConditionalMultipleMatchesXML"> 
        <name value="DeleteConditionalMultipleMatchesXML"/>  
        <description value="Test the conditional delete operation with a match on multiple known valid resource instances using XML formatting. The expected response is either a 200 (OK) with an optional OperationOutcome in XML format or 204 (No Content) and the content is empty; i.e. no content."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="deleteCondMultiple"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient conditional delete operation with a match on multiple known valid resource instances."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?family=LastnameMXML"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200 (OK), 204 (No Content) or 404 (Not Found)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="200,204,404"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type is present. Warning only as a response content is optional but servers are encouraged to return this with a response code of 200(OK)."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected delete ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-deletenotexists-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+xml"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="read"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Read the multiple1 deleted Patient and verify the response is 410 (Gone) or 404 (Not Found) for servers that do not support versioning. The Accept header XML format is defined for an optionally returned OperationOutcome resource."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${delete-conditional-multiple-02-xml-multiple1-id}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 404(Not Found) or 410(Gone)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="404,410"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="read"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Read the multiple2 deleted Patient and verify the response is 410 (Gone) or 404 (Not Found) for servers that do not support versioning. The Accept header XML format is defined for an optionally returned OperationOutcome resource."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${delete-conditional-multiple-02-xml-multiple2-id}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 404(Not Found) or 410(Gone)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="404,410"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the deleted Patients by the family name and verify that no matching resource instances are found."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?family=LastnameMXML"/>  
                <responseId value="delete-conditional-multiple-02-xml-single-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <direction value="response"/>  
                <contentType value="xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <direction value="response"/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Bundle conforms to the base FHIR specification."/>  
                <direction value="response"/>  
                <validateProfileId value="resource-bundle-profile"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that there are no records returned."/>  
                <direction value="response"/>  
                <operator value="equals"/>  
                <path value="/Bundle/total"/>  
                <value value="0"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that no entries exist in the Bundle"/>  
                <direction value="response"/>  
                <expression value="where(entry.resource).empty()"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test> 
</TestScript>