Test Script

Name/FHIRSandbox/DaVinci/FHIR4-0-1-PCT/01-AEOB-MRI/02-PCT-MRI-Scenario-AEOB-Inq-NotComplete-json
DescriptionPatient Cost Transparency - MRI Scenario - AEOB Inquiry Outcome Not Complete - System inquires on the AEOB with the expectation that the Outcome value is equal to any value of 'complete', 'error', 'partial', or 'queued'. PreCondition: A GFE $submit operation has been completed and a Bundle has been returned with a uuid that is used in the AEOB inquiry.
Version9Latest9
Content
<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">  
    <id value="pct-mri-scenario-aeob-inquiry-not-complete-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>Patient Cost Transparency - MRI Scenario - AEOB Inquiry Outcome Not Complete - JSON</p> 
        </div> 
    </text>  
    <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule"> 
        <extension url="ruleId"> 
            <valueId value="rule-validate-Bundle"/> 
        </extension>  
        <extension url="path"> 
            <valueString value="/FHIRCommon/_reference/rule/AssertValidateJSONExtractProfileId-withFhirPath.groovy"/> 
        </extension>  
        <extension url="param"> 
            <extension url="name"> 
                <valueString value="jsonPath"/> 
            </extension>  
            <extension url="value"> 
                <valueString value="$.entry[0].resource"/> 
            </extension> 
        </extension>  
        <extension url="param"> 
            <extension url="name"> 
                <valueString value="fhirPath"/> 
            </extension>  
            <extension url="value"> 
                <valueString value="Bundle.entry[0].resource.as(Bundle)"/> 
            </extension> 
        </extension>  
        <extension url="param"> 
            <extension url="name"> 
                <valueString value="profileId"/> 
            </extension>  
            <extension url="value"> 
                <valueString value="AEOB-bundle-profile"/> 
            </extension> 
        </extension> 
    </extension>  
    <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule"> 
        <extension url="ruleId"> 
            <valueId value="rule-validate-OperationOutcome"/> 
        </extension>  
        <extension url="path"> 
            <valueString value="/FHIRCommon/_reference/rule/AssertValidateJSONExtractProfileId-withFhirPath.groovy"/> 
        </extension>  
        <extension url="param"> 
            <extension url="name"> 
                <valueString value="jsonPath"/> 
            </extension>  
            <extension url="value"> 
                <valueString value="$.entry[0].resource"/> 
            </extension> 
        </extension>  
        <extension url="param"> 
            <extension url="name"> 
                <valueString value="fhirPath"/> 
            </extension>  
            <extension url="value"> 
                <valueString value="Bundle.entry[0].resource.as(OperationOutcome)"/> 
            </extension> 
        </extension>  
        <extension url="param"> 
            <extension url="name"> 
                <valueString value="profileId"/> 
            </extension>  
            <extension url="value"> 
                <valueString value="PCT-OperationOutcome-profile"/> 
            </extension> 
        </extension> 
    </extension>  
    <url value="http://wildfhir.aegis.net/fhir4-0-1/TestScript/pct-mri-scenario-aeob-inquiry-json"/>  
    <name value="PCTMRIAEOBINQJSON"/>  
    <title value="Patient Cost Transparency - MRI Scenario - AEOB Inquiry Outcome Not Complete - JSON"/>  
    <status value="active"/>  
    <date value="2023-01-12"/>  
    <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="Patient Cost Transparency - MRI Scenario - AEOB Inquiry Outcome Not Complete - System inquires on the AEOB with the expectation that the Outcome value is equal to any value of 'complete', 'error', 'partial', or 'queued'.  PreCondition: A GFE $submit operation has been completed and a Bundle has been returned with a uuid that is used in the AEOB inquiry."/>  
    <copyright value="This FHIR Test Script is licensed under Creative Commons (CC0) 'No Rights Reserved'. Learn more at https://creativecommons.org/licenses"/>  
    <origin id="Provider System (Information Request Sender)"> 
        <index value="1"/>  
        <profile> 
            <system value="http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types"/>  
            <code value="FHIR-Client"/> 
        </profile> 
    </origin>  
    <destination id="Payer System (Information Request Recipient)"> 
        <index value="1"/>  
        <profile> 
            <system value="http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types"/>  
            <code value="FHIR-Server"/> 
        </profile> 
    </destination>  
    <profile id="AEOB-bundle-profile"> 
        <reference value="http://hl7.org/fhir/us/davinci-pct/StructureDefinition/davinci-pct-aeob-bundle"/> 
    </profile>  
    <profile id="PCT-OperationOutcome-profile"> 
        <reference value="http://hl7.org/fhir/us/davinci-pct/StructureDefinition/davinci-pct-aeob-complete"/> 
    </profile>  
    <profile id="PCT-Adv-EOB-profile"> 
        <reference value="http://hl7.org/fhir/us/davinci-pct/StructureDefinition/davinci-pct-aeob"/> 
    </profile>  
    <profile id="PCT-Organization-profile"> 
        <reference value="http://hl7.org/fhir/us/davinci-pct/StructureDefinition/davinci-pct-organization"/> 
    </profile>  
    <profile id="PCT-Practitioner-profile"> 
        <reference value="http://hl7.org/fhir/us/davinci-pct/StructureDefinition/davinci-pct-practitioner"/> 
    </profile>  
    <profile id="PCT-Coverage-profile"> 
        <reference value="http://hl7.org/fhir/us/davinci-pct/StructureDefinition/davinci-pct-coverage"/> 
    </profile>  
    <variable> 
        <name value="AEOB-URL"/>  
        <description value="Enter the  url of the AEOB to inquire on.  This was the Content-Location header in the response on the original GFE $submit."/> 
    </variable>  
    <test id="01-InquireAEOB"> 
        <name value="01-InqAEOB"/>  
        <description value="Inquire to retrieve the AEOB Bundle.  This test assumes that the Outcome may not be equal to 'complete' and any value of 'complete', 'error', 'partial', or 'queued' are acceptable."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="search"/> 
                </type>  
                <resource value="Bundle"/>  
                <description value="Read the Content-Location Header to poll for and fetch the completed AEOB Bundle."/>  
                <accept value="json"/>  
                <destination value="1"/>  
                <encodeRequestUrl value="true"/>  
                <origin value="1"/>  
                <responseId value="search-response"/>  
                <url value="${AEOB-URL}"/> 
            </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 JSON mime type 'application/fhir+json'."/>  
                <direction value="request"/>  
                <headerField value="Accept"/>  
                <operator value="contains"/>  
                <value value="application/fhir+json"/>  
                <warningOnly value="true"/> 
            </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 202."/>  
                <direction value="response"/>  
                <operator value="in"/>  
                <responseCode value="200,202"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test> 
</TestScript>