Test Script

Name/FHIRSandbox/DaVinci/FHIR4-0-1-PAS/PAS-2-0-1/04-PAS-Update/dv-pas-04-claimUpdate-xml
DescriptionDa Vinci - PAS - FHIR R4 - 01 Claim Update - Test Da Vinci PAS Claim Update $submit operation for an updated (Cancelled) Claim in XML format. The request payload will validate the request and response Bundle payloads against the PAS IG and that the expected response is a Claim Response.
Version1Latest1
Content
<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">  
    <id value="dv-pas-04-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 - 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/FHIRSandbox/DaVinci/fhir4-0-1-PAS/PAS-1-2-0/04-PAS-Update//01-ClaimUpdate/dv-pas-04-claimupdate-xml"/>  
    <name value="DaVinciPASR4ClaimUpdateXML"/>  
    <title value="Da Vinci - PAS - FHIR R4 - Claim Update - XML"/>  
    <status value="active"/>  
    <date value="2023-07-27"/>  
    <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 - 01 Claim Update - Test Da Vinci PAS Claim Update $submit operation for an updated (Cancelled) Claim in XML format. The request payload will validate the request and response Bundle payloads against the PAS IG and that the expected response is a Claim Response."/>  
    <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-ClaimUpdateHomecareBundleExample.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>  
    <test id="01-PASClaimUpdate"> 
        <name value="PASClaimUpdate"/>  
        <description value="Test Da Vinci PAS Claim Update $submit operation for a modified Claim in XML format. The request payload will validate the request and response Bundle payloads against the PAS IG and that the expected response code is a Claim Response."/>  
        <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> 
                <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 or 201."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="200,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>