update_lab_result
Update one or more fields on an existing lab result. Use when the user wants to correct a result already logged, most often its collection date. Only send the fields that need to change; omit all others.
SELECTOR, pass exactly one of id, date, date+marker, or draw_id:
id: addresses one marker's row. Any editable field may change.
draw_id: addresses every result sharing that draw_id at once, unambiguous by construction. Only new_date, panel_name_new, lab_name, fasting_status, and report_date may change this way — those are draw-level fields.
date (optionally narrowed by panel_name): addresses every result from that draw at once, but ONLY when exactly one draw exists on that date — see AMBIGUITY below. Same draw-level fields as draw_id.
date + marker (a marker-name substring, case-insensitive, optionally narrowed by panel_name): resolves to one marker's row, same as id. Errors with candidate IDs if more than one marker on that date matches.
AMBIGUITY: a bare date (optionally + panel_name) selector is rejected, with nothing changed, if it would match more than one physical draw — an explicit draw_id from one source plus legacy rows with none, two distinct draw_ids, or two differently-named legacy sources on the same day. The error names every draw found; retry with draw_id, marker, or a narrower panel_name.
FASTING: fasting_status only changes to 'fasting' or 'non_fasting' when the user explicitly states it for that draw — never infer from time of day or a notes mention. 'unknown' is a valid explicit value too, for undoing a mistaken confirmation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Lab result ID. Selects a single marker row. Alternative to date/draw_id. | |
| date | No | Collection date of the draw to update. Format: YYYY-MM-DD. Selects every result from that draw (see AMBIGUITY above), or (with marker) one row. Alternative to id/draw_id. | |
| flag | No | New lab flag: "H", "L", "HH", "LL", or "A". Optional, omit if not changing. Only allowed when selecting by id or date+marker. | |
| notes | No | New notes. Optional, omit if not changing. Only allowed when selecting by id or date+marker. | |
| marker | No | Optional with date: marker-name substring, case-insensitive (e.g. "LDL"), narrowing the date selector to a single marker row so per-marker fields can be edited without an id. Ignored when id or draw_id is given. | |
| draw_id | No | Opaque label of your choosing grouping a set of results from one visit, normalized server-side. Selects every result sharing that label, unambiguous by construction. Alternative to id/date. Ignored when id is given. | |
| lab_name | No | New lab name (e.g. "Quest Diagnostics", "LabCorp"). Optional, omit if not changing. Works with any selector. | |
| new_date | No | New collection date. Format: YYYY-MM-DD. Optional, omit if not changing. This is the main reason to call this tool, and it works with any selector. | |
| panel_name | No | Optional, narrows a date (or date+marker) selector to one panel within that draw (e.g. "Lipid Panel"). Ignored when id is given. | |
| marker_name | No | New marker name. Optional, omit if not changing. Only allowed when selecting by id or date+marker. | |
| report_date | No | New report/result date, separate from the collection date. Format: YYYY-MM-DD. Optional, omit if not changing. Works with any selector. | |
| result_unit | No | New unit of measurement (e.g. "mg/dL"). Optional, omit if not changing. Only allowed when selecting by id or date+marker. | |
| result_value | No | New numeric result value. Optional, omit if not changing. Only allowed when selecting by id or date+marker. | |
| fasting_status | No | New fasting status for the whole draw. See FASTING above. Optional, omit if not changing. Works with any selector. | |
| panel_name_new | No | New panel name. Optional, omit if not changing. Works with any selector. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Human-readable result text returned by the tool. |