Test Script

Name/FHIR1-8-0-Advanced/Patient/04-update/fhir-api-stu3-patient-update-05-version-aware
DescriptionFHIR API STU3 Advanced Operation Tests - Patient update version aware test suite against a single server using valid resource instances where expected results include successful and failed update operations. The destination server must also support the create, search, read and delete operations in order to setup (create) the required resource instances, determine the generated resource id, verify the updated resource instances and clean up the created/updated resources. 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-update-05-version-aware"/>  
    <text> 
        <status value="generated"/>  
        <div xmlns="http://www.w3.org/1999/xhtml">  
            <p>FHIR API STU3 - Patient Update Version Aware Resource Suite</p> 
        </div> 
    </text>  
    <url value="http://wildfhir.aegis.net/fhir/TestScript/fhir-api-stu3-patient-update-05-version-aware"/>  
    <name value="FHIR API STU3 - Patient Update Version Aware 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 update version aware test suite against a single server using valid resource instances where expected results include successful and failed update operations. The destination server must also support the create, search, read and delete operations in order to setup (create) the required resource instances, determine the generated resource id, verify the updated resource instances and clean up the created/updated resources. 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="Update, Create, Search and Delete Operation"/>  
            <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#update"/>  
            <link value="http://hl7.org/fhir/2017Jan/http.html#delete"/>  
            <capabilities> 
                <reference value="../_reference/capabilities/PatientUpdateVersionAware.xml"/> 
            </capabilities> 
        </capability> 
    </metadata>  
    <fixture id="resource-update-version-aware-01-json-setup"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-01-json-setup.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-01-json-version2"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-01-json-version2.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-01-json-version3"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-01-json-version3.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-01-json-version4"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-01-json-version4.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-01-xml-version4"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-01-xml-version4.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-01-json-version5"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-01-json-version5.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-01-json-version6"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-01-json-version6.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-01-json-version7"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-01-json-version7.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-01-json-version8"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-01-json-version8.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-02-xml-setup"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-02-xml-setup.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-02-xml-version2"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-02-xml-version2.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-02-xml-version3"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-02-xml-version3.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-02-json-version4"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-02-json-version4.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-02-xml-version4"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-02-xml-version4.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-02-xml-version5"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-02-xml-version5.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-02-xml-version6"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-02-xml-version6.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-02-xml-version7"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-02-xml-version7.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-version-aware-02-xml-version8"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-version-aware-02-xml-version8.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-version-aware-01-json-setup-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="update-version-aware-01-json-setup-create-response"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-01-json-setup-etag"/>  
        <headerField value="ETag"/>  
        <sourceId value="update-version-aware-01-json-setup-create-response"/> 
    </variable>  
    <variable> 
        <name value="search-update-version-aware-01-json-setup-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-update-version-aware-01-json-setup"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-02-xml-setup-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="update-version-aware-02-xml-setup-create-response"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-02-xml-setup-etag"/>  
        <headerField value="ETag"/>  
        <sourceId value="update-version-aware-02-xml-setup-create-response"/> 
    </variable>  
    <variable> 
        <name value="search-update-version-aware-02-xml-setup-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-update-version-aware-02-xml-setup"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-01-json-version2-etag"/>  
        <headerField value="ETag"/>  
        <sourceId value="update-version-aware-01-json-version2-update-response"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-02-xml-version2-etag"/>  
        <headerField value="ETag"/>  
        <sourceId value="update-version-aware-02-xml-version2-update-response"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-01-json-version3-etag"/>  
        <headerField value="ETag"/>  
        <sourceId value="update-version-aware-01-json-version3-update-response"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-02-xml-version3-etag"/>  
        <headerField value="ETag"/>  
        <sourceId value="update-version-aware-02-xml-version3-update-response"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-01-json-version4-etag"/>  
        <headerField value="ETag"/>  
        <sourceId value="update-version-aware-01-json-version4-update-response"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-02-xml-version4-etag"/>  
        <headerField value="ETag"/>  
        <sourceId value="update-version-aware-02-xml-version4-update-response"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-01-json-version5-etag"/>  
        <headerField value="ETag"/>  
        <sourceId value="update-version-aware-01-json-version5-update-response"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-02-xml-version5-etag"/>  
        <headerField value="ETag"/>  
        <sourceId value="update-version-aware-02-xml-version5-update-response"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-01-json-version6-etag"/>  
        <headerField value="ETag"/>  
        <sourceId value="update-version-aware-01-json-version6-update-response"/> 
    </variable>  
    <variable> 
        <name value="update-version-aware-02-xml-version6-etag"/>  
        <headerField value="ETag"/>  
        <sourceId value="update-version-aware-02-xml-version6-update-response"/> 
    </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 1 does not exist on the server."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <params value="?identifier=${search-update-version-aware-01-json-setup-identifier}"/> 
            </operation> 
        </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 2 does not exist on the server."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <params value="?identifier=${search-update-version-aware-02-xml-setup-identifier}"/> 
            </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 test 01 in JSON format on the destination server."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <responseId value="update-version-aware-01-json-setup-create-response"/>  
                <sourceId value="resource-update-version-aware-01-json-setup"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header ETag is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </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 test 01 created Patient by the unique identifier."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="?identifier=${search-update-version-aware-01-json-setup-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 returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-update-version-aware-01-json-setup"/> 
            </assert> 
        </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 test 02 in XML format on the destination server."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <responseId value="update-version-aware-02-xml-setup-create-response"/>  
                <sourceId value="resource-update-version-aware-02-xml-setup"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header ETag is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </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 test 02 created Patient by the unique identifier."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="?identifier=${search-update-version-aware-02-xml-setup-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 returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-update-version-aware-02-xml-setup"/> 
            </assert> 
        </action> 
    </setup>  
    <test id="01-UpdateVersionAwareJSON"> 
        <name value="UpdateVersionAwareJSON"/>  
        <description value="Test the update operation with JSON content using the version aware HTTP Header If-Match set to the ETag value of the created resource. The 01-json Patient birth date is updated to define the 2nd version of this resource. The expected response content is the updated Patient resource in JSON format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation with JSON content using the version aware HTTP Header If-Match set to the ETag value of the 01-json-setup created resource. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="${update-version-aware-01-json-setup-etag}"/> 
                </requestHeader>  
                <responseId value="update-version-aware-01-json-version2-update-response"/>  
                <sourceId value="resource-update-version-aware-01-json-version2"/> 
            </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 is present."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/> 
            </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"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+json"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>  
                <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 present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Patient. Warning only as this is optional but servers are encouraged to return the updated resource."/>  
                <resource value="Patient"/>  
                <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 updated Patient and verify the contents match the updated version 2."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/> 
            </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 Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned contents contains the updated version 2 of the Patient."/>  
                <minimumId value="resource-update-version-aware-01-json-version2"/> 
            </assert> 
        </action> 
    </test>  
    <test id="02-UpdateVersionAwareXML"> 
        <name value="UpdateVersionAwareXML"/>  
        <description value="Test the update operation with XML content using the version aware HTTP Header If-Match set to the ETag value of the created resource. The 02-xml Patient birth date is updated to define the 2nd version of this resource. The expected response content is the updated Patient resource in XML format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation with XML content using the version aware HTTP Header If-Match set to the ETag value of the 02-xml-setup created resource. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="${update-version-aware-02-xml-setup-etag}"/> 
                </requestHeader>  
                <responseId value="update-version-aware-02-xml-version2-update-response"/>  
                <sourceId value="resource-update-version-aware-02-xml-version2"/> 
            </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 is present."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/> 
            </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"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+xml"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>  
                <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 present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Patient. Warning only as this is optional but servers are encouraged to return the updated resource."/>  
                <resource value="Patient"/>  
                <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 updated Patient and verify the contents match the updated version 2."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/> 
            </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 Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned contents contains the updated version 2 of the Patient."/>  
                <minimumId value="resource-update-version-aware-02-xml-version2"/> 
            </assert> 
        </action> 
    </test>  
    <test id="03-UpdateVersionAwareJSONAcceptCharset"> 
        <name value="UpdateVersionAwareJSONAcceptCharset"/>  
        <description value="Test the update operation using the version aware HTTP Header If-Match set to the ETag value of the version 2 resource, HTTP Header Accept set to application/fhir+json and Accept-Charset set to utf-8 and no request URL parameters defined. The 02-xml Patient birth time extension is added to define the 3rd version of this resource. The expected response content is the updated Patient resource in JSON format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation using the version aware HTTP Header If-Match set to the ETag value of the created resource, HTTP Header set to application/fhir+json and Accept-Charset set to utf-8 and no request URL parameters defined. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/>  
                <requestHeader> 
                    <field value="Accept"/>  
                    <value value="application/fhir+json"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="Accept-Charset"/>  
                    <value value="utf-8"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="${update-version-aware-01-json-version2-etag}"/> 
                </requestHeader>  
                <responseId value="update-version-aware-01-json-version3-update-response"/>  
                <sourceId value="resource-update-version-aware-01-json-version3"/> 
            </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 is present."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/> 
            </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"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+json"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>  
                <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 present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Patient. Warning only as this is optional but servers are encouraged to return the updated resource."/>  
                <resource value="Patient"/>  
                <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 updated Patient and verify the contents match the updated version 3."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/> 
            </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 Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned contents contains the updated version 3 of the Patient."/>  
                <minimumId value="resource-update-version-aware-01-json-version3"/> 
            </assert> 
        </action> 
    </test>  
    <test id="04-UpdateVersionAwareXMLAcceptCharset"> 
        <name value="UpdateVersionAwareXMLAcceptCharset"/>  
        <description value="Test the update operation using the version aware HTTP Header If-Match set to the ETag value of the version 2 resource, HTTP Header Accept set to application/fhir+xml and Accept-Charset set to utf-8 and no request URL parameters defined. The 02-xml Patient birth time extension is added to define the 3rd version of this resource. The expected response content is the updated Patient resource in XML format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation using the version aware HTTP Header If-Match set to the ETag value of the created resource, HTTP Header set to application/fhir+xml and Accept-Charset set to utf-8 and no request URL parameters defined. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/>  
                <requestHeader> 
                    <field value="Accept"/>  
                    <value value="application/fhir+xml"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="Accept-Charset"/>  
                    <value value="utf-8"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="${update-version-aware-02-xml-version2-etag}"/> 
                </requestHeader>  
                <responseId value="update-version-aware-02-xml-version3-update-response"/>  
                <sourceId value="resource-update-version-aware-02-xml-version3"/> 
            </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 is present."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/> 
            </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"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+xml"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>  
                <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 present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Patient. Warning only as this is optional but servers are encouraged to return the updated resource."/>  
                <resource value="Patient"/>  
                <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 updated Patient and verify the contents match the updated version 3."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/> 
            </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 Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned contents contains the updated version 3 of the Patient."/>  
                <minimumId value="resource-update-version-aware-02-xml-version3"/> 
            </assert> 
        </action> 
    </test>  
    <test id="05-UpdateVersionAwareXMLFormatParamJSONOverride"> 
        <name value="UpdateVersionAwareXMLFormatParamJSONOverride"/>  
        <description value="Test the update operation using the version aware HTTP Header If-Match set to the ETag value of the version 3 resource, HTTP Header Accept set to XML format and the _format request URL parameter set to JSON. The 01-json Patient telecom is updated to define the 4th version of this resource. The expected response content is the updated Patient resource in JSON format as the _format parameter overrides the HTTP Header Accept."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation using the version aware HTTP Header If-Match set to the ETag value of the version 3 resource, HTTP Header Accept set to XML format and the _format request URL parameter set to JSON. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-01-json-setup-id}?_format=application/fhir+json"/>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="${update-version-aware-01-json-version3-etag}"/> 
                </requestHeader>  
                <responseId value="update-version-aware-01-json-version4-update-response"/>  
                <sourceId value="resource-update-version-aware-01-xml-version4"/> 
            </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 is present."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/> 
            </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"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+json"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>  
                <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 present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Patient. Warning only as this is optional but servers are encouraged to return the updated resource."/>  
                <resource value="Patient"/>  
                <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 updated Patient and verify the contents match the updated version 4."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/> 
            </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 Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned contents contains the updated version 4 of the Patient."/>  
                <minimumId value="resource-update-version-aware-01-json-version4"/> 
            </assert> 
        </action> 
    </test>  
    <test id="06-UpdateVersionAwareJSONFormatParamXMLOverride"> 
        <name value="UpdateVersionAwareJSONFormatParamXMLOverride"/>  
        <description value="Test the create operation using the version aware HTTP Header If-Match set to the ETag value of the version 3 resource, HTTP Header Accept set to JSON format and the _format request URL parameter set to XML. The 02-xml Patient telecom is updated to define the 4th version of this resource. The expected response content is the updated Patient resource in XML format as the _format parameter overrides the HTTP Header Accept."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation using the version aware HTTP Header If-Match set to the ETag value of the version 3 resource, HTTP Header Accept set to XML format and the _format request URL parameter set to JSON. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-02-xml-setup-id}?_format=application/fhir+xml"/>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="${update-version-aware-02-xml-version3-etag}"/> 
                </requestHeader>  
                <responseId value="update-version-aware-02-xml-version4-update-response"/>  
                <sourceId value="resource-update-version-aware-02-json-version4"/> 
            </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 is present."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/> 
            </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"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+xml"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>  
                <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 present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Patient. Warning only as this is optional but servers are encouraged to return the updated resource."/>  
                <resource value="Patient"/>  
                <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 updated Patient and verify the contents match the updated version 4."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/> 
            </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 Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned contents contains the updated version 4 of the Patient."/>  
                <minimumId value="resource-update-version-aware-02-xml-version4"/> 
            </assert> 
        </action> 
    </test>  
    <test id="07-UpdateVersionAwareJSONPreferMinimal"> 
        <name value="UpdateVersionAwareJSONPreferMinimal"/>  
        <description value="Test the update operation using the version aware HTTP Header If-Match set to the ETag value of the version 4 resource, HTTP Accept Header set to JSON format and HTTP Prefer Header set to minimal. The expected response content is empty; i.e. no content."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation using the version aware HTTP Header If-Match set to the ETag value of the version 4 resource, HTTP Accept Header set to JSON format and HTTP Prefer Header set to minimal. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="${update-version-aware-01-json-version4-etag}"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=minimal"/> 
                </requestHeader>  
                <responseId value="update-version-aware-01-json-version5-update-response"/>  
                <sourceId value="resource-update-version-aware-01-json-version5"/> 
            </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 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. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <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 updated Patient and verify the contents match the updated version 5."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/> 
            </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 Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned contents contains the updated version 5 of the Patient."/>  
                <minimumId value="resource-update-version-aware-01-json-version5"/> 
            </assert> 
        </action> 
    </test>  
    <test id="08-UpdateVersionAwareXMLPreferMinimal"> 
        <name value="UpdateVersionAwareXMLPreferMinimal"/>  
        <description value="Test the update operation using the version aware HTTP Header If-Match set to the ETag value of the version 4 resource, HTTP Accept Header set to XML format and HTTP Prefer Header set to minimal. The expected response content is empty; i.e. no content."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation using the version aware HTTP Header If-Match set to the ETag value of the version 4 resource, HTTP Accept Header set to XML format and HTTP Prefer Header set to minimal. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="${update-version-aware-02-xml-version4-etag}"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=minimal"/> 
                </requestHeader>  
                <responseId value="update-version-aware-02-xml-version5-update-response"/>  
                <sourceId value="resource-update-version-aware-02-xml-version5"/> 
            </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 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. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <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 updated Patient and verify the contents match the updated version 5."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/> 
            </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 Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned contents contains the updated version 5 of the Patient."/>  
                <minimumId value="resource-update-version-aware-02-xml-version5"/> 
            </assert> 
        </action> 
    </test>  
    <test id="09-UpdateVersionAwareJSONPreferRepresentation"> 
        <name value="UpdateVersionAwareJSONPreferRepresentation"/>  
        <description value="Test the update operation using the version aware HTTP Header If-Match set to the ETag value of the version 5 resource, HTTP Accept Header set to JSON format and HTTP Prefer Header set to representation. The expected response content is the updated Patient resource in JSON format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation using the version aware HTTP Header If-Match set to the ETag value of the version 5 resource, HTTP Accept Header set to JSON format and HTTP Prefer Header set to representation. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="${update-version-aware-01-json-version5-etag}"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=representation"/> 
                </requestHeader>  
                <responseId value="update-version-aware-01-json-version6-update-response"/>  
                <sourceId value="resource-update-version-aware-01-json-version6"/> 
            </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 is present."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/> 
            </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"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+json"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>  
                <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 present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </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 updated Patient and verify the contents match the updated version 6."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/> 
            </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 Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned contents contains the updated version 6 of the Patient."/>  
                <minimumId value="resource-update-version-aware-01-json-version6"/> 
            </assert> 
        </action> 
    </test>  
    <test id="10-UpdateVersionAwareXMLPreferRepresentation"> 
        <name value="UpdateVersionAwareXMLPreferRepresentation"/>  
        <description value="Test the update operation using the version aware HTTP Header If-Match set to the ETag value of the version 5 resource, HTTP Accept Header set to XML format and HTTP Prefer Header set to representation. The expected response content is the updated Patient resource in XML format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation using the version aware HTTP Header If-Match set to the ETag value of the version 5 resource, HTTP Accept Header set to XML format and HTTP Prefer Header set to representation. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="${update-version-aware-02-xml-version5-etag}"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=representation"/> 
                </requestHeader>  
                <responseId value="update-version-aware-02-xml-version6-update-response"/>  
                <sourceId value="resource-update-version-aware-02-xml-version6"/> 
            </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 is present."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/> 
            </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"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+xml"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>  
                <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 present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </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 updated Patient and verify the contents match the updated version 6."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/> 
            </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 Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned contents contains the updated version 6 of the Patient."/>  
                <minimumId value="resource-update-version-aware-02-xml-version6"/> 
            </assert> 
        </action> 
    </test>  
    <test id="11-UpdateVersionAwareJSONPreferOperationOutcome"> 
        <name value="UpdateVersionAwareJSONPreferOperationOutcome"/>  
        <description value="Test the update operation using the version aware HTTP Header If-Match set to the ETag value of the version 6 resource, HTTP Accept Header set to JSON format and HTTP Prefer Header set to OperationOutcome. The expected response content is an OperationOutcome resource in JSON format indicating a successful update."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation using the version aware HTTP Header If-Match set to the ETag value of the version 6 resource, HTTP Accept Header set to JSON format and HTTP Prefer Header set to representation. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="${update-version-aware-01-json-version6-etag}"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=OperationOutcome"/> 
                </requestHeader>  
                <sourceId value="resource-update-version-aware-01-json-version7"/> 
            </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 is present."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/> 
            </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"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+json"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>  
                <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 present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is OperationOutcome."/>  
                <resource value="OperationOutcome"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned OperationOutcome conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-operationoutcome-profile"/> 
            </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 updated Patient and verify the contents match the updated version 7."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/> 
            </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 Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned contents contains the updated version 7 of the Patient."/>  
                <minimumId value="resource-update-version-aware-01-json-version7"/> 
            </assert> 
        </action> 
    </test>  
    <test id="12-UpdateVersionAwareXMLPreferOperationOutcome"> 
        <name value="UpdateVersionAwareXMLPreferOperationOutcome"/>  
        <description value="Test the update operation using the version aware HTTP Header If-Match set to the ETag value of the version 6 resource, HTTP Accept Header set to XML format and HTTP Prefer Header set to OperationOutcome. The expected response content is an OperationOutcome resource in XML format indicating a successful create."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation using the version aware HTTP Header If-Match set to the ETag value of the version 6 resource, HTTP Accept Header set to XML format and HTTP Prefer Header set to representation. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="${update-version-aware-02-xml-version6-etag}"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=OperationOutcome"/> 
                </requestHeader>  
                <sourceId value="resource-update-version-aware-02-xml-version7"/> 
            </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 is present."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/> 
            </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"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+xml"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>  
                <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 present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. The server must support versioning for version aware updates."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is OperationOutcome."/>  
                <resource value="OperationOutcome"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned OperationOutcome conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-operationoutcome-profile"/> 
            </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 updated Patient and verify the contents match the updated version 7."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/> 
            </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 Patient."/>  
                <resource value="Patient"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Patient conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-profile"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned contents contains the updated version 7 of the Patient."/>  
                <minimumId value="resource-update-version-aware-02-xml-version7"/> 
            </assert> 
        </action> 
    </test>  
    <test id="13-UpdateVersionAwareJSONConflict"> 
        <name value="UpdateVersionAwareJSONConflict"/>  
        <description value="Test the update operation using the version aware HTTP Header If-Match set to an ETag value in conflict with the version 7 resource. The expected response is 409 (Conflict) with an optional OperationOutcome resource in JSON format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation using the version aware HTTP Header If-Match set to an ETag value in conflict with the version 7 resource. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="W/&quot;NOMATCH&quot;"/> 
                </requestHeader>  
                <sourceId value="resource-update-version-aware-01-json-version8"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 409(Conflict)."/>  
                <direction value="response"/>  
                <responseCode value="409"/> 
            </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 on failure."/>  
                <resource value="OperationOutcome"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action> 
    </test>  
    <test id="14-UpdateVersionAwareXMLConflict"> 
        <name value="UpdateVersionAwareXMLConflict"/>  
        <description value="Test the update operation using the version aware HTTP Header If-Match set to an ETag value in conflict with the version 7 resource. The expected response is 409 (Conflict) with an optional OperationOutcome resource in XML format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="update"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient update operation using the version aware HTTP Header If-Match set to an ETag value in conflict with the version 7 resource. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/>  
                <requestHeader> 
                    <field value="If-Match"/>  
                    <value value="W/&quot;NOMATCH&quot;"/> 
                </requestHeader>  
                <sourceId value="resource-update-version-aware-02-xml-version8"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 409(Conflict)."/>  
                <direction value="response"/>  
                <responseCode value="409"/> 
            </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 on failure."/>  
                <resource value="OperationOutcome"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action> 
    </test>  
    <teardown> 
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <params value="/${update-version-aware-01-json-setup-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <params value="/${update-version-aware-02-xml-setup-id}"/> 
            </operation> 
        </action> 
    </teardown> 
</TestScript>