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%
Manage FHIR Patient resources through a small registry module that wraps create, read, partial update, and delete flows against a configured FHIR server using a single dependency. The registry should attach an Authorization: Bearer <token> header when an auth token is provided.
system/value, and address uses line, city, and postalCode, all preserved round-trip. @testTrue, and a subsequent fetch for that id fails. Deleting a missing patient returns False. @test@generates
class PatientRegistry:
def __init__(self, base_url: str, auth_token: str | None = None) -> None:
...
def create_patient(
self,
*,
given_name: str,
family_name: str,
telecom: list[dict] | None = None,
address: dict | None = None,
) -> str:
"""
Create a patient and return the assigned patient id.
"""
...
def get_patient(self, patient_id: str) -> dict:
"""
Fetch a patient by id and return a dict representation including names, telecom, and address.
"""
...
def patch_contact(
self,
patient_id: str,
telecom: list[dict] | None = None,
address: dict | None = None,
) -> dict:
"""
Apply a partial update to telecom/address fields and return the updated patient dict.
"""
...
def delete_patient(self, patient_id: str) -> bool:
"""
Delete a patient. Returns True when deletion succeeds, False when the patient does not exist.
"""
...FHIR client library for synchronous CRUD operations against FHIR resources.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10