{
  "resourceType": "StructureDefinition",
  "id": "biobankcy-sd-citizen",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2022-12-06T14:08:33.4348624+00:00"
  },
  "url": "http://ig.biobank.cy/fhir/StructureDefinition/biobankcy-sd-citizen",
  "name": "BIOBANKCYSDCitizen",
  "title": "Profile: Citizen (biobank.cy)",
  "status": "draft",
  "date": "2022-03-24T10:46:38.3751258+00:00",
  "publisher": "biobank.cy",
  "contact": [
    {
      "name": "Molecular Medicine Research Center (MMRC)",
      "telecom": [
        {
          "system": "email",
          "value": "biobank@ucy.ac.cy",
          "use": "work"
        }
      ]
    }
  ],
  "description": "The identified participants joining the biobank.cy data warehouse either for research or diagnostic purposes.",
  "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",
        "short": "Information about an individual",
        "definition": "Demographics and other administrative information about an receiving research or diagnostic services in biobank.cy",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "definition": "Identifiers can be provided for every person registered in the biobank. There are three possible identifiers that can be used: (1) the national identity and the issuing country (2) the passport and the issuing country  (3) the Alien Resident Card (in Cyprus) \r\n\r\nAdditionally, there are internal identifiers for the biobank.cy which are (1) MPI (Master Patient Index) which identifies the citizens accross all the research projects internally in the biobank.cy",
        "requirements": "People are known by a variety of ids. Some institutions maintain several, and most collect identifiers for exchange with other organizations concerning the person. Examples are national person identifier and local identifier.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:nationalIdentity",
        "path": "Patient.identifier",
        "sliceName": "nationalIdentity",
        "short": "An identifier for this patient: National Identification Number from any country.",
        "definition": "An identifier for this patient.\r\n\r\nCyprusEHR: Represents the national identity as published by a specific country. Therefore, the value of the nationalIdentity is the combination of a country code (see issuingCountry: http://hl7.org/fhir/ValueSet/iso3166-1-2) + the special character \"/\" + the national identity number (e.g. CY/1234567, GR/X-982120). The nationalIdentity can be used to record the national identity number of a person from any country included in the value set defined by the ISO 3166-1.",
        "comment": "The nationalIdentity.system is the number taken from the NeHA OID tree representing the national identification number as an indentification mechanism for humans.",
        "requirements": "People are known by a variety of ids. Some institutions maintain several, and most collect identifiers for exchange with other organizations concerning the person. Examples are national person identifier and local identifier.",
        "max": "1",
        "patternIdentifier": {
          "use": "official",
          "system": "urn:oid:2.16.840.1.113883.3.9143.2.1.1"
        },
        "constraint": [
          {
            "key": "cyehr-patient-3",
            "severity": "error",
            "human": "If the identification is the nationalIdentity or passport then the first 2 digits of the identification.value must be the same with the issuingCountry and the third digit must be the slash character",
            "expression": "value.substring(0,3) = extension('http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry').valueCodeableConcept.coding.code + '/'",
            "source": "http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-patient-r4"
          }
        ]
      },
      {
        "id": "Patient.identifier:nationalIdentity.extension",
        "path": "Patient.identifier.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Patient.identifier:nationalIdentity.extension:issuingCountry",
        "path": "Patient.identifier.extension",
        "sliceName": "issuingCountry",
        "min": 1,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.identifier:nationalIdentity.extension:issuingCountry.value[x]",
        "path": "Patient.identifier.extension.value[x]",
        "binding": {
          "strength": "extensible",
          "description": "Iso 3166 Part 1: 2 Letter Codes",
          "valueSet": "http://hl7.org/fhir/ValueSet/iso3166-1-2"
        }
      },
      {
        "id": "Patient.identifier:nationalIdentity.system",
        "path": "Patient.identifier.system",
        "min": 1
      },
      {
        "id": "Patient.identifier:nationalIdentity.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:passport",
        "path": "Patient.identifier",
        "sliceName": "passport",
        "short": "The passport as identification of a human.",
        "definition": "Identifier for a patient within a particular scope.\r\n\r\nCyprusEHR: Represents the passport as published by a specific country. Therefore, the value of the passport is the combination of a country code (see issuingCountry: http://hl7.org/fhir/ValueSet/iso3166-1-2) + the special character \"/\" + the passport number (e.g. CY/K675677768E, CN/E65050920). The passport can be used to record the passport number of a person from any country included in the value set defined by the ISO 3166-1.",
        "comment": "The passport.system is the number taken from the NeHA OID tree representing the passport number as an indentification mechanism for humans.",
        "requirements": "People are known by a variety of ids. Some institutions maintain several, and most collect identifiers for exchange with other organizations concerning the person. Examples are national person identifier and local identifier.",
        "max": "1",
        "patternIdentifier": {
          "use": "official",
          "system": "urn:oid:2.16.840.1.113883.3.9143.2.1.2"
        },
        "constraint": [
          {
            "key": "cyehr-patient-4",
            "severity": "error",
            "human": "If the identification is nationalIdentity or passport then the first 2 digits of the identification.value must be the same with the issuingCountry and the third digit must be the slash character",
            "expression": "value.substring(0,3) = extension('http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry').valueCodeableConcept.coding.code + '/'",
            "source": "http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-patient-r4"
          }
        ]
      },
      {
        "id": "Patient.identifier:passport.extension",
        "path": "Patient.identifier.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "Patient.identifier:passport.extension:issuingCountry",
        "path": "Patient.identifier.extension",
        "sliceName": "issuingCountry",
        "short": "Issuing country of the person's passport.",
        "definition": "CyprusEHR: Issuing country of the person's passport using a 2-code of ISO 3166-1 countries.",
        "min": 0,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.identifier:passport.extension:issuingCountry.value[x]",
        "path": "Patient.identifier.extension.value[x]",
        "binding": {
          "strength": "extensible",
          "description": "Iso 3166 Part 1: 2 Letter Codes",
          "valueSet": "http://hl7.org/fhir/ValueSet/iso3166-1-2"
        }
      },
      {
        "id": "Patient.identifier:passport.system",
        "path": "Patient.identifier.system",
        "min": 1
      },
      {
        "id": "Patient.identifier:passport.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:alienResidentCard",
        "path": "Patient.identifier",
        "sliceName": "alienResidentCard",
        "short": "Alien Resident Card Number as registered in Cyprus.",
        "definition": "Represents the Alien Resident Card Number as registered in Cyprus.",
        "comment": "The alienResidentCard.system is the number taken from the NeHA OID tree representing the alien resident card number of Cyprus as an indentification mechanism for humans.",
        "alias": [
          "Yellow Slip",
          "MEU-1",
          "MEU-2",
          "MEU-3",
          "Registration certificate",
          "Pink Slip"
        ],
        "max": "1",
        "patternIdentifier": {
          "use": "official",
          "system": "urn:oid:2.16.840.1.113883.3.9143.2.1.3"
        }
      },
      {
        "id": "Patient.identifier:alienResidentCard.system",
        "path": "Patient.identifier.system",
        "min": 1
      },
      {
        "id": "Patient.identifier:alienResidentCard.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:nationalHealthcarePatientId",
        "path": "Patient.identifier",
        "sliceName": "nationalHealthcarePatientId",
        "short": "National healthcare patient ID",
        "definition": "National healthcare patient ID. In Cyprus is the General Healthcare System (GESY) number.",
        "max": "1",
        "patternIdentifier": {
          "use": "official",
          "system": "urn:oid:2.16.840.1.113883.3.9143.2.1.5"
        }
      },
      {
        "id": "Patient.identifier:nationalHealthcarePatientId.system",
        "path": "Patient.identifier.system",
        "min": 1
      },
      {
        "id": "Patient.identifier:nationalHealthcarePatientId.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:biobankMPI",
        "path": "Patient.identifier",
        "sliceName": "biobankMPI",
        "definition": "Master Patient Index for a citizen in the biobank.cy",
        "min": 1,
        "max": "1",
        "patternIdentifier": {
          "type": {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                "code": "PI"
              }
            ]
          }
        }
      },
      {
        "id": "Patient.identifier:biobankMPI.use",
        "path": "Patient.identifier.use",
        "min": 1
      },
      {
        "id": "Patient.identifier:biobankMPI.type",
        "path": "Patient.identifier.type",
        "min": 1
      },
      {
        "id": "Patient.identifier:biobankMPI.type.coding",
        "path": "Patient.identifier.type.coding",
        "min": 1
      },
      {
        "id": "Patient.identifier:biobankMPI.system",
        "path": "Patient.identifier.system",
        "max": "0"
      },
      {
        "id": "Patient.identifier:biobankMPI.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:biobankMPI.period",
        "path": "Patient.identifier.period",
        "max": "0"
      },
      {
        "id": "Patient.active",
        "path": "Patient.active",
        "min": 1
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "constraint": [
          {
            "key": "ips-pat-1",
            "severity": "error",
            "human": "Patient.name.given or Patient.name.family or both SHALL be present",
            "expression": "family.exists() or given.exists()",
            "xpath": "f:given or f:family",
            "source": "http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips"
          }
        ]
      },
      {
        "id": "Patient.telecom.system",
        "path": "Patient.telecom.system",
        "min": 1
      },
      {
        "id": "Patient.telecom.value",
        "path": "Patient.telecom.value",
        "min": 1
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "min": 1
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.deceased[x]",
        "path": "Patient.deceased[x]",
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "short": "One or more addresses for the person.",
        "definition": "One or more addresses for the person.",
        "comment": "Follow the structure of the prototype of the national EHR address datatype.",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-address"
            ]
          }
        ],
        "constraint": [
          {
            "key": "pat-cnt-2or3-char",
            "severity": "warning",
            "human": "The content of the country element (if present) SHALL be selected EITHER from ValueSet ISO Country Alpha-2 http://hl7.org/fhir/ValueSet/iso3166-1-2 OR MAY be selected from ISO Country Alpha-3 Value Set http://hl7.org/fhir/ValueSet/iso3166-1-3, IF the country is not specified in value Set ISO Country Alpha-2 http://hl7.org/fhir/ValueSet/iso3166-1-2.",
            "expression": "country.empty() or (country.memberOf('http://hl7.org/fhir/ValueSet/iso3166-1-2') or country.memberOf('http://hl7.org/fhir/ValueSet/iso3166-1-3'))",
            "source": "http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips"
          }
        ]
      },
      {
        "id": "Patient.maritalStatus",
        "path": "Patient.maritalStatus",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"
            ]
          }
        ]
      },
      {
        "id": "Patient.contact.relationship",
        "path": "Patient.contact.relationship",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ContactRelationship"
            }
          ],
          "strength": "required",
          "description": "The nature of the relationship between a patient and a contact person for that patient as defined by eHDSI in MVC",
          "valueSet": "http://ig.ehealth4u.eu/fhir/ValueSet/cyehr-vs-ehdsiroleclass"
        }
      },
      {
        "id": "Patient.contact.name.use",
        "path": "Patient.contact.name.use",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.name.family",
        "path": "Patient.contact.name.family",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.name.given",
        "path": "Patient.contact.name.given",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.telecom.system",
        "path": "Patient.contact.telecom.system",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.telecom.value",
        "path": "Patient.contact.telecom.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.contact.telecom.use",
        "path": "Patient.contact.telecom.use",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.address",
        "path": "Patient.contact.address",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Address",
              "http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-address"
            ]
          }
        ]
      },
      {
        "id": "Patient.contact.gender",
        "path": "Patient.contact.gender",
        "short": "Female | Male | Undifferentiated"
      },
      {
        "id": "Patient.contact.organization.reference",
        "path": "Patient.contact.organization.reference",
        "min": 1
      },
      {
        "id": "Patient.communication.language",
        "path": "Patient.communication.language",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"
            ]
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
              "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages"
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "Language"
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean": true
            }
          ],
          "strength": "required",
          "valueSet": "http://ig.biobank.cy/fhir/ValueSet/biobankcy-vs-ehdsilanguage"
        }
      },
      {
        "id": "Patient.communication.language.coding",
        "path": "Patient.communication.language.coding",
        "min": 1
      },
      {
        "id": "Patient.managingOrganization",
        "path": "Patient.managingOrganization",
        "comment": "All the Patients of the biobank.cy shall hve the biobank.cy instance as managingOrganization."
      },
      {
        "id": "Patient.managingOrganization.reference",
        "path": "Patient.managingOrganization.reference",
        "comment": "Reference to biobank.cy organization.",
        "min": 1
      },
      {
        "id": "Patient.link.other.reference",
        "path": "Patient.link.other.reference",
        "min": 1
      }
    ]
  }
}