-
-
Notifications
You must be signed in to change notification settings - Fork 43
Home
Daniel Carbone edited this page Apr 2, 2026
·
13 revisions
Tools for generating PHP classes from the HL7 FHIR specification.
php-fhir reads FHIR XSD schema files and produces a fully-typed PHP library complete with models, (un)serialization, validation, and a FHIR REST client — ready to drop into any PHP 8.1+ project.
If you don't need to customise the generation process and just want usable FHIR models, grab the pre-built package: dcarbone/php-fhir-generated
| PHPFHIR Version | PHP Versions | FHIR Versions | Supported |
|---|---|---|---|
| v4 | 8.1+ | DSTU1, DSTU2, STU3, R4, R4B, R5 | Yes |
| v3 | 8.1–8.4 | DSTU1, DSTU2, STU3, R4, R4B, R5 | No |
| v2 | 5.4–7.4 | DSTU1, DSTU2, STU3, R4 | No |
| Page | Description |
|---|---|
| Getting Started | Prerequisites, installation, and downloading FHIR schemas |
| CLI Usage | Running the generator from the command line |
| Configuration Reference | All Config and VersionConfig options |
| Architecture | How the generator pipeline works internally |
| Generated Code | Understanding the output: namespaces, types, client, encoding |
| Testing | Running tests on the generator and on generated code |
| Contributing | Developer workflow and code-style notes |
- Source: https://github.com/dcarbone/php-fhir
- Generated code: https://github.com/dcarbone/php-fhir-generated
- FHIR specification: https://hl7.org/fhir/
- License: Apache-2.0