> 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 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.

{% 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="/pages/FTOVzH7gJ41kj60pnVrp">/pages/FTOVzH7gJ41kj60pnVrp</a></td></tr><tr><td>JSON / XML serialization</td><td><code>ardenexal/fhir-serialization</code></td><td><a href="/pages/5UBomaOkSgAFJe59OKhq">/pages/5UBomaOkSgAFJe59OKhq</a></td></tr><tr><td>Resource &#x26; profile validation</td><td><code>ardenexal/fhir-validation</code></td><td><a href="/pages/HnP6uINJQo1FfbAx2BfQ">/pages/HnP6uINJQo1FfbAx2BfQ</a></td></tr><tr><td>FHIRPath expression evaluation</td><td><code>ardenexal/fhir-path</code></td><td><a href="/pages/hqnmpv6gLaxM0tPhtcDE">/pages/hqnmpv6gLaxM0tPhtcDE</a></td></tr><tr><td>Symfony integration</td><td><code>ardenexal/fhir-bundle</code></td><td><a href="/pages/0gyKbxjntrvz1FWfskwC">/pages/0gyKbxjntrvz1FWfskwC</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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
