{
  "resourceType": "StructureDefinition",
  "id": "MyFSHPatient",
  "url": "http://example.org/StructureDefinition/MyFSHPatient",
  "version": "0.0.1",
  "name": "MyFSHPatient",
  "title": "Mein FSH Patient",
  "status": "draft",
  "date": "2024-09-18",
  "publisher": "Fraunhofer IZI",
  "contact": [
    {
      "name": "Icke"
    }
  ],
  "description": "Das ist mein Test Patienten-Profil",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "loinc",
      "uri": "http://loinc.org",
      "name": "LOINC code for the element"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Patient.identifier:Versichertennummer",
        "path": "Patient.identifier",
        "sliceName": "Versichertennummer",
        "min": 1,
        "max": "1",
        "patternIdentifier": {
          "system": "http://fhir.de/sid/gkv/kvid-10"
        },
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:Versichertennummer.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:Versichertennummer.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:PID",
        "path": "Patient.identifier",
        "sliceName": "PID",
        "min": 0,
        "max": "*",
        "patternIdentifier": {
          "type": {
            "coding": [
              {
                "code": "MR"
              }
            ]
          }
        },
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:PID.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:PID.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "constraint": [
          {
            "key": "kvid-1",
            "severity": "warning",
            "human": "Die Versichertennummer muss zehnstellig sein und mit einem Großbuchstaben beginnen",
            "expression": "matches('^[A-Z][0-9]{9}$')",
            "source": "http://example.org/StructureDefinition/MyFSHPatient"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "use"
            }
          ],
          "rules": "open"
        },
        "short": "Name des Patienten",
        "comment": "Zum identifizieren und ansprechen",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name:GeburtsName",
        "path": "Patient.name",
        "sliceName": "GeburtsName",
        "short": "Geburtsname",
        "comment": "Dient der Verhinderung von Dupletten",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.name:GeburtsName.use",
        "path": "Patient.name.use",
        "min": 1,
        "patternCode": "maiden",
        "mustSupport": true
      },
      {
        "id": "Patient.name:GeburtsName.family",
        "path": "Patient.name.family",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name:OffiziellerName",
        "path": "Patient.name",
        "sliceName": "OffiziellerName",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.name:OffiziellerName.use",
        "path": "Patient.name.use",
        "min": 1,
        "patternCode": "official",
        "mustSupport": true
      },
      {
        "id": "Patient.name:OffiziellerName.family",
        "path": "Patient.name.family",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name:OffiziellerName.given",
        "path": "Patient.name.given",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://example.org/StructureDefinition/MeineAdresse"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.contact.address",
        "path": "Patient.contact.address",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://example.org/StructureDefinition/MeineAdresse"
            ]
          }
        ]
      }
    ]
  }
}