Name | /FHIRSandbox/DaVinci/00-FHIR3-0-1-Test/DEQM/01-MRP/03-CollectData/dv-deqm-r3-mrp-cd-01-ok-json |
Description | Da Vinci Measure $collect-data operation simple test against a known Measure resource where the expected outcome is a successful response. All $collect-data operations are performed using the FHIR Operation Framework HTTP POST method with Parameters of periodStart, periodEnd and patient. |
Version | 1 | Latest | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<TestScript xmlns="http://hl7.org/fhir">
<id value="dv-deqm-r3-mrp-cd-01-ok-json"/>
<url value="http://wildfhir.aegis.net/fhir3-0-1/TestScript/dv-deqm-r3-mrp-cd-01-ok-json"/>
<name value="dv-deqm-r3-mrp-cd-01-ok-json"/>
<status value="active"/>
<date value="2019-05-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 $collect-data operation simple test against a known Measure resource where the expected outcome is a successful response. All $collect-data operations are performed using the FHIR Operation Framework HTTP POST method with Parameters of periodStart, periodEnd and patient."/>
<copyright value="(c) AEGIS.net, Inc. 2019"/>
<origin>
<index value="1"/>
<profile>
<system value="http://hl7.org/fhir/testscript-profile-origin-types"/>
<code value="FHIR-Client"/>
</profile>
</origin>
<destination>
<index value="1"/>
<profile>
<system value="http://hl7.org/fhir/testscript-profile-destination-types"/>
<code value="FHIR-Server"/>
</profile>
</destination>
<fixture id="collect-data-input-01">
<resource>
<reference value="./_reference/input/collect-data-input-01.json"/>
</resource>
</fixture>
<profile id="OperationOutcomeProfileBase">
<reference value="http://hl7.org/fhir/StructureDefinition/OperationOutcome"/>
</profile>
<profile id="ParametersProfileBase">
<reference value="http://hl7.org/fhir/StructureDefinition/Parameters"/>
</profile>
<variable>
<name value="MeasureId"/>
<defaultValue value="measure-mrp"/>
<description value="Enter a resource id for a valid Measure on the destination system."/>
<hint value="[Measure Id]"/>
</variable>
<variable>
<name value="PatientId"/>
<description value="Enter a resource id for a valid Patient on the destination system."/>
<hint value="[Patient 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>
<ruleset id="ruleset-operationok-headers-body">
<resource>
<reference value="/FHIRCommon/_reference/ruleset/RuleSet-OperationOkHeadersBody-Groovy.xml"/>
</resource>
<rule>
<ruleId value="assertContentTypeIfBody"/>
</rule>
<rule>
<ruleId value="assertContentTypeCharsetIfBody"/>
</rule>
<rule>
<ruleId value="assertResourceTypesIfBody"/>
<param>
<name value="resource"/>
<value value="Bundle,OperationOutcome"/>
</param>
</rule>
<rule>
<ruleId value="assertProfileIfOperationOutcome"/>
<param>
<name value="validateProfileId"/>
<value value="OperationOutcomeProfileBase"/>
</param>
</rule>
<rule>
<ruleId value="assertProfileIfResource"/>
<param>
<name value="resource"/>
<value value="Parameters"/>
</param>
<param>
<name value="validateProfileId"/>
<value value="ParametersProfileBase"/>
</param>
</rule>
</ruleset>
<test id="01-Measure-Collect-Data">
<name value="01-Measure-Collect-Data"/>
<description value="Collect the required data for a known Measure, Patient and Period Date Range using HTTP POST. Expected response is 200 (OK). Test the client system request."/>
<action>
<operation>
<type>
<system value="http://touchstone.com/fhir/testscript-operation-codes-extended"/>
<code value="collect-data"/>
</type>
<resource value="Measure"/>
<description value="Measure $collect-data operation for a known Measure."/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="/${MeasureId}/$collect-data"/>
<sourceId value="collect-data-input-01"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the request HTTP Header Accept format is the FHIR mime-type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the request HTTP Header Accept contains 'charset=utf-8'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="charset=utf-8"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the request HTTP Header Content-Type format is the FHIR mime-type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the request HTTP Header Content-Type contains 'charset=utf-8'."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="charset=utf-8"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the request body resource type is Parameters."/>
<direction value="request"/>
<resource value="Parameters"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the request body Parameters resource conforms the base FHIR specification and all DEQM MRP profiles."/>
<direction value="request"/>
<validateProfileId value="ParametersProfileBase"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the response HTTP Header Content-Type format is the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the response HTTP Header Content-Type contains 'charset=utf-8'."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="charset=utf-8"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the response body resource type is Parameters."/>
<direction value="response"/>
<resource value="Parameters"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the response body Parameters resource conforms the base FHIR specification and all DEQM MRP profiles."/>
<direction value="response"/>
<validateProfileId value="ParametersProfileBase"/>
</assert>
</action>
</test>
</TestScript>