Test Script

Name/FHIR3-3-0-Advanced/Patient/03-create/fhir-api-r4-patient-create-01-ok
DescriptionFHIR API R4 (v3.3.0) Advanced Operation Tests - Patient create test suite against a single server using valid resource instances where all the expected results are successful. The destination server must also support the search and delete operations in order to determine the generated resource id and then clean up the created 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-r4-patient-create-01-ok"/>  
    <text> 
        <status value="generated"/>  
        <div xmlns="http://www.w3.org/1999/xhtml">  
            <p>FHIR API R4 (v3.3.0) - Patient Create OK Resource Suite</p> 
        </div> 
    </text>  
    <url value="http://wildfhir.aegis.net/fhir3-3-0/TestScript/fhir-api-r4-patient-create-01-ok"/>  
    <name value="FHIR API R4 (v3.3.0) - Patient Create OK Resource Suite"/>  
    <status value="active"/>  
    <date value="2018-04-06"/>  
    <publisher value="AEGIS.net, Inc."/>  
    <contact> 
        <name value="Touchstone Support"/>  
        <telecom> 
            <system value="email"/>  
            <value value="Touchstone_Support@aegis.net"/>  
            <use value="work"/> 
        </telecom> 
    </contact>  
    <description value="FHIR API R4 (v3.3.0) Advanced Operation Tests - Patient create test suite against a single server using valid resource instances where all the expected results are successful. The destination server must also support the search and delete operations in order to determine the generated resource id and then clean up the created resources. Assertions test all required and optional response HTTP Headers and validate the returned payload."/>  
    <copyright value="© AEGIS.net, Inc. 2015+"/>  
    <fixture id="resource-create-ok-01-json"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-01-json.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-02-json"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-02-json.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-03-xml"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-03-xml.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-04-json"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-04-json.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-05-xml"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-05-xml.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-06-json"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-06-json.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-06-xml"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-06-xml.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-07-json"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-07-json.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-07-xml"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-07-xml.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-08-json"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-08-json.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-09-xml"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-09-xml.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-10-json"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-10-json.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-11-xml"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-11-xml.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-12-json"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-12-json.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-13-xml"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-13-xml.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-14-json"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-14-json-withid.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-14-json-min"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-14-json-min.json"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-15-xml"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-15-xml-withid.xml"/> 
        </resource> 
    </fixture>  
    <fixture id="resource-create-ok-15-xml-min"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Patient-create-ok-15-xml-min.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="create-ok-01-json-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-01-json-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-01-json-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-01-json"/> 
    </variable>  
    <variable> 
        <name value="create-ok-02-json-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-02-json-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-02-json-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-02-json"/> 
    </variable>  
    <variable> 
        <name value="create-ok-03-xml-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-03-xml-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-03-xml-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-03-xml"/> 
    </variable>  
    <variable> 
        <name value="create-ok-04-json-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-04-json-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-04-json-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-04-json"/> 
    </variable>  
    <variable> 
        <name value="create-ok-05-xml-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-05-xml-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-05-xml-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-05-xml"/> 
    </variable>  
    <variable> 
        <name value="create-ok-06-json-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-06-json-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-06-json-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-06-json"/> 
    </variable>  
    <variable> 
        <name value="create-ok-07-xml-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-07-xml-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-07-xml-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-07-xml"/> 
    </variable>  
    <variable> 
        <name value="create-ok-08-json-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-08-json-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-08-json-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-08-json"/> 
    </variable>  
    <variable> 
        <name value="create-ok-09-xml-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-09-xml-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-09-xml-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-09-xml"/> 
    </variable>  
    <variable> 
        <name value="create-ok-10-json-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-10-json-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-10-json-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-10-json"/> 
    </variable>  
    <variable> 
        <name value="create-ok-11-xml-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-11-xml-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-11-xml-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-11-xml"/> 
    </variable>  
    <variable> 
        <name value="create-ok-12-json-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-12-json-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-12-json-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-12-json"/> 
    </variable>  
    <variable> 
        <name value="create-ok-13-xml-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-13-xml-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-13-xml-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-13-xml"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-14-json-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-14-json"/> 
    </variable>  
    <variable> 
        <name value="create-ok-15-xml-id"/>  
        <path value="Patient/id"/>  
        <sourceId value="create-ok-15-xml-search-response"/> 
    </variable>  
    <variable> 
        <name value="search-create-ok-15-xml-identifier"/>  
        <path value="Patient/identifier/value"/>  
        <sourceId value="resource-create-ok-15-xml"/> 
    </variable>  
    <rule id="rule-assertContentTypeIfBody"> 
        <resource> 
            <reference value="/FHIRCommon/_reference/rule/AssertHeaderIfBody.groovy"/> 
        </resource>  
        <param> 
            <name value="header"/>  
            <value value="Content-Type"/> 
        </param>  
        <param> 
            <name value="headerOperator"/>  
            <value value="notEmpty"/> 
        </param>  
        <param> 
            <name value="bodyOperator"/>  
            <value value="notEmpty"/> 
        </param> 
    </rule>  
    <ruleset id="ruleset-versioning-headers"> 
        <resource> 
            <reference value="/FHIRCommon/_reference/ruleset/RuleSet-VersioningHeaders-Groovy.xml"/> 
        </resource>  
        <rule> 
            <ruleId value="assertETagIfSupported"/>  
            <param> 
                <name value="resource"/>  
                <value value="Patient"/> 
            </param> 
        </rule>  
        <rule> 
            <ruleId value="assertLastModifiedIfSupported"/>  
            <param> 
                <name value="resource"/>  
                <value value="Patient"/> 
            </param> 
        </rule> 
    </ruleset>  
    <ruleset id="ruleset-createok-headers-body"> 
        <resource> 
            <reference value="/FHIRCommon/_reference/ruleset/RuleSet-CreateOkHeadersBody-Groovy.xml"/> 
        </resource>  
        <rule> 
            <ruleId value="assertContentTypeIfBody"/> 
        </rule>  
        <rule> 
            <ruleId value="assertContentTypeCharsetIfBody"/> 
        </rule>  
        <rule> 
            <ruleId value="assertResourceTypesIfBody"/>  
            <param> 
                <name value="resource"/>  
                <value value="Patient,OperationOutcome"/> 
            </param> 
        </rule>  
        <rule> 
            <ruleId value="assertProfileIfOperationOutcome"/>  
            <param> 
                <name value="validateProfileId"/>  
                <value value="resource-operationoutcome-profile"/> 
            </param> 
        </rule>  
        <rule> 
            <ruleId value="assertProfileIfResource"/>  
            <param> 
                <name value="resource"/>  
                <value value="Patient"/> 
            </param>  
            <param> 
                <name value="validateProfileId"/>  
                <value value="resource-profile"/> 
            </param> 
        </rule> 
    </ruleset>  
    <ruleset id="ruleset-createok-headers-unknown-body"> 
        <resource> 
            <reference value="/FHIRCommon/_reference/ruleset/RuleSet-CreateOkHeadersUnknownBody-Groovy.xml"/> 
        </resource>  
        <rule> 
            <ruleId value="assertContentTypeIfBody"/> 
        </rule>  
        <rule> 
            <ruleId value="assertContentTypeCharsetIfBody"/> 
        </rule>  
        <rule> 
            <ruleId value="assertResourceTypesIfBody"/>  
            <param> 
                <name value="resource"/>  
                <value value="Patient,OperationOutcome"/> 
            </param> 
        </rule>  
        <rule> 
            <ruleId value="assertProfileIfOperationOutcome"/>  
            <param> 
                <name value="validateProfileId"/>  
                <value value="resource-operationoutcome-profile"/> 
            </param> 
        </rule>  
        <rule> 
            <ruleId value="assertProfileIfPatient"/>  
            <param> 
                <name value="validateProfileId"/>  
                <value value="resource-profile"/> 
            </param> 
        </rule> 
    </ruleset>  
    <setup> 
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="System-generated search and delete operations from conditional delete to insure the Patient 1 does not exist on the server."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-01-json-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="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-02-json-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 3 does not exist on the server."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-03-xml-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 4 does not exist on the server."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-04-json-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 5 does not exist on the server."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-05-xml-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 6 does not exist on the server."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-06-json-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 7 does not exist on the server."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-07-xml-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 8 does not exist on the server."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-08-json-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 9 does not exist on the server."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-09-xml-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 10 does not exist on the server."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-10-json-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 11 does not exist on the server."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-11-xml-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 12 does not exist on the server."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-12-json-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 13 does not exist on the server."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-13-xml-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 142 does not exist on the server."/>  
                <accept value="json"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-14-json-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 15 does not exist on the server."/>  
                <accept value="xml"/>  
                <contentType value="none"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-15-xml-identifier}"/> 
            </operation> 
        </action> 
    </setup>  
    <test id="01-CreateOKNoAcceptJSONContent"> 
        <name value="CreateOKNoAcceptJSONContent"/>  
        <description value="Test the create operation with no HTTP Accept Header and JSON content. The expected response content is the created Patient resource in either JSON or XML format as neither was explicitly requested."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with no HTTP Accept Header and JSON content."/>  
                <accept value="none"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-create-ok-01-json"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected create ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-createok-headers-unknown-body"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-01-json-identifier}"/>  
                <responseId value="create-ok-01-json-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-01-json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="02-CreateOKJSON"> 
        <name value="CreateOKJSON"/>  
        <description value="Test the create operation with HTTP Header Accept and Content-Type set to JSON format and no request URL parameters defined. The expected response content is the created Patient resource in JSON format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with HTTP Header Accept and Content-Type set to JSON format and no request URL parameters defined."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-create-ok-02-json"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected create ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-createok-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+json"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-02-json-identifier}"/>  
                <responseId value="create-ok-02-json-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-02-json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="03-CreateOKXML"> 
        <name value="CreateOKXML"/>  
        <description value="Test the create operation with HTTP Header Accept and Content-Type set to XML format and no request URL parameters defined. The expected response content is the created Patient resource in XML format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with HTTP Header Accept and Content-Type set to XML format and no request URL parameters defined."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-create-ok-03-xml"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected create ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-createok-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+xml"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-03-xml-identifier}"/>  
                <responseId value="create-ok-03-xml-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <contentType value="xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-03-xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="04-CreateOKJSONAcceptCharset"> 
        <name value="CreateOKJSONAcceptCharset"/>  
        <description value="Test the create operation with HTTP Header Accept set to application/fhir+json and Accept-Charset set to utf-8 and no request URL parameters defined. The expected response content is the created Patient resource in JSON format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with HTTP Header set to application/fhir+json and Accept-Charset set to utf-8 and no request URL parameters defined."/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <requestHeader> 
                    <field value="Accept"/>  
                    <value value="application/fhir+json"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="Accept-Charset"/>  
                    <value value="utf-8"/> 
                </requestHeader>  
                <sourceId value="resource-create-ok-04-json"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected create ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-createok-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+json"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-04-json-identifier}"/>  
                <responseId value="create-ok-04-json-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-04-json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="05-CreateOKXMLAcceptCharset"> 
        <name value="CreateOKXMLAcceptCharset"/>  
        <description value="Test the create operation with HTTP Header Accept set to application/fhir+xml and Accept-Charset set to utf-8 and no request URL parameters defined. The expected response content is the created Patient resource in XML format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with HTTP Header set to application/fhir+xml and Accept-Charset set to utf-8 and no request URL parameters defined."/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <requestHeader> 
                    <field value="Accept"/>  
                    <value value="application/fhir+xml"/> 
                </requestHeader>  
                <requestHeader> 
                    <field value="Accept-Charset"/>  
                    <value value="utf-8"/> 
                </requestHeader>  
                <sourceId value="resource-create-ok-05-xml"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected create ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-createok-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+xml"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-05-xml-identifier}"/>  
                <responseId value="create-ok-05-xml-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <contentType value="xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-05-xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="06-CreateOKXMLFormatParamJSONOverride"> 
        <name value="CreateOKXMLFormatParamJSONOverride"/>  
        <description value="Test the create operation with HTTP Header Accept set to XML format and the _format request URL parameter set to JSON. The expected response content is the created 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="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with HTTP Header Accept set to XML format and the _format request URL parameter set to JSON."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?_format=application/fhir+json"/>  
                <sourceId value="resource-create-ok-06-xml"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected create ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-createok-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+json"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-06-json-identifier}"/>  
                <responseId value="create-ok-06-json-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-06-json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="07-CreateOKJSONFormatParamXMLOverride"> 
        <name value="CreateOKJSONFormatParamXMLOverride"/>  
        <description value="Test the create operation with HTTP Header Accept set to JSON format and the _format request URL parameter set to XML. The expected response content is the created 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="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with HTTP Header Accept set to JSON format and the _format request URL parameter set to XML."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?_format=application/fhir+xml"/>  
                <sourceId value="resource-create-ok-07-json"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected create ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-createok-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+xml"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-07-xml-identifier}"/>  
                <responseId value="create-ok-07-xml-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <contentType value="xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-07-xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="08-CreateOKJSONPreferMinimal"> 
        <name value="CreateOKJSONPreferMinimal"/>  
        <description value="Test the create operation with 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="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with HTTP Accept Header set to JSON format and HTTP Prefer Header set to minimal."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=minimal"/> 
                </requestHeader>  
                <sourceId value="resource-create-ok-08-json"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex rule assertion to conditionally validate expected HTTP Header Content-Type."/>  
                <direction value="response"/>  
                <rule> 
                    <ruleId value="rule-assertContentTypeIfBody"/> 
                </rule>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-08-json-identifier}"/>  
                <responseId value="create-ok-08-json-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-08-json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="09-CreateOKXMLPreferMinimal"> 
        <name value="CreateOKXMLPreferMinimal"/>  
        <description value="Test the create operation with 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="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with HTTP Accept Header set to XML format and HTTP Prefer Header set to minimal."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=minimal"/> 
                </requestHeader>  
                <sourceId value="resource-create-ok-09-xml"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex rule assertion to conditionally validate expected HTTP Header Content-Type."/>  
                <direction value="response"/>  
                <rule> 
                    <ruleId value="rule-assertContentTypeIfBody"/> 
                </rule>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-09-xml-identifier}"/>  
                <responseId value="create-ok-09-xml-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <contentType value="xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-09-xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="10-CreateOKJSONPreferRepresentation"> 
        <name value="CreateOKJSONPreferRepresentation"/>  
        <description value="Test the create operation with HTTP Accept Header set to JSON format and HTTP Prefer Header set to representation. The expected response content is the create Patient resource in JSON format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with HTTP Accept Header set to JSON format and HTTP Prefer Header set to representation."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=representation"/> 
                </requestHeader>  
                <sourceId value="resource-create-ok-10-json"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected create ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-createok-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+json"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-10-json-identifier}"/>  
                <responseId value="create-ok-10-json-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-10-json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="11-CreateOKXMLPreferRepresentation"> 
        <name value="CreateOKXMLPreferRepresentation"/>  
        <description value="Test the create operation with HTTP Accept Header set to XML format and HTTP Prefer Header set to representation. The expected response content is the create Patient resource in XML format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with HTTP Accept Header set to XML format and HTTP Prefer Header set to representation."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=representation"/> 
                </requestHeader>  
                <sourceId value="resource-create-ok-11-xml"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected create ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-createok-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+xml"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-11-xml-identifier}"/>  
                <responseId value="create-ok-11-xml-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <contentType value="xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-11-xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="12-CreateOKJSONPreferOperationOutcome"> 
        <name value="CreateOKJSONPreferOperationOutcome"/>  
        <description value="Test the create operation with 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 create."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with HTTP Accept Header set to JSON format and HTTP Prefer Header set to OperationOutcome."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=OperationOutcome"/> 
                </requestHeader>  
                <sourceId value="resource-create-ok-12-json"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type is present."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8' (case-insensitive)."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="charset=utf-8"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is OperationOutcome."/>  
                <resource value="OperationOutcome"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned OperationOutcome conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-operationoutcome-profile"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-12-json-identifier}"/>  
                <responseId value="create-ok-12-json-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-12-json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="13-CreateOKXMLPreferOperationOutcome"> 
        <name value="CreateOKXMLPreferOperationOutcome"/>  
        <description value="Test the create operation with 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="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with HTTP Accept Header set to XML format and HTTP Prefer Header set to OperationOutcome."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <requestHeader> 
                    <field value="Prefer"/>  
                    <value value="return=OperationOutcome"/> 
                </requestHeader>  
                <sourceId value="resource-create-ok-13-xml"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type is present."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8' (case-insensitive)."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="charset=utf-8"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is OperationOutcome."/>  
                <resource value="OperationOutcome"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned OperationOutcome conforms to the base FHIR specification."/>  
                <validateProfileId value="resource-operationoutcome-profile"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-13-xml-identifier}"/>  
                <responseId value="create-ok-13-xml-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <contentType value="xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-13-xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="14-CreateOKJSONWithId"> 
        <name value="CreateOKJSONWithId"/>  
        <description value="Test the create operation with JSON content where the request resource content contains a resource id. The server is expected to ignore the resource content's resource id and respond with a successful create and optional response content of the created Patient resource in JSON format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with JSON content where the request resource content contains a resource id."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-create-ok-14-json"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected create ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-createok-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+json"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-14-json-identifier}"/>  
                <responseId value="create-ok-14-json-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>  
                <contentType value="json"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-14-json-min"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <test id="15-CreateOKXMLWithId"> 
        <name value="CreateOKXMLWithId"/>  
        <description value="Test the create operation with XML content where the request resource content contains a resource id. The server is expected to ignore the resource content's resource id and respond with a successful create and optional response content of the created Patient resource in XML format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Patient create operation with XML content where the request resource content contains a resource id."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <sourceId value="resource-create-ok-15-xml"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected versioning HTTP Headers."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-versioning-headers"/> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Complex ruleset assertion to conditionally validate expected create ok response HTTP Headers and body."/>  
                <direction value="response"/>  
                <ruleset> 
                    <rulesetId value="ruleset-createok-headers-body"/>  
                    <rule> 
                        <ruleId value="assertContentTypeMimeTypeIfBody"/>  
                        <param> 
                            <name value="headerExpectedValue"/>  
                            <value value="application/fhir+xml"/> 
                        </param> 
                    </rule> 
                </ruleset>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Location is present."/>  
                <direction value="response"/>  
                <headerField value="Location"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Patient"/>  
                <description value="Search for the created Patient by the unique identifier."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <encodeRequestUrl value="true"/>  
                <params value="?identifier=${search-create-ok-15-xml-identifier}"/>  
                <responseId value="create-ok-15-xml-search-response"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <responseCode value="200"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>  
                <contentType value="xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Bundle."/>  
                <resource value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that returned bundle first entry contains the created version of the Patient."/>  
                <minimumId value="resource-create-ok-15-xml-min"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test>  
    <teardown> 
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-01-json-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-02-json-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-03-xml-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-04-json-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-05-xml-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-06-json-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-07-xml-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-08-json-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-09-xml-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-10-json-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-11-xml-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-12-json-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-13-xml-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-14-json-id}"/> 
            </operation> 
        </action>  
        <action> 
            <operation> 
                <type> 
                    <code value="delete"/> 
                </type>  
                <resource value="Patient"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/${create-ok-15-xml-id}"/> 
            </operation> 
        </action> 
    </teardown> 
</TestScript>