Test Script

Name/FHIRSandbox/DaVinci/FHIR4-0-1-PAS/PAS-1-0-0/01-ClaimScenario/02-ClaimUpdate/dv-pas-r4-02a-claimupdate-xml
DescriptionDa Vinci - PAS - FHIR R4 - 02a Claim Update - test to verify a client and server support for the Da Vinci PAS IG Claim Update $submit operation using XML syntax. If the Touchstone system is used as the Origin system, the request will contain a fixed Device Request prior authorization request that matches the fixed request data from the 01 Claim Submit tests. This test may be run peer-to-peer and if so, the test will validate both the request (Claim $submit) and the response and the test will not utilize any fixed data.
Version1Latest1
Content
<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">  
    <id value="dv-pas-r4-02a-claimupdate-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>Da Vinci - PAS - FHIR R4 - 02a Claim Update - XML</p>
        </div> 
    </text>  
    <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule"> 
        <extension url="ruleId"> 
            <valueId value="rule-validate-pas-claim-update-bundle-claim"/> 
        </extension>  
        <extension url="path"> 
            <valueString value="/FHIRCommon/_reference/rule/AssertValidateXMLExtractProfileId-withFhirPath.groovy"/> 
        </extension>  
        <extension url="param"> 
            <extension url="name"> 
                <valueString value="xPath"/> 
            </extension>  
            <extension url="value"> 
                <valueString value="/Bundle/entry/resource/Claim"/> 
            </extension> 
        </extension>  
        <extension url="param"> 
            <extension url="name"> 
                <valueString value="fhirPath"/> 
            </extension>  
            <extension url="value"> 
                <valueString value="Bundle.entry.resource.as(Claim)"/> 
            </extension> 
        </extension>  
        <extension url="param"> 
            <extension url="name"> 
                <valueString value="profileId"/> 
            </extension>  
            <extension url="value"> 
                <valueString value="PASClaimUpdateProfile"/> 
            </extension> 
        </extension> 
    </extension>  
    <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/AssertValidateXMLExtractProfileId-withFhirPath.groovy"/> 
        </extension>  
        <extension url="param"> 
            <extension url="name"> 
                <valueString value="xPath"/> 
            </extension>  
            <extension url="value"> 
                <valueString value="/Bundle/entry/resource/ClaimResponse"/> 
            </extension> 
        </extension>  
        <extension url="param"> 
            <extension url="name"> 
                <valueString value="fhirPath"/> 
            </extension>  
            <extension url="value"> 
                <valueString value="Bundle.entry.resource.as(ClaimResponse)"/> 
            </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-02a-claimupdate-xml"/>  
    <name value="DaVinciPASR402aClaimUpdateXML"/>  
    <title value="Da Vinci - PAS - FHIR R4 - 02a Claim Update - XML"/>  
    <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 - 02a Claim Update - test to verify a client and server support for the Da Vinci PAS IG Claim Update $submit operation using XML syntax. If the Touchstone system is used as the Origin system, the request will contain a fixed Device Request prior authorization request that matches the fixed request data from the 01 Claim Submit tests.  This test may be run peer-to-peer and if so, the test will validate both the request (Claim $submit) and the response and the test will not utilize any fixed data."/>  
    <copyright value="This FHIR Test Script is licensed under Creative Commons (CC0) 'No Rights Reserved'. Learn more at https://creativecommons.org/licenses"/>  
    <origin id="Claim Submit Sender (Provider)"> 
        <index value="1"/>  
        <profile> 
            <system value="http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types"/>  
            <code value="FHIR-Client"/> 
        </profile> 
    </origin>  
    <destination id="Claim Submit Recipient (Payer)"> 
        <index value="1"/>  
        <profile> 
            <system value="http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types"/>  
            <code value="FHIR-Server"/> 
        </profile> 
    </destination>  
    <fixture id="claim-update-request-bundle"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/Bundle-ClaimSubmitHomecareUpdateBundleExample.xml"/> 
        </resource> 
    </fixture>  
    <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="PASClaimUpdateProfile"> 
        <reference value="http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim-update"/> 
    </profile>  
    <profile id="PASClaimResponseProfile"> 
        <reference value="http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claimresponse"/> 
    </profile>  
    <variable> 
        <name value="ClaimId"/>  
        <description value="The Id of the Claim to be Updated"/>  
        <hint value="[Claim Id]"/> 
    </variable>  
    <test id="01-PASClaimUpdate"> 
        <name value="PASClaimUpdate"/>  
        <description value="Test Da Vinci PAS Claim Update $submit operation for a modified Claim. The request payload will validate the request and response Bundle payloads against the PAS IG and that the expected response code is 201 Created using using XML syntax."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://touchstone.com/fhir/testscript-operation-codes-extended"/>  
                    <code value="submit"/> 
                </type>  
                <resource value="Claim"/>  
                <description value="Test Da Vinci PAS Claim Update $submit operation with HTTP Header Accept set to XML format."/>  
                <accept value="xml"/>  
                <contentType value="xml"/>  
                <destination value="1"/>  
                <encodeRequestUrl value="true"/>  
                <origin value="1"/>  
                <params value="/$submit"/>  
                <sourceId value="claim-update-request-bundle"/> 
            </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 client requested an Accept of the FHIR XML 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> 
                <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"> 
                    <valueBoolean value="false"/> 
                </extension>  
                <description value="Confirm that the client request included a Content-Type of the FHIR XML format."/>  
                <direction value="request"/>  
                <contentType value="xml"/>  
                <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 client request payload contains a Bundle resource type."/>  
                <direction value="request"/>  
                <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 type is collection."/>  
                <direction value="request"/>  
                <operator value="equals"/>  
                <path value="Bundle/type"/>  
                <value value="collection"/>  
                <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.entry contains a single Claim resource."/>  
                <direction value="request"/>  
                <expression value="Bundle.entry.select(resource as Claim).count()"/>  
                <value value="1"/>  
                <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="Validate that the client request payload Bundle resource contents conforms to the Da Vinci PAS IG."/>  
                <direction value="request"/>  
                <validateProfileId value="PASRequestBundleProfile"/>  
                <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-claim-update-bundle-claim"/> 
                    </extension> 
                </extension>  
                <description value="Validate PAS Claim Update within the request PAS Bundle."/>  
                <direction value="request"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 201(Created)."/>  
                <direction value="response"/>  
                <responseCode value="201"/>  
                <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+xml'."/>  
                <direction value="response"/>  
                <headerField value="Content-Type"/>  
                <operator value="contains"/>  
                <value value="application/fhir+xml"/>  
                <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 resource type is Bundle."/>  
                <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 type is collection."/>  
                <direction value="response"/>  
                <operator value="equals"/>  
                <path value="Bundle/type"/>  
                <value value="collection"/>  
                <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.entry contains a single ClaimResponse resource."/>  
                <direction value="response"/>  
                <expression value="Bundle.entry.select(resource as ClaimResponse).count()"/>  
                <value value="1"/>  
                <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> 
                <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>