Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Healthcare
  3. php-fhir

php-fhir

Apache-2.0PHPv4.1.1

A PHP library generator that creates fully-typed classes, serialization, validation, and a REST client from HL7 FHIR XSD schemas.

GitHubGitHub
151 stars43 forks0 contributors

What is php-fhir?

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.

Target Audience

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.

Value Proposition

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.

Overview

Tools for consuming data from a FHIR server with PHP

Use Cases

Best For

  • Building PHP applications that consume data from FHIR servers
  • Generating type-safe PHP classes for FHIR resources like Patient or Observation
  • Implementing FHIR REST API clients in PHP projects
  • Ensuring data validation and compliance with HL7 FHIR standards
  • Working with multiple FHIR versions (e.g., R4, R5) in a single codebase
  • Automating the creation of healthcare data models from XSD schemas

Not Ideal For

  • Projects needing a lightweight FHIR client without the overhead of generated models and validation
  • Teams that require manual control over FHIR resource implementations for custom business logic
  • Real-time healthcare applications where FHIR schemas change frequently and code regeneration is impractical
  • Polyglot systems where FHIR interoperability is handled primarily in non-PHP languages

Pros & Cons

Pros

Complete Type Safety

Automatically generates PHP classes for all FHIR data types from official XSD schemas, ensuring accurate and consistent data models without manual coding errors.

Built-in Serialization

Provides JSON and XML serialization and deserialization out of the box, simplifying data exchange with FHIR servers and reducing boilerplate code.

Multi-Version Flexibility

Supports generation for multiple FHIR versions like R4, R4B, and R5, allowing projects to adapt to different healthcare standards in a single codebase.

Integrated Validation

Includes validation logic to check FHIR resource compliance, reducing runtime errors and ensuring data integrity against the HL7 specification.

Cons

Manual Schema Setup

Requires users to manually download and extract FHIR XSD schemas before generation, adding complexity and extra steps to the setup process.

Generated Code Overhead

The auto-generated PHP library can be extensive and verbose, potentially increasing application size and memory usage compared to hand-rolled solutions.

Documentation Fragmentation

Full documentation is hosted on a separate wiki, which may be less accessible and integrated than having it directly in the repository or codebase.

Frequently Asked Questions

Quick Stats

Stars151
Forks43
Contributors0
Open Issues3
Last commit2 months ago
CreatedSince 2015

Tags

#rest-client#fhir-parser#data-serialization#xml-schema#medical-informatics#healthcare-data#hl7#php#data-validation#code-generation#fhir

Built With

C
Composer
P
PHP

Included in

Healthcare3.7k
Auto-fetched 9 hours ago

Related Projects

HAPI FHIRHAPI FHIR

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers

Stars2,400
Forks1,497
Last commit1 day ago
Fellow Oak DICOMFellow Oak DICOM

Fellow Oak DICOM for .NET, .NET Core, Universal Windows, Android, iOS, Mono and Unity

Stars1,211
Forks667
Last commit6 days ago
TorchXRayVisionTorchXRayVision

TorchXRayVision: A library of chest X-ray datasets and models. Classifiers, segmentation, and autoencoders.

Stars1,191
Forks257
Last commit14 days ago
dicomdicom

⚡High Performance DICOM Medical Image Parser in Go.

Stars1,084
Forks161
Last commit2 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub