Lab Result Tools
Upload PDFs, correct extracted values, approve.
getLabResultFileUploadEndpoint
Preferred method. Returns the multipart upload URL plus full instructions, including a ready-to-use cURL example. Use the same bk_* API key as the MCP connection.
Parameters: none
Returns: JSON with uploadUrl, method, contentType, fileField, acceptedTypes, maxSizeMB, authentication, curlExample, message.
getLabResultUploadLink
Fallback when the agent cannot make HTTP requests. Returns a platform link the user opens to upload PDFs manually (drag-and-drop or browse).
Returns: JSON with uploadUrl and message.
updateLabResultBiomarker
Updates or deletes one biomarker in an uploaded lab result. Only works on PROCESSED (not yet APPROVED) results. Use getLabRecordDetail first to get biomarker IDs.
| Parameter | Required | Notes |
|---|---|---|
biomarkerExternalId | yes | From the biomarkers array of the record detail |
action | no | Set to DELETE to remove. Omit to update. |
name | no | Updated name |
result | no | "5.2", "120", etc. |
unit | no | "mg/dL", "ng/mL", etc. |
minRangeValue | no | Lower bound |
maxRangeValue | no | Upper bound |
updateLabResultMetadata
Updates patient or test metadata. Only works on PROCESSED results.
| Parameter | Required |
|---|---|
labResultExternalId | yes |
patientName | no |
patientSex | no — MALE or FEMALE |
dob | no |
labName | no |
orderingPhysician | no |
dateCollected | no — ISO-8601 |
fasting | no — "true" or "false" |
updateLabResultStatus
Transitions a result through approval states.
| Action | Effect |
|---|---|
APPROVE | PROCESSED → APPROVED. Biomarkers visible in searchBiomarkers; biological age recalculates. |
ROLLBACK | APPROVED → PROCESSED. Hides biomarkers, removes biological age contribution. |
REPROCESS | Re-runs PDF extraction. Resets to PENDING. |
Always show extracted values to the user and get explicit approval before APPROVE.

