Scalable Consent Management Testing Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
Official URL: http://hl7.org/fhir/us/consent-management-tg/TestScript/fastconsentfileconsentjson | Version: 0.1.0 | |||
Standards status: Trial-use | Maturity Level: 1 | Computable Name: FASTConsentFileConsentJSON | ||
Copyright/Legal: (c) HL7 International / Community Based Collaborative Care 2025 |
Test a FAST Consent Management Server implementation of the $fileConsent operation using JSON Format
StructureDefinition Work Group: cbcc
url: TestScript FAST Consent fileConsent JSON
version: 0.1.0
name: FASTConsentFileConsentJSON
title: FAST Consent fileConsent JSON
status: Active
date: 2025-05-22
publisher: HL7 International / Community Based Collaborative Care
contact: HL7 International / Community Based Collaborative Care: http://www.hl7.org/Special/committees/cbcc
description:
Test a FAST Consent Management Server implementation of the $fileConsent operation using JSON Format
jurisdiction: United States of America
copyright:
(c) HL7 International / Community Based Collaborative Care 2025
Index | Profile |
1 | Test script profile origin type FHIR-Client: FHIR Client |
Index | Profile |
1 | Test script profile destination type FHIR-Server: FHIR Server |
fixture
id
fileconsent-parametersautocreate: false
autodelete: false
resource:
./Parameters-fileconsent.json
profile:
Name | Expression | SourceId |
createConsentIdentifier | Parameters.parameter.where(name = 'consent').resource.identifier[0].value | fileconsent-parameters |
test
id
FASTConsentFileConsentJSONname: FASTConsentFileConsentJSON
description: Test a FAST Consent Management Server implementation of the $fileConsent operation using JSON Format against the destination server and assert successful response.
action
Operations
Type Resource Description Accept ContentType Destination EncodeRequestUrl Origin Params SourceId Test script operation code fileConsent: fileConsent Consent Send a Consent $fileConsent operation json json 1 true 1 /$fileConsent fileconsent-parameters action
Asserts
Extension Description Direction Resource WarningOnly Confirm that the sent request payload is a Parameters resource. request Parameters true action
Asserts
Extension Description Direction ValidateProfileId WarningOnly Confirm that the sent Parameters conforms to the FAST Consent profile. request fileConsentParametersProfile false action
Asserts
Extension Description Direction ResponseCode WarningOnly Confirm that the returned response code is 200 OK. response 200 false action
Asserts
Extension Description Direction Resource WarningOnly Confirm that the returned response payload is an OperationOutcome resource. response OperationOutcome true action
Asserts
Extension Description Direction ValidateProfileId WarningOnly Confirm that the returned OperationOutcome conforms to the base FHIR specification. response OperationOutcomeProfile true
test
id
FASTConsentSearchJSONname: FASTConsentSearchJSON
description: Test a FAST Consent Management Server to confirm successful creation of Consent from previous $fileConsent operation.
action
Operations
Type Resource Description Accept ContentType Destination EncodeRequestUrl Origin Params Test script operation code search: Search Consent Search for Consent from $fileConsent operation json json 1 true 1 ?identifier=${createConsentIdentifier} action
Asserts
Extension Description Direction ResponseCode WarningOnly Confirm that the returned response code is 200 OK. response 200 false action
Asserts
Extension Description Direction Resource WarningOnly Confirm that the returned response payload is a Bundle resource. response Bundle true action
Asserts
Extension Description Direction Path Value WarningOnly Confirm that the returned response payload is a searchset Bundle resource. response .type searchset true action
Asserts
Extension Description Direction Expression Value WarningOnly Confirm that the returned searchset Bundle contains 1 match. response Bundle.entry.resource.count() 1 true action
Asserts
Extension Description Direction Expression WarningOnly Confirm that the returned searchset Bundle contains a Consent resource. response Bundle.entry.resource.as(Consent).exists() true action
Asserts
Extension Description Direction Expression Value WarningOnly Confirm that the returned searchset Bundle contains the created Consent resource. response Bundle.entry.resource.as(Consent).identifier[0].value ${createConsentIdentifier} true