<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="biobankcy-sd-citizen" />
  <meta>
    <versionId value="1" />
    <lastUpdated value="2022-12-06T14:08:33.4348624+00:00" />
  </meta>
  <url value="http://ig.biobank.cy/fhir/StructureDefinition/biobankcy-sd-citizen" />
  <name value="BIOBANKCYSDCitizen" />
  <title value="Profile: Citizen (biobank.cy)" />
  <status value="draft" />
  <date value="2022-03-24T10:46:38.3751258+00:00" />
  <publisher value="biobank.cy" />
  <contact>
    <name value="Molecular Medicine Research Center (MMRC)" />
    <telecom>
      <system value="email" />
      <value value="biobank@ucy.ac.cy" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="The identified participants joining the biobank.cy data warehouse either for research or diagnostic purposes." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Patient" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient" />
  <derivation value="constraint" />
  <differential>
    <element id="Patient">
      <path value="Patient" />
      <short value="Information about an individual" />
      <definition value="Demographics and other administrative information about an receiving research or diagnostic services in biobank.cy" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier">
      <path value="Patient.identifier" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <definition value="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) &#xD;&#xA;&#xD;&#xA;Additionally, 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 value="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 value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:nationalIdentity">
      <path value="Patient.identifier" />
      <sliceName value="nationalIdentity" />
      <short value="An identifier for this patient: National Identification Number from any country." />
      <definition value="An identifier for this patient.&#xD;&#xA;&#xD;&#xA;CyprusEHR: 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 &quot;/&quot; + 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 value="The nationalIdentity.system is the number taken from the NeHA OID tree representing the national identification number as an indentification mechanism for humans." />
      <requirements value="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 value="1" />
      <patternIdentifier>
        <use value="official" />
        <system value="urn:oid:2.16.840.1.113883.3.9143.2.1.1" />
      </patternIdentifier>
      <constraint>
        <key value="cyehr-patient-3" />
        <severity value="error" />
        <human value="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="value.substring(0,3) = extension('http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry').valueCodeableConcept.coding.code + '/'" />
        <source value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-patient-r4" />
      </constraint>
    </element>
    <element id="Patient.identifier:nationalIdentity.extension">
      <path value="Patient.identifier.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Patient.identifier:nationalIdentity.extension:issuingCountry">
      <path value="Patient.identifier.extension" />
      <sliceName value="issuingCountry" />
      <min value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Patient.identifier:nationalIdentity.extension:issuingCountry.value[x]">
      <path value="Patient.identifier.extension.value[x]" />
      <binding>
        <strength value="extensible" />
        <description value="Iso 3166 Part 1: 2 Letter Codes" />
        <valueSet value="http://hl7.org/fhir/ValueSet/iso3166-1-2" />
      </binding>
    </element>
    <element id="Patient.identifier:nationalIdentity.system">
      <path value="Patient.identifier.system" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:nationalIdentity.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:passport">
      <path value="Patient.identifier" />
      <sliceName value="passport" />
      <short value="The passport as identification of a human." />
      <definition value="Identifier for a patient within a particular scope.&#xD;&#xA;&#xD;&#xA;CyprusEHR: 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 &quot;/&quot; + 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 value="The passport.system is the number taken from the NeHA OID tree representing the passport number as an indentification mechanism for humans." />
      <requirements value="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 value="1" />
      <patternIdentifier>
        <use value="official" />
        <system value="urn:oid:2.16.840.1.113883.3.9143.2.1.2" />
      </patternIdentifier>
      <constraint>
        <key value="cyehr-patient-4" />
        <severity value="error" />
        <human value="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="value.substring(0,3) = extension('http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry').valueCodeableConcept.coding.code + '/'" />
        <source value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-patient-r4" />
      </constraint>
    </element>
    <element id="Patient.identifier:passport.extension">
      <path value="Patient.identifier.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="Patient.identifier:passport.extension:issuingCountry">
      <path value="Patient.identifier.extension" />
      <sliceName value="issuingCountry" />
      <short value="Issuing country of the person's passport." />
      <definition value="CyprusEHR: Issuing country of the person's passport using a 2-code of ISO 3166-1 countries." />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Patient.identifier:passport.extension:issuingCountry.value[x]">
      <path value="Patient.identifier.extension.value[x]" />
      <binding>
        <strength value="extensible" />
        <description value="Iso 3166 Part 1: 2 Letter Codes" />
        <valueSet value="http://hl7.org/fhir/ValueSet/iso3166-1-2" />
      </binding>
    </element>
    <element id="Patient.identifier:passport.system">
      <path value="Patient.identifier.system" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:passport.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:alienResidentCard">
      <path value="Patient.identifier" />
      <sliceName value="alienResidentCard" />
      <short value="Alien Resident Card Number as registered in Cyprus." />
      <definition value="Represents the Alien Resident Card Number as registered in Cyprus." />
      <comment value="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 value="Yellow Slip" />
      <alias value="MEU-1" />
      <alias value="MEU-2" />
      <alias value="MEU-3" />
      <alias value="Registration certificate" />
      <alias value="Pink Slip" />
      <max value="1" />
      <patternIdentifier>
        <use value="official" />
        <system value="urn:oid:2.16.840.1.113883.3.9143.2.1.3" />
      </patternIdentifier>
    </element>
    <element id="Patient.identifier:alienResidentCard.system">
      <path value="Patient.identifier.system" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:alienResidentCard.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:nationalHealthcarePatientId">
      <path value="Patient.identifier" />
      <sliceName value="nationalHealthcarePatientId" />
      <short value="National healthcare patient ID" />
      <definition value="National healthcare patient ID. In Cyprus is the General Healthcare System (GESY) number." />
      <max value="1" />
      <patternIdentifier>
        <use value="official" />
        <system value="urn:oid:2.16.840.1.113883.3.9143.2.1.5" />
      </patternIdentifier>
    </element>
    <element id="Patient.identifier:nationalHealthcarePatientId.system">
      <path value="Patient.identifier.system" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:nationalHealthcarePatientId.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:biobankMPI">
      <path value="Patient.identifier" />
      <sliceName value="biobankMPI" />
      <definition value="Master Patient Index for a citizen in the biobank.cy" />
      <min value="1" />
      <max value="1" />
      <patternIdentifier>
        <type>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
            <code value="PI" />
          </coding>
        </type>
      </patternIdentifier>
    </element>
    <element id="Patient.identifier:biobankMPI.use">
      <path value="Patient.identifier.use" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:biobankMPI.type">
      <path value="Patient.identifier.type" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:biobankMPI.type.coding">
      <path value="Patient.identifier.type.coding" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:biobankMPI.system">
      <path value="Patient.identifier.system" />
      <max value="0" />
    </element>
    <element id="Patient.identifier:biobankMPI.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:biobankMPI.period">
      <path value="Patient.identifier.period" />
      <max value="0" />
    </element>
    <element id="Patient.active">
      <path value="Patient.active" />
      <min value="1" />
    </element>
    <element id="Patient.name">
      <path value="Patient.name" />
      <constraint>
        <key value="ips-pat-1" />
        <severity value="error" />
        <human value="Patient.name.given or Patient.name.family or both SHALL be present" />
        <expression value="family.exists() or given.exists()" />
        <xpath value="f:given or f:family" />
        <source value="http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips" />
      </constraint>
    </element>
    <element id="Patient.telecom.system">
      <path value="Patient.telecom.system" />
      <min value="1" />
    </element>
    <element id="Patient.telecom.value">
      <path value="Patient.telecom.value" />
      <min value="1" />
    </element>
    <element id="Patient.gender">
      <path value="Patient.gender" />
      <min value="1" />
    </element>
    <element id="Patient.birthDate">
      <path value="Patient.birthDate" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.deceased[x]">
      <path value="Patient.deceased[x]" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="Patient.address">
      <path value="Patient.address" />
      <short value="One or more addresses for the person." />
      <definition value="One or more addresses for the person." />
      <comment value="Follow the structure of the prototype of the national EHR address datatype." />
      <type>
        <code value="Address" />
        <profile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-address" />
      </type>
      <constraint>
        <key value="pat-cnt-2or3-char" />
        <severity value="warning" />
        <human value="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 value="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 value="http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips" />
      </constraint>
    </element>
    <element id="Patient.maritalStatus">
      <path value="Patient.maritalStatus" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
    </element>
    <element id="Patient.contact.relationship">
      <path value="Patient.contact.relationship" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ContactRelationship" />
        </extension>
        <strength value="required" />
        <description value="The nature of the relationship between a patient and a contact person for that patient as defined by eHDSI in MVC" />
        <valueSet value="http://ig.ehealth4u.eu/fhir/ValueSet/cyehr-vs-ehdsiroleclass" />
      </binding>
    </element>
    <element id="Patient.contact.name.use">
      <path value="Patient.contact.name.use" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.name.family">
      <path value="Patient.contact.name.family" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.name.given">
      <path value="Patient.contact.name.given" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.telecom.system">
      <path value="Patient.contact.telecom.system" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.telecom.value">
      <path value="Patient.contact.telecom.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.telecom.use">
      <path value="Patient.contact.telecom.use" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.address">
      <path value="Patient.contact.address" />
      <type>
        <code value="Address" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Address" />
        <profile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-address" />
      </type>
    </element>
    <element id="Patient.contact.gender">
      <path value="Patient.contact.gender" />
      <short value="Female | Male | Undifferentiated" />
    </element>
    <element id="Patient.contact.organization.reference">
      <path value="Patient.contact.organization.reference" />
      <min value="1" />
    </element>
    <element id="Patient.communication.language">
      <path value="Patient.communication.language" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
          <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages" />
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Language" />
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true" />
        </extension>
        <strength value="required" />
        <valueSet value="http://ig.biobank.cy/fhir/ValueSet/biobankcy-vs-ehdsilanguage" />
      </binding>
    </element>
    <element id="Patient.communication.language.coding">
      <path value="Patient.communication.language.coding" />
      <min value="1" />
    </element>
    <element id="Patient.managingOrganization">
      <path value="Patient.managingOrganization" />
      <comment value="All the Patients of the biobank.cy shall hve the biobank.cy instance as managingOrganization." />
    </element>
    <element id="Patient.managingOrganization.reference">
      <path value="Patient.managingOrganization.reference" />
      <comment value="Reference to biobank.cy organization." />
      <min value="1" />
    </element>
    <element id="Patient.link.other.reference">
      <path value="Patient.link.other.reference" />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>