description: 'Profile for capturing the relative lung function testings (i.e. an individual measurement divided by the corresponding reference value) \nas FHIR Observation resources.\n\nThis profile defines the exchange of a single relative value for the Mandatory Interoperable Value (MIV) \\\"Lung Function Testing\\\" which is technically defined \nby the ValueSet _hddt-miv-lung-function-testing_. This MIV is e.g. implemented by peak flow meter that can connect to \na Personal Health Gateway (e.g. a mobile app for tracking lung function values) through wireless or wired communication.\n\n**Obligations and Conventions:**\n\nEach Lung Function Testing MAY either hold a reference to a _Sensor Type And Calibration Status_ [DeviceMetric](https://hl7.org/fhir/R4/devicemetric.html) resource or to a \n_Personal Health Device_ [Device](https://hl7.org/fhir/R4/device.html) resource (eXclusive OR). Typically the reference will be \nto a [Device](https://hl7.org/fhir/R4/device.html) resource, but the option to reference a [DeviceMetric](https://hl7.org/fhir/R4/devicemetric.html) \nresource is provided for compatibility with the overarching HDDT specification.\n\nEach instance of this Observation MUST reference the Observations holding the corresponding raw measurement and reference value via the `derivedFrom` element.\n\n**Constraints applied:** \n- `code` is constrained to a subset of the _MIV Lung Function Relative Values_ ValueSet, defined by the _HddtLungFunctionRelativeValues_ ValueSet.\n- `effective[x]` is restricted to `effectiveDateTime` and constrained as mandatory.\n- `value[x]` is restricted to `valueQuantity`. The elements `valueQuantity.value`, `valueQuantity.system`, and `valueQuantity.code` are constrained in a way that a value MUST be provided and that UCUM MUST be used for encoding the unit of measurement. `Observation.valueQuantity` MAY only be omitted in case of an error that accured with the measurement. In this case, `Observation.dataAbsentReason` MUST be provided.\n- `derivedFrom` is constrained to require exactly two references: one to the raw lung function testing Observation and one to the lung function reference value Observation.' package_name: de.gematik.hddt derivation: constraint name: HddtLungFunctionTestingComplete type: Observation elements: code: short: Percentage measurement type for lung function binding: {strength: required, valueSet: 'https://gematik.de/fhir/hddt/ValueSet/hddt-lung-function-relative-values'} index: 0 effective: short: Time of measurement choices: [effectiveDateTime] index: 2 effectiveDateTime: {type: dateTime, short: Time of measurement, choiceOf: effective, index: 3} value: short: Calculated lung function value as percentage of reference value mustSupport: true choices: [valueQuantity] index: 5 valueQuantity: {type: Quantity, short: Calculated lung function value as percentage of reference value, mustSupport: true, choiceOf: value, index: 6} value[x]: elements: value: {index: 7} system: pattern: {type: Uri, value: 'http://unitsofmeasure.org'} index: 8 code: binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/ucum-units'} index: 9 required: [value, system, code] device: type: Reference short: Reference to personal health device refers: ['https://gematik.de/fhir/hddt/StructureDefinition/hddt-personal-health-device', 'https://gematik.de/fhir/hddt/StructureDefinition/hddt-sensor-type-and-calibration-status'] index: 10 derivedFrom: array: true min: 2 max: 2 index: 11 slicing: rules: closed description: Slice to require one reference to a measurement and one to a reference value discriminator: - {path: resolve(), type: profile} min: 2 max: 2 slices: measurement: match: {} schema: short: Reference to raw lung function testing refers: ['https://gematik.de/fhir/hddt/StructureDefinition/hddt-lung-function-testing'] type: Reference _required: true index: 12 min: 1 max: 1 referenceValue: match: {} schema: short: Reference to lung function reference value refers: ['https://gematik.de/fhir/hddt/StructureDefinition/hddt-lung-reference-value'] type: Reference _required: true index: 13 min: 1 max: 1 package_version: 1.0.1 class: profile kind: resource url: https://gematik.de/fhir/hddt/StructureDefinition/hddt-lung-function-testing-complete base: http://hl7.org/fhir/StructureDefinition/Observation version: 1.0.1 required: [device, effectiveDateTime, effective]