docs(medications): clinician reading worklist for the lexicon review (#318) - #1991
Conversation
…318) `#318` asks a clinician to read the generated lexicon sheet top-down and fill in its sign-off block. This adds a reading aid that makes that pass short. It changes no lexicon, no catalogue data, and does not touch the sign-off block — the sheet stays UNREVIEWED, which only the clinician can change. The sheet was regenerated against this base and came back byte-identical, so it is current: 28 catalogue terms, 1 flagged. Two of the three defects `#318` cites are already closed: the ARB/Carbapenem substring match is fixed and now guarded, and lithium is reachable across 9 rows. Only the divergent Warfarin pair remains, and it is worse than the row states — the two records carry three interaction rows each with zero in common, so which record is opened changes which warnings appear. Three findings the sheet did not surface, none needing live access: - `tcas` selects slug `dothiepin`; the catalogue slug is `dosulepin`, so the slug matches zero records and Dosulepin — flagged FATAL in overdose — fires none of the 20 severe TCA rows. Mechanical defect, no clinical opinion needed to confirm. - `nsaids` selects on `subclassIncludes: ["NSAID"]`, so Celecoxib and Parecoxib (subclass `COX-2 Inhibitor`, tag `NSAID`) sit outside all 38 severe rows, while Meloxicam is included only because its subclass is spelled `NSAID (COX-2 preferential)`. - `maois` selects on `subclassIncludes: ["MAOI"]`, so Moclobemide (subclass `RIMA`) sits outside all 17 severe rows. Its tyramine risk is genuinely lower; its serotonin-syndrome risk is not. The review instrument itself has two blind spots, verified by executing the guard's own logic rather than reasoning about it: `missedClassMembers()` skips surface stems shorter than four characters, which leaves the check unable to fire for `tcas` and `arbs` (`ppis` is rescued by its long surface), and the check reads only class and subclass, never `tag`. So the sheet's printed "Checks that ran and found nothing" line is overstated for two terms — which is how the Dosulepin miss stayed invisible. Gate: npm run verify:pr-local selected the low-risk docs route and completed 11 checks with "failed: (none)". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PZL59KVSBWURMKvfc9mbJr
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:53 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Comment |
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PZL59KVSBWURMKvfc9mbJr
Uh oh!
There was an error while loading. Please reload this page.
Two pending outstanding-issues update requests targeted #318: 46750cbf (2026-08-15, from PR #1991) and this PR's own db498cc1 (2026-08-17), which restates and extends the former with the fixes landed here. docs:check-links' mutationConflicts guard correctly refused to pick a winner between two pending mutations on the same row, so queue the explicit cancellation the guard's own error message asks for.
Summary
docs/medication-lexicon-review-worklist.md, a reading aid for the clinician pass#318asks for. It lists the top ten lexicon terms by severe usage (236 of 390 severe firings, 61%) with their resolved drug sets, and six prioritised questions. It does not fill in the sign-off block and changes no lexicon or catalogue data — the sheet stays UNREVIEWED, which only the clinician can change.46750cbf) updating#318with these findings.#318stays open; the sign-off is still owed.The generated sheet was regenerated against this base and came back byte-identical, so it is current: 28 catalogue terms, 1 flagged.
Two of the three defects
#318cites are already closed. The ARB/Carbapenem substring match is fixed and now guarded by a standing check; lithium is reachable across 9 rows / 9 severe and is absent from the unreachable-drugs table. Only the divergent Warfarin pair remains, and it is worse than the row states —warfarin-vkaandwarfarin-anticoagulantcarry three interaction rows each with zero in common, so which record is opened changes which warnings appear.Three findings the sheet did not surface, none of which needed live access:
tcascarries a dead slug. The selector listsdothiepin; the catalogue slug isdosulepin. A search ofdata/medications-snapshot.jsonfor"dothiepin"returns zero records, so Dosulepin — whose own record flagsToxicity in OD: FATAL— fires none of the 20 severe TCA rows. This is a mechanical defect, not a judgment call.nsaidsexcludes the coxibs. It selects onsubclassIncludes: ["NSAID"], so Celecoxib and Parecoxib (subclassCOX-2 Inhibitor, tagNSAID) sit outside all 38 severe rows, while Meloxicam is included only because its subclass happens to be spelledNSAID (COX-2 preferential).maoisexcludes Moclobemide. It selects onsubclassIncludes: ["MAOI"]and Moclobemide's subclass isRIMA, so it sits outside all 17 severe rows. Its tyramine risk is genuinely lower than the irreversible agents; its serotonin-syndrome risk is not.The review instrument itself has two blind spots. Verified by executing the guard's own logic against the real surfaces and haystacks rather than reasoning about it:
missedClassMembers()inscripts/build-medication-lexicon-report.tsskips any surface stem shorter than four characters, which leaves the check unable to fire fortcasandarbs(ppisis rescued by its long surfaceproton pump inhibitors), and the check reads onlyclassandsubclass, nevertag. So the sheet's printed "Checks that ran and found nothing" line is overstated for two terms — which is how the Dosulepin miss stayed invisible. Neither fix is made here.A near-miss is recorded in the doc's method note: an earlier pass was going to report Omeprazole as a catalogue drug missing from
ppis. It is not a catalogue record — a substring search had matched it inside Esomeprazole. Every drug named in the worklist was re-checked by exact record name afterwards.Verification
npm run verify:pr-local— selected the low-risk docs route and completed 11 checks:npm run check:ledger-write-disciplinere-run after committing the inbox request:Ledger write discipline passed for 806918834b43..HEAD.npm run check:outstanding-issues:Outstanding-issues guard passed: 341 rows (97 open, 244 archived);Ledger inbox check passed: 2 pending request(s), 189 applied.UI verification not run: no UI, routing, styling, or browser behaviour changed. Separately, this container cannot run Chromium gates at all — Playwright ships chromium-1194 against a pinned 1234 (
#255/#312), socheck:playwright-browser-revisionfails closed andverify:ui/verify:phone-chromeare unavailable here. No browser coverage is implied by this PR.Risk and rollout
git revertthe single commit. Nothing depends on the file.data/medications-snapshot.json,src/lib/medication-interaction-lexicon.ts,scripts/build-medication-lexicon-report.ts) with no live Supabase or OpenAI access.Clinical Governance Preflight
Not required for this diff —
classifyPullRequestFilesreturnsclinicalRisk: false,operationalRisk: false,ragRanking: falsefor both changed paths. The PR adds documentation about clinical mappings; it does not change ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.Worth stating explicitly even so: the interaction alerts described here remain unvalidated mappings over source-backed text, exactly as before this PR. The wording a clinician sees is still verbatim catalogue prose.
#318's stop condition is unchanged and was honoured —check:medication-lexicon-reportpassing was not treated as review, and the sign-off block was left empty.Notes
#318remains open. Only a clinician filling in the sign-off block closes it. The three new findings in §2.1–2.3 and the two instrument blind spots in §4 are additional work this PR deliberately does not perform.tcasdead slug (§2.1) is the one item that needs no clinical opinion to confirm and is a one-word fix plus a regenerate. It is left out of this PR because#318says do not change the lexicon; it is a good candidate for its own small PR once you confirm Dosulepin belongs in the class.npm run issues:reconcileon its own serialized branch after this lands to apply the queued#318update.🤖 Generated with Claude Code
https://claude.ai/code/session_01PZL59KVSBWURMKvfc9mbJr
Generated by Claude Code