Beyond Real-TimeWhy building a proper hospital logistics platform is hard ไทย

Designing a Platform That Remembers Everything

Memory makes learning — and trust — possible.

When you’re building a real-time hospital logistics platform, you’re not just designing a system that responds — you’re designing a system that remembers. That means every signal, every click, and every decision point must be traceable. Not just for the moment, but for the long haul. Because what feels like noise in the present often turns out to be the most valuable signal when you look back. We’ve always said we collect aggressively, but only what the work needs, and we record what happens to jobs and decisions, never the people beyond the work they do. Not because we’re obsessed with data, but because without it, you can’t explain the past or improve the future.

At the exact moment a job is created, we don’t just record that a request was made. We log who created it — whether it was a nurse, a service center agent, an admin, or the system itself. We record what channel was used — web, mobile, kiosk, or API. We capture their location, how long it took to fill out the request form, and whether the job was scheduled, routine, or ad hoc. But it doesn’t stop there. When our system selects an agent, we retain the full list of every candidate considered, not just the one ultimately chosen. We log the reasons each was included or excluded: whether the agent was available, whether they were too far away, lacked the skill, were beyond the fatigue threshold, or had already rejected a similar job earlier that day. For the agent who was finally chosen, we log precisely when they were notified, how they responded, how long they took, what screen they were on when the alert came in, whether they were using Wi-Fi or mobile data, or were offline entirely, and whether they accepted the job directly or through a supervisor.

All of this detail serves one purpose: to ensure that one day, when someone asks why that agent was chosen for that job at that time, we have the answer. And we will.

From there, we trace the full job timeline in micro-events: job created, dispatched, accepted, started, put on hold, resumed, completed, rated, reopened, and eventually closed. Between each of these states, we also track delays, transfers, handovers, deviations from standard SLAs, and even whether the app was active in the foreground or running in the background. These aren’t just technical details — they help us determine whether the friction was human or technological. We monitor idle states and silence. If an agent hasn’t interacted with the app in fifteen minutes, that’s a signal. If three people reject the same job instantly, that’s a pattern. What we’re building isn’t just a dispatching tool — it’s a real-time decision engine with a memory. It’s designed to learn, predict, explain, and correct — responsibly.

To improve, we need memory. That’s why we don’t only log what happened — we log what was possible. What were the alternatives? Who else could’ve been chosen? Why weren’t they? Even failures carry insights. When a job goes unassigned, an agent drops out mid-task, or a network goes down at the worst moment — that’s not just an error. That’s a scenario that will repeat unless we learn from it. And we’re not collecting this for vanity metrics. We collect to understand. If we can’t explain a decision, we shouldn’t automate it. If we can’t retrace a moment, we can’t fix it.

This kind of visibility gives hospital managers a new level of awareness. It’s no longer just about what happened. It’s about why it happened. A delay might trace back not to the current task, but to a cascading queue from an earlier backup. A pattern of slow responses might reflect an agent interface problem or a deeper fatigue issue. Flow becomes the unit of analysis, not just volume. And with that, a manager doesn’t just answer hard questions — she begins to ask better ones. Ones that reshape how hospitals plan, operate, and care.

Behind this memory and intelligence is a robust technical architecture. Real-time signals like agent availability, job priorities, and SLA countdowns live in high-speed caches, ensuring that every interaction is lightning fast. Meanwhile, core events — job creation, assignment, responses — are recorded in a relational database, structured for time-based queries and traceability. Read replicas serve the front-end quickly without compromising writes, and a long-term store holds historical data for analysis, forecasting, and improvement.

The entire platform is event-driven. Every interaction — from a job dispatched to a network dropout — is logged as a discrete, timestamped event. These events not only populate logs but trigger real-time reactions: SLA clocks tick, dashboards refresh, supervisors are notified, and the system recalculates its internal priorities. Because every event is immutable and reconstructable, we can roll back time and replay moments down to the second — critical for audits, trust, and continuous learning.

We’ve also built this system to be resilient. In a hospital, chaos is normal. So our infrastructure accounts for offline activity with local caching, retries failed writes, maintains global time accuracy through UTC timestamps, and catches schema errors before they propagate. Even meta-decisions — like why one agent was chosen over another — are recorded. Not for bureaucracy, but to help us all trust the system’s choices.

And finally, this all leads to depth — not just dashboards. Managers no longer just see numbers; they see nuance. They see which jobs failed and why. They understand not just who did more work, but who carried the harder load. They can spot problems before they become bottlenecks. And most importantly, they begin to think differently. Because with this kind of visibility, data isn’t just for reporting — it’s for reimagining how hospital logistics should work.

Share this book

Designing a Platform That Remembers Everything · Beyond Real-Time
LINE Facebook Email