Skip to main content

Formal temporal and causal structure for consistent clinical data across systems.

Project description

AION — Structural Consistency for Clinical Data

Formal temporal and causal structure for consistent clinical data across systems.

Tests Python License FHIR R4 DOI


Clinical data systems often produce inconsistent results.

Not because of missing interfaces —
but because time, semantics and causality are not modelled consistently.

AION makes clinical data consistent and verifiable across systems.

It provides a formal, executable structure to:

  • represent clinical events over time
  • define and validate relationships between them
  • ensure consistent interpretation across systems
  • enable reproducible analytics and reliable AI

Most systems exchange clinical data.

AION ensures that this data is interpreted consistently.


Quick Start

pip install aion-clinical
from aion.core import Interval, classify
import datetime

dt = lambda h: datetime.datetime(2024, 1, 1, h, 0)

anaesthesia = Interval(dt(7), dt(12))
operation   = Interval(dt(8), dt(11))

print(classify(anaesthesia, operation))
# -> AllenRelation.CONTAINS

Why AION?

Most systems can exchange clinical data.

The harder problem begins afterwards:

  • data is interpreted differently across systems
  • temporal relations remain implicit
  • causal assumptions are hidden in project-specific logic
  • analytics become difficult to compare and reproduce

AION addresses this structural layer directly.

Instead of modelling isolated data points only, AION models:

  • intervals instead of points
  • relations instead of implicit assumptions
  • causal structures instead of static data
  • verifiable consistency instead of hidden transformation logic

What is AION?

AION is a formal, executable model for clinical information systems.

It generalises earlier formal models (FM-1, FM-2 / CAIRN)
into a domain-independent structure for clinical data.


Core Capabilities

Temporal Model

  • Complete Allen interval algebra (13 relations)
  • Fuzzy intervals with probabilistic reasoning

Data Model

  • Universal clinical event model (6-tuple)
  • Type system with hierarchy and schema evolution

Query & Analytics

  • Cohort algebra
  • Temporal pattern languages

Causal Inference

  • Causal graphs
  • Do-operator
  • Structure learning

AI Integration

  • Formal AI component model
  • Explainability (Shapley, counterfactuals)

Privacy

  • Differential privacy (Laplace / Gaussian)
  • Federated computation

Interoperability

  • FHIR mapping via structural homomorphism

Example: Cohort Query

from aion.query.cohort import query_event_sequence

q = query_event_sequence("Diagnosis", "Procedure")
cohort = q.evaluate(ctx)

Example: Causal Analysis

from aion.causal.graph import CausalGraph
from aion.causal.do import DoOperator

g = CausalGraph()
g.add_edge("Diagnosis", "Procedure")

do = DoOperator(g, data)
result = do.intervene("Procedure", "Outcome")

Test Suite

pytest aion/tests/
# 326 tests, ~2s runtime

Architecture

aion/
├── core/          Allen algebra (13 relations), type system σ(τ),
│                  event 6-tuple, fuzzy intervals, process DAG
├── abstraction/   Episode formation B_{Φ,Δ}, clinical trajectories
├── query/         Cohort algebra, RTP patterns, TCFG, predicates
├── causal/        Causal graph, do-operator, backdoor adjustment,
│                  PC algorithm, bootstrap structure learning
├── privacy/       ε-DP Laplace/Gaussian, federated model, LDP
├── ai/            AI components A_l = (X,Y,f_θ,L,θ*), Π_l operator,
│                  feature extraction Ψ, risk estimation
├── explain/       Shapley attribution, counterfactual Δ*_cf,
│                  sufficient explanation S*_suf, Π_l^+ gate
├── schema/        Versioned type system, 7 schema change ops,
│                  migration function μ_{v→v'}
└── adapters/
    └── fhir/      Structural homomorphism (h_T, h_σ), Q_map index

Key Concepts

Event 6-Tuple (AION §5)

e = (p, a, τ, [t^B, t^E], α, ρ)
  • p patient, a stay, τ type, [t^B,t^E] interval, α attributes, ρ references

Positioning

AION is not:

  • a data format
  • a data warehouse
  • a FHIR replacement

AION is:

the structural consistency layer beneath clinical data systems


License & Citation

EUPL-1.2 — open source. Commercial licence: licensing@iscad-it.de

@software{aion2026,
  title  = {AION: Algebraic Interval Ontology for Clinical Networks},
  author = {Matten, Friedhelm},
  year   = {2026},
  url    = {https://codeberg.org/fm2-project/aion},
  doi    = {10.5281/zenodo.19548857}
}

© Friedhelm Matten, ISCaD GmbH

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

aion_clinical-1.0.5.tar.gz (92.1 kB view details)

Uploaded Source

Built Distribution

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

aion_clinical-1.0.5-py3-none-any.whl (107.5 kB view details)

Uploaded Python 3

File details

Details for the file aion_clinical-1.0.5.tar.gz.

File metadata

  • Download URL: aion_clinical-1.0.5.tar.gz
  • Upload date:
  • Size: 92.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for aion_clinical-1.0.5.tar.gz
Algorithm Hash digest
SHA256 211df976701b0db83aef7ef9f0fef6da4d09b76ed8528bacde8f86b948abdd6d
MD5 8983b7251683a996fb0acf0783280924
BLAKE2b-256 e436285d2b805e7789f7be25072e641f8908643cfd1d2cfd26a1436f187f4995

See more details on using hashes here.

File details

Details for the file aion_clinical-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: aion_clinical-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 107.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for aion_clinical-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 00dba9cf7c0acd41a75b56216739fe0299f90f2ba7c4c6dee963fbba6e7be7b9
MD5 a46c3e9fe6017d61e8e73c27b3b3586a
BLAKE2b-256 1035410c3d28bef694c06b5a67ea2b4e74f26c1a02efebffdc428994206693ee

See more details on using hashes here.

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