Name | /FHIR1-6-0-Advanced/Patient/01-read/fhir-api-stu3-patient-read-03-deleted |
Description | FHIR API STU3 Advanced Operation Tests - Patient read test suite against a single server for a known, deleted resource instance. All tests perform the read operation for a specified Patient resource id representing a known valid Patient where the current version is deleted. Assertions test all required and optional response HTTP Headers and validate the returned payload. |
Version | 1 | Latest | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<TestScript xmlns="http://hl7.org/fhir">
<id value="fhir-api-stu3-patient-read-03-deleted"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<p>FHIR API STU3 - Patient Read Deleted Resource Suite</p>
</div>
</text>
<url value="http://wildfhir.aegis.net/fhir/TestScript/fhir-api-stu3-patient-read-03-deleted"/>
<name value="FHIR API STU3 - Patient Read Deleted Resource Suite"/>
<status value="draft"/>
<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>
<date value="2016-09-16"/>
<description value="FHIR API STU3 Advanced Operation Tests - Patient read test suite against a single server for a known, deleted resource instance. All tests perform the read operation for a specified Patient resource id representing a known valid Patient where the current version is deleted. Assertions test all required and optional response HTTP Headers and validate the returned payload."/>
<useContext>
<coding>
<system value="urn:iso:std:iso:3166"/>
<code value="US"/>
<display value="United States of America (the)"/>
</coding>
</useContext>
<requirements value="Patient Read Operation"/>
<copyright value="© AEGIS.net, Inc. 2015+"/>
<metadata>
<capability>
<required value="true"/>
<description value="Read Operation"/>
<link value="http://hl7.org/fhir/http.html#read"/>
<conformance>
<reference value="../_reference/conformance/PatientRead.xml"/>
</conformance>
</capability>
</metadata>
<fixture id="resource-read-json-min">
<resource>
<reference value="../_reference/resources/Patient-read-json-min.json"/>
</resource>
</fixture>
<fixture id="resource-read-xml-min">
<resource>
<reference value="../_reference/resources/Patient-read-xml-min.xml"/>
</resource>
</fixture>
<profile id="resource-profile">
<reference value="http://hl7.org/fhir/StructureDefinition/Patient"/>
</profile>
<variable>
<name value="DeletedPatientResourceId"/>
<description value="Enter a resource id for a currently deleted Patient resource on the destination system."/>
<hint value="[Deleted Resource Id]"/>
</variable>
<test id="01-ReadDeletedJSON">
<name value="ReadDeletedJSON"/>
<description value="Test the read operation for a known, deleted Patient resource instance. The expected HTTP response is 410 (Gone) and optional content of an OperationOutcome resource in JSON format."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="read"/>
</type>
<resource value="Patient"/>
<description value="Patient read operation for a known, deleted resource instance. The response asserts for all the optional HTTP Headers will be warning only."/>
<accept value="json"/>
<contentType value="none"/>
<params value="/${DeletedPatientResourceId}"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 410(Gone)."/>
<direction value="response"/>
<responseCode value="410"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type is present. Warning only as the server may not return any content."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'. Warning only as the server may not return any content."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only as the server may not return any content."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="charset=utf-8"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is OperationOutcome. Warning only as a returned OperationOutcome is optional but servers are encouraged to return this."/>
<resource value="OperationOutcome"/>
<warningOnly value="true"/>
</assert>
</action>
</test>
<test id="02-ReadDeletedXML">
<name value="ReadDeletedXML"/>
<description value="Test the read operation for a known, deleted Patient resource instance. The expected HTTP response is 410 (Gone) and optional content of an OperationOutcome resource in XML format."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="read"/>
</type>
<resource value="Patient"/>
<description value="Patient read operation for a known, deleted resource instance. The response asserts for all the optional HTTP Headers will be warning only."/>
<accept value="xml"/>
<contentType value="none"/>
<params value="/${DeletedPatientResourceId}"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 410(Gone)."/>
<direction value="response"/>
<responseCode value="410"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type is present. Warning only as the server may not return any content."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'. Warning only as the server may not return any content."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="application/fhir+xml"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only as the server may not return any content."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="charset=utf-8"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is OperationOutcome. Warning only as a returned OperationOutcome is optional but servers are encouraged to return this."/>
<resource value="OperationOutcome"/>
<warningOnly value="true"/>
</assert>
</action>
</test>
</TestScript>