{
  "resourceType": "StructureDefinition",
  "id": "KBV-PR-AW-Observation-Befund",
  "url": "https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Observation_Befund",
  "version": "1.3.0",
  "name": "KBV_PR_AW_Observation_Befund",
  "status": "draft",
  "publisher": "Kassenärztliche Bundesvereinigung (KBV)",
  "copyright": "Copyright © [2022], Kassenärztliche Bundesvereinigung (KBV). All rights reserved.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "sct-concept",
      "uri": "http://snomed.info/conceptdomain",
      "name": "SNOMED CT Concept Domain Binding"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "sct-attr",
      "uri": "http://snomed.org/attributebinding",
      "name": "SNOMED CT Attribute Binding"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "short": "Befund",
        "definition": "In dieser Ressource wird die generische Form eines Befundes abgebildet. Zusätzlich können spezielle Befunde als Komponente eingefügt werden."
      },
      {
        "id": "Observation.id",
        "path": "Observation.id",
        "min": 1
      },
      {
        "id": "Observation.meta",
        "path": "Observation.meta",
        "min": 1
      },
      {
        "id": "Observation.meta.versionId",
        "path": "Observation.meta.versionId",
        "min": 1
      },
      {
        "id": "Observation.meta.lastUpdated",
        "path": "Observation.meta.lastUpdated",
        "min": 1
      },
      {
        "id": "Observation.meta.profile",
        "path": "Observation.meta.profile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Observation_Befund|1.3.0"
      },
      {
        "id": "Observation.text",
        "path": "Observation.text",
        "min": 1
      },
      {
        "id": "Observation.text.status",
        "path": "Observation.text.status",
        "short": "extensions",
        "fixedCode": "extensions"
      },
      {
        "id": "Observation.identifier",
        "path": "Observation.identifier",
        "max": "0"
      },
      {
        "id": "Observation.basedOn",
        "path": "Observation.basedOn",
        "max": "0"
      },
      {
        "id": "Observation.partOf",
        "path": "Observation.partOf",
        "max": "0"
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "definition": "Der Status ist immer abgeschlossen (final).",
        "fixedCode": "final"
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "definition": "Dieses Attribut dient zur Kategorisierung des Befundes. Zur Auswahl stehen ausschließlich Eigenbefund, Fremdbefund, Laborbefund, Roentgenbefund, Patientenangabe und EKG-Befund.",
        "min": 1,
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "description": "Befundart",
          "valueSet": "https://fhir.kbv.de/ValueSet/KBV_VS_AW_Befundart"
        }
      },
      {
        "id": "Observation.category.coding",
        "path": "Observation.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Observation.category.coding.system",
        "path": "Observation.category.coding.system",
        "min": 1
      },
      {
        "id": "Observation.category.coding.code",
        "path": "Observation.category.coding.code",
        "min": 1
      },
      {
        "id": "Observation.category.coding.userSelected",
        "path": "Observation.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Observation.category.text",
        "path": "Observation.category.text",
        "max": "0"
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "short": "Observation Befund",
        "definition": "In diesem Element wird der Typ der Observation definiert.\r\n\r\nIst ein Loinc-Code zu dieser Observation bekannt, so ist dieser im Attribut loinc_code zu dokumentieren",
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "description": "kbv_code\r\nloinc_code",
          "rules": "closed"
        },
        "min": 1,
        "max": "2",
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding:kbv_code",
        "path": "Observation.code.coding",
        "sliceName": "kbv_code",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding:kbv_code.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "https://fhir.kbv.de/CodeSystem/KBV_CS_AW_Ressourcentyp"
      },
      {
        "id": "Observation.code.coding:kbv_code.code",
        "path": "Observation.code.coding.code",
        "short": "Befund",
        "min": 1,
        "fixedCode": "Befund"
      },
      {
        "id": "Observation.code.coding:kbv_code.userSelected",
        "path": "Observation.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Observation.code.coding:loinc_code",
        "path": "Observation.code.coding",
        "sliceName": "loinc_code",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:loinc_code.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "http://loinc.org"
      },
      {
        "id": "Observation.code.coding:loinc_code.code",
        "path": "Observation.code.coding.code",
        "min": 1
      },
      {
        "id": "Observation.code.coding:loinc_code.userSelected",
        "path": "Observation.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Observation.code.text",
        "path": "Observation.code.text",
        "max": "0"
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "label": "TR01",
        "short": "Patientenbezug",
        "definition": "Siehe Reason for inclusion and constrainment",
        "requirements": "Diese Referenz wurde aus technischen Gründen erzeugt, um dieser patientenbezogenen Ressource zu genügen. Aus informationstechnischer Sicht ist Diese jedoch nicht notwendig, da der Zusammenhang bereits über das Attribut encounter hergestellt worden ist.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Patient|1.3.0"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.subject.reference",
        "path": "Observation.subject.reference",
        "min": 1
      },
      {
        "id": "Observation.subject.type",
        "path": "Observation.subject.type",
        "max": "0"
      },
      {
        "id": "Observation.subject.identifier",
        "path": "Observation.subject.identifier",
        "max": "0"
      },
      {
        "id": "Observation.subject.display",
        "path": "Observation.subject.display",
        "max": "0"
      },
      {
        "id": "Observation.focus",
        "path": "Observation.focus",
        "max": "0"
      },
      {
        "id": "Observation.encounter",
        "path": "Observation.encounter",
        "short": "Begegnung",
        "definition": "Referenz zur Ressource Begegnung",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Begegnung|1.3.0"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.encounter.reference",
        "path": "Observation.encounter.reference",
        "min": 1
      },
      {
        "id": "Observation.encounter.type",
        "path": "Observation.encounter.type",
        "max": "0"
      },
      {
        "id": "Observation.encounter.identifier",
        "path": "Observation.encounter.identifier",
        "max": "0"
      },
      {
        "id": "Observation.encounter.display",
        "path": "Observation.encounter.display",
        "max": "0"
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "closed"
        },
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "Observation.effective[x]:effectiveDateTime",
        "path": "Observation.effective[x]",
        "sliceName": "effectiveDateTime",
        "short": "Aufnahmezeitpunkt",
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "Observation.issued",
        "path": "Observation.issued",
        "max": "0"
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "max": "0"
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "closed"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.value[x]:valueString",
        "path": "Observation.value[x]",
        "sliceName": "valueString",
        "short": "Befund",
        "definition": "Freitext zur Beschreibung des Befundes",
        "min": 1,
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Observation.dataAbsentReason",
        "path": "Observation.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.interpretation",
        "path": "Observation.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.note",
        "path": "Observation.note",
        "max": "0"
      },
      {
        "id": "Observation.bodySite",
        "path": "Observation.bodySite",
        "max": "0"
      },
      {
        "id": "Observation.method",
        "path": "Observation.method",
        "max": "0"
      },
      {
        "id": "Observation.specimen",
        "path": "Observation.specimen",
        "max": "0"
      },
      {
        "id": "Observation.device",
        "path": "Observation.device",
        "max": "0"
      },
      {
        "id": "Observation.referenceRange",
        "path": "Observation.referenceRange",
        "max": "0"
      },
      {
        "id": "Observation.hasMember",
        "path": "Observation.hasMember",
        "max": "0"
      },
      {
        "id": "Observation.derivedFrom",
        "path": "Observation.derivedFrom",
        "max": "0"
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "mustSupport": true
      },
      {
        "id": "Observation.component.code",
        "path": "Observation.component.code",
        "short": "Loinc-Code",
        "definition": "Die Angabe eines Loinc-Codes ist verpflichtend.",
        "mustSupport": true
      },
      {
        "id": "Observation.component.code.coding",
        "path": "Observation.component.code.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Observation.component.code.coding.system",
        "path": "Observation.component.code.coding.system",
        "min": 1,
        "fixedUri": "http://loinc.org"
      },
      {
        "id": "Observation.component.code.coding.code",
        "path": "Observation.component.code.coding.code",
        "min": 1
      },
      {
        "id": "Observation.component.code.coding.userSelected",
        "path": "Observation.component.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Observation.component.code.text",
        "path": "Observation.component.code.text",
        "max": "0"
      },
      {
        "id": "Observation.component.value[x]",
        "path": "Observation.component.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "closed"
        },
        "short": "Wert des Befundes",
        "definition": "Der Datentyp ist dem zu speichernden Wert anzupassen",
        "min": 1,
        "type": [
          {
            "code": "Quantity"
          },
          {
            "code": "string"
          },
          {
            "code": "Range"
          },
          {
            "code": "Ratio"
          },
          {
            "code": "time"
          },
          {
            "code": "dateTime"
          },
          {
            "code": "Period"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.component.value[x]:valueQuantity",
        "path": "Observation.component.value[x]",
        "sliceName": "valueQuantity",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Observation.component.value[x]:valueString",
        "path": "Observation.component.value[x]",
        "sliceName": "valueString",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Observation.component.value[x]:valueRange",
        "path": "Observation.component.value[x]",
        "sliceName": "valueRange",
        "type": [
          {
            "code": "Range"
          }
        ]
      },
      {
        "id": "Observation.component.value[x]:valueRatio",
        "path": "Observation.component.value[x]",
        "sliceName": "valueRatio",
        "type": [
          {
            "code": "Ratio"
          }
        ]
      },
      {
        "id": "Observation.component.value[x]:valueTime",
        "path": "Observation.component.value[x]",
        "sliceName": "valueTime",
        "type": [
          {
            "code": "time"
          }
        ]
      },
      {
        "id": "Observation.component.value[x]:valueDateTime",
        "path": "Observation.component.value[x]",
        "sliceName": "valueDateTime",
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "Observation.component.value[x]:valuePeriod",
        "path": "Observation.component.value[x]",
        "sliceName": "valuePeriod",
        "type": [
          {
            "code": "Period"
          }
        ]
      },
      {
        "id": "Observation.component.dataAbsentReason",
        "path": "Observation.component.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.component.interpretation",
        "path": "Observation.component.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.component.referenceRange",
        "path": "Observation.component.referenceRange",
        "max": "0",
        "contentReference": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.referenceRange"
      }
    ]
  }
}