Scalable Consent Management Testing Guide - Local Development build (v1.0.0-ballot) 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="01-Obtain-server-CapabilityStatement"/>
<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 01-Obtain-server-CapabilityStatement</b></p><a name="01-Obtain-server-CapabilityStatement"> </a><a name="hc01-Obtain-server-CapabilityStatement"> </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><blockquote><p><b>AEGIS Touchstone Testing TestScript Rule Extension</b></p><ul><li>ruleId: AssertBodyExists</li><li>path: /FHIRCommon/_reference/rule/AssertBodyExists.groovy</li></ul></blockquote><p><b>StructureDefinition Work Group</b>: cbcc</p><p><b>url</b>: <a href="TestScript-01-Obtain-server-CapabilityStatement.html">TestScript 00 Capabilities | 01 Obtain server CapabilityStatement</a></p><p><b>version</b>: 1.0.0-ballot</p><p><b>name</b>: Test_01_Obtain_server_CapabilityStatement</p><p><b>title</b>: 00 Capabilities | 01 Obtain server CapabilityStatement</p><p><b>status</b>: Active</p><p><b>date</b>: 2026-03-30</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 single server to verify support for the capabilities interaction
'HTTP GET metadata' and the return of a valid CapabilityStatement resource
supporting the FAST Consent Management IG Version: CI.
This scenario is generic and can be used with any FHIR format.
Test System Details (in order of appearance):
[Origin 1: Consent Client's RESTful client. System Under Test or Simulated: this can test an external test system, or choose Touchstone to simulate the client.]
[Destination 1: Consent Admin Service's RESTful FHIR Server. System Under Test: this must be an external test system (not a mock).]</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) AEGIS.net, Inc. 2026</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/7.1.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/7.1.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><p><b>profile</b>: <a href="http://hl7.org/fhir/R4/capabilitystatement.html">http://hl7.org/fhir/StructureDefinition/CapabilityStatement</a></p><blockquote><p><b>test</b></p><p><b>name</b>: Step_001_Read_capabilities</p><p><b>description</b>: Consent Client reads server capabilities at Consent Admin Service.</p><blockquote><p><b>action</b></p><blockquote><p><b>operation</b></p><p><b>type</b>: <a href="http://terminology.hl7.org/7.1.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-capabilities">Test script operation code: capabilities</a> (Capabilities)</p><p><b>description</b>: Read a server's capabilities.</p><p><b>destination</b>: 1</p><p><b>encodeRequestUrl</b>: true</p><p><b>method</b>: GET</p><p><b>origin</b>: 1</p><p><b>params</b>: metadata</p><h3>RequestHeaders</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Field</b></td><td><b>Value</b></td></tr><tr><td style="display: none">*</td><td>Accept</td><td>application/fhir+json</td></tr></table><p><b>requestId</b>: dest-1-FHIRCapabilities-1-request</p><p><b>responseId</b>: dest-1-FHIRCapabilities-1-response</p></blockquote></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>Operator</b></td><td><b>ResponseCode</b></td><td><b>SourceId</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the returned HTTP status is 200 OK.</td><td>response</td><td>in</td><td>200</td><td>dest-1-FHIRCapabilities-1-response</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>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the response body exists.</td><td>response</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 response body is a CapabilityStatement resource.</td><td>response</td><td>CapabilityStatement</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>ValidateProfileId</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the response body conforms to the base FHIR CapabilityStatement profile. This also checks any declared profiles within.</td><td>response</td><td>CapabilityStatement-profile</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the CapabilityStatement defines a system instance.</td><td>response</td><td>CapabilityStatement.kind = 'instance'</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the CapabilityStatement uses FHIR version 4.0.1 (R4).</td><td>response</td><td>CapabilityStatement.fhirVersion = '4.0.1'</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the CapabilityStatement declares support for the FAST Consent Management IG.</td><td>response</td><td>'http://hl7.org/fhir/us/consent-management/ImplementationGuide/hl7.fhir.us.consent-management' in CapabilityStatement.implementationGuide</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support JSON FHIR.</td><td>response</td><td>'json' in CapabilityStatement.format</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support XML FHIR.</td><td>response</td><td>'xml' in CapabilityStatement.format</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</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 CapabilityStatement resource minimally contains the declaration of a RESTful server.</td><td>response</td><td>CapabilityStatement.rest.where(mode = 'server').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support the Consent resource.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent resources that conform to the FASTConsent profile.</td><td>response</td><td>'http://hl7.org/fhir/us/consent-management/StructureDefinition/FASTConsent' in CapabilityStatement.rest.resource.where(type = 'Consent').supportedProfile</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent read.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').interaction.where(code = 'read').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent search.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').interaction.where(code = 'search-type').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent search by _id (either at the REST or the resource level).</td><td>response</td><td>CapabilityStatement.rest.exists(searchParam.exists(name = '_id') or CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.exists(name = '_id'))</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent search by FASTConsentController.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'controller' and type = 'reference' and definition = 'http://hl7.org/fhir/us/consent-management/SearchParameter/fast-consent-controller').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent search by date.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'date' and type = 'date').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent search by FASTConsentGrantee.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'grantee' and type = 'reference' and definition = 'http://hl7.org/fhir/us/consent-management/SearchParameter/fast-consent-grantee').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent search by FASTConsentManager.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'manager' and type = 'reference' and definition = 'http://hl7.org/fhir/us/consent-management/SearchParameter/fast-consent-manager').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent search by FASTConsentOrganizationId.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'organizationId' and type = 'token' and definition = 'http://hl7.org/fhir/us/consent-management/SearchParameter/fast-consent-organizationId').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent search by patient.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'patient' and type = 'reference').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent search by FASTConsentPatientId.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'patientId' and type = 'token' and definition = 'http://hl7.org/fhir/us/consent-management/SearchParameter/fast-consent-patientId').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent search by scope.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'scope' and type = 'token').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent search by status.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'status' and type = 'token').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support the $fileConsent operation against the Consent resource.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').operation.where(name = 'fileConsent' and definition = 'http://hl7.org/fhir/us/consent-management/OperationDefinition/file-consent').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support the $revokeConsent operation against the Consent resource.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Consent').operation.where(name = 'revokeConsent' and definition = 'http://hl7.org/fhir/us/consent-management/OperationDefinition/revoke-consent').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support the AuditEvent resource.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'AuditEvent').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support AuditEvent resources that conform to the FASTConsentAuditEvent profile.</td><td>response</td><td>'http://hl7.org/fhir/us/consent-management/StructureDefinition/FASTConsentAuditEvent' in CapabilityStatement.rest.resource.where(type = 'AuditEvent').supportedProfile</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support AuditEvent read.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'AuditEvent').interaction.where(code = 'read').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support AuditEvent search.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'AuditEvent').interaction.where(code = 'search-type').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support AuditEvent search by FASTAuditEventConsent.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'AuditEvent').searchParam.where(name = 'consent' and type = 'reference' and definition = 'http://hl7.org/fhir/us/consent-management/SearchParameter/fast-auditevent-consent').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support AuditEvent search by patient.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'AuditEvent').searchParam.where(name = 'patient' and type = 'reference').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support the $recordDisclosure operation against the AuditEvent resource.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'AuditEvent').operation.where(name = 'recordDisclosure' and definition = 'http://hl7.org/fhir/us/consent-management/OperationDefinition/record-disclosure').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support the Subscription resource.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Subscription').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Consent subscriptions as defined by the FASTConsentSubscriptionTopic for FHIR R4 with Subscriptions Backport.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Subscription').extension.where(url = 'http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/capabilitystatement-subscriptiontopic-canonical' and value as canonical = 'http://hl7.org/fhir/us/consent-management/SubscriptionTopic/FASTConsentSubscriptionTopic').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Subscription resources that conform to the FASTSubscription profile.</td><td>response</td><td>'http://hl7.org/fhir/us/consent-management/StructureDefinition/FASTSubscription' in CapabilityStatement.rest.resource.where(type = 'Subscription').supportedProfile</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Subscription create.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'create').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Subscription update.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'update').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Subscription delete.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'delete').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the CapabilityStatement SHOULD declare conformance with the Backport Subscription Server Capability Statement.</td><td>response</td><td>'http://hl7.org/fhir/uv/subscriptions-backport/CapabilityStatement/backport-subscription-server-r4' in CapabilityStatement.instantiates</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Subscription resources that conform to the Backport Subscription Profile.</td><td>response</td><td>'http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription' in CapabilityStatement.rest.resource.where(type = 'Subscription').supportedProfile</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Subscription read.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'read').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHOULD support Subscription search.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'search-type').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support Subscription search by url.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Subscription').searchParam.where(name = 'url' and type = 'uri' and definition = 'http://hl7.org/fhir/SearchParameter/Subscription-url').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Expression</b></td><td><b>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHOULD support Subscription search by status.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Subscription').searchParam.where(name = 'status' and type = 'token' and definition = 'http://hl7.org/fhir/SearchParameter/Subscription-status').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</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>Operator</b></td><td><b>SourceId</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the Consent Administration Service SHALL support the $status operation against the Subscription resource.</td><td>response</td><td>CapabilityStatement.rest.resource.where(type = 'Subscription').operation.where(name = 'status' and definition = 'http://hl7.org/fhir/uv/subscriptions-backport/OperationDefinition/backport-subscription-status').exists()</td><td>equals</td><td>dest-1-FHIRCapabilities-1-response</td><td>true</td><td>false</td></tr></table></blockquote></blockquote></div>
</text>
<extension
url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule">
<extension url="ruleId">
<valueId value="AssertBodyExists"/>
</extension>
<extension url="path">
<valueString
value="/FHIRCommon/_reference/rule/AssertBodyExists.groovy"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
<valueCode value="cbcc"/>
</extension>
<url
value="http://hl7.org/fhir/us/consent-management-tg/TestScript/01-Obtain-server-CapabilityStatement"/>
<version value="1.0.0-ballot"/>
<name value="Test_01_Obtain_server_CapabilityStatement"/>
<title value="00 Capabilities | 01 Obtain server CapabilityStatement"/>
<status value="active"/>
<date value="2026-03-30"/>
<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 single server to verify support for the capabilities interaction
'HTTP GET metadata' and the return of a valid CapabilityStatement resource
supporting the FAST Consent Management IG Version: CI.
This scenario is generic and can be used with any FHIR format.
Test System Details (in order of appearance):
[Origin 1: Consent Client's RESTful client. System Under Test or Simulated: this can test an external test system, or choose Touchstone to simulate the client.]
[Destination 1: Consent Admin Service's RESTful FHIR Server. System Under Test: this must be an external test system (not a mock).]"/>
<jurisdiction>
<coding>
<system value="urn:iso:std:iso:3166"/>
<code value="US"/>
<display value="United States of America"/>
</coding>
</jurisdiction>
<copyright value="(c) AEGIS.net, Inc. 2026"/>
<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="CapabilityStatement-profile">🔗
<reference
value="http://hl7.org/fhir/StructureDefinition/CapabilityStatement"/>
</profile>
<test>
<name value="Step_001_Read_capabilities"/>
<description
value="Consent Client reads server capabilities at Consent Admin Service."/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="capabilities"/>
</type>
<description value="Read a server's capabilities."/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<method value="get"/>
<origin value="1"/>
<params value="metadata"/>
<requestHeader>
<field value="Accept"/>
<value value="application/fhir+json"/>
</requestHeader>
<requestId value="dest-1-FHIRCapabilities-1-request"/>
<responseId value="dest-1-FHIRCapabilities-1-response"/>
</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 HTTP status is 200 OK."/>
<direction value="response"/>
<operator value="in"/>
<responseCode value="200"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension
url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule">
<extension url="ruleId">
<valueId value="AssertBodyExists"/>
</extension>
<extension url="param">
<extension url="name">
<valueString value="errorMessage"/>
</extension>
<extension url="value">
<valueString value="the response body does not exist."/>
</extension>
</extension>
</extension>
<description value="Confirm that the response body exists."/>
<direction value="response"/>
<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 response body is a CapabilityStatement resource."/>
<direction value="response"/>
<resource value="CapabilityStatement"/>
<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 response body conforms to the base FHIR CapabilityStatement profile. This also checks any declared profiles within."/>
<direction value="response"/>
<validateProfileId value="CapabilityStatement-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>
<description
value="Confirm that the CapabilityStatement defines a system instance."/>
<direction value="response"/>
<expression value="CapabilityStatement.kind = 'instance'"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 CapabilityStatement uses FHIR version 4.0.1 (R4)."/>
<direction value="response"/>
<expression value="CapabilityStatement.fhirVersion = '4.0.1'"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 CapabilityStatement declares support for the FAST Consent Management IG."/>
<direction value="response"/>
<expression
value="'http://hl7.org/fhir/us/consent-management/ImplementationGuide/hl7.fhir.us.consent-management' in CapabilityStatement.implementationGuide"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support JSON FHIR."/>
<direction value="response"/>
<expression value="'json' in CapabilityStatement.format"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support XML FHIR."/>
<direction value="response"/>
<expression value="'xml' in CapabilityStatement.format"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 CapabilityStatement resource minimally contains the declaration of a RESTful server."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.where(mode = 'server').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support the Consent resource."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent resources that conform to the FASTConsent profile."/>
<direction value="response"/>
<expression
value="'http://hl7.org/fhir/us/consent-management/StructureDefinition/FASTConsent' in CapabilityStatement.rest.resource.where(type = 'Consent').supportedProfile"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent read."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').interaction.where(code = 'read').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent search."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').interaction.where(code = 'search-type').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent search by _id (either at the REST or the resource level)."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.exists(searchParam.exists(name = '_id') or CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.exists(name = '_id'))"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent search by FASTConsentController."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'controller' and type = 'reference' and definition = 'http://hl7.org/fhir/us/consent-management/SearchParameter/fast-consent-controller').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent search by date."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'date' and type = 'date').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent search by FASTConsentGrantee."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'grantee' and type = 'reference' and definition = 'http://hl7.org/fhir/us/consent-management/SearchParameter/fast-consent-grantee').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent search by FASTConsentManager."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'manager' and type = 'reference' and definition = 'http://hl7.org/fhir/us/consent-management/SearchParameter/fast-consent-manager').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent search by FASTConsentOrganizationId."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'organizationId' and type = 'token' and definition = 'http://hl7.org/fhir/us/consent-management/SearchParameter/fast-consent-organizationId').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent search by patient."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'patient' and type = 'reference').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent search by FASTConsentPatientId."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'patientId' and type = 'token' and definition = 'http://hl7.org/fhir/us/consent-management/SearchParameter/fast-consent-patientId').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent search by scope."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'scope' and type = 'token').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent search by status."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'status' and type = 'token').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support the $fileConsent operation against the Consent resource."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').operation.where(name = 'fileConsent' and definition = 'http://hl7.org/fhir/us/consent-management/OperationDefinition/file-consent').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support the $revokeConsent operation against the Consent resource."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Consent').operation.where(name = 'revokeConsent' and definition = 'http://hl7.org/fhir/us/consent-management/OperationDefinition/revoke-consent').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support the AuditEvent resource."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'AuditEvent').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support AuditEvent resources that conform to the FASTConsentAuditEvent profile."/>
<direction value="response"/>
<expression
value="'http://hl7.org/fhir/us/consent-management/StructureDefinition/FASTConsentAuditEvent' in CapabilityStatement.rest.resource.where(type = 'AuditEvent').supportedProfile"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support AuditEvent read."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'AuditEvent').interaction.where(code = 'read').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support AuditEvent search."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'AuditEvent').interaction.where(code = 'search-type').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support AuditEvent search by FASTAuditEventConsent."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'AuditEvent').searchParam.where(name = 'consent' and type = 'reference' and definition = 'http://hl7.org/fhir/us/consent-management/SearchParameter/fast-auditevent-consent').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support AuditEvent search by patient."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'AuditEvent').searchParam.where(name = 'patient' and type = 'reference').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support the $recordDisclosure operation against the AuditEvent resource."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'AuditEvent').operation.where(name = 'recordDisclosure' and definition = 'http://hl7.org/fhir/us/consent-management/OperationDefinition/record-disclosure').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support the Subscription resource."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Subscription').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Consent subscriptions as defined by the FASTConsentSubscriptionTopic for FHIR R4 with Subscriptions Backport."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Subscription').extension.where(url = 'http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/capabilitystatement-subscriptiontopic-canonical' and value as canonical = 'http://hl7.org/fhir/us/consent-management/SubscriptionTopic/FASTConsentSubscriptionTopic').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Subscription resources that conform to the FASTSubscription profile."/>
<direction value="response"/>
<expression
value="'http://hl7.org/fhir/us/consent-management/StructureDefinition/FASTSubscription' in CapabilityStatement.rest.resource.where(type = 'Subscription').supportedProfile"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Subscription create."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'create').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Subscription update."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'update').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Subscription delete."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'delete').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 CapabilityStatement SHOULD declare conformance with the Backport Subscription Server Capability Statement."/>
<direction value="response"/>
<expression
value="'http://hl7.org/fhir/uv/subscriptions-backport/CapabilityStatement/backport-subscription-server-r4' in CapabilityStatement.instantiates"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Subscription resources that conform to the Backport Subscription Profile."/>
<direction value="response"/>
<expression
value="'http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription' in CapabilityStatement.rest.resource.where(type = 'Subscription').supportedProfile"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Subscription read."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'read').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHOULD support Subscription search."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'search-type').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support Subscription search by url."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Subscription').searchParam.where(name = 'url' and type = 'uri' and definition = 'http://hl7.org/fhir/SearchParameter/Subscription-url').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHOULD support Subscription search by status."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Subscription').searchParam.where(name = 'status' and type = 'token' and definition = 'http://hl7.org/fhir/SearchParameter/Subscription-status').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<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 Consent Administration Service SHALL support the $status operation against the Subscription resource."/>
<direction value="response"/>
<expression
value="CapabilityStatement.rest.resource.where(type = 'Subscription').operation.where(name = 'status' and definition = 'http://hl7.org/fhir/uv/subscriptions-backport/OperationDefinition/backport-subscription-status').exists()"/>
<operator value="equals"/>
<sourceId value="dest-1-FHIRCapabilities-1-response"/>
<value value="true"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
</TestScript>