Name | /CDSHSandbox/DaVinci/CDSH1-0-FR4-0-1-Test/CRD-General/00-Discovery/dv-crd-r4-discovery-base-client |
Description | CDS Hooks 1.0 - FHIR R4 v4.0.0 - Discovery - Client (default format JSON); validate the CDS Hooks server returns a valid list of services that contain the required and conditionally recommended fields. The focus of this test is correct client behavior. |
Version | 3 | Latest | 3 |
<?xml version="1.0" encoding="UTF-8"?>
<TestScript xmlns="http://hl7.org/fhir">
<id value="dv-crd-r4-discovery-base-client"/>
<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>CDS Hooks 1.0 - FHIR R4 v4.0.0 - Discovery - Base - Client</p>
</div>
</text>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule">
<extension url="ruleId">
<valueId value="rule-verify-required"/>
</extension>
<extension url="path">
<valueString value="/CDSHCommon/_reference/rule/AssertServicesAllRequired.groovy"/>
</extension>
</extension>
<url value="http://wildfhir.aegis.net/fhir4-0-0/TestScript/dv-crd-r4-discovery-base-client"/>
<name value="CDSH10FHIRR4DiscoveryBase"/>
<title value="CDS Hooks 1.0 - FHIR R4 v4.0.0 - Discovery - Base - Client"/>
<status value="active"/>
<date value="2019-01-10"/>
<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="CDS Hooks 1.0 - FHIR R4 v4.0.0 - Discovery - Client (default format JSON); validate the CDS Hooks server returns a valid list of services that contain the required and conditionally recommended fields. The focus of this test is correct client behavior."/>
<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://touchstone.com/fhir/testscript-profile-origin-types-extended"/>
<code value="CDSH-Client"/>
</profile>
</origin>
<destination>
<index value="1"/>
<profile>
<system value="http://touchstone.com/fhir/testscript-profile-destination-types-extended"/>
<code value="CDSH-Server"/>
</profile>
</destination>
<test id="01-Discovery-Services">
<name value="01-Discovery-Services"/>
<description value="Test the sent cds-services operation of a CDS Hooks client. The expected response code is 200(OK) and payload content of a valid services list that contain the required and conditionally recommended fields."/>
<action>
<operation>
<type>
<system value="http://touchstone.com/cds-hooks/testscript-operation-codes"/>
<code value="cds-services"/>
</type>
<description value="Execute the cds-services operation to return the server's services list."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="/cds-services"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the sent Accept format is of type json."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="json"/>
<warningOnly value="false"/>
</assert>
</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 of type json."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="json"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Verify at least one service was returned."/>
<direction value="response"/>
<operator value="greaterThan"/>
<path value="services.length()"/>
<value value="0"/>
<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-required"/>
</extension>
</extension>
<description value="Verify all services contain the required and conditionally recommended fields."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
</TestScript>