Generated Narrative: TestScript 01-Operation-File-a-Consent Profile: AEGIS Touchstone Testing TestScript Profile AEGIS Touchstone Testing TestScript Rule Extension ruleId: GetVariable-FhirPath path: /FHIRCommon/_reference/rule/GetVariable-FhirPath.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 | 01 Operation: File a Consent version: 1.0.0-ballot name: Test_01_Operation_File_a_Consent title: 03 Operations - All SUT | 01 Operation: File 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/$fileConsent operation. Test a client and server to verify support for the Consent $fileConsent 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-68 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 - Index Profile * 1 Test script profile destination type: FHIR-Server (FHIR Server) profile: http://hl7.org/fhir/us/consent-management/StructureDefinition/FileConsentParameters http://hl7.org/fhir/StructureDefinition/Bundle test name: Step_001_Consent_slash_dollar_fileConsent_operation description: Consent Client invokes the Consent/$fileConsent operation at Consent Admin Service. action Operations - Type Resource Description Destination EncodeRequestUrl Method Origin Params RequestId ResponseId * testscript-operation-codes-extended: post (post) Consent Consent/$fileConsent operation. 1 true POST 1 /$fileConsent dest-1-FHIRExtendedOperation-1-request dest-1-FHIRExtendedOperation-1-response action Asserts - Extension Description Direction Expression ValidateProfileId WarningOnly * Confirm that the resource(s) in the request body at FHIRPath 'Parameters' conform to profile 'FileConsentParameters'. request Parameters FileConsentParameters false action Asserts - Extension Description Direction SourceId WarningOnly * , Save the identifier from the request so we can search for it in the next step and check its status. request dest-1-FHIRExtendedOperation-1-request true test name: Step_002_Consent_search description: Touchstone searches for Consent resources at Consent Admin Service, with query parameters: identifier = ${ConsentIdentifier}. Because there is no defined way to extract the id of the newly created Consent#xD; from the $fileConsent response, we will search by the identifier we saved from#xD; the $fileConsent request, confirm it was created, and is active. action Operations - Type Resource Description Accept Destination EncodeRequestUrl Origin Params RequestId ResponseId * Test script operation code: search (Search) Consent Search for Consent resources. json 1 true 2 ?identifier=${ConsentIdentifier} dest-1-FHIRSearch-1-request dest-1-FHIRSearch-1-response action Asserts - Extension Description Direction Operator ResponseCode SourceId WarningOnly * Confirm that the returned HTTP status is 200 OK. response in 200 dest-1-FHIRSearch-1-response false action Asserts - Extension Description Direction WarningOnly * Confirm that the response body exists. response false action Asserts - Extension Description Direction Resource WarningOnly * Confirm that the response resource type is Bundle. response Bundle false action Asserts - Extension Description Direction ValidateProfileId WarningOnly * Confirm that the response Bundle conforms to the base FHIR Bundle profile. This also validates the contents against any declared profiles. response Bundle-profile false action Asserts - Extension Description Direction Expression Operator Value WarningOnly * Confirm that the response Bundle type is searchset. response Bundle.type equals searchset false action Asserts - Extension Description Direction Expression Operator SourceId Value WarningOnly * Confirm that at least one Consent resource is in the response. response Bundle.entry.select(resource as Consent).exists() equals dest-1-FHIRSearch-1-response true false action Asserts - Extension Description Direction Expression Operator SourceId Value WarningOnly * Confirm the status of the Consent just filed is active. response Bundle.entry.select(resource as Consent).status = 'active' equals dest-1-FHIRSearch-1-response true false
03 Operations - All SUT | 01 Operation: File a Consent
HL7 International / Community Based Collaborative Care
Happy Path: Perform a successful Consent/$fileConsent operation. Test a client and server to verify support for the Consent $fileConsent 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-68 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.]
Consent Client invokes the Consent/$fileConsent operation at Consent Admin Service.
Confirm that the resource(s) in the request body at FHIRPath 'Parameters' conform to profile 'FileConsentParameters'.
Save the identifier from the request so we can search for it in the next step and check its status.
Touchstone searches for Consent resources at Consent Admin Service, with query parameters: identifier = ${ConsentIdentifier}. Because there is no defined way to extract the id of the newly created Consent from the $fileConsent response, we will search by the identifier we saved from the $fileConsent request, confirm it was created, and is active.
Confirm that the returned HTTP status is 200 OK.
Confirm that the response resource type is Bundle.
Confirm that the response Bundle conforms to the base FHIR Bundle profile. This also validates the contents against any declared profiles.
Confirm that the response Bundle type is searchset.
Confirm that at least one Consent resource is in the response.
Bundle.entry.select(resource as Consent).exists()
Confirm the status of the Consent just filed is active.
Bundle.entry.select(resource as Consent).status = 'active'