{
  "resourceType": "StructureDefinition",
  "meta": {
    "lastUpdated": "2025-12-17T18:53:49.1630312+00:00"
  },
  "url": "http://fhir.alp/StructureDefinition/AlpCorePatient-copy",
  "name": "MyAlphaCorePatient",
  "status": "draft",
  "date": "2020-07-14T10:12:11.5436506+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",
        "short": "Information about an individual receiving health care services",
        "definition": "Demographics and other administrative information about an individual receiving care or other health-related services.",
        "constraint": [
          {
            "key": "pat-lang-1",
            "severity": "error",
            "human": "Max one language shall be the preferred one.",
            "expression": "communication.where(preferred=true).count() <= 1"
          }
        ]
      },
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "min": 2
      },
      {
        "id": "Patient.extension:birthPlace",
        "path": "Patient.extension",
        "sliceName": "birthPlace",
        "min": 1,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/patient-birthPlace"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:disability",
        "path": "Patient.extension",
        "sliceName": "disability",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/patient-disability"
            ]
          }
        ]
      },
      {
        "id": "Patient.extension:occupationExtension",
        "path": "Patient.extension",
        "sliceName": "occupationExtension",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://example.org/fhir/StructureDefinition/OccupationExtension"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:DriversLicense",
        "path": "Patient.identifier",
        "sliceName": "DriversLicense",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.identifier:DriversLicense.system",
        "path": "Patient.identifier.system",
        "fixedUri": "https://www.hl7.org/fhir/4.3.0-snapshot1/identifier-registry.html"
      },
      {
        "id": "Patient.identifier:NationalRegistryID",
        "path": "Patient.identifier",
        "sliceName": "NationalRegistryID",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.identifier:NationalRegistryID.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "patternUri": "http://national.registry.org/ids"
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "type": [
          {
            "code": "HumanName",
            "profile": [
              "https://example.org/fhir/StructureDefinition/MyHumanName"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "use"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.telecom:private-details",
        "path": "Patient.telecom",
        "sliceName": "private-details",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.telecom:private-details.value",
        "path": "Patient.telecom.value",
        "min": 1
      },
      {
        "id": "Patient.telecom:private-details.use",
        "path": "Patient.telecom.use",
        "min": 1,
        "fixedCode": "home"
      },
      {
        "id": "Patient.telecom:work-details",
        "path": "Patient.telecom",
        "sliceName": "work-details",
        "max": "1"
      },
      {
        "id": "Patient.telecom:work-details.value",
        "path": "Patient.telecom.value",
        "min": 1
      },
      {
        "id": "Patient.telecom:work-details.use",
        "path": "Patient.telecom.use",
        "min": 1,
        "fixedCode": "work"
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "mustSupport": true
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.deceased[x]",
        "path": "Patient.deceased[x]",
        "mustSupport": true
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://fhir.alp/StructureDefinition/AlpCoreAddress"
            ]
          }
        ],
        "constraint": [
          {
            "key": "TempAddress",
            "severity": "error",
            "human": "If the address is temporary, the period must be specified.",
            "expression": "period.exists()"
          }
        ]
      },
      {
        "id": "Patient.address.use",
        "path": "Patient.address.use",
        "condition": [
          "TempAddress"
        ]
      },
      {
        "id": "Patient.communication",
        "path": "Patient.communication",
        "condition": [
          "pat-lang-1"
        ]
      },
      {
        "id": "Patient.managingOrganization",
        "path": "Patient.managingOrganization",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.alp/StructureDefinition/AlpCoreOrganization"
            ]
          }
        ]
      }
    ]
  }
}