Skip to content
H

Hamsa

#Healthcare

Created on 19th September 2026

•

H

Hamsa

#Healthcare

The problem Hamsa solves

The Problem
Every month, India's drug regulator (CDSCO) publishes lists of medicine batches that failed quality testing (Not of Standard Quality or spurious). In June 2025 alone, 189 samples were flagged. But these lists are static PDFs that nobody holding a strip of tablets can search. WHO estimates about 1 in 10 medical products in low- and middle-income countries is substandard or falsified. Patients in smaller towns, caregivers and clinic staff have WhatsApp but no easy way to check a batch.

What Hamsa is used for
Hamsa is a WhatsApp bot. The user sends a batch number or a photo of the pack, and Hamsa checks it against 529 real CDSCO NSQ records. It replies with a verdict (🔴 RED, 🟠 AMBER, ⚪ EXPIRED or 🟢 GREEN), plain-language advice, and a voice note in English, Hindi or Kannada. Every check is shown with its source and confidence, so the answer is explainable rather than a black-box score.

How it makes the task safer and easier

  • Easier: no app to install, and the answer arrives in seconds in the user's own language.
  • Safer: it uses the regulator's own test results, not just a QR code, which proves only that a code was generated correctly. A RED tells the user to stop and ask a pharmacist. Two independent weak signals escalate a verdict, and one alone never does.
  • Honest: GREEN means "no warning found in our records", never "genuine". If it can't read a photo, it says so instead of guessing.
  • Fair: manufacturers can dispute a wrong listing, and only a regulator can overturn it.

Short version (about 60 words)

Regulator-published lists of failed medicine batches are static PDFs that patients can't search. Hamsa is a WhatsApp bot: send a batch number or pack photo and it checks 529 real CDSCO records. It replies in English, Hindi or Kannada with a verdict, advice, a voice note and the evidence behind each check. No app to install.

Notes on wording

  • I left out claims about inspectors and counterfeit detection. Neither holds up under questioning (see the gaps we covered earlier).
  • "529 real records" is accurate, but it covers April–June 2025 only. If a field asks for data freshness, say so plainly.
  • Check the dates. If you refresh the CDSCO data before submitting, update the "529" figure to match.

If the form has other fields (technology used, novelty, impact), paste them and I'll write those too.

Challenges we ran into

Challenges we ran into

  1. Turning a regulator's PDFs into trustworthy data.
    CDSCO publishes failed-batch lists only as PDFs, with no API and no clean tables. A naive parse gave rows with misaligned columns. We added a page-text guard: a row is accepted only if its batch, product and manufacturer all appear in the source page. It loaded 529 rows and rejected 38, each with a logged reason. We then checked our June totals (55 central and 130 state) against the published summary. We chose to reject doubtful rows rather than guess, because a wrong RED is worse than a missing one.

  2. Blurry photos double-counting as evidence.
    Our rule says two independent weak signals escalate a verdict to RED. But a blurry photo causes both a failed code decode and a label mismatch, so one bad photo could look like two independent warnings and produce a false RED. We fixed this with a causal-independence rule: the blur signal counts as upstream of the other two and never as a second signal beside them. Tests cover every signal pair.

  3. OCR misreading printed batch numbers.
    Tesseract and Florence-2 confuse O/0 and I/L/1, and Florence once read "Mfd." as "Mdf.". We added a normalized batch_key column so lookups tolerate case, punctuation and those swaps. If a match is ambiguous, it returns no match. Weak OCR output is refused instead of guessed. The bot then says "type the batch number", and OCR text never feeds the verdict.

  4. WhatsApp's own constraints.

  • Voice notes must be OGG/OPUS, mono, ≤ 512 KB, or Meta rejects them (error 131053), so we pre-generated and size-checked all 15.
  • Meta retries webhooks, so users could get duplicate replies. We now return 200 immediately, drop repeats by message ID, and use a per-phone lock.
  • Meta restricts open-ended AI assistants, which pushed us toward a fully rule-based design with no LLM. That made verdicts explainable.
  1. Deploying from a laptop.
    The Cloudflare quick tunnel gets a new URL on every restart, and the bot silently stops replying. We wrote preflight.py and set_webhook.py so the checks and re-registration are one command each.

Notes

  • Trim to 3 challenges if there's a length limit. I'd keep #1, #2 and #4.
  • Not sure which of these you personally hit? Say so. I inferred them from the code, tests and docs, not from your memory of building it.
  • I haven't verified the tunnel challenge as a build bug. It's a deployment hurdle that is documented, so cut it if it doesn't fit.

Discussion

Builders also viewed

See more projects on Devfolio