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

: 03 Operations - All SUT | 03 Operation: Record a Disclosure - XML Representation

Page standards status: Trial-use Maturity Level: 1

Raw xml | Download


<TestScript xmlns="http://hl7.org/fhir">
  <id value="03-Operation-Record-a-Disclosure"/>
  <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 03-Operation-Record-a-Disclosure</b></p><a name="03-Operation-Record-a-Disclosure"> </a><a name="hc03-Operation-Record-a-Disclosure"> </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><p><b>StructureDefinition Work Group</b>: cbcc</p><p><b>url</b>: <a href="TestScript-03-Operation-Record-a-Disclosure.html">TestScript 03 Operations - All SUT | 03 Operation: Record a Disclosure</a></p><p><b>version</b>: 1.0.0-ballot</p><p><b>name</b>: Test_03_Operation_Record_a_Disclosure</p><p><b>title</b>: 03 Operations - All SUT | 03 Operation: Record a Disclosure</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>Happy Path: Perform a successful AuditEvent/$recordDisclosure operation.
Test a client and server to verify support for the AuditEvent $recordDisclosure 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-69
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).]</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/us/consent-management/2026Jan/StructureDefinition-RecordDisclosureParameters.html">http://hl7.org/fhir/us/consent-management/StructureDefinition/RecordDisclosureParameters</a></p><blockquote><p><b>test</b></p><p><b>name</b>: Step_001_AuditEvent_slash_dollar_recordDisclosure_operation</p><p><b>description</b>: Consent Client invokes the AuditEvent/$recordDisclosure operation at Consent Admin Service.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Method</b></td><td><b>Origin</b></td><td><b>Params</b></td><td><b>RequestId</b></td><td><b>ResponseId</b></td></tr><tr><td style="display: none">*</td><td>testscript-operation-codes-extended: post (post)</td><td>AuditEvent</td><td>AuditEvent/$recordDisclosure operation.</td><td>1</td><td>true</td><td>POST</td><td>1</td><td>/$recordDisclosure</td><td>dest-1-FHIRExtendedOperation-1-request</td><td>dest-1-FHIRExtendedOperation-1-response</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>ValidateProfileId</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td/><td>Confirm that the resource(s) in the request body at FHIRPath 'Parameters' conform to profile 'RecordDisclosureParameters'.</td><td>request</td><td>Parameters</td><td>RecordDisclosureParameters</td><td>false</td></tr></table></blockquote></blockquote></div>
  </text>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="cbcc"/>
  </extension>
  <url
       value="http://hl7.org/fhir/us/consent-management-tg/TestScript/03-Operation-Record-a-Disclosure"/>
  <version value="1.0.0-ballot"/>
  <name value="Test_03_Operation_Record_a_Disclosure"/>
  <title value="03 Operations - All SUT | 03 Operation: Record a Disclosure"/>
  <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="Happy Path: Perform a successful AuditEvent/$recordDisclosure operation.
Test a client and server to verify support for the AuditEvent $recordDisclosure 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-69
 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).]"/>
  <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="RecordDisclosureParameters">🔗 
    <reference
               value="http://hl7.org/fhir/us/consent-management/StructureDefinition/RecordDisclosureParameters"/>
  </profile>
  <test>
    <name
          value="Step_001_AuditEvent_slash_dollar_recordDisclosure_operation"/>
    <description
                 value="Consent Client invokes the AuditEvent/$recordDisclosure operation at Consent Admin Service."/>
    <action>
      <operation>
        <type>
          <system
                  value="http://touchstone.com/fhir/testscript-operation-codes-extended"/>
          <code value="post"/>
        </type>
        <resource value="AuditEvent"/>
        <description value="AuditEvent/$recordDisclosure operation."/>
        <destination value="1"/>
        <encodeRequestUrl value="true"/>
        <method value="post"/>
        <origin value="1"/>
        <params value="/$recordDisclosure"/>
        <requestId value="dest-1-FHIRExtendedOperation-1-request"/>
        <responseId value="dest-1-FHIRExtendedOperation-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 resource(s) in the request body at FHIRPath 'Parameters' conform to profile 'RecordDisclosureParameters'."/>
        <direction value="request"/>
        <expression value="Parameters"/>
        <validateProfileId value="RecordDisclosureParameters"/>
        <warningOnly value="false"/>
      </assert>
    </action>
  </test>
</TestScript>