<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="biobankcy-sd-practitioner" />
  <url value="http://ig.biobank.cy/fhir/StructureDefinition/biobankcy-sd-practitioner" />
  <name value="BIOBANKCYSDPractitioner" />
  <title value="Profile: Practitioner (biobank.cy)" />
  <status value="draft" />
  <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="Represents natural or legal persons or other entity who is legally providing services for the biobank and needs access to biobank.cy data" />
  <purpose value="Practitioner profile is intended to represent every person who provides services in the biobank.cy" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Practitioner" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
  <derivation value="constraint" />
  <differential>
    <element id="Practitioner">
      <path value="Practitioner" />
      <short value="A person with a formal responsibility in the provisioning of biobank.cy services" />
      <definition value="A person who is directly or indirectly involved in the provisioning of biobanking services and needs access to biobank.cy data warehouse." />
      <constraint>
        <key value="biobank.cy-practitioner-1" />
        <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() )" />
      </constraint>
    </element>
    <element id="Practitioner.identifier">
      <path value="Practitioner.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;biobank.cy: Every person providing services to biobank.cy should have a national identifier. 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) 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="Practitioner.identifier.system">
      <path value="Practitioner.identifier.system" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier.value">
      <path value="Practitioner.identifier.value" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:nationalIdentity">
      <path value="Practitioner.identifier" />
      <sliceName value="nationalIdentity" />
      <short value="National Identification Number from any country." />
      <definition value="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="For national identity card of Cyprus: http://moi.gov.cy/moi/CRMD/crmd.nsf/All/6263F7FAF548FDF0C2257D2C0030B3D7?OpenDocument&#xD;&#xA;&#xD;&#xA;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="biobankcy-practitioner-2" />
        <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 + '/'" />
      </constraint>
    </element>
    <element id="Practitioner.identifier:nationalIdentity.extension">
      <path value="Practitioner.identifier.extension" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:nationalIdentity.extension:issuingCountry">
      <path value="Practitioner.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="Practitioner.identifier:nationalIdentity.extension:issuingCountry.url">
      <path value="Practitioner.identifier.extension.url" />
      <fixedUri value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry" />
    </element>
    <element id="Practitioner.identifier:nationalIdentity.extension:issuingCountry.value[x]">
      <path value="Practitioner.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="Practitioner.identifier:nationalIdentity.system">
      <path value="Practitioner.identifier.system" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:nationalIdentity.value">
      <path value="Practitioner.identifier.value" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:passport">
      <path value="Practitioner.identifier" />
      <sliceName value="passport" />
      <short value="The passport as identification of a human." />
      <definition value="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." />
      <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="biobankcy-practitioner-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 + '/'" />
      </constraint>
    </element>
    <element id="Practitioner.identifier:passport.extension">
      <path value="Practitioner.identifier.extension" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:passport.extension:issuingCountry">
      <path value="Practitioner.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="Practitioner.identifier:passport.extension:issuingCountry.url">
      <path value="Practitioner.identifier.extension.url" />
      <fixedUri value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-issuingcountry" />
    </element>
    <element id="Practitioner.identifier:passport.extension:issuingCountry.value[x]">
      <path value="Practitioner.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="Practitioner.identifier:passport.system">
      <path value="Practitioner.identifier.system" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:passport.value">
      <path value="Practitioner.identifier.value" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:passport.assigner">
      <path value="Practitioner.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-organization-r4" />
      </type>
    </element>
    <element id="Practitioner.identifier:alienResidentCard">
      <path value="Practitioner.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="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="Practitioner.identifier:alienResidentCard.system">
      <path value="Practitioner.identifier.system" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:alienResidentCard.value">
      <path value="Practitioner.identifier.value" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:alienResidentCard.assigner">
      <path value="Practitioner.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-organization-r4" />
      </type>
    </element>
    <element id="Practitioner.identifier:socialInsuranceServices">
      <path value="Practitioner.identifier" />
      <sliceName value="socialInsuranceServices" />
      <short value="Social Insurance Services" />
      <definition value="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="Practitioner.identifier:socialInsuranceServices.system">
      <path value="Practitioner.identifier.system" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:socialInsuranceServices.value">
      <path value="Practitioner.identifier.value" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:socialInsuranceServices.assigner">
      <path value="Practitioner.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-organization-r4" />
      </type>
    </element>
    <element id="Practitioner.identifier:cyMedicalRegister">
      <path value="Practitioner.identifier" />
      <sliceName value="cyMedicalRegister" />
      <short value="Cyprus Medical Register number" />
      <definition value="The number provided by the Cyprus Medical Council for registration in the Cyprus Medical Register or/and recognition of a specialization title. To be used only for the cases that the practitioners are medical doctors." />
      <comment value="CyprusEHR: More information can be found in the Cyprus Medical Council webpage: https://www.moh.gov.cy/moh/cmc/cmc.nsf/doctorsregister_table_el/doctorsregister_table_el?OpenForm and https://www.moh.gov.cy/moh/cmc/cmc.nsf/form_el/form_el" />
      <max value="1" />
      <patternIdentifier>
        <use value="official" />
        <system value="urn:oid:2.16.840.1.113883.3.9143.2.1.10" />
      </patternIdentifier>
    </element>
    <element id="Practitioner.identifier:cyMedicalRegister.system">
      <path value="Practitioner.identifier.system" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:cyMedicalRegister.value">
      <path value="Practitioner.identifier.value" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:cyMedicalRegister.assigner">
      <path value="Practitioner.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-organization-r4" />
      </type>
    </element>
    <element id="Practitioner.identifier:cyGeneralNursingRegister">
      <path value="Practitioner.identifier" />
      <sliceName value="cyGeneralNursingRegister" />
      <short value="Cyprus General Nursing Register number" />
      <definition value="The number provided by the Cyprus Nursing and Midwifery Council for registration in the Cyprus General Nursing Register.  To be used only for the cases that the practitioners are nurses." />
      <comment value="CyprusEHR: More information can be found in Cyprus Nursing and Midwifery Council webpage: https://www.moh.gov.cy/moh/nmc/nmc.nsf/home_el/home_el?opendocument and https://www.moh.gov.cy/moh/nmc/nmc.nsf/page29_gr/page29_gr?OpenDocument" />
      <max value="1" />
      <patternIdentifier>
        <use value="official" />
        <system value="urn:oid:2.16.840.1.113883.3.9143.2.1.12" />
      </patternIdentifier>
    </element>
    <element id="Practitioner.identifier:cyGeneralNursingRegister.system">
      <path value="Practitioner.identifier.system" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:cyGeneralNursingRegister.value">
      <path value="Practitioner.identifier.value" />
      <min value="1" />
    </element>
    <element id="Practitioner.identifier:cyGeneralNursingRegister.assigner">
      <path value="Practitioner.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-organization-r4" />
      </type>
    </element>
    <element id="Practitioner.active">
      <path value="Practitioner.active" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Practitioner.name">
      <path value="Practitioner.name" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Practitioner.name.use">
      <path value="Practitioner.name.use" />
      <mustSupport value="true" />
    </element>
    <element id="Practitioner.name.family">
      <path value="Practitioner.name.family" />
      <mustSupport value="true" />
    </element>
    <element id="Practitioner.name.given">
      <path value="Practitioner.name.given" />
      <mustSupport value="true" />
    </element>
    <element id="Practitioner.telecom">
      <path value="Practitioner.telecom" />
      <mustSupport value="true" />
    </element>
    <element id="Practitioner.telecom.system">
      <path value="Practitioner.telecom.system" />
      <mustSupport value="true" />
    </element>
    <element id="Practitioner.telecom.value">
      <path value="Practitioner.telecom.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Practitioner.telecom.use">
      <path value="Practitioner.telecom.use" />
      <mustSupport value="true" />
    </element>
    <element id="Practitioner.address">
      <path value="Practitioner.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>
      <mustSupport value="true" />
    </element>
    <element id="Practitioner.qualification.code">
      <path value="Practitioner.qualification.code" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
    </element>
    <element id="Practitioner.qualification.issuer">
      <path value="Practitioner.qualification.issuer" />
      <type>
        <code value="Reference" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="Practitioner.communication">
      <path value="Practitioner.communication" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://ig.ehealth4u.eu/fhir/ValueSet/cyehr-vs-ehdsilanguage" />
      </binding>
    </element>
  </differential>
</StructureDefinition>