{
  "resourceType": "StructureDefinition",
  "id": "PulmonaryMeasurement",
  "url": "https://simplifier.net/pulmonary-measurement/PulmonaryMeasurement",
  "version": "0.2",
  "name": "PulmonaryMeasurement",
  "status": "draft",
  "date": "2025-05-09",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "short": "Pulmonary measurement",
        "definition": "Observation ressource for capturing results of a pulmonary measurement"
      },
      {
        "id": "Observation.id",
        "path": "Observation.id",
        "patternId": "PulmonaryMeasurement"
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://loinc.org",
              "code": "94070-8",
              "display": "Spirometry"
            }
          ]
        }
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "max": "0"
      },
      {
        "id": "Observation.code.text",
        "path": "Observation.code.text",
        "max": "0"
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ]
      },
      {
        "id": "Observation.encounter",
        "path": "Observation.encounter",
        "short": "Healthcare encounter related to the observation",
        "definition": "The healthcare encounter during which the observation was made."
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "short": "The time of the observation",
        "definition": "The time or time period the observation was made.",
        "min": 1,
        "type": [
          {
            "code": "dateTime"
          },
          {
            "code": "Period"
          }
        ]
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "short": "Who performed the measurement",
        "definition": "Who was responsible for performing the measurement.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/CareTeam",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
            ]
          }
        ]
      },
      {
        "id": "Observation.device",
        "path": "Observation.device",
        "short": "A reference to the device used for the measurement",
        "definition": "A reference to the used device that generates the measurement values.",
        "min": 1
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "code.coding.code"
            }
          ],
          "rules": "open"
        },
        "definition": "Component results of the pulmonary measurement, such as FEV1, FVC, FEF25."
      },
      {
        "id": "Observation.component:BodyHeight",
        "path": "Observation.component",
        "sliceName": "BodyHeight",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "3137-7",
            "display": "Body Height"
          }
        ],
        "min": 1,
        "max": "1"
      },
      {
        "id": "Observation.component:BodyHeight.value[x]",
        "path": "Observation.component.value[x]",
        "min": 1,
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "patternQuantity": {
          "unit": "cm",
          "system": "http://unitsofmeasure.org",
          "code": "cm"
        }
      },
      {
        "id": "Observation.component:BodyWeight",
        "path": "Observation.component",
        "sliceName": "BodyWeight",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "29463-7",
            "display": "Body Weight"
          }
        ],
        "min": 1,
        "max": "1"
      },
      {
        "id": "Observation.component:BodyWeight.value[x]",
        "path": "Observation.component.value[x]",
        "min": 1,
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Observation.component:Gender",
        "path": "Observation.component",
        "sliceName": "Gender",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "46098-0",
            "display": "Biological gender"
          }
        ],
        "short": "Gender",
        "definition": "Biological gender",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Observation.component:Gender.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "Observation.component:RespRate",
        "path": "Observation.component",
        "sliceName": "RespRate",
        "short": "Respiratory rate",
        "definition": "The patients respiratory rate during airway flow measurement",
        "max": "1"
      },
      {
        "id": "Observation.component:RespRate.code",
        "path": "Observation.component.code",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "76171-8",
            "display": "Respiratory rate"
          }
        ]
      },
      {
        "id": "Observation.component:RespRate.value[x]",
        "path": "Observation.component.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "short": "Value of the Respitory rate",
        "definition": "The patients respitory rate during the measurement.",
        "min": 1,
        "type": [
          {
            "code": "integer"
          }
        ]
      },
      {
        "id": "Observation.component:Ethnicity",
        "path": "Observation.component",
        "sliceName": "Ethnicity",
        "short": "Race or ethnicity",
        "definition": "The Race or ethnicity of the measured patient.",
        "max": "1"
      },
      {
        "id": "Observation.component:Ethnicity.code",
        "path": "Observation.component.code",
        "short": "Code for the Race/Ethnicity",
        "definition": "Code that represents the Race or Ethnicity.",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://loinc.org",
              "code": "46463-6",
              "display": "Race or ethnicity"
            }
          ]
        }
      },
      {
        "id": "Observation.component:Ethnicity.value[x]",
        "path": "Observation.component.value[x]",
        "short": "Value of the Race/Ethnicity",
        "definition": "The patient's race or ethnicity.",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/us/core/ValueSet/omb-race-category"
        }
      },
      {
        "id": "Observation.component:DLCOsingleBreath",
        "path": "Observation.component",
        "sliceName": "DLCOsingleBreath",
        "short": "Diffusing Capacity for Carbon Monoxide",
        "max": "1"
      },
      {
        "id": "Observation.component:ERV",
        "path": "Observation.component",
        "sliceName": "ERV",
        "short": "Expiratory reserve",
        "max": "1"
      },
      {
        "id": "Observation.component:ERV.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Observation.component:ERV.value[x]",
        "path": "Observation.component.value[x]",
        "min": 1
      },
      {
        "id": "Observation.component:FEF25",
        "path": "Observation.component",
        "sliceName": "FEF25",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "20150-9",
            "display": "FEF25"
          }
        ],
        "short": "FEF25",
        "definition": "Forced expiratory flow by 25% FVC",
        "max": "1"
      },
      {
        "id": "Observation.component:FEF25.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Observation.component:FEF25.code",
        "path": "Observation.component.code",
        "short": "Code for the FEF25 component",
        "definition": "Code that represents FEF25 measurement.",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://loinc.org",
              "code": "20150-9",
              "display": "FEF25"
            }
          ]
        }
      },
      {
        "id": "Observation.component:FEF50",
        "path": "Observation.component",
        "sliceName": "FEF50",
        "short": "FEV50",
        "definition": "Forced expiratory flow by 50% FVC",
        "max": "1"
      },
      {
        "id": "Observation.component:FEF50.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Observation.component:FEF50.code",
        "path": "Observation.component.code",
        "short": "Code for the FEF50 component",
        "definition": "Code that represents FEF50 measurement.",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://loinc.org",
              "code": "20151-7",
              "display": "FEF50"
            }
          ]
        }
      },
      {
        "id": "Observation.component:FEF75",
        "path": "Observation.component",
        "sliceName": "FEF75",
        "short": "FEF75",
        "definition": "Forced expiratory flow by 75% FVC",
        "max": "1"
      },
      {
        "id": "Observation.component:FEF75.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Observation.component:FEV1",
        "path": "Observation.component",
        "sliceName": "FEV1",
        "short": "FEV1",
        "definition": "Forced expiatory volume by 1s forced expiration",
        "max": "1"
      },
      {
        "id": "Observation.component:FEV1.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Observation.component:FEV1.code",
        "path": "Observation.component.code",
        "short": "Code for the FEV1 component",
        "definition": "Code that represents FEV1 measurement.",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://loinc.org",
              "code": "19868-9",
              "display": "FEV1"
            }
          ]
        }
      },
      {
        "id": "Observation.component:FEV1.value[x]",
        "path": "Observation.component.value[x]",
        "short": "Value of the FEV1 observation",
        "definition": "The measured value of FEV1 in liters."
      },
      {
        "id": "Observation.component:FVC",
        "path": "Observation.component",
        "sliceName": "FVC",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "19868-9",
            "display": "Forced Vital Capacity (FVC)"
          }
        ],
        "short": "FVC",
        "definition": "The value of Forced Vital Capacity (FVC)",
        "max": "1"
      },
      {
        "id": "Observation.component:FVC.extension",
        "path": "Observation.component.extension",
        "label": "measurementDetails",
        "alias": [
          "measurementDetails"
        ]
      },
      {
        "id": "Observation.component:FVC.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Observation.component:IC",
        "path": "Observation.component",
        "sliceName": "IC",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "19848-1",
            "display": "Inspoiratory capacity (Plethmograohy)"
          },
          {
            "system": "http://loinc.org",
            "code": "19852-3",
            "display": "Inspiratory capacity (Spirometry)"
          }
        ],
        "short": "Inspiratory capacity",
        "definition": "The measured value of the inspoiratory capacity.",
        "max": "1"
      },
      {
        "id": "Observation.component:IC.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Observation.component:MEP",
        "path": "Observation.component",
        "sliceName": "MEP",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "76249-2",
            "display": "MEP"
          }
        ],
        "short": "MEP",
        "definition": "Maximum expiratory pressure of the respiratory system airway.",
        "max": "1"
      },
      {
        "id": "Observation.component:MEP.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Observation.component:MIP",
        "path": "Observation.component",
        "sliceName": "MIP",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "60951-1",
            "display": "Maximum inspiratory pressure"
          }
        ],
        "short": "MIP",
        "definition": "Maximum inspiratory pressure.",
        "max": "1"
      },
      {
        "id": "Observation.component:MIP.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Observation.component:PEF",
        "path": "Observation.component",
        "sliceName": "PEF",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "33452-4",
            "display": "Peak expiratory flow"
          }
        ],
        "short": "PEF",
        "definition": "Peak Expiratory Flow",
        "max": "1"
      },
      {
        "id": "Observation.component:PEF.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Observation.component:PFTpanel",
        "path": "Observation.component",
        "sliceName": "PFTpanel",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "81458-2",
            "display": "Pulmonary function test panel"
          }
        ],
        "short": "PFT Panel",
        "definition": "Pulmonary function test panel\r\ne.g. Pre or Post",
        "max": "1"
      },
      {
        "id": "Observation.component:RV",
        "path": "Observation.component",
        "sliceName": "RV",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "20146-7"
          }
        ],
        "short": "Residual volume",
        "max": "1"
      },
      {
        "id": "Observation.component:RV.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Observation.component:TLC",
        "path": "Observation.component",
        "sliceName": "TLC",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "19862-2",
            "display": "Total lung capacity"
          },
          {
            "system": "http://loinc.org",
            "code": "19859-8",
            "display": "Total lung capacity by Plethysmograph body box"
          }
        ],
        "short": "TLC",
        "definition": "Total Lung Capacity",
        "max": "1"
      },
      {
        "id": "Observation.component:TLC.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Observation.component:VC",
        "path": "Observation.component",
        "sliceName": "VC",
        "code": [
          {
            "system": "http://loinc.org",
            "code": "19867-1",
            "display": "Vital capacity"
          }
        ],
        "short": "VC",
        "definition": "Vital capacity [Volume] Respiratory system",
        "max": "1"
      },
      {
        "id": "Observation.component:VC.extension:pulmonaryReferenceValues",
        "path": "Observation.component.extension",
        "sliceName": "pulmonaryReferenceValues",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://simplifier.net/pulmonary-measurement/PulmonaryReferenceValues"
            ]
          }
        ],
        "isModifier": false
      }
    ]
  }
}