Fuente: ddx-documentation/adr/0022-ibis-pack-reuse.md
- **Status:** Accepted (plan `osprey-ibis-parity`, reconciled 2026-11-12). - **Refines:** [ADR 0021](/es/docs/adr/0021-diagnosis-engine) (diagnosis engine; its "no packs copied" line is amended by D1 below). - **Plan:** `plans/osprey-ibis-parity/` (`OWNER_DECISIONS.md`, `_invariants.md`). - **Docs:** [features.md](/es/docs/features) §5g, `ddx-osprey-engine/CLAUDE.md` (CLI, tables, suites). ## Context ADR 0021 shipped three 12-card seed packs. The HMS IBIS product already holds reviewed, versioned asset packs (`ibis-asset-pack/1`: CORE vocabulary, DERM and CARD specialty packs, all 1.3.0) with many more cards, treatments, drug rules and code maps. Re-authoring them by hand would be slow and would drift from the source. The owner was asked five questions (plus D6) on 2026-11-12; the answers are quoted below from `plans/osprey-ibis-parity/OWNER_DECISIONS.md`. ## Owner decisions | Id | Question | Owner answer | |---|---|---| | D1 | Import CORE/DERM/CARD 1.3.0 pack CONTENT by pinned reference; engine code stays re-written with `@origin` | "Approve import (Recommended)" | | D2 | Drug-code licences (WHO ATC/DDD; RxNorm absent, UMLS) | "All approved" | | D3 | ICD-10-GM (BfArM) and HPO code maps (762 codes) | "All approved" | | D4 | AI-authored estimate facts (DERM 1529 of 1560 `estimate:true`, 4 cite a PMID) | first "Approve without banneer", revised same session: "Ok add banner" | | D5 | Retire the 12-card dermatology / cardiology seed packs | "Approve (Recommended)" | | D6 | Import HMS golden-100 eval vignettes by pinned reference | "all approved" | ## Decision 1. **Pack content is imported by pinned reference (D1).** `osprey dx pack import-ibis <dir>` reads a pack directory that is NEVER vendored in this repo. The reader verifies `SHA256SUMS` and compares the manifest `contentHash` with `ddx-osprey-engine/datasets/diagnosis/ibis-packs.lock.json` (`osprey-ibis-lock/1`); any mismatch refuses the whole pack and writes nothing. HMS code is still never copied; the converter and installer are Osprey code. The pack root is `OSPREY_IBIS_PACKS_DIR`. 2. **Provenance stays on every fact.** Pack id, semver, content sha, derivation and the estimate flag are kept so curation and reviewers can replace an estimate. 3. **Estimates carry a banner (D4).** Wherever an estimate value shows (card detail, outputs), the UI shows a visible "estimate, not clinical evidence" banner (guidance field `estimateBannerKey`, message key `diagnosis.estimateBanner`). A stated estimate is never presented as a measured value. 4. **Seed packs are superseded, not deleted (D5).** The imported DERM and CARD packs mark the 12-card seed packs `superseded`. Legacy posteriors were captured first and the must-not-miss baseline was re-measured. 5. **Drug safety is fail closed.** Regimens live in card content. A safety verdict `blocked` or `blocked_unknown` withholds dose, frequency and duration (all become null). Missing patient context gives `blocked_unknown`, never a pass. Drug matching is ATC-only. 6. **Per-tenant overlays are the only local config.** `dx_org_overlay` rows (`osprey dx overlay`) change local options. A disabled must-not-miss card stays in the pack: safety wins over local config. ## Licence status | Code system | Status | Note | |---|---|---| | WHO ATC/DDD | approved (D2) | drug identity and matching | | RxNorm (UMLS) | approved (D2), **no data in the packs** | matching stays ATC-only; nothing is invented | | ICD-10-GM (BfArM) | approved (D3) | code map | | HPO | approved (D3) | code map | ## Consequences - Specialty content grows from 12 cards to the imported pack size (DERM 87 cards, CARD 74 cards; 2 CARD cards dropped by the converter schema check and reported). - Replays of runs that used a superseded seed card report `pack_changed`, not a failure. - The public site may now stop labelling treatments "planned". That copy is a separate lane and is NOT edited by this plan. - Assistant, curation v2 and persona changes of the same plan are in ADR 0023 (written after this one). ## Rejected alternative Vendor the packs into the repo. Rejected: it copies licensed code maps into git and breaks the pin; a pinned external directory with a lock file keeps one source of truth.
osprey-ibis-parity, reconciled 2026-11-12).plans/osprey-ibis-parity/ (OWNER_DECISIONS.md, _invariants.md).ddx-osprey-engine/CLAUDE.md (CLI, tables, suites).ADR 0021 shipped three 12-card seed packs. The HMS IBIS product already holds reviewed, versioned
asset packs (ibis-asset-pack/1: CORE vocabulary, DERM and CARD specialty packs, all 1.3.0) with many
more cards, treatments, drug rules and code maps. Re-authoring them by hand would be slow and would
drift from the source. The owner was asked five questions (plus D6) on 2026-11-12; the answers are
quoted below from plans/osprey-ibis-parity/OWNER_DECISIONS.md.
osprey dx pack import-ibis <dir> reads a
pack directory that is NEVER vendored in this repo. The reader verifies SHA256SUMS and compares the
manifest contentHash with ddx-osprey-engine/datasets/diagnosis/ibis-packs.lock.json
(osprey-ibis-lock/1); any mismatch refuses the whole pack and writes nothing. HMS code is still
never copied; the converter and installer are Osprey code. The pack root is OSPREY_IBIS_PACKS_DIR.estimateBannerKey,
message key diagnosis.estimateBanner). A stated estimate is never presented as a measured value.superseded. Legacy posteriors were captured first and the must-not-miss
baseline was re-measured.blocked or
blocked_unknown withholds dose, frequency and duration (all become null). Missing patient context
gives blocked_unknown, never a pass. Drug matching is ATC-only.dx_org_overlay rows (osprey dx overlay)
change local options. A disabled must-not-miss card stays in the pack: safety wins over local config.pack_changed, not a failure.Vendor the packs into the repo. Rejected: it copies licensed code maps into git and breaks the pin; a pinned external directory with a lock file keeps one source of truth.
adr/
deploy/
research/