Test Script

Name/FHIRSandbox/DaVinci/FHIR4-0-1-RA/RA-STU2-draft/02-RA-Task/02-RA-Dynamic-Validate-Task-json
DescriptionTestscript that validates a dynamically entered Risk Adjustment (RA) Clinical Evaluation Evidence Task resource in JSON format. The tester shall provide a resource in the dynamic resource variable field on the testscript. The resource will be validated against the DaVinci Risk Adjustment Task profile. Any validation errors will be provided back in the test results. Example Task resources can be found in the Examples link in the implementation guide found at http://build.fhir.org/ig/HL7/davinci-ra/examples.html.
Version1Latest1
Content
<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">  
    <id value="davinci-ra-task-dynamic-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>DaVinci Risk Adjustment (RA) Dynamic Resource Validate Task - JSON</p> 
        </div> 
    </text>  
    <extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-dynamic-fixture"> 
        <extension url="id"> 
            <valueId value="resource-create"/> 
        </extension>  
        <extension url="resourceType"> 
            <valueString value="Task"/> 
        </extension>  
        <extension url="contentType"> 
            <valueString value="application/fhir+json"/> 
        </extension>  
        <extension url="description"> 
            <valueString value="Task resource using the DaVinci Risk Adjustment Resource Profile"/> 
        </extension>  
        <extension url="hint"> 
            <valueString value="DaVinci RA Task Resource"/> 
        </extension> 
    </extension>  
    <url value="http://wildfhir.aegis.net/fhir4-0-1/TestScript/dv-ra-dynamic-task-json"/>  
    <name value="DVRATASKDYNAMICJSON"/>  
    <title value="DaVinci RA Task Dynamic Resource - JSON"/>  
    <status value="active"/>  
    <date value="2023-04-13"/>  
    <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="Testscript that validates a dynamically entered Risk Adjustment (RA) Clinical Evaluation Evidence Task resource in JSON format.  The tester shall provide a resource in the dynamic resource variable field on the testscript. The resource will be validated against the DaVinci Risk Adjustment Task profile.  Any validation errors will be provided back in the test results. Example Task resources can be found in the Examples link in the implementation guide found at http://build.fhir.org/ig/HL7/davinci-ra/examples.html."/>  
    <copyright value="This FHIR Test Script is licensed under Creative Commons (CC0) 'No Rights Reserved'. Learn more at https://creativecommons.org/licenses"/>  
    <destination id="FHIR Server"> 
        <index value="1"/>  
        <profile> 
            <system value="http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types"/>  
            <code value="FHIR-Server"/> 
        </profile> 
    </destination>  
    <profile id="DV-RA-Task-profile"> 
        <reference value="http://hl7.org/fhir/us/davinci-ra/StructureDefinition/ra-clinical-evaluation-evidence-task"/> 
    </profile>  
    <variable> 
        <name value="RA-Task-Resource"/>  
        <headerField value="Content-Location"/>  
        <sourceId value="resource-create"/> 
    </variable>  
    <test id="01-ValidateTaskResource"> 
        <name value="ValidateTaskResource"/>  
        <description value="A FHIR Client sends a Risk Adjustment (RA) Task resource to a FHIR Server to validate.  The $validate operation is used.  Testers may use any destination server regardless of if supports the $validate operation as the testscript will also validate the request resource."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://touchstone.com/fhir/testscript-operation-codes-extended"/>  
                    <code value="process-message"/> 
                </type>  
                <description value="Send Task to be validated using JSON format"/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/$validate"/>  
                <sourceId value="resource-create"/> 
            </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 entered Task resource conforms to the Da Vinci Risk Adjustment specification."/>  
                <direction value="request"/>  
                <validateProfileId value="DV-RA-Task-profile"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test> 
</TestScript>