Test Script

Name/FHIRSandbox/DaVinci/FHIR4-0-1-PlanNetProvDir/Plan-Net-1-0-0/01-Error-Codes/02-Unknown-Resource-json
DescriptionDa Vinci - PDEX - PlanNet - FHIR R4 - 02 Unknown Resource - Test the unknown resource error by sending a GET request to an unknown resource id and expecting a 404 HTTP response.
Version1Latest1
Content
<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">  
    <id value="dv-pdex-r4-02-Unknown-Resource-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 - PDEX - PlanNet - FHIR R4 - 02 Unknown Resource - JSON</p>
        </div> 
    </text>  
    <url value="http://wildfhir.aegis.net/fhir4-0-1/TestScript/dv-pdex-r4-02-Unknown-Resource-json"/>  
    <name value="DaVinciPdex00CapabilityJSON"/>  
    <title value="Da Vinci - PDEX - PlanNet - FHIR R4 - 02 Unknown Resource - JSON"/>  
    <status value="active"/>  
    <date value="2020-10-25"/>  
    <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 - PDEX - PlanNet - FHIR R4 - 02 Unknown Resource - Test the unknown resource error by sending a GET request to an unknown resource id and expecting a 404 HTTP response."/>  
    <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="capabilities-profile"> 
        <reference value="http://hl7.org/fhir/StructureDefinition/CapabilityStatement"/> 
    </profile>  
    <variable> 
        <name value="unknown-resource"/>  
        <description value="Enter a resource id for a unknown (has never been created) HealthcareService resource on the destination system."/>  
        <hint value="[Unknown Resource Id]"/> 
    </variable>  
    <test id="00-Unknown-Resource"> 
        <name value="Unknown-Resource"/>  
        <description value="Test the unknown resource error by sending a GET request to an unknown resource id and expecting a 404 HTTP response."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="read"/> 
                </type>  
                <resource value="HealthcareService"/>  
                <description value="Read an unknown HealthcareService."/>  
                <accept value="json"/>  
                <destination value="1"/>  
                <encodeRequestUrl value="true"/>  
                <origin value="1"/>  
                <params value="/${unknown-resource}"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 404 for unknown resource."/>  
                <direction value="response"/>  
                <responseCode value="404"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test> 
</TestScript>