Async/sync FHIR client for Python providing comprehensive API for CRUD operations over FHIR resources
Agent Success
Agent success rate when using this tile
68%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.08x
Baseline
Agent success rate without this tile
63%
Create an async helper that assembles and runs a search for Observation resources tied to a specific patient. The helper should lean on the dependency to format search parameters, rather than manual string building.
recorded_after is provided as a timezone-aware datetime, the search only returns observations recorded on or after that moment by applying the correct comparison prefix and datetime formatting expected by the server. @testonly_final is true, omitting the status filter when it is false; both values are encoded by the dependency. @test@generates
from datetime import datetime
from typing import Any, Iterable, Optional
async def build_observation_search(
client: Any,
patient_identifier: str,
recorded_after: datetime,
performer_id: Optional[str] = None,
only_final: bool = True,
extra_expression: Optional[str] = None,
) -> Iterable[dict]:
"""
Build and execute a search for observations tied to a patient.
Returns an awaitable iterable of matching observation resources in server order.
"""Provides FHIR client search-building helpers and query parameter utilities.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10