{
  "resourceType": "StructureDefinition",
  "id": "e4556388-61b0-4970-b781-ca3e9740ef4d",
  "meta": {
    "lastUpdated": "2021-11-15T15:32:07.636+00:00"
  },
  "url": "http://example.org/fhir/StructureDefinition/MeinPatient",
  "name": "MeinPatient",
  "status": "draft",
  "date": "2021-11-15T14:12:43.630881+00:00",
  "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",
        "path": "Patient",
        "constraint": [
          {
            "key": "german-insurance-number-contraints",
            "severity": "error",
            "human": "Nur, wer in Deutschland lebt (d.h.: mindestens eine Adresse hat, in der country=“DE“ gesetzt ist), darf auch eine deutsche Krankenversichertennummer haben",
            "expression": "Patient.identifier.where(system='http://fhir.de/sid/gkv/kvid-10').exists().not() or Patient.address.where(country='DE').exists()"
          }
        ]
      },
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.extension:species",
        "path": "Patient.extension",
        "sliceName": "species",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://example.org/fhir/StructureDefinition/MeineExtension"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.identifier:buergerID",
        "path": "Patient.identifier",
        "sliceName": "buergerID",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.identifier:buergerID.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "fixedUri": "http://fhir.ufp/NamingSystem/ufp-citizen-id",
        "mustSupport": false
      },
      {
        "id": "Patient.identifier:buergerID.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:versichertenID",
        "path": "Patient.identifier",
        "sliceName": "versichertenID",
        "max": "1"
      },
      {
        "id": "Patient.identifier:versichertenID.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "fixedUri": "http://fhir.de/sid/gkv/kvid-10"
      },
      {
        "id": "Patient.identifier:versichertenID.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "min": 1,
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://example.org/fhir/StructureDefinition/MeineAdresse"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.contact.address",
        "path": "Patient.contact.address",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://example.org/fhir/StructureDefinition/MeineAdresse"
            ]
          }
        ]
      }
    ]
  }
}