About safety.viz
An agentic rebuild of the safetyGraphics interactive renderers, documented in the open for R/Pharma 2026.
The project
safety.viz is one workstream of a larger experiment: modernizing the safetyGraphics clinical-safety graphics ecosystem with AI agents doing the engineering — requirements, tests, implementation, and this site — under human review, with every requirement, design decision, and release tracked in public. The build is the subject of a developer-diary keynote at R/Pharma 2026; the running story lives on the obot roadmap.
The working method is deliberately conservative for safety software: each renderer starts from a reviewed requirement matrix, extracted from the original renderer's documented behavior; development is red-green (a failing, requirement-keyed test first, then the minimal change); and a renderer only counts as migrated when its live demo, requirement-traced test-evidence report, and generated API reference are all on this site. The R-side companion, gsm.safety, wraps the same committed bundle as Widget_* htmlwidgets, mirroring how gsm.kri consumes gsm.viz in the OpenRBQM ecosystem.
The audience is anyone who reviews clinical-trial safety data — medical monitor, biostatistician, or data scientist. For each migrated renderer, the proof is on this site: a live demo against real example data, an audit-style test-evidence report, and a generated API reference.
Lineage
The charts themselves are not new — that is the point. Each renderer re-implements an interactive display designed, reviewed, and used in practice under the safetyGraphics project, the open-source framework for clinical-trial safety monitoring that grew out of the ASA Biopharm / DIA Safety Working Group's Interactive Safety Graphics task force. The original implementations were built by the open-source team at Rho, Inc. on their Webcharts D3 library. safety.viz ports that behavior onto maintained Chart.js, preserving each chart's clinical intent while adding JSON-Schema data contracts and requirement-traced evidence.
Original renderers
Full credit to the original authors — each safety.viz module traces to one of these open-source Rho, Inc. repositories:
| Original renderer | In safety.viz | What it shows |
|---|---|---|
safety-histogram | Safety Histogram available | Distribution of a chosen lab or vital-sign measure with filters, grouping, normal-range overlay, and a linked participant listing. |
safety-outlier-explorer | Safety Outlier Explorer available | Participant-level results over time: one line per participant for the selected measure against a population normal-range band, with filters, x-axis and y-limit controls, color-by grouping, and click-to-select participant detail. |
safety-results-over-time | Safety Results Over Time available | Population-level distribution of a measure at each study visit as box-and-whisker marks, with grouping, an outlier overlay, and linear/log y-axis controls. |
safety-shift-plot | Safety Shift Plot available | Baseline versus comparison-visit values for a measure on a scatter with an identity line, measure and visit controls, filters, and a brush selection that opens a linked participant listing. |
safety-delta-delta | Safety Delta-Delta available | Paired change-from-baseline comparison of two measures on one scatter — quadrant reference lines, an optional regression line, measure and visit pickers, and a linked per-measure detail table with sparklines. |
hep-explorer | Hepatic Safety Explorer available | eDISH scatter of peak ALT vs peak total bilirubin (×ULN) with Hy's-Law quadrant cut-lines, a quadrant summary table, eDISH/mDISH display modes, R-Ratio and timing controls, and click-to-inspect participant visit paths — plus a baseline-referenced composite plot (Tesfaldet et al., Drug Safety 2024) for subjects with abnormal baseline liver tests, with pretreatment/on-treatment eDISH panels, a four-panel ×Baseline shift plot, and a migration table. |
| — | Hepatic ALT Waterfall available | For trials that enrol participants with elevated baseline ALT but normal baseline bilirubin, where eDISH's ×ULN quadrants lose their meaning — a floating bar per participant from their own baseline ALT to their maximum on-treatment ALT in absolute U/L, ranked by baseline so the two arms' highest baselines meet at the seam, blue for placebo and bronze for active drug with new-onset jaundice in green, flanked by a box-and-whisker summary per arm (Amirzadegan et al., Drug Safety 2025, Figure 5). |
| — | Participant Profile available | The standardized-lab participant drill-down as a chart-agnostic module: a demographics header with R Ratio and a templated record link-out, a labs-over-time spaghetti with reference cut-lines, and a per-measure summary table with sparklines that expand to an inset chart — stepping worst-first through a multi-participant cohort in a rail beside the Hepatic Safety Explorer, or mounted standalone against any chart that dispatches participantsSelected. |
| — | Nephrotoxicity Explorer available | KDIGO acute-kidney-injury screening: one point per participant at their maximum post-baseline fold change in serum creatinine against their maximum absolute change, over the L-shaped KDIGO stage zones, with a distinct mark for the ≥ 4.0 mg/dL Stage-3 rule, per-record mg/dL unit resolution, counted and exportable dropped records, and a stage summary table counting the population by fold change, by absolute change, and by the combined stage. |
| — | Time-to-Event Explorer available | Kaplan–Meier time-to-event display: step curves by treatment group with censoring tick marks, pointwise 95% confidence bands (Greenwood, log-log — matching survival::survfit), and the at-risk / cumulative-events strip table beneath the time axis, all derived from one estimator pass so the table cannot disagree with the curve. The endpoint is composed live from flexible multiselect filters over the event data — time to first qualifying event, censored at end of follow-up — with cumulative-incidence orientation by default and the estimator named on the axis. |
paneled-outlier-explorer | Paneled Outlier Explorer planned | Small-multiple outlier views across a panel of related measures. |
aeexplorer | Adverse Event Explorer available | Hierarchical adverse-event incidence table — System Organ Class rows expandable to Preferred Terms — with per-arm rates, an inline rate dot plot, group-difference confidence intervals, prevalence/search/characteristic filters, and drill-down to the underlying records. |
ae-timelines | Adverse Event Timelines available | Participant-level adverse-event timelines by severity and onset relative to study start, with serious-event marks and click-through participant detail. |
web-codebook | Web Codebook planned | Interactive data codebook: variable-level summaries, distributions, and filters for any dataset. |
| — | QT Safety Explorer available | ECG QT/QTc safety review: per-arm central-tendency change over time (Δ / placebo-corrected ΔΔ) with a 90% CI band and the ICH-E14 metric, the flagship outlier scatter of change vs baseline with the 450/480/500 ms absolute diagonals and 30/60 ms change lines, and a by-arm categorical exceedance table — QTcF / QTcB corrections plus heart rate. |
If you use these displays in your own work, please also cite the safetyGraphics project and the original repositories above.