Prescription AI
A photographed prescription becomes a catalog-checked medicine list
Most physicians in Bangladesh still write prescriptions by hand, mixing English drug names, Bangla instructions, and more than one numeral system. OPD claims need that prescription. The model is not allowed to invent a medicine.
Production pipeline
- 1Upload
The original image is stored unchanged, with a UUID and a SHA-256 hash.
- 2Preprocess
The service corrects orientation, resizes to a working range, crops, deskews, denoises, and adjusts contrast.
- 3Transcribe
A vision-language model returns strict JSON. Local English-only OCR engines exist in the codebase and are off by default, so Bangla reading depends on the vision model.
- 4Match the catalog
RapidFuzz scores candidates against the live medicines table: 21,361 rows, on brand, generic, strength, and package.
- 5Normalise
Bangla and English dosage, instruction, and duration are parsed into shared codes. A pattern such as morning–afternoon–night is one of those codes.
- 6Confidence gate
A result completes automatically only when the overall score is at least 90 and every line matches the catalog. Otherwise it needs a person, or it fails.
The catalog is the source of truth
Prescription AI and IMP use the same medicines table. They do not keep two formularies that can drift apart.
Matching normalises Unicode, maps Bengali digits to Arabic digits, and strips punctuation. A small alias table corrects known reading mistakes. Strength is extracted from units such as mg, ml, and IU. Candidates are scored with a bonus when strength agrees.
A line binds automatically only above the high threshold. Anything below the review threshold is sent to a person. The original model output is kept when a reviewer corrects a line, so both versions remain for audit.
A clinic or pharmacy can use it today. It is not yet a step inside the mobile claim form. Connecting the two is proposed work.
What is live, partial, or still research
| Capability | Status |
|---|---|
| Image upload, preprocessing, and AI transcription | Implemented |
| Catalog-constrained medicine matching | Implemented |
| Bangla and English dosage and instruction normalisation | Implemented |
| Human verification API | Implemented |
| Full verification workbench for operators | Partial |
| Local Bengali OCR | Partial |
| Formal confidence calibration | Proposed |
| Wired into the mobile OPD claim form | Proposed |
| Dedicated layout detection and a national annotated benchmark | Future / Research |