A complete, locally-runnable CDSS that fuses drug-interaction screening, Bayesian PK/PD modeling, kinetic GFR and quantitative imaging into a joint posterior state — delivering ≤ 3 prioritized, provenance-audited recommendations per patient, never an avalanche of alerts.
Run the Workflow Demo Professional ServicesBeyond binary interaction flags: a three-tiered pipeline that detects known interactions deterministically, mines novel signals from spontaneous reports, and upgrades statistical signals toward causal evidence — all conditioned on the patient's live physiology.
Queries the 2.85M-interaction knowledge base (DrugBank + PrimeKG) for known pharmacokinetic mechanisms — CYP3A4 / P-gp inhibitors, inducers and substrates.
DuMouchel's gamma-Poisson shrinkage over FAERS performs disproportionality analysis — detecting events reported significantly above background rate while resisting low-count false positives.
Self-Controlled Case Series compares event rates during exposure vs. control periods within the same patient — controlling all time-invariant confounders (genetics, chronic comorbidity).
Conditional reasoning — risk is not a lookup. QT-prolongation risk starts from the baseline QTc extracted by M4 (echo ±5% error model), adds the cumulative QT liability of every drug on the list, and is potentiated by hypokalemia detected in M3. The same amiodarone + clarithromycin pair scores high at K⁺ 3.3 and lower at K⁺ 4.2 — try it in the demo below.
Select a medication list, set the patient's potassium, and run the advisor. Interactions are screened, ranked by expected utility, and the knapsack alert budget surfaces only the top three — exactly as the production system behaves.
Configure the regimen and press Run Decision Support…
Illustrative sample knowledge base for demonstration. The production system screens 2,855,310 interactions, 5,701 ADRs and 4,566 drugs entirely on local hardware (SQLite, no external APIs).
Each module contributes evidence to the blackboard as log-likelihood ratios with strict provenance — never as overconfident binary statements.
A shared, auditable joint posterior over latent physiological states (GFR, EF, lean mass). Every contribution is a log-likelihood ratio; every piece of raw data is used exactly once — a duplicate provenance_id raises a ProvenanceError, defeating the "echo problem" that inflates confidence in naive multi-module systems.
Optimal combination of conditionally independent scalar estimates — tighter, more precise posterior.
M2 and M3 share renal-physiology assumptions; GLS uses the covariance matrix Σ to down-weight redundant information — a wider, more honest confidence interval.
Not heuristics — formal decision theory. Actions are selected by expected utility; the alert list is a constrained optimization, and the whole engine self-audits in production.
Every candidate action (hold, reduce, monitor) is scored against expert-defined utilities; the maximum wins.
Each alert carries net benefit and attention cost; the knapsack selects the near-optimal subset within a budget of 3 alerts/patient/day — suppressing 50–70% of raw alerts in ward simulations.
Clinical utility measured by Decision Curve Analysis (net benefit vs. treat-all/treat-none), while CUSUM charts watch calibration drift and trigger automatic recalibration.
FastAPI microservices, a Streamlit clinical dashboard, optional Redis event bus, SQLite knowledge base — containerized with Docker for identical laptop-to-hospital deployment.
Stack: FastAPI · Streamlit · PyMC/MCMC · Bootstrap Particle Filter · BOCPD · PyRadiomics · Conformal Prediction · CUSUM · Decision Curve Analysis · SQLite · Redis Event Bus · Docker
Anonymized trajectories from the 20-patient synthetic ward validation (stable, AKI, cardiogenic shock, high-polypharmacy phenotypes).
Beyond the research implementation, the following engagement tracks are available for hospitals, research groups and health-technology teams.
Docker-containerized, local-first installation on hospital servers — identical to the validated research environment. No patient data ever leaves your network.
Decoupled FastAPI microservices expose clean RESTful endpoints designed for EHR connectivity, with FHIR-simulator interoperability testing on the roadmap.
Site-specific recalibration and continuous safety monitoring on your patient population — the statistical guarantees travel with the deployment.
Workshops for clinical pharmacology and informatics teams on statistically sound CDSS design, plus joint research projects and publications.
| Phase | Status | Scope |
|---|---|---|
| Phase 1 | Complete | Local research implementation; 20-patient ward simulation; GLS fusion validation; alert-budget and provenance-safety testing. |
| Phase 2 | Current | Public platform (this site) with interactive demonstration; remote demo deployment on Railway.app for evaluation access. |
| Phase 3 | Planned | FHIR-simulator interoperability testing; pilot EHR integration with partner institutions. |
| Phase 4 | Planned | Formal clinical validation study measuring impact on patient outcomes via Decision Curve Analysis and logged bandit evaluation. |
RezpharmaCDSS is an independent research implementation of the architectural blueprint "From Sketch to Statistically Sound Code" — a complete, locally-runnable polypharmacy CDSS built and validated end-to-end on standard hardware, with no cloud services or external APIs after setup.
The system embodies provenance-tracking probabilistic fusion, hierarchical Bayesian PK/PD, kinetic GFR, quantitative imaging covariates and decision-theoretic alert budgeting — evaluated by simulation-based ward studies and Decision Curve Analysis.
Educational & research use only. This software is not a substitute for professional clinical judgment and requires formal clinical validation before use in patient care.
For institutional deployment, research collaboration, or speaking and media requests. Replies within 48 hours.
Polypharmacy CDSS — Research & Implementation