Name | /FHIR1-0-2-Basic/A-C/AuditEvent/Server Assigned Id/AuditEvent-server-id-xml |
Description | FHIR Server AuditEvent Basic Operation Tests - XML - Server Assigned Resource Id - Create, Delete, History, Read, Search, Update, Vread. |
Version | 4 | Latest | 4 |
<?xml version="1.0" encoding="UTF-8"?>
<TestScript xmlns="http://hl7.org/fhir">
<id value="AuditEvent-server-id-xml"/>
<url value="http://wildfhir.aegis.net/dstu2/TestScript/AuditEvent-server-id-xml"/>
<version value="2.0"/>
<name value="FHIR Server AuditEvent Basic Operation Tests - XML - Server Assigned Resource Id"/>
<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-03-31"/>
<description value="FHIR Server AuditEvent Basic Operation Tests - XML - Server Assigned Resource Id - Create, Delete, History, Read, Search, Update, Vread."/>
<useContext>
<coding>
<system value="urn:iso:std:iso:3166"/>
<code value="US"/>
<display value="United States of America (the)"/>
</coding>
</useContext>
<requirements value="AuditEvent Create, Delete, History, Read, Search, Update, Vread Operations"/>
<copyright value="© AEGIS.net, Inc. 2015+"/>
<metadata>
<capability>
<required value="true"/>
<description value="Create, Delete, Read, Update Operations"/>
<link value="http://hl7.org/fhir/http.html#create"/>
<link value="http://hl7.org/fhir/http.html#delete"/>
<link value="http://hl7.org/fhir/http.html#read"/>
<link value="http://hl7.org/fhir/http.html#update"/>
<conformance>
<reference value="../_reference/conformance/AuditEventCreateDeleteReadUpdate.xml"/>
</conformance>
</capability>
<capability>
<required value="true"/>
<description value="History Instance, Vread Operations"/>
<link value="http://hl7.org/fhir/http.html#history"/>
<link value="http://hl7.org/fhir/http.html#vread"/>
<conformance>
<reference value="../_reference/conformance/AuditEventHistoryInstanceVread.xml"/>
</conformance>
</capability>
<capability>
<required value="true"/>
<description value="Search Type Operation"/>
<link value="http://hl7.org/fhir/http.html#search"/>
<conformance>
<reference value="../_reference/conformance/AuditEventSearchType.xml"/>
</conformance>
</capability>
</metadata>
<fixture id="resource-create">
<resource>
<reference value="../_reference/resources/AuditEvent-create.xml"/>
</resource>
</fixture>
<fixture id="resource-update">
<resource>
<reference value="../_reference/resources/AuditEvent-update.xml"/>
</resource>
</fixture>
<profile id="bundle-profile">
<reference value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
</profile>
<profile id="resource-profile">
<reference value="http://hl7.org/fhir/StructureDefinition/AuditEvent"/>
</profile>
<variable>
<name value="createResourceId"/>
<path value="AuditEvent/id"/>
<sourceId value="create-search-response"/>
</variable>
<variable>
<name value="createVersionId"/>
<path value="AuditEvent/meta/versionId"/>
<sourceId value="create-search-response"/>
</variable>
<variable>
<name value="searchParamIdentifier"/>
<path value="AuditEvent/object/identifier/value"/>
<sourceId value="resource-create"/>
</variable>
<setup>
<!-- AuditEvent Delete -->
<action>
<operation>
<type>
<code value="delete"/>
</type>
<resource value="AuditEvent"/>
<description value="Use a conditional delete operation to insure the AuditEvent does not exist on the server."/>
<accept value="xml"/>
<contentType value="xml"/>
<params value="?identity=${searchParamIdentifier}"/>
</operation>
</action>
</setup>
<test id="Step1-CreateNewAuditEvent">
<name value="Step1-CreateNewAuditEvent"/>
<description value="Create a new AuditEvent in XML format where the server assigns the resource id."/>
<action>
<operation>
<type>
<code value="create"/>
</type>
<accept value="xml"/>
<contentType value="xml"/>
<sourceId value="resource-create"/>
</operation>
</action>
<action>
<assert>
<operator value="in"/>
<responseCode value="200,201"/>
</assert>
</action>
<action>
<assert>
<contentType value="xml"/>
</assert>
</action>
<action>
<operation>
<type>
<code value="search"/>
</type>
<resource value="AuditEvent"/>
<description value="Search for the created AuditEvent by the unique identifier."/>
<accept value="xml"/>
<contentType value="xml"/>
<params value="?identity=${searchParamIdentifier}"/>
<responseId value="create-search-response"/>
</operation>
</action>
<action>
<assert>
<response value="okay"/>
</assert>
</action>
<action>
<assert>
<contentType value="xml"/>
</assert>
</action>
<action>
<assert>
<resource value="Bundle"/>
</assert>
</action>
</test>
<test id="Step2-ReadAuditEvent">
<name value="Step2-ReadAuditEvent"/>
<description value="Read the AuditEvent in XML format created in step 1."/>
<action>
<operation>
<type>
<code value="read"/>
</type>
<resource value="AuditEvent"/>
<description value="Read using params element"/>
<accept value="xml"/>
<contentType value="xml"/>
<params value="/${createResourceId}"/>
</operation>
</action>
<action>
<assert>
<response value="okay"/>
</assert>
</action>
<action>
<assert>
<validateProfileId value="resource-profile"/>
</assert>
</action>
</test>
<test id="Step3-UpdateAuditEvent">
<name value="Step3-UpdateAuditEvent"/>
<description value="Update the AuditEvent in XML format created in step 1 then Read it again for verification."/>
<action>
<operation>
<type>
<code value="update"/>
</type>
<resource value="AuditEvent"/>
<accept value="xml"/>
<contentType value="xml"/>
<params value="/${createResourceId}"/>
<responseId value="update-response"/>
<sourceId value="resource-update"/>
</operation>
</action>
<action>
<assert>
<operator value="in"/>
<responseCode value="200,201"/>
</assert>
</action>
<action>
<assert>
<headerField value="Location"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<operation>
<type>
<code value="read"/>
</type>
<resource value="AuditEvent"/>
<accept value="xml"/>
<contentType value="xml"/>
<params value="/${createResourceId}"/>
<responseId value="resource-read"/>
</operation>
</action>
<action>
<assert>
<validateProfileId value="resource-profile"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the resource version is present. Warning only as the server may not support versioning."/>
<operator value="notEmpty"/>
<path value="AuditEvent/meta/versionId"/>
<warningOnly value="true"/>
</assert>
</action>
</test>
<test id="Step4-AuditEventHistoryInstance">
<name value="Step4-AuditEventHistoryInstance"/>
<description value="Retrieve the updated AuditEvent instance's history in XML format."/>
<action>
<operation>
<!-- <type>
<system value="http://hl7.org/fhir/testscript-operation-codes"/>
<code value="history"/>
</type> -->
<resource value="AuditEvent"/>
<description value="Retrieve the history for a single, known AuditEvent using the known identifier."/>
<accept value="xml"/>
<contentType value="xml"/>
<params value="/${createResourceId}/_history"/>
<!-- <targetId value="resource-read"/> -->
</operation>
</action>
<action>
<assert>
<response value="okay"/>
</assert>
</action>
<action>
<assert>
<contentType value="xml"/>
</assert>
</action>
<action>
<assert>
<resource value="Bundle"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is more than one record returned."/>
<operator value="greaterThan"/>
<path value="/Bundle/total"/>
<value value="1"/>
</assert>
</action>
</test>
<test id="Step5-AuditEventVersionRead">
<name value="Step5-AuditEventVersionRead"/>
<description value="Retrieve a specific version of a AuditEvent instance in XML format."/>
<action>
<operation>
<type>
<code value="vread"/>
</type>
<resource value="AuditEvent"/>
<description value="Retrieve initially created version of the AuditEvent instance."/>
<accept value="xml"/>
<contentType value="xml"/>
<params value="/${createResourceId}/_history/${createVersionId}"/>
</operation>
</action>
<action>
<assert>
<response value="okay"/>
</assert>
</action>
<action>
<assert>
<contentType value="xml"/>
</assert>
</action>
<action>
<assert>
<resource value="AuditEvent"/>
</assert>
</action>
</test>
<test id="Step6-AuditEventSearchType">
<name value="Step6-AuditEventSearchType"/>
<description value="Search for AuditEvent resources in XML format with a identifier = ${searchParamIdentifier}."/>
<action>
<operation>
<type>
<code value="search"/>
</type>
<resource value="AuditEvent"/>
<description value="Search for the AuditEvent by identifier."/>
<accept value="xml"/>
<contentType value="xml"/>
<params value="?identity=${searchParamIdentifier}"/>
</operation>
</action>
<action>
<assert>
<response value="okay"/>
</assert>
</action>
<action>
<assert>
<contentType value="xml"/>
</assert>
</action>
<action>
<assert>
<resource value="Bundle"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that there is at least one record returned. There could be other AuditEvent records returned."/>
<operator value="greaterThan"/>
<path value="/Bundle/total"/>
<value value="0"/>
</assert>
</action>
</test>
<test id="Step7-AuditEventDelete">
<name value="Step7-AuditEventDelete"/>
<description value="Delete a AuditEvent instance in XML format."/>
<action>
<operation>
<type>
<code value="delete"/>
</type>
<resource value="AuditEvent"/>
<description value="Delete the AuditEvent instance."/>
<accept value="xml"/>
<contentType value="xml"/>
<targetId value="update-response"/>
</operation>
</action>
<action>
<assert>
<operator value="in"/>
<responseCode value="200,204"/>
</assert>
</action>
</test>
</TestScript>