Case Study · A+ Graduation Project
PharmaSafe
An end-to-end medication-safety platform anchored by DrugBank as the primary medication knowledge source, with DDInter as supplementary interaction evidence and PubMedBERT as a fallback model for unresolved interaction analysis.
Platform Demo
A full recorded walkthrough of the real PharmaSafe application.
A complete recorded walkthrough of the real PharmaSafe application, loaded with native browser video controls and metadata-only preloading.
The video is loaded with native controls, inline playback support, and metadata-only preloading to avoid pulling the full file before a visitor chooses to watch it.
Product Gallery
Genuine PharmaSafe application screens.
Newly supplied screenshots from the real application, grouped by identifiable feature and kept separate from the OCR presentation slides.
Patient DDI analysis
Medicine Safety Check
Patient-mode medicine safety check with selected medicines and high-risk interaction summary.
DDI result
High-Risk Combination Result
High-risk interaction result for Simvastatin and Clarithromycin with risk counts and caution message.
Professional DDI review
Pharmacist DDI Findings
Pharmacist-mode DDI findings comparing interaction evidence for the patient's current medications.
Digital twin / safety report
Static Digital Twin Safety Analysis
Static digital twin safety analysis with patient-specific safety decision, risk level, hard-stop flags, and profile findings.
Drug substitution
Rosuvastatin Substitution Summary
Alternative medication summary for Rosuvastatin with rationale, ranking, and digital twin re-check details.
Substitution evidence
Alternative Evidence Summary
Professional evidence summary for a candidate alternative, including therapeutic match and evidence context.
Ranked safer options
Top Alternatives
Top alternatives screen with Rosuvastatin, Pitavastatin, and Fluvastatin recommendation cards.
Prescription OCR
Prescription OCR Review
Review screen for medicines detected from a prescription scan before saving the structured result.
Prescription OCR
Prescription Detection Preview
Prescription scan preview with detected regions drawn over the uploaded prescription image.
Pharmacist simulation
Manual Patient Safety Simulation
Manual simulation form for entering patient attributes, current medications, conditions, allergies, and pregnancy state.
Patient overview
Patient Dashboard
Patient dashboard with recent scan, safety alerts, suggested alternatives, daily medications, schedule, and recent activity.
System Architecture
From patient context to medication safety services.
Conceptual flow based on the supplied project facts and required case-study architecture.
01
Patient or Pharmacist
02
Web / Mobile Interface
03
FastAPI
04
Medication Safety Services
DDI Engine
Substitution Engine
Static Digital Twin
OCR
DrugBank / Neo4j primary knowledge source
DDInter supplementary interactions
PubMedBERT fallback model
Supporting Services
System Narrative
Medication safety as an integrated AI workflow.
01
The problem
Medication safety depends on scattered evidence, patient context, and pharmacist review. PharmaSafe was designed to bring interaction checks, substitution reasoning, OCR, and explainable reporting into one end-to-end workflow.
02
Platform overview
The platform combines web/mobile interfaces with FastAPI services for drug-drug interaction analysis, patient-aware alternatives, static digital twin comparison, handwritten prescription OCR, and explainable output.
03
Drug-drug interaction engine
DrugBank is PharmaSafe's primary and most important data source: the core medication knowledge source behind drug information and interaction evidence. DDInter supplements the interaction dataset, while PubMedBERT is used as a fallback when structured evidence is insufficient.
04
Patient-aware drug substitution
Substitution logic filters and ranks potentially safer alternatives against the patient's current medication profile and available interaction evidence for pharmacist review.
05
Static digital twin
The static digital twin models the patient's current medication state, compares original and substituted regimens, and generates explainable safety reports.
06
Prescription OCR
The OCR subsystem converts handwritten medication information into structured fields through YOLO11n ROI detection, TrOCR recognition, and domain-aware pharmaceutical-name correction.
07
Engineering challenges
The project required connecting heterogeneous medical data, fallback NLP reasoning, OCR uncertainty, patient-specific context, and explainability into interfaces usable by pharmacists and patients.
08
Learning and impact
PharmaSafe shows Mohamed's ability to integrate models, APIs, graph data, medical NLP, computer vision, and explainability into a coherent applied AI product.
OCR Evidence
Genuine PharmaSafe slides, used as project evidence.
These visuals document the OCR subsystem specifically: detection, recognition, correction, integration, and evaluation.
Technology Stack
Models, APIs, graph data, and interfaces working together.
Metrics and Evaluation
Core Capabilities
Four product pillars behind PharmaSafe.
01
DrugBank is the primary and most important medication knowledge source behind drug information and interaction evidence.
02
Hybrid DDI analysis uses DrugBank/Neo4j as the core evidence layer, DDInter as a supplementary interaction dataset, and PubMedBERT as a fallback model.
03
Patient-aware substitution filters and ranks safer alternatives for pharmacist review.
04
Static digital twin compares current and substituted medication regimens with explainable reports.
05
Prescription OCR converts handwritten medication information into structured fields.
Repository
Explore the PharmaSafe codebase.
The supplied public repository is linked directly. No live demo URL was supplied in the handoff.
Open GitHub