Test Script

Name/FHIRSandbox/DaVinci/FHIR4-0-1-Notifications/00-Capabilities/dv-notifications-r4-00-capability-sender-json
DescriptionDa Vinci - Alerts - FHIR R4 - 00 Capability Alert Sender Message - test a single server to verify support for the capabilities interaction 'HTTP GET metadata' and the return of a valid CapabilityStatement resource supporting the Da Vinci Alerts IG $process-message operation using JSON syntax.
Version5Latest5
Content
<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">  
    <id value="dv-alerts-r4-00-capability-alert-sender-message-json"/>  
    <meta> 
        <profile value="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript"/> 
    </meta>  
    <text> 
        <status value="generated"/>  
        <div xmlns="http://www.w3.org/1999/xhtml">
            <p>Da Vinci - Alerts - FHIR R4 - 00 Capability Alert Sender Message - JSON</p>
        </div> 
    </text>  
    <url value="http://wildfhir.aegis.net/fhir4-0-0/TestScript/dv-alerts-r4-00-capability-alert-sender-message-json"/>  
    <name value="DaVinciAlertsR400CapabilityAlertMessageNotifyJSON"/>  
    <title value="Da Vinci - Alerts - FHIR R4 - 00 Capability Alert Sender Message - JSON"/>  
    <status value="active"/>  
    <date value="2019-08-22"/>  
    <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="Da Vinci - Alerts - FHIR R4 - 00 Capability Alert Sender Message - test a single server to verify support for the capabilities interaction 'HTTP GET metadata' and the return of a valid CapabilityStatement resource supporting the Da Vinci Alerts IG $process-message operation using JSON syntax."/>  
    <copyright value="This FHIR Test Script is licensed under Creative Commons (CC0) 'No Rights Reserved'. Learn more at https://creativecommons.org/licenses"/>  
    <profile id="capabilities-profile"> 
        <reference value="http://hl7.org/fhir/StructureDefinition/CapabilityStatement"/> 
    </profile>  
    <test id="01-CapabilityAlertMessage"> 
        <name value="CapabilityAlertMessage"/>  
        <description value="Test the HTTP GET metadata capabilities operation with HTTP Header Accept set to JSON format. The expected response content is a valid CapabilityStatement resource supporting the Da Vinci Alerts IG $process-message operation in JSON format."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://touchstone.com/fhir/testscript-operation-codes-extended"/>  
                    <code value="metadata"/> 
                </type>  
                <description value="HTTP GET metadata capabilities operation with HTTP Header Accept set to JSON format. The response asserts for all the optional HTTP Headers will be warning only."/>  
                <accept value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="metadata"/>  
                <requestHeader> 
                    <field value="Authorization"/>  
                    <value value="none"/> 
                </requestHeader> 
            </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> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <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> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <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 ETag is present. Warning only as FHIR servers SHOULD return this header."/>  
                <direction value="response"/>  
                <headerField value="ETag"/>  
                <operator value="notEmpty"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is CapabilityStatement."/>  
                <direction value="response"/>  
                <resource value="CapabilityStatement"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="Confirm that the returned CapabilityStatement conforms to the base FHIR specification."/>  
                <direction value="response"/>  
                <validateProfileId value="capabilities-profile"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="The returned CapabilityStatement SHALL support Bundle"/>  
                <path value="$.rest[*].resource[?(@.type == 'Bundle')].type"/>  
                <value value="Bundle"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="The returned CapabilityStatement SHALL support Condition"/>  
                <path value="$.rest[*].resource[?(@.type == 'Condition')].type"/>  
                <value value="Condition"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="The returned CapabilityStatement SHALL support Coverage"/>  
                <path value="$.rest[*].resource[?(@.type == 'Coverage')].type"/>  
                <value value="Coverage"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="The returned CapabilityStatement SHALL support Encounter"/>  
                <path value="$.rest[*].resource[?(@.type == 'Encounter')].type"/>  
                <value value="Encounter"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="The returned CapabilityStatement SHALL support Location"/>  
                <path value="$.rest[*].resource[?(@.type == 'Location')].type"/>  
                <value value="Location"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="The returned CapabilityStatement SHALL support MessageHeader"/>  
                <path value="$.rest[*].resource[?(@.type == 'MessageHeader')].type"/>  
                <value value="MessageHeader"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="The returned CapabilityStatement SHALL support Organization"/>  
                <path value="$.rest[*].resource[?(@.type == 'Organization')].type"/>  
                <value value="Organization"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="The returned CapabilityStatement SHALL support Patient"/>  
                <path value="$.rest[*].resource[?(@.type == 'Patient')].type"/>  
                <value value="Patient"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="The returned CapabilityStatement SHALL support Practitioner"/>  
                <path value="$.rest[*].resource[?(@.type == 'Practitioner')].type"/>  
                <value value="Practitioner"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="The returned CapabilityStatement SHOULD support PractitionerRole"/>  
                <path value="$.rest[*].resource[?(@.type == 'PractitionerRole')].type"/>  
                <value value="PractitionerRole"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="Confirm that the returned CapabilityStatement resource minimally contains the declaration of the $process-message operation."/>  
                <direction value="response"/>  
                <expression value="CapabilityStatement.rest.operation.where(name = 'process-message').exists()"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="The system SHOULD support format = xml"/>  
                <direction value="response"/>  
                <expression value="CapabilityStatement.format.select(contains('xml'))"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="The system SHALL support format = json"/>  
                <direction value="response"/>  
                <expression value="CapabilityStatement.format.select(contains('json'))"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test> 
</TestScript>