{
  "resourceType" : "MedicationDispense",
  "id" : "example-medicationdispense-with-notification",
  "meta" : {
    "profile" : ["https://fhir.dha.go.ke/erx/StructureDefinition/ke-medication-dispense",
    "https://fhir.dha.go.ke/fhir/StructureDefinition/ke-medication-dispense"]
  },
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Dispense DISP-2025-EXT-00001 – Notification Extension</b></p><p>60 tablets of Metformin 500 mg dispensed at KNH Pharmacy on 15 June 2025 (30-day supply). SMS notification sent to patient at 10:35 EAT. Authorized by prescription RX-2025-EXT-00001.</p></div>"
  },
  "extension" : [{
    "extension" : [{
      "url" : "notificationSent",
      "valueBoolean" : true
    },
    {
      "url" : "notificationChannel",
      "valueCodeableConcept" : {
        "text" : "SMS"
      }
    },
    {
      "url" : "notifiedOn",
      "valueDateTime" : "2025-06-15T10:35:00+03:00"
    }],
    "url" : "https://fhir.dha.go.ke/fhir/StructureDefinition/dispense-notification"
  }],
  "identifier" : [{
    "system" : "https://ilm-hie.dha.go.ke/fhir/NamingSystem/dispense-identifier",
    "value" : "DISP-2025-EXT-00001"
  }],
  "status" : "completed",
  "medicationCodeableConcept" : {
    "coding" : [{
      "system" : "https://fhir.dha.go.ke/fhir/CodeSystem/generic-products-cs",
      "code" : "GE10002",
      "display" : "Metformin 500 mg Oral Tablet"
    }],
    "text" : "Metformin 500 mg Oral Tablet"
  },
  "subject" : {
    "reference" : "Patient/example-patient-otieno"
  },
  "context" : {
    "reference" : "Encounter/example-encounter-otieno-inpatient"
  },
  "performer" : [{
    "actor" : {
      "reference" : "Organization/example-organization-knh"
    }
  }],
  "location" : {
    "reference" : "Location/example-location-knh-pharmacy"
  },
  "authorizingPrescription" : [{
    "reference" : "MedicationRequest/example-medicationrequest-with-extensions"
  }],
  "type" : {
    "coding" : [{
      "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
      "code" : "FF",
      "display" : "First Fill"
    }]
  },
  "quantity" : {
    "value" : 60,
    "unit" : "tablet",
    "system" : "http://unitsofmeasure.org",
    "code" : "1"
  },
  "daysSupply" : {
    "value" : 30,
    "unit" : "day",
    "system" : "http://unitsofmeasure.org",
    "code" : "d"
  },
  "whenHandedOver" : "2025-06-15T10:35:00+03:00",
  "substitution" : {
    "wasSubstituted" : false
  }
}