# Mapping to Profiles - MyHealth@Eu Electronic Prescription and Dispense v0.1.0

* [**Table of Contents**](toc.md)
* **Mapping to Profiles**

## Mapping to Profiles

### Mappings from MyHealth@EU / EHDS models to FHIR profiles

MyHealth@EU logical models refine the EHDS logical information models provided by the Xt-EHR project. These models add obligation levels (Mandatory, Required, Optional) to the EHDS base elements.
 Please read more about the models on the [Prescription and Medication Models Overview](overview-epd.md) page.

The mappings below show how the logical model elements explicitly defined in the MyHealth@EU models are realised in the FHIR R4 profiles of this guide.

#### Medication Prescription

The [MyHealthEuPrescription](StructureDefinition-MyHealthEuPrescription.md) model refines [EHDSMedicationPrescription](https://www.xt-ehr.eu/fhir/models/0.3.0/StructureDefinition-EHDSMedicationPrescription.html). The prescription maps primarily to [MedicationRequestMyHealthEuEpd](StructureDefinition-MedicationRequest-myhealtheu-epd.md). The prescribed medication is represented using [MedicationMyHealthEuEpd](StructureDefinition-medication-myhealtheu-epd.md).

EHDS Medication Prescription allows multiple prescribed items on one prescription. In such cases, the prescription identifier may be represented using `MedicationRequest.groupIdentifier`, and one `MedicationRequest` instance represents each prescribed item.

| | | |
| :--- | :--- | :--- |
| header.identifier | MedicationRequest.identifier; MedicationRequest.groupIdentifier | Use`groupIdentifier`when several prescribed items belong to the same prescription. |
| header.author[x] | MedicationRequest.requester | Reference to PractitionerRoleMyHealthCore. |
| header.date | MedicationRequest.authoredOn |   |
| prescriptionItem | MedicationRequest | One MedicationRequest represents one prescribed item. |
| prescriptionItem.identifier | MedicationRequest.identifier |   |
| prescriptionItem.validityPeriod | MedicationRequest.dispenseRequest.validityPeriod |   |
| prescriptionItem.substitution | MedicationRequest.substitution |   |
| prescriptionItem.dosageInstructions | MedicationRequest.dosageInstruction | Constrained by the dosage mappings below. |
| prescriptionItem.note | MedicationRequest.note |   |
| prescriptionItem.medication | MedicationRequest.medication[x] | Reference to MedicationMyHealthEuEpd. |
| prescriptionItem.quantityPrescribed | MedicationRequest.dispenseRequest.extension:prescribedQuantity |   |
| prescriptionItem.treatmentPeriod | MedicationRequest.extension:effectiveDosePeriod | R5 preadoption extension. |
| prescriptionItem.renderedDosageInstruction | MedicationRequest.extension:renderedDosageInstruction | R5 preadoption extension. |

#### Medication

The [MyHealthEuMedication](StructureDefinition-MyHealthEuMedication.md) model refines [EHDSMedication](https://www.xt-ehr.eu/fhir/models/0.3.0/StructureDefinition-EHDSMedication.html). It maps to [MedicationMyHealthEuEpd](StructureDefinition-medication-myhealtheu-epd.md).

| | | |
| :--- | :--- | :--- |
| identifyingCode[x] | Medication.code; Medication.identifier |   |
| productName | Medication.extension:productName |   |
| classification | Medication.extension:classification |   |
| marketingAuthorisationHolder | Medication.manufacturer | Reference to OrganizationMyHealthCore where available. |
| item | Medication | FHIR R4 Medication represents both the medicinal product and its package/item details. |
| item.ingredient | Medication.ingredient |   |
| item.ingredient.isActive | Medication.ingredient.isActive |   |
| item.ingredient.substance | Medication.ingredient.itemCodeableConcept; Medication.ingredient.itemReference |   |
| item.ingredient.strengthInfo | Medication.ingredient.strength |   |
| item.ingredient.strengthInfo.strength | Medication.ingredient.strengthRatio |   |
| item.doseForm | Medication.form |   |
| item.containedQuantity | Medication.extension:sizeOfItem |   |
| item.amount | Medication.amount |   |
| item.packageType | Medication.extension:packageType |   |

#### Dosaging

The [MyHealthEuDosaging](StructureDefinition-MyHealthEuDosaging.md) model refines [EHDSDosage](https://www.xt-ehr.eu/fhir/models/0.3.0/StructureDefinition-EHDSDosage.html). It maps to the `MedicationRequest.dosageInstruction` and `MedicationDispense.dosageInstruction` elements.

| | | |
| :--- | :--- | :--- |
| dosageDetails | Dosage |   |
| dosageDetails.note | Dosage.text; Dosage.patientInstruction | Used for free-text instructions to the patient or dispenser. |
| dosageDetails.doseAndRate | Dosage.doseAndRate |   |
| dosageDetails.repeat.frequency | Dosage.timing.repeat.frequency; Dosage.timing.repeat.frequencyMax; Dosage.timing.repeat.period; Dosage.timing.repeat.periodUnit |   |
| dosageDetails.repeat.eventTime | Dosage.timing.repeat.when; Dosage.timing.repeat.offset; Dosage.timing.repeat.timeOfDay |   |
| dosageDetails.repeat.bounds.duration | Dosage.timing.repeat.boundsDuration |   |
| dosageDetails.routeOfAdministration | Dosage.route |   |

#### Medication Dispense

The [MyHealthEuMedicationDispense](StructureDefinition-MyHealthEuMedicationDispense.md) model refines [EHDSMedicationDispense](https://www.xt-ehr.eu/fhir/models/0.3.0/StructureDefinition-EHDSMedicationDispense.html). It maps to [MedicationDispenseMyHealthEuEpd](StructureDefinition-MedicationDispense-myhealtheu-epd.md). The dispensed medication is represented using [MedicationMyHealthEuEpd](StructureDefinition-medication-myhealtheu-epd.md).

| | | |
| :--- | :--- | :--- |
| header.identifier | MedicationDispense.identifier |   |
| header.date | MedicationDispense.whenHandedOver | May also be represented as the recorded event time where supported by the implementation context. |
| relatedRequest | MedicationDispense.authorizingPrescription | Reference to MedicationRequestMyHealthEuEpd. |
| medication | MedicationDispense.medicationReference | Reference to MedicationMyHealthEuEpd. |
| dispensedQuantity | MedicationDispense.quantity |   |
| timeOfDispensation | MedicationDispense.whenHandedOver |   |
| substitutionOccurred | MedicationDispense.substitution.wasSubstituted |   |
| dosageInstructions | MedicationDispense.dosageInstruction | Constrained by the dosage mappings above. |
| renderedDosageInstruction | MedicationDispense.extension:renderedDosageInstruction | R5 preadoption extension. |

#### Supporting models mapped in MyHealth@EU Core

Several referenced EHDS models are implemented through the MyHealth@EU Core IG. The mappings below cover only the elements explicitly defined in the MyHealth@EU models.

##### Patient

The [MyHealthEuPatient](StructureDefinition-MyHealthEuPatient.md) model refines [EHDSPatient](https://www.xt-ehr.eu/fhir/models/0.3.0/StructureDefinition-EHDSPatient.html).

| | | |
| :--- | :--- | :--- |
| identifier | Patient.identifier |   |
| name | Patient.name | Constrained to MyHealthEuHumanName. |
| dateOfBirth | Patient.birthDate |   |
| administrativeGender | Patient.gender |   |

##### Human Name

The [MyHealthEuHumanName](StructureDefinition-MyHealthEuHumanName.md) model refines [EHDSHumanName](https://www.xt-ehr.eu/fhir/models/0.3.0/StructureDefinition-EHDSHumanName.html).

| | | |
| :--- | :--- | :--- |
| family | HumanName.family |   |
| given | HumanName.given |   |

##### Address

The [MyHealthEuAddress](StructureDefinition-MyHealthEuAddress.md) model refines [EHDSAddress](https://www.xt-ehr.eu/fhir/models/0.3.0/StructureDefinition-EHDSAddress.html).

| | | |
| :--- | :--- | :--- |
| street | Address.line.extension:streetName | iso21090-ADXP-streetName extension. |
| houseNumber | Address.line.extension:houseNumber | iso21090-ADXP-houseNumber extension. |
| city | Address.city |   |
| postalCode | Address.postalCode |   |
| country | Address.country |   |

##### Telecom

The [MyHealthEuTelecom](StructureDefinition-MyHealthEuTelecom.md) model refines [EHDSTelecom](https://www.xt-ehr.eu/fhir/models/0.3.0/StructureDefinition-EHDSTelecom.html).

| | | |
| :--- | :--- | :--- |
| type | ContactPoint.system |   |
| value | ContactPoint.value |   |

##### Health Professional

The [MyHealthEuHealthProfessional](StructureDefinition-MyHealthEuHealthProfessional.md) model refines [EHDSHealthProfessional](https://www.xt-ehr.eu/fhir/models/0.3.0/StructureDefinition-EHDSHealthProfessional.html).

| | | |
| :--- | :--- | :--- |
| identifier | Practitioner.identifier; PractitionerRole.identifier |   |
| name | Practitioner.name | Constrained to MyHealthEuHumanName. |
| address | Practitioner.address | Constrained to MyHealthEuAddress. |
| telecom | Practitioner.telecom | Constrained to MyHealthEuTelecom. |
| professionalRole | PractitionerRole |   |
| professionalRole.role | PractitionerRole.code |   |
| professionalRole.organisation | PractitionerRole.organization | Reference to OrganizationMyHealthCore. |
| professionalRole.specialty | PractitionerRole.specialty |   |

##### Organisation

The [MyHealthEuOrganisation](StructureDefinition-MyHealthEuOrganisation.md) model refines [EHDSOrganisation](https://www.xt-ehr.eu/fhir/models/0.3.0/StructureDefinition-EHDSOrganisation.html).

| | | |
| :--- | :--- | :--- |
| identifier | Organization.identifier |   |
| name | Organization.name |   |
| address | Organization.address | Constrained to MyHealthEuAddress. |

