Skip to main content

dirigent-fhir

The FHIR pack for dirigent. It contributes the fhir connection kind and the REST blocks for one FHIR R4 server, and FHIRPath on dirigent's transform, map and filter verbs:

Block Effect What it does
fhir.read reads Reads one resource by type and id.
fhir.search reads Searches one type, following Bundle.link[next] on the connection's origin under a page cap, and hands on one Bundle, its pages, or its resources for a fan-out.
fhir.create writes Creates a resource, conditionally with ifNoneExist.
fhir.update writes Updates a resource at an id on this server, or with a conditional update on its identifier, never on a source server's id.
fhir.patch writes Patches a resource by id, or the one a search matches, with JSON Patch or FHIRPath Patch.
fhir.delete writes Deletes a resource by id, or what a search matches, refusing a search that matches everything or more than max.
fhir.transaction writes Writes many resources in one transaction or batch Bundle, references between them rewritten to urn:uuid entries.
fhir.operation either Invokes a named operation, such as $everything, $validate or $expand, on the system, a type or an instance, and hands on what it answers.
fhir.validate computes Validates resources and Bundles structurally: FHIR's JSON rules, and the engine's R4 models where they reach.
fhir.cql computes Evaluates a CQL library over the resources a step produced, per patient or once.
fhir.measure computes Evaluates a measure's populations over those resources, scores them, and answers a MeasureReport.
transform.fhirpath computes Reshapes a value with a FHIRPath expression.
map.fhirpath computes Replaces every element of a list with what a FHIRPath expression makes of it.
filter.fhirpath computes Keeps the elements of a list a FHIRPath expression answers true for.

The three FHIRPath verbs read any JSON value, not only FHIR, and need no server: see On JSON that is not FHIR.

It is FHIR as a system of its own, not a DHIS2 pack: FHIR to FHIR is as much its purpose as feeding DHIS2. Between steps a resource or a Bundle is plain FHIR JSON. Inside a block the R4 models of dhis2w-fhir-engine type what they cover, and a resource they do not model passes through as JSON. A server's OperationOutcome fails the step classified by its status and its issue types, so a transient or throttled issue is retried and an invalid one is not.

Documentation: the docs/ directory, built with uv run mkdocs build --strict.

Install

Add it to a dirigent project, or start one with it:

uv add dirigent-fhir
dg init --pack dirigent-fhir

It moves in step with dirigent: install the version that matches the runtime.

An instance discovers the pack by installing it: the dirigent.plugins.v1 entry point in pyproject.toml is the whole registration.

Develop

uv sync
uv run ruff format --check . && uv run ruff check .
uv run mypy && uv run pyright
uv run pytest -m "not live"
uv run mkdocs build --strict

The tests are offline: every block runs against a fake FHIR server in tests/fhirserver.py, and the response bounds against a hostile server on loopback. tests/test_fhir_live.py reads a real server with DIRIGENT_LIVE=1 FHIR_LIVE_URL=http://localhost:8090/fhir.

The pack follows dirigent's version: each release is built against the dirigent release of the same number.

Metadata

Release files for dirigent-fhir 0.35.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dirigent-fhir 0.35.0
File Size Uploaded Provenance Actions
dirigent_fhir-0.35.0.tar.gz 58.2 kB With provenance Details for dirigent_fhir-0.35.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dirigent-fhir 0.35.0
File Interpreter ABI Platform Actions
dirigent_fhir-0.35.0-py3-none-any.whl Python 3 none any Details for dirigent_fhir-0.35.0-py3-none-any.whl

Total release size: 137.1 kB

Release files / dirigent_fhir-0.35.0.tar.gz

Download URL dirigent_fhir-0.35.0.tar.gz
Size 58.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cda00fb0ccb9263bad9ad82b2ac59943b2595e9ba96c1e49527fe2793f0985d6
BLAKE2b-256 checksum
How to use checksums
f72ad02e12982727340d78bbad64b0dd5bf56725f28d253291ed1c8e80967012
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / dirigent_fhir-0.35.0-py3-none-any.whl

Download URL dirigent_fhir-0.35.0-py3-none-any.whl
Size 78.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6bc2ec8dc887b2e58a912a68f9483783426e6b407f00ef862f9896793cc03ea
BLAKE2b-256 checksum
How to use checksums
6746c9be129f6f3d4279557a7476ccda7e5e758676ab63c496cc699f2f49a8a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for dirigent-fhir 0.35.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dirigent_fhir-0.35.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page