Name | /FHIR1-6-0-Advanced/Patient/01-read/fhir-api-stu3-patient-read-04-conditional-found-notmodified |
Description | FHIR API STU3 Advanced Operation Tests - Patient conditional read test suite against a single server for a known, valid resource instance. All tests perform the read operation for a specified Patient resource id representing a known valid Patient. Assertions test all required and optional response HTTP Headers and validate the returned payload. |
Version | 2 | Latest | 2 |
<?xml version="1.0" encoding="UTF-8"?>
<TestScript xmlns="http://hl7.org/fhir">
<id value="fhir-api-stu3-patient-read-04-conditional-found-notmodified"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<p>FHIR API STU3 - Patient Conditional Read Found and Not Modified Resource Suite</p>
</div>
</text>
<url value="http://wildfhir.aegis.net/fhir/TestScript/fhir-api-stu3-patient-read-04-conditional-found-notmodified"/>
<name value="FHIR API STU3 - Patient Conditional Read Found and Not Modified 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 conditional read test suite against a single server for a known, valid resource instance. All tests perform the read operation for a specified Patient resource id representing a known valid Patient. 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 with Conditional Options"/>
<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/PatientReadConditional.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="ValidPatientResourceId"/>
<description value="Enter a resource id for a valid Patient resource on the destination system."/>
<hint value="[Valid Resource Id]"/>
</variable>
<variable>
<name value="DateTimeIfModifiedSinceFalse"/>
<description value="Enter a datetime value after the lastUpdated value for the Patient resource. The If-Modified-Since condition operation is expected to return false for this value."/>
<hint value="[wkday, dd Mmm yyy hh:mm:ss GMT]"/>
</variable>
<variable>
<name value="DateTimeIfModifiedSinceTrue"/>
<description value="Enter a datetime value before the lastUpdated value for the Patient resource. The If-Modified-Since condition operation is expected to return true for this value."/>
<hint value="[wkday, dd Mmm yyy hh:mm:ss GMT]"/>
</variable>
<variable>
<name value="ETagIfNoneMatchFalse"/>
<description value="Enter the ETag value that represents the versionId where the If-None-Match conditional operation is expected to return false."/>
<hint value="[W/"versionId"]"/>
</variable>
<variable>
<name value="ETagIfNoneMatchTrue"/>
<description value="Enter the ETag value that represents the versionId where the If-None-Match conditional operation is expected to return true."/>
<hint value="[W/"versionId"]"/>
</variable>
<test id="01-ReadValidJSONIfModifiedSinceFalse">
<name value="ReadValidJSONIfModifiedSinceFalse"/>
<description value="Test the conditional read operation with HTTP Header If-Modified-Since set to the false value. The expected HTTP response is 304 (Not Modified) and no response content returned."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="read"/>
</type>
<resource value="Patient"/>
<description value="Patient read operation with HTTP Header If-Modified-Since set to the false value. The response content is expected to be empty."/>
<accept value="json"/>
<contentType value="none"/>
<params value="/${ValidPatientResourceId}"/>
<requestHeader>
<field value="If-Modified-Since"/>
<value value="${DateTimeIfModifiedSinceFalse}"/>
</requestHeader>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 304(Not Modified)."/>
<direction value="response"/>
<responseCode value="304"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type is not present. Warning only as the server may set this header by default."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
</test>
<test id="02-ReadValidXMLIfModifiedSinceFalse">
<name value="ReadValidXMLIfModifiedSinceFalse"/>
<description value="Test the conditional read operation with HTTP Header If-Modified-Since set to the false value. The expected HTTP response is 304 (Not Modified) and no response content returned."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="read"/>
</type>
<resource value="Patient"/>
<description value="Patient read operation with HTTP Header If-Modified-Since set to the false value. The response content is expected to be empty."/>
<accept value="xml"/>
<contentType value="none"/>
<params value="/${ValidPatientResourceId}"/>
<requestHeader>
<field value="If-Modified-Since"/>
<value value="${DateTimeIfModifiedSinceFalse}"/>
</requestHeader>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 304(Not Modified)."/>
<direction value="response"/>
<responseCode value="304"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type is not present. Warning only as the server may set this header by default."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
</test>
<test id="03-ReadValidJSONIfModifiedSinceTrue">
<name value="ReadValidJSONIfModifiedSinceTrue"/>
<description value="Test the conditional read operation with HTTP Header If-Modified-Since set to the true value. The expected response content is the found Patient 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 with HTTP Header If-Modified-Since set to the true value. The response asserts for all the optional HTTP Headers will be warning only."/>
<accept value="json"/>
<contentType value="none"/>
<params value="/${ValidPatientResourceId}"/>
<requestHeader>
<field value="If-Modified-Since"/>
<value value="${DateTimeIfModifiedSinceTrue}"/>
</requestHeader>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
</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"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>
<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 HTTP Header ETag is present. Warning only as the server may not support versioning."/>
<direction value="response"/>
<headerField value="ETag"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>
<direction value="response"/>
<headerField value="Last-Modified"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>
<direction value="response"/>
<headerField value="Location"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Patient."/>
<resource value="Patient"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned Patient conforms to the base FHIR specification."/>
<validateProfileId value="resource-profile"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned Patient contains the minimum JSON format."/>
<minimumId value="resource-read-json-min"/>
</assert>
</action>
</test>
<test id="04-ReadValidXMLIfModifiedSinceTrue">
<name value="ReadValidXMLIfModifiedSinceTrue"/>
<description value="Test the conditional read operation with HTTP Header If-Modified-Since set to the true value. The expected response content is the found Patient 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 with HTTP Header If-Modified-Since set to the true value. The response asserts for all the optional HTTP Headers will be warning only."/>
<accept value="xml"/>
<contentType value="none"/>
<params value="/${ValidPatientResourceId}"/>
<requestHeader>
<field value="If-Modified-Since"/>
<value value="${DateTimeIfModifiedSinceTrue}"/>
</requestHeader>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="application/fhir+xml"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>
<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 HTTP Header ETag is present. Warning only as the server may not support versioning."/>
<direction value="response"/>
<headerField value="ETag"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>
<direction value="response"/>
<headerField value="Last-Modified"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>
<direction value="response"/>
<headerField value="Location"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Patient."/>
<resource value="Patient"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned Patient conforms to the base FHIR specification."/>
<validateProfileId value="resource-profile"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned Patient contains the minimum XML format."/>
<minimumId value="resource-read-xml-min"/>
</assert>
</action>
</test>
<test id="05-ReadValidJSONIfNoneMatchFalse">
<name value="ReadValidJSONIfNoneMatchFalse"/>
<description value="Test the conditional read operation with HTTP Header If-None-Match set to the false value. The expected HTTP response is 304 (Not Modified) and no response content returned."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="read"/>
</type>
<resource value="Patient"/>
<description value="Patient read operation with HTTP Header If-None-Match set to the false value. The response content is expected to be empty."/>
<accept value="json"/>
<contentType value="none"/>
<params value="/${ValidPatientResourceId}"/>
<requestHeader>
<field value="If-None-Match"/>
<value value="${ETagIfNoneMatchFalse}"/>
</requestHeader>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 304(Not Modified)."/>
<direction value="response"/>
<responseCode value="304"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type is not present. Warning only as the server may set this header by default."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
</test>
<test id="06-ReadValidXMLIfNoneMatchFalse">
<name value="ReadValidXMLIfNoneMatchFalse"/>
<description value="Test the conditional read operation with HTTP Header If-None-Match set to the false value. The expected HTTP response is 304 (Not Modified) and no response content returned."/>
<action>
<operation>
<type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="read"/>
</type>
<resource value="Patient"/>
<description value="Patient read operation with HTTP Header If-None-Match set to the false value. The response content is expected to be empty."/>
<accept value="xml"/>
<contentType value="none"/>
<params value="/${ValidPatientResourceId}"/>
<requestHeader>
<field value="If-None-Match"/>
<value value="${ETagIfNoneMatchFalse}"/>
</requestHeader>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 304(Not Modified)."/>
<direction value="response"/>
<responseCode value="304"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type is not present. Warning only as the server may set this header by default."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="empty"/>
<warningOnly value="true"/>
</assert>
</action>
</test>
<test id="07-ReadValidJSONIfNoneMatchTrue">
<name value="ReadValidJSONIfNoneMatchTrue"/>
<description value="Test the conditional read operation with HTTP Header If-None-Match set to the true value. The expected response content is the found Patient 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 with HTTP Header If-None-Match set to the true value. The response asserts for all the optional HTTP Headers will be warning only."/>
<accept value="json"/>
<contentType value="none"/>
<params value="/${ValidPatientResourceId}"/>
<requestHeader>
<field value="If-None-Match"/>
<value value="${ETagIfNoneMatchTrue}"/>
</requestHeader>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
</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"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>
<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 HTTP Header ETag is present. Warning only as the server may not support versioning."/>
<direction value="response"/>
<headerField value="ETag"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>
<direction value="response"/>
<headerField value="Last-Modified"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>
<direction value="response"/>
<headerField value="Location"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Patient."/>
<resource value="Patient"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned Patient conforms to the base FHIR specification."/>
<validateProfileId value="resource-profile"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned Patient contains the minimum JSON format."/>
<minimumId value="resource-read-json-min"/>
</assert>
</action>
</test>
<test id="08-ReadValidXMLIfNoneMatchTrue">
<name value="ReadValidXMLIfNoneMatchTrue"/>
<description value="Test the conditional read operation with HTTP Header If-None-Match set to the true value. The expected response content is the found Patient 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 with HTTP Header If-None-Match set to the true value. The response asserts for all the optional HTTP Headers will be warning only."/>
<accept value="xml"/>
<contentType value="none"/>
<params value="/${ValidPatientResourceId}"/>
<requestHeader>
<field value="If-None-Match"/>
<value value="${ETagIfNoneMatchTrue}"/>
</requestHeader>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 200(OK)."/>
<direction value="response"/>
<responseCode value="200"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type is present."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="notEmpty"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+xml'."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="application/fhir+xml"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Content-Type contains 'charset=utf-8'. Warning only due to case-sensitive comparison."/>
<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 HTTP Header ETag is present. Warning only as the server may not support versioning."/>
<direction value="response"/>
<headerField value="ETag"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning."/>
<direction value="response"/>
<headerField value="Last-Modified"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP Header Location is present. Warning only as this is optional but servers are encouraged to return this."/>
<direction value="response"/>
<headerField value="Location"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned resource type is Patient."/>
<resource value="Patient"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned Patient conforms to the base FHIR specification."/>
<validateProfileId value="resource-profile"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned Patient contains the minimum XML format."/>
<minimumId value="resource-read-xml-min"/>
</assert>
</action>
</test>
</TestScript>