# Lab & Radiology Legacy Parity Contract — Phase 10.12

## Selected-branch scope

Phase 10.12 proves exact parity for:

- `plts_s` → `get_lab_tests_s`
- `prts_s` → `get_rad_tests_s`

Each function is tested in two modes: year mode and custom inclusive date-range mode within one calendar year. Total runtime parity checks: **4**.

## Laboratory legacy rule

- Oracle source: `RCP_LAB_SERVICE_RESERVATION`.
- Date column: `EXPECTEDDONEDATE`.
- Historical eligibility rule: `EXPECTEDDONEDATE <= SYSDATE`.
- Aggregation: count rows by calendar month.

## Radiology legacy rule

- Oracle source: `RCP_RAD_SERVICE_RESERVATION`.
- Date column: `MACHINE_SCH_FROM`.
- Historical eligibility rule: `MACHINE_SCH_FROM <= SYSDATE`.
- Aggregation: count rows by calendar month.

## Comparison rule

- Year mode compares the selected current year with `compare_year`.
- Date-range mode compares the inclusive selected window with the same month/day window shifted to `compare_year`.
- Exact pass requires current totals, comparison totals, and every monthly value to match with a difference of zero.

## Evidence boundary

The multi-branch legacy functions `plts` and `prts` remain `PARTIAL`. They are not declared `PARITY_PASS` in this phase.

## Safety

All parity execution is read-only. Oracle write operations: `NONE`.
