07-Notify-event-notification
type: TestScript
node role: treeRoot
id:
  v: 07-Notify-event-notification
meta:
  profile:
    v: http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript
    l: testscript
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: TestScript 07-Notify-event-notification Profile: AEGIS Touchstone Testing TestScript Profile AEGIS Touchstone Testing TestScript Rule Extension ruleId: AssertBodyExists path: /FHIRCommon/_reference/rule/AssertBodyExists.groovy StructureDefinition Work Group: cbcc url: TestScript 04 Basic REST-hook Subs - All SUT | 07 Notify - event-notification version: 1.0.0-ballot name: Test_07_Notify_event_notification title: 04 Basic REST-hook Subs - All SUT | 07 Notify - event-notification 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: Send a Subscriptions R5 Backport REST-hook Notification Bundle, event-notification type. Test a client and server to verify support for POST of a REST-hook Notification Bundle. This scenario is generic and can be used with any FHIR format and query parameters. Test case supporting the FAST Consent Management IG Version: CI. See https://wildfhir4.wildfhir.org/ig/fhir-consent-management-tg/rtm_test_cases.html#testcase-265 Test System Details (in order of appearance): [Origin 1: Consent Admin Service's Subscription REST-hook notification sender. System Under Test: this must be an external test system (not Touchstone).] [Destination 1: Consent Client's Subscription REST-hook notification endpoint. 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 - Index Profile * 1 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/StructureDefinition/Bundle Variables - Name Description Hint * dest-1-FHIRR5BackportNotification-1-needed-notification-endpoint Consent Client's 's REST Hook Subscription notification endpoint, available…
extension:
  extension:
    url:
      v: ruleId
      l: ruleId
    value: Id
      v: AssertBodyExists
  extension:
    url:
      v: path
      l: path
    value: String
      v: /FHIRCommon/_reference/rule/AssertBodyExists.groovy
  url:
    v: http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule
    l: testscript-rule
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-wg
    l: structuredefinition-wg
  value: Code
    v: cbcc
url:
  v: http://hl7.org/fhir/us/consent-management-tg/TestScript/07-Notify-event-notification
  l: 07-Notify-event-notification
version:
  v: 1.0.0-ballot
name:
  v: Test_07_Notify_event_notification
title:
  v: 04 Basic REST-hook Subs - All SUT | 07 Notify - event-notification
status:
  v: active
date:
  v: 2026-03-30
publisher:
  v: HL7 International / Community Based Collaborative Care
contact:
  name:
    v: HL7 International / Community Based Collaborative Care
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/cbcc
description:
  v: Happy Path: Send a Subscriptions R5 Backport REST-hook Notification Bundle, event-notification type. Test a client and server to verify support for POST of a REST-hook Notification Bundle. This scenario is generic and can be used with any FHIR format and query parameters. Test case supporting the FAST Consent Management IG Version: CI. See https://wildfhir4.wildfhir.org/ig/fhir-consent-management-tg/rtm_test_cases.html#testcase-265 Test System Details (in order of appearance): [Origin 1: Consent Admin Service's Subscription REST-hook notification sender. System Under Test: this must be an external test system (not Touchstone).] [Destination 1: Consent Client's Subscription REST-hook notification endpoint. System Under Test: this must be an external test system (not a mock).]
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
      l: 3166
    code:
      v: US
    display:
      v: United States of America
copyright:
  v: (c) AEGIS.net, Inc. 2026
origin:
  index:
    v: 1
  profile:
    system:
      v: http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types
      l: testscript-profile-origin-types
    code:
      v: FHIR-Client
destination:
  index:
    v: 1
  profile:
    system:
      v: http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types
      l: testscript-profile-destination-types
    code:
      v: FHIR-Server
profile:
  l: Bundle
  id:
    v: Bundle-profile
  reference:
    v: http://hl7.org/fhir/StructureDefinition/Bundle
variable:
  description:
    v: Consent Client's 's REST Hook Subscription notification endpoint, available at Destination 1.
  hint:
    v: [Enter Consent Client's 's REST Hook Subscription notification endpoint, available at Destination 1]
test:
  name:
    v: Step_001_Send_Subscription_notification
  description:
    v: Consent Admin Service sends a Subscription notification to Consent Client's notification endpoint.
  action:
    operation:
      resource:
        v: Bundle
      description:
        v: POST a Subscriptions R5 Backport REST-hook Notification Bundle.
      content type:
        v: json
      destination:
        v: 1
      encode request url:
        v: true
      method:
        v: post
      origin:
        v: 1
  action:
    assert:
      extension:
        value: Boolean
      description:
        v: Confirm that the returned HTTP status is 200 OK.
      direction:
        v: response
      operator:
        v: in
      response code:
        v: 200
      warning only:
        v: false
  action:
    assert:
      description:
        v: Confirm that the request body exists.
      direction:
        v: request
      warning only:
        v: false
  action:
    assert:
      extension:
        value: Boolean
      description:
        v: Confirm that the request resource type is Bundle.
      direction:
        v: request
      resource:
        v: Bundle
      warning only:
        v: false
  action:
    assert:
      extension:
        value: Boolean
      description:
        v: Confirm that the request Bundle conforms to the base FHIR Bundle profile. This also validates the contents against any declared profiles.
      direction:
        v: request
      validate profile id:
        v: Bundle-profile
      warning only:
        v: false
  action:
    assert:
      extension:
        value: Boolean
      description:
        v: Confirm that the request Bundle type is history.
      direction:
        v: request
      expression:
        v: Bundle.type
      operator:
        v: equals
      value:
        v: history
      warning only:
        v: false
  action:
    assert:
      extension:
        value: Boolean
      description:
        v: Confirm that the request Bundle declares the backport-subscription-notification-r4 profile.
      direction:
        v: request
      expression:
        v: Bundle.where('http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-notification-r4' in meta.profile).exists()
      warning only:
        v: false
  action:
    assert:
      extension:
        value: Boolean
      description:
        v: Confirm that the Notification type is event-notification.
      direction:
        v: request

v: post

v: Authorization

v: none

Boolean
v: false

url:
  v: ruleId
  l: ruleId
value: Id
  v: AssertBodyExists

extension:
  url:
    v: name
    l: name
  value: String
    v: errorMessage
extension:
  url:
    v: value
    l: value
  value: String
    v: the request body does not exist.
url:
  v: param
  l: param

Boolean
v: false

Boolean
v: false

Boolean
v: false

Boolean
v: false

Boolean
v: false

v: Bundle.entry.resource.ofType(Parameters).parameter.where(name='type').value = 'event-notification'

v: equals

v: true

v: false

assert:
  extension:
    url:
      v: http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail
      l: testscript-assert-stopTestOnFail
    value: Boolean
      v: false
  description:
    v: Confirm that every Consent resource in the request declares the FASTConsent profile.
  direction:
    v: request
  expression:
    v: Bundle.entry.resource.where(resourceType = 'Consent').all('https://hl7.org/fhir/us/consent-management/StructureDefinition/FASTConsent' in meta.profile)
  operator:
    v: equals
  value:
    v: true
  warning only:
    v: false