Simulation
Medicine supply digital twin (12/14): the last mile to the patient
The medicine reached the unit, but the patient isn't there. An exponential model of returning to the pharmacy window, abandonment, and what changes with lockers and motorbike home delivery.
A prescription that wasn’t filled in full leaves the patient with something pending. When the medicine finally reaches the unit, the system records it as filled. But the patient didn’t find out, or found out and can’t come back tomorrow, or lives an hour away. For the patient, supply ends when the medicine is at home, not on the shelf.
The twin simulates that last leg with three routes:
- Pharmacy window: the patient is notified and comes back to the unit. That’s how it’s done today.
- Locker or pickup point: the medicine is left in a locker at the unit or at a nearby point, and the patient picks it up with a QR code, no queue.
- Home: a motorbike courier goes out twice a day with the deliveries, on routes built with the same Clarke-Wright savings as in the fifth post.
Two rules: controlled drugs are only handed over at the window, and cold-chain medicines go home in a cooler or to the window, never to a locker.
How long the patient takes to come back
Suppose that, once notified, the patient comes back after a random, memoryless time: the probability of returning in the next hour doesn’t depend on how long they’ve been waiting. That time is exponential, with mean days. On top of that, a share never comes back.
Home delivery
With two runs a day, the medicine goes out on the next available route. If nobody answers (probability ), it’s retried on the next run. After runs, the probability of having delivered is
With , two runs fit in the first 24 hours: . The home-delivery curve climbs in steps, one per run, while the window curve crawls.
What it costs
The motorbike costs per kilometre and per run, and each run is shared among several deliveries. In the aid, the cost per delivery is
with 4.50 pesos per kilometre, a 120-peso run shared by 6.5 deliveries and 8 pesos for handling and proof of delivery. At 3.3 km per delivery it comes to about $41.
The medical unit in 3D: pharmacy, dispensing window and delivery to the patient. (Interface in Spanish.) · Open full screen
In the full twin
In one simulated month at a hospital unit, with patients located around it:
| Metric | Value |
|---|---|
| Deliveries | 501 (324 home, 136 locker, 40 pickup point, 1 window) |
| Delivered within 24 h of the notice | 79 % |
| Cost per home delivery | about $47 (50 motorbike runs, 1,631 km) |
| Pharmacy visits avoided | 364 |
| Kilometres of patient travel avoided | 3,643 |
| Patient hours saved | about 529 |
The 79 % is lower than the aid’s 99.75 % because in the twin not everyone picks home delivery: many prefer the locker and collect at their own pace. What really changes is abandonment: with lockers and home delivery, the patient who wasn’t going to come back gets their medicine.
The 529 hours are patients’ time, mostly older people or people with chronic illnesses, who didn’t have to travel or queue. That saving doesn’t show up in any supply indicator.
What comes next
The series has covered the whole chain. Two posts remain on how to look after it. The next one is about the annual plan: what data a platform must keep so nobody can inflate or manipulate it unnoticed.