# RC9 Phase 2 — Owner Truth Console + Calculator Registry

## Purpose

The Clinical Reasoning Database is now the owner-only control room for:

1. medication and clinical knowledge truths
2. calculator methodology truths

## Calculator truth registry

The workbench includes a new **Calculator Truths** tab.

The owner can create, edit, version, validate, retire, and export calculator definitions containing:

- stable calculator ID
- calculator name and category
- clinical purpose
- methodology version
- formula or algorithm description
- input variables
- units
- allowed values and ranges
- branching rules
- exclusions and limitations
- rounding and precision
- outputs
- source truths
- exact source section
- exact source locator
- regression test cases
- consuming Pharmacist.Guide products
- change history
- draft/active/released status

## Seeded calculator truths

- Cockcroft-Gault creatinine clearance
- Ideal and adjusted body weight
- Corrected calcium
- Anion gap and delta-delta
- QTc
- Opioid MME
- Corticosteroid equivalency
- Ganzoni iron deficit

These are owner-editable active-test methodologies. Their source records deliberately include exact section and locator fields so they can be replaced with validated source truths.

## Publication controls

A calculator cannot be marked approved or released unless it has:

- a name
- formula/methodology
- at least one input
- at least one output
- at least one source truth
- claim, section, and exact locator for every source truth

## Export

The **Export active bundle** button downloads a versionable JSON package for future PhUCKIT runtime loading.

## Preserved functionality

- Top-300 populated medication library
- owner self-review mode
- claim/evidence editing
- research ingestion
- screen-grab MedRec and patient review
- repaired research-service launcher

## Next phase: Phase 2B

- Execute calculator regression tests inside the workbench
- Compare expected and actual results
- Block release on failed tests
- Compile approved calculator truths into a runtime bundle
- Make PhUCKIT load active methodology versions instead of relying solely on scattered hardcoded logic
