Name | /FHIRSandbox/DaVinci/FHIR4-0-1-PAS/PAS-1-0-0/01-ClaimScenario/03-GetClaimRespID/dv-pas-r4-03-getclaimresponsebyid-json |
Description | Da Vinci PAS - FHIR R4 - 03 Get ClaimResponse By Id - JSON - test to query the Server to see if the status of the prior authorization has changed. This is done by performing a query on the server’s “ClaimResponse” endpoint, searching based on prior authorization identifier and uses the JSON syntax. |
Version | 1 | Latest | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<TestScript xmlns="http://hl7.org/fhir">
<id value="dv-pas-r4-03-getclaimresponsebyid-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 - PAS - FHIR R4 - 03 Get ClaimResponse By Id - JSON</p>
</div>
</text>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule">
<extension url="ruleId">
<valueId value="rule-validate-pas-claimresponse-bundle-claimresponse"/>
</extension>
<extension url="path">
<valueString value="/FHIRCommon/_reference/rule/AssertValidateJSONExtractProfileId.groovy"/>
</extension>
<extension url="param">
<extension url="name">
<valueString value="jsonPath"/>
</extension>
<extension url="value">
<valueString value="$.entry[?(@.resource.resourceType == 'ClaimResponse')].resource"/>
</extension>
</extension>
<extension url="param">
<extension url="name">
<valueString value="profileId"/>
</extension>
<extension url="value">
<valueString value="PASClaimResponseProfile"/>
</extension>
</extension>
</extension>
<url value="http://wildfhir.aegis.net/fhir4-0-0/TestScript/dv-pas-r4-03-getclaimresponsebyid-json"/>
<name value="DaVinciPASR403GetClaimResponseByIdJSON"/>
<title value="Da Vinci - PAS - FHIR R4 - 03 Get ClaimResponse By Id - JSON"/>
<status value="active"/>
<date value="2020-01-31"/>
<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 PAS - FHIR R4 - 03 Get ClaimResponse By Id - JSON - test to query the Server to see if the status of the prior authorization has changed. This is done by performing a query on the server’s “ClaimResponse” endpoint, searching based on prior authorization identifier and uses the JSON syntax."/>
<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>
<profile id="PASRequestBundleProfile">
<reference value="http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-request-bundle"/>
</profile>
<profile id="PASResponseBundleProfile">
<reference value="http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-pas-response-bundle"/>
</profile>
<profile id="PASClaimResponseProfile">
<reference value="http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claimresponse"/>
</profile>
<variable>
<name value="ClaimResponseIdentifier"/>
<description value="Enter a known ClaimResponse identifier on the destination system."/>
<hint value="[ClaimResponse Identifier]"/>
</variable>
<variable>
<name value="PatientIdentifier"/>
<description value="Enter a known Patient identifier on the destination system."/>
<hint value="[Patient Identifier]"/>
</variable>
<test id="01-GetClaimResponseById">
<name value="GetClaimResponseById"/>
<description value="Search for a known ClaimResponse in JSON format with an identifier equal to ${ClaimResponseIdentifier}, patient.identifier equal to ${PatientIdentifier} and active equal to true. The expected response code is 200 (OK) with a Bundle resource in JSON format of type collection containing the found instance of the ClaimResponse."/>
<action>
<operation>
<type>
<system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="ClaimResponse"/>
<description value="Search for a known ClaimResponse by identifier, patient.identifier and active=true."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?identifier=${ClaimResponseIdentifier}&patient.identifier=${PatientIdentifier}&active=true"/>
</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>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the response payload contains the Bundle resource type."/>
<direction value="response"/>
<resource 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="Confirm that the returned Bundle conforms to the Da Vinci PAS IG."/>
<direction value="response"/>
<validateProfileId value="PASResponseBundleProfile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the Bundle.entry contains at least one ClaimResponse resource."/>
<direction value="response"/>
<expression value="Bundle.entry.select(resource as ClaimResponse).count()"/>
<operator value="greaterThan"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-validate-pas-claimresponse-bundle-claimresponse"/>
</extension>
</extension>
<description value="Validate PAS ClaimResponse within the response PAS Bundle."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
</TestScript>