Scalable Consent Management Testing Guide
1.0.0-ballot - ci-build United States of America flag

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

TestScript: 00 Capabilities | 02 Obtain server CapabilityStatement - JSON

Official URL: http://hl7.org/fhir/us/consent-management-tg/TestScript/02-Obtain-server-CapabilityStatement-JSON Version: 1.0.0-ballot
Standards status: Trial-use Maturity Level: 1 Computable Name: Test_02_Obtain_server_CapabilityStatement_JSON

Copyright/Legal: (c) AEGIS.net, Inc. 2026

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, using JSON syntax. 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).]

AEGIS Touchstone Testing TestScript Rule Extension

  • ruleId: AssertBodyExists
  • path: /FHIRCommon/_reference/rule/AssertBodyExists.groovy

StructureDefinition Work Group: cbcc

url: TestScript 00 Capabilities | 02 Obtain server CapabilityStatement - JSON

version: 1.0.0-ballot

name: Test_02_Obtain_server_CapabilityStatement_JSON

title: 00 Capabilities | 02 Obtain server CapabilityStatement - JSON

status: Active

date: 2026-03-30

publisher: HL7 International / Community Based Collaborative Care

contact: HL7 International / Community Based Collaborative Care: http://www.hl7.org/Special/committees/cbcc

description:

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, using JSON syntax. 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: United States of America

copyright:

(c) AEGIS.net, Inc. 2026

Origins

-IndexProfile
*1Test script profile origin type: FHIR-Client (FHIR Client)

Destinations

-IndexProfile
*1Test script profile destination type: FHIR-Server (FHIR Server)

profile: http://hl7.org/fhir/StructureDefinition/CapabilityStatement

test

name: Step_001_Read_capabilities

description: Consent Client reads server capabilities at Consent Admin Service.

action

operation

type: Test script operation code: capabilities (Capabilities)

description: Read a server's capabilities.

accept: json

destination: 1

encodeRequestUrl: true

method: GET

origin: 1

params: metadata

RequestHeaders

-FieldValue
*Acceptapplication/fhir+json

requestId: dest-1-FHIRCapabilities-1-request

responseId: dest-1-FHIRCapabilities-1-response

action

Asserts

-ExtensionDescriptionDirectionOperatorResponseCodeSourceIdWarningOnly
*Confirm that the returned HTTP status is 200 OK.responsein200dest-1-FHIRCapabilities-1-responsefalse

action

Asserts

-ExtensionDescriptionDirectionWarningOnly
*Confirm that the response body exists.responsefalse

action

Asserts

-DescriptionDirectionContentTypeWarningOnly
*Confirm that the response format is the FHIR JSON format.responsejsonfalse

action

Asserts

-ExtensionDescriptionDirectionResourceWarningOnly
*Confirm that the response body is a CapabilityStatement resource.responseCapabilityStatementfalse

action

Asserts

-ExtensionDescriptionDirectionValidateProfileIdWarningOnly
*Confirm that the response body conforms to the base FHIR CapabilityStatement profile. This also checks any declared profiles within.responseCapabilityStatement-profilefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the CapabilityStatement defines a system instance.responseCapabilityStatement.kind = 'instance'equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the CapabilityStatement uses FHIR version 4.0.1 (R4).responseCapabilityStatement.fhirVersion = '4.0.1'equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the CapabilityStatement declares support for the FAST Consent Management IG.response'http://hl7.org/fhir/us/consent-management/ImplementationGuide/hl7.fhir.us.consent-management' in CapabilityStatement.implementationGuideequalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support JSON FHIR.response'json' in CapabilityStatement.formatequalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support XML FHIR.response'xml' in CapabilityStatement.formatequalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the returned CapabilityStatement resource minimally contains the declaration of a RESTful server.responseCapabilityStatement.rest.where(mode = 'server').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support the Consent resource.responseCapabilityStatement.rest.resource.where(type = 'Consent').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent resources that conform to the FASTConsent profile.response'http://hl7.org/fhir/us/consent-management/StructureDefinition/FASTConsent' in CapabilityStatement.rest.resource.where(type = 'Consent').supportedProfileequalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent read.responseCapabilityStatement.rest.resource.where(type = 'Consent').interaction.where(code = 'read').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent search.responseCapabilityStatement.rest.resource.where(type = 'Consent').interaction.where(code = 'search-type').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent search by _id (either at the REST or the resource level).responseCapabilityStatement.rest.exists(searchParam.exists(name = '_id') or CapabilityStatement.rest.resource.where(type = 'Consent').searchParam.exists(name = '_id'))equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent search by FASTConsentController.responseCapabilityStatement.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()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent search by date.responseCapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'date' and type = 'date').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent search by FASTConsentGrantee.responseCapabilityStatement.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()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent search by FASTConsentManager.responseCapabilityStatement.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()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent search by FASTConsentOrganizationId.responseCapabilityStatement.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()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent search by patient.responseCapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'patient' and type = 'reference').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent search by FASTConsentPatientId.responseCapabilityStatement.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()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent search by scope.responseCapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'scope' and type = 'token').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent search by status.responseCapabilityStatement.rest.resource.where(type = 'Consent').searchParam.where(name = 'status' and type = 'token').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support the $fileConsent operation against the Consent resource.responseCapabilityStatement.rest.resource.where(type = 'Consent').operation.where(name = 'fileConsent' and definition = 'http://hl7.org/fhir/us/consent-management/OperationDefinition/file-consent').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support the $revokeConsent operation against the Consent resource.responseCapabilityStatement.rest.resource.where(type = 'Consent').operation.where(name = 'revokeConsent' and definition = 'http://hl7.org/fhir/us/consent-management/OperationDefinition/revoke-consent').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support the AuditEvent resource.responseCapabilityStatement.rest.resource.where(type = 'AuditEvent').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support AuditEvent resources that conform to the FASTConsentAuditEvent profile.response'http://hl7.org/fhir/us/consent-management/StructureDefinition/FASTConsentAuditEvent' in CapabilityStatement.rest.resource.where(type = 'AuditEvent').supportedProfileequalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support AuditEvent read.responseCapabilityStatement.rest.resource.where(type = 'AuditEvent').interaction.where(code = 'read').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support AuditEvent search.responseCapabilityStatement.rest.resource.where(type = 'AuditEvent').interaction.where(code = 'search-type').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support AuditEvent search by FASTAuditEventConsent.responseCapabilityStatement.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()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support AuditEvent search by patient.responseCapabilityStatement.rest.resource.where(type = 'AuditEvent').searchParam.where(name = 'patient' and type = 'reference').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support the $recordDisclosure operation against the AuditEvent resource.responseCapabilityStatement.rest.resource.where(type = 'AuditEvent').operation.where(name = 'recordDisclosure' and definition = 'http://hl7.org/fhir/us/consent-management/OperationDefinition/record-disclosure').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support the Subscription resource.responseCapabilityStatement.rest.resource.where(type = 'Subscription').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Consent subscriptions as defined by the FASTConsentSubscriptionTopic for FHIR R4 with Subscriptions Backport.responseCapabilityStatement.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()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Subscription resources that conform to the FASTSubscription profile.response'http://hl7.org/fhir/us/consent-management/StructureDefinition/FASTSubscription' in CapabilityStatement.rest.resource.where(type = 'Subscription').supportedProfileequalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Subscription create.responseCapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'create').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Subscription update.responseCapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'update').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Subscription delete.responseCapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'delete').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the CapabilityStatement SHOULD declare conformance with the Backport Subscription Server Capability Statement.response'http://hl7.org/fhir/uv/subscriptions-backport/CapabilityStatement/backport-subscription-server-r4' in CapabilityStatement.instantiatesequalsdest-1-FHIRCapabilities-1-responsetruetrue

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Subscription resources that conform to the Backport Subscription Profile.response'http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription' in CapabilityStatement.rest.resource.where(type = 'Subscription').supportedProfileequalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Subscription read.responseCapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'read').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHOULD support Subscription search.responseCapabilityStatement.rest.resource.where(type = 'Subscription').interaction.where(code = 'search-type').exists()equalsdest-1-FHIRCapabilities-1-responsetruetrue

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support Subscription search by url.responseCapabilityStatement.rest.resource.where(type = 'Subscription').searchParam.where(name = 'url' and type = 'uri' and definition = 'http://hl7.org/fhir/SearchParameter/Subscription-url').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHOULD support Subscription search by status.responseCapabilityStatement.rest.resource.where(type = 'Subscription').searchParam.where(name = 'status' and type = 'token' and definition = 'http://hl7.org/fhir/SearchParameter/Subscription-status').exists()equalsdest-1-FHIRCapabilities-1-responsetruetrue

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm that the Consent Administration Service SHALL support the $status operation against the Subscription resource.responseCapabilityStatement.rest.resource.where(type = 'Subscription').operation.where(name = 'status' and definition = 'http://hl7.org/fhir/uv/subscriptions-backport/OperationDefinition/backport-subscription-status').exists()equalsdest-1-FHIRCapabilities-1-responsetruefalse