Inspiration -

Doctors in Southeast Asia are severely overloaded, often seeing 50+ patients a day. During my research into the Elfie Healthcare challenge, I realized that a basic "Medical Scribe" isn't enough. Transcribing a consultation doesn't save lives—catching human error does. Furthermore, once a patient leaves the clinic, their data is lost in a fragmented system. I wanted to build an end-to-end "Clinical Intelligence Stack" that acts as an active safety net for doctors and an empathetic, multilingual guide for patients.

What it does -

Elfie Clinical OS is a closed-loop EMR (Electronic Medical Record) and Telemedicine platform with two synchronized interfaces:

The Doctor Dashboard: A clinician records a live consultation. Qwen-Max extracts the chief complaint, symptoms, diagnosis, and medications. Crucially, it runs a Clinical Decision Support (CDS) check, throwing massive red UI alerts if the doctor's diagnosis contradicts the symptoms or if there are adverse drug risks. The Patient Mobile Portal: The medical jargon is autonomously translated into a patient-friendly care plan. The patient can upload PDF Lab Reports or symptom photos, which Qwen-VL analyzes and breaks down into an easy-to-understand summary. Finally, an automated Day-3 check-in asks dynamic questions based on the specific prescribed drugs, escalating dangerous side effects back to the doctor's inbox instantly.

How I built it -

The AI Engine: Alibaba Cloud's DashScope API. I utilized qwen-max for advanced clinical NLP, strict JSON extraction, and multilingual translation. I used qwen-vl-max for the multimodal Lab Report Analyzer. Backend: A high-performance Python FastAPI server that orchestrates the AI reasoning and provides the REST API. Database: I integrated Supabase (PostgreSQL) to establish true "Longitudinal Patient Memory." Every consultation, care plan, and patient message is relationally linked by the patient's mobile number, allowing doctors to pull up a complete medical history instantly. Frontend: Next.js 14 with Tailwind CSS, featuring stateful background polling to instantly push patient escalations to the doctor's UI without page refreshes.

Challenges I ran into -

Moving from a stateless hackathon script to a fully relational database architecture was my biggest hurdle. I had to design an autonomous "Care Plan Translator" that triggers immediately after the doctor saves a record, seamlessly generating dynamic follow-up questions tailored to the specific medications prescribed. Additionally, enforcing strict JSON schemas for Qwen required aggressive prompt engineering and robust Python Regex fallback parsers to prevent UI crashes if the LLM outputted conversational text.

Accomplishments that I am proud of -

I've successfully built a system that actively catches simulated medical malpractice. Watching the Qwen engine ingest an audio file of a misdiagnosed heart attack, cross-reference the symptoms, and throw a "Critical Cardiac Risk" red flag on the doctor's screen was an incredible validation of the technology's lifesaving potential. i am always proud on my own development as I always tries to solve generational problem through my tech knowledge.

What I learned -

I learned that multimodal AI (Vision + Text) combined with a deterministic relational database is the future of EMR systems. Relying solely on LLMs is dangerous, but using them to parse unstructured clinical data into strict SQL tables creates a highly secure, scalable health-tech platform.

What's next for Elfie Clinical OS -

The next step is containerizing the FastAPI and Next.js applications and deploying the full stack onto Alibaba Cloud ECS. From a clinical perspective, we plan to integrate WebRTC to allow live video telemedicine directly inside the platform, enabling Qwen-VL to monitor patient vitals and facial micro-expressions in real-time during remote consultations.

Built With

  • alibaba-claud
  • fastapi
  • next.js
  • postgresql
  • python
  • qwen
  • react
  • supabase
  • tailwindcss
  • we-plan-to-integrate-webrtc-to-allow-live-video-telemedicine-directly-inside-the-platform
Share this project:

Updates