Search FHIR Observations
search_observationsSearch one patient's FHIR R4 Observation resources by code to retrieve vital signs or lab results, with read-only access and audited calls.
Instructions
Search FHIR R4 Observation resources for one patient filtered by a code, for example vital signs or lab results. Use it when you know the code to look for (LOINC is typical: http://loinc.org|8867-4 is heart rate); use get_patient to check the patient first. Read only. Returns a JSON array of Observations with status, code, subject, effective or issued time and the value, at most 200 results across up to 5 pages of 50; larger result sets fail instead of being truncated. Every call writes one hashed audit record. Other failures return the fixed text "FHIR request failed" with no server detail. Access is checked first against the server patient policy: a patient outside the caller grant returns "Patient access not authorized" before any FHIR request.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"patient_id": "<patient_id>",
"code": "<code>"
},
"name": "search_observations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | FHIR token search for Observation.code: system|code (http://loinc.org|8867-4), a bare code (8867-4), or several separated by commas. Letters, digits and - . | , : % / only. | |
| patient_id | Yes | FHIR logical id of the Patient, 1 to 64 letters, digits, dots or hyphens, for example a sandbox id returned by the FHIR server. Not a name, MRN or other identifier. |