Test Script

Name/FHIR1-8-0-Advanced/Patient/05-delete/fhir-api-stu3-patient-delete-02-conditional-single
DescriptionFHIR API STU3 Advanced Operation Tests - Patient delete conditional test suite against a single server that supports only single deletion 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.
Version1Latest1
Content
<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">  
    <id value="fhir-api-stu3-patient-delete-02-conditional-single"/>  
    <text> 
        <status value="generated"/>  
        <div xmlns="http://www.w3.org/1999/xhtml">  
            <p>FHIR API STU3 - Patient Delete Conditional Single Resource Suite</p> 
        </div> 
    </text>  
    <url value="http://wildfhir.aegis.net/fhir/TestScript/fhir-api-stu3-patient-delete-02-conditional-single"/>  
    <name value="FHIR API STU3 - Patient Delete Conditional Single Resource Suite"/>  
    <status value="draft"/>  
    <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>  
    <date value="2016-12-13"/>  
    <description value="FHIR API STU3 Advanced Operation Tests - Patient delete conditional test suite against a single server that supports only single deletion 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+"/>  
    <metadata> 
        <capability> 
            <required value="true"/>  
            <description value="Conditional Delete (Single), Create, Read and Search Operations"/>  
            <link value="http://hl7.org/fhir/2017Jan/http.html#read"/>  
            <link value="http://hl7.org/fhir/2017Jan/http.html#create"/>  
            <link value="http://hl7.org/fhir/2017Jan/http.html#search"/>  
            <link value="http://hl7.org/fhir/2017Jan/http.html#delete"/>  
            <capabilities> 
                <reference value="../_reference/capabilities/PatientDeleteConditionalSingle.xml"/> 
            </capabilities> 
        </capability> 
    </metadata>  
    <fixture id="resource-delete-conditional-single-01-json-single"> 
        <resource> 
            <reference value="../_reference/resources/Patient-delete-conditional-single-01-json-single.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-delete-conditional-single-02-xml-single"> 
        <resource> 
            <reference value="../_reference/resources/Patient-delete-conditional-single-02-xml-single.xml"/> 
        </resource> 
    </fixture>  
    <profile id="resource-profile"> 
        <reference value="http://hl7.org/fhir/StructureDefinition/Patient"/> 
    </profile>  
    <variable> 
        <name value="delete-conditional-single-01-json-single-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="delete-conditional-single-01-json-single-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-single-01-json-single-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-delete-conditional-single-01-json-single"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-single-01-json-single-family"/>  
        <path value="Patient/name[1]/family"/>  
        <sourceId value="resource-delete-conditional-single-01-json-single"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-single-01-json-single-given"/>  
        <path value="Patient/name[1]/given[1]"/>  
        <sourceId value="resource-delete-conditional-single-01-json-single"/> 
    </variable>  
    <variable> 
        <name value="delete-conditional-single-02-xml-single-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="delete-conditional-single-02-xml-single-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-single-02-xml-single-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-delete-conditional-single-02-xml-single"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-single-02-xml-single-family"/>  
        <path value="Patient/name[1]/family"/>  
        <sourceId value="resource-delete-conditional-single-02-xml-single"/> 
    </variable>  
    <variable> 
        <name value="search-delete-conditional-single-02-xml-single-given"/>  
        <path value="Patient/name[1]/given[1]"/>  
        <sourceId value="resource-delete-conditional-single-02-xml-single"/> 
    </variable>  
    <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 Patient resource for testing in JSON format does not exist on the server."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <params value="?identifier=${search-delete-conditional-single-01-json-single-identifier}&amp;given=${search-delete-conditional-single-01-json-single-given}&amp;family=${search-delete-conditional-single-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"/>  
                <sourceId value="resource-delete-conditional-single-01-json-single"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/> 
            </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"/>  
                <params value="?identifier=${search-delete-conditional-single-01-json-single-identifier}"/>  
                <responseId value="delete-conditional-single-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"/> 
            </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"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-delete-conditional-single-01-json-single"/> 
            </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 Patient resource for testing in XML format does not exist on the server."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <params value="?identifier=${search-delete-conditional-single-02-xml-single-identifier}&amp;given=${search-delete-conditional-single-02-xml-single-given}&amp;family=${search-delete-conditional-single-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="json"/>  
                <contentType value="json"/>  
                <sourceId value="resource-delete-conditional-single-02-xml-single"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/> 
            </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"/>  
                <params value="?identifier=${search-delete-conditional-single-02-xml-single-identifier}"/>  
                <responseId value="delete-conditional-single-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"/> 
            </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"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-delete-conditional-single-02-xml-single"/> 
            </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 200 (OK) with an optional OperationOutcome resource in JSON format, or 204 (No Content) where the response payload is empty."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="deleteCondSingle"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient conditional delete operation where no matches are found. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <params value="?family=NOMATCHESFOUNDLASTNAMEJSON&amp;given=NOMATCHESFOUNDFIRSTNAMEJSON"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is either 200(OK) or 204(No Content)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="200,204"/> 
            </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."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'. Warning only as a response content is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+json"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only as a response content is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="charset=utf-8"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header ETag is not present. Warning only to allow subsequent asserts to execute."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="empty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is not present. Warning only to allow subsequent asserts to execute."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="empty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is not present. Warning only to allow subsequent asserts to execute."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="empty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is OperationOutcome. Warning only as this is optional but servers are encouraged to return an OperationOutcome when conditional delete does not find any matches."/>  
                <resource value="OperationOutcome"/>  
                <warningOnly value="true"/> 
            </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 200 (OK) with an optional OperationOutcome resource in XML format, or 204 (No Content) where the response payload is empty."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="deleteCondSingle"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient conditional delete operation where no matches are found. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <params value="?family=NOMATCHESFOUNDLASTNAMEXML&amp;given=NOMATCHESFOUNDFIRSTNAMEXML"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is either 200(OK) or 204(No Content)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="200,204"/> 
            </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."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'. Warning only as a response content is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+xml"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only as a response content is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="charset=utf-8"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header ETag is not present. Warning only to allow subsequent asserts to execute."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="empty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is not present. Warning only to allow subsequent asserts to execute."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="empty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is not present. Warning only to allow subsequent asserts to execute."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="empty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is OperationOutcome. Warning only as this is optional but servers are encouraged to return an OperationOutcome when conditional delete does not find any matches."/>  
                <resource value="OperationOutcome"/>  
                <warningOnly value="true"/> 
            </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 200 (OK) with an optional OperationOutcome resource in JSON format, or 204 (No Content) where the response payload is empty."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="deleteCondSingle"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient conditional delete operation of a known valid resource instance. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="none"/>  
                <contentType value="none"/>  
                <params value="?family=${search-delete-conditional-single-01-json-single-family}&amp;given=${search-delete-conditional-single-01-json-single-given}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is either 200(OK) or 204(No Content)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="200,204"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type is not present. Warning only as the server may set this header by default."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="empty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header ETag is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is not present. Warning only to allow subsequent asserts to execute."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="empty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is not present. Warning only to allow subsequent asserts to execute."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="empty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is OperationOutcome. Warning only as this is optional but servers are encouraged to return an OperationOutcome when conditional delete does not find any matches."/>  
                <resource value="OperationOutcome"/>  
                <warningOnly value="true"/> 
            </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"/>  
                <params value="/${delete-conditional-single-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"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'. Warning only as a response content is optional but servers are encouraged to return this."/>  
                <contentType value="json"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is OperationOutcome. Warning only as this is optional but servers are encouraged to return an OperationOutcome for any additional information."/>  
                <resource value="OperationOutcome"/>  
                <warningOnly value="true"/> 
            </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"/>  
                <params value="?identifier=${search-delete-conditional-single-01-json-single-identifier}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/> 
            </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"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that there are no records returned."/>  
                <operator value="equals"/>  
                <path value="/Bundle/total"/>  
                <value value="0"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that no entries exist in the Bundle"/>  
                <expression value="where(entry).empty()"/> 
            </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 200 (OK) with an optional OperationOutcome resource in XML format, or 204 (No Content) where the response payload is empty."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="deleteCondSingle"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient conditional delete operation of a known valid resource instance. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="none"/>  
                <contentType value="none"/>  
                <params value="?family=${search-delete-conditional-single-02-xml-single-family}&amp;given=${search-delete-conditional-single-02-xml-single-given}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is either 200(OK) or 204(No Content)."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="200,204"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type is not present. Warning only as the server may set this header by default."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="empty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header ETag is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is not present. Warning only to allow subsequent asserts to execute."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="empty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is not present. Warning only to allow subsequent asserts to execute."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="empty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is OperationOutcome. Warning only as this is optional but servers are encouraged to return an OperationOutcome when conditional delete does not find any matches."/>  
                <resource value="OperationOutcome"/>  
                <warningOnly value="true"/> 
            </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"/>  
                <params value="/${delete-conditional-single-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"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'. Warning only as a response content is optional but servers are encouraged to return this."/>  
                <contentType value="xml"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is OperationOutcome. Warning only as this is optional but servers are encouraged to return an OperationOutcome for any additional information."/>  
                <resource value="OperationOutcome"/>  
                <warningOnly value="true"/> 
            </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"/>  
                <params value="?identifier=${search-delete-conditional-single-02-xml-single-identifier}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/> 
            </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"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that there are no records returned."/>  
                <operator value="equals"/>  
                <path value="/Bundle/total"/>  
                <value value="0"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that no entries exist in the Bundle"/>  
                <expression value="where(entry).empty()"/> 
            </assert> 
        </action> 
    </test> 
</TestScript>