Inspiration
I am a medical doctor and clinical AI engineer based in Lagos, Nigeria. In my work, I see a problem that does not get discussed enough: the infrastructure gap in pharmacovigilance. A clinician in the US or Europe who wants to check whether a drug has new safety signals can pull up a reasonably integrated set of tools. A clinician in Lagos, Nairobi, or Accra doing the same thing is manually checking FDA, WHO, NAFDAC, and SAHPRA across separate browser tabs, running PubMed searches, and hoping something has been updated recently. That process takes hours, and in a busy ward setting, it often does not happen at all. The problem is not awareness. It is access. The data exists. It is scattered. Vigil is my attempt to fix that, starting with the data sources that matter most for African clinical practice.
What it does
Vigil is a pharmacovigilance intelligence tool. Type a drug name. In under 60 seconds, it:
Searches 11M+ biomedical papers and 225K+ regulatory documents via Paperclip (FDA, medRxiv, PMC, ClinicalTrials.gov) Scrapes live alerts from WHO, NAFDAC, and SAHPRA via ScraperAPI Extracts and severity-classifies safety signals using Llama-3.3-70b on Groq Detects rising signals by comparing 30-day vs 6-month publication velocity per source Cross-references signals against active clinical trials on ClinicalTrials.gov Scores therapeutic alternatives on a 100-point safety metric for side-by-side comparison
Beyond signal monitoring, Vigil has a full clinician toolkit:
Drug-drug interaction checker: enter a polypharmacy list, get severity-ranked pairs with mechanism, clinical effect, and management Patient-specific dosage calculator: enter weight, age, height, eGFR, Child-Pugh score, and sex; Groq computes an adjusted dose incorporating renal, hepatic, BSA, and weight-based corrections Special population flags: pregnancy category, lactation safety, geriatric precautions, paediatric age restrictions Pharmacogenomics: CYP2D6, CYP2C19, HLA-B, TPMT gene-drug interactions with evidence grading Africa formulary status: NAFDAC (Nigeria) and SAHPRA (South Africa) registration, WHO prequalification. This data layer does not exist in any equivalent consumer tool. One-click PDF clinical brief: every finding exported as a structured document, ready to attach to a patient chart or present at grand rounds
The UI is an editorial design system (Playfair Display + Source Serif 4 + JetBrains Mono) with full dark/light mode toggle across 8 tabs. Drug name autocomplete uses prefix matching and fuzzy correction via Python's difflib, so partial or misspelt inputs still resolve correctly.
How we built it
Data layer Paperclip handles structured retrieval across the biomedical corpus. It removes the need to build and maintain scrapers for PubMed, FDA documents, and ClinicalTrials.gov from scratch. ScraperAPI handles the live web sources (WHO, NAFDAC, SAHPRA), with render=true enabled for Cloudflare-protected pages. Intelligence layer Groq serves Llama-3.3-70b with response_format: json_object throughout, which enforces valid JSON output without needing to strip markdown fences or handle parse errors from unstructured text. Temperature is set to 0.1 for signal extraction and 0.05 for the dosage calculator, where arithmetic needs to be deterministic. Signal velocity Two Paperclip queries per source: one scoped to 30 days, one to 6 months. The velocity score is the annualised 30-day count divided by the 6-month count. A score above 2.0 with at least 3 recent documents triggers a rising signal flag. This detects accelerating concern before it reaches clinical guidelines. Safety scorecard Therapeutic alternatives are fetched in parallel using concurrent.futures. Each drug is scored as 100 minus a weighted signal penalty: critical signals at 15 points, moderate at 5, informational at 1. The scorecard renders as a ranked bar chart sorted by safety score descending. Export fpdf2 generates the clinical brief with a custom VigilPDF class inheriting from FPDF. Every tab's output is included: signals, velocity, scorecard, interactions, dosing, populations, PGx, and Africa formulary.
Challenges we ran into
NAFDAC's URL structure is broken. Their official drug safety alerts page returns 404. I confirmed the working URL (/category/recalls-and-alerts/) by testing directly via ScraperAPI before hardcoding it. SAHPRA is behind Cloudflare. Plain HTTP requests return a JS verification page. render=true on ScraperAPI resolves this, at a cost of 5 credits per request vs 1 for standard pages. Documented in the architecture so the cost is predictable. Groq wraps array responses inconsistently. Llama-3.3-70b occasionally returns {"signals": [...]} instead of a bare array [...]. Every parsing function has an unwrapper that handles both shapes before passing to Pydantic validation. Streamlit has no native autocomplete. I implemented prefix matching and fuzzy correction client-side using difflib.get_close_matches. Suggestions render as clickable buttons that fill the input and trigger a rerun, giving the feel of a typeahead without any external component library. Groq's free tier is rate-limited at 30 RPM. The full pipeline makes 7 Groq calls per scan. At 30 RPM, that allows roughly 4 full scans per minute, which is enough for a demo but tight for concurrent users. The fix for production is batching the clinician tool calls or moving to a paid tier.
Accomplishments that we're proud of
The Africa formulary layer. No equivalent free tool surfaces NAFDAC (Nigeria), SAHPRA (South Africa), and WHO prequalification status alongside safety signals in a single interface. This took the least engineering time of any feature in Vigil and addresses the largest gap. The data existed. Nobody had surfaced it.
End-to-end pipeline in five days, solo. A working clinical AI tool with eight tabs, a patient-specific dosage calculator, drug-drug interaction checking, pharmacogenomics, trial cross-referencing, signal velocity detection, and a PDF export — built by one person in under a week while practising medicine.
Signal velocity detection. Comparing 30-day vs 6-month publication rates per source to flag accelerating signals before they reach clinical guidelines is a real pharmacovigilance technique. Implementing it without a time-series database — using two Paperclip queries and a simple ratio — is the kind of pragmatic engineering decision that makes complex ideas actually shippable.
The dosage calculator. Weight, age, height, eGFR, Child-Pugh score, sex, and BSA via the Mosteller formula — all five major adjustment axes in one interface. Groq computes the adjusted dose dynamically for any drug, not just a hardcoded list. A renally impaired elderly patient gets a different number than a healthy adult. That is the point.
An editorial UI that looks nothing like a hackathon project. Playfair Display, Source Serif 4, JetBrains Mono, 1.5px ink borders, dark/light mode, and a newspaper design system built entirely in Streamlit custom CSS. Most teams ship a default Streamlit theme. We shipped a product.
Honest clinical disclaimers, prominently placed. Every dosage result carries a visible warning above the number, not below it in small print. The guideline comparison tab shows a red badge flagging the knowledge cutoff before the recommendation, not after. Building a clinical tool means taking seriously what it cannot do, and saying so where it counts.
What we learned
Pharmacovigilance data is more fragmented than I expected even after working in clinical practice. NAFDAC's website, which is the primary regulatory authority for 220 million people, has broken navigation and no structured API. That is not a niche infrastructure problem. It is a patient safety problem. The Africa formulary tab took the least engineering time of any feature in Vigil. The data exists in Groq's training corpus. The insight was simply to ask for it in a structured way and surface it prominently. That is the version of the problem I want to keep solving.
What's next for Vigil
TIBA Health is building Vigil as a B2B SaaS product targeting hospital pharmacies, clinical pharmacists, and CROs across Sub-Saharan Africa and emerging markets.
Business model
- Clinic — free for individual clinicians (up to 50 scans/month)
- Institution — $199/month per facility (unlimited scans, EHR integration, team accounts)
- Enterprise — custom pricing for pharmaceutical companies running post-market surveillance and CROs managing multi-site trials
Roadmap
- Expand drug list from 50 to the full WHO Essential Medicines List (500+ drugs)
- Real email alert subscriptions — weekly signal digest per tracked drug
- FHIR integration — pull patient medication list directly from EHR, auto-run DDI check on admission
- Expand Africa formulary to NMSA (Ethiopia), MCAZ (Zimbabwe), NDA (Uganda), KEBS (Kenya)
- Mobile-optimised layout for ward round use on phone
- Institutional dashboard — track signal trends across a full formulary, not just individual drugs
- API access for pharmaceutical post-market surveillance teams
The Africa formulary layer is the primary wedge — no equivalent tool covers NAFDAC, SAHPRA, and WHO prequalification in a single interface. That is the moat.
Log in or sign up for Devpost to join the conversation.