05-Read-a-Subscription
type: TestScript
node role: treeRoot
id:
  v: 05-Read-a-Subscription
meta:
  profile:
    v: http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript
    l: testscript
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: TestScript 05-Read-a-Subscription 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 01 Read Simple Search - All SUT | 05 Read a Subscription version: 1.0.0-ballot name: Test_05_Read_a_Subscription title: 01 Read Simple Search - All SUT | 05 Read a Subscription 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: Test a client and server to verify support for the Subscription read interaction and the return of a valid Subscription resource conforming to the FASTSubscription profile. 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-199 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: 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/Subscription Variables - Name Description Hint * dest-1-FHIRRead-1-needed-Subscription_id Consent Admin Service's Id of Subscription to use, available at Destination 1. [Enter Consent Admin Service's Id of Subscription to use, available at Destination 1] test name: Step_001_Subscript…
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/05-Read-a-Subscription
  l: 05-Read-a-Subscription
version:
  v: 1.0.0-ballot
name:
  v: Test_05_Read_a_Subscription
title:
  v: 01 Read Simple Search - All SUT | 05 Read a Subscription
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: Test a client and server to verify support for the Subscription read interaction and the return of a valid Subscription resource conforming to the FASTSubscription profile. 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-199 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:
      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: Subscription
  id:
    v: Subscription-profile
  reference:
    v: http://hl7.org/fhir/StructureDefinition/Subscription
variable:
  name:
    v: dest-1-FHIRRead-1-needed-Subscription_id
  description:
    v: Consent Admin Service's Id of Subscription to use, available at Destination 1.
  hint:
    v: [Enter Consent Admin Service's Id of Subscription to use, available at Destination 1]
test:
  name:
    v: Step_001_Subscription_read
  description:
    v: Consent Client reads a Subscription resource at Consent Admin Service.
  action:
    operation:
      resource:
        v: Subscription
      description:
        v: Read a Subscription resource.
      destination:
        v: 1
      encode request url:
        v: true
      method:
        v: get
      origin:
        v: 1
      params:
        v: /${dest-1-FHIRRead-1-needed-Subscription_id}
      request id:
        v: dest-1-FHIRRead-1-request
      response id:
        v: dest-1-FHIRRead-1-response
  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
      source id:
        v: dest-1-FHIRRead-1-response
      warning only:
        v: false
  action:
    assert:
      description:
        v: Confirm that the response body exists.
      direction:
        v: response
      warning only:
        v: false
  action:
    assert:
      extension:
        value: Boolean
      description:
        v: Confirm that the response body is a Subscription resource.
      direction:
        v: response
      resource:
        v: Subscription
      warning only:
        v: false
  action:
    assert:
      extension:
        value: Boolean
      description:
        v: Confirm that the response body conforms to the base FHIR Subscription profile. This also checks any declared profiles within.
      direction:
        v: response
      validate profile id:
        v: Subscription-profile
      warning only:
        v: false
  action:
    assert:
      extension:
        value: Boolean
      description:
        v: Confirm that the Subscription resource in the response declares the FASTSubscription profile.
      direction:
        v: response
      expression:
        v: Subscription.meta.profile contains 'http://hl7.org/fhir/us/consent-management/StructureDefinition/FASTSubscription'
      operator:
        v: equals
      source id:
        v: dest-1-FHIRRead-1-response
      value:
        v: true
      warning only:
        v: false

v: read

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 response body does not exist.
url:
  v: param
  l: param

Boolean
v: false

Boolean
v: false

Boolean
v: false