{
  "resourceType": "StructureDefinition",
  "url": "http://apiframework.dedalus.eu/fhir/StructureDefinition/Patient",
  "name": "Patient",
  "title": "API Framework Patient",
  "status": "active",
  "experimental": false,
  "description": "Dedalus API Framework core profile for Patient",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.id",
        "path": "Patient.id",
        "mustSupport": true
      },
      {
        "id": "Patient.meta",
        "path": "Patient.meta",
        "type": [
          {
            "code": "Meta",
            "profile": "http://apiframework.dedalus.eu/fhir/StructureDefinition/Meta-ForCommonConformance"
          }
        ]
      },
      {
        "id": "Patient.text",
        "path": "Patient.text",
        "mustSupport": true
      },
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.extension:birthPlace",
        "path": "Patient.extension",
        "sliceName": "birthPlace",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/birthPlace"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:birthPlace.valueAddress:valueAddress",
        "path": "Patient.extension.valueAddress",
        "sliceName": "valueAddress",
        "max": "1",
        "type": [
          {
            "code": "Address",
            "profile": "http://apiframework.dedalus.eu/fhir/StructureDefinition/Address"
          }
        ]
      },
      {
        "id": "Patient.extension:birthPlace.valueAddress:valueAddress.extension:qualifier",
        "path": "Patient.extension.valueAddress.extension",
        "sliceName": "qualifier",
        "requirements": "Qualifier is not used since the birthPlace extension already qualifies the address purpose."
      },
      {
        "id": "Patient.extension:birthPlace.valueAddress:valueAddress.extension:qualifier.valueCode:valueCode",
        "path": "Patient.extension.valueAddress.extension.valueCode",
        "sliceName": "valueCode",
        "min": 1,
        "fixedCode": "BIRTHPL"
      },
      {
        "id": "Patient.extension:citizenship",
        "path": "Patient.extension",
        "sliceName": "citizenship",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/patient-citizenship"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:citizenship.extension:code",
        "path": "Patient.extension.extension",
        "sliceName": "code"
      },
      {
        "id": "Patient.extension:citizenship.extension:code.valueCodeableConcept:valueCodeableConcept",
        "path": "Patient.extension.extension.valueCodeableConcept",
        "sliceName": "valueCodeableConcept"
      },
      {
        "id": "Patient.extension:citizenship.extension:period",
        "path": "Patient.extension.extension",
        "sliceName": "period"
      },
      {
        "id": "Patient.extension:citizenship.extension:period.valuePeriod:valuePeriod",
        "path": "Patient.extension.extension.valuePeriod",
        "sliceName": "valuePeriod"
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "requirements": "Slicing on Identifier introduced to manage Dedalus MPI default identifier.",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.type",
        "path": "Patient.identifier.type",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.system",
        "path": "Patient.identifier.system",
        "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique. This is the identifier element used to distinguish an identifier inside a list",
        "min": 1,
        "example": [
          {
            "label": "Dedalus registered HL7 OID",
            "valueUri": "urn:oid:2.16.840.1.113883.2.9.3.12.4.1"
          }
        ],
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "description": "Affinity Domain Systems",
          "valueSetReference": {
            "reference": "http://apiframework.dedalus.eu/fhir/ValueSet/PatientIdentifierSystems"
          }
        }
      },
      {
        "id": "Patient.identifier.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.period",
        "path": "Patient.identifier.period",
        "mustSupport": true
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "type": [
          {
            "code": "HumanName",
            "profile": "http://apiframework.dedalus.eu/fhir/StructureDefinition/HumanName"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "type": [
          {
            "code": "ContactPoint",
            "profile": "http://apiframework.dedalus.eu/fhir/StructureDefinition/ContactPoint"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.extension:note",
        "path": "Patient.telecom.extension",
        "sliceName": "note",
        "short": "Notes to qualify different informations",
        "definition": "example: when I can call you?\r\nIs this number only private?"
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "mustSupport": true
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "mustSupport": true
      },
      {
        "id": "Patient.deceased[x]:deceasedDateTime",
        "path": "Patient.deceasedDateTime",
        "sliceName": "deceasedDateTime",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "type": [
          {
            "code": "Address",
            "profile": "http://apiframework.dedalus.eu/fhir/StructureDefinition/Address"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.address.extension:qualifier",
        "path": "Patient.address.extension",
        "sliceName": "qualifier",
        "short": "Extension to define different types of address",
        "definition": "See CS concepts for definitions"
      },
      {
        "id": "Patient.address.extension:placeCode",
        "path": "Patient.address.extension",
        "sliceName": "placeCode",
        "short": "ISTAT code",
        "definition": "see CS"
      },
      {
        "id": "Patient.address.extension:placeCode.valueCoding:valueCoding.system",
        "path": "Patient.address.extension.valueCoding.system",
        "mustSupport": true
      },
      {
        "id": "Patient.address.extension:placeCode.valueCoding:valueCoding.code",
        "path": "Patient.address.extension.valueCoding.code",
        "mustSupport": true
      },
      {
        "id": "Patient.address.extension:unitId",
        "path": "Patient.address.extension",
        "sliceName": "unitId",
        "short": "Address UnitID definition",
        "definition": "example \"floor 2/b\"",
        "requirements": "Fragment of address containing information on address unit id (aka building). In italy, this is the \"numero civico\"."
      },
      {
        "id": "Patient.address.extension:unitId.valueString:valueString",
        "path": "Patient.address.extension.valueString",
        "sliceName": "valueString",
        "mustSupport": true
      },
      {
        "id": "Patient.address.extension:houseNumber",
        "path": "Patient.address.extension",
        "sliceName": "houseNumber",
        "requirements": "Fragment of address containing information on house number. In italy, this is the \"interno\"."
      },
      {
        "id": "Patient.maritalStatus",
        "path": "Patient.maritalStatus",
        "mustSupport": true
      },
      {
        "id": "Patient.photo",
        "path": "Patient.photo",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.animal",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "Animal"
          }
        ],
        "path": "Patient.animal",
        "max": "0",
        "mustSupport": false
      },
      {
        "id": "Patient.generalPractitioner",
        "path": "Patient.generalPractitioner",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://apiframework.dedalus.eu/fhir/StructureDefinition/Practitioner"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.generalPractitioner.reference",
        "path": "Patient.generalPractitioner.reference",
        "mustSupport": true
      },
      {
        "id": "Patient.managingOrganization",
        "path": "Patient.managingOrganization",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://apiframework.dedalus.eu/fhir/StructureDefinition/Organization"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.managingOrganization.reference",
        "path": "Patient.managingOrganization.reference",
        "mustSupport": true
      },
      {
        "id": "Patient.link",
        "path": "Patient.link",
        "requirements": "This Field is intended for Merge Communication purposes. If present in a DELETE method call it's used as a Reference to the remaining Patient record. \nAccording to REST semantic, record related to the main Patient resource is deleted and all his remaining attributes reconnected to the linked Patient resource.",
        "mustSupport": true
      },
      {
        "id": "Patient.link.other",
        "path": "Patient.link.other",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://apiframework.dedalus.eu/fhir/StructureDefinition/Patient"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.link.type",
        "path": "Patient.link.type",
        "fixedCode": "replaced-by",
        "mustSupport": true
      }
    ]
  }
}