{
  "resourceType": "StructureDefinition",
  "id": "observation-de-vitalsign",
  "url": "http://fhir.de/StructureDefinition/observation-de-vitalsign",
  "version": "1.6.0-ballot",
  "name": "VitalSignDE",
  "title": "Observation-Profil VitalSignDE",
  "status": "active",
  "experimental": false,
  "date": "2025-12-23",
  "publisher": "HL7 Deutschland e.V. (Technisches Komitee FHIR)",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.de/technische-komitees/fhir/"
        }
      ]
    }
  ],
  "description": "Observation-Profil VitalSignDE ist das Parentprofil der restlichen Vitalsignprofile",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": true,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "constraint": [
          {
            "key": "vs-de-2",
            "severity": "error",
            "human": "If there is no component or hasMember element then either a value[x] or a data absent reason must be present",
            "expression": "(component.empty() and hasMember.empty()) implies (dataAbsentReason.exists() or value.exists())",
            "source": "http://fhir.de/StructureDefinition/observation-de-vitalsign"
          }
        ]
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Observation.category:VSCat",
        "path": "Observation.category",
        "sliceName": "VSCat",
        "min": 1,
        "max": "1",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "vital-signs",
              "system": "http://terminology.hl7.org/CodeSystem/observation-category"
            }
          ]
        }
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "min": 1
      },
      {
        "id": "Observation.code.coding.system",
        "path": "Observation.code.coding.system",
        "min": 1
      },
      {
        "id": "Observation.code.coding.code",
        "path": "Observation.code.coding.code",
        "min": 1
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ]
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "min": 1,
        "type": [
          {
            "code": "dateTime"
          },
          {
            "code": "Period"
          }
        ],
        "constraint": [
          {
            "key": "vs-de-1",
            "severity": "error",
            "human": "If Observation.effective[x] has a value then that value shall be precise to the day",
            "expression": "(($this is dateTime) implies ($this as dateTime).toString().length() >= 10) and ($this.start.exists() implies ($this.start as dateTime).toString().length() >= 10) and ($this.end.exists() implies ($this.end as dateTime).toString().length() >= 10)",
            "source": "http://fhir.de/StructureDefinition/observation-de-vitalsign"
          }
        ]
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Observation.value[x]:valueQuantity",
        "path": "Observation.value[x]",
        "sliceName": "valueQuantity",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Observation.value[x]:valueQuantity.value",
        "path": "Observation.value[x].value",
        "min": 1
      },
      {
        "id": "Observation.value[x]:valueQuantity.unit",
        "path": "Observation.value[x].unit",
        "min": 1
      },
      {
        "id": "Observation.value[x]:valueQuantity.system",
        "path": "Observation.value[x].system",
        "min": 1,
        "patternUri": "http://unitsofmeasure.org"
      },
      {
        "id": "Observation.value[x]:valueQuantity.code",
        "path": "Observation.value[x].code",
        "min": 1,
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.de/ValueSet/UcumVitalsCommonDE"
        }
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "constraint": [
          {
            "key": "vs-de-3",
            "severity": "error",
            "human": "If there is no a value a data absent reason must be present",
            "expression": "value.exists() xor dataAbsentReason.exists()",
            "source": "http://fhir.de/StructureDefinition/observation-de-vitalsign"
          }
        ]
      },
      {
        "id": "Observation.component.value[x]",
        "path": "Observation.component.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Observation.component.value[x]:valueQuantity",
        "path": "Observation.component.value[x]",
        "sliceName": "valueQuantity",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Observation.component.value[x]:valueQuantity.value",
        "path": "Observation.component.value[x].value",
        "min": 1
      },
      {
        "id": "Observation.component.value[x]:valueQuantity.unit",
        "path": "Observation.component.value[x].unit",
        "min": 1
      },
      {
        "id": "Observation.component.value[x]:valueQuantity.system",
        "path": "Observation.component.value[x].system",
        "min": 1,
        "patternUri": "http://unitsofmeasure.org"
      },
      {
        "id": "Observation.component.value[x]:valueQuantity.code",
        "path": "Observation.component.value[x].code",
        "min": 1
      }
    ]
  }
}