Latest Observations
fhir_lastnRetrieve the most recent observations per LOINC code for a patient, up to a specified maximum. Uses FHIR $lastn operation.
Instructions
Get the last N observations per code. Standard FHIR $lastn (since R4). Returns most recent observations by storage order.
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": "fhir_lastn"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | No | Max observations per code (default 1) | |
| code | No | LOINC code filter | |
| patient | No | Patient reference filter |