Test Script

Name/FHIRSandbox/DaVinci/FHIR4-0-1-Formulary/Formulary-BulkData/00-Capabilities/00-Formulary-BulkData-Capabilities-json
DescriptionFormulary BulkData - 00 Capability - test a single server to verify support for the capabilities interaction 'HTTP GET metadata' and the return of a valid CapabilityStatement resource supporting the DaVinci Formulary IG, specific to support for Bulk Data.
Version1Latest1
Content
<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">  
    <id value="00-Formulary-BulkData-capability-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>Formulary BulkData - 00 Capability - JSON</p>
        </div> 
    </text>  
    <url value="http://wildfhir.aegis.net/fhir4-0-1/TestScript/00-formulary-bulkdata-capability-json"/>  
    <name value="FormularyBulkData00CapabilityJSON"/>  
    <title value="Formulary BulkData - 00 Capability - JSON"/>  
    <status value="active"/>  
    <date value="2023-01-30"/>  
    <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="Formulary BulkData - 00 Capability - test a single server to verify support for the capabilities interaction 'HTTP GET metadata' and the return of a valid CapabilityStatement resource supporting the DaVinci Formulary IG, specific to support for Bulk Data."/>  
    <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="00-Check-Capabilities"> 
        <name value="00-Check-Capabilities"/>  
        <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 required FHIR Bulk Data Access (Flat FHIR)IG operations using 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> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <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> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <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="Confirm that the returned CapabilityStatement supports json format."/>  
                <direction value="response"/>  
                <operator value="contains"/>  
                <path value="$.format"/>  
                <value value="json"/>  
                <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 server declares support for InsurancePlan/$export operation in its server CapabilityStatement"/>  
                <direction value="response"/>  
                <operator value="notEmpty"/>  
                <path value="$.rest[?(@.mode=='server')].resource[?(@.type=='InsurancePlan')].operation[?(@.name=='export')]"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test> 
</TestScript>