Inspiration

When elderly patients leave the hospital, care does not really end. In many cases, the most fragile part begins at home.

Patients are often handed long discharge documents filled with medication schedules, wound-care steps, follow-up dates, and warning signs. For elderly patients in Singapore, those instructions may be in English, medically dense, and hard to act on without help. A missed antibiotic dose, misunderstood wound-care step, or ignored fever can quickly become a preventable complication.

We built LastMile because we wanted to solve a very human gap: the last mile between hospital discharge and safe recovery at home. We were inspired by the idea that AI should not only make workflows faster, but also make care more understandable and accessible.

What it does

LastMile turns a hospital discharge report into a proactive follow-up phone call.

A hospital staff member can paste or upload a discharge report. LastMile extracts key information such as:

  • medication names, dosages, and schedules
  • wound-care or procedure-care instructions
  • follow-up appointment details
  • red-flag symptoms such as chest pain, fever, or wound infection
  • the patient's preferred language

The system then simulates or triggers a phone call to the patient. The agent speaks in a Singapore local language such as English, Mandarin, Malay, or Tamil. It walks through the instructions conversationally, lets the patient ask questions, resumes the checklist after interruptions, and checks for red-flag symptoms.

If a red flag is detected, LastMile generates a caregiver alert so a family member or care team can follow up quickly.

LastMile is not a diagnostic tool. It is comprehension support. Its job is to help patients understand the care plan they were already given.

How we built it

We built LastMile as a full-stack healthtech prototype.

The backend is built with FastAPI and Python. It handles discharge parsing, conversation state, red-flag detection, caregiver alerts, and FHIR-style export. OpenAI is used to parse discharge summaries and support conversational question answering. ElevenLabs provides text-to-speech for English, Mandarin, Malay, and Tamil. Twilio is supported for optional outbound phone calls, while the demo also includes a browser-based simulated phone UI.

The frontend is built with React, TypeScript, Vite, and React Flow. It includes:

  • a discharge report upload/paste workflow
  • extracted patient and discharge details
  • MOH/EHR readiness checks
  • an SGCDI-aligned FHIR document bundle preview
  • a phone-style demo call interface
  • localized patient reply bubbles
  • caregiver alert display

We also added a hospital integration layer. LastMile exports a FHIR R4 document Bundle inspired by Singapore's SGCDI direction for discharge summaries. This makes the project more realistic as a hospital-facing product, while still being clear that production deployment would require Synapxe/HIA-compliant HIMS integration and clinical governance.

Challenges we ran into

One major challenge was language support. Our original idea focused on dialects such as Hokkien and Cantonese, but ElevenLabs does not reliably support those as production-ready TTS languages. We adapted the product to Singapore's official languages: English, Mandarin, Malay, and Tamil. That made the demo more technically reliable and more aligned with what speech providers support today.

Another challenge was keeping the conversation natural. Patients may interrupt at any point to ask questions, so the agent needs to answer and then return to the correct place in the checklist. We built a conversation state machine to handle phases such as greeting, medication review, wound care, red-flag checks, Q&A, and closing.

We also had to avoid overclaiming on healthcare integration. It would be unrealistic to say a hackathon project can directly integrate with MOH or NEHR immediately. Instead, we built a credible integration path: discharge report intake today, FHIR/SGCDI-aligned export for review, and future integration through certified HIMS/EHR workflows.

Accomplishments that we're proud of

We are proud that LastMile feels like an end-to-end product, not just a chatbot.

The demo can ingest a discharge report, extract structured instructions, show EHR readiness, simulate a realistic phone call, speak in the patient's selected language, handle interruptions, detect red flags, and generate caregiver alerts.

We are also proud of the safety framing. LastMile does not try to diagnose patients or replace clinicians. It focuses on a narrow but important problem: making sure patients understand and follow the discharge instructions they already received.

Finally, we are proud that the system has a plausible deployment path. It can start with simple discharge PDF/text intake for a ward pilot, then mature toward hospital EHR integration.

What we learned

We learned that healthcare AI products need more than model capability. They need workflow fit, trust, escalation paths, and careful regulatory framing.

We also learned that the best demo is not always the most technically flashy one. A simple phone call in the right language can be more powerful than another app, especially for elderly patients.

On the technical side, we learned how to combine LLM parsing, multilingual speech, stateful conversation flow, red-flag detection, and FHIR-style healthcare data structures into one cohesive product experience.

What's next for LastMile

Next, we want to pilot LastMile in a focused clinical setting, such as a surgical ward with high post-discharge instruction burden.

The next steps are:

  • validate discharge instruction comprehension before and after LastMile calls
  • work with clinicians to refine red-flag questions by specialty
  • add clinician/care-team dashboards for escalation review
  • support SMS/WhatsApp summaries for caregivers
  • integrate with hospital EHR workflows through HL7 FHIR or HIMS partners
  • add consent, audit logging, encryption, and role-based access controls
  • run a small pilot measuring comprehension, nurse call reduction, caregiver response, and readmission signals

Our long-term vision is to make sure every patient leaves hospital with a care plan they can actually understand and follow.

Built With

Share this project:

Updates