Doctors Write in Code. I Built an AI to Translate It !!

Doctors Write in Code. I Built an AI to Translate It !!

I Built an AI App That Translates Doctor Prescriptions Into Plain English — Here's How

Have you ever stared at a prescription and had no idea what it meant?

"Amoxicillin 500mg TID x 7 days." "Metformin 500mg PO BID with meals."

Most patients have no idea what these instructions mean — and that gap between medical language and patient understanding is a real problem. Confused patients miss doses, take medications incorrectly, or simply don't follow through.

So I decided to build something about it.


What I Built

RxSimple — an AI-powered web app that takes any prescription and converts it into simple, plain-English explanations that anyone can understand.

A patient pastes in their prescription. The AI explains:

  • What the medication is for
  • How and when to take it
  • Important warnings and side effects

No medical degree required.

Try it live: https://lnkd.in/gKUBJ2Y2


The Technical Journey (In Plain English)

Building this required solving three distinct problems: training an AI, building infrastructure to run it, and making it accessible to anyone on the web.

Here's the architecture — what happens from the moment a patient types their prescription to the moment they see a plain-language explanation:

Article content



Phase 1: Teaching the AI About Prescriptions

The first challenge was training an AI model to specifically understand medical prescriptions — not just answer general questions, but produce consistent, patient-friendly explanations.

I used a technique called QLoRA fine-tuning on a base model called Mistral-7B (a 7-billion parameter open-source language model). Fine-tuning means teaching the model a specific skill — like a doctor learning a specialty on top of their general medical training.

The remarkable part: I did all of this for free, using Kaggle's cloud GPU environment. Training took just 4.6 minutes.

The result is a custom-trained model, publicly available on HuggingFace:

https://lnkd.in/g7UPdvAW

What I learned: You don't need expensive hardware or a research lab to build custom AI models. Free cloud GPU platforms have democratised AI development in a way that simply wasn't possible 3 years ago.


Phase 2: Building the Infrastructure on AWS

Training the AI was only the beginning. Making it available 24/7 to anyone on the internet required building proper cloud infrastructure.

Here's what I set up on Amazon Web Services:

AWS ECR (Container Registry) — Packaged the entire application into a Docker container, making it portable and reproducible across any environment.

AWS EC2 — A cloud server that runs the application. I used a t3.micro instance — one of the smallest and cheapest available — because the heavy AI computation is handled elsewhere.

AWS API Gateway — Creates a secure HTTPS endpoint so the app can be safely called from any browser, anywhere in the world.

AWS S3 — Hosts the patient-facing web interface as a static website, with virtually unlimited availability and zero server management.

What I learned: Modern cloud architecture is about composing the right services together — not running everything on one big server. Each AWS service does one thing well.


Phase 3: The Hard Parts Nobody Talks About

Building this wasn't smooth. Here are the real challenges I ran into:

The model couldn't run on my server. A 7-billion parameter AI model needs around 14GB of RAM to run. My EC2 server had 1GB. I had to redesign the architecture so the AI computation happens in the cloud (via HuggingFace's infrastructure) while my server just handles routing.

API endpoints changed mid-project. HuggingFace deprecated their old inference API (api-inference.huggingface.co) and moved to a new router system. This caused a series of 410, 404, and 401 errors that took significant debugging to resolve.

Cloud permissions are granular. Every AWS action — creating a bucket, setting a policy, deploying a container — requires explicit permission. Missing even one IAM policy means hitting an AccessDenied error.

What I learned: Real-world AI deployment is 20% model work and 80% infrastructure, debugging, and integration. The ability to persist through errors is as important as technical knowledge.


The Result

A fully functioning, publicly accessible AI web application — built end-to-end by one person, using entirely free or near-free tools and infrastructure.

Total cost: Near zero (AWS free tier + free Kaggle GPUs + free HuggingFace hosting)

What it demonstrates:

  • Custom AI model fine-tuning
  • Cloud infrastructure design and deployment
  • Containerisation with Docker
  • API design and integration
  • Frontend development and cloud hosting


Why This Matters Beyond the App

The prescription simplifier is a proof of concept for something much bigger: AI as a health literacy tool.

Globally, low health literacy affects hundreds of millions of people. Patients who don't understand their medications are less likely to adhere to treatment, more likely to experience adverse effects, and more likely to be readmitted to hospital.

A tool like this — deployed at scale through hospital portals or pharmacy apps — could meaningfully improve patient outcomes. The technology exists. The infrastructure to deploy it is accessible. What's needed is the will to apply it.


What's Next

  • Swap in the fine-tuned model once dedicated inference infrastructure is available
  • Add multilingual support — translate explanations into regional languages
  • Integrate with pharmacy systems — auto-generate explanations at point of dispensing
  • Add voice output — for patients with low literacy or visual impairments


Links

#ArtificialIntelligence #MachineLearning #HealthTech #AWS #CloudComputing #LLM #FineTuning #BuildInPublic #HealthcareAI #OpenSource

The Idea is great! Madhukar Kumar I think later down the line you would want to add a L0 layer at image upload level <> which should convert bad handwriting or maybe some prescription language which Chemists are able understand.. maybe training on such prescriptions.

Was much needed solution in the market. Great work Madhukar sir 👏

Medical NLP is one of the harder problems in healthcare AI — clinical documentation evolved over decades as a human communication system, not a machine-readable data format, so the ambiguity and abbreviation density is enormous. The value unlock is substantial though: structured extraction from unstructured notes enables downstream use cases in clinical decision support, trial matching, and billing accuracy that historically required expensive manual abstraction. Curious how the model handles the variance between specialties, since cardiologist shorthand and surgical notes have very different patterns.

To view or add a comment, sign in

More articles by Madhukar Kumar

Others also viewed

Explore content categories