TestCases
type: StructureDefinition
node role: treeRoot
id:
  v: TestCases
text:
  status:
    v: extensions
  div: English Generated Narrative: StructureDefinition TestCases Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> TestCases 0..* Resource Elements defined in Ancestors:id, meta, implicitRules, language Test Suite - set of tests executed by a runner #xD; url ΣC 0..1 uri Canonical identifier for these tests, represented as a URI (globally unique) Constraints: cnl-1 #xD; version Σ 0..1 string Business version of the test set (semver) #xD; name Σ 0..1 string Name for these tests #xD; description Σ 0..1 markdown General Description of these tests #xD; scope 0..* Base The scope - what these test cases are testing #xD; reference 0..1 canonical(ActorDefinition | ImplementationGuide | StructureDefinition) A reference to what is being tested #xD; description 0..1 string Description of what the scope is exists / what is being tested #xD; dependency 0..* Base Test cases that must be passed before these test cases are meaningful to execute #xD; reference 1..1 canonical(Test Cases) The Test Cases #xD; description 0..1 string Description of what the dependency exists / why it was defined #xD; runner 1..1 url URL Documentation for a runner that executes these tests #xD; mode 0..* Base A mode that can be passed to runner - affects test content #xD; code 1..1 string The code that identifies the mode #xD; description 0..1 string Description of what this mode exists / why it was defined #xD; parameter 0..* Base Parameter passed to the runner #xD; name 1..1 string Name of parameter #xD; value[x] 1..1 Value of this parameter #xD; valueString string #xD; valueBoolean boolean #xD; valueInteger integer #xD; valueDecimal decimal #xD; valueDateTime dateTime #xD; valueUri uri #xD; valueCoding Coding #xD; valueQuantity Quantity #xD; valueExpression Expression #xD; mode 0..1 code A mode that must be true for this parameter to be used #xD; suite 0..* Base A suite of tests that share a common set up #xD; name 1..1 string The name of this s…
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-wg
  value: code
    v: fhir
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm
  value: integer
    v: 3
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom
      value: canonical
        v: http://hl7.org/fhir/tools/ImplementationGuide/hl7.fhir.uv.tools
        link: http://hl7.org/fhir/tools/ImplementationGuide/hl7.fhir.uv.tools
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status
  value: code
    v: informative
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom
      value: canonical
        v: http://hl7.org/fhir/tools/ImplementationGuide/hl7.fhir.uv.tools
        link: http://hl7.org/fhir/tools/ImplementationGuide/hl7.fhir.uv.tools
url:
  v: http://hl7.org/fhir/tools/StructureDefinition/TestCases
identifier:
  system:
    v: urn:ietf:rfc:3986
  value:
    v: urn:oid:2.16.840.1.113883.4.642.40.1.42.64
version:
  v: 0.6.0
name:
  v: TestCases
title:
  v: Test Cases
status:
  v: active
date:
  v: 2025-07-20T21:15:46+10:00
publisher:
  v: HL7 International / FHIR Infrastructure
contact:
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/fiwg
description:
  v: A standard format for test cases used throughout the FHIR ecosystem
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
    code:
      v: 001
fhir version:
  v: 5.0.0
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
  name:
    v: RIM Mapping
kind:
  v: logical
abstract:
  v: false
type:
  v: http://hl7.org/fhir/tools/StructureDefinition/TestCases
base definition:
  v: http://hl7.org/fhir/StructureDefinition/Resource
  link: http://hl7.org/fhir/StructureDefinition/Resource
derivation:
  v: specialization
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
    value: string
      v: 5.0.0
  element:
    id:
      v: TestCases
    path:
      v: TestCases
    short:
      v: Test Suite - set of tests executed by a runner
    definition:
      v: A set of tests that are executed by some runner to test the functionality of a tool in the FHIR ecosystem
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: Resource
      min:
        v: 0
      max:
        v: *
    must support:
      v: false
    is modifier:
      v: false
    is summary:
      v: false
    mapping:
      identity:
        v: rim
      map:
        v: n/a,Entity. Role, or Act
  element:
    id:
      v: TestCases.id
    path:
      v: TestCases.id
    short:
      v: Logical id of this artifact
    definition:
      v: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
    comment:
      v: Within the context of the FHIR RESTful interactions, the resource has an id except for cases like the create and conditional update. Otherwise, the use of the resouce id depends on the given use case.
    min:
      v: 0
    max:
      v: 1
    base:
      path:
        v: Resource.id
      min:
        v: 0
      max:
        v: 1
    type:
      extension:
        value: url
      code:
        v: http://hl7.org/fhirpath/System.String
    must support:
      v: false
    is modifier:
      v: false
    is summary:
      v: true
  element:
    id:
      v: TestCases.meta
    path:
      v: TestCases.meta
    short:
      v: Metadata about the resource
    definition:
      v: The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
    min:
      v: 0
    max:
      v: 1
    base:
      path:
        v: Resource.meta
      min:
        v: 0
      max:
        v: 1
    type:
      code:
        v: Meta
    constraint:
      key:
        v: ele-1
      severity:
        v: error
      human:
        v: All FHIR elements must have a @value or children
      expression:
        v: hasValue() or (children().count() > id.count())
      source:
        v: http://hl7.org/fhir/StructureDefinition/Element
        link: http://hl7.org/fhir/StructureDefinition/Element
    must support:
      v: false
    is modifier:
      v: false
    is summary:
      v: true
  element:
    id:
      v: TestCases.implicitRules

url
v: id

v: TestCases.implicitRules

v: A set of rules under which this content was created

v: A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.

v: Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of its narrative along with other profiles, value sets, etc.

v: 0

v: 1

path:
  v: Resource.implicitRules
min:
  v: 0
max:
  v: 1

code:
  v: uri

key:
  v: ele-1
severity:
  v: error
human:
  v: All FHIR elements must have a @value or children
expression:
  v: hasValue() or (children().count() > id.count())
source:
  v: http://hl7.org/fhir/StructureDefinition/Element
  link: http://hl7.org/fhir/StructureDefinition/Element

v: false

v: true

v: This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies its meaning or interpretation

v: true

id:
  v: TestCases.language
path:
  v: TestCases.language
short:
  v: Language of the resource content
definition:
  v: The base language in which the resource is written.
comment:
  v: Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.language
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: Language
  strength:
    v: required
  description:
    v: IETF language tag for a human language
  value set:
    v: http://hl7.org/fhir/ValueSet/all-languages|5.0.0
    link: 5.0
    link: .0
  additional:
    purpose:
      v: starter
    value set:
      v: http://hl7.org/fhir/ValueSet/languages
      link: http://hl7.org/fhir/ValueSet/languages

id:
  v: TestCases.url
path:
  v: TestCases.url
short:
  v: Canonical identifier for these tests, represented as a URI (globally unique)
definition:
  v: An absolute URI that is used to identify test tests.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.url
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
constraint:
  key:
    v: cnl-1
  severity:
    v: warning
  human:
    v: URL should not contain | or # - these characters make processing canonical references problematic
  expression:
    v: exists() implies matches('^[^|# ]+$')
is modifier:
  v: false
is summary:
  v: true

id:
  v: TestCases.version
path:
  v: TestCases.version
short:
  v: Business version of the test set (semver)
definition:
  v: The identifier that is used to identify this version of these tests. Version must use SemVer
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.version
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
is modifier:
  v: false
is summary:
  v: true

id:
  v: TestCases.name
path:
  v: TestCases.name
short:
  v: Name for these tests
definition:
  v: A natural language name identifying the tests. This name should be usable as an identifier for the module by machine processing applications such as code generation.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.name
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
is modifier:
  v: false
is summary:
  v: true

id:
  v: TestCases.description
path:
  v: TestCases.description
short:
  v: General Description of these tests
definition:
  v: General description of these teats.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: markdown
is modifier:
  v: false
is summary:
  v: true

id:
  v: TestCases.scope
path:
  v: TestCases.scope
short:
  v: The scope - what these test cases are testing
definition:
  v: The scope indicates what kind of systems these test cases are intended to test
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.scope
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Base

id:
  v: TestCases.scope.reference
path:
  v: TestCases.scope.reference
short:
  v: A reference to what is being tested
definition:
  v: A reference to what is being tested
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.scope.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: canonical
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ActorDefinition
    link: http://hl7.org/fhir/StructureDefinition/ActorDefinition
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ImplementationGuide
    link: http://hl7.org/fhir/StructureDefinition/ImplementationGuide
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/StructureDefinition
    link: http://hl7.org/fhir/StructureDefinition/StructureDefinition

id:
  v: TestCases.scope.description
path:
  v: TestCases.scope.description
short:
  v: Description of what the scope is exists / what is being tested
definition:
  v: Description of what the scope is does / what is being tested
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.scope.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.dependency
path:
  v: TestCases.dependency
short:
  v: Test cases that must be passed before these test cases are meaningful to execute
definition:
  v: Another set of test cases that must be passed before these test cases are meaningful to execute. These test cases prove functionality that these tests require to execute
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.dependency
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Base

id:
  v: TestCases.dependency.reference
path:
  v: TestCases.dependency.reference
short:
  v: The Test Cases
definition:
  v: The test cases.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: TestCases.dependency.reference
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: canonical
  target profile:
    v: http://hl7.org/fhir/tools/StructureDefinition/TestCases
    link: http://hl7.org/fhir/tools/StructureDefinition/TestCases

id:
  v: TestCases.dependency.description
path:
  v: TestCases.dependency.description
short:
  v: Description of what the dependency exists / why it was defined
definition:
  v: Description of what this mode does / why it was defined. This should explain to a tester why the
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.dependency.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.runner
path:
  v: TestCases.runner
short:
  v: URL Documentation for a runner that executes these tests
definition:
  v: URL of documentation that explains how a runner would read these tests, and use them to actually test out a tool.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: TestCases.runner
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: url

id:
  v: TestCases.mode
path:
  v: TestCases.mode
short:
  v: A mode that can be passed to runner - affects test content
definition:
  v: A mode that can be passed to a runner running these these tests, that affects test content and influences how the tests are executed or evaulated (or even if they run)
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.mode
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Base

id:
  v: TestCases.mode.code
path:
  v: TestCases.mode.code
short:
  v: The code that identifies the mode
definition:
  v: The code by which the mode is identified when passed to runner
min:
  v: 1
max:
  v: 1
base:
  path:
    v: TestCases.mode.code
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.mode.description
path:
  v: TestCases.mode.description
short:
  v: Description of what this mode exists / why it was defined
definition:
  v: Description of what this mode does / why it was defined. This should explain to a tester when they should use the mode
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.mode.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.parameter
path:
  v: TestCases.parameter
short:
  v: Parameter passed to the runner
definition:
  v: A parameter passed to the runner when executing tests. Which parameters are valid, and how exactly the parameter is used are used depends on the definition of the runner
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.parameter
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Base

id:
  v: TestCases.parameter.name
path:
  v: TestCases.parameter.name
short:
  v: Name of parameter
definition:
  v: Name of parameter
min:
  v: 1
max:
  v: 1
base:
  path:
    v: TestCases.parameter.name
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.parameter.value[x]
path:
  v: TestCases.parameter.value[x]
short:
  v: Value of this parameter
definition:
  v: The value of the parameter. If the value is an Expression, the definition of the runner describes what kind of expressions are allowed and the features/capabilities that they can make use of
min:
  v: 1
max:
  v: 1
base:
  path:
    v: TestCases.parameter.value[x]
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
type:
  code:
    v: boolean
type:
  code:
    v: integer
type:
  code:
    v: decimal
type:
  code:
    v: dateTime
type:
  code:
    v: uri
type:
  code:
    v: Coding
type:
  code:
    v: Quantity
type:
  code:
    v: Expression

id:
  v: TestCases.parameter.mode
path:
  v: TestCases.parameter.mode
short:
  v: A mode that must be true for this parameter to be used
definition:
  v: If this mode is not passed to the runner, then this parameter will not be used
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.parameter.mode
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
meaning when missing:
  v: If no modes are listed, the parameter is always used, unless there is a parameter with the same name that is selected by mode

id:
  v: TestCases.suite
path:
  v: TestCases.suite
short:
  v: A suite of tests that share a common set up
definition:
  v: A suite of tests that all share a common set up, and can be executed as a group
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.suite
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Base

id:
  v: TestCases.suite.name
path:
  v: TestCases.suite.name
short:
  v: The name of this suite - unique in the TestCases resource
definition:
  v: The name by which this suite is known by in the test system. The name must be unique in the amongst the suites
min:
  v: 1
max:
  v: 1
base:
  path:
    v: TestCases.suite.name
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.description
path:
  v: TestCases.suite.description
short:
  v: Description of what this suite does / why it was defined
definition:
  v: Description of what this suite does / why it was defined. This should explain to a tester what they should know when deciding which tests to run
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.mode
path:
  v: TestCases.suite.mode
short:
  v: mode required to run this suite
definition:
  v: If this mode is not passed to the runner, then this suite will not be run
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.mode
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
meaning when missing:
  v: If no modes are listed, the suite is always executed

id:
  v: TestCases.suite.data
path:
  v: TestCases.suite.data
short:
  v: Resources used in the tests in this suite
definition:
  v: The resources used in the tests in this suite. How exactly they are used depends on the definition of the runner
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.suite.data
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Base
constraint:
  key:
    v: ts-2
  severity:
    v: error
  human:
    v: Either a file, or a resource, but not both
  expression:
    v: file xor resource

id:
  v: TestCases.suite.data.name
path:
  v: TestCases.suite.data.name
short:
  v: A name for this resource (per runner definition)
definition:
  v: A name that identifies this resource. The runner definition defines whether there must be a name, and what names there are
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.data.name
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.data.file
path:
  v: TestCases.suite.data.file
short:
  v: A file containing a resource used in the tests
definition:
  v: A file containing a resource used in the tests
comment:
  v: Filename is relative to the folder/directory containing this TestCases
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.data.file
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.data.resource
path:
  v: TestCases.suite.data.resource
short:
  v: An inline resource used in the tests
definition:
  v: An inline resource used in the tests. How exactly it is used depends on the definition of the runner.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.data.resource
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Resource

id:
  v: TestCases.suite.data.mode
path:
  v: TestCases.suite.data.mode
short:
  v: A mode that must be true for this resource to be used
definition:
  v: If this mode is not passed to the runner, then this resource will not be used
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.data.mode
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
meaning when missing:
  v: If no modes are listed, the resource is always used, unless there is another entry with the same name that is selected by mode

id:
  v: TestCases.suite.parameter
path:
  v: TestCases.suite.parameter
short:
  v: Parameter passed to the runner
definition:
  v: A parameter passed to the runner when executing tests. Which parameters are valid, and how exactly the parameter is used are used depends on the definition of the runner
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.suite.parameter
  min:
    v: 0
  max:
    v: *
content reference:
  v: http://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.parameter

id:
  v: TestCases.suite.test
path:
  v: TestCases.suite.test
short:
  v: A test in the test suite
definition:
  v: An actual test in the test suite
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.suite.test
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Base

id:
  v: TestCases.suite.test.name
path:
  v: TestCases.suite.test.name
short:
  v: The name of this test - unique in the suite
definition:
  v: The name by which this test is known by in the test system. The name must be unique in the suite
min:
  v: 1
max:
  v: 1
base:
  path:
    v: TestCases.suite.test.name
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.test.description
path:
  v: TestCases.suite.test.description
short:
  v: Description of what this test does / why it was defined
definition:
  v: Description of what this test does / why it was defined. This should explain to a tester what they should know when looking at failing test results
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.test.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.test.operation
path:
  v: TestCases.suite.test.operation
short:
  v: Operation that is executed during this test (per definition of runner)
definition:
  v: A code that identifies the operation executed for this test. One of the codes defined in the definition of the runner
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.test.operation
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code

id:
  v: TestCases.suite.test.mode
path:
  v: TestCases.suite.test.mode
short:
  v: mode required to run this test
definition:
  v: If this mode is not passed to the runner, then this test will not be run
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.test.mode
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
meaning when missing:
  v: If no modes are listed, the test is always executed

id:
  v: TestCases.suite.test.parameter
path:
  v: TestCases.suite.test.parameter
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.suite.test.parameter
  min:
    v: 0
  max:
    v: *
content reference:
  v: http://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.parameter

id:
  v: TestCases.suite.test.input
path:
  v: TestCases.suite.test.input
short:
  v: Resources used when executing this test (per runner definition)
definition:
  v: The resources used when executing this test. How exactly they are used depends on the definition of the runner.
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.suite.test.input
  min:
    v: 0
  max:
    v: *
content reference:
  v: http://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite.data

id:
  v: TestCases.suite.test.output
path:
  v: TestCases.suite.test.output
short:
  v: Resources expected as output from this test (per runner definition, often Matchetypes)
definition:
  v: Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner. How exactly it is used depends on the definition of the runner, but the expectation is that these are the expected output, to which the actual output is compared
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.suite.test.output
  min:
    v: 0
  max:
    v: *
content reference:
  v: http://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite.data

id:
  v: TestCases.suite.test.assertion
path:
  v: TestCases.suite.test.assertion
short:
  v: Assertions that can be executed against the output of the tests
definition:
  v: One or more assertions that can be executed against the output of the tests. These may be used with matchetypes to make rules about content the matchetypes leave open
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.suite.test.assertion
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Base

id:
  v: TestCases.suite.test.assertion.focus
path:
  v: TestCases.suite.test.assertion.focus
short:
  v: Which output the assertion is tested on (by name, if there is more than one)
definition:
  v: Resources expected as output from this test. Often, but not always, these resources are Matchetype resources
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.test.assertion.focus
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.test.assertion.severity
path:
  v: TestCases.suite.test.assertion.severity
short:
  v: Error | Warning | Information; only errors are considered to cause a test to fail
definition:
  v: Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.test.assertion.severity
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
binding:
  strength:
    v: required
  description:
    v: The severity of the assertion
  value set:
    v: http://hl7.org/fhir/ValueSet/issue-severity|5.0.0
    link: 5.0
    link: .0

id:
  v: TestCases.suite.test.assertion.expression
path:
  v: TestCases.suite.test.assertion.expression
short:
  v: Technical Expression of the assertion
definition:
  v: Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.test.assertion.expression
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Expression

id:
  v: TestCases.suite.test.assertion.human
path:
  v: TestCases.suite.test.assertion.human
short:
  v: Human readable description of the assertion
definition:
  v: A human readable description of the assertion.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.test.assertion.human
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.test.assertion.mode
path:
  v: TestCases.suite.test.assertion.mode
short:
  v: A mode that must be true for this assertion to apply
definition:
  v: If this mode is not passed to the runner, then this assertion will not be used
min:
  v: 0
max:
  v: 1
base:
  path:
    v: TestCases.suite.test.assertion.mode
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
meaning when missing:
  v: If no modes are listed, the assertion is always used, unless there is another assertion with the same name that is selected by mode

id:
  v: TestCases.suite.suite
path:
  v: TestCases.suite.suite
short:
  v: A nested suite of tests
definition:
  v: A nested set of tests
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.suite.suite
  min:
    v: 0
  max:
    v: *
content reference:
  v: http://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite

id:
  v: TestCases.suite.cases
path:
  v: TestCases.suite.cases
short:
  v: A nested set of test cases
definition:
  v: A nested set of test cases. Typically, the runner must be the same in the nested test cases
min:
  v: 0
max:
  v: *
base:
  path:
    v: TestCases.suite.cases
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/tools/StructureDefinition/TestCases
    link: http://hl7.org/fhir/tools/StructureDefinition/TestCases
type:
  code:
    v: canonical
  target profile:
    v: http://hl7.org/fhir/tools/StructureDefinition/TestCases
    link: http://hl7.org/fhir/tools/StructureDefinition/TestCases

element:
  id:
    v: TestCases
  path:
    v: TestCases
  short:
    v: Test Suite - set of tests executed by a runner
  definition:
    v: A set of tests that are executed by some runner to test the functionality of a tool in the FHIR ecosystem
element:
  id:
    v: TestCases.url
  path:
    v: TestCases.url
  short:
    v: Canonical identifier for these tests, represented as a URI (globally unique)
  definition:
    v: An absolute URI that is used to identify test tests.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: uri
  constraint:
    key:
      v: cnl-1
    severity:
      v: warning
    human:
      v: URL should not contain | or # - these characters make processing canonical references problematic
    expression:
      v: exists() implies matches('^[^|# ]+$')
  is modifier:
    v: false
  is summary:
    v: true
element:
  id:
    v: TestCases.version
  path:
    v: TestCases.version
  short:
    v: Business version of the test set (semver)
  definition:
    v: The identifier that is used to identify this version of these tests. Version must use SemVer
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: string
  is modifier:
    v: false
  is summary:
    v: true
element:
  id:
    v: TestCases.name
  path:
    v: TestCases.name
  short:
    v: Name for these tests
  definition:
    v: A natural language name identifying the tests. This name should be usable as an identifier for the module by machine processing applications such as code generation.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: string
  is modifier:
    v: false
  is summary:
    v: true
element:
  id:
    v: TestCases.description
  path:
    v: TestCases.description
  short:
    v: General Description of these tests
  definition:
    v: General description of these teats.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: markdown
  is modifier:
    v: false
  is summary:
    v: true
element:
  id:
    v: TestCases.scope
  path:
    v: TestCases.scope
  short:
    v: The scope - what these test cases are testing
  definition:
    v: The scope indicates what kind of systems these test cases are intended to test
  min:
    v: 0
  max:
    v: *
  type:
    code:
      v: Base
element:
  id:
    v: TestCases.scope.reference
  path:
    v: TestCases.scope.reference
  short:
    v: A reference to what is being tested
  definition:
    v: A reference to what is being tested
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: canonical
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/ActorDefinition
      link: http://hl7.org/fhir/StructureDefinition/ActorDefinition
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/ImplementationGuide
      link: http://hl7.org/fhir/StructureDefinition/ImplementationGuide
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/StructureDefinition
      link: http://hl7.org/fhir/StructureDefinition/StructureDefinition
element:
  id:
    v: TestCases.scope.description
  path:
    v: TestCases.scope.description
  short:
    v: Description of what the scope is exists / what is being tested
  definition:
    v: Description of what the scope is does / what is being tested
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: string
element:
  id:
    v: TestCases.dependency
  path:
    v: TestCases.dependency
  short:
    v: Test cases that must be passed before these test cases are meaningful to execute
  definition:
    v: Another set of test cases that must be passed before these test cases are meaningful to execute. These test cases prove functionality that these tests require to execute
  min:
    v: 0
  max:
    v: *
  type:
    code:
      v: Base
element:
  id:
    v: TestCases.dependency.reference
  path:
    v: TestCases.dependency.reference
  short:
    v: The Test Cases
  definition:
    v: The test cases.
  min:
    v: 1
  max:
    v: 1
  type:
    code:
      v: canonical
    target profile:
      v: http://hl7.org/fhir/tools/StructureDefinition/TestCases
      link: http://hl7.org/fhir/tools/StructureDefinition/TestCases
element:
  id:
    v: TestCases.dependency.description
  path:
    v: TestCases.dependency.description
  short:
    v: Description of what the dependency exists / why it was defined
  definition:
    v: Description of what this mode does / why it was defined. This should explain to a tester why the
  min:
    v: 0

v: 1

code:
  v: string

id:
  v: TestCases.runner
path:
  v: TestCases.runner
short:
  v: URL Documentation for a runner that executes these tests
definition:
  v: URL of documentation that explains how a runner would read these tests, and use them to actually test out a tool.
min:
  v: 1
max:
  v: 1
type:
  code:
    v: url

id:
  v: TestCases.mode
path:
  v: TestCases.mode
short:
  v: A mode that can be passed to runner - affects test content
definition:
  v: A mode that can be passed to a runner running these these tests, that affects test content and influences how the tests are executed or evaulated (or even if they run)
min:
  v: 0
max:
  v: *
type:
  code:
    v: Base

id:
  v: TestCases.mode.code
path:
  v: TestCases.mode.code
short:
  v: The code that identifies the mode
definition:
  v: The code by which the mode is identified when passed to runner
min:
  v: 1
max:
  v: 1
type:
  code:
    v: string

id:
  v: TestCases.mode.description
path:
  v: TestCases.mode.description
short:
  v: Description of what this mode exists / why it was defined
definition:
  v: Description of what this mode does / why it was defined. This should explain to a tester when they should use the mode
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string

id:
  v: TestCases.parameter
path:
  v: TestCases.parameter
short:
  v: Parameter passed to the runner
definition:
  v: A parameter passed to the runner when executing tests. Which parameters are valid, and how exactly the parameter is used are used depends on the definition of the runner
min:
  v: 0
max:
  v: *
type:
  code:
    v: Base

id:
  v: TestCases.parameter.name
path:
  v: TestCases.parameter.name
short:
  v: Name of parameter
definition:
  v: Name of parameter
min:
  v: 1
max:
  v: 1
type:
  code:
    v: string

id:
  v: TestCases.parameter.value[x]
path:
  v: TestCases.parameter.value[x]
short:
  v: Value of this parameter
definition:
  v: The value of the parameter. If the value is an Expression, the definition of the runner describes what kind of expressions are allowed and the features/capabilities that they can make use of
min:
  v: 1
max:
  v: 1
type:
  code:
    v: string
type:
  code:
    v: boolean
type:
  code:
    v: integer
type:
  code:
    v: decimal
type:
  code:
    v: dateTime
type:
  code:
    v: uri
type:
  code:
    v: Coding
type:
  code:
    v: Quantity
type:
  code:
    v: Expression

id:
  v: TestCases.parameter.mode
path:
  v: TestCases.parameter.mode
short:
  v: A mode that must be true for this parameter to be used
definition:
  v: If this mode is not passed to the runner, then this parameter will not be used
min:
  v: 0
max:
  v: 1
type:
  code:
    v: code
meaning when missing:
  v: If no modes are listed, the parameter is always used, unless there is a parameter with the same name that is selected by mode

id:
  v: TestCases.suite
path:
  v: TestCases.suite
short:
  v: A suite of tests that share a common set up
definition:
  v: A suite of tests that all share a common set up, and can be executed as a group
min:
  v: 0
max:
  v: *
type:
  code:
    v: Base

id:
  v: TestCases.suite.name
path:
  v: TestCases.suite.name
short:
  v: The name of this suite - unique in the TestCases resource
definition:
  v: The name by which this suite is known by in the test system. The name must be unique in the amongst the suites
min:
  v: 1
max:
  v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.description
path:
  v: TestCases.suite.description
short:
  v: Description of what this suite does / why it was defined
definition:
  v: Description of what this suite does / why it was defined. This should explain to a tester what they should know when deciding which tests to run
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.mode
path:
  v: TestCases.suite.mode
short:
  v: mode required to run this suite
definition:
  v: If this mode is not passed to the runner, then this suite will not be run
min:
  v: 0
max:
  v: 1
type:
  code:
    v: code
meaning when missing:
  v: If no modes are listed, the suite is always executed

id:
  v: TestCases.suite.data
path:
  v: TestCases.suite.data
short:
  v: Resources used in the tests in this suite
definition:
  v: The resources used in the tests in this suite. How exactly they are used depends on the definition of the runner
min:
  v: 0
max:
  v: *
type:
  code:
    v: Base
constraint:
  key:
    v: ts-2
  severity:
    v: error
  human:
    v: Either a file, or a resource, but not both
  expression:
    v: file xor resource

id:
  v: TestCases.suite.data.name
path:
  v: TestCases.suite.data.name
short:
  v: A name for this resource (per runner definition)
definition:
  v: A name that identifies this resource. The runner definition defines whether there must be a name, and what names there are
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.data.file
path:
  v: TestCases.suite.data.file
short:
  v: A file containing a resource used in the tests
definition:
  v: A file containing a resource used in the tests
comment:
  v: Filename is relative to the folder/directory containing this TestCases
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.data.resource
path:
  v: TestCases.suite.data.resource
short:
  v: An inline resource used in the tests
definition:
  v: An inline resource used in the tests. How exactly it is used depends on the definition of the runner.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Resource

id:
  v: TestCases.suite.data.mode
path:
  v: TestCases.suite.data.mode
short:
  v: A mode that must be true for this resource to be used
definition:
  v: If this mode is not passed to the runner, then this resource will not be used
min:
  v: 0
max:
  v: 1
type:
  code:
    v: code
meaning when missing:
  v: If no modes are listed, the resource is always used, unless there is another entry with the same name that is selected by mode

id:
  v: TestCases.suite.parameter
path:
  v: TestCases.suite.parameter
short:
  v: Parameter passed to the runner
definition:
  v: A parameter passed to the runner when executing tests. Which parameters are valid, and how exactly the parameter is used are used depends on the definition of the runner
min:
  v: 0
max:
  v: *
content reference:
  v: http://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.parameter

id:
  v: TestCases.suite.test
path:
  v: TestCases.suite.test
short:
  v: A test in the test suite
definition:
  v: An actual test in the test suite
min:
  v: 0
max:
  v: *
type:
  code:
    v: Base

id:
  v: TestCases.suite.test.name
path:
  v: TestCases.suite.test.name
short:
  v: The name of this test - unique in the suite
definition:
  v: The name by which this test is known by in the test system. The name must be unique in the suite
min:
  v: 1
max:
  v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.test.description
path:
  v: TestCases.suite.test.description
short:
  v: Description of what this test does / why it was defined
definition:
  v: Description of what this test does / why it was defined. This should explain to a tester what they should know when looking at failing test results
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.test.operation
path:
  v: TestCases.suite.test.operation
short:
  v: Operation that is executed during this test (per definition of runner)
definition:
  v: A code that identifies the operation executed for this test. One of the codes defined in the definition of the runner
min:
  v: 0
max:
  v: 1
type:
  code:
    v: code

id:
  v: TestCases.suite.test.mode
path:
  v: TestCases.suite.test.mode
short:
  v: mode required to run this test
definition:
  v: If this mode is not passed to the runner, then this test will not be run
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string
meaning when missing:
  v: If no modes are listed, the test is always executed

id:
  v: TestCases.suite.test.parameter
path:
  v: TestCases.suite.test.parameter
min:
  v: 0
max:
  v: *
content reference:
  v: http://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.parameter

id:
  v: TestCases.suite.test.input
path:
  v: TestCases.suite.test.input
short:
  v: Resources used when executing this test (per runner definition)
definition:
  v: The resources used when executing this test. How exactly they are used depends on the definition of the runner.
min:
  v: 0
max:
  v: *
content reference:
  v: http://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite.data

id:
  v: TestCases.suite.test.output
path:
  v: TestCases.suite.test.output
short:
  v: Resources expected as output from this test (per runner definition, often Matchetypes)
definition:
  v: Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner. How exactly it is used depends on the definition of the runner, but the expectation is that these are the expected output, to which the actual output is compared
min:
  v: 0
max:
  v: *
content reference:
  v: http://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite.data

id:
  v: TestCases.suite.test.assertion
path:
  v: TestCases.suite.test.assertion
short:
  v: Assertions that can be executed against the output of the tests
definition:
  v: One or more assertions that can be executed against the output of the tests. These may be used with matchetypes to make rules about content the matchetypes leave open
min:
  v: 0
max:
  v: *
type:
  code:
    v: Base

id:
  v: TestCases.suite.test.assertion.focus
path:
  v: TestCases.suite.test.assertion.focus
short:
  v: Which output the assertion is tested on (by name, if there is more than one)
definition:
  v: Resources expected as output from this test. Often, but not always, these resources are Matchetype resources
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.test.assertion.severity
path:
  v: TestCases.suite.test.assertion.severity
short:
  v: Error | Warning | Information; only errors are considered to cause a test to fail
definition:
  v: Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner
min:
  v: 0
max:
  v: 1
type:
  code:
    v: code
binding:
  strength:
    v: required
  description:
    v: The severity of the assertion
  value set:
    v: http://hl7.org/fhir/ValueSet/issue-severity|5.0.0
    link: 5.0
    link: .0

id:
  v: TestCases.suite.test.assertion.expression
path:
  v: TestCases.suite.test.assertion.expression
short:
  v: Technical Expression of the assertion
definition:
  v: Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Expression

id:
  v: TestCases.suite.test.assertion.human
path:
  v: TestCases.suite.test.assertion.human
short:
  v: Human readable description of the assertion
definition:
  v: A human readable description of the assertion.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string

id:
  v: TestCases.suite.test.assertion.mode
path:
  v: TestCases.suite.test.assertion.mode
short:
  v: A mode that must be true for this assertion to apply
definition:
  v: If this mode is not passed to the runner, then this assertion will not be used
min:
  v: 0
max:
  v: 1
type:
  code:
    v: code
meaning when missing:
  v: If no modes are listed, the assertion is always used, unless there is another assertion with the same name that is selected by mode

id:
  v: TestCases.suite.suite
path:
  v: TestCases.suite.suite
short:
  v: A nested suite of tests
definition:
  v: A nested set of tests
min:
  v: 0
max:
  v: *
content reference:
  v: http://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite

id:
  v: TestCases.suite.cases
path:
  v: TestCases.suite.cases
short:
  v: A nested set of test cases
definition:
  v: A nested set of test cases. Typically, the runner must be the same in the nested test cases
min:
  v: 0
max:
  v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/tools/StructureDefinition/TestCases
    link: http://hl7.org/fhir/tools/StructureDefinition/TestCases
type:
  code:
    v: canonical
  target profile:
    v: http://hl7.org/fhir/tools/StructureDefinition/TestCases
    link: http://hl7.org/fhir/tools/StructureDefinition/TestCases