Test Script

Name/FHIR1-8-0-Advanced/Patient/04-update/fhir-api-stu3-patient-update-01-ok
DescriptionFHIR API STU3 Advanced Operation Tests - Patient update test suite against a single server using valid resource instances where all the expected results are successful. 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-01-ok"/>  
    <text> 
        <status value="generated"/>  
        <div xmlns="http://www.w3.org/1999/xhtml">  
            <p>FHIR API STU3 - Patient Update OK Resource Suite</p> 
        </div> 
    </text>  
    <url value="http://wildfhir.aegis.net/fhir/TestScript/fhir-api-stu3-patient-update-01-ok"/>  
    <name value="FHIR API STU3 - Patient Update OK 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 test suite against a single server using valid resource instances where all the expected results are successful. 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/PatientUpdateOK.xml"/> 
            </capabilities> 
        </capability> 
    </metadata>  
    <fixture id="resource-update-ok-01-json-setup"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-01-json-setup.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-01-json-version2"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-01-json-version2.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-01-json-version3"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-01-json-version3.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-01-json-version4"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-01-json-version4.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-01-xml-version4"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-01-xml-version4.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-01-json-version5"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-01-json-version5.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-01-json-version6"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-01-json-version6.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-01-json-version7"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-01-json-version7.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-02-xml-setup"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-02-xml-setup.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-02-xml-version2"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-02-xml-version2.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-02-xml-version3"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-02-xml-version3.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-02-json-version4"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-02-json-version4.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-02-xml-version4"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-02-xml-version4.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-02-xml-version5"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-02-xml-version5.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-02-xml-version6"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-02-xml-version6.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-update-ok-02-xml-version7"> 
        <resource> 
            <reference value="../_reference/resources/Patient-update-ok-02-xml-version7.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-ok-01-json-setup-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="update-ok-01-json-setup-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-update-ok-01-json-setup-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-update-ok-01-json-setup"/> 
    </variable>  
    <variable> 
        <name value="update-ok-02-xml-setup-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="update-ok-02-xml-setup-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-update-ok-02-xml-setup-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-update-ok-02-xml-setup"/> 
    </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-ok-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-ok-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"/>  
                <sourceId value="resource-update-ok-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> 
            <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-ok-01-json-setup-identifier}"/>  
                <responseId value="update-ok-01-json-setup-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/> 
            </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-ok-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"/>  
                <sourceId value="resource-update-ok-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> 
            <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-ok-02-xml-setup-identifier}"/>  
                <responseId value="update-ok-02-xml-setup-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/> 
            </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-ok-02-xml-setup"/> 
            </assert> 
        </action> 
    </setup>  
    <test id="01-UpdateOKJSON"> 
        <name value="UpdateOKJSON"/>  
        <description value="Test the update operation with JSON content. 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. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-ok-01-json-setup-id}"/>  
                <sourceId value="resource-update-ok-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. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </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-ok-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-ok-01-json-version2"/> 
            </assert> 
        </action> 
    </test>  
    <test id="02-UpdateOKXML"> 
        <name value="UpdateOKXML"/>  
        <description value="Test the update operation with XML content. 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 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. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-ok-02-xml-setup-id}"/>  
                <sourceId value="resource-update-ok-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. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </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-ok-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-ok-02-xml-version2"/> 
            </assert> 
        </action> 
    </test>  
    <test id="03-UpdateOKJSONAcceptCharset"> 
        <name value="UpdateOKJSONAcceptCharset"/>  
        <description value="Test the update operation with HTTP Header Accept set to application/fhir+json and Accept-Charset set to utf-8 and no request URL parameters defined. The 01-json 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 with 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-ok-01-json-setup-id}"/>  
                <requestHeader> 
                    <field value="Accept"/>  
                    <value value="application/fhir+json"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="Accept-Charset"/>  
                    <value value="utf-8"/> 
                </requestHeader>  
                <sourceId value="resource-update-ok-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. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </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-ok-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-ok-01-json-version3"/> 
            </assert> 
        </action> 
    </test>  
    <test id="04-UpdateOKXMLAcceptCharset"> 
        <name value="UpdateOKXMLAcceptCharset"/>  
        <description value="Test the update operation with 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 with 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-ok-02-xml-setup-id}"/>  
                <requestHeader> 
                    <field value="Accept"/>  
                    <value value="application/fhir+xml"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="Accept-Charset"/>  
                    <value value="utf-8"/> 
                </requestHeader>  
                <sourceId value="resource-update-ok-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. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </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-ok-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-ok-02-xml-version3"/> 
            </assert> 
        </action> 
    </test>  
    <test id="05-UpdateOKXMLFormatParamJSONOverride"> 
        <name value="UpdateOKXMLFormatParamJSONOverride"/>  
        <description value="Test the update operation with 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 with 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-ok-01-json-setup-id}?_format=application/fhir+json"/>  
                <sourceId value="resource-update-ok-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. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </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-ok-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-ok-01-json-version4"/> 
            </assert> 
        </action> 
    </test>  
    <test id="06-UpdateOKJSONFormatParamXMLOverride"> 
        <name value="UpdateOKJSONFormatParamXMLOverride"/>  
        <description value="Test the update operation with 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 with 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-ok-02-xml-setup-id}?_format=application/fhir+xml"/>  
                <sourceId value="resource-update-ok-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. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </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-ok-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-ok-02-xml-version4"/> 
            </assert> 
        </action> 
    </test>  
    <test id="07-UpdateOKJSONPreferMinimal"> 
        <name value="UpdateOKJSONPreferMinimal"/>  
        <description value="Test the update operation with HTTP Accept Header set to JSON format and HTTP Prefer Header set to minimal. The 01-json Patient careProvider is added to define the 5th version of this resource. 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 with 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-ok-01-json-setup-id}"/>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=minimal"/> 
                </requestHeader>  
                <sourceId value="resource-update-ok-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. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </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-ok-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-ok-01-json-version5"/> 
            </assert> 
        </action> 
    </test>  
    <test id="08-UpdateOKXMLPreferMinimal"> 
        <name value="UpdateOKXMLPreferMinimal"/>  
        <description value="Test the update operation with HTTP Accept Header set to XML format and HTTP Prefer Header set to minimal. The 02-xml Patient careProvider is added to define the 5th version of this resource. 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 with 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-ok-02-xml-setup-id}"/>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=minimal"/> 
                </requestHeader>  
                <sourceId value="resource-update-ok-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. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </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-ok-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-ok-02-xml-version5"/> 
            </assert> 
        </action> 
    </test>  
    <test id="09-UpdateOKJSONPreferRepresentation"> 
        <name value="UpdateOKJSONPreferRepresentation"/>  
        <description value="Test the update operation with HTTP Accept Header set to JSON format and HTTP Prefer Header set to representation. The 01-json Patient careProvider is updated to define the 6th 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 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-ok-01-json-setup-id}"/>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=representation"/> 
                </requestHeader>  
                <sourceId value="resource-update-ok-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. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </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-ok-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-ok-01-json-version6"/> 
            </assert> 
        </action> 
    </test>  
    <test id="10-UpdateOKXMLPreferRepresentation"> 
        <name value="UpdateOKXMLPreferRepresentation"/>  
        <description value="Test the update operation with HTTP Accept Header set to XML format and HTTP Prefer Header set to representation. The 02-xml Patient careProvider is updated to define the 6th 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 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-ok-02-xml-setup-id}"/>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=representation"/> 
                </requestHeader>  
                <sourceId value="resource-update-ok-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. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </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-ok-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-ok-02-xml-version6"/> 
            </assert> 
        </action> 
    </test>  
    <test id="11-UpdateOKJSONPreferOperationOutcome"> 
        <name value="UpdateOKJSONPreferOperationOutcome"/>  
        <description value="Test the update operation with HTTP Accept Header set to JSON format and HTTP Prefer Header set to OperationOutcome. The 01-json Patient careProvider is updated to define the 7th version of this resource. 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 with HTTP Accept Header set to JSON format and HTTP Prefer Header set to OperationOutcome. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <params value="/${update-ok-01-json-setup-id}"/>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=OperationOutcome"/> 
                </requestHeader>  
                <sourceId value="resource-update-ok-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. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </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-ok-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-ok-01-json-version7"/> 
            </assert> 
        </action> 
    </test>  
    <test id="12-UpdateOKXMLPreferOperationOutcome"> 
        <name value="UpdateOKXMLPreferOperationOutcome"/>  
        <description value="Test the update operation with HTTP Accept Header set to XML format and HTTP Prefer Header set to OperationOutcome. The 02-xml Patient careProvider is updated to define the 7th version of this resource. The expected response content is an OperationOutcome resource in XML 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 with HTTP Accept Header set to XML format and HTTP Prefer Header set to OperationOutcome. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <params value="/${update-ok-02-xml-setup-id}"/>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=OperationOutcome"/> 
                </requestHeader>  
                <sourceId value="resource-update-ok-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. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>  
                <direction value="response"/>  
                <headerField value="Last-Modified"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </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-ok-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-ok-02-xml-version7"/> 
            </assert> 
        </action> 
    </test>  
    <teardown> 
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <params value="/${update-ok-01-json-setup-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <params value="/${update-ok-02-xml-setup-id}"/> 
            </operation> 
        </action> 
    </teardown> 
</TestScript>