Biomarker Flags
Readings the patient flagged as questionable, with a reason.
List biomarker flags
List the patient's biomarker flags. Optional ?status filter (open | resolved). Sorted with open flags first, then most recent. Returns the full flag record including reading details, reason, actions history, and resolution metadata.
Flag a reading
Create a flag for a specific biomarker reading. Enforces one-open-flag-per-reading: returns 409 with the existing flagId if a flag is already open for the same (biomarker, date, report_id-or-value) tuple. Provider acting on a patient's behalf is supported via providerPatientOverride — the createdBy.role is recorded for audit.
Get flags for a reading
Return the most recent flag (open or resolved) matching the given reading, so the FE can render a 'Flagged' badge on the reading card without fetching the full list. Returns `{ flag: null }` when no match.