Test Script

Name/FHIRSandbox/DaVinci/FHIR4-0-1-DEQM-GIC/DEQM-3-0-0/03-VTE-1/01-DataRequirements/dv-deqm-vte-datareq-02-ok-post-xml
DescriptionDa Vinci Measure $data-requirements simple tests against known Measure resources where the expected outcome is a successful response with a valid Library resource in XML format. All $data-requirements operations are performed using the FHIR Operation Framework HTTP POST method with Parameters of periodStart and periodEnd.
Version1Latest1
Content
<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">  
    <id value="dv-deqm-vte-datareq-02-ok-post-xml"/>  
    <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>dv-deqm-vte-datareq-02-ok-post-xml</p>
        </div> 
    </text>  
    <url value="http://wildfhir.aegis.net/fhir4-0-1/TestScript/dv-deqm-vte-datareq-02-ok-post-xml"/>  
    <name value="dv-deqm-vte-datareq-02-ok-post-xml"/>  
    <status value="active"/>  
    <date value="2021-06-23"/>  
    <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 Measure $data-requirements simple tests against known Measure resources where the expected outcome is a successful response with a valid Library resource in XML format. All $data-requirements operations are performed using the FHIR Operation Framework HTTP POST method with Parameters of periodStart and periodEnd."/>  
    <copyright value="This FHIR Test Script is licensed under Creative Commons (CC0) 'No Rights Reserved'. Learn more at https://creativecommons.org/licenses"/>  
    <origin> 
        <index value="1"/>  
        <profile> 
            <system value="http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types"/>  
            <code value="FHIR-Client"/> 
        </profile> 
    </origin>  
    <destination> 
        <index value="1"/>  
        <profile> 
            <system value="http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types"/>  
            <code value="FHIR-Server"/> 
        </profile> 
    </destination>  
    <fixture id="data-requirements-input-02"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/input/data-requirements-input-02.xml"/> 
        </resource> 
    </fixture>  
    <profile id="LibraryProfile"> 
        <reference value="http://hl7.org/fhir/StructureDefinition/Library"/> 
    </profile>  
    <profile id="ParametersProfileBase"> 
        <reference value="http://hl7.org/fhir/StructureDefinition/Parameters"/> 
    </profile>  
    <variable> 
        <name value="MeasureId"/>  
        <defaultValue value="measure-vte"/>  
        <description value="Enter a resource id for a valid Measure on the destination system."/>  
        <hint value="[Valid Measure Id]"/> 
    </variable>  
    <variable> 
        <name value="PeriodStart"/>  
        <defaultValue value="2018-01-01"/>  
        <description value="Enter the period start date."/>  
        <hint value="YYYY-MM-DD"/> 
    </variable>  
    <variable> 
        <name value="PeriodEnd"/>  
        <defaultValue value="2018-12-31"/>  
        <description value="Enter the period End date."/>  
        <hint value="YYYY-MM-DD"/> 
    </variable>  
    <test id="01-Measure-Data-Requirements"> 
        <name value="01-Measure-Data-Requirements"/>  
        <description value="Retrieve the data requirements for a known Measure and period using HTTP POST in XML format. Expected response is 200 (OK) with a module-definition Library payload. Test the client system request."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="data-requirements"/> 
                </type>  
                <resource value="Measure"/>  
                <description value="Measure $data-requirements operation for a known Measure and period."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <destination value="1"/>  
                <encodeRequestUrl value="true"/>  
                <origin value="1"/>  
                <params value="/${MeasureId}/$data-requirements"/>  
                <sourceId value="data-requirements-input-02"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the request HTTP Header Accept format is the FHIR mime-type 'application/fhir+xml'."/>  
                <direction value="request"/>  
                <headerField value="Accept"/>  
                <operator value="contains"/>  
                <value value="application/fhir+xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the request HTTP Header Content-Type format is the FHIR mime-type 'application/fhir+xml'."/>  
                <direction value="request"/>  
                <headerField value="Accept"/>  
                <operator value="contains"/>  
                <value value="application/fhir+xml"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the sent resource type is Parameters."/>  
                <direction value="request"/>  
                <resource value="Parameters"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the sent Parameters resource type conforms the base FHIR specification."/>  
                <direction value="request"/>  
                <validateProfileId value="ParametersProfileBase"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <direction value="response"/>  
                <response value="okay"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the response HTTP Header Content-Type format is the FHIR mime-type 'application/fhir+xml'."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+xml"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Library."/>  
                <direction value="response"/>  
                <resource value="Library"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource is a valid Library Resource."/>  
                <direction value="response"/>  
                <validateProfileId value="LibraryProfile"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Library type is model-definition."/>  
                <direction value="response"/>  
                <operator value="equals"/>  
                <path value=".type.coding[0].code"/>  
                <value value="model-definition"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test> 
</TestScript>