description: A standard format for test cases used throughout the FHIR ecosystem package_name: hl7.fhir.uv.tools.r5 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} setup: 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', index: 16} test: type: Base short: A test in the test suite array: true index: 17 elements: name: {type: string, short: The name of this test - unique in the suite, index: 18} description: {type: string, short: Description of what this test does / why it was defined, index: 19} operation: {type: code, short: Operation that is executed during this test (per definition of runner), index: 20} mode: {type: string, short: mode required to run this test, meaningWhenMissing: 'If no modes are listed, the test is always executed', index: 21} parameter: type: Base short: Parameter passed to the runner array: true index: 22 elements: valueUri: {type: uri, short: Value of this parameter, choiceOf: value, index: 31} valueDecimal: {type: decimal, short: Value of this parameter, choiceOf: value, index: 29} name: {type: string, short: Name of parameter, index: 23} valueQuantity: {type: Quantity, short: Value of this parameter, choiceOf: value, index: 33} value: short: Value of this parameter choices: [valueString, valueBoolean, valueInteger, valueDecimal, valueDateTime, valueUri, valueCoding, valueQuantity] index: 25 valueString: {type: string, short: Value of this parameter, choiceOf: value, index: 26} 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', index: 34} valueBoolean: {type: boolean, short: Value of this parameter, choiceOf: value, index: 27} valueDateTime: {type: dateTime, short: Value of this parameter, choiceOf: value, index: 30} valueCoding: {type: Coding, short: Value of this parameter, choiceOf: value, index: 32} valueInteger: {type: integer, short: Value of this parameter, choiceOf: value, index: 28} required: [valueCoding, valueUri, valueString, valueDecimal, valueDateTime, name, value, valueBoolean, valueQuantity, valueInteger] 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, setup] array: true index: 35 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, setup] array: true index: 36 required: [name] required: [name] package_version: 0.4.0 class: logical kind: logical url: http://hl7.org/fhir/tools/StructureDefinition/TestCases base: http://hl7.org/fhir/StructureDefinition/Resource version: 0.4.0 required: [runner]