The problem that inspired MedRoute

Finding a prescribed medicine should not require a caregiver or care coordinator to spend an afternoon repeating the same phone call.

After a discharge, an unexpected stockout, or a search for a less commonly stocked strength or formulation, online pharmacy inventory can be absent, stale, or incomplete. The remaining option is often to call pharmacies one at a time, write down partial answers, and try to compare them from memory. That delay is stressful, and it leaves no reliable record of what was actually confirmed.

I built MedRoute to turn that narrow, real-world coordination problem into a safe and structured workflow.

What MedRoute does

An operator enters an illustrative medicine request and a small list of pharmacies they are authorized to contact. MedRoute then gathers only the practical facts needed to create a shortlist:

  • Whether the requested medicine is available
  • Confirmed or approximate price information
  • Pack quantity and purchase terms, when available
  • Same-day pickup readiness
  • Hours and distance information

Instead of returning an unstructured call transcript, MedRoute normalizes the responses into comparable evidence. It can highlight the lowest confirmed unit price, nearest available option, or a balanced price-and-distance choice—while keeping unknown, approximate, or incompatible results visible rather than pretending they are certain.

For requested purchase quantities, MedRoute can also calculate estimated totals from confirmed pack information. This avoids a misleading “cheapest” result when the operator would actually need to buy multiple packs.

How I built it

MedRoute is a Node.js web application built with the official @call-e/calle SDK.

The live workflow creates a CALL-E request for an explicit recipient and uses a structured recipientResultSchema so pharmacy responses can be handled as operational data rather than free-form text. The application observes the call lifecycle and preserves structured results, provider outcomes, and available transcripts for later review.

I also built the surrounding reliability layer needed for a real side-effecting workflow:

  • Explicit authorization and separate live-call confirmation
  • E.164 phone-number validation
  • Stable idempotency keys to prevent duplicate calls
  • Per-pharmacy cooldowns and request rate limits
  • Clear handling for unanswered, incomplete, or late-arriving call results
  • Downloadable transcript PDFs when a transcript is available
  • Optional PostgreSQL and OpenID Connect safeguards for production deployment

Safety by design

MedRoute is intentionally limited to factual pharmacy-availability coordination.

It does not collect patient details, provide medical advice, ask for prescriptions, place orders, reserve medication, process payment, or make clinical decisions. A pharmacist or licensed clinician remains responsible for medicine suitability, and the human operator remains responsible for the final decision.

The default demo path is deterministic and never places a phone call. Live calling is an opt-in, server-side capability for authorized recipients only. Once a call is dispatched, MedRoute does not silently retry or cancel it; the recorded result must be reviewed before a new authorized check is started.

Challenges and what I learned

The hardest part was not building a form that places calls. It was making the result trustworthy enough to support a human decision.

A call can be unanswered, a provider result can arrive late, a price can be approximate, pack quantities can be incompatible, and a “completed” status does not necessarily prove that pharmacy staff were reached. I learned to preserve uncertainty rather than hide it: unknown values stay unknown, approximate prices do not become recommendations, and failure states remain visible alongside successful results.

I also learned that structured outputs matter most when the phone call is only one step in a larger workflow. CALL-E makes it possible to connect the real world to software, but the product still needs careful consent, privacy boundaries, idempotency, auditability, and a clear human decision point.

MedRoute is my attempt to make that connection useful, practical, and safe.

Built With

Share this project:

Updates

Submission history