{
  "resourceType": "StructureDefinition",
  "id": "MySecondPatient",
  "url": "http://gefyra.de/schulungen/synedra/asc/StructureDefinition/MySecondPatient",
  "name": "MySecondPatient",
  "title": "My Second Patient Profile",
  "status": "draft",
  "description": "Noch ein Einfaches Testprofil",
  "fhirVersion": "4.0.1",
  "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": "value",
              "path": "system"
            }
          ],
          "rules": "open",
          "description": "Unterscheidung verschiedener Arten von PIDs",
          "ordered": false
        },
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:ufpId",
        "path": "Patient.identifier",
        "sliceName": "ufpId",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:ufpId.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "patternUri": "http://fhir.ufp/sid/ufp-citizen-id",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:ufpId.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:kvId",
        "path": "Patient.identifier",
        "sliceName": "kvId",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:kvId.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "patternUri": "http://fhir.de/sid/gkv/kvid-10",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:kvId.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "constraint": [
          {
            "key": "kvid-1",
            "severity": "warning",
            "human": "KV-Nummern müssen 10-stellig sein, mit einem Großbuchstaben beginnen, und danach nur Ziffern enthalten",
            "expression": "matches('^[A-Z][0-9]{9}$')",
            "source": "http://gefyra.de/schulungen/synedra/asc/StructureDefinition/MySecondPatient"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "use"
            }
          ],
          "rules": "open",
          "description": "Unterscheidung verschiedener Namenstypen",
          "ordered": false
        },
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name:officialName",
        "path": "Patient.name",
        "sliceName": "officialName",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.name:officialName.use",
        "path": "Patient.name.use",
        "min": 1,
        "patternCode": "official",
        "mustSupport": true
      },
      {
        "id": "Patient.name:officialName.family",
        "path": "Patient.name.family",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name:officialName.given",
        "path": "Patient.name.given",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.name:officialName.prefix",
        "path": "Patient.name.prefix",
        "mustSupport": true
      },
      {
        "id": "Patient.name:maidenName",
        "path": "Patient.name",
        "sliceName": "maidenName",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.name:maidenName.use",
        "path": "Patient.name.use",
        "min": 1,
        "patternCode": "maiden",
        "mustSupport": true
      },
      {
        "id": "Patient.name:maidenName.family",
        "path": "Patient.name.family",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "comment": "Nicht Teil unseres identifizierenden 6-Tupels",
        "max": "0"
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "comment": "Teil unseres identifizierenden 6-Tupels",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "comment": "Teil unseres identifizierenden 6-Tupels",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.deceased[x]",
        "path": "Patient.deceased[x]",
        "comment": "Nicht Teil unseres identifizierenden 6-Tupels",
        "max": "0"
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://gefyra.de/schulungen/synedra/asc/StructureDefinition/MyFirstAddress"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.maritalStatus",
        "path": "Patient.maritalStatus",
        "comment": "Nicht Teil unseres identifizierenden 6-Tupels",
        "max": "0"
      },
      {
        "id": "Patient.multipleBirth[x]",
        "path": "Patient.multipleBirth[x]",
        "comment": "Nicht Teil unseres identifizierenden 6-Tupels",
        "max": "0"
      },
      {
        "id": "Patient.photo",
        "path": "Patient.photo",
        "comment": "Nicht Teil unseres identifizierenden 6-Tupels",
        "max": "0"
      },
      {
        "id": "Patient.contact",
        "path": "Patient.contact",
        "comment": "Nicht Teil unseres identifizierenden 6-Tupels",
        "max": "0"
      },
      {
        "id": "Patient.communication",
        "path": "Patient.communication",
        "comment": "Nicht Teil unseres identifizierenden 6-Tupels",
        "max": "0"
      },
      {
        "id": "Patient.generalPractitioner",
        "path": "Patient.generalPractitioner",
        "comment": "Nicht Teil unseres identifizierenden 6-Tupels",
        "max": "0"
      },
      {
        "id": "Patient.managingOrganization",
        "path": "Patient.managingOrganization",
        "comment": "Nicht Teil unseres identifizierenden 6-Tupels",
        "max": "0"
      },
      {
        "id": "Patient.link",
        "path": "Patient.link",
        "comment": "Nicht Teil unseres identifizierenden 6-Tupels",
        "max": "0"
      }
    ]
  }
}