A PHP library generator that creates fully-typed classes, serialization, validation, and a REST client from HL7 FHIR XSD schemas.
php-fhir is a PHP code generation tool that reads HL7 FHIR XSD schema files and produces a fully-typed PHP library. It solves the problem of manually implementing FHIR data models and APIs by automatically generating classes, serialization logic, validation, and a REST client, ensuring compliance with the healthcare data standard.
PHP developers working in healthcare technology who need to integrate with FHIR-based systems, such as electronic health record (EHR) integrations, health data platforms, or medical research applications.
Developers choose php-fhir because it automates the creation of type-safe PHP bindings for FHIR, reducing development time and minimizing errors compared to manual implementation. Its comprehensive output includes models, serialization, and a client, providing a complete solution for FHIR interoperability.
Tools for consuming data from a FHIR server with PHP
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically generates PHP classes for all FHIR data types from official XSD schemas, ensuring accurate and consistent data models without manual coding errors.
Provides JSON and XML serialization and deserialization out of the box, simplifying data exchange with FHIR servers and reducing boilerplate code.
Supports generation for multiple FHIR versions like R4, R4B, and R5, allowing projects to adapt to different healthcare standards in a single codebase.
Includes validation logic to check FHIR resource compliance, reducing runtime errors and ensuring data integrity against the HL7 specification.
Requires users to manually download and extract FHIR XSD schemas before generation, adding complexity and extra steps to the setup process.
The auto-generated PHP library can be extensive and verbose, potentially increasing application size and memory usage compared to hand-rolled solutions.
Full documentation is hosted on a separate wiki, which may be less accessible and integrated than having it directly in the repository or codebase.