Lab Records Tools
Unified view of orders and uploaded results.
getUserLabRecords
Returns lab orders and uploaded lab results in one unified format.
| Parameter | Notes |
|---|---|
externalId | Filter to a specific order or result |
startDate | yyyy-MM-dd — only items collected on or after |
endDate | yyyy-MM-dd — only items collected on or before |
Each item:
source—"order"(placed through Betterness) or"result"(uploaded)externalId,name,statusstatusDescription— what the status means (orders only)nextStep— tells the agent exactly what to do next (orders only)appointment— when status is "Appointment Pending" or "Appointment Scheduled" (orders only)dateCollected,dateCreated
getLabRecordDetail
Full detail of one record. Auto-detects whether it's an order or an uploaded result.
| Parameter | Required |
|---|---|
recordExternalId | yes (from getUserLabRecords) |
For uploaded results (source: "result"): externalId, status, filename, dateUploaded, patientInfo, testDetails, biomarkerCount, biomarkers array.
For lab orders (source: "order"): externalId, testName, testDescription, lab, status, statusDescription, nextStep, dateCollected, dateCreated, appointment (if any), biomarkerCount + biomarkers when results are available.
Always follow nextStep
Every order's nextStep field tells the agent the exact action to take based on current status. Use it as your primary guide rather than parsing status strings yourself.

