FHIR Tooling Extensions IG, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.8.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/FHIR/fhir-tools-ig/ and changes regularly. See the Directory of published versions
| Official URL: http://hl7.org/fhir/StructureDefinition/TestCases | Version: 0.8.0 | |||
| Standards status: Draft | Maturity Level: 1 | Computable Name: TestCases | ||
| Other Identifiers: OID:2.16.840.1.113883.4.642.40.1.42.64 | ||||
A plan for executing testing on an artifact or specifications
Usages:
You can also check for usages in the FHIR IG Statistics
Description of Profiles, Differentials, Snapshots and how the different presentations work.
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
C | 0..* | CanonicalResource | Tests to be executed by a Test Runner that knows the tests Elements defined in Ancestors:id, meta, implicitRules, language, text, contained, extension, modifierExtension, url, identifier, version, versionAlgorithm[x], name, title, status, experimental, date, publisher, contact, description, useContext, jurisdiction, purpose, copyright, copyrightLabel | ||||
![]() ![]() |
Σ | 0..1 | id | Logical id of this artifact | ||||
![]() ![]() |
Σ | 0..1 | Meta | Metadata about the resource | ||||
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
![]() ![]() |
0..1 | code | Language of the resource content Binding: AllLanguages (required): IETF language tag for a human language
| |||||
![]() ![]() |
0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources | |||||
![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored | ||||
![]() ![]() |
ΣC | 0..1 | uri | Canonical identifier for this test plan, represented as a URI (globally unique) | ||||
![]() ![]() |
Σ | 0..* | Identifier | Business identifier for the test plan | ||||
![]() ![]() |
Σ | 0..1 | string | Business version of the test plan | ||||
![]() ![]() |
Σ | 0..1 | How to compare versions Binding: VersionAlgorithm (extensible) | |||||
![]() ![]() ![]() |
string | |||||||
![]() ![]() ![]() |
Coding | |||||||
![]() ![]() |
ΣC | 0..1 | string | Name for this test plan (computer friendly) | ||||
![]() ![]() |
Σ | 0..1 | string | Name for this test plan (human friendly) | ||||
![]() ![]() |
?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. | ||||
![]() ![]() |
Σ | 0..1 | boolean | For testing only - never for real usage | ||||
![]() ![]() |
Σ | 0..1 | dateTime | Date last changed | ||||
![]() ![]() |
Σ | 0..1 | string | Name of the publisher/steward (organization or individual) | ||||
![]() ![]() |
Σ | 0..* | ContactDetail | Contact details for the publisher | ||||
![]() ![]() |
0..1 | markdown | Natural language description of the test plan | |||||
![]() ![]() |
Σ | 0..* | UsageContext | The context that the content is intended to support | ||||
![]() ![]() |
Σ | 0..* | CodeableConcept | Intended jurisdiction where the test plan applies (if applicable) Binding: JurisdictionValueSet (extensible): Countries and regions within which this artifact is targeted for use. | ||||
![]() ![]() |
0..1 | markdown | Why this test plan is defined | |||||
![]() ![]() |
0..1 | markdown | Use and/or publishing restrictions | |||||
![]() ![]() |
0..1 | string | Copyright holder and year(s) | |||||
![]() ![]() |
0..* | Base | The scope - what these test cases are testing | |||||
![]() ![]() ![]() |
0..1 | canonical(ActorDefinition | ImplementationGuide | StructureDefinition | CapabilityStatement | Requirements) | A reference to what is being tested | |||||
![]() ![]() ![]() |
0..1 | string | Description of what the scope is exists / what is being tested | |||||
![]() ![]() |
0..* | Base | Test cases that must be passed before these test cases are meaningful to execute | |||||
![]() ![]() ![]() |
1..1 | canonical(Test Cases) | The Test Cases | |||||
![]() ![]() ![]() |
0..1 | string | Description of what the dependency exists / why it was defined | |||||
![]() ![]() |
Σ | 1..1 | url | URL Documentation for a runner that executes these tests | ||||
![]() ![]() |
0..* | Base | A mode that can be passed to runner - affects test content | |||||
![]() ![]() ![]() |
1..1 | string | The code that identifies the mode | |||||
![]() ![]() ![]() |
0..1 | string | Description of what this mode exists / why it was defined | |||||
![]() ![]() |
0..* | Base | Parameter defined for all tests | |||||
![]() ![]() ![]() |
1..1 | string | Name per Runner Definition | |||||
![]() ![]() ![]() |
1..1 | Value of this parameter | ||||||
![]() ![]() ![]() ![]() |
string | |||||||
![]() ![]() ![]() ![]() |
boolean | |||||||
![]() ![]() ![]() ![]() |
integer | |||||||
![]() ![]() ![]() ![]() |
decimal | |||||||
![]() ![]() ![]() ![]() |
dateTime | |||||||
![]() ![]() ![]() ![]() |
uri | |||||||
![]() ![]() ![]() ![]() |
Coding | |||||||
![]() ![]() ![]() ![]() |
Quantity | |||||||
![]() ![]() ![]() ![]() |
Expression | |||||||
![]() ![]() ![]() |
0..1 | code | A mode that must be true for this parameter to be used | |||||
![]() ![]() |
0..* | Base | A suite of tests that share a common set up | |||||
![]() ![]() ![]() |
1..1 | string | The name of this suite - unique in the TestCases resource | |||||
![]() ![]() ![]() |
0..1 | string | Description of what this suite does / why it was defined | |||||
![]() ![]() ![]() |
0..1 | code | Mode required to run this suite | |||||
![]() ![]() ![]() |
C | 0..* | Base | Resources used in the tests in this suite Constraints: tp-1 | ||||
![]() ![]() ![]() ![]() |
0..1 | string | A name for this resource (per runner definition) | |||||
![]() ![]() ![]() ![]() |
0..1 | string | A file containing a resource used in the tests | |||||
![]() ![]() ![]() ![]() |
0..1 | Resource | An inline resource used in the tests | |||||
![]() ![]() ![]() ![]() |
0..1 | code | A mode that must be true for this resource to be used | |||||
![]() ![]() ![]() |
0..* | See parameter | Parameter defined by the suite | |||||
![]() ![]() ![]() |
0..* | Base | A test in the test suite | |||||
![]() ![]() ![]() ![]() |
1..1 | string | The name of this test - unique in the suite | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Description of what this test does / why it was defined | |||||
![]() ![]() ![]() ![]() |
0..1 | code | Operation that is executed during this test (per definition of runner) | |||||
![]() ![]() ![]() ![]() |
0..1 | code | Mode required to run this test | |||||
![]() ![]() ![]() ![]() |
0..* | See parameter | Parameter defined by the test | |||||
![]() ![]() ![]() ![]() |
0..* | See input | Resources used when executing this test (per runner definition) | |||||
![]() ![]() ![]() ![]() |
0..* | See input | Resources expected as output from this test (per runner definition, often Matchetypes) | |||||
![]() ![]() ![]() ![]() |
C | 0..* | Base | Assertions that can be executed against the output of the tests Constraints: tp-2 | ||||
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Which output the assertion is tested on (by name, if there is more than one) | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | code | fatal | error | warning | information | success; fatal+error = fail Binding: IssueSeverity (required): The severity of the assertion | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | Expression | Technical Expression of the assertion | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Human readable description of the assertion | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | code | A mode that must be true for this assertion to apply | |||||
![]() ![]() ![]() |
0..* | See suite | A nested suite of tests | |||||
![]() ![]() ![]() |
0..* | Reference(Test Cases) | A nested set of test plans | |||||
Documentation for this format | ||||||||
| Path | Status | Usage | ValueSet | Version | Source |
| TestCases.language | Base | required | All Languages | 📍5.0.0 | FHIR Std. |
| TestCases.versionAlgorithm[x] | Base | extensible | Version Algorithm | 📦5.0.0 | FHIR Std. |
| TestCases.status | Base | required | PublicationStatus | 📦5.0.0 | FHIR Std. |
| TestCases.jurisdiction | Base | extensible | Jurisdiction ValueSet | 📦5.0.0 | FHIR Std. |
| TestCases.suite.test.assertion.severity | Base | required | Issue Severity | 📍5.0.0 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| cnl-0 | warning | TestCases | Name should be usable as an identifier for the module by machine processing applications such as code generation |
name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
|
| cnl-1 | warning | TestCases.url | URL should not contain | or # - these characters make processing canonical references problematic |
exists() implies matches('^[^|# ]+$')
|
| dom-2 | error | TestCases | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | TestCases | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource |
contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
|
| dom-4 | error | TestCases | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated |
contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
|
| dom-5 | error | TestCases | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | TestCases | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| tp-1 | error | TestCases.suite.input | Either a file, or a resource, but not both |
file.exists() xor resource.exists()
|
| tp-2 | error | TestCases.suite.test.assertion | At least an expression or a human readable rule must exist |
expression.exists() or human.exists()
|
This structure is derived from CanonicalResource
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | CanonicalResource | Tests to be executed by a Test Runner that knows the tests Elements defined in Ancestors:id, meta, implicitRules, language, text, contained, extension, modifierExtension, url, identifier, version, versionAlgorithm[x], name, title, status, experimental, date, publisher, contact, description, useContext, jurisdiction, purpose, copyright, copyrightLabel Constraints: cnl-0 |
![]() ![]() |
ΣC | 0..1 | uri | Canonical identifier for this test plan, represented as a URI (globally unique) |
![]() ![]() |
Σ | 0..* | Identifier | Business identifier for the test plan |
![]() ![]() |
Σ | 0..1 | string | Business version of the test plan |
![]() ![]() |
Σ | 0..1 | How to compare versions Binding: VersionAlgorithm (extensible) | |
![]() ![]() ![]() |
string | |||
![]() ![]() ![]() |
Coding | |||
![]() ![]() |
ΣC | 0..1 | string | Name for this test plan (computer friendly) |
![]() ![]() |
0..1 | string | Name for this test plan (human friendly) | |
![]() ![]() |
?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. |
![]() ![]() |
Σ | 0..1 | boolean | For testing only - never for real usage |
![]() ![]() |
Σ | 0..1 | dateTime | Date last changed |
![]() ![]() |
Σ | 0..1 | string | Name of the publisher/steward (organization or individual) |
![]() ![]() |
Σ | 0..* | ContactDetail | Contact details for the publisher |
![]() ![]() |
0..1 | markdown | Natural language description of the test plan | |
![]() ![]() |
Σ | 0..* | UsageContext | The context that the content is intended to support |
![]() ![]() |
Σ | 0..* | CodeableConcept | Intended jurisdiction where the test plan applies (if applicable) Binding: JurisdictionValueSet (extensible): Countries and regions within which this artifact is targeted for use. |
![]() ![]() |
0..1 | markdown | Why this test plan is defined | |
![]() ![]() |
0..1 | markdown | Use and/or publishing restrictions | |
![]() ![]() |
0..1 | string | Copyright holder and year(s) | |
![]() ![]() |
0..* | Base | The scope - what these test cases are testing | |
![]() ![]() ![]() |
0..1 | canonical(ActorDefinition | ImplementationGuide | StructureDefinition | CapabilityStatement | Requirements) | A reference to what is being tested | |
![]() ![]() ![]() |
0..1 | string | Description of what the scope is exists / what is being tested | |
![]() ![]() |
0..* | Base | Test cases that must be passed before these test cases are meaningful to execute | |
![]() ![]() ![]() |
1..1 | canonical(Test Cases) | The Test Cases | |
![]() ![]() ![]() |
0..1 | string | Description of what the dependency exists / why it was defined | |
![]() ![]() |
Σ | 1..1 | url | URL Documentation for a runner that executes these tests |
![]() ![]() |
0..* | Base | A mode that can be passed to runner - affects test content | |
![]() ![]() ![]() |
1..1 | string | The code that identifies the mode | |
![]() ![]() ![]() |
0..1 | string | Description of what this mode exists / why it was defined | |
![]() ![]() |
0..* | Base | Parameter defined for all tests | |
![]() ![]() ![]() |
1..1 | string | Name per Runner Definition | |
![]() ![]() ![]() |
1..1 | Value of this parameter | ||
![]() ![]() ![]() ![]() |
string | |||
![]() ![]() ![]() ![]() |
boolean | |||
![]() ![]() ![]() ![]() |
integer | |||
![]() ![]() ![]() ![]() |
decimal | |||
![]() ![]() ![]() ![]() |
dateTime | |||
![]() ![]() ![]() ![]() |
uri | |||
![]() ![]() ![]() ![]() |
Coding | |||
![]() ![]() ![]() ![]() |
Quantity | |||
![]() ![]() ![]() ![]() |
Expression | |||
![]() ![]() ![]() |
0..1 | code | A mode that must be true for this parameter to be used | |
![]() ![]() |
0..* | Base | A suite of tests that share a common set up | |
![]() ![]() ![]() |
1..1 | string | The name of this suite - unique in the TestCases resource | |
![]() ![]() ![]() |
0..1 | string | Description of what this suite does / why it was defined | |
![]() ![]() ![]() |
0..1 | code | Mode required to run this suite | |
![]() ![]() ![]() |
C | 0..* | Base | Resources used in the tests in this suite Constraints: tp-1 |
![]() ![]() ![]() ![]() |
0..1 | string | A name for this resource (per runner definition) | |
![]() ![]() ![]() ![]() |
0..1 | string | A file containing a resource used in the tests | |
![]() ![]() ![]() ![]() |
0..1 | Resource | An inline resource used in the tests | |
![]() ![]() ![]() ![]() |
0..1 | code | A mode that must be true for this resource to be used | |
![]() ![]() ![]() |
0..* | See parameter | Parameter defined by the suite | |
![]() ![]() ![]() |
0..* | Base | A test in the test suite | |
![]() ![]() ![]() ![]() |
1..1 | string | The name of this test - unique in the suite | |
![]() ![]() ![]() ![]() |
0..1 | string | Description of what this test does / why it was defined | |
![]() ![]() ![]() ![]() |
0..1 | code | Operation that is executed during this test (per definition of runner) | |
![]() ![]() ![]() ![]() |
0..1 | code | Mode required to run this test | |
![]() ![]() ![]() ![]() |
0..* | See parameter | Parameter defined by the test | |
![]() ![]() ![]() ![]() |
0..* | See input | Resources used when executing this test (per runner definition) | |
![]() ![]() ![]() ![]() |
0..* | See input | Resources expected as output from this test (per runner definition, often Matchetypes) | |
![]() ![]() ![]() ![]() |
C | 0..* | Base | Assertions that can be executed against the output of the tests Constraints: tp-2 |
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Which output the assertion is tested on (by name, if there is more than one) | |
![]() ![]() ![]() ![]() ![]() |
0..1 | code | fatal | error | warning | information | success; fatal+error = fail Binding: IssueSeverity (required): The severity of the assertion | |
![]() ![]() ![]() ![]() ![]() |
0..1 | Expression | Technical Expression of the assertion | |
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Human readable description of the assertion | |
![]() ![]() ![]() ![]() ![]() |
0..1 | code | A mode that must be true for this assertion to apply | |
![]() ![]() ![]() |
0..* | See suite | A nested suite of tests | |
![]() ![]() ![]() |
0..* | Reference(Test Cases) | A nested set of test plans | |
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| TestCases.versionAlgorithm[x] | Base | extensible | Version Algorithm | 📦5.0.0 | FHIR Std. |
| TestCases.status | Base | required | PublicationStatus | 📦5.0.0 | FHIR Std. |
| TestCases.jurisdiction | Base | extensible | Jurisdiction ValueSet | 📦5.0.0 | FHIR Std. |
| TestCases.suite.test.assertion.severity | Base | required | Issue Severity | 📍5.0.0 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| cnl-0 | warning | TestCases | Name should be usable as an identifier for the module by machine processing applications such as code generation |
name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
|
| cnl-1 | warning | TestCases.url | URL should not contain | or # - these characters make processing canonical references problematic |
exists() implies matches('^[^|# ]+$')
|
| tp-1 | error | TestCases.suite.input | Either a file, or a resource, but not both |
file.exists() xor resource.exists()
|
| tp-2 | error | TestCases.suite.test.assertion | At least an expression or a human readable rule must exist |
expression.exists() or human.exists()
|
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
C | 0..* | CanonicalResource | Tests to be executed by a Test Runner that knows the tests Elements defined in Ancestors:id, meta, implicitRules, language, text, contained, extension, modifierExtension, url, identifier, version, versionAlgorithm[x], name, title, status, experimental, date, publisher, contact, description, useContext, jurisdiction, purpose, copyright, copyrightLabel | ||||
![]() ![]() |
Σ | 0..1 | id | Logical id of this artifact | ||||
![]() ![]() |
Σ | 0..1 | Meta | Metadata about the resource | ||||
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
![]() ![]() |
0..1 | code | Language of the resource content Binding: AllLanguages (required): IETF language tag for a human language
| |||||
![]() ![]() |
0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources | |||||
![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored | ||||
![]() ![]() |
ΣC | 0..1 | uri | Canonical identifier for this test plan, represented as a URI (globally unique) | ||||
![]() ![]() |
Σ | 0..* | Identifier | Business identifier for the test plan | ||||
![]() ![]() |
Σ | 0..1 | string | Business version of the test plan | ||||
![]() ![]() |
Σ | 0..1 | How to compare versions Binding: VersionAlgorithm (extensible) | |||||
![]() ![]() ![]() |
string | |||||||
![]() ![]() ![]() |
Coding | |||||||
![]() ![]() |
ΣC | 0..1 | string | Name for this test plan (computer friendly) | ||||
![]() ![]() |
Σ | 0..1 | string | Name for this test plan (human friendly) | ||||
![]() ![]() |
?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. | ||||
![]() ![]() |
Σ | 0..1 | boolean | For testing only - never for real usage | ||||
![]() ![]() |
Σ | 0..1 | dateTime | Date last changed | ||||
![]() ![]() |
Σ | 0..1 | string | Name of the publisher/steward (organization or individual) | ||||
![]() ![]() |
Σ | 0..* | ContactDetail | Contact details for the publisher | ||||
![]() ![]() |
0..1 | markdown | Natural language description of the test plan | |||||
![]() ![]() |
Σ | 0..* | UsageContext | The context that the content is intended to support | ||||
![]() ![]() |
Σ | 0..* | CodeableConcept | Intended jurisdiction where the test plan applies (if applicable) Binding: JurisdictionValueSet (extensible): Countries and regions within which this artifact is targeted for use. | ||||
![]() ![]() |
0..1 | markdown | Why this test plan is defined | |||||
![]() ![]() |
0..1 | markdown | Use and/or publishing restrictions | |||||
![]() ![]() |
0..1 | string | Copyright holder and year(s) | |||||
![]() ![]() |
0..* | Base | The scope - what these test cases are testing | |||||
![]() ![]() ![]() |
0..1 | canonical(ActorDefinition | ImplementationGuide | StructureDefinition | CapabilityStatement | Requirements) | A reference to what is being tested | |||||
![]() ![]() ![]() |
0..1 | string | Description of what the scope is exists / what is being tested | |||||
![]() ![]() |
0..* | Base | Test cases that must be passed before these test cases are meaningful to execute | |||||
![]() ![]() ![]() |
1..1 | canonical(Test Cases) | The Test Cases | |||||
![]() ![]() ![]() |
0..1 | string | Description of what the dependency exists / why it was defined | |||||
![]() ![]() |
Σ | 1..1 | url | URL Documentation for a runner that executes these tests | ||||
![]() ![]() |
0..* | Base | A mode that can be passed to runner - affects test content | |||||
![]() ![]() ![]() |
1..1 | string | The code that identifies the mode | |||||
![]() ![]() ![]() |
0..1 | string | Description of what this mode exists / why it was defined | |||||
![]() ![]() |
0..* | Base | Parameter defined for all tests | |||||
![]() ![]() ![]() |
1..1 | string | Name per Runner Definition | |||||
![]() ![]() ![]() |
1..1 | Value of this parameter | ||||||
![]() ![]() ![]() ![]() |
string | |||||||
![]() ![]() ![]() ![]() |
boolean | |||||||
![]() ![]() ![]() ![]() |
integer | |||||||
![]() ![]() ![]() ![]() |
decimal | |||||||
![]() ![]() ![]() ![]() |
dateTime | |||||||
![]() ![]() ![]() ![]() |
uri | |||||||
![]() ![]() ![]() ![]() |
Coding | |||||||
![]() ![]() ![]() ![]() |
Quantity | |||||||
![]() ![]() ![]() ![]() |
Expression | |||||||
![]() ![]() ![]() |
0..1 | code | A mode that must be true for this parameter to be used | |||||
![]() ![]() |
0..* | Base | A suite of tests that share a common set up | |||||
![]() ![]() ![]() |
1..1 | string | The name of this suite - unique in the TestCases resource | |||||
![]() ![]() ![]() |
0..1 | string | Description of what this suite does / why it was defined | |||||
![]() ![]() ![]() |
0..1 | code | Mode required to run this suite | |||||
![]() ![]() ![]() |
C | 0..* | Base | Resources used in the tests in this suite Constraints: tp-1 | ||||
![]() ![]() ![]() ![]() |
0..1 | string | A name for this resource (per runner definition) | |||||
![]() ![]() ![]() ![]() |
0..1 | string | A file containing a resource used in the tests | |||||
![]() ![]() ![]() ![]() |
0..1 | Resource | An inline resource used in the tests | |||||
![]() ![]() ![]() ![]() |
0..1 | code | A mode that must be true for this resource to be used | |||||
![]() ![]() ![]() |
0..* | See parameter | Parameter defined by the suite | |||||
![]() ![]() ![]() |
0..* | Base | A test in the test suite | |||||
![]() ![]() ![]() ![]() |
1..1 | string | The name of this test - unique in the suite | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Description of what this test does / why it was defined | |||||
![]() ![]() ![]() ![]() |
0..1 | code | Operation that is executed during this test (per definition of runner) | |||||
![]() ![]() ![]() ![]() |
0..1 | code | Mode required to run this test | |||||
![]() ![]() ![]() ![]() |
0..* | See parameter | Parameter defined by the test | |||||
![]() ![]() ![]() ![]() |
0..* | See input | Resources used when executing this test (per runner definition) | |||||
![]() ![]() ![]() ![]() |
0..* | See input | Resources expected as output from this test (per runner definition, often Matchetypes) | |||||
![]() ![]() ![]() ![]() |
C | 0..* | Base | Assertions that can be executed against the output of the tests Constraints: tp-2 | ||||
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Which output the assertion is tested on (by name, if there is more than one) | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | code | fatal | error | warning | information | success; fatal+error = fail Binding: IssueSeverity (required): The severity of the assertion | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | Expression | Technical Expression of the assertion | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Human readable description of the assertion | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | code | A mode that must be true for this assertion to apply | |||||
![]() ![]() ![]() |
0..* | See suite | A nested suite of tests | |||||
![]() ![]() ![]() |
0..* | Reference(Test Cases) | A nested set of test plans | |||||
Documentation for this format | ||||||||
| Path | Status | Usage | ValueSet | Version | Source |
| TestCases.language | Base | required | All Languages | 📍5.0.0 | FHIR Std. |
| TestCases.versionAlgorithm[x] | Base | extensible | Version Algorithm | 📦5.0.0 | FHIR Std. |
| TestCases.status | Base | required | PublicationStatus | 📦5.0.0 | FHIR Std. |
| TestCases.jurisdiction | Base | extensible | Jurisdiction ValueSet | 📦5.0.0 | FHIR Std. |
| TestCases.suite.test.assertion.severity | Base | required | Issue Severity | 📍5.0.0 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| cnl-0 | warning | TestCases | Name should be usable as an identifier for the module by machine processing applications such as code generation |
name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
|
| cnl-1 | warning | TestCases.url | URL should not contain | or # - these characters make processing canonical references problematic |
exists() implies matches('^[^|# ]+$')
|
| dom-2 | error | TestCases | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | TestCases | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource |
contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
|
| dom-4 | error | TestCases | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated |
contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
|
| dom-5 | error | TestCases | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | TestCases | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| tp-1 | error | TestCases.suite.input | Either a file, or a resource, but not both |
file.exists() xor resource.exists()
|
| tp-2 | error | TestCases.suite.test.assertion | At least an expression or a human readable rule must exist |
expression.exists() or human.exists()
|
This structure is derived from CanonicalResource
Summary
Mandatory: 1 element(7 nested mandatory elements)
Structures
This structure refers to these other structures:
Maturity: 1
Key Elements View
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
C | 0..* | CanonicalResource | Tests to be executed by a Test Runner that knows the tests Elements defined in Ancestors:id, meta, implicitRules, language, text, contained, extension, modifierExtension, url, identifier, version, versionAlgorithm[x], name, title, status, experimental, date, publisher, contact, description, useContext, jurisdiction, purpose, copyright, copyrightLabel | ||||
![]() ![]() |
Σ | 0..1 | id | Logical id of this artifact | ||||
![]() ![]() |
Σ | 0..1 | Meta | Metadata about the resource | ||||
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
![]() ![]() |
0..1 | code | Language of the resource content Binding: AllLanguages (required): IETF language tag for a human language
| |||||
![]() ![]() |
0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources | |||||
![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored | ||||
![]() ![]() |
ΣC | 0..1 | uri | Canonical identifier for this test plan, represented as a URI (globally unique) | ||||
![]() ![]() |
Σ | 0..* | Identifier | Business identifier for the test plan | ||||
![]() ![]() |
Σ | 0..1 | string | Business version of the test plan | ||||
![]() ![]() |
Σ | 0..1 | How to compare versions Binding: VersionAlgorithm (extensible) | |||||
![]() ![]() ![]() |
string | |||||||
![]() ![]() ![]() |
Coding | |||||||
![]() ![]() |
ΣC | 0..1 | string | Name for this test plan (computer friendly) | ||||
![]() ![]() |
Σ | 0..1 | string | Name for this test plan (human friendly) | ||||
![]() ![]() |
?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. | ||||
![]() ![]() |
Σ | 0..1 | boolean | For testing only - never for real usage | ||||
![]() ![]() |
Σ | 0..1 | dateTime | Date last changed | ||||
![]() ![]() |
Σ | 0..1 | string | Name of the publisher/steward (organization or individual) | ||||
![]() ![]() |
Σ | 0..* | ContactDetail | Contact details for the publisher | ||||
![]() ![]() |
0..1 | markdown | Natural language description of the test plan | |||||
![]() ![]() |
Σ | 0..* | UsageContext | The context that the content is intended to support | ||||
![]() ![]() |
Σ | 0..* | CodeableConcept | Intended jurisdiction where the test plan applies (if applicable) Binding: JurisdictionValueSet (extensible): Countries and regions within which this artifact is targeted for use. | ||||
![]() ![]() |
0..1 | markdown | Why this test plan is defined | |||||
![]() ![]() |
0..1 | markdown | Use and/or publishing restrictions | |||||
![]() ![]() |
0..1 | string | Copyright holder and year(s) | |||||
![]() ![]() |
0..* | Base | The scope - what these test cases are testing | |||||
![]() ![]() ![]() |
0..1 | canonical(ActorDefinition | ImplementationGuide | StructureDefinition | CapabilityStatement | Requirements) | A reference to what is being tested | |||||
![]() ![]() ![]() |
0..1 | string | Description of what the scope is exists / what is being tested | |||||
![]() ![]() |
0..* | Base | Test cases that must be passed before these test cases are meaningful to execute | |||||
![]() ![]() ![]() |
1..1 | canonical(Test Cases) | The Test Cases | |||||
![]() ![]() ![]() |
0..1 | string | Description of what the dependency exists / why it was defined | |||||
![]() ![]() |
Σ | 1..1 | url | URL Documentation for a runner that executes these tests | ||||
![]() ![]() |
0..* | Base | A mode that can be passed to runner - affects test content | |||||
![]() ![]() ![]() |
1..1 | string | The code that identifies the mode | |||||
![]() ![]() ![]() |
0..1 | string | Description of what this mode exists / why it was defined | |||||
![]() ![]() |
0..* | Base | Parameter defined for all tests | |||||
![]() ![]() ![]() |
1..1 | string | Name per Runner Definition | |||||
![]() ![]() ![]() |
1..1 | Value of this parameter | ||||||
![]() ![]() ![]() ![]() |
string | |||||||
![]() ![]() ![]() ![]() |
boolean | |||||||
![]() ![]() ![]() ![]() |
integer | |||||||
![]() ![]() ![]() ![]() |
decimal | |||||||
![]() ![]() ![]() ![]() |
dateTime | |||||||
![]() ![]() ![]() ![]() |
uri | |||||||
![]() ![]() ![]() ![]() |
Coding | |||||||
![]() ![]() ![]() ![]() |
Quantity | |||||||
![]() ![]() ![]() ![]() |
Expression | |||||||
![]() ![]() ![]() |
0..1 | code | A mode that must be true for this parameter to be used | |||||
![]() ![]() |
0..* | Base | A suite of tests that share a common set up | |||||
![]() ![]() ![]() |
1..1 | string | The name of this suite - unique in the TestCases resource | |||||
![]() ![]() ![]() |
0..1 | string | Description of what this suite does / why it was defined | |||||
![]() ![]() ![]() |
0..1 | code | Mode required to run this suite | |||||
![]() ![]() ![]() |
C | 0..* | Base | Resources used in the tests in this suite Constraints: tp-1 | ||||
![]() ![]() ![]() ![]() |
0..1 | string | A name for this resource (per runner definition) | |||||
![]() ![]() ![]() ![]() |
0..1 | string | A file containing a resource used in the tests | |||||
![]() ![]() ![]() ![]() |
0..1 | Resource | An inline resource used in the tests | |||||
![]() ![]() ![]() ![]() |
0..1 | code | A mode that must be true for this resource to be used | |||||
![]() ![]() ![]() |
0..* | See parameter | Parameter defined by the suite | |||||
![]() ![]() ![]() |
0..* | Base | A test in the test suite | |||||
![]() ![]() ![]() ![]() |
1..1 | string | The name of this test - unique in the suite | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Description of what this test does / why it was defined | |||||
![]() ![]() ![]() ![]() |
0..1 | code | Operation that is executed during this test (per definition of runner) | |||||
![]() ![]() ![]() ![]() |
0..1 | code | Mode required to run this test | |||||
![]() ![]() ![]() ![]() |
0..* | See parameter | Parameter defined by the test | |||||
![]() ![]() ![]() ![]() |
0..* | See input | Resources used when executing this test (per runner definition) | |||||
![]() ![]() ![]() ![]() |
0..* | See input | Resources expected as output from this test (per runner definition, often Matchetypes) | |||||
![]() ![]() ![]() ![]() |
C | 0..* | Base | Assertions that can be executed against the output of the tests Constraints: tp-2 | ||||
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Which output the assertion is tested on (by name, if there is more than one) | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | code | fatal | error | warning | information | success; fatal+error = fail Binding: IssueSeverity (required): The severity of the assertion | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | Expression | Technical Expression of the assertion | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Human readable description of the assertion | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | code | A mode that must be true for this assertion to apply | |||||
![]() ![]() ![]() |
0..* | See suite | A nested suite of tests | |||||
![]() ![]() ![]() |
0..* | Reference(Test Cases) | A nested set of test plans | |||||
Documentation for this format | ||||||||
| Path | Status | Usage | ValueSet | Version | Source |
| TestCases.language | Base | required | All Languages | 📍5.0.0 | FHIR Std. |
| TestCases.versionAlgorithm[x] | Base | extensible | Version Algorithm | 📦5.0.0 | FHIR Std. |
| TestCases.status | Base | required | PublicationStatus | 📦5.0.0 | FHIR Std. |
| TestCases.jurisdiction | Base | extensible | Jurisdiction ValueSet | 📦5.0.0 | FHIR Std. |
| TestCases.suite.test.assertion.severity | Base | required | Issue Severity | 📍5.0.0 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| cnl-0 | warning | TestCases | Name should be usable as an identifier for the module by machine processing applications such as code generation |
name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
|
| cnl-1 | warning | TestCases.url | URL should not contain | or # - these characters make processing canonical references problematic |
exists() implies matches('^[^|# ]+$')
|
| dom-2 | error | TestCases | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | TestCases | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource |
contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
|
| dom-4 | error | TestCases | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated |
contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
|
| dom-5 | error | TestCases | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | TestCases | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| tp-1 | error | TestCases.suite.input | Either a file, or a resource, but not both |
file.exists() xor resource.exists()
|
| tp-2 | error | TestCases.suite.test.assertion | At least an expression or a human readable rule must exist |
expression.exists() or human.exists()
|
Differential View
This structure is derived from CanonicalResource
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | CanonicalResource | Tests to be executed by a Test Runner that knows the tests Elements defined in Ancestors:id, meta, implicitRules, language, text, contained, extension, modifierExtension, url, identifier, version, versionAlgorithm[x], name, title, status, experimental, date, publisher, contact, description, useContext, jurisdiction, purpose, copyright, copyrightLabel Constraints: cnl-0 |
![]() ![]() |
ΣC | 0..1 | uri | Canonical identifier for this test plan, represented as a URI (globally unique) |
![]() ![]() |
Σ | 0..* | Identifier | Business identifier for the test plan |
![]() ![]() |
Σ | 0..1 | string | Business version of the test plan |
![]() ![]() |
Σ | 0..1 | How to compare versions Binding: VersionAlgorithm (extensible) | |
![]() ![]() ![]() |
string | |||
![]() ![]() ![]() |
Coding | |||
![]() ![]() |
ΣC | 0..1 | string | Name for this test plan (computer friendly) |
![]() ![]() |
0..1 | string | Name for this test plan (human friendly) | |
![]() ![]() |
?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. |
![]() ![]() |
Σ | 0..1 | boolean | For testing only - never for real usage |
![]() ![]() |
Σ | 0..1 | dateTime | Date last changed |
![]() ![]() |
Σ | 0..1 | string | Name of the publisher/steward (organization or individual) |
![]() ![]() |
Σ | 0..* | ContactDetail | Contact details for the publisher |
![]() ![]() |
0..1 | markdown | Natural language description of the test plan | |
![]() ![]() |
Σ | 0..* | UsageContext | The context that the content is intended to support |
![]() ![]() |
Σ | 0..* | CodeableConcept | Intended jurisdiction where the test plan applies (if applicable) Binding: JurisdictionValueSet (extensible): Countries and regions within which this artifact is targeted for use. |
![]() ![]() |
0..1 | markdown | Why this test plan is defined | |
![]() ![]() |
0..1 | markdown | Use and/or publishing restrictions | |
![]() ![]() |
0..1 | string | Copyright holder and year(s) | |
![]() ![]() |
0..* | Base | The scope - what these test cases are testing | |
![]() ![]() ![]() |
0..1 | canonical(ActorDefinition | ImplementationGuide | StructureDefinition | CapabilityStatement | Requirements) | A reference to what is being tested | |
![]() ![]() ![]() |
0..1 | string | Description of what the scope is exists / what is being tested | |
![]() ![]() |
0..* | Base | Test cases that must be passed before these test cases are meaningful to execute | |
![]() ![]() ![]() |
1..1 | canonical(Test Cases) | The Test Cases | |
![]() ![]() ![]() |
0..1 | string | Description of what the dependency exists / why it was defined | |
![]() ![]() |
Σ | 1..1 | url | URL Documentation for a runner that executes these tests |
![]() ![]() |
0..* | Base | A mode that can be passed to runner - affects test content | |
![]() ![]() ![]() |
1..1 | string | The code that identifies the mode | |
![]() ![]() ![]() |
0..1 | string | Description of what this mode exists / why it was defined | |
![]() ![]() |
0..* | Base | Parameter defined for all tests | |
![]() ![]() ![]() |
1..1 | string | Name per Runner Definition | |
![]() ![]() ![]() |
1..1 | Value of this parameter | ||
![]() ![]() ![]() ![]() |
string | |||
![]() ![]() ![]() ![]() |
boolean | |||
![]() ![]() ![]() ![]() |
integer | |||
![]() ![]() ![]() ![]() |
decimal | |||
![]() ![]() ![]() ![]() |
dateTime | |||
![]() ![]() ![]() ![]() |
uri | |||
![]() ![]() ![]() ![]() |
Coding | |||
![]() ![]() ![]() ![]() |
Quantity | |||
![]() ![]() ![]() ![]() |
Expression | |||
![]() ![]() ![]() |
0..1 | code | A mode that must be true for this parameter to be used | |
![]() ![]() |
0..* | Base | A suite of tests that share a common set up | |
![]() ![]() ![]() |
1..1 | string | The name of this suite - unique in the TestCases resource | |
![]() ![]() ![]() |
0..1 | string | Description of what this suite does / why it was defined | |
![]() ![]() ![]() |
0..1 | code | Mode required to run this suite | |
![]() ![]() ![]() |
C | 0..* | Base | Resources used in the tests in this suite Constraints: tp-1 |
![]() ![]() ![]() ![]() |
0..1 | string | A name for this resource (per runner definition) | |
![]() ![]() ![]() ![]() |
0..1 | string | A file containing a resource used in the tests | |
![]() ![]() ![]() ![]() |
0..1 | Resource | An inline resource used in the tests | |
![]() ![]() ![]() ![]() |
0..1 | code | A mode that must be true for this resource to be used | |
![]() ![]() ![]() |
0..* | See parameter | Parameter defined by the suite | |
![]() ![]() ![]() |
0..* | Base | A test in the test suite | |
![]() ![]() ![]() ![]() |
1..1 | string | The name of this test - unique in the suite | |
![]() ![]() ![]() ![]() |
0..1 | string | Description of what this test does / why it was defined | |
![]() ![]() ![]() ![]() |
0..1 | code | Operation that is executed during this test (per definition of runner) | |
![]() ![]() ![]() ![]() |
0..1 | code | Mode required to run this test | |
![]() ![]() ![]() ![]() |
0..* | See parameter | Parameter defined by the test | |
![]() ![]() ![]() ![]() |
0..* | See input | Resources used when executing this test (per runner definition) | |
![]() ![]() ![]() ![]() |
0..* | See input | Resources expected as output from this test (per runner definition, often Matchetypes) | |
![]() ![]() ![]() ![]() |
C | 0..* | Base | Assertions that can be executed against the output of the tests Constraints: tp-2 |
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Which output the assertion is tested on (by name, if there is more than one) | |
![]() ![]() ![]() ![]() ![]() |
0..1 | code | fatal | error | warning | information | success; fatal+error = fail Binding: IssueSeverity (required): The severity of the assertion | |
![]() ![]() ![]() ![]() ![]() |
0..1 | Expression | Technical Expression of the assertion | |
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Human readable description of the assertion | |
![]() ![]() ![]() ![]() ![]() |
0..1 | code | A mode that must be true for this assertion to apply | |
![]() ![]() ![]() |
0..* | See suite | A nested suite of tests | |
![]() ![]() ![]() |
0..* | Reference(Test Cases) | A nested set of test plans | |
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| TestCases.versionAlgorithm[x] | Base | extensible | Version Algorithm | 📦5.0.0 | FHIR Std. |
| TestCases.status | Base | required | PublicationStatus | 📦5.0.0 | FHIR Std. |
| TestCases.jurisdiction | Base | extensible | Jurisdiction ValueSet | 📦5.0.0 | FHIR Std. |
| TestCases.suite.test.assertion.severity | Base | required | Issue Severity | 📍5.0.0 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| cnl-0 | warning | TestCases | Name should be usable as an identifier for the module by machine processing applications such as code generation |
name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
|
| cnl-1 | warning | TestCases.url | URL should not contain | or # - these characters make processing canonical references problematic |
exists() implies matches('^[^|# ]+$')
|
| tp-1 | error | TestCases.suite.input | Either a file, or a resource, but not both |
file.exists() xor resource.exists()
|
| tp-2 | error | TestCases.suite.test.assertion | At least an expression or a human readable rule must exist |
expression.exists() or human.exists()
|
Snapshot View
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
C | 0..* | CanonicalResource | Tests to be executed by a Test Runner that knows the tests Elements defined in Ancestors:id, meta, implicitRules, language, text, contained, extension, modifierExtension, url, identifier, version, versionAlgorithm[x], name, title, status, experimental, date, publisher, contact, description, useContext, jurisdiction, purpose, copyright, copyrightLabel | ||||
![]() ![]() |
Σ | 0..1 | id | Logical id of this artifact | ||||
![]() ![]() |
Σ | 0..1 | Meta | Metadata about the resource | ||||
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
![]() ![]() |
0..1 | code | Language of the resource content Binding: AllLanguages (required): IETF language tag for a human language
| |||||
![]() ![]() |
0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources | |||||
![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored | ||||
![]() ![]() |
ΣC | 0..1 | uri | Canonical identifier for this test plan, represented as a URI (globally unique) | ||||
![]() ![]() |
Σ | 0..* | Identifier | Business identifier for the test plan | ||||
![]() ![]() |
Σ | 0..1 | string | Business version of the test plan | ||||
![]() ![]() |
Σ | 0..1 | How to compare versions Binding: VersionAlgorithm (extensible) | |||||
![]() ![]() ![]() |
string | |||||||
![]() ![]() ![]() |
Coding | |||||||
![]() ![]() |
ΣC | 0..1 | string | Name for this test plan (computer friendly) | ||||
![]() ![]() |
Σ | 0..1 | string | Name for this test plan (human friendly) | ||||
![]() ![]() |
?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. | ||||
![]() ![]() |
Σ | 0..1 | boolean | For testing only - never for real usage | ||||
![]() ![]() |
Σ | 0..1 | dateTime | Date last changed | ||||
![]() ![]() |
Σ | 0..1 | string | Name of the publisher/steward (organization or individual) | ||||
![]() ![]() |
Σ | 0..* | ContactDetail | Contact details for the publisher | ||||
![]() ![]() |
0..1 | markdown | Natural language description of the test plan | |||||
![]() ![]() |
Σ | 0..* | UsageContext | The context that the content is intended to support | ||||
![]() ![]() |
Σ | 0..* | CodeableConcept | Intended jurisdiction where the test plan applies (if applicable) Binding: JurisdictionValueSet (extensible): Countries and regions within which this artifact is targeted for use. | ||||
![]() ![]() |
0..1 | markdown | Why this test plan is defined | |||||
![]() ![]() |
0..1 | markdown | Use and/or publishing restrictions | |||||
![]() ![]() |
0..1 | string | Copyright holder and year(s) | |||||
![]() ![]() |
0..* | Base | The scope - what these test cases are testing | |||||
![]() ![]() ![]() |
0..1 | canonical(ActorDefinition | ImplementationGuide | StructureDefinition | CapabilityStatement | Requirements) | A reference to what is being tested | |||||
![]() ![]() ![]() |
0..1 | string | Description of what the scope is exists / what is being tested | |||||
![]() ![]() |
0..* | Base | Test cases that must be passed before these test cases are meaningful to execute | |||||
![]() ![]() ![]() |
1..1 | canonical(Test Cases) | The Test Cases | |||||
![]() ![]() ![]() |
0..1 | string | Description of what the dependency exists / why it was defined | |||||
![]() ![]() |
Σ | 1..1 | url | URL Documentation for a runner that executes these tests | ||||
![]() ![]() |
0..* | Base | A mode that can be passed to runner - affects test content | |||||
![]() ![]() ![]() |
1..1 | string | The code that identifies the mode | |||||
![]() ![]() ![]() |
0..1 | string | Description of what this mode exists / why it was defined | |||||
![]() ![]() |
0..* | Base | Parameter defined for all tests | |||||
![]() ![]() ![]() |
1..1 | string | Name per Runner Definition | |||||
![]() ![]() ![]() |
1..1 | Value of this parameter | ||||||
![]() ![]() ![]() ![]() |
string | |||||||
![]() ![]() ![]() ![]() |
boolean | |||||||
![]() ![]() ![]() ![]() |
integer | |||||||
![]() ![]() ![]() ![]() |
decimal | |||||||
![]() ![]() ![]() ![]() |
dateTime | |||||||
![]() ![]() ![]() ![]() |
uri | |||||||
![]() ![]() ![]() ![]() |
Coding | |||||||
![]() ![]() ![]() ![]() |
Quantity | |||||||
![]() ![]() ![]() ![]() |
Expression | |||||||
![]() ![]() ![]() |
0..1 | code | A mode that must be true for this parameter to be used | |||||
![]() ![]() |
0..* | Base | A suite of tests that share a common set up | |||||
![]() ![]() ![]() |
1..1 | string | The name of this suite - unique in the TestCases resource | |||||
![]() ![]() ![]() |
0..1 | string | Description of what this suite does / why it was defined | |||||
![]() ![]() ![]() |
0..1 | code | Mode required to run this suite | |||||
![]() ![]() ![]() |
C | 0..* | Base | Resources used in the tests in this suite Constraints: tp-1 | ||||
![]() ![]() ![]() ![]() |
0..1 | string | A name for this resource (per runner definition) | |||||
![]() ![]() ![]() ![]() |
0..1 | string | A file containing a resource used in the tests | |||||
![]() ![]() ![]() ![]() |
0..1 | Resource | An inline resource used in the tests | |||||
![]() ![]() ![]() ![]() |
0..1 | code | A mode that must be true for this resource to be used | |||||
![]() ![]() ![]() |
0..* | See parameter | Parameter defined by the suite | |||||
![]() ![]() ![]() |
0..* | Base | A test in the test suite | |||||
![]() ![]() ![]() ![]() |
1..1 | string | The name of this test - unique in the suite | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Description of what this test does / why it was defined | |||||
![]() ![]() ![]() ![]() |
0..1 | code | Operation that is executed during this test (per definition of runner) | |||||
![]() ![]() ![]() ![]() |
0..1 | code | Mode required to run this test | |||||
![]() ![]() ![]() ![]() |
0..* | See parameter | Parameter defined by the test | |||||
![]() ![]() ![]() ![]() |
0..* | See input | Resources used when executing this test (per runner definition) | |||||
![]() ![]() ![]() ![]() |
0..* | See input | Resources expected as output from this test (per runner definition, often Matchetypes) | |||||
![]() ![]() ![]() ![]() |
C | 0..* | Base | Assertions that can be executed against the output of the tests Constraints: tp-2 | ||||
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Which output the assertion is tested on (by name, if there is more than one) | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | code | fatal | error | warning | information | success; fatal+error = fail Binding: IssueSeverity (required): The severity of the assertion | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | Expression | Technical Expression of the assertion | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Human readable description of the assertion | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | code | A mode that must be true for this assertion to apply | |||||
![]() ![]() ![]() |
0..* | See suite | A nested suite of tests | |||||
![]() ![]() ![]() |
0..* | Reference(Test Cases) | A nested set of test plans | |||||
Documentation for this format | ||||||||
| Path | Status | Usage | ValueSet | Version | Source |
| TestCases.language | Base | required | All Languages | 📍5.0.0 | FHIR Std. |
| TestCases.versionAlgorithm[x] | Base | extensible | Version Algorithm | 📦5.0.0 | FHIR Std. |
| TestCases.status | Base | required | PublicationStatus | 📦5.0.0 | FHIR Std. |
| TestCases.jurisdiction | Base | extensible | Jurisdiction ValueSet | 📦5.0.0 | FHIR Std. |
| TestCases.suite.test.assertion.severity | Base | required | Issue Severity | 📍5.0.0 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| cnl-0 | warning | TestCases | Name should be usable as an identifier for the module by machine processing applications such as code generation |
name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
|
| cnl-1 | warning | TestCases.url | URL should not contain | or # - these characters make processing canonical references problematic |
exists() implies matches('^[^|# ]+$')
|
| dom-2 | error | TestCases | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | TestCases | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource |
contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
|
| dom-4 | error | TestCases | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated |
contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
|
| dom-5 | error | TestCases | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | TestCases | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| tp-1 | error | TestCases.suite.input | Either a file, or a resource, but not both |
file.exists() xor resource.exists()
|
| tp-2 | error | TestCases.suite.test.assertion | At least an expression or a human readable rule must exist |
expression.exists() or human.exists()
|
This structure is derived from CanonicalResource
Summary
Mandatory: 1 element(7 nested mandatory elements)
Structures
This structure refers to these other structures:
Maturity: 1