A flexible Python client for FHIR servers supporting the SMART on FHIR protocol, enabling secure healthcare data access.
SMART FHIR Client (fhirclient) is a Python library that provides a client for interacting with FHIR servers supporting the SMART on FHIR protocol. It enables developers to build applications that can securely read, search, and manipulate healthcare data through standardized FHIR APIs. The library includes data model classes for all FHIR resources with validation and serialization capabilities.
Developers building healthcare applications, medical research tools, or health data integration systems that need to interact with FHIR-compliant servers. Particularly useful for those implementing SMART on FHIR authorization flows.
It combines both FHIR data modeling and SMART on FHIR network client capabilities in one package, unlike alternatives that offer only one aspect. The library enforces data model validity and provides a Pythonic interface while handling the complexities of healthcare data standards.
Python SMART on FHIR client
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides data model classes for all FHIR resources with built-in validation and serialization, enforcing correctness as shown in the FHIRValidationError example when data types are incorrect.
Handles authorization flows for protected servers with methods like authorize_url and prepare(), simplifying secure access to healthcare data without manual OAuth2 implementation.
Works with multiple FHIR versions (R4, STU-3, DSTU2) as indicated in the version table, making it adaptable to various server implementations and legacy systems.
Supports complex searches and includes related resources with an intuitive API, demonstrated through examples like Encounter.where() with include() for fetching associated Patient and Procedure resources.
Includes a demo Flask app that shows how to build web applications with patient data access, providing a practical starting point for developers to prototype healthcare apps.
Lacks asynchronous HTTP request capabilities, which limits performance in high-concurrency scenarios compared to alternatives like fhirpy that offer async options.
Missing advanced network handling such as built-in retries, as noted in the comparison with cumulus-fhir-support, which may require additional code for robust production use.
The Flask demo requires manual server configuration, separate installation steps, and a virtual environment, which can be cumbersome for quick testing or beginners.
Client versioning is not aligned with FHIR versions, as shown in the version table where different client versions map to various FHIR releases, potentially confusing developers about compatibility.