<?xml version="1.0" encoding="UTF-8"?>

<MedicationDispense xmlns="http://hl7.org/fhir">
  <id value="example-medicationdispense-amina-azithromycin"/>
  <meta>
    <profile value="https://fhir.dha.go.ke/erx/StructureDefinition/ke-medication-dispense"/>
    <profile value="https://fhir.dha.go.ke/fhir/StructureDefinition/ke-medication-dispense"/>
  </meta>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p><b>Dispense DISP-2025-OPD-00456</b></p><p>First-fill dispense of Azithromycin 500 mg oral tablet — 3 tablets dispensed at KNH Outpatient Pharmacy against prescription RX-2025-OPD-00789 for Amina Hassan. Dispensed: 15 June 2025. 3-day supply.</p></div>
  </text>
  <identifier>
    <system value="https://ilm-hie.dha.go.ke/fhir/NamingSystem/dispense-identifier"/>
    <value value="DISP-2025-OPD-00456"/>
  </identifier>
  <status value="completed"/>
  <medicationCodeableConcept>
    <coding>
      <system value="https://fhir.dha.go.ke/fhir/CodeSystem/generic-products-cs"/>
      <code value="GE10015"/>
      <display value="Azithromycin 500 mg Oral Tablet"/>
    </coding>
    <text value="Azithromycin 500 mg Oral Tablet"/>
  </medicationCodeableConcept>
  <subject>
    <reference value="Patient/example-patient-amina"/>
  </subject>
  <context>
    <reference value="Encounter/example-encounter-amina-outpatient"/>
  </context>
  <performer>
    <actor>
      <reference value="Organization/example-organization-knh"/>
    </actor>
  </performer>
  <location>
    <reference value="Location/example-location-knh-pharmacy"/>
  </location>
  <authorizingPrescription>
    <reference value="MedicationRequest/example-medicationrequest-amina-azithromycin"/>
  </authorizingPrescription>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
      <code value="FF"/>
      <display value="First Fill"/>
    </coding>
  </type>
  <quantity>
    <value value="3"/>
    <unit value="tablet"/>
    <system value="http://unitsofmeasure.org"/>
    <code value="1"/>
  </quantity>
  <daysSupply>
    <value value="3"/>
    <unit value="day"/>
    <system value="http://unitsofmeasure.org"/>
    <code value="d"/>
  </daysSupply>
  <whenPrepared value="2025-06-15T10:15:00+03:00"/>
  <whenHandedOver value="2025-06-15T10:30:00+03:00"/>
  <dosageInstruction>
    <text value="Take 1 tablet (500 mg) by mouth once daily for 3 days"/>
    <timing>
      <repeat>
        <frequency value="1"/>
        <period value="1"/>
        <periodUnit value="d"/>
      </repeat>
    </timing>
    <route>
      <coding>
        <system value="https://fhir.dha.go.ke/fhir/CodeSystem/route-of-administration-cs"/>
        <code value="RT10025"/>
        <display value="Oral"/>
      </coding>
    </route>
  </dosageInstruction>
  <substitution>
    <wasSubstituted value="false"/>
  </substitution>
</MedicationDispense>