{
  "resourceType": "StructureDefinition",
  "id": "NotifiedPersonAnonymous",
  "url": "https://demis.rki.de/fhir/StructureDefinition/NotifiedPersonAnonymous",
  "version": "1.4.0",
  "name": "NotifiedPersonAnonymous",
  "title": "Betroffene Person (anonym)",
  "status": "draft",
  "date": "2025-02-15",
  "description": "Profil zur Abbildung von anonym gemeldeten Personen (nichtnamentlich nach § 10 IfSG ohne Erstellung eines Pseudonyms), z.B. im Zusammenhang mit Meldungen gemäß § 7 Abs. 4 IfSG.",
  "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": "genderExists",
            "severity": "error",
            "human": "Wenn als gender other angegeben wird, muss die Extension http://fhir.de/StructureDefinition/gender-amtlich-de befüllt werden.",
            "expression": "gender.exists() and gender = 'other' implies gender.extension('http://fhir.de/StructureDefinition/gender-amtlich-de').exists()"
          }
        ]
      },
      {
        "id": "Patient.meta",
        "path": "Patient.meta",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.meta.profile",
        "path": "Patient.meta.profile",
        "min": 1,
        "max": "1",
        "patternCanonical": "https://demis.rki.de/fhir/StructureDefinition/NotifiedPersonAnonymous",
        "mustSupport": true
      },
      {
        "id": "Patient.contained",
        "path": "Patient.contained",
        "max": "0"
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "max": "0"
      },
      {
        "id": "Patient.active",
        "path": "Patient.active",
        "max": "0"
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "max": "0"
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "max": "0"
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "short": "Geschlecht",
        "definition": "Geschlecht der anonymen betroffenen Person",
        "mustSupport": true
      },
      {
        "id": "Patient.gender.extension",
        "path": "Patient.gender.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Patient.gender.extension:other-amtlich",
        "path": "Patient.gender.extension",
        "sliceName": "other-amtlich",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.de/StructureDefinition/gender-amtlich-de"
            ]
          }
        ]
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "short": "Geburtsdatum",
        "definition": "Geburtsdatum der anonymen betroffenen Person",
        "constraint": [
          {
            "key": "yearAndMonthOnlyBirthDate",
            "severity": "error",
            "human": "Das Geburtsdatum darf lediglich Jahr und Monat der Geburt beinhalten. Das Geburtsjahr muss mit 19 oder 20 beginnen.",
            "expression": "$this.toString().matches('^19[0-9]{2}-[0-9]{2}|20[0-9]{2}-[0-9]{2}|19[0-9]{2}|20[0-9]{2}$')"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.deceased[x]",
        "path": "Patient.deceased[x]",
        "max": "0"
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "extension('https://demis.rki.de/fhir/StructureDefinition/AddressUse').value"
            }
          ],
          "rules": "closed"
        },
        "short": "Adresse",
        "definition": "Adresse der anonymen betroffenen Person",
        "max": "3",
        "mustSupport": true
      },
      {
        "id": "Patient.address:hauptwohnung",
        "path": "Patient.address",
        "sliceName": "hauptwohnung",
        "max": "1",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://fhir.de/StructureDefinition/address-de-basis"
            ]
          }
        ]
      },
      {
        "id": "Patient.address:hauptwohnung.extension",
        "path": "Patient.address.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Patient.address:hauptwohnung.extension:addressUse",
        "path": "Patient.address.extension",
        "sliceName": "addressUse",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://demis.rki.de/fhir/StructureDefinition/AddressUse"
            ]
          }
        ],
        "mustSupport": true,
        "isModifier": false
      },
      {
        "id": "Patient.address:hauptwohnung.extension:addressUse.value[x]",
        "path": "Patient.address.extension.value[x]",
        "fixedCoding": {
          "system": "https://demis.rki.de/fhir/CodeSystem/addressUse",
          "code": "primary"
        },
        "mustSupport": true
      },
      {
        "id": "Patient.address:hauptwohnung.use",
        "path": "Patient.address.use",
        "max": "0"
      },
      {
        "id": "Patient.address:hauptwohnung.type",
        "path": "Patient.address.type",
        "max": "0"
      },
      {
        "id": "Patient.address:hauptwohnung.text",
        "path": "Patient.address.text",
        "max": "0"
      },
      {
        "id": "Patient.address:hauptwohnung.line",
        "path": "Patient.address.line",
        "max": "0"
      },
      {
        "id": "Patient.address:hauptwohnung.city",
        "path": "Patient.address.city",
        "max": "0"
      },
      {
        "id": "Patient.address:hauptwohnung.district",
        "path": "Patient.address.district",
        "max": "0"
      },
      {
        "id": "Patient.address:hauptwohnung.state",
        "path": "Patient.address.state",
        "max": "0"
      },
      {
        "id": "Patient.address:hauptwohnung.postalCode",
        "path": "Patient.address.postalCode",
        "constraint": [
          {
            "key": "threeDigitPostalCode",
            "severity": "error",
            "human": "Die 'verkürzte' Postleitzahl muss aus den ersten 3 Ziffern der 'normalen' Postleitzahl bestehen.",
            "expression": "$this.toString().matches('^[0-9]{3}$')"
          }
        ]
      },
      {
        "id": "Patient.address:hauptwohnung.country",
        "path": "Patient.address.country",
        "short": "Land",
        "definition": "Land",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://hl7.org/fhir/ValueSet/iso3166-1-2"
        }
      },
      {
        "id": "Patient.address:hauptwohnung.period",
        "path": "Patient.address.period",
        "max": "0"
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort",
        "path": "Patient.address",
        "sliceName": "gewoehnlicherAufenthaltsort",
        "max": "1",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://fhir.de/StructureDefinition/address-de-basis"
            ]
          }
        ]
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.extension",
        "path": "Patient.address.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.extension:addressUse",
        "path": "Patient.address.extension",
        "sliceName": "addressUse",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://demis.rki.de/fhir/StructureDefinition/AddressUse"
            ]
          }
        ],
        "mustSupport": true,
        "isModifier": false
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.extension:addressUse.value[x]",
        "path": "Patient.address.extension.value[x]",
        "fixedCoding": {
          "system": "https://demis.rki.de/fhir/CodeSystem/addressUse",
          "code": "ordinary"
        },
        "mustSupport": true
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.use",
        "path": "Patient.address.use",
        "max": "0"
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.type",
        "path": "Patient.address.type",
        "max": "0"
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.text",
        "path": "Patient.address.text",
        "max": "0"
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.line",
        "path": "Patient.address.line",
        "max": "0"
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.city",
        "path": "Patient.address.city",
        "max": "0"
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.district",
        "path": "Patient.address.district",
        "max": "0"
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.state",
        "path": "Patient.address.state",
        "max": "0"
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.postalCode",
        "path": "Patient.address.postalCode",
        "constraint": [
          {
            "key": "threeDigitPostalCode",
            "severity": "error",
            "human": "Die 'verkürzte' Postleitzahl muss aus den ersten 3 Ziffern der 'normalen' Postleitzahl bestehen.",
            "expression": "$this.toString().matches('^[0-9]{3}$')"
          }
        ]
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.country",
        "path": "Patient.address.country",
        "short": "Land",
        "definition": "Land",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://hl7.org/fhir/ValueSet/iso3166-1-2"
        }
      },
      {
        "id": "Patient.address:gewoehnlicherAufenthaltsort.period",
        "path": "Patient.address.period",
        "max": "0"
      },
      {
        "id": "Patient.maritalStatus",
        "path": "Patient.maritalStatus",
        "max": "0"
      },
      {
        "id": "Patient.multipleBirth[x]",
        "path": "Patient.multipleBirth[x]",
        "max": "0"
      },
      {
        "id": "Patient.photo",
        "path": "Patient.photo",
        "max": "0"
      },
      {
        "id": "Patient.contact",
        "path": "Patient.contact",
        "max": "0"
      },
      {
        "id": "Patient.communication",
        "path": "Patient.communication",
        "max": "0"
      },
      {
        "id": "Patient.generalPractitioner",
        "path": "Patient.generalPractitioner",
        "max": "0"
      },
      {
        "id": "Patient.managingOrganization",
        "path": "Patient.managingOrganization",
        "max": "0"
      },
      {
        "id": "Patient.link",
        "path": "Patient.link",
        "max": "0"
      }
    ]
  }
}