PHPackages                             luscii/php-fhir-model - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. luscii/php-fhir-model

AbandonedArchivedLibrary[Parsing &amp; Serialization](/categories/parsing)

luscii/php-fhir-model
=====================

FHIR Model, parser and serializer

v4.0.0(2y ago)1147.4k↓41.9%6Apache-2.0PHPPHP ^7.1 | ^8.0CI passing

Since Oct 11Pushed 8mo ago3 watchersCompare

[ Source](https://github.com/Luscii/php-fhir-model)[ Packagist](https://packagist.org/packages/luscii/php-fhir-model)[ RSS](/packages/luscii-php-fhir-model/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (8)Used By (0)

⚠️ Repository archived
======================

[](#️-repository-archived)

This library is no longer maintained. It's been superseded by , our recommendation is to migrate to that library.

FHIR Model
==========

[](#fhir-model)

This library includes a FHIR PHP model, together with serializers and parsers for JSON and XML. The code is generated by dcarbone/php-fhir, supplemented with tests.

Version: FHIR STU3
------------------

[](#version-fhir-stu3)

- Homepage:
- Resource documentation:

Installation
------------

[](#installation)

```
$ composer require luscii/php-fhir-model

```

Usage
-----

[](#usage)

```
// src/example.php:
require_once __DIR__ . '/../vendor/autoload.php';
$parser = new \HL7\FHIR\STU3\PHPFHIRResponseParser(false);

$json = '{"resourceType":"Patient", etc...}';
$resource = $parser->parse($json);
// Use $resource as an object
```

Can I submit changes to the code?
---------------------------------

[](#can-i-submit-changes-to-the-code)

**No** for all code in `src/`, because this is the result of generating with dcarbone/php-fhir and will not be directly changed. Fixes and additions should be done in dcarbone/php-fhir and not here.

Pull requests with changes to `src/` will be rejected unless they come from a repository maintainer, or are small enough to be reviewable manually: under 500 lines of code. It would be impossible to review the code resulting from running the generator: changes can consist of millions of lines of code.

**Yes** for all code in `tests/` and the organizational files in the repository root, those are all handwritten.

How can I use older FHIR versions?
----------------------------------

[](#how-can-i-use-older-fhir-versions)

Older versions (DSTU1, DSTU2) are not suppored in this library, but you can generate the classes yourself with dcarbone/php-fhir.

What's the strategy for future FHIR versions?
---------------------------------------------

[](#whats-the-strategy-for-future-fhir-versions)

When a future FHIR version gets released, we will probably add it next to the current version (separate namespace) or create a new library. We don't want to create a branch per version, because we want to support using multiple versions simultaneously in one application using Composer as a dependency manager.

How to keep this repository up to date?
---------------------------------------

[](#how-to-keep-this-repository-up-to-date)

For maintainers: to update the files in this repository, follow these steps.

1. Clone  (the generator) and make sure it's up to date
2. Run `./bin/generate.sh --versions STU3` from the root of the generator
3. Copy the generated classes here
4. Commit

Disclaimer
----------

[](#disclaimer)

This repository is currently primarily intended for our own use. We cannot commit yet to maintain it in the future, but feel free to fork if this becomes an issue. That being said, please file issues, feedback or improvements.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance43

Moderate activity, may be stable

Popularity36

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~461 days

Total

5

Last Release

977d ago

Major Versions

v0.1.0 → v1.0.02019-11-18

v1.0.0 → v2.0.02020-09-07

v2.0.0 → v3.0.02022-01-05

v3.0.0 → v4.0.02023-10-30

PHP version history (3 changes)v0.1.0PHP ^5.4 || ^7.0

v1.0.0PHP ^7.1

v3.0.0PHP ^7.1 | ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b20210b4ff98833690fc7ac576d9fdb18fac680ed758415267830bf3a8256f5?d=identicon)[LucidTaZ](/maintainers/LucidTaZ)

---

Top Contributors

[![boitewitte](https://avatars.githubusercontent.com/u/1312890?v=4)](https://github.com/boitewitte "boitewitte (23 commits)")[![LucidTaZ](https://avatars.githubusercontent.com/u/10195108?v=4)](https://github.com/LucidTaZ "LucidTaZ (17 commits)")[![ana-luscii](https://avatars.githubusercontent.com/u/146731927?v=4)](https://github.com/ana-luscii "ana-luscii (4 commits)")[![NanaGin](https://avatars.githubusercontent.com/u/11458485?v=4)](https://github.com/NanaGin "NanaGin (3 commits)")[![auy](https://avatars.githubusercontent.com/u/604773?v=4)](https://github.com/auy "auy (2 commits)")

---

Tags

jsonxmlparserserializermodelhl7fhir

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/luscii-php-fhir-model/health.svg)

```
[![Health](https://phpackages.com/badges/luscii-php-fhir-model/health.svg)](https://phpackages.com/packages/luscii-php-fhir-model)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k269.7M321](/packages/masterminds-html5)[orchestra/parser

XML Document Parser for Laravel and PHP

4671.8M7](/packages/orchestra-parser)[laktak/hjson

JSON for Humans. A configuration file format with relaxed syntax, fewer mistakes and more comments.

86245.3k14](/packages/laktak-hjson)[goetas-webservices/xsd-reader

Read any XML Schema (XSD) programmatically with PHP

625.2M22](/packages/goetas-webservices-xsd-reader)[thunderer/serializard

Flexible serializer

2667.9k1](/packages/thunderer-serializard)[opensoft/simple-serializer

Simple Serializer

1914.2k1](/packages/opensoft-simple-serializer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
