<?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="1" class="src-head">EHDSMedicationPrescription (Logical Model)</th>
            <th class="relhead">Relationship</th>
            <th colspan="3" class="tgt-head">MedicationRequest</th>
          </tr>
          <tr>
            <th class="src-sub">Element</th>
            
            <th class="relsub">Relation</th>
            <th class="tgt-sub">Resource</th>
            <th class="tgt-sub">Element</th>
            
            <th class="tgt-sub">Notes</th>
          </tr>
        </thead>
        <tbody>
          <!-- HEADER BLOCK -->
          <tr>
            <td>header</td>
            
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>.</td>
            
            <td>Dataset-level information; not directly represented on the MedicationRequest
              instance.</td>
          </tr>
          <tr>
            <td>header.subject</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>subject</td>
            
            <td></td>
          </tr>
          <tr>
            <td>header.identifier</td>
            
            <td>source-is-narrower-than-target</td>
            <td>MedicationRequest</td>
            <td>identifier</td>
            
            <td></td>
          </tr>
          <tr>
            <td>header.identifier</td>
            
            <td>source-is-narrower-than-target</td>
            <td>MedicationRequest</td>
            <td>groupIdentifier</td>
            
            <td></td>
          </tr>

          <tr>
            <td>header.author[x]</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>requester</td>
            
            <td>Reference to Practitioner / PractitionerRole / Organization depending on profile
              rules.</td>
          </tr>
          <tr>
            <td>header.date</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>authoredOn</td>
            
            <td></td>
          </tr>

          <tr>
            <td>header.status</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>status</td>
            
            <td>Use statusReason when additional context is required.</td>
          </tr>
          <tr>
            <td>header.language</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>language</td>
            
            <td></td>
          </tr>
          <tr>
            <td>header.statusReason[x]</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>statusReason</td>
            
            <td>The model allows for CodeableConcept and string. The target only CodeableConcept.</td>
          </tr>

          <tr class="highlight-yellow">
            <td>presentedForm</td>
            
            <td>no-map</td>
            <td>MedicationRequest</td>
            <td></td>
            
            <td>Reference a DocumentReference containing the rendered prescription.</td>
          </tr>


          <!-- PRESCRIPTION ITEM -->
          <tr>
            <td>prescriptionItem</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>.</td>
            
            <td>Create one MedicationRequest per prescription item.</td>
          </tr>
          <tr>
            <td>prescriptionItem.identifier</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>identifier</td>
            
            <td></td>
          </tr>

          <tr>
            <td>prescriptionItem.medication</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>medication[x]<span style="color:#2e7d32;font-weight:600;">〔R4〕</span><br></br>medication<span style="color:#2e7d32;font-weight:600;">〔R5〕</span></td>
            
            <td></td>
          </tr>
          
          <tr>
            <td>prescriptionItem.indication[x]</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>reasonCode<span style="color:#2e7d32;font-weight:600;">〔R4〕</span><br></br>reason.concept<span style="color:#2e7d32;font-weight:600;">〔R5〕</span></td>
            
            <td></td>
          </tr>
          
          <tr>
            <td>prescriptionItem.indication[x]</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>reasonReference<span style="color:#2e7d32;font-weight:600;">〔R4〕</span><br></br>reason.reference<span style="color:#2e7d32;font-weight:600;">〔R5〕</span></td>
            
            <td>Reference to Condition or other resource.</td>
          </tr>
          
          <tr>
            <td>prescriptionItem.indication[x]</td>
            
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>reasonCode.text</td>
            
            <td>Alternatively capture as <code>note</code> if preferred.</td>
          </tr>
          <tr>
            <td>prescriptionItem.intendedUseType</td>
            
            <td>source-is-narrower-than-target</td>
            <td>MedicationRequest</td>
            <td>category</td>
            
            <td>Use dedicated category code or custom extension if additional granularity is
              required.</td>
          </tr>
          <tr>
            <td>prescriptionItem.periodOfUse</td>
            
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>extension:effectiveDosePeriod<span style="color:#2e7d32;font-weight:600;">〔R4〕</span><br></br>effectiveDosePeriod<span style="color:#2e7d32;font-weight:600;">〔R5〕</span></td>
            
            <td></td>
          </tr>
          
          <tr>
            <td>prescriptionItem.quantityPrescribed</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>dispenseRequest.extension:prescribedQuantity</td>
            
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.validityPeriod</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>dispenseRequest.validityPeriod</td>
            
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.dosageInstructions</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>dosageInstruction</td>
            
            <td>Map each EHDSDosaging entry to a <code>dosageInstruction</code>.</td>
          </tr>

          <tr>
            <td>prescriptionItem.substitution</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>substitution</td>
            
            <td></td>
          </tr>

          <tr>
            <td>prescriptionItem.substitution.allowed[x]</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>substitution.allowed[x]]</td>
            
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.substitution.reason[x]</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>substitution.reason</td>
            
            <td>FHIR accepts CodeableConcept; textual reasons may need an additional note.</td>
          </tr>
          <tr>
            <td>prescriptionItem.status</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>status</td>
            
            <td>For single-item prescriptions, same meaning as header.status.</td>
          </tr>
          <tr>
            <td>prescriptionItem.statusReason[x]</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>statusReason</td>
            
            <td>As above, textual-only reasons may require notes.</td>
          </tr>
          <tr>
            <td>prescriptionItem.numberOfRepeats</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>dispenseRequest.numberOfRepeatsAllowed</td>
            
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.minimumDispenseInterval</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>dispenseRequest.dispenseInterval</td>
            
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.offLabel</td>
            
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>extension:offLabelUse</td>
            
            <td></td>
          </tr>
          <tr>
            <td>prescriptionItem.offLabel.isOffLabelUse</td>
            
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>extension:offLabelUse</td>
            
            <td>Implementer-specific extension required.</td>
          </tr>
          <tr>
            <td>prescriptionItem.offLabel.reason[x]</td>
            
            <td>related-to</td>
            <td>MedicationRequest</td>
            <td>extension:offLabelUse.reason</td>
            
            <td>Same extension as above; allow CodeableConcept or string.</td>
          </tr>
          <tr>
            <td>prescriptionItem.note</td>
            
            <td>equivalent</td>
            <td>MedicationRequest</td>
            <td>note.text</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>
