Scalable Consent Management Testing Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
Page standards status: Trial-use | Maturity Level: 1 |
<TestScript xmlns="http://hl7.org/fhir">
<id value="fastconsentrevokeconsentxml"/>
<meta>
<profile
value="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript"/>
</meta>
<text>
<status value="extensions"/>
<div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: TestScript fastconsentrevokeconsentxml</b></p><a name="fastconsentrevokeconsentxml"> </a><a name="hcfastconsentrevokeconsentxml"> </a><div style="display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%"><p style="margin-bottom: 0px"/><p style="margin-bottom: 0px">Profile: <a href="file://D:\GitHub\Touchstone\testing-ig\output/StructureDefinition-testscript.html">AEGIS Touchstone Testing TestScript Profile</a></p></div><p><b>StructureDefinition Work Group</b>: cbcc</p><p><b>url</b>: <a href="TestScript-fastconsentrevokeconsentxml.html">TestScript FAST Consent revokeConsent XML</a></p><p><b>version</b>: 0.1.0</p><p><b>name</b>: FASTConsentRevokeConsentXML</p><p><b>title</b>: FAST Consent revokeConsent XML</p><p><b>status</b>: Active</p><p><b>date</b>: 2025-05-22</p><p><b>publisher</b>: HL7 International / Community Based Collaborative Care</p><p><b>contact</b>: HL7 International / Community Based Collaborative Care: <a href="http://www.hl7.org/Special/committees/cbcc">http://www.hl7.org/Special/committees/cbcc</a></p><p><b>description</b>: </p><div><p>Test a FAST Consent Management Server implementation of the $revokeConsent operation using XML Format</p>
</div><p><b>jurisdiction</b>: <span title="Codes:{urn:iso:std:iso:3166 US}">United States of America</span></p><p><b>copyright</b>: </p><div><p>(c) HL7 International / Community Based Collaborative Care 2025</p>
</div><h3>Origins</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Index</b></td><td><b>Profile</b></td></tr><tr><td style="display: none">*</td><td>1</td><td><a href="http://terminology.hl7.org/6.5.0/CodeSystem-testscript-profile-origin-types.html#testscript-profile-origin-types-FHIR-Client">Test script profile origin type FHIR-Client</a>: FHIR Client</td></tr></table><h3>Destinations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Index</b></td><td><b>Profile</b></td></tr><tr><td style="display: none">*</td><td>1</td><td><a href="http://terminology.hl7.org/6.5.0/CodeSystem-testscript-profile-destination-types.html#testscript-profile-destination-types-FHIR-Server">Test script profile destination type FHIR-Server</a>: FHIR Server</td></tr></table><blockquote><p><b>fixture</b></p><blockquote><p><b>id</b></p>revokeconsent-parameters</blockquote><p><b>autocreate</b>: false</p><p><b>autodelete</b>: false</p><p><b>resource</b>: <code>./Parameters-parameters-revokeconsent.xml</code></p></blockquote><p><b>profile</b>: </p><ul><li><a href="file://D:\GitHub\rettema\fhir-consent-management\output/StructureDefinition-RevokeConsentParameters.html">http://hl7.org/fhir/us/consent-management/StructureDefinition/RevokeConsentParameters</a></li><li><a href="http://hl7.org/fhir/R4/operationoutcome.html">http://hl7.org/fhir/StructureDefinition/OperationOutcome</a></li></ul><h3>Variables</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Name</b></td><td><b>Expression</b></td><td><b>SourceId</b></td></tr><tr><td style="display: none">*</td><td>revokeConsentIdentifier</td><td>Parameters.parameter.where(name = 'consent').(value as Reference).identifier.value</td><td>revokeconsent-request</td></tr></table><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>FASTConsentRevokeConsentXML</blockquote><p><b>name</b>: FASTConsentRevokeConsentXML</p><p><b>description</b>: Test a FAST Consent Management Server implementation of the $revokeConsent operation using XML Format against the destination server and assert successful response.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td><td><b>RequestId</b></td><td><b>SourceId</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/6.5.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-revokeConsent">Test script operation code revokeConsent</a>: revokeConsent</td><td>Consent</td><td>Send a Consent $revokeConsent operation</td><td>xml</td><td>xml</td><td>1</td><td>true</td><td>1</td><td>/$revokeConsent</td><td>revokeconsent-request</td><td>revokeconsent-parameters</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Resource</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the sent request payload is a Parameters resource.</td><td>request</td><td>Parameters</td><td>true</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>ValidateProfileId</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the sent Parameters conforms to the FAST Consent profile.</td><td>request</td><td>revokeConsentParametersProfile</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the returned response code is 200 OK.</td><td>response</td><td>200</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Resource</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the returned response payload is an OperationOutcome resource.</td><td>response</td><td>OperationOutcome</td><td>true</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>ValidateProfileId</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the returned OperationOutcome conforms to the base FHIR specification.</td><td>response</td><td>OperationOutcomeProfile</td><td>true</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>FASTConsentSearchXML</blockquote><p><b>name</b>: FASTConsentSearchXML</p><p><b>description</b>: Test a FAST Consent Management Server to confirm successful revoke of Consent from previous $revokeConsent operation.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Params</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/6.5.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search">Test script operation code search</a>: Search</td><td>Consent</td><td>Search for Consent from $revokeConsent operation</td><td>xml</td><td>xml</td><td>1</td><td>true</td><td>?identifier=${revokeConsentIdentifier}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the returned response code is 200 OK.</td><td>response</td><td>200</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Resource</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the returned response payload is a Bundle resource.</td><td>response</td><td>Bundle</td><td>true</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the returned response payload is a searchset Bundle resource.</td><td>response</td><td>Bundle/type</td><td>searchset</td><td>true</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the returned searchset Bundle contains 1 match.</td><td>response</td><td>Bundle.entry.resource.count()</td><td>1</td><td>true</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the returned searchset Bundle contains a Consent resource.</td><td>response</td><td>Bundle.entry.resource.as(Consent).exists()</td><td>true</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the returned searchset Bundle contains the referenced Consent resource.</td><td>response</td><td>Bundle.entry.resource.as(Consent).identifier[0].value</td><td>${revokeConsentIdentifier}</td><td>true</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the returned searchset Bundle contains the revoked Consent resource.</td><td>response</td><td>Bundle.entry.resource.as(Consent).status</td><td>rejected</td><td>true</td></tr></table></blockquote></blockquote></div>
</text>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
<valueCode value="cbcc"/>
</extension>
<url
value="http://hl7.org/fhir/us/consent-management-tg/TestScript/fastconsentrevokeconsentxml"/>
<version value="0.1.0"/>
<name value="FASTConsentRevokeConsentXML"/>
<title value="FAST Consent revokeConsent XML"/>
<status value="active"/>
<date value="2025-05-22"/>
<publisher value="HL7 International / Community Based Collaborative Care"/>
<contact>
<name value="HL7 International / Community Based Collaborative Care"/>
<telecom>
<system value="url"/>
<value value="http://www.hl7.org/Special/committees/cbcc"/>
</telecom>
</contact>
<description
value="Test a FAST Consent Management Server implementation of the $revokeConsent operation using XML Format"/>
<jurisdiction>
<coding>
<system value="urn:iso:std:iso:3166"/>
<code value="US"/>
<display value="United States of America"/>
</coding>
</jurisdiction>
<copyright
value="(c) HL7 International / Community Based Collaborative Care 2025"/>
<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>
<fixture id="revokeconsent-parameters">
<autocreate value="false"/>
<autodelete value="false"/>
<resource>
<reference value="./Parameters-parameters-revokeconsent.xml"/>
</resource>
</fixture>
<profile id="revokeConsentParametersProfile">🔗
<reference
value="http://hl7.org/fhir/us/consent-management/StructureDefinition/RevokeConsentParameters"/>
</profile>
<profile id="OperationOutcomeProfile">🔗
<reference
value="http://hl7.org/fhir/StructureDefinition/OperationOutcome"/>
</profile>
<variable>
<name value="revokeConsentIdentifier"/>
<expression
value="Parameters.parameter.where(name = 'consent').(value as Reference).identifier.value"/>
<sourceId value="revokeconsent-request"/>
</variable>
<test id="FASTConsentRevokeConsentXML">
<name value="FASTConsentRevokeConsentXML"/>
<description
value="Test a FAST Consent Management Server implementation of the $revokeConsent operation using XML Format against the destination server and assert successful response."/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="revokeConsent"/>
</type>
<resource value="Consent"/>
<description value="Send a Consent $revokeConsent operation"/>
<accept value="xml"/>
<contentType value="xml"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="/$revokeConsent"/>
<requestId value="revokeconsent-request"/>
<sourceId value="revokeconsent-parameters"/>
</operation>
</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 sent request payload is a Parameters resource."/>
<direction value="request"/>
<resource value="Parameters"/>
<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 sent Parameters conforms to the FAST Consent profile."/>
<direction value="request"/>
<validateProfileId value="revokeConsentParametersProfile"/>
<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 response code 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 response payload is an OperationOutcome resource."/>
<direction value="response"/>
<resource value="OperationOutcome"/>
<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 OperationOutcome conforms to the base FHIR specification."/>
<direction value="response"/>
<validateProfileId value="OperationOutcomeProfile"/>
<warningOnly value="true"/>
</assert>
</action>
</test>
<test id="FASTConsentSearchXML">
<name value="FASTConsentSearchXML"/>
<description
value="Test a FAST Consent Management Server to confirm successful revoke of Consent from previous $revokeConsent operation."/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Consent"/>
<description
value="Search for Consent from $revokeConsent operation"/>
<accept value="xml"/>
<contentType value="xml"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<params value="?identifier=${revokeConsentIdentifier}"/>
</operation>
</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 response code 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 response payload is a Bundle resource."/>
<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="Confirm that the returned response payload is a searchset Bundle resource."/>
<direction value="response"/>
<path value="Bundle/type"/>
<value value="searchset"/>
<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 searchset Bundle contains 1 match."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.count()"/>
<value value="1"/>
<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 searchset Bundle contains a Consent resource."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.as(Consent).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="Confirm that the returned searchset Bundle contains the referenced Consent resource."/>
<direction value="response"/>
<expression
value="Bundle.entry.resource.as(Consent).identifier[0].value"/>
<value value="${revokeConsentIdentifier}"/>
<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 searchset Bundle contains the revoked Consent resource."/>
<direction value="response"/>
<expression value="Bundle.entry.resource.as(Consent).status"/>
<value value="rejected"/>
<warningOnly value="true"/>
</assert>
</action>
</test>
</TestScript>