PHPackages                             ardenexal/fhir-bundle - 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. [API Development](/categories/api)
4. /
5. ardenexal/fhir-bundle

ActiveSymfony-bundle[API Development](/categories/api)

ardenexal/fhir-bundle
=====================

Symfony Bundle for integrating FHIR Tools components

0.2(1mo ago)1420MITPHPPHP &gt;=8.3

Since Feb 17Pushed 2mo agoCompare

[ Source](https://github.com/Ardenexal/fhir-bundle)[ Packagist](https://packagist.org/packages/ardenexal/fhir-bundle)[ RSS](/packages/ardenexal-fhir-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (19)Versions (6)Used By (0)

FHIR Bundle
===========

[](#fhir-bundle)

Symfony Bundle for integrating FHIR Tools components into Symfony applications. Provides automatic service registration, console commands, and semantic configuration.

Features
--------

[](#features)

- Automatic service registration in the Symfony container
- Console commands for FHIR generation and FHIRPath evaluation
- Semantic configuration through YAML
- Symfony Flex recipe for automatic setup

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

[](#installation)

This bundle is part of the [PHP FHIR Tools](../../README.md) monorepo. It is registered automatically when the project is set up.

### Manual Registration

[](#manual-registration)

If needed, register the bundle in `config/bundles.php`:

```
return [
    // ...
    Ardenexal\FHIRTools\Bundle\FHIRBundle\FHIRBundle::class => ['all' => true],
];
```

Configuration
-------------

[](#configuration)

### Basic Configuration

[](#basic-configuration)

```
# config/packages/fhir.yaml
fhir:
    generation:
        output_directory: '%kernel.project_dir%/src/FHIR'
        base_namespace: 'App\\FHIR'
    serialization:
        strict_validation: true
    path:
        cache_size: 100
```

### Environment Variables

[](#environment-variables)

```
FHIR_OUTPUT_DIR=/path/to/output
FHIR_BASE_NAMESPACE=MyApp\\FHIR
FHIR_DEBUG=false
```

Registered Services
-------------------

[](#registered-services)

Service IDClassDescription`fhir.model_generator``FHIRModelGenerator`Generates FHIR model classes`fhir.valueset_generator``FHIRValueSetGenerator`Generates FHIR value set enums`fhir.serialization_service``FHIRSerializationService`FHIR serialization and deserialization`fhir.package_loader``PackageLoader`Loads FHIR packages from registries`fhir.builder_context``BuilderContext`Code generation context`fhir.path_service``FHIRPathService`Evaluates FHIRPath expressions### Using Services

[](#using-services)

```
use Ardenexal\FHIRTools\Component\FHIRPath\Service\FHIRPathService;
use Ardenexal\FHIRTools\Component\Serialization\FHIRSerializationService;

class FHIRController extends AbstractController
{
    public function __construct(
        private readonly FHIRSerializationService $serializer,
        private readonly FHIRPathService $pathService,
    ) {}

    public function serializePatient(object $patient): JsonResponse
    {
        $json = $this->serializer->serializeToJson($patient);

        return new JsonResponse($json, json: true);
    }

    public function queryPatient(object $patient): JsonResponse
    {
        $result = $this->pathService->evaluate('name.given', $patient);

        return new JsonResponse($result->toArray());
    }
}
```

Console Commands
----------------

[](#console-commands)

### Generate FHIR Models

[](#generate-fhir-models)

```
# Generate models from a specific FHIR package
php bin/console fhir:generate --package=hl7.fhir.r4.core -vvv

# Generate using only cached packages (no network)
php bin/console fhir:generate --package=hl7.fhir.r4.core --offline -vvv
```

### FHIRPath Commands

[](#fhirpath-commands)

```
# Evaluate FHIRPath expression
php bin/console fhir:path:evaluate "Patient.name.given" patient.json

# Output formats
php bin/console fhir:path:evaluate "name.given" patient.json --format=json --pretty
php bin/console fhir:path:evaluate "name.given" patient.json --format=count

# Show cache statistics
php bin/console fhir:path:evaluate "name" patient.json -v

# Validate FHIRPath expression syntax
php bin/console fhir:path:validate "name.where(use = 'official').given.first()"
```

Requirements
------------

[](#requirements)

- **PHP**: 8.3 or higher
- **Symfony**: 6.4+

License
-------

[](#license)

This bundle is released under the MIT License. See the [LICENSE](../../LICENSE) file for details.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance86

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

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 ~8 days

Total

5

Last Release

59d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/40bdcfdbd80eda272029a422eee67464bf9b82f26271252e9425a1d583c03d34?d=identicon)[Ardenexal](/maintainers/Ardenexal)

---

Top Contributors

[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (10 commits)")[![Ardenexal](https://avatars.githubusercontent.com/u/2852475?v=4)](https://github.com/Ardenexal "Ardenexal (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ardenexal-fhir-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ardenexal-fhir-bundle/health.svg)](https://phpackages.com/packages/ardenexal-fhir-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[sulu/headless-bundle

Bundle that provides controllers and services for using Sulu as headless content management system

55133.7k2](/packages/sulu-headless-bundle)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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