How imtiaz-techie/multimodal-ddi-checker works
RxLens is a local medicine lookup and personal-health-record tool with medication interaction and patient-risk checks, plus prescription-image OCR utilities. The main CLI workflow stores a patient profile and medications, then checks those records (and optional prescription text) for risks; medicine lookup is a separate CLI option. The medicine engine reads the supplied medicine and generic CSV files, while OCR exposes image extraction and prescription-line parsing as utilities. The excerpts show the CLI-to-engine and local JSON-record relationships; no OCR-to-DDI integration is shown.
Main entry points: phr_ui.py PHR CLI · rxlens_core.py Medicine engine · rxlens_ddi.py DDI and risk checks · rxlens_ocr.py Image text extraction
Components 11
CLI and PHR
- PHR CLI
phr_ui.py - PHR manager
phr_ui.py - Local PHR JSON
Medicine lookup
- Medicine engine
rxlens_core.py - Medicine catalogue
medicine.csv/medicine.csv - Generic catalogue
generic.csv/generic.csv
Medication safety
- DDI and risk checks
rxlens_ddi.py
Prescription OCR
- Prescription image
- Image text extraction
rxlens_ocr.py - Prescription line parsing
rxlens_ocr.py
Other components
- CLI user
Connections 10
- CLI user → PHR CLI: uses
phr_ui.py - PHR CLI → PHR manager: manages records
phr_ui.py - PHR manager → Local PHR JSON: loads and saves
phr_ui.py - PHR CLI → Medicine engine: looks up medicines
phr_ui.py - PHR CLI → DDI and risk checks: requests risk check
phr_ui.py - DDI and risk checks → Medicine engine: reads medicine data
rxlens_ddi.py - Medicine engine → Medicine catalogue: reads catalogue
rxlens_core.py - Medicine engine → Generic catalogue: reads catalogue
rxlens_core.py - Prescription image → Image text extraction: provides image
rxlens_ocr.py - Image text extraction → Prescription line parsing: passes extracted text
rxlens_ocr.py