{
  "resourceType": "StructureDefinition",
  "id": "21c5e94e-f506-453f-8ac5-dad08aa1e81e",
  "meta": {
    "lastUpdated": "2020-07-01T13:20:42.514+00:00"
  },
  "url": "http://ganaas.org/fhir/StructureDefinition/GanaasPatient",
  "version": "1.1.0",
  "name": "GanaasPatient",
  "status": "draft",
  "date": "2020-07-01T13:20:42.1628439+00:00",
  "publisher": "Mannheim",
  "description": "Beispiel Patient im FHIR",
  "copyright": "@Ganaa",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient",
        "path": "Patient",
        "constraint": [
          {
            "key": "kvid-22",
            "severity": "warning",
            "human": "Nur wer einen deutschen Wohnsitz hat, kann auch eine Deutsche Versichertennummer haben!",
            "expression": "Patient.identifier.where(system='http://fhir.de/NamingSystem/gkv/kvid-10').value.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:spezies",
        "path": "Patient.extension",
        "sliceName": "spezies",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ganaas.org/fhir/StructureDefinition/MeineExtension"
            ]
          }
        ]
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.identifier:citizenid",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "Patient.identifier",
        "sliceName": "citizenid",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.identifier:citizenid.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "fixedUri": "http://fhir.ufp/NamingSystem/ufp-citizen-id"
      },
      {
        "id": "Patient.identifier:citizenid.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:kvid",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "Patient.identifier",
        "sliceName": "kvid",
        "max": "1"
      },
      {
        "id": "Patient.identifier:kvid.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "fixedUri": "http://fhir.de/NamingSystem/gkv/kvid-10"
      },
      {
        "id": "Patient.identifier:kvid.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "constraint": [
          {
            "key": "kvid-23",
            "severity": "error",
            "human": "KV-Nummern stimmen nicht den Vorgaben ein!",
            "expression": "matches('^[A-Z][0-9]{9}$')"
          }
        ]
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "min": 1
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "min": 1
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "min": 1
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "min": 1,
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://ganaas.org/fhir/StructureDefinition/GanaasAddress"
            ]
          }
        ]
      },
      {
        "id": "Patient.contact",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "Contact"
          }
        ],
        "path": "Patient.contact"
      },
      {
        "id": "Patient.contact.address",
        "path": "Patient.contact.address",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://ganaas.org/fhir/StructureDefinition/GanaasAddress"
            ]
          }
        ]
      }
    ]
  }
}