Skip to content

Releases: jwildfire/safety.viz

safety.viz v1.2.0

Choose a tag to compare

@obotclaw obotclaw released this 13 Jul 01:51
95f9d6e

safety.viz v1.2.0

The eDISH liver-safety explorer joins the library — with a clinical guide that teaches how to read it.

  • Hepatic Safety Explorer (eDISH) (#43): the flagship hepatotoxicity renderer. It plots one point per participant at their peak ALT versus peak total bilirubin (×ULN), with Hy's-Law quadrant cut-lines and a live quadrant summary table, eDISH/mDISH display modes, and R-Ratio and timing controls. Click a point for a coordinated participant drill-down — its visit-path trajectory drawn over the scatter, a standardized lab-values-by-study-day chart, a per-measure summary table, and a linked record listing, all driven by the one selection. Try it live.
  • Clinical guide site section (#52): a new per-renderer Clinical guide tab. The hep-explorer guide walks the eDISH evaluation workflow — the Hy's-Law quadrant reasoning, R-Ratio/nR injury patterns, timing coincidence, and AST corroboration — with the workflow figures, a table of contents, and every step cross-referenced to the live control on the page. Adapted from the DIA-ASA Interactive Safety Graphics Working Group's Hepatic Safety Explorer User's Manual and attributed to it. Read it.
  • Requirement matrix as a link (#56): the requirement matrix moved off its own tab and into a link in the Test evidence area, where the traceability already lives.

Vendor the new bundle at dist/safety.viz-1.2.0/ (IIFE + ESM, as before). The six existing renderers are unchanged — no API changes. The new module adds the hepExplorer(element, settings) factory: point it at long-format lab data (one row per participant, measure, and visit) and it standardizes each result to ×ULN, reduces to peak-versus-peak, and draws the eDISH plot with the full control panel.

As with every release, the eDISH renderer traces to requirement-keyed tests with a published evidence report — 155 automated checks on the canonical Linux runner — and a reviewed requirement matrix.


This release was drafted by Claude Code using Opus 4.8 and reviewed by @jwildfire

safety.viz v1.1.0

Choose a tag to compare

@obotclaw obotclaw released this 12 Jul 03:50
6c01c01

The histogram gets a whole-dataset view, and the example data now comes from a scripted pharmaverse pipeline.

  • All-measures overview for the histogram (#39): the chart now opens on small-multiple histograms of every measure in the data — an immediate feel for the overall shape of the dataset. Click a panel to drill into the familiar single-measure view, or use the Measure control's new "All Measures" option. Try it live.
  • Scripted demo data (#35): the example datasets are now derived from pharmaverse ADaM sources (CDISC Pilot 01) by a committed, deterministic script — regenerable byte-identically, with provenance documented in the script header.
  • README rewritten for users (#34): the repo front page now leads with the six charts, live demos, and a copy-pasteable mount snippet.

Vendor the new bundle at dist/safety.viz-1.1.0/ (IIFE + ESM, as before). No API changes — existing settings work unchanged. One behavior change: with no start_value, the histogram opens on the overview instead of the first measure; set start_value to keep a single-measure start.

As with v1.0, every change traces to requirement-keyed tests with published evidence reports — the overview ships with five new reviewed requirements (SH-OVW-001…005).

Requirements delivered: obot.roadmap#25 (canonical demo data — pharmaverseadam); extends obot.roadmap#1.


This release was drafted by Claude Code using Fable 5 and reviewed by @jwildfire

safety.viz v1.0.0

Choose a tag to compare

@obotclaw obotclaw released this 12 Jul 02:31
dd58d69

safety.viz is a charting library for monitoring clinical trial safety. Point any of its six interactive charts at your study data and review it in the browser: filter, group, zoom, and click through from a pattern on the screen to the participant records behind it. It's an agent-assisted update of the safetyGraphics interactive renderers.

▶ Try every chart live: https://jwildfire.github.io/safety.viz/

The charts

Chart What it shows
Safety Histogram Distribution of any lab or vital-sign measure, with normal-range overlay, treatment-group small multiples, and a linked participant listing
Safety Outlier Explorer Every participant's results over time as one line each, against the population — click a line to isolate a participant
Safety Results Over Time Population distribution of a measure at each visit as box-and-whisker marks, with grouping and outlier flags
Safety Shift Plot Baseline vs. comparison-visit values on a scatter — who moved, and which direction
Safety Delta-Delta Paired change-from-baseline for two measures on one scatter (e.g. ALT change vs. AST change)
Adverse Event Timelines Each participant's AEs as timelines colored by severity, serious events marked, with click-through detail

Every chart ships with a live demo against real example data, a generated API reference, and its own test-evidence report.

Using it

Vendor the committed bundle — no build step, no npm install:

<script src="dist/safety.viz-1.0.0/safety.viz.js"></script>
<script>
  SafetyViz.histogram('#container', {
    value_col: 'STRESN',
    measure_col: 'TEST',
    filters: [{ value_col: 'ARM', label: 'Treatment Group' }]
  }).init(rows); // rows: array of records, e.g. parsed from an ADaM BDS extract
</script>

An ESM build (safety.viz.esm.js) is committed alongside. Each chart declares its expected columns in a JSON-Schema data contract and validates its inputs on init — malformed rows are removed and counted, not silently plotted. Defaults follow ADaM-style column names (USUBJID, TEST, STRESN, VISIT…) and every mapping is a setting.

Using R? gsm.safety wraps this same bundle as Widget_* htmlwidgets — the histogram widget is next on its roadmap.

Why you can trust it

These are not new chart designs: each one re-implements an interactive display built by Rho, Inc. and used in practice under the safetyGraphics project (full credits). The port is held to that standard — every chart traces to a reviewed requirement matrix from the original's documentation, with 249 unit tests and 94 browser tests keyed to requirement IDs and published as audit-style evidence reports. The histogram's binning was additionally cross-validated against the original renderer's source, 420/420 matching results across all six binning algorithms.

What's next

v1.1 lines up a refreshed README, richer example data, and the hardening backlog (#32, #33). The three remaining safetyGraphics renderers — Paneled Outlier Explorer, Adverse Event Explorer, Web Codebook — each already have a reviewed requirement matrix waiting.

Requirements delivered: obot.roadmap#1 (safety.viz consolidated library), obot.roadmap#21 (documentation site).


This release was drafted by Claude Code using Fable 5 and reviewed by @jwildfire

safety.viz v0.1.0

Choose a tag to compare

@obotclaw obotclaw released this 11 Jul 12:04
a5a43ab

First release of safety.viz — the consolidated Chart.js charting library for clinical safety graphics (safetyGraphics → gsm modernization, project P004), mirroring the gsm.kri ↔ gsm.viz architecture.

Highlights

  • safety.viz.histogram — the safety-histogram pilot renderer as a library module: collapsible control sidebar, group-by small multiples, normal-range overlay, axis limits, linked participant listing; JSON-Schema data contract; committed IIFE + ESM bundles at dist/safety.viz-0.1.0/.
  • Shared renderer chromesrc/shell.js: the control-sidebar layout, stylesheet (sv-*), and control builders every renderer mounts into, enforced per available renderer by the site browser suite (#17).
  • Documentation sitehttps://jwildfire.github.io/safety.viz/: gallery of all nine planned renderers, live histogram demo recreating the original safety-histogram test page against real ADBDS example data (#15), requirement-traced test-evidence page (screenshot baselines + evidence.json), generated API reference. Three publishing tiers: releases at the root, /dev/ tracking the dev branch, /pr/{N}/ previews with sticky PR comments.
  • Quality gates in CI — Prettier, dist-drift check, 80 unit tests, 17 browser tests against screenshot baselines, evidence-freshness guard, site link/screenshot validation.

Hub requirements: jwildfire/obot.roadmap#2 — histogram renderer (done-gate satisfied: gallery demo, evidence page, API reference live) · jwildfire/obot.roadmap#21 — documentation site (all four sub-issues shipped).

Work: #1 scaffold (PR #3) · #2 histogram extraction (PR #4) · #5 evidence pipeline (PR #9) · #6 API reference (PR #10) · #7 site build (PR #11) · #8 publishing (PR #12) · #15 demo layout + real example data (PR #16) · #17 shared renderer chrome (PR #18) — released via PR #13.

Distribution: not published to npm; consumers (e.g. gsm.safety Widget_* bindings) vendor dist/safety.viz-0.1.0/.


This release was drafted by Claude Code using Fable 5 and reviewed by @jwildfire