Test Script

Name/FHIR4-0-1-Connectathon24/Terminology-Formal/JSON Format/Validate-CodeSystem/terminology-c24-validate-cs-loinc-03-ok-post-coding-json
DescriptionCodeSystem $validate-code tests against known LOINC codes where the expected outcome is a successful response and a valid Parameters payload with a result true value. All $validate-code operations are performed using the FHIR Operation Framework HTTP POST method with Parameter of coding.
Version1Latest1
Content
<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">  
    <id value="terminology-c24-validate-cs-loinc-03-ok-post-coding-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>FHIR Connectathon 24 - Terminology Services - CodeSystem Validate Code - LOINC - OK - POST - Coding - JSON</p>
        </div> 
    </text>  
    <url value="http://wildfhir.aegis.net/fhir4-0-0/TestScript/terminology-c24-validate-cs-loinc-03-ok-post-coding-json"/>  
    <name value="FHIRC24TerminologyCSValidateLOINCOKPOSTCodingJSON"/>  
    <title value="FHIR Connectathon 24 - Terminology Services - CodeSystem Validate Code - LOINC - OK - POST - Coding - JSON"/>  
    <status value="active"/>  
    <date value="2020-04-24"/>  
    <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="CodeSystem $validate-code tests against known LOINC codes where the expected outcome is a successful response and a valid Parameters payload with a result true value. All $validate-code operations are performed using the FHIR Operation Framework HTTP POST method with Parameter of coding."/>  
    <copyright value="(c) AEGIS.net, Inc. 2019"/>  
    <fixture id="validate-code-loinc-input-01"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="../_reference/input/validate-code-loinc-input-coding-01.json"/> 
        </resource> 
    </fixture>  
    <fixture id="validate-code-valid-min"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="../_reference/output/validate-code-valid-min.json"/> 
        </resource> 
    </fixture>  
    <profile id="ParametersProfile"> 
        <reference value="http://hl7.org/fhir/StructureDefinition/Parameters"/> 
    </profile>  
    <test id="01-LOINC-ValidateSystolic"> 
        <name value="LOINC-ValidateSystolic"/>  
        <description value="Validate code test for LOINC code system using HTTP POST with coding parameter; where code='11378-7' and display='Systolic blood pressure at First encounter'. Expected response is 200 (OK) with a Parameters payload containing the result value true."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>  
                    <code value="validate-code"/> 
                </type>  
                <resource value="CodeSystem"/>  
                <description value="Test $validate-code operation on the LOINC code system for a valid code and display."/>  
                <accept value="json"/>  
                <contentType value="json"/>  
                <encodeRequestUrl value="true"/>  
                <params value="/$validate-code"/>  
                <sourceId value="validate-code-loinc-input-01"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned HTTP status is 200(OK)."/>  
                <response value="okay"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned format is JSON. Warning only to allow for review."/>  
                <contentType value="json"/>  
                <warningOnly value="true"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned resource type is Parameters."/>  
                <resource value="Parameters"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Parameters resource type conforms the base FHIR specification."/>  
                <direction value="response"/>  
                <validateProfileId value="ParametersProfile"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action>  
        <action> 
            <assert> 
                <description value="Confirm that the returned Parameters minimally contains the information in validate-code-valid-min."/>  
                <minimumId value="validate-code-valid-min"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test> 
</TestScript>