PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.uv.tools.r5@0.9.0
    http://hl7.org/fhir/StructureDefinition/TestCases
description: A plan for executing testing on an artifact or specifications
package_name: hl7.fhir.uv.tools.r5
derivation: specialization
name: TestCases
type: TestCases
elements:
  description: {short: Natural language description of the test plan, type: markdown, index: 14}
  date: {short: Date last changed, type: dateTime, isSummary: true, index: 11}
  dependency:
    type: Base
    short: Test cases that must be passed before these test cases are meaningful to execute
    array: true
    index: 23
    elements:
      reference: {type: canonical, short: The Test Cases, index: 24}
      description: {type: string, short: Description of what the dependency exists / why it was defined, index: 25}
    required: [reference]
  publisher: {short: Name of the publisher/steward (organization or individual), type: string, isSummary: true, index: 12}
  jurisdiction:
    short: Intended jurisdiction where the test plan applies (if applicable)
    type: CodeableConcept
    array: true
    binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/ValueSet/jurisdiction'}
    isSummary: true
    index: 16
  purpose: {short: Why this test plan is defined, type: markdown, index: 17}
  name: {short: Name for this test plan (computer friendly), type: string, isSummary: true, index: 7}
  mode:
    type: Base
    short: A mode that can be passed to runner - affects test content
    array: true
    index: 27
    elements:
      code: {short: The code that identifies the mode, type: string, index: 28}
      description: {type: string, short: Description of what this mode exists / why it was defined, index: 29}
    required: [code]
  copyrightLabel: {short: Copyright holder and year(s), type: string, index: 19}
  useContext: {short: The context that the content is intended to support, type: UsageContext, array: true, isSummary: true, index: 15}
  copyright: {short: Use and/or publishing restrictions, type: markdown, index: 18}
  versionAlgorithm:
    short: How to compare versions
    choices: [versionAlgorithmString, versionAlgorithmCoding]
    isSummary: true
    index: 4
  experimental: {short: For testing only - never for real usage, type: boolean, meaningWhenMissing: 'If absent, this resource is treated as though it is not experimental.', isSummary: true, index: 10}
  scope:
    type: Base
    short: The scope - what these test cases are testing
    array: true
    index: 20
    elements:
      reference: {type: canonical, short: A reference to what is being tested, index: 21}
      description: {type: string, short: Description of what the scope is exists / what is being tested, index: 22}
  title: {short: Name for this test plan (human friendly), type: string, index: 8}
  versionAlgorithmCoding: {short: How to compare versions, type: Coding, choiceOf: versionAlgorithm, isSummary: true, index: 6}
  status:
    isModifier: true
    short: draft | active | retired | unknown
    type: code
    binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/publication-status'}
    isModifierReason: This is labeled as "Is Modifier" because applications should not use a retired {{title}} without due consideration
    isSummary: true
    index: 9
  url:
    constraint:
      cnl-1: {human: 'URL should not contain | or # - these characters make processing canonical references problematic', source: 'http://hl7.org/fhir/StructureDefinition/CanonicalResource', severity: warning, expression: 'exists() implies matches(''^[^|# ]+$'')'}
    short: Canonical identifier for this test plan, represented as a URI (globally unique)
    type: uri
    isSummary: true
    index: 0
  identifier: {short: Business identifier for the test plan, type: Identifier, array: true, isSummary: true, index: 1}
  suite:
    type: Base
    short: A suite of tests that share a common set up
    array: true
    index: 44
    elements:
      name: {type: string, short: The name of this suite - unique in the TestCases resource, index: 45}
      description: {type: string, short: Description of what this suite does / why it was defined, index: 46}
      mode: {short: Mode required to run this suite, type: code, meaningWhenMissing: 'If no modes are listed, the suite is always executed', index: 47}
      input:
        type: Base
        short: Resources used in the tests in this suite
        constraint:
          tp-1: {human: 'Either a file, or a resource, but not both', severity: error, expression: file.exists() xor resource.exists()}
        array: true
        index: 48
        elements:
          name: {type: string, short: A name for this resource (per runner definition), index: 49}
          file: {type: string, short: A file containing a resource used in the tests, index: 50}
          resource: {type: Resource, short: An inline resource used in the tests, index: 51}
          mode: {short: A mode that must be true for this resource to be used, type: code, meaningWhenMissing: 'If no modes are listed, the resource is always used, unless there is another entry with the same name that is selected by mode', index: 52}
      parameter:
        short: Parameter defined by the suite
        elementReference: ['http://hl7.org/fhir/StructureDefinition/TestCases', elements, org/fhir/StructureDefinition/TestCases#TestCases, elements, parameter]
        array: true
        index: 53
      test:
        type: Base
        short: A test in the test suite
        array: true
        index: 54
        elements:
          name: {type: string, short: The name of this test - unique in the suite, index: 55}
          description: {type: string, short: Description of what this test does / why it was defined, index: 56}
          operation: {type: code, short: Operation that is executed during this test (per definition of runner), index: 57}
          mode: {short: Mode required to run this test, type: code, meaningWhenMissing: 'If no modes are listed, the test is always executed', index: 58}
          parameter:
            short: Parameter defined by the test
            elementReference: ['http://hl7.org/fhir/StructureDefinition/TestCases', elements, org/fhir/StructureDefinition/TestCases#TestCases, elements, parameter]
            array: true
            index: 59
          input:
            short: Resources used when executing this test (per runner definition)
            elementReference: ['http://hl7.org/fhir/StructureDefinition/TestCases', elements, org/fhir/StructureDefinition/TestCases#TestCases, elements, suite, elements, input]
            array: true
            index: 60
          expected:
            short: Resources expected as output from this test (per runner definition, often Matchetypes)
            elementReference: ['http://hl7.org/fhir/StructureDefinition/TestCases', elements, org/fhir/StructureDefinition/TestCases#TestCases, elements, suite, elements, input]
            array: true
            index: 61
          assertion:
            type: Base
            short: Assertions that can be executed against the output of the tests
            constraint:
              tp-2: {human: At least an expression or a human readable rule must exist, severity: error, expression: expression.exists() or human.exists()}
            array: true
            index: 62
            elements:
              focus: {type: string, short: 'Which output the assertion is tested on (by name, if there is more than one)', index: 63}
              severity:
                type: code
                short: fatal | error | warning | information | success; fatal+error = fail
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/issue-severity|5.0.0'}
                index: 64
              expression: {type: Expression, short: Technical Expression of the assertion, index: 65}
              human: {type: string, short: Human readable description of the assertion, index: 66}
              mode: {short: A mode that must be true for this assertion to apply, type: code, meaningWhenMissing: 'If no modes are listed, the assertion is always used, unless there is another assertion with the same name that is selected by mode', index: 67}
        required: [name]
      suite:
        short: A nested suite of tests
        elementReference: ['http://hl7.org/fhir/StructureDefinition/TestCases', elements, org/fhir/StructureDefinition/TestCases#TestCases, elements, suite]
        array: true
        index: 68
      plan:
        short: A nested set of test plans
        refers: ['http://hl7.org/fhir/StructureDefinition/TestCases']
        type: Reference
        array: true
        index: 69
    required: [name]
  runner: {type: url, short: URL Documentation for a runner that executes these tests, isSummary: true, index: 26}
  versionAlgorithmString: {short: How to compare versions, type: string, choiceOf: versionAlgorithm, isSummary: true, index: 5}
  version: {short: Business version of the test plan, type: string, isSummary: true, index: 2}
  contact: {short: Contact details for the publisher, type: ContactDetail, array: true, isSummary: true, index: 13}
  parameter:
    type: Base
    short: Parameter defined for all tests
    array: true
    index: 30
    elements:
      valueUri: {type: uri, short: Value of this parameter, choiceOf: value, index: 39}
      valueDecimal: {type: decimal, short: Value of this parameter, choiceOf: value, index: 37}
      name: {type: string, short: Name per Runner Definition, index: 31}
      valueQuantity: {type: Quantity, short: Value of this parameter, choiceOf: value, index: 41}
      value:
        short: Value of this parameter
        choices: [valueString, valueBoolean, valueInteger, valueDecimal, valueDateTime, valueUri, valueCoding, valueQuantity, valueExpression]
        index: 33
      valueString: {type: string, short: Value of this parameter, choiceOf: value, index: 34}
      mode: {short: A mode that must be true for this parameter to be used, type: code, meaningWhenMissing: 'If no modes are listed, the parameter is always used, unless there is a parameter with the same name that is selected by mode', index: 43}
      valueBoolean: {type: boolean, short: Value of this parameter, choiceOf: value, index: 35}
      valueDateTime: {type: dateTime, short: Value of this parameter, choiceOf: value, index: 38}
      valueCoding: {type: Coding, short: Value of this parameter, choiceOf: value, index: 40}
      valueExpression: {type: Expression, short: Value of this parameter, choiceOf: value, index: 42}
      valueInteger: {type: integer, short: Value of this parameter, choiceOf: value, index: 36}
    required: [valueCoding, valueUri, valueString, valueDecimal, valueExpression, valueDateTime, name, value, valueBoolean, valueQuantity, valueInteger]
package_version: 0.9.0
class: logical
kind: logical
url: http://hl7.org/fhir/StructureDefinition/TestCases
base: http://hl7.org/fhir/StructureDefinition/CanonicalResource
version: 0.9.0
required: [runner, status]