<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="cyehr-sd-practitionerrolehealthcareassociate-r4" />
  <url value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-practitionerrolehealthcareassociate-r4" />
  <name value="CYEHRSDPractitionerRoleHealthcareAssociate" />
  <title value="Cyprus EHR Healthcare Associate Practitioner Role profile" />
  <status value="draft" />
  <publisher value="eHealth4U" />
  <contact>
    <name value="ehealth Lab" />
    <telecom>
      <system value="email" />
      <value value="ehealthl@ucy.ac.cy" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="The main use-case of this profile is to represent the role that a Practitioner has within a team of healthcare associate professionals or an organization and the locations where he/she provides services." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="PractitionerRole" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
  <derivation value="constraint" />
  <differential>
    <element id="PractitionerRole">
      <path value="PractitionerRole" />
      <comment value="CyprusEHR: CYEHRSDPractitionerRoleHealthcareAssociate is used to present the role of a practitioner within a specific medical team and/or organization, specifying the location  that the practitioner provides healthcare related services. The CYEHRSDConsent resource shall be used to define the exact access rights that this resource is allowed to have on patients' data." />
    </element>
    <element id="PractitionerRole.meta">
      <path value="PractitionerRole.meta" />
    </element>
    <element id="PractitionerRole.meta.profile">
      <path value="PractitionerRole.meta.profile" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="PractitionerRole.meta.profile:CyprusEHRProfile">
      <path value="PractitionerRole.meta.profile" />
      <sliceName value="CyprusEHRProfile" />
      <min value="1" />
      <max value="1" />
      <fixedCanonical value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-practitionerrolehealthcareassociate-r4" />
    </element>
    <element id="PractitionerRole.language">
      <path value="PractitionerRole.language" />
      <definition value="The base language in which the resource is written.&#xD;&#xA;&#xD;&#xA;CyprusEHR: As defined by eHDSI MVC." />
      <binding>
        <strength value="required" />
        <description value="A human language as defined by eHDSI" />
        <valueSet value="http://ig.ehealth4u.eu/fhir/ValueSet/cyehr-vs-ehdsilanguage" />
      </binding>
    </element>
    <element id="PractitionerRole.contained">
      <path value="PractitionerRole.contained" />
      <comment value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.&#xD;&#xA;&#xD;&#xA;CyprusEHR: Not to be used in the context of Cyprus EHR." />
    </element>
    <element id="PractitionerRole.extension">
      <path value="PractitionerRole.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="PractitionerRole.extension:practitionerLicense">
      <path value="PractitionerRole.extension" />
      <sliceName value="practitionerLicense" />
      <definition value="Optional Extension Element - found in all resources.&#xD;&#xA;&#xD;&#xA;CyprusEHR: The official practicing license of a medical doctor or a nurse based on which the particular practitioner role was created." />
      <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.&#xD;&#xA;&#xD;&#xA;CyprusEHR: The practitionerLicense shall be used if the code of the particular practitionerrole is for a medical doctor or a nurse. Leave it empty only if the practitionerrole is for a medical secretary." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-partofpractitionerrole" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.extension:practitionerLicense.value[x]">
      <path value="PractitionerRole.extension.value[x]" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-practitionerlicense-r4" />
      </type>
    </element>
    <element id="PractitionerRole.extension:practitionerLicense.value[x].reference">
      <path value="PractitionerRole.extension.value[x].reference" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.identifier">
      <path value="PractitionerRole.identifier" />
      <comment value="CyprusEHR: Not to be used in the context of Cyprus EHR." />
      <mustSupport value="false" />
    </element>
    <element id="PractitionerRole.period">
      <path value="PractitionerRole.period" />
      <comment value="A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. &quot;the patient was an inpatient of the hospital for this time range&quot;) or one value from the range applies (e.g. &quot;give to the patient between these two times&quot;).&#xA;&#xA;Period is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration).&#xD;&#xA;&#xD;&#xA;CyprusEHR: Not to be used in the context of Cyprus EHR." />
    </element>
    <element id="PractitionerRole.practitioner">
      <path value="PractitionerRole.practitioner" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-practitioner-r4" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.practitioner.reference">
      <path value="PractitionerRole.practitioner.reference" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.organization">
      <path value="PractitionerRole.organization" />
      <definition value="The organization where the Practitioner performs the roles associated.&#xD;&#xA;&#xD;&#xA;CyprusEHR: All the health associate professionals using the national integrated EHR system are allowed to provide their services as members of a specific medical team. Therefore, the CYEHRSDPractitionerRole.organization element is used to specify the medical team in which the specific practitionerRole is active. To capture the legal entity of an organization in whcih the medical team performs, use the element CYEHRSDMedicalTeam.partOf." />
      <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: The health associate professionals of the prototype of the national inetgrated EHR can have the following roles: doctor, nurse and medical secretary" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-medicalteam-r4" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.organization.extension">
      <path value="PractitionerRole.organization.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="PractitionerRole.organization.extension:isPractitionerRoleCustodianOfOrganization">
      <path value="PractitionerRole.organization.extension" />
      <sliceName value="isPractitionerRoleCustodianOfOrganization" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-ext-custodian" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
    </element>
    <element id="PractitionerRole.organization.extension:isPractitionerRoleCustodianOfOrganization.value[x]">
      <path value="PractitionerRole.organization.extension.value[x]" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.organization.reference">
      <path value="PractitionerRole.organization.reference" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.code">
      <path value="PractitionerRole.code" />
      <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.&#xD;&#xA;&#xD;&#xA;CyprusEHR: Use the iscoCode slice to describe the role of a doctor (221) or nurse (222) practitioner. For medical secretaries use the SNOMED CT 394572006 code." />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
    </element>
    <element id="PractitionerRole.code.coding">
      <path value="PractitionerRole.code.coding" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="PractitionerRole.code.coding.system">
      <path value="PractitionerRole.code.coding.system" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.code.coding.code">
      <path value="PractitionerRole.code.coding.code" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.code.coding.display">
      <path value="PractitionerRole.code.coding.display" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.code.coding:iscoCode">
      <path value="PractitionerRole.code.coding" />
      <sliceName value="iscoCode" />
      <short value="Code as defined by the eHDSIHealthcareProfessionalRole" />
      <definition value="A reference to a code defined by a terminology system.&#xD;&#xA;&#xD;&#xA;CyprusEHR: The code of the practitioner role as defined by the eHDSIHealthcareProfessionalRole value set which is published by the eHDSI and uses the International Standard Classification of Occupations as code system." />
      <max value="1" />
      <patternCoding>
        <system value="urn:oid:2.16.840.1.113883.2.9.6.2.7" />
      </patternCoding>
      <binding>
        <strength value="required" />
        <valueSet value="http://ig.ehealth4u.eu/fhir/ValueSet/cyehr-vs-ehdsihealthcareprofessionalrole" />
      </binding>
    </element>
    <element id="PractitionerRole.code.coding:iscoCode.system">
      <path value="PractitionerRole.code.coding.system" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.code.coding:iscoCode.code">
      <path value="PractitionerRole.code.coding.code" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.code.coding:iscoCode.display">
      <path value="PractitionerRole.code.coding.display" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.specialty">
      <path value="PractitionerRole.specialty" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <definition value="A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.&#xD;&#xA;&#xD;&#xA;CyprusEHR: The specialty of a medical doctor or a nurse as defined in the national integrated EHR sysetm of Cyprus." />
      <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;CyprusEHR: Use if for doctors and nurses. Leave it empty for medical secretaries." />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
    </element>
    <element id="PractitionerRole.specialty.coding.system">
      <path value="PractitionerRole.specialty.coding.system" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.specialty.coding.code">
      <path value="PractitionerRole.specialty.coding.code" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.specialty.coding.display">
      <path value="PractitionerRole.specialty.coding.display" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.specialty:medicalSpecialty">
      <path value="PractitionerRole.specialty" />
      <sliceName value="medicalSpecialty" />
      <short value="The licensed specialties and sub-specialties of the practitioner" />
      <definition value="Specific specialty of the practitioner.&#xD;&#xA;&#xD;&#xA;CyprusEHR: The specialties and the sub-specialties that are included in the practicing license of a medical doctor. The doctor is allowed to practice only these specialties and sub-specialties in the Republic of Cyprus." />
      <binding>
        <strength value="required" />
      </binding>
    </element>
    <element id="PractitionerRole.specialty:medicalSpecialty.coding">
      <path value="PractitionerRole.specialty.coding" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.specialty:medicalSpecialty.coding.system">
      <path value="PractitionerRole.specialty.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.specialty:medicalSpecialty.coding.code">
      <path value="PractitionerRole.specialty.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.specialty:medicalSpecialty.coding.display">
      <path value="PractitionerRole.specialty.coding.display" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.specialty:nurseSpecialty">
      <path value="PractitionerRole.specialty" />
      <sliceName value="nurseSpecialty" />
      <short value="The licensed nursing categories of the practitioner" />
      <definition value="Specific specialty of the practitioner.&#xD;&#xA;&#xD;&#xA;CyprusEHR: The specialties and the sub-specialties that are included in the practicing license of a nurse. The nurse is allowed to practice only these specialties in the Republic of Cyprus." />
      <max value="3" />
      <binding>
        <strength value="required" />
        <description value="The categories of the nurses in the Republic of Cyprus" />
        <valueSet value="http://ig.ehealth4u.eu/fhir/ValueSet/cyehr-vs-nursingcategories" />
      </binding>
    </element>
    <element id="PractitionerRole.specialty:nurseSpecialty.coding">
      <path value="PractitionerRole.specialty.coding" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.specialty:nurseSpecialty.coding.system">
      <path value="PractitionerRole.specialty.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.specialty:nurseSpecialty.coding.code">
      <path value="PractitionerRole.specialty.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.specialty:nurseSpecialty.coding.display">
      <path value="PractitionerRole.specialty.coding.display" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.location">
      <path value="PractitionerRole.location" />
      <definition value="The location(s) at which this practitioner provides care.&#xD;&#xA;&#xD;&#xA;CyprusEHR: Use the location to define the locations where the referenced Practitioner provides healthcare services with this particular practitioner role." />
      <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: The defined location must reference the same medical team (via location.organization) as the medical team defined in CYEHRSDPractitionerRoleHealthcareAssociate.organization." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" />
        <targetProfile value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-locationmedicalteam-r4" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.location.reference">
      <path value="PractitionerRole.location.reference" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.healthcareService">
      <path value="PractitionerRole.healthcareService" />
      <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: Not to be used in the context of Cyprus EHR." />
    </element>
    <element id="PractitionerRole.healthcareService.reference">
      <path value="PractitionerRole.healthcareService.reference" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.telecom">
      <path value="PractitionerRole.telecom" />
      <comment value="CyprusEHR: Not to be used in the context of Cyprus EHR." />
    </element>
    <element id="PractitionerRole.telecom.system">
      <path value="PractitionerRole.telecom.system" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.telecom.value">
      <path value="PractitionerRole.telecom.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.telecom.use">
      <path value="PractitionerRole.telecom.use" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.availableTime">
      <path value="PractitionerRole.availableTime" />
      <comment value="More detailed availability information may be provided in associated Schedule/Slot resources.&#xD;&#xA;&#xD;&#xA;CyprusEHR: Not to be used in the context of Cyprus EHR." />
    </element>
    <element id="PractitionerRole.notAvailable">
      <path value="PractitionerRole.notAvailable" />
      <comment value="CyprusEHR: Not to be used in the context of Cyprus EHR." />
    </element>
    <element id="PractitionerRole.availabilityExceptions">
      <path value="PractitionerRole.availabilityExceptions" />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size&#xD;&#xA;&#xD;&#xA;CyprusEHR: Not to be used in the context of Cyprus EHR." />
    </element>
    <element id="PractitionerRole.endpoint.reference">
      <path value="PractitionerRole.endpoint.reference" />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>