{
  "resourceType": "StructureDefinition",
  "id": "Profile-HiGHmed-InfectionControl-Virulenzfaktor",
  "url": "http://highmed.org/fhir/StructureDefinition/ic/Virulenzfaktor",
  "version": "1.0.0",
  "name": "Profile_HiGHmed_InfectionControl_Virulenzfaktor",
  "title": "Profile - HiGHmed - Infection Control - Virulenzfaktor",
  "status": "active",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.category.coding",
        "path": "Observation.category.coding",
        "min": 3
      },
      {
        "id": "Observation.category.coding:loinc-microbiology-studies",
        "path": "Observation.category.coding",
        "sliceName": "loinc-microbiology-studies",
        "min": 1,
        "max": "1",
        "patternCoding": {
          "system": "http://loinc.org",
          "code": "18725-2"
        }
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "constraint": [
          {
            "key": "obs-ic-virulenzfaktor-1",
            "severity": "error",
            "human": "Falls die Kodierung des Virulenzfaktors nur per allgemeinen SNOMED CT Code erfolgt, muss eine textuelle Beschreibung vorliegen.",
            "expression": "coding.where(system = 'http://loinc.org').exists().not() implies text.exists()",
            "source": "http://highmed.org/fhir/StructureDefinition/ic/Virulenzfaktor"
          }
        ]
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding:sct",
        "path": "Observation.code.coding",
        "sliceName": "sct",
        "min": 1,
        "max": "1",
        "patternCoding": {
          "system": "http://snomed.info/sct",
          "code": "250475009"
        },
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding:loinc",
        "path": "Observation.code.coding",
        "sliceName": "loinc",
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "http://highmed.org/fhir/ValueSet/ic/virulenzfaktor"
        }
      },
      {
        "id": "Observation.code.text",
        "path": "Observation.code.text",
        "mustSupport": true
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "Observation.value[x]:valueQuantity",
        "path": "Observation.value[x]",
        "sliceName": "valueQuantity",
        "max": "0"
      },
      {
        "id": "Observation.value[x]:valueCodeableConcept",
        "path": "Observation.valueCodeableConcept",
        "sliceName": "valueCodeableConcept",
        "min": 1,
        "binding": {
          "strength": "required",
          "valueSet": "http://highmed.org/fhir/ValueSet/ic/detected-not-detected-inconclusive"
        }
      },
      {
        "id": "Observation.specimen",
        "path": "Observation.specimen",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://highmed.org/fhir/StructureDefinition/ic/Specimen"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}