get_lab_results
Retrieve Apple Health Records lab results filtered by test name, LOINC code, or date range; returns values, units, dates, institutions, and reference ranges exactly as reported, without interpretation.
Instructions
The user's lab results from Apple Health Records (health-labs.json), exported only when they switched on Lab results > Include in exports in the MetricBridge iOS app, and only into a picked folder (never iCloud Drive). Off by default. Each test (LOINC code when the lab sent one, name, unit) lists its results oldest first, with the value, date, institution and the lab's own reference range, all exactly as reported. Nothing is flagged, graded or interpreted: do not call a result normal or abnormal, and never convert between units (a test in two units is listed once per unit, splitByUnit: true). Filters: {test (case-insensitive part of the name, e.g. ldl), loinc (exact code, e.g. 13457-7), start, end (local days, inclusive)}. Above 400 matching results the newest 400 are returned with resultsOmitted. No match returns count 0 with knownTests. When the file is missing the answer is available:false, which means the user has not exported lab results, not that they have none.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Last result day (inclusive), YYYY-MM-DD. | |
| test | No | Part of a test name, case-insensitive, e.g. ldl or vitamin d. Omit for every test. | |
| loinc | No | Exact LOINC code, e.g. 13457-7. Omit for every test. | |
| start | No | First result day (inclusive), YYYY-MM-DD. |