<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="cyehr-sd-person-r4" />
  <meta>
    <versionId value="5" />
    <lastUpdated value="2022-07-19T04:40:51.4794457+00:00" />
  </meta>
  <url value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-person-r4" />
  <name value="CYEHRSDPerson" />
  <title value="Cyprus EHR Person profile" />
  <status value="draft" />
  <experimental value="true" />
  <date value="2022-04-07T11:56:47.6053753+00:00" />
  <publisher value="eHealth4U" />
  <contact>
    <name value="eHealth Lab (University of Cyprus)" />
    <telecom>
      <system value="email" />
      <value value="ehealthl@ucy.ac.cy" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="Person profile for the prototype of the national integrated EHR of Cyprus. The main use-case of this profile is to describe the citizens that live, work or visit Cyprus for a specific period. The profile describes permanent or temporary residents of Cyprus, as well, as tourists." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Person" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Person" />
  <derivation value="constraint" />
  <differential>
    <element id="Person">
      <path value="Person" />
      <comment value="The Person resource does justice to person registries that keep track of persons regardless of their role. The Person resource is also a primary resource to point to for people acting in a particular role such as SubjectofCare, Practitioner, and Agent. Very few attributes are specific to any role and so Person is kept lean. Most attributes are expected to be tied to the role the Person plays rather than the Person himself. Examples of that are Guardian (SubjectofCare), ContactParty (SubjectOfCare, Practitioner), and multipleBirthInd (SubjectofCare).&#xD;&#xA;&#xD;&#xA;CyprusEHR: The Person profile SHALL be used to describe demographics and administrative information for citizens that participate to the national integrated EHR of Cyprus regardless of their role. When a patient recieves services via the national integrated EHR of Cyprus, the Patient profile SHALL be also used to describe the administrative and demographic data. In the case that a patient uses the national integrated EHR of Cyprus anonymously or with a pseudoname, only the Patient resource SHALL be used (without the use of the Person profile) explicitely stating that the Patient is anonymous or using a pseudoname. In this regard, for the Person profile: the Identifier is mandatory, the name is also mandatory and its use is always official, there SHALL be at least one telecom (either email or phone)." />
      <constraint>
        <key value="cyehr-person-1" />
        <severity value="error" />
        <human value="All Person instances shall have either a National Identity or a Passport or Alien Registration Card" />
        <expression value="identifier.where(system='urn:oid:2.16.840.1.113883.3.9143.2.1.1' or system='urn:oid:2.16.840.1.113883.3.9143.2.1.2' or system='urn:oid:2.16.840.1.113883.3.9143.2.1.3').exists()" />
        <source value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-person-r4" />
      </constraint>
      <constraint>
        <key value="cyehr-person-2" />
        <severity value="error" />
        <human value="A citizen must have an identification number registered in Cyprus (nationalIdenitty or Passport with issuing coutnry =Cyprus or ARC) in order to have a national social insurance number" />
        <expression value="identifier.where(system='urn:oid:2.16.840.1.113883.3.9143.2.1.4').exists() implies ( identifier.where(system='urn:oid:2.16.840.1.113883.3.9143.2.1.1' or system='urn:oid:2.16.840.1.113883.3.9143.2.1.2').extension('http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry').valueCodeableConcept.coding.where(code = 'CY').exists() or identifier.where(system='urn:oid:2.16.840.1.113883.3.9143.2.1.3').exists() )" />
        <source value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-person-r4" />
      </constraint>
    </element>
    <element id="Person.meta">
      <path value="Person.meta" />
    </element>
    <element id="Person.meta.profile">
      <path value="Person.meta.profile" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Person.meta.profile:CyprusEHRProfile">
      <path value="Person.meta.profile" />
      <sliceName value="CyprusEHRProfile" />
      <min value="1" />
      <max value="1" />
      <fixedCanonical value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-person-r4" />
    </element>
    <element id="Person.identifier">
      <path value="Person.identifier" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <definition value="Identifier for a person within a particular scope.&#xD;&#xA;&#xD;&#xA;CyprusEHR: Identifiers should be provided for every person registered in national integrated EHR system of Cyprus. There are four 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) and (4) the Social Insurance Services. A Person SHALL have at least one of the first three identifiers." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Person.identifier.system">
      <path value="Person.identifier.system" />
      <min value="1" />
    </element>
    <element id="Person.identifier.value">
      <path value="Person.identifier.value" />
      <min value="1" />
    </element>
    <element id="Person.identifier:nationalIdentity">
      <path value="Person.identifier" />
      <sliceName value="nationalIdentity" />
      <short value="National Identification Number from any country." />
      <definition value="Identifier for a person within a particular scope.&#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="CyprusEHR: For national identity card of Cyprus: http://moi.gov.cy/moi/CRMD/crmd.nsf/All/6263F7FAF548FDF0C2257D2C0030B3D7?OpenDocument&#xD;&#xA;&#xD;&#xA;CyprusEHR: The nationalIdentity.system is the number taken from the NeHA OID tree representing the national identification number as an indentification mechanism for humans." />
      <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-person-3" />
        <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-person-r4" />
      </constraint>
    </element>
    <element id="Person.identifier:nationalIdentity.extension">
      <path value="Person.identifier.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Person.identifier:nationalIdentity.extension:issuingCountry">
      <path value="Person.identifier.extension" />
      <sliceName value="issuingCountry" />
      <short value="Issuing country of the person's national identity." />
      <definition value="Issuing country of the person's national identity using a 2-code of ISO 3166-1 countries." />
      <min value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry" />
      </type>
    </element>
    <element id="Person.identifier:nationalIdentity.extension:issuingCountry.value[x]">
      <path value="Person.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="Person.identifier:nationalIdentity.extension:issuingCountry.value[x].coding.system">
      <path value="Person.identifier.extension.value[x].coding.system" />
      <min value="1" />
      <fixedUri value="urn:iso:std:iso:3166" />
    </element>
    <element id="Person.identifier:nationalIdentity.extension:issuingCountry.value[x].coding.code">
      <path value="Person.identifier.extension.value[x].coding.code" />
      <min value="1" />
    </element>
    <element id="Person.identifier:nationalIdentity.extension:issuingCountry.value[x].coding.display">
      <path value="Person.identifier.extension.value[x].coding.display" />
      <min value="1" />
    </element>
    <element id="Person.identifier:nationalIdentity.system">
      <path value="Person.identifier.system" />
      <min value="1" />
    </element>
    <element id="Person.identifier:nationalIdentity.value">
      <path value="Person.identifier.value" />
      <min value="1" />
    </element>
    <element id="Person.identifier:passport">
      <path value="Person.identifier" />
      <sliceName value="passport" />
      <short value="The passport as identification of a human." />
      <definition value="Identifier for a person 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="CyprusEHR: The passport.system is the number taken from the NeHA OID tree representing the passport number as an indentification mechanism for humans." />
      <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-person-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-person-r4" />
      </constraint>
    </element>
    <element id="Person.identifier:passport.extension">
      <path value="Person.identifier.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Person.identifier:passport.extension:issuingCountry">
      <path value="Person.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="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry" />
      </type>
    </element>
    <element id="Person.identifier:passport.extension:issuingCountry.value[x]">
      <path value="Person.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="Person.identifier:passport.extension:issuingCountry.value[x].coding.system">
      <path value="Person.identifier.extension.value[x].coding.system" />
      <min value="1" />
      <fixedUri value="urn:iso:std:iso:3166" />
    </element>
    <element id="Person.identifier:passport.extension:issuingCountry.value[x].coding.code">
      <path value="Person.identifier.extension.value[x].coding.code" />
      <min value="1" />
    </element>
    <element id="Person.identifier:passport.extension:issuingCountry.value[x].coding.display">
      <path value="Person.identifier.extension.value[x].coding.display" />
      <min value="1" />
    </element>
    <element id="Person.identifier:passport.system">
      <path value="Person.identifier.system" />
      <min value="1" />
    </element>
    <element id="Person.identifier:passport.value">
      <path value="Person.identifier.value" />
      <min value="1" />
    </element>
    <element id="Person.identifier:alienResidentCard">
      <path value="Person.identifier" />
      <sliceName value="alienResidentCard" />
      <short value="Alien Resident Card Number as registered in Cyprus." />
      <definition value="Identifier for a person within a particular scope.&#xD;&#xA;&#xD;&#xA;CyprusEHR: Represents the Alien Resident Card Number as registered in Cyprus." />
      <comment value="CyprusEHR: The registration certificate, or administratively called MEU-1 or MEU-2, identified as the Yellow slip (simply because it's printed on Yellow sheets) is available to everyone wishing to live, work or simply visitors desiring to have a long term residence in Cyprus.&#xD;&#xA;&#xD;&#xA;-The MEU-1 is only available for EEA Citizens and citizens of the Swiss Confederation . European Economic Area, abbreviate as EEA, consisted of 27 members states of Europeans Union + 3 countries of the European Free Trade Associations ( Island, Liechtenstein and Norway). -The MEU-2 is done for family-members of Europeans members citizens that are nor-europeans citizens. -The MEU-3 is the available after 5 years residency in Cyprus. You will obtain a permanent resident id-card. It is available for europeans citizens.&#xD;&#xA;&#xD;&#xA;Pink Slip is for the non-europeans who are settled in Cyprus, called Cyprus temporary residence permit. It also enables tourists and visitors to extend their stay no matter what was the duration of their initial visa.&#xD;&#xA;&#xD;&#xA;http://moi.gov.cy/moi/CRMD/crmd.nsf/page07_en/page07_en?OpenDocument&#xD;&#xA;&#xD;&#xA;CyprusEHR: 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="Person.identifier:alienResidentCard.system">
      <path value="Person.identifier.system" />
      <min value="1" />
    </element>
    <element id="Person.identifier:alienResidentCard.value">
      <path value="Person.identifier.value" />
      <min value="1" />
    </element>
    <element id="Person.identifier:socialInsuranceServices">
      <path value="Person.identifier" />
      <sliceName value="socialInsuranceServices" />
      <short value="Social Insurance Services" />
      <definition value="Identifier for a person within a particular scope.&#xD;&#xA;&#xD;&#xA;CyprusEHR: Represents the Social Insurance Services number as registered in Cyprus." />
      <comment value="CyprusEHR: A number Social Insurance Services Number is provided by the Ministry of Labour, Welfare and Social Insurance of Cyprus to all Cypriot and EU citizens for their contribution to the Social Insurance Scheme. http://www.mlsi.gov.cy/mlsi/sid/sidv2.nsf/index_en/index_en&#xD;&#xA;&#xD;&#xA;CyprusEHR: The socialInsuranceServices.system is the number taken from the NeHA OID tree representing the social insurance services number of Cyprus as an indentification mechanism for humans." />
      <max value="1" />
      <patternIdentifier>
        <use value="official" />
        <system value="urn:oid:2.16.840.1.113883.3.9143.2.1.4" />
      </patternIdentifier>
    </element>
    <element id="Person.identifier:socialInsuranceServices.system">
      <path value="Person.identifier.system" />
      <min value="1" />
    </element>
    <element id="Person.identifier:socialInsuranceServices.value">
      <path value="Person.identifier.value" />
      <min value="1" />
    </element>
    <element id="Person.name">
      <path value="Person.name" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="HumanName" />
        <profile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-humanname" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Person.name.use">
      <path value="Person.name.use" />
      <definition value="Identifies the purpose for this name.&#xD;&#xA;&#xD;&#xA;CyprusEHR: As recorded on their identifiers." />
      <min value="1" />
      <fixedCode value="official" />
    </element>
    <element id="Person.telecom">
      <path value="Person.telecom" />
      <mustSupport value="true" />
    </element>
    <element id="Person.gender">
      <path value="Person.gender" />
      <mustSupport value="true" />
    </element>
    <element id="Person.birthDate">
      <path value="Person.birthDate" />
      <mustSupport value="true" />
    </element>
    <element id="Person.address">
      <path value="Person.address" />
      <short value="One or more addresses for the person." />
      <definition value="One or more addresses for the person.&#xD;&#xA;&#xD;&#xA;CyprusEHR: It SHOULD be used for home addresses (address.use = home)." />
      <type>
        <code value="Address" />
        <profile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-address" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Address" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Person.managingOrganization">
      <path value="Person.managingOrganization" />
      <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.&#xD;&#xA;&#xD;&#xA;CyprusEHR: managingOrganization for the national Integrated EHR of Cyprus SHALL be the National eHealth Authority of Cyprus (NeHA)." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-organization-r4" />
        <aggregation value="referenced" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Person.active">
      <path value="Person.active" />
      <label value="Active Record" />
      <comment value="CyprusEHR: A Person SHALL be inactivated if citizen is dead or if the Person record was created in error." />
      <min value="1" />
    </element>
    <element id="Person.link">
      <path value="Person.link" />
      <mustSupport value="true" />
    </element>
    <element id="Person.link.target">
      <path value="Person.link.target" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Person" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-patient" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-practitioner-r4" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-person-r4" />
        <aggregation value="referenced" />
      </type>
    </element>
  </differential>
</StructureDefinition>