{
  "resourceType": "StructureDefinition",
  "id": "EIPatient",
  "meta": {
    "versionId": "6",
    "lastUpdated": "2020-03-12T13:21:38.519+00:00"
  },
  "url": "http://www.agfa.com/ei/fhir/StructureDefinition/EIPatient",
  "name": "EIPatient",
  "status": "draft",
  "date": "2020-03-12T13:21:37.9707607Z",
  "description": "AGFA Enterprise Imaging customized Patient resource definition",
  "fhirVersion": "4.0.0",
  "mapping": [
    {
      "identity": "agfa-ei-model",
      "uri": "http://www.agfa.com/agfa-ei-model",
      "name": "Enterprise Imaging DB model"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "Patient.id",
        "path": "Patient.id",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "agfa-ei-model",
            "map": "PATIENT#PK"
          }
        ]
      },
      {
        "id": "Patient.identifier",
        "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",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://www.agfa.com/ei/fhir/StructureDefinition/EIIdentifier"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:ActiveIdentifiers",
        "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": "ActiveIdentifiers",
        "comment": "If a patient has multiple identifiers of the same issuer, then only one can be active and the others are inactive. The inactive ones are linked via table REL_LINKED_PATIENT_ID",
        "min": 1,
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://www.agfa.com/ei/fhir/StructureDefinition/EIIdentifier"
            ]
          }
        ],
        "patternIdentifier": {
          "use": "official",
          "type": {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                "code": "PI"
              }
            ]
          }
        },
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:InactiveIdentifiers",
        "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": "InactiveIdentifiers",
        "comment": "If a patient has multiple identifiers of the same issuer, then only one can be active and the others are inactive. The inactive ones are linked via table REL_LINKED_PATIENT_ID",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://www.agfa.com/ei/fhir/StructureDefinition/EIIdentifier"
            ]
          }
        ],
        "patternIdentifier": {
          "use": "old",
          "type": {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                "code": "PI"
              }
            ]
          }
        },
        "mustSupport": true
      },
      {
        "id": "Patient.active",
        "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.active",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "agfa-ei-model",
            "map": "PATIENT#ACTIVE"
          }
        ]
      },
      {
        "id": "Patient.name",
        "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.name",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "given"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "type": [
          {
            "code": "HumanName",
            "profile": [
              "http://www.agfa.com/ei/fhir/StructureDefinition/EIPersonName"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.name:OfficialName",
        "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.name",
        "sliceName": "OfficialName",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "HumanName",
            "profile": [
              "http://www.agfa.com/ei/fhir/StructureDefinition/EIPersonName"
            ]
          }
        ],
        "patternHumanName": {
          "use": "official"
        },
        "mustSupport": true
      },
      {
        "id": "Patient.name:OfficialName.prefix",
        "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.name.prefix",
        "mapping": [
          {
            "identity": "agfa-ei-model",
            "map": "dSDsd"
          }
        ]
      },
      {
        "id": "Patient.name:MaidenName",
        "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.name",
        "sliceName": "MaidenName",
        "definition": "A human's name with the ability to identify parts and usage.",
        "type": [
          {
            "code": "HumanName",
            "profile": [
              "http://www.agfa.com/ei/fhir/StructureDefinition/EIPersonName"
            ]
          }
        ],
        "patternHumanName": {
          "use": "maiden"
        },
        "mustSupport": true
      },
      {
        "id": "Patient.name:MaidenName.use",
        "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.name.use",
        "definition": "Identifies the purpose for this name ."
      },
      {
        "id": "Patient.name:test",
        "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.name",
        "sliceName": "test"
      },
      {
        "id": "Patient.telecom",
        "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.telecom",
        "type": [
          {
            "code": "ContactPoint",
            "profile": [
              "http://www.agfa.com/ei/fhir/StructureDefinition/EIContactPoint"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.system",
        "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.telecom.system",
        "slicing": {
          "description": "abc",
          "rules": "open"
        }
      },
      {
        "id": "Patient.telecom.system:sliceSystem",
        "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.telecom.system",
        "sliceName": "sliceSystem"
      },
      {
        "id": "Patient.gender",
        "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.gender",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "agfa-ei-model",
            "map": "PATIENT#PAT_SEX",
            "comment": "Supported values - male female unknown (other will be mapped to unknown)"
          }
        ]
      },
      {
        "id": "Patient.birthDate",
        "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.birthDate",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "agfa-ei-model",
            "map": "PATIENT#PAT_BIRTHDATE"
          }
        ]
      },
      {
        "id": "Patient.deceased[x]",
        "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.deceased[x]",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true,
        "mapping": [
          {
            "identity": "agfa-ei-model",
            "map": "PATIENT#PAT_DECEASEDDATE"
          }
        ]
      },
      {
        "id": "Patient.address",
        "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.address",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://www.agfa.com/ei/fhir/StructureDefinition/EIAddress"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.generalPractitioner",
        "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.generalPractitioner",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://www.agfa.com/ei/fhir/StructureDefinition/EIProfessional"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.generalPractitioner:PrimaryPhysician",
        "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.generalPractitioner",
        "sliceName": "PrimaryPhysician",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://www.agfa.com/ei/fhir/StructureDefinition/EIProfessional"
            ]
          }
        ],
        "patternReference": {
          "type": "Practitioner"
        },
        "mustSupport": true,
        "mapping": [
          {
            "identity": "agfa-ei-model",
            "map": "PATIENT#PROFESSIONAL",
            "comment": "Patient.primaryPhysician"
          }
        ]
      },
      {
        "id": "Patient.generalPractitioner:PrimaryPhysician.reference",
        "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.generalPractitioner.reference",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "agfa-ei-model",
            "map": "PROFESSIONAL#ID"
          }
        ]
      },
      {
        "id": "Patient.generalPractitioner:PrimaryPhysician.type",
        "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.generalPractitioner.type",
        "fixedUri": "Practitioner",
        "mustSupport": true
      },
      {
        "id": "Patient.generalPractitioner:PrimaryPhysician.display",
        "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"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Patient.generalPractitioner.display",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "agfa-ei-model",
            "map": "[Calculated Field]",
            "comment": "Calculated string representation of the physicians' name according to the System Settings configuration"
          }
        ]
      }
    ]
  }
}