Name | /FHIRSandbox/DaVinci/FHIR4-0-1-Formulary/Formulary-STU2/01-Query/Formulary-STU2-Basic-Endpoint-json |
Description | To test the Formulary Basic Resource API. SHALL requirements will be tested with failures and SHOULD requirements will be tested with warnings. |
Version | 3 | Latest | 3 |
<?xml version="1.0" encoding="UTF-8"?>
<TestScript xmlns="http://hl7.org/fhir">
<id value="Formulary-STU2-Basic-Endpoint-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>To test the Formulary Basic Resource API. SHALL requirements will be tested with failures and SHOULD requirements will be tested with warnings.</p>
</div>
</text>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule">
<extension url="ruleId">
<valueId value="rule-extract-validate"/>
</extension>
<extension url="path">
<valueString value="/FHIRCommon/_reference/rule/AssertValidateJSONExtractProfileId.groovy"/>
</extension>
<extension url="param">
<extension url="name">
<valueString value="jsonPath"/>
</extension>
<extension url="value">
<valueString value="$.entry[?(@.resource.resourceType=='Basic')].resource"/>
</extension>
</extension>
<extension url="param">
<extension url="name">
<valueString value="profileId"/>
</extension>
<extension url="value">
<valueString value="USDF-FormularyItem-profile"/>
</extension>
</extension>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule">
<extension url="ruleId">
<valueId value="historyOrder"/>
</extension>
<extension url="path">
<valueString value="/FHIRCommon/_reference/rule/historyOrder.groovy"/>
</extension>
</extension>
<url value="http://wildfhir.aegis.net/fhir4-0-1/TestScript/Formulary-STU2-Basic-Endpoint-json"/>
<name value="DaVinciFormularyR401BasicJSON"/>
<title value="Da Vinci - Formulary - FHIR R4 - 01 Basic Endpoint - JSON"/>
<status value="active"/>
<date value="2022-12-29"/>
<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="To test the Formulary Basic Resource API. SHALL requirements will be tested with failures and SHOULD requirements will be tested with warnings."/>
<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://terminology.hl7.org/CodeSystem/testscript-profile-origin-types"/>
<code value="FHIR-Client"/>
</profile>
</origin>
<destination>
<index value="1"/>
<profile>
<system value="http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types"/>
<code value="FHIR-Server"/>
</profile>
</destination>
<profile id="USDF-FormularyItem-profile">
<reference value="http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyItem"/>
</profile>
<profile id="bundle-profile">
<reference value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
</profile>
<variable>
<name value="Search-id"/>
<defaultValue value="FormularyItem1"/>
<description value="Enter the _id search value to find a FormularyItem resource on the Basic endpoint."/>
</variable>
<variable>
<name value="Search-lastUpdated"/>
<defaultValue value="gt2020"/>
<description value="Enter the _lastUpdated search value to find a FormularyItem resource on the Basic endpoint."/>
</variable>
<variable>
<name value="Search-code"/>
<expression value="Bundle.entry.resource.code.coding.code"/>
<sourceId value="SearchIdResponse"/>
</variable>
<variable>
<name value="Search-subject"/>
<expression value="Bundle.entry.resource.subject.reference"/>
<sourceId value="SearchIdResponse"/>
</variable>
<variable>
<name value="Search-status"/>
<expression value="Bundle.entry.resource.extension('http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-AvailabilityStatus-extension').value.ofType(code)"/>
<sourceId value="SearchIdResponse"/>
</variable>
<variable>
<name value="Search-period"/>
<defaultValue value="gt2020"/>
<description value="Enter the period search value to find a FormularyItem resource on the Basic endpoint."/>
</variable>
<variable>
<name value="Search-formulary"/>
<expression value="Bundle.entry.resource.extension('http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyReference-extension').value.ofType(Reference).reference"/>
<sourceId value="SearchIdResponse"/>
</variable>
<variable>
<name value="Search-pharmacy-benefit-type"/>
<defaultValue value="1-month-in-retail"/>
<description value="Enter the pharmacy-benefit-type search value to find a FormularyItem resource on the Basic endpoint."/>
</variable>
<variable>
<name value="Search-drug-tier"/>
<expression value="Bundle.entry.resource.extension('http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-DrugTierID-extension').value.ofType(CodeableConcept).coding.code"/>
<sourceId value="SearchIdResponse"/>
</variable>
<test id="01-SearchParameter-id">
<name value="SearchParameter-id"/>
<description value="Test the _id Search Parameter on the Basic endpoint."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Basic"/>
<description value="Test the _id Search Parameter on the Basic endpoint."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?_id=${Search-id}"/>
<responseId value="SearchIdResponse"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the client did not request a Content-Type. Warning-Only to allow for systems that automatically send Content-Type."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<contentType value="json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Bundle."/>
<direction value="response"/>
<resource value="Bundle"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the Bundle type is 'searchset'."/>
<direction value="response"/>
<operator value="equals"/>
<path value=".type"/>
<value value="searchset"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is at least one entry returned."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.count()"/>
<operator value="greaterThan"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned Bundle and its contents conform to the base FHIR specification."/>
<direction value="response"/>
<validateProfileId value="bundle-profile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-extract-validate"/>
</extension>
</extension>
<description value="Validate FormularyItem-profile within the Bundle."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="01-SearchParameter-lastUpdated">
<name value="SearchParameter-lastUpdated"/>
<description value="Test the _lastUpdated Search Parameter on the Basic endpoint."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Basic"/>
<description value="Test the _lastUpdated Search Parameter on the Basic endpoint."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?_lastUpdated=${Search-lastUpdated}"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the client did not request a Content-Type. Warning-Only to allow for systems that automatically send Content-Type."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<contentType value="json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Bundle."/>
<direction value="response"/>
<resource value="Bundle"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the Bundle type is 'searchset'."/>
<direction value="response"/>
<operator value="equals"/>
<path value=".type"/>
<value value="searchset"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is at least one entry returned."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.count()"/>
<operator value="greaterThan"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned Bundle and its contents conform to the base FHIR specification."/>
<direction value="response"/>
<validateProfileId value="bundle-profile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-extract-validate"/>
</extension>
</extension>
<description value="Validate FormularyItem-profile within the Bundle."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="01-SearchParameter-code">
<name value="SearchParameter-code"/>
<description value="Test the code Search Parameter on the Basic endpoint."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Basic"/>
<description value="Test the code Search Parameter on the Basic endpoint."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?code=${Search-code}"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the client did not request a Content-Type. Warning-Only to allow for systems that automatically send Content-Type."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<contentType value="json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Bundle."/>
<direction value="response"/>
<resource value="Bundle"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the Bundle type is 'searchset'."/>
<direction value="response"/>
<operator value="equals"/>
<path value=".type"/>
<value value="searchset"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is at least one entry returned."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.count()"/>
<operator value="greaterThan"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned Bundle and its contents conform to the base FHIR specification."/>
<direction value="response"/>
<validateProfileId value="bundle-profile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-extract-validate"/>
</extension>
</extension>
<description value="Validate FormularyItem-profile within the Bundle."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="01-SearchParameter-subject">
<name value="SearchParameter-subject"/>
<description value="Test the subject Search Parameter and _include on the Basic endpoint."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Basic"/>
<description value="Test the subject Search Parameter on the Basic endpoint."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?subject=${Search-subject}"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the client did not request a Content-Type. Warning-Only to allow for systems that automatically send Content-Type."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<contentType value="json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Bundle."/>
<direction value="response"/>
<resource value="Bundle"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the Bundle type is 'searchset'."/>
<direction value="response"/>
<operator value="equals"/>
<path value=".type"/>
<value value="searchset"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is at least one entry returned."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.count()"/>
<operator value="greaterThan"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned Bundle and its contents conform to the base FHIR specification."/>
<direction value="response"/>
<validateProfileId value="bundle-profile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-extract-validate"/>
</extension>
</extension>
<description value="Validate FormularyItem-profile within the Bundle."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Basic"/>
<description value="Test the subject Search Parameter and _include on the Basic endpoint."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?subject=${Search-subject}&_include=InsurancePlan:subject"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the client did not request a Content-Type. Warning-Only to allow for systems that automatically send Content-Type."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<contentType value="json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Bundle."/>
<direction value="response"/>
<resource value="Bundle"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the Bundle type is 'searchset'."/>
<direction value="response"/>
<operator value="equals"/>
<path value=".type"/>
<value value="searchset"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is at least one entry returned."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.count()"/>
<operator value="greaterThan"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned Bundle and its contents conform to the base FHIR specification."/>
<direction value="response"/>
<validateProfileId value="bundle-profile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-extract-validate"/>
</extension>
</extension>
<description value="Validate FormularyItem-profile within the Bundle."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="01-SearchParameter-status">
<name value="SearchParameter-status"/>
<description value="Test the status Search Parameter on the Basic endpoint."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Basic"/>
<description value="Test the status Search Parameter on the Basic endpoint."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?status=${Search-status}"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the client did not request a Content-Type. Warning-Only to allow for systems that automatically send Content-Type."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<contentType value="json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Bundle."/>
<direction value="response"/>
<resource value="Bundle"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the Bundle type is 'searchset'."/>
<direction value="response"/>
<operator value="equals"/>
<path value=".type"/>
<value value="searchset"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is at least one entry returned."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.count()"/>
<operator value="greaterThan"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned Bundle and its contents conform to the base FHIR specification."/>
<direction value="response"/>
<validateProfileId value="bundle-profile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-extract-validate"/>
</extension>
</extension>
<description value="Validate FormularyItem-profile within the Bundle."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="01-SearchParameter-period">
<name value="SearchParameter-period"/>
<description value="Test the period Search Parameter on the Basic endpoint."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Basic"/>
<description value="Test the period Search Parameter on the Basic endpoint."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?period=${Search-period}"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the client did not request a Content-Type. Warning-Only to allow for systems that automatically send Content-Type."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<contentType value="json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Bundle."/>
<direction value="response"/>
<resource value="Bundle"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the Bundle type is 'searchset'."/>
<direction value="response"/>
<operator value="equals"/>
<path value=".type"/>
<value value="searchset"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is at least one entry returned."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.count()"/>
<operator value="greaterThan"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned Bundle and its contents conform to the base FHIR specification."/>
<direction value="response"/>
<validateProfileId value="bundle-profile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-extract-validate"/>
</extension>
</extension>
<description value="Validate FormularyItem-profile within the Bundle."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="01-SearchParameter-formulary">
<name value="SearchParameter-formulary"/>
<description value="Test the formulary Search Parameter and _include on the Basic endpoint."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Basic"/>
<description value="Test the formulary Search Parameter on the Basic endpoint."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?formulary=${Search-formulary}"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the client did not request a Content-Type. Warning-Only to allow for systems that automatically send Content-Type."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<contentType value="json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Bundle."/>
<direction value="response"/>
<resource value="Bundle"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the Bundle type is 'searchset'."/>
<direction value="response"/>
<operator value="equals"/>
<path value=".type"/>
<value value="searchset"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is at least one entry returned."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.count()"/>
<operator value="greaterThan"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned Bundle and its contents conform to the base FHIR specification."/>
<direction value="response"/>
<validateProfileId value="bundle-profile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-extract-validate"/>
</extension>
</extension>
<description value="Validate FormularyItem-profile within the Bundle."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Basic"/>
<description value="Test the formulary Search Parameter and _include on the Basic endpoint."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?formulary=${Search-formulary}&_include=InsurancePlan:formulary"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the client did not request a Content-Type. Warning-Only to allow for systems that automatically send Content-Type."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<contentType value="json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Bundle."/>
<direction value="response"/>
<resource value="Bundle"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the Bundle type is 'searchset'."/>
<direction value="response"/>
<operator value="equals"/>
<path value=".type"/>
<value value="searchset"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is at least one entry returned."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.count()"/>
<operator value="greaterThan"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned Bundle and its contents conform to the base FHIR specification."/>
<direction value="response"/>
<validateProfileId value="bundle-profile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-extract-validate"/>
</extension>
</extension>
<description value="Validate FormularyItem-profile within the Bundle."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="01-SearchParameter-pharmacy-benefit-type">
<name value="SearchParameter-pharmacy-benefit-type"/>
<description value="Test the pharmacy-benefit-type Search Parameter on the Basic endpoint."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Basic"/>
<description value="Test the pharmacy-benefit-type Search Parameter on the Basic endpoint."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?pharmacy-benefit-type=${Search-pharmacy-benefit-type}"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the client did not request a Content-Type. Warning-Only to allow for systems that automatically send Content-Type."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<contentType value="json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Bundle."/>
<direction value="response"/>
<resource value="Bundle"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the Bundle type is 'searchset'."/>
<direction value="response"/>
<operator value="equals"/>
<path value=".type"/>
<value value="searchset"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is at least one entry returned."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.count()"/>
<operator value="greaterThan"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned Bundle and its contents conform to the base FHIR specification."/>
<direction value="response"/>
<validateProfileId value="bundle-profile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-extract-validate"/>
</extension>
</extension>
<description value="Validate FormularyItem-profile within the Bundle."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="01-SearchParameter-drug-tier">
<name value="SearchParameter-drug-tier"/>
<description value="Test the drug-tier Search Parameter on the Basic endpoint."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Basic"/>
<description value="Test the drug-tier Search Parameter on the Basic endpoint."/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?drug-tier=${Search-drug-tier}"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the client did not request a Content-Type. Warning-Only to allow for systems that automatically send Content-Type."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<contentType value="json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Bundle."/>
<direction value="response"/>
<resource value="Bundle"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the Bundle type is 'searchset'."/>
<direction value="response"/>
<operator value="equals"/>
<path value=".type"/>
<value value="searchset"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is at least one entry returned."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.count()"/>
<operator value="greaterThan"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the returned Bundle and its contents conform to the base FHIR specification."/>
<direction value="response"/>
<validateProfileId value="bundle-profile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="rule-extract-validate"/>
</extension>
</extension>
<description value="Validate FormularyItem-profile within the Bundle."/>
<direction value="response"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="05-read-Endpoint">
<name value="read-Endpoint"/>
<description value="Test the read endpoint for the Basic API"/>
<action>
<operation>
<type>
<system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="read"/>
</type>
<resource value="Basic"/>
<description value="Test the read endpoint for the Basic API"/>
<accept value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="/${Search-id}"/>
<responseId value="read-response"/>
</operation>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Verify a response is returned"/>
<direction value="response"/>
<operator value="in"/>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Verify the response is a Basic resource"/>
<direction value="response"/>
<resource value="Basic"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Verify the resource id exists"/>
<direction value="response"/>
<expression value="Basic.id.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="05-vread-Endpoint">
<name value="vread-Endpoint"/>
<description value="Test the vread endpoint for the Basic API"/>
<action>
<operation>
<type>
<system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="vread"/>
</type>
<resource value="Basic"/>
<description value="Test the vread endpoint for the Basic API"/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<targetId value="read-response"/>
</operation>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Verify a response is returned"/>
<direction value="response"/>
<operator value="in"/>
<responseCode value="200,201"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Verify the response is a Basic resource"/>
<direction value="response"/>
<resource value="Basic"/>
<warningOnly value="true"/>
</assert>
</action>
</test>
<test id="06-history-Endpoint">
<name value="history-Endpoint"/>
<description value="Test the history endpoint for the Basic API"/>
<action>
<operation>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-pagesNext">
<valuePositiveInt value="10"/>
</extension>
<type>
<system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="history-instance"/>
</type>
<resource value="Basic"/>
<description value="Test the history endpoint for the Basic API"/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<params value="/${Search-id}/_history"/>
<responseId value="testHistorySearch-1"/>
</operation>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Verify a response is returned"/>
<direction value="response"/>
<operator value="in"/>
<responseCode value="200"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Verify the response is a Bundle"/>
<direction value="response"/>
<resource value="Bundle"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Verify the response includes History"/>
<direction value="response"/>
<path value="$.type"/>
<value value="history"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Verify the Basic resource is found in the Bundle"/>
<direction value="response"/>
<expression value="Bundle.entry.resource.as(Basic).exists()"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Validate response bundle"/>
<direction value="response"/>
<validateProfileId value="bundle-profile"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="historyOrder"/>
</extension>
<extension url="param">
<extension url="name">
<valueString value="sourcePrefix"/>
</extension>
<extension url="value">
<valueString value="testHistorySearch"/>
</extension>
</extension>
</extension>
<description value="Validate History order"/>
<sourceId value="none"/>
<warningOnly value="true"/>
</assert>
</action>
</test>
</TestScript>