description: Profile for capturing lung function testings as FHIR Observation resources.\n\nThis profile defines the exchange of a single measurement data 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 MUST 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\n**Constraints applied:** \n- `status` is restricted to _final_\n- `code` is constrained to a subset of the _MIV Lung Function Testing_ ValueSet, defined by the _HddtLungFunctionTestingValues_ 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- `device` is set to be mandatory in order to provide the DiGA with information about the sensor's calibration status and with information about the static and dynamic attributes of the Personal Health Device. package_name: de.gematik.hddt derivation: constraint name: HddtLungFunctionTesting type: Observation elements: status: short: Measurement status pattern: {type: Code, value: final} index: 0 code: short: Raw measurement type for lung function binding: {strength: required, valueSet: 'https://gematik.de/fhir/hddt/ValueSet/hddt-lung-function-testing-values'} index: 1 effective: short: Time of measurement choices: [effectiveDateTime] index: 3 effectiveDateTime: {type: dateTime, short: Time of measurement, choiceOf: effective, index: 4} value: short: Measured lung function value mustSupport: true choices: [valueQuantity] index: 6 valueQuantity: {type: Quantity, short: Measured lung function value, mustSupport: true, choiceOf: value, index: 7} value[x]: elements: value: {index: 8} system: pattern: {type: Uri, value: 'http://unitsofmeasure.org'} index: 9 code: binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/ucum-units'} index: 10 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: 11 package_version: 1.0.0-rc2 class: profile kind: resource url: https://gematik.de/fhir/hddt/StructureDefinition/hddt-lung-function-testing base: http://hl7.org/fhir/StructureDefinition/Observation version: 1.0.0-rc2 required: [device, effectiveDateTime, effective]