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 with a conditional update on its identifier, never on a source server's id.
fhir.transaction writes Writes many resources in one transaction or batch Bundle, references between them rewritten to urn:uuid entries.
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.31.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.31.0
File Size Uploaded Provenance Actions
dirigent_fhir-0.31.0.tar.gz 48.0 kB With provenance Details for dirigent_fhir-0.31.0.tar.gz

Built distribution (wheel)

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

Total release size: 113.2 kB

Release files / dirigent_fhir-0.31.0.tar.gz

Download URL dirigent_fhir-0.31.0.tar.gz
Size 48.0 kB
Tags Source
SHA-256 checksum
How to use checksums
493b675801aada7370a150f26ebc33a3a912955f9a4c9ce0aa98303194aa6665
BLAKE2b-256 checksum
How to use checksums
a53984efdc88e17f56b138a5285ad74e4f0b42bdc088ae8650b11b0e7f2d1d73
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 3, 2026.

Transparency log

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

Download URL dirigent_fhir-0.31.0-py3-none-any.whl
Size 65.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1de5395c3031994a767d6bae2bd3580258fb431c88e994bf162504e638deba9
BLAKE2b-256 checksum
How to use checksums
0c11ff0446bb251bffd9dce536d69983e4cc12b3f4b4a892a99aefbfbee7e5bb
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 3, 2026.

Transparency log

Security for dirigent-fhir 0.31.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.31.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 3, 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