Skip to main content

Patient-owned sovereign health records (FHIR/CCDA) as a Kestrel Sovereign feature package

Project description

kestrel-feature-healthcare

Patient-owned sovereign health records (FHIR/CCDA) for Kestrel Sovereign.

An agent holds the owner's clinical records as part of its sovereign memory. This is a reusable framework capability — a sibling package alongside kestrel-feature-visual / -reflection / -observability — not a host-product feature. Any healthcare host on Kestrel consumes it.

Status

Multi-phase epic tracked in KestrelSovereignAI/kestrel-sovereign:

  • Phase A — implemented — typed FHIR R4B resource store, owner-DID-scoped, PHI encrypted at rest, audited reads
  • Phase B — implemented — CCDA document storage + header extraction (lxml), owner-DID-scoped, encrypted at rest, sharing one append-only PHI access log with Phase A
  • Phase C — implemented — pure-Python CCDA → FHIR R4B mapper (no third-party converter): Patient + Allergies / Medications / Problems / Results / Vital Signs / Immunizations / Procedures. Normalized resources land in the Phase A FHIR store, owner-scoped and audited, exactly like any other write.
  • Phase D — owner-controlled access/consent surface + export hooks

Phases C/D depend on the sovereign-import receiver and the data_access_grant consent-verification primitives shipping in kestrel-sovereign first.

Phase A — PHI handling (required)

Health records are PHI. The store is fail-closed: resource bodies are encrypted at rest with AES-256-GCM under a per-owner key HKDF-derived from the host master key, and no operation will store or return PHI in the clear. The host master key must be configured (KESTREL_DATA_KEY); without it the FHIR tools fail with a clear error rather than degrading to plaintext. Every owner read/write/query is recorded in an append-only access log. Only the resource body is encrypted — resource_type and fhir_id remain queryable metadata.

Installation

uv pip install kestrel-feature-healthcare

The package registers HealthcareFeature through the kestrel_sovereign.features entry point group.

Development

uv sync --extra test
uv run --extra test pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kestrel_feature_healthcare-0.7.0.tar.gz (45.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kestrel_feature_healthcare-0.7.0-py3-none-any.whl (54.2 kB view details)

Uploaded Python 3

File details

Details for the file kestrel_feature_healthcare-0.7.0.tar.gz.

File metadata

File hashes

Hashes for kestrel_feature_healthcare-0.7.0.tar.gz
Algorithm Hash digest
SHA256 f51d32c4c9b6858c2f88c4e897859a8c45b7ccef9897f9b6dbe1ccf262a42557
MD5 b7ae7b3f9b0411cf79da91b9bda1ada3
BLAKE2b-256 b1aaa297441b18c556e64d22287ab1ae2b8d92b8572373e311bc2462d6b04038

See more details on using hashes here.

Provenance

The following attestation bundles were made for kestrel_feature_healthcare-0.7.0.tar.gz:

Publisher: publish.yml on KestrelSovereignAI/kestrel-feature-healthcare

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kestrel_feature_healthcare-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kestrel_feature_healthcare-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4e31dc80e6c13afc8465cf2767b94e94147d1e78d8609e82a5c08ccc6893627
MD5 0334541068fcfe92f4efddca4729e8c2
BLAKE2b-256 990f0022fc7509dc1ca4dfc6b26ca85e25cc5a5a420f2fb5907edf41aed6e48b

See more details on using hashes here.

Provenance

The following attestation bundles were made for kestrel_feature_healthcare-0.7.0-py3-none-any.whl:

Publisher: publish.yml on KestrelSovereignAI/kestrel-feature-healthcare

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page