Name | /FHIR4-0-1-Connectathon24/Terminology-Formal/JSON Format/Translate/terminology-c24-translate-01-ok-get-json |
Description | ConceptMap $translate tests against known FHIR code systems where the expected outcome is a successful response with a matched code value from the target system. All $translate operations are performed using the FHIR Operation Framework HTTP GET method. |
Version | 1 | Latest | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<TestScript xmlns="http://hl7.org/fhir">
<id value="terminology-c24-translate-01-ok-get-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 - Translate - OK - GET - JSON</p>
</div>
</text>
<url value="http://wildfhir.aegis.net/fhir4-0-0/TestScript/terminology-c24-translate-01-ok-get-json"/>
<name value="FHIRC24TerminologyTranslateOKGETJSON"/>
<title value="FHIR Connectathon 24 - Terminology Services - Translate - OK - GET - 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="ConceptMap $translate tests against known FHIR code systems where the expected outcome is a successful response with a matched code value from the target system. All $translate operations are performed using the FHIR Operation Framework HTTP GET method."/>
<copyright value="(c) AEGIS.net, Inc. 2019"/>
<profile id="ParametersProfile">
<reference value="http://hl7.org/fhir/StructureDefinition/Parameters"/>
</profile>
<test id="01-AddressUseTranslateHome">
<name value="AddressUseTranslateHome"/>
<description value="ConceptMap $translate operation test using HTTP GET; http://hl7.org/fhir/address-use|home, target http://terminology.hl7.org/ValueSet/v3-AddressUse. Expected response is 200 (OK) with a Parameters payload containing the matched target system code."/>
<action>
<operation>
<type>
<system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="translate"/>
</type>
<resource value="ConceptMap"/>
<description value="Test ConceptMap $translate operation for http://hl7.org/fhir/address-use|home, target http://terminology.hl7.org/ValueSet/v3-AddressUse."/>
<accept value="json"/>
<encodeRequestUrl value="true"/>
<params value="/$translate?system=http://hl7.org/fhir/address-use&code=home&source=http://hl7.org/fhir/ValueSet/address-use&target=http://terminology.hl7.org/ValueSet/v3-AddressUse"/>
</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 result with boolean value equal to true."/>
<direction value="response"/>
<expression value="Parameters.parameter.where($this.name = 'result' and ($this.value as boolean))"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned Parameters resource contains the expected parameter match with part concept and valueCoding.code equal to 'H'."/>
<direction value="response"/>
<expression value="Parameters.parameter.where($this.name = 'match').part.where($this.name = 'concept').value.where($this.code = 'H').exists()"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="02-AddressUseTranslateOld">
<name value="AddressUseTranslateOld"/>
<description value="ConceptMap $translate operation test using HTTP GET; http://hl7.org/fhir/address-use|old, target http://terminology.hl7.org/ValueSet/v3-AddressUse. Expected response is 200 (OK) with a Parameters payload containing the matched target system code."/>
<action>
<operation>
<type>
<system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="translate"/>
</type>
<resource value="ConceptMap"/>
<description value="Test ConceptMap $translate operation for http://hl7.org/fhir/address-use|old, target http://terminology.hl7.org/ValueSet/v3-AddressUse."/>
<accept value="json"/>
<encodeRequestUrl value="true"/>
<params value="/$translate?system=http://hl7.org/fhir/address-use&code=old&source=http://hl7.org/fhir/ValueSet/address-use&target=http://terminology.hl7.org/ValueSet/v3-AddressUse"/>
</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 result with boolean value equal to true."/>
<direction value="response"/>
<expression value="Parameters.parameter.where($this.name = 'result' and ($this.value as boolean))"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned Parameters resource contains the expected parameter match with part concept and valueCoding.code equal to 'BAD'."/>
<direction value="response"/>
<expression value="Parameters.parameter.where($this.name = 'match').part.where($this.name = 'concept').value.where($this.code = 'BAD').exists()"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
</TestScript>