Name | /FHIR4-0-1-Connectathon26/Terminology-Formal/XML Format/Validate-CodeSystem/terminology-validate-cs-loinc-05-notok-post-code-xml |
Description | CodeSystem $validate-code tests against known LOINC codes where the expected outcome is a failure response and either a valid Parameters payload with a result value false and a message value, or an OperationOutcome. All $validate-code operations are performed using the FHIR Operation Framework HTTP POST method with Parameters of url, code and display. |
Version | 1 | Latest | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<TestScript xmlns="http://hl7.org/fhir">
<id value="terminology-c25-validate-cs-loinc-05-notok-post-code-xml"/>
<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 - CodeSystem Validate Code - LOINC - NOT OK - POST - Code - XML</p>
</div>
</text>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-ruleset">
<extension url="rulesetId">
<valueId value="ruleset-validatenotok-responsecode-body"/>
</extension>
<extension url="path">
<valueString value="../_reference/ruleset/RuleSet-ValidateNotOkResponseCodeBody-Groovy.xml"/>
</extension>
<extension url="rule">
<extension url="ruleId">
<valueId value="assertResourceTypesIfBody"/>
</extension>
<extension url="param">
<extension url="name">
<valueString value="resource"/>
</extension>
<extension url="value">
<valueString value="OperationOutcome,Parameters"/>
</extension>
</extension>
</extension>
<extension url="rule">
<extension url="ruleId">
<valueId value="assertOperationOutcomeIfError"/>
</extension>
</extension>
<extension url="rule">
<extension url="ruleId">
<valueId value="assertProfileIfOperationOutcome"/>
</extension>
<extension url="param">
<extension url="name">
<valueString value="validateProfileId"/>
</extension>
<extension url="value">
<valueString value="OperationOutcomeProfile"/>
</extension>
</extension>
</extension>
<extension url="rule">
<extension url="ruleId">
<valueId value="assertPathIfOperationOutcome"/>
</extension>
</extension>
<extension url="rule">
<extension url="ruleId">
<valueId value="assertParametersIfSuccess"/>
</extension>
</extension>
<extension url="rule">
<extension url="ruleId">
<valueId value="assertProfileIfParameters"/>
</extension>
<extension url="param">
<extension url="name">
<valueString value="validateProfileId"/>
</extension>
<extension url="value">
<valueString value="ParametersProfile"/>
</extension>
</extension>
</extension>
<extension url="rule">
<extension url="ruleId">
<valueId value="assertPathIfParameters"/>
</extension>
</extension>
</extension>
<url value="http://wildfhir.aegis.net/fhir4-0-0/TestScript/terminology-c25-validate-cs-loinc-05-notok-post-code-xml"/>
<name value="FHIRc25TerminologyCSValidateLOINCNotOKPOSTCodeXML"/>
<title value="FHIR Connectathon 25 - Terminology Services - CodeSystem Validate Code - LOINC - NOT OK - POST - Code - XML"/>
<status value="active"/>
<date value="2020-09-04"/>
<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 failure response and either a valid Parameters payload with a result value false and a message value, or an OperationOutcome. All $validate-code operations are performed using the FHIR Operation Framework HTTP POST method with Parameters of url, code and display."/>
<copyright value="(c) AEGIS.net, Inc. 2019"/>
<fixture id="validate-code-loinc-input-notok-01">
<autocreate value="false"/>
<autodelete value="false"/>
<resource>
<reference value="../_reference/input/validate-code-loinc-input-notok-code-01.xml"/>
</resource>
</fixture>
<fixture id="validate-code-loinc-input-notok-02">
<autocreate value="false"/>
<autodelete value="false"/>
<resource>
<reference value="../_reference/input/validate-code-loinc-input-notok-code-02.xml"/>
</resource>
</fixture>
<fixture id="validate-code-loinc-input-notok-03">
<autocreate value="false"/>
<autodelete value="false"/>
<resource>
<reference value="../_reference/input/validate-code-loinc-input-notok-code-03.xml"/>
</resource>
</fixture>
<profile id="ParametersProfile">
<reference value="http://hl7.org/fhir/StructureDefinition/Parameters"/>
</profile>
<profile id="OperationOutcomeProfile">
<reference value="http://hl7.org/fhir/StructureDefinition/OperationOutcome"/>
</profile>
<test id="01-LOINC-ValidateSystolic-InvalidDisplay">
<name value="LOINC-ValidateSystolic-InvalidDisplay"/>
<description value="Validate code test for LOINC code system using HTTP POST with url, code and display parameters; where code='11378-7' and invalid display='Systolic blood pressure at First encounterX'. Expected response is 200 (OK) with a Parameters payload containing the result value false and a message value; optional response is 4xx/5xx with an OperationOutcome payload containing at least one error issue."/>
<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 invalid display."/>
<accept value="xml"/>
<contentType value="xml"/>
<encodeRequestUrl value="true"/>
<params value="/$validate-code"/>
<sourceId value="validate-code-loinc-input-notok-01"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned format is XML. Warning only to allow for review."/>
<contentType value="xml"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-ruleset">
<extension url="rulesetId">
<valueId value="ruleset-validatenotok-responsecode-body"/>
</extension>
</extension>
<description value="Complex ruleset assertion to conditionally validate expected validate-code not ok response code and body."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="02-LOINC-ValidateSystolic-InvalidCode">
<name value="LOINC-ValidateSystolic-InvalidCode"/>
<description value="Validate code test for LOINC code system using HTTP POST with url and code parameters; where invalid code='11378-7X'. Expected response is 200 (OK) with a Parameters payload containing the result value false and a message value; optional response is 4xx/5xx with an OperationOutcome payload containing at least one error issue."/>
<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 an valid code."/>
<accept value="xml"/>
<contentType value="xml"/>
<encodeRequestUrl value="true"/>
<params value="/$validate-code"/>
<sourceId value="validate-code-loinc-input-notok-02"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned format is XML. Warning only to allow for review."/>
<contentType value="xml"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-ruleset">
<extension url="rulesetId">
<valueId value="ruleset-validatenotok-responsecode-body"/>
</extension>
</extension>
<description value="Complex ruleset assertion to conditionally validate expected validate-code not ok response code and body."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="03-LOINC-ValidateSystolic-InvalidSystem">
<name value="LOINC-ValidateSystolic-InvalidSystem"/>
<description value="Validate code test for LOINC code system using HTTP POST with url and code parameters; where invalid system='http://loinc.orgX' and code='11378-7'. Expected response is 200 (OK) with a Parameters payload containing the result value false and a message value; optional response is 4xx/5xx with an OperationOutcome payload containing at least one error issue."/>
<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 an valid code."/>
<accept value="xml"/>
<contentType value="xml"/>
<encodeRequestUrl value="true"/>
<params value="/$validate-code"/>
<sourceId value="validate-code-loinc-input-notok-03"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned format is XML. Warning only to allow for review."/>
<contentType value="xml"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-ruleset">
<extension url="rulesetId">
<valueId value="ruleset-validatenotok-responsecode-body"/>
</extension>
</extension>
<description value="Complex ruleset assertion to conditionally validate expected validate-code not ok response code and body."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
</TestScript>