Test Script

Name/FHIR4-0-0-Advanced/Patient/04-update/fhir-api-r4-patient-update-02-notok
DescriptionFHIR API R4 (v4.0.0) Advanced Operation Tests - Patient update test suite against a single server using invalid resource instances where all the expected results are not successful. The expected outcome of each test execution is a failed update operation. The destination server must also support the create, search and delete operations in order to determine the generated resource id and then clean up any created resources. Testing for 422 (Unprocessable Entity) is out of scope and not included. 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-update-02-notok"/>  
    <meta> 
        <profile value="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript"/> 
    </meta>  
    <text> 
        <status value="generated"/>  
        <div xmlns="http://www.w3.org/1999/xhtml">  
            <p>FHIR API R4 (v4.0.0) - Patient Update Not OK Resource Suite</p> 
        </div> 
    </text>  
    <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-ruleset"> 
        <extension url="rulesetId"> 
            <valueId value="ruleset-updatenotok-headers-body"/> 
        </extension>  
        <extension url="path"> 
            <valueString value="/FHIRCommon/_reference/ruleset/RuleSet-UpdateNotOkHeadersBody-Groovy.xml"/> 
        </extension>  
        <extension url="rule"> 
            <extension url="ruleId"> 
                <valueId value="assertContentTypeIfBody"/> 
            </extension> 
        </extension>  
        <extension url="rule"> 
            <extension url="ruleId"> 
                <valueId value="assertContentTypeCharsetIfBody"/> 
            </extension> 
        </extension>  
        <extension url="rule"> 
            <extension url="ruleId"> 
                <valueId value="assertOperationOutcomeIfError"/> 
            </extension> 
        </extension>  
        <extension url="rule"> 
            <extension url="ruleId"> 
                <valueId value="assertProfileIfOperationOutcome"/> 
            </extension>  
            <extension url="param"> 
                <extension url="name"> 
                    <valueString value="validateProfileId"/> 
                </extension>  
                <extension url="value"> 
                    <valueString value="resource-operationoutcome-profile"/> 
                </extension> 
            </extension> 
        </extension> 
    </extension>  
    <url value="http://wildfhir.aegis.net/fhir4-0-0/TestScript/fhir-api-r4-patient-update-02-notok"/>  
    <name value="FHIR API R4 (v4.0.0) - Patient Update Not OK Resource Suite"/>  
    <status value="active"/>  
    <date value="2019-01-02"/>  
    <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 (v4.0.0) Advanced Operation Tests - Patient update test suite against a single server using invalid resource instances where all the expected results are not successful. The expected outcome of each test execution is a failed update operation. The destination server must also support the create, search and delete operations in order to determine the generated resource id and then clean up any created resources. Testing for 422 (Unprocessable Entity) is out of scope and not included. Assertions test all required and optional response HTTP Headers and validate the returned payload."/>  
    <copyright value="(c) AEGIS.net, Inc. 2019"/>  
    <fixture id="resource-update-notok-01-json-setup"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-update-notok-01-json-setup.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-notok-01-json-noid"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-update-notok-01-json-noid.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-notok-01-json-invalid-syntax"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-update-notok-01-json-invalid-syntax.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-notok-01-json-bad-profile"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-update-notok-01-json-bad-profile.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-notok-02-xml-setup"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-update-notok-02-xml-setup.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-notok-02-xml-noid"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-update-notok-02-xml-noid.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-notok-02-xml-invalid-syntax"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-update-notok-02-xml-invalid-syntax.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-notok-02-xml-bad-profile"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-update-notok-02-xml-bad-profile.xml"/> 
        </resource> 
    </fixture>  
    <profile id="resource-profile"> 
        <reference value="http://hl7.org/fhir/StructureDefinition/Patient"/> 
    </profile>  
    <profile id="resource-operationoutcome-profile"> 
        <reference value="http://hl7.org/fhir/StructureDefinition/OperationOutcome"/> 
    </profile>  
    <variable> 
        <name value="update-notok-01-json-setup-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="update-notok-01-json-setup-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-update-notok-01-json-setup-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-update-notok-01-json-setup"/> 
    </variable>  
    <variable> 
        <name value="update-notok-02-xml-setup-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="update-notok-02-xml-setup-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-update-notok-02-xml-setup-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-update-notok-02-xml-setup"/> 
    </variable>  
    <setup> 
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/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 1 does not exist on the server."/>  
                <accept value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-update-notok-01-json-setup-identifier}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/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 2 does not exist on the server."/>  
                <accept value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-update-notok-02-xml-setup-identifier}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Create the Patient resource for test 01 in JSON format on the destination server."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-update-notok-01-json-setup"/> 
            </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://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the test 01 created Patient by the unique identifier."/>  
                <accept value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-update-notok-01-json-setup-identifier}"/>  
                <responseId value="update-notok-01-json-setup-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-update-notok-01-json-setup"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Create the Patient resource for test 02 in XML format on the destination server."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-update-notok-02-xml-setup"/> 
            </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://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the test 02 created Patient by the unique identifier."/>  
                <accept value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-update-notok-02-xml-setup-identifier}"/>  
                <responseId value="update-notok-02-xml-setup-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-update-notok-02-xml-setup"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </setup>  
    <test id="01-UpdateNotOKJSONNoId"> 
        <name value="UpdateNotOKJSONNoId"/>  
        <description value="Test the update operation with JSON content where the request resource content does not contain a resource id. The expected HTTP response is 400 (Bad Request) and optional content of an OperationOutcome resource in JSON format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation with JSON content where the request resource content does not contain a resource id."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${update-notok-01-json-setup-id}"/>  
                <sourceId value="resource-update-notok-01-json-noid"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 400(Bad Request)."/>  
                <direction value="response"/>  
                <responseCode value="400"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header ETag is not present."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is not present."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is not present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-ruleset"> 
                    <extension url="rulesetId"> 
                        <valueId value="ruleset-updatenotok-headers-body"/> 
                    </extension>  
                    <extension url="rule"> 
                        <extension url="ruleId"> 
                            <valueId value="assertContentTypeMimeTypeIfBody"/> 
                        </extension>  
                        <extension url="param"> 
                            <extension url="name"> 
                                <valueString value="headerExpectedValue"/> 
                            </extension>  
                            <extension url="value"> 
                                <valueString value="application/fhir+json"/> 
                            </extension> 
                        </extension> 
                    </extension> 
                </extension>  
                <description value="Complex ruleset assertion to conditionally validate expected update not ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="02-UpdateNotOKXMLNoId"> 
        <name value="UpdateNotOKXMLNoId"/>  
        <description value="Test the update operation with XML content where the request resource content does not contain a resource id. The expected HTTP response is 400 (Bad Request) and optional content of an OperationOutcome resource in XML format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with XML content where the request resource content does not contain a resource id."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${update-notok-02-xml-setup-id}"/>  
                <sourceId value="resource-update-notok-02-xml-noid"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 400(Bad Request)."/>  
                <direction value="response"/>  
                <responseCode value="400"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header ETag is not present."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is not present."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is not present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-ruleset"> 
                    <extension url="rulesetId"> 
                        <valueId value="ruleset-updatenotok-headers-body"/> 
                    </extension>  
                    <extension url="rule"> 
                        <extension url="ruleId"> 
                            <valueId value="assertContentTypeMimeTypeIfBody"/> 
                        </extension>  
                        <extension url="param"> 
                            <extension url="name"> 
                                <valueString value="headerExpectedValue"/> 
                            </extension>  
                            <extension url="value"> 
                                <valueString value="application/fhir+xml"/> 
                            </extension> 
                        </extension> 
                    </extension> 
                </extension>  
                <description value="Complex ruleset assertion to conditionally validate expected update not ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="03-UpdateNotOKJSONInvalidSyntax"> 
        <name value="UpdateNotOKJSONInvalidSyntax"/>  
        <description value="Test the update operation with JSON content where the request resource content is invalid based on an invalid birthDate date value. The expected HTTP response is 400 (Bad Request) and optional content of an OperationOutcome resource in JSON format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation with JSON content where the request resource content is invalid based on invalid birthDate date value."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${update-notok-01-json-setup-id}"/>  
                <sourceId value="resource-update-notok-01-json-invalid-syntax"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 400(Bad Request)."/>  
                <direction value="response"/>  
                <responseCode value="400"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header ETag is not present."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is not present."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is not present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-ruleset"> 
                    <extension url="rulesetId"> 
                        <valueId value="ruleset-updatenotok-headers-body"/> 
                    </extension>  
                    <extension url="rule"> 
                        <extension url="ruleId"> 
                            <valueId value="assertContentTypeMimeTypeIfBody"/> 
                        </extension>  
                        <extension url="param"> 
                            <extension url="name"> 
                                <valueString value="headerExpectedValue"/> 
                            </extension>  
                            <extension url="value"> 
                                <valueString value="application/fhir+json"/> 
                            </extension> 
                        </extension> 
                    </extension> 
                </extension>  
                <description value="Complex ruleset assertion to conditionally validate expected update not ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="04-UpdateNotOKXMLInvalidSyntax"> 
        <name value="UpdateNotOKXMLInvalidSyntax"/>  
        <description value="Test the update operation with XML content where the request resource content is invalid based on invalid birthDate date value. The expected HTTP response is 400 (Bad Request) and optional content of an OperationOutcome resource in XML format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation with XML content where the request resource content is invalid based on invalid birthDate date value."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${update-notok-02-xml-setup-id}"/>  
                <sourceId value="resource-update-notok-02-xml-invalid-syntax"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 400(Bad Request)."/>  
                <direction value="response"/>  
                <responseCode value="400"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header ETag is not present."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is not present."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is not present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-ruleset"> 
                    <extension url="rulesetId"> 
                        <valueId value="ruleset-updatenotok-headers-body"/> 
                    </extension>  
                    <extension url="rule"> 
                        <extension url="ruleId"> 
                            <valueId value="assertContentTypeMimeTypeIfBody"/> 
                        </extension>  
                        <extension url="param"> 
                            <extension url="name"> 
                                <valueString value="headerExpectedValue"/> 
                            </extension>  
                            <extension url="value"> 
                                <valueString value="application/fhir+xml"/> 
                            </extension> 
                        </extension> 
                    </extension> 
                </extension>  
                <description value="Complex ruleset assertion to conditionally validate expected update not ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="05-UpdateNotOKJSONBadProfile"> 
        <name value="UpdateNotOKJSONBadProfile"/>  
        <description value="Test the update operation with JSON content where the request resource content is invalid based on non-conformance to the base FHIR resource profile. The expected HTTP response is 400 (Bad Request) and optional content of an OperationOutcome resource in JSON format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation with JSON content where the request resource content is invalid based on non-conformance to the base FHIR resource profile."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${update-notok-01-json-setup-id}"/>  
                <sourceId value="resource-update-notok-01-json-bad-profile"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 400(Bad Request)."/>  
                <direction value="response"/>  
                <responseCode value="400"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header ETag is not present."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is not present."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is not present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-ruleset"> 
                    <extension url="rulesetId"> 
                        <valueId value="ruleset-updatenotok-headers-body"/> 
                    </extension>  
                    <extension url="rule"> 
                        <extension url="ruleId"> 
                            <valueId value="assertContentTypeMimeTypeIfBody"/> 
                        </extension>  
                        <extension url="param"> 
                            <extension url="name"> 
                                <valueString value="headerExpectedValue"/> 
                            </extension>  
                            <extension url="value"> 
                                <valueString value="application/fhir+json"/> 
                            </extension> 
                        </extension> 
                    </extension> 
                </extension>  
                <description value="Complex ruleset assertion to conditionally validate expected update not ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="06-UpdateNotOKXMLBadProfile"> 
        <name value="UpdateNotOKXMLBadProfile"/>  
        <description value="Test the update operation with XML content where the request resource content is invalid based on non-conformance to the base FHIR resource profile. The expected HTTP response is 400 (Bad Request) and optional content of an OperationOutcome resource in XML format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation with XML content where the request resource content is invalid based on non-conformance to the base FHIR resource profile."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${update-notok-02-xml-setup-id}"/>  
                <sourceId value="resource-update-notok-02-xml-bad-profile"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 400(Bad Request)."/>  
                <direction value="response"/>  
                <responseCode value="400"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header ETag is not present."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is not present."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is not present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="empty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-ruleset"> 
                    <extension url="rulesetId"> 
                        <valueId value="ruleset-updatenotok-headers-body"/> 
                    </extension>  
                    <extension url="rule"> 
                        <extension url="ruleId"> 
                            <valueId value="assertContentTypeMimeTypeIfBody"/> 
                        </extension>  
                        <extension url="param"> 
                            <extension url="name"> 
                                <valueString value="headerExpectedValue"/> 
                            </extension>  
                            <extension url="value"> 
                                <valueString value="application/fhir+xml"/> 
                            </extension> 
                        </extension> 
                    </extension> 
                </extension>  
                <description value="Complex ruleset assertion to conditionally validate expected update not ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <teardown> 
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${update-notok-01-json-setup-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${update-notok-02-xml-setup-id}"/> 
            </operation> 
        </action> 
    </teardown> 
</TestScript>