update_lab_result
Update fields on an existing lab result. use: correcting a result already logged, most often its collection date. Send only the fields that change.
SELECTOR, exactly one of id | date | date+marker | draw_id:
id: one marker's row. Any editable field may change.
draw_id: every result sharing that draw_id at once, unambiguous by construction. Draw-level fields only: new_date, panel_name_new, lab_name, fasting_status, report_date.
date (optionally narrowed by panel_name): every result from that draw at once, but ONLY when exactly one draw exists on that date (see AMBIGUITY). Draw-level fields only.
date + marker (marker-name substring, case-insensitive, optionally narrowed by panel_name): one marker's row, same as id. More than one marker matching on that date -> error with candidate IDs. Per-marker fields (result_value, result_unit, result_comparator, marker_name, flag, notes): id or date+marker only.
AMBIGUITY: a bare date (optionally + panel_name) selector that would match more than one physical draw is rejected with nothing changed: 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 changes to 'fasting' or 'non_fasting' only 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.
NOTES: changing result_value, result_unit or result_comparator regenerates the "Reported as <9 IU/mL"-style note from the new value/unit/comparator, replacing only a note it previously auto-generated; any other free text in notes survives. Pass notes yourself only to add or change unrelated free text; it is folded in alongside the regenerated line, not overwriting it.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "update_lab_result"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Lab result ID: one marker row. | |
| date | No | Collection date of the draw, YYYY-MM-DD. See SELECTOR. | |
| flag | No | New lab flag: "H", "L", "HH", "LL", or "A". Per-marker. | |
| notes | No | New notes. Per-marker; see NOTES. | |
| marker | No | With date: case-insensitive marker-name substring (e.g. "LDL") narrowing to one marker row. Ignored with id or draw_id. | |
| draw_id | No | Opaque label grouping one visit's results, normalized server-side. See SELECTOR. Ignored when id is given. | |
| lab_name | No | New lab name, e.g. "Quest Diagnostics", "LabCorp". | |
| new_date | No | New collection date, YYYY-MM-DD; the main reason to call this tool. | |
| panel_name | No | Narrows a date (or date+marker) selector to one panel in that draw, e.g. "Lipid Panel". Ignored with id. | |
| marker_name | No | New marker name. Per-marker. | |
| report_date | No | New report/result date, separate from the collection date, YYYY-MM-DD. | |
| result_unit | No | New unit, e.g. "mg/dL". Per-marker; see NOTES. | |
| result_value | No | New numeric result value. Per-marker; see NOTES. | |
| fasting_status | No | New fasting status for the whole draw. See FASTING. | |
| panel_name_new | No | New panel name. | |
| result_comparator | No | New comparator for a reporting-limit result (e.g. "<9"), or "none" to clear it back to an exact value. Per-marker; see NOTES. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Human-readable result text returned by the tool. |