> For the complete documentation index, see [llms.txt](https://php-fhir-tools.ardenexal.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://php-fhir-tools.ardenexal.net/readme.md).

# Introduction

PHP toolkit for FHIR — code generation, serialization, validation, and FHIRPath.

PHP FHIR Tools is a PHP 8.3+ library monorepo for working with [FHIR](https://www.hl7.org/fhir/) (Fast Healthcare Interoperability Resources). FHIR is the HL7 standard for exchanging healthcare data as structured resources such as `Patient`, `Observation`, and `Questionnaire`. This toolkit generates PHP model classes from FHIR Structure Definitions, serializes resources to and from JSON and XML, validates resources against the specification and Implementation Guides, and evaluates FHIRPath 2.0 expressions. It also generates and serializes CDA R2 logical models, including the AU Digital Health extensions.

{% hint style="info" %}
The packages can be used independently or together. If you only need serialization, install `ardenexal/fhir-serialization`; if you are building a Symfony application, `ardenexal/fhir-bundle` wires everything for you.
{% endhint %}

## What's in the toolkit

<table data-view="cards"><thead><tr><th>Capability</th><th>Package</th><th data-card-target data-type="content-ref">Docs</th></tr></thead><tbody><tr><td>Generate PHP models from FHIR definitions</td><td><code>ardenexal/fhir-code-generation</code></td><td><a href="/code-generation/overview.md">Overview</a></td></tr><tr><td>JSON / XML serialization</td><td><code>ardenexal/fhir-serialization</code></td><td><a href="/serialization/overview.md">Overview</a></td></tr><tr><td>Resource &#x26; profile validation</td><td><code>ardenexal/fhir-validation</code></td><td><a href="/validation/overview.md">Overview &amp; Architecture</a></td></tr><tr><td>FHIRPath expression evaluation</td><td><code>ardenexal/fhir-path</code></td><td><a href="/fhirpath/overview.md">Overview &amp; Quick Start</a></td></tr><tr><td>CDA R2 &#x26; AU CDA logical models</td><td><code>ardenexal/cda-sd-models</code></td><td><a href="/code-generation/cda.md">Generating CDA Logical Models</a></td></tr><tr><td>Symfony integration</td><td><code>ardenexal/fhir-bundle</code></td><td><a href="/symfony-bundle/configuration.md">Install and Configure the Bundle</a></td></tr></tbody></table>

## Where to start

* New to the library? Start with [Installation](/getting-started/installation.md) and the [Quick Start](/getting-started/quick-start.md).
* Not sure which package you need? See [Choosing the Right Package](/getting-started/packages.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://php-fhir-tools.ardenexal.net/readme.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
