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: 03 Operations - All SUT | 02 Operation: Revoke a Consent

Official URL: http://hl7.org/fhir/us/consent-management-tg/TestScript/02-Operation-Revoke-a-Consent Version: 1.0.0-ballot
Standards status: Trial-use Maturity Level: 1 Computable Name: Test_02_Operation_Revoke_a_Consent

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

Happy Path: Perform a successful Consent/$revokeConsent operation. Test a client and server to verify support for the Consent $revokeConsent operation, supporting the FAST Consent Management IG Version: CI. This scenario is generic and can be used with any FHIR format and query parameters. See https://wildfhir4.wildfhir.org/ig/fhir-consent-management-tg/rtm_test_cases.html#testcase-70 Test System Details (in order of appearance): [Origin 1: Consent Client's RESTful client. System Under Test: this must be an external test system (not Touchstone).] [Destination 1: Consent Admin Service's RESTful FHIR Server. System Under Test: this must be an external test system (not a mock).] [Origin 2: Touchstone's RESTful client. Simulated: this requires Touchstone to be chosen as the test system.]

AEGIS Touchstone Testing TestScript Rule Extension

  • ruleId: GetVariable-JsonPath
  • path: /FHIRCommon/_reference/rule/GetVariable-JsonPath.groovy

AEGIS Touchstone Testing TestScript Rule Extension

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

StructureDefinition Work Group: cbcc

url: TestScript 03 Operations - All SUT | 02 Operation: Revoke a Consent

version: 1.0.0-ballot

name: Test_02_Operation_Revoke_a_Consent

title: 03 Operations - All SUT | 02 Operation: Revoke a Consent

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:

Happy Path: Perform a successful Consent/$revokeConsent operation. Test a client and server to verify support for the Consent $revokeConsent operation, supporting the FAST Consent Management IG Version: CI. This scenario is generic and can be used with any FHIR format and query parameters. See https://wildfhir4.wildfhir.org/ig/fhir-consent-management-tg/rtm_test_cases.html#testcase-70 Test System Details (in order of appearance): [Origin 1: Consent Client's RESTful client. System Under Test: this must be an external test system (not Touchstone).] [Destination 1: Consent Admin Service's RESTful FHIR Server. System Under Test: this must be an external test system (not a mock).] [Origin 2: Touchstone's RESTful client. Simulated: this requires Touchstone to be chosen as the test system.]

jurisdiction: United States of America

copyright:

(c) AEGIS.net, Inc. 2026

origin

index: 1

profile: Test script profile origin type: FHIR-Client (FHIR Client)

origin

index: 2

profile: Test script profile origin type: FHIR-Client (FHIR Client)

Destinations

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

profile:

test

name: Step_001_Consent_slash_dollar_revokeConsent_operation

description: Consent Client invokes the Consent/$revokeConsent operation at Consent Admin Service.

action

Operations

-TypeResourceDescriptionDestinationEncodeRequestUrlMethodOriginParamsRequestIdResponseId
*testscript-operation-codes-extended: post (post)ConsentConsent/$revokeConsent operation.1truePOST1/$revokeConsentdest-1-FHIRExtendedOperation-1-requestdest-1-FHIRExtendedOperation-1-response

action

Asserts

-ExtensionDescriptionDirectionExpressionValidateProfileIdWarningOnly
*Confirm that the resource(s) in the request body at FHIRPath 'Parameters' conform to profile 'RevokeConsentParameters'.requestParametersRevokeConsentParametersfalse

action

Asserts

-ExtensionDescriptionDirectionSourceIdWarningOnly
*, Save the reference from the request so we can read it in the next step and check its status.requestdest-1-FHIRExtendedOperation-1-requesttrue

test

name: Step_002_Consent_read

description: Touchstone reads a Consent resource at Consent Admin Service. Read the revoked Consent using the reference we saved from the $revokeConsent request, confirm it still exists, and is inactive.

action

Operations

-TypeResourceDescriptionAcceptDestinationEncodeRequestUrlMethodOriginRequestIdResponseIdUrl
*Test script operation code: read (Read)ConsentRead a Consent resource.json1trueGET2dest-1-FHIRRead-1-requestdest-1-FHIRRead-1-response${dest1SystemConfig.baseUrl}/${ConsentReference}

action

Asserts

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

action

Asserts

-ExtensionDescriptionDirectionWarningOnly
*Confirm that the response body exists.responsefalse

action

Asserts

-ExtensionDescriptionDirectionResourceWarningOnly
*Confirm that the response body is a Consent resource.responseConsentfalse

action

Asserts

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

action

Asserts

-ExtensionDescriptionDirectionExpressionOperatorSourceIdValueWarningOnly
*Confirm the status of the Consent just revoked is inactive.responseConsent.status = 'inactive'equalsdest-1-FHIRRead-1-responsetruefalse