<?xml version="1.0" encoding="UTF-8"?>
<div xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
    <title>EHDSMedicationPrescription → MedicationRequest</title>
  </head>
  <body>
    <div class="model-map-block">
      <div class="callout-wrapper">
        <div class="callout-box">
          <strong>Context</strong> Xt-EHR currently has no dedicated common model for <code>
          MedicationRequest</code>. For that reason, this mapping is based on the prescription model
          realised by the HL7 Europe Medication Prescription and Dispense (MPD) FHIR Implementation
          Guide (<a href="https://hl7.eu/fhir/mpd" target="_blank">https://hl7.eu/fhir/mpd</a>). </div>
      </div>
    </div>
    <h3>EHDSMedicationPrescription → MedicationRequest</h3>
    <a> </a>
    <p></p>
    <p>
      This page explains how conceptual elements from the EHDS logical model are expressed
      in the corresponding FHIR MedicationRequest profile used by this Implementation Guide.
    </p>
    <p></p>
    <div class="table-wrap">
      <strong>Mapping Context</strong>
      <ul>
        <li>
          <strong>Source logical model:</strong>
          <a
            href="https://www.xt-ehr.eu/fhir/models/0.3.0/StructureDefinition/EHDSMedicationPrescription"
            target="_blank">
            EHDSMedicationPrescription
          </a>
        </li>
        <li>
          <strong>Target FHIR profile:</strong>
          <a href="StructureDefinition-medicationRequest-eu-core.html">
            MedicationRequest
          </a>
        </li>
      </ul>
    </div>
    <p></p>
    <div class="table-wrap">
      <table summary="EHDSMedicationPrescription → MedicationRequest">
        <caption>EHDSMedicationPrescription → MedicationRequest</caption>
        <thead>
          <tr>
            <th colspan="2" class="src-head">EHDSMedicationPrescription (Logical Model)</th>
            <th class="relhead">Relationship</th>
            <th colspan="4" class="tgt-head">MedicationRequest</th>
          </tr>
          <tr>
            <th class="src-sub">Element</th>
            <th class="src-sub">Description</th>
            <th class="relsub">Relation</th>
            <th class="tgt-sub">Resource</th>
            <th class="tgt-sub">Element</th>
            <th class="tgt-sub">Description</th>
            <th class="tgt-sub">Notes</th>
          </tr>
        </thead>
        <tbody>
          <!-- HEADER BLOCK -->
          <tr>
            <td>header</td>
            <td>Common header for the prescription dataset.</td>
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>.</td>
            <td>General metadata.</td>
            <td>Dataset-level information; not directly represented on the MedicationRequest
              instance.</td>
          </tr>
          <tr>
            <td>header.subject</td>
            <td>Patient for whom the medication is prescribed.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>subject</td>
            <td>Identifies the patient.</td>
            <td>Reference to Patient.</td>
          </tr>
          <tr>
            <td>header.identifier</td>
            <td>Business identifier(s) for the prescription.</td>
            <td>source-is-narrower-than-target</td>
            <td>MedicationRequest</td>
            <td>identifier</td>
            <td>External identifiers for this request.</td>
            <td></td>
          </tr>
          <tr>
            <td>header.identifier</td>
            <td>Identifier for a single item on the prescription.</td>
            <td>source-is-narrower-than-target</td>
            <td>MedicationRequest</td>
            <td>groupIdentifier</td>
            <td>Identifiers for a group of prescribed items.</td>
            <td></td>
          </tr>
          <tr>
            <td>header.author[x]</td>
            <td>The prescriber who made the prescription.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>requester</td>
            <td>The authorizing practitioner or organization.</td>
            <td>Reference to Practitioner / PractitionerRole / Organization depending on profile
              rules.</td>
          </tr>
          <tr>
            <td>header.date</td>
            <td>Time of issuing/signing the prescription.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>authoredOn</td>
            <td>When the request was authored.</td>
            <td></td>
          </tr>
          <tr>
            <td>header.status</td>
            <td>Status of authorization to dispense.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>status</td>
            <td>Active/on-hold/cancelled/etc.</td>
            <td>Use statusReason when additional context is required.</td>
          </tr>
          <tr>
            <td>header.language</td>
            <td>Language in which the resource is written.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>language</td>
            <td>Language of the narrative.</td>
            <td></td>
          </tr>
          <tr>
            <td>header.statusReason[x]</td>
            <td>Reason for the current prescription status.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>statusReason</td>
            <td>Explains the status.</td>
            <td>The model allows for CodeableConcept and string. The target only CodeableConcept.</td>
          </tr>
          <tr class="highlight-yellow">
            <td>presentedForm</td>
            <td>Entire prescription as issued (PDF, etc.).</td>
            <td>no-map</td>
            <td>MedicationRequest</td>
            <td></td>
            <td></td>
            <td>Reference a DocumentReference containing the rendered prescription.</td>
          </tr>
          <!-- PRESCRIPTION ITEM -->
          <tr>
            <td>prescriptionItem</td>
            <td>Prescription line for a medication.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>.</td>
            <td>MedicationRequest instances represent single items.</td>
            <td>Create one MedicationRequest per prescription item.</td>
          </tr>
          <tr>
            <td>prescriptionItem.identifier</td>
            <td>Identifier for a single item on the prescription.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>identifier</td>
            <td>Identifiers for that single prescribed item.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.medication</td>
            <td>Prescribed product (branded, generic, etc.).</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>medication[x]<span style="color:#2e7d32;font-weight:600;">〔R4〕</span></td>
            <td>Medication as CodeableConcept or Reference.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.medication</td>
            <td>Prescribed product (branded, generic, etc.).</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>medication<span style="color:#2e7d32;font-weight:600;">〔R5〕</span>
            </td>
            <td>Medication as CodeableConcept or Reference.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.indication[x]</td>
            <td>Coded reason for the prescription.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>reasonCode<span style="color:#2e7d32;font-weight:600;">〔R4〕</span></td>
            <td>Why the medication is prescribed.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.indication[x]</td>
            <td>Coded reason for the prescription.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>reason.concept<span style="color:#2e7d32;font-weight:600;">〔R5〕</span></td>
            <td>Why the medication is prescribed.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.indication[x]</td>
            <td>Diagnosis/reason referenced as a Condition.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>reasonReference<span style="color:#2e7d32;font-weight:600;">〔R4〕</span></td>
            <td>Reference to the clinical reason.</td>
            <td>Reference to Condition or other resource.</td>
          </tr>
          <tr>
            <td>prescriptionItem.indication[x]</td>
            <td>Diagnosis/reason referenced as a Condition.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>reason.reference<span style="color:#2e7d32;font-weight:600;">〔R5〕</span></td>
            <td>Reference to the clinical reason.</td>
            <td>Reference to Condition or other resource.</td>
          </tr>
          <tr>
            <td>prescriptionItem.indication[x]</td>
            <td>Free-text reason for the prescription.</td>
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>reasonCode.text</td>
            <td>Textual reason.</td>
            <td>Alternatively capture as <code>note</code> if preferred.</td>
          </tr>
          <tr>
            <td>prescriptionItem.intendedUseType</td>
            <td>Intent of the prescription (prophylaxis, treatment, etc.).</td>
            <td>source-is-narrower-than-target</td>
            <td>MedicationRequest</td>
            <td>category</td>
            <td>Classification of the request.</td>
            <td>Use dedicated category code or custom extension if additional granularity is
              required.</td>
          </tr>
          <tr>
            <td>prescriptionItem.periodOfUse</td>
            <td>Overall period over which the medication is to be taken.</td>
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>extension:effectiveDosePeriod<span style="color:#2e7d32;font-weight:600;">〔R4〕</span></td>
            <td>Period over which the medication should be taken.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.periodOfUse</td>
            <td>Overall period over which the medication is to be taken.</td>
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>effectiveDosePeriod<span style="color:#2e7d32;font-weight:600;">〔R5〕</span></td>
            <td>Period over which the medication should be taken.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.quantityPrescribed</td>
            <td>Overall quantity of product prescribed.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>dispenseRequest.extension:prescribedQuantity</td>
            <td>Overall amount of product prescribed, independent from the number of repeats.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.validityPeriod</td>
            <td>Period over which the prescription item is valid and dispensable.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>dispenseRequest.validityPeriod</td>
            <td>Period of dispensing validity.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.dosageInstructions</td>
            <td>Dosage and administration instructions.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>dosageInstruction</td>
            <td>Dosage instructions for administration.</td>
            <td>Map each EHDSDosaging entry to a <code>dosageInstruction</code>.</td>
          </tr>
          <tr>
            <td>prescriptionItem.substitution</td>
            <td>Container for substitution rules.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>substitution</td>
            <td>Any restrictions on medication substitution.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.substitution.allowed[x]</td>
            <td>Whether substitution is allowed.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>substitution.allowed[x]]</td>
            <td>Indicates if substitution is permitted.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.substitution.reason[x]</td>
            <td>Reason for substitution requirements.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>substitution.reason</td>
            <td>Why substitution is (not) allowed.</td>
            <td>FHIR accepts CodeableConcept; textual reasons may need an additional note.</td>
          </tr>
          <tr>
            <td>prescriptionItem.status</td>
            <td>Status of a single item of the prescription.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>status</td>
            <td>Status at the line level.</td>
            <td>For single-item prescriptions, same meaning as header.status.</td>
          </tr>
          <tr>
            <td>prescriptionItem.statusReason[x]</td>
            <td>Reason for the line-item status.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>statusReason</td>
            <td>Status explanation.</td>
            <td>As above, textual-only reasons may require notes.</td>
          </tr>
          <tr>
            <td>prescriptionItem.numberOfRepeats</td>
            <td>Number of refills authorized.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>dispenseRequest.numberOfRepeatsAllowed</td>
            <td>Repeat count.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.minimumDispenseInterval</td>
            <td>Minimum interval between dispenses.</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>dispenseRequest.dispenseInterval</td>
            <td>Minimum dispense interval.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.offLabel</td>
            <td>Container indicating off-label usage context.</td>
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>extension:offLabelUse</td>
            <td>Off-label use marker and associated details.</td>
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.offLabel.isOffLabelUse</td>
            <td>Indicates off-label use.</td>
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>extension:offLabelUse</td>
            <td>Flag for off-label prescription.</td>
            <td>Implementer-specific extension required.</td>
          </tr>
          <tr>
            <td>prescriptionItem.offLabel.reason[x]</td>
            <td>Reason for off-label use.</td>
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>extension:offLabelUse.reason</td>
            <td>Explanation of off-label decision.</td>
            <td>Same extension as above; allow CodeableConcept or string.</td>
          </tr>
          <tr>
            <td>prescriptionItem.note</td>
            <td>Additional information or comments (line-level).</td>
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>note.text</td>
            <td>Line-level comments.</td>
            <td>Use <code>note.author</code> / <code>note.time</code> if available.</td>
          </tr>
        </tbody>
      </table>
    </div>
    <p style="margin-top:2rem;color:#555;"> Return to overview: <a href="modelmap.html">EHDS Logical
      Models → FHIR Profiles</a>
    </p>
  </body>
</div>
