Download the PHP package dcarbone/php-fhir-generated without Composer
On this page you can find all versions of the php package dcarbone/php-fhir-generated. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package php-fhir-generated
php-fhir-generated
Pre-generated PHP classes for HL7 FHIR resources, produced by dcarbone/php-fhir.
This library provides strongly-typed PHP models for every FHIR resource, element, and primitive across multiple FHIR versions — complete with JSON/XML serialization, field validation, and a built-in REST client.
Features
- All major FHIR versions — DSTU1, DSTU2, STU3, R4, R4B, and R5
- Strongly-typed models — every resource, element, and primitive as a PHP class with full constructor support
- JSON & XML serialization — encode/decode resources using native PHP extensions
- Built-in FHIR REST client — read, create, update, patch, and delete resources via cURL
- Automatic resource parsing — detect and unserialize arbitrary FHIR responses by
resourceTypeor XML element name - Schema-driven validation — built-in rules derived from the FHIR schema, with support for custom rules
- PHP 8.1+ named arguments — clean, readable type construction without positional
nullpadding
Supported FHIR Versions
| Version | FHIR Spec |
|---|---|
| DSTU1 | v0.x |
| DSTU2 | v1.x |
| STU3 | v3.x |
| R4 | v4.0 |
| R4B | v4.3 |
| R5 | v5.x |
Requirements
- PHP 8.1 or newer
- Extensions:
curl,dom,json,libxml,simplexml,xmlreader,xmlwriter
Installation
Via Composer (recommended)
Standalone
Clone or download this repository and require the built-in autoloader:
Quick Start
Constructing a Resource
Serializing to JSON
Unserializing from JSON
Fetching from a FHIR Server
Validating a Resource
Documentation
Full documentation is available on the Wiki:
- Configuration — Version, serialization, and unserialization options
- Constructing Types — Creating resource, element, and primitive instances
- Serialization — Encoding and decoding resources in JSON and XML
- FHIR Client — Built-in HTTP client for FHIR REST operations
- Resource Parsing — Automatically parsing arbitrary FHIR responses
- Validation — Built-in and custom validation rules
- Type System — Type hierarchy and interfaces
- Autoloading — Class loading with and without Composer
- Migrating from v2 — Breaking changes and upgrade guide from the previous major version
Related Projects
| Project | Description |
|---|---|
| dcarbone/php-fhir | The code generator that produces this library from FHIR schema definitions |
| HL7 FHIR | The FHIR specification itself |
License
All versions of php-fhir-generated with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.1
ext-curl Version *
ext-dom Version *
ext-json Version *
ext-libxml Version *
ext-simplexml Version *
ext-xmlreader Version *
ext-xmlwriter Version *
ext-curl Version *
ext-dom Version *
ext-json Version *
ext-libxml Version *
ext-simplexml Version *
ext-xmlreader Version *
ext-xmlwriter Version *
The package dcarbone/php-fhir-generated contains the following files
Loading the files please wait ...