Name | /FHIR4-0-1-Connectathon26/Terminology-Formal/JSON Format/Lookup/terminology-lookup-loinc-02-ok-post-code-simple-json |
Description | CodeSystem $lookup simple tests against known LOINC codes where the expected outcome is a successful response with valid name and display value. All $lookup operations are performed using the FHIR Operation Framework HTTP POST method with Parameters of system and code. |
Version | 1 | Latest | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<TestScript xmlns="http://hl7.org/fhir">
<id value="terminology-c25-lookup-loinc-02-ok-post-code-simple-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 25 - Terminology Services - Lookup - LOINC - OK - POST - Code - Simple - JSON</p>
</div>
</text>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule">
<extension url="ruleId">
<valueId value="rule-verify-display"/>
</extension>
<extension url="path">
<valueString value="../_reference/rule/response/body/RuleLookupVerifyDisplayResponse.groovy"/>
</extension>
<extension url="param">
<extension url="name">
<valueString value="codeSystem"/>
</extension>
<extension url="value">
<valueString value="LOINC"/>
</extension>
</extension>
<extension url="param">
<extension url="name">
<valueString value="codeValue"/>
</extension>
<extension url="value">
<valueString value="1963-8"/>
</extension>
</extension>
<extension url="param">
<extension url="name">
<valueString value="expectedLongName"/>
</extension>
<extension url="value">
<valueString value="Bicarbonate [Moles/volume] in Serum"/>
</extension>
</extension>
<extension url="param">
<extension url="name">
<valueString value="expectedShortName"/>
</extension>
<extension url="value">
<valueString value="HCO3 Ser-sCnc"/>
</extension>
</extension>
</extension>
<url value="http://wildfhir.aegis.net/fhir4-0-0/TestScript/terminology-c25-lookup-loinc-02-ok-post-code-simple-json"/>
<name value="FHIRc25TerminologyLookupLOINCPOSTCodeJSON"/>
<title value="FHIR Connectathon 25 - Terminology Services - Lookup - LOINC - OK - POST - Code - Simple - 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 $lookup simple tests against known LOINC codes where the expected outcome is a successful response with valid name and display value. All $lookup operations are performed using the FHIR Operation Framework HTTP POST method with Parameters of system and code."/>
<copyright value="(c) AEGIS.net, Inc. 2019"/>
<fixture id="lookup-loinc-input-01">
<autocreate value="false"/>
<autodelete value="false"/>
<resource>
<reference value="../_reference/input/lookup-loinc-input-code-01.json"/>
</resource>
</fixture>
<profile id="ParametersProfile">
<reference value="http://hl7.org/fhir/StructureDefinition/Parameters"/>
</profile>
<test id="01-LOINC-LookupBicarbonateSerum">
<name value="LOINC-LookupBicarbonateSerum"/>
<description value="Lookup test for LOINC system and code using HTTP POST with system and code parameters; 1963-8 (Bicarbonate [Moles/volume] in Serum). Expected response is 200 (OK) with a Parameters payload containing the name of the terminology and correct display value."/>
<action>
<operation>
<type>
<system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="lookup"/>
</type>
<resource value="CodeSystem"/>
<description value="CodeSystem $lookup operation for LOINC system and code for Bicarbonate [Moles/volume] in Serum."/>
<accept value="json"/>
<contentType value="json"/>
<encodeRequestUrl value="true"/>
<params value="/$lookup"/>
<sourceId value="lookup-loinc-input-01"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<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."/>
<direction value="response"/>
<contentType value="json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Parameters."/>
<direction value="response"/>
<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 resource contains the expected parameter name with valueString of LOINC."/>
<direction value="response"/>
<operator value="contains"/>
<path value=".parameter[?(@.name=='name')].valueString"/>
<value value="LOINC"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-verify-display"/>
</extension>
</extension>
<description value="Complex rule to verify the Parameters parameter display contains the correct LOINC long name or optional short name value. If the short name is found a warning is returned."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
</TestScript>