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 adapter that configures both synchronous and asynchronous FHIR clients from the same connection details. It should expose paired helper methods for fetching patient details and recording observations while keeping the sync and async paths aligned. Use the dependency’s client primitives rather than crafting raw HTTP calls.
id, a name string derived from the first available name entry (prefer text, otherwise join given/family), and birthDate for the provided patient id; the async variant returns equivalent data using async I/O. @testsubject reference of the form Patient/{id}, and returns the server-assigned Observation id; the async variant performs the same operation using async I/O. @test@generates
from typing import Any, Mapping, Optional
class DualFHIRAdapter:
def __init__(
self,
base_url: str,
token: Optional[str] = None,
*,
extra_headers: Optional[Mapping[str, str]] = None,
client_config: Optional[dict] = None,
): ...
@property
def sync_client(self) -> Any: ...
@property
def async_client(self) -> Any: ...
def patient_snapshot(self, patient_id: str) -> dict: ...
async def patient_snapshot_async(self, patient_id: str) -> dict: ...
def record_observation(self, patient_id: str, code: str, value: float, unit: str = "1") -> str: ...
async def record_observation_async(self, patient_id: str, code: str, value: float, unit: str = "1") -> str: ...FHIR client library with parallel synchronous and asynchronous clients. @satisfied-by
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10