PackagesCanonicalsLogsProblems
    Packages
    rs/hl7.fhir.uv.tools@0.5.0
    http://hl7.org/fhir/tools/StructureDefinition/TestCases
description: A standard format for test cases used throughout the FHIR ecosystem
package_name: rs/hl7.fhir.uv.tools
derivation: specialization
name: TestCases
type: http://hl7.org/fhir/tools/StructureDefinition/TestCases
elements:
  url:
    constraint:
      cnl-1: {human: 'URL should not contain | or # - these characters make processing canonical references problematic', severity: warning, expression: 'exists() implies matches(''^[^|# ]+$'')'}
    isModifier: false
    short: Canonical identifier for these tests, represented as a URI (globally unique)
    type: uri
    isSummary: true
    index: 0
  version: {isModifier: false, short: Business version of the test set (semver), type: string, isSummary: true, index: 1}
  name: {isModifier: false, short: Name for these tests, type: string, isSummary: true, index: 2}
  description: {isModifier: false, short: General Description of these tests, type: markdown, isSummary: true, index: 3}
  runner: {type: url, short: URL Documentation for a runner that executes these tests, index: 4}
  mode:
    type: Base
    short: A mode that can be passed to runner - affects test content
    array: true
    index: 5
    elements:
      code: {type: string, short: The code that identifies the mode, index: 6}
      description: {type: string, short: Description of what this mode exists / why it was defined, index: 7}
    required: [code]
  suite:
    type: Base
    short: A suite of tests that share a common set up
    array: true
    index: 8
    elements:
      name: {type: string, short: The name of this suite - unique in the TestCases resource, index: 9}
      description: {type: string, short: Description of what this suite does / why it was defined, index: 10}
      mode: {type: code, short: mode required to run this suite, meaningWhenMissing: 'If no modes are listed, the suite is always executed', index: 11}
      resource:
        type: Base
        short: Resources used in the tests in this suite
        constraint:
          ts-2: {human: 'Either a file, or a resource, but not both', severity: error, expression: file xor resource}
        array: true
        index: 12
        elements:
          name: {type: string, short: A name for this resource (per runner definition), index: 13}
          file: {type: string, short: A file containing a resource used in the tests, index: 14}
          resource: {type: Resource, short: An inline resource used in the tests, index: 15}
          mode: {type: code, short: A mode that must be true for this resource to be used, 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: 16}
      parameter:
        type: Base
        short: Parameter passed to the runner
        array: true
        index: 17
        elements:
          valueUri: {type: uri, short: Value of this parameter, choiceOf: value, index: 26}
          valueDecimal: {type: decimal, short: Value of this parameter, choiceOf: value, index: 24}
          name: {type: string, short: Name of parameter, index: 18}
          valueQuantity: {type: Quantity, short: Value of this parameter, choiceOf: value, index: 28}
          value:
            short: Value of this parameter
            choices: [valueString, valueBoolean, valueInteger, valueDecimal, valueDateTime, valueUri, valueCoding, valueQuantity]
            index: 20
          valueString: {type: string, short: Value of this parameter, choiceOf: value, index: 21}
          mode: {type: code, short: A mode that must be true for this parameter to be used, 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: 29}
          valueBoolean: {type: boolean, short: Value of this parameter, choiceOf: value, index: 22}
          valueDateTime: {type: dateTime, short: Value of this parameter, choiceOf: value, index: 25}
          valueCoding: {type: Coding, short: Value of this parameter, choiceOf: value, index: 27}
          valueInteger: {type: integer, short: Value of this parameter, choiceOf: value, index: 23}
        required: [name, value, valueBoolean, valueCoding, valueDateTime, valueDecimal, valueInteger, valueQuantity, valueString, valueUri]
      test:
        type: Base
        short: A test in the test suite
        array: true
        index: 30
        elements:
          name: {type: string, short: The name of this test - unique in the suite, index: 31}
          description: {type: string, short: Description of what this test does / why it was defined, index: 32}
          operation: {type: code, short: Operation that is executed during this test (per definition of runner), index: 33}
          mode: {type: string, short: mode required to run this test, meaningWhenMissing: 'If no modes are listed, the test is always executed', index: 34}
          parameter:
            elementReference: ['http://hl7.org/fhir/tools/StructureDefinition/TestCases', elements, org/fhir/tools/StructureDefinition/TestCases#TestCases, elements, suite, elements, parameter]
            array: true
            index: 35
          input:
            short: Resources used when executing this test (per runner definition)
            elementReference: ['http://hl7.org/fhir/tools/StructureDefinition/TestCases', elements, org/fhir/tools/StructureDefinition/TestCases#TestCases, elements, suite, elements, resource]
            array: true
            index: 36
          output:
            short: Resources expected as output from this test (per runner definition, often Matchetypes)
            elementReference: ['http://hl7.org/fhir/tools/StructureDefinition/TestCases', elements, org/fhir/tools/StructureDefinition/TestCases#TestCases, elements, suite, elements, resource]
            array: true
            index: 37
        required: [name]
    required: [name]
package_version: 0.5.0
class: logical
kind: logical
url: http://hl7.org/fhir/tools/StructureDefinition/TestCases
base: http://hl7.org/fhir/StructureDefinition/Resource
version: 0.5.0
required: [runner]