Skip to main content

Pure-Python openEHR AM toolkit (ADL2/AOM2/ODIN/BMM/OPT2).

Project description

pyopenehr-am

CI Python License: MIT Ruff Pyright

Pure-Python (Python 3.14+ only) openEHR ADL2 / AOM2 / ODIN / BMM / OPT2 toolkit for parsing, validation, and template compilation.

This project is intended as a developer SDK: teams can embed it in their own codebases to build migration pipelines from legacy formats into openEHR, while relying on this library for standards-based artefact handling (archetypes/templates) and validation.


What this is

A Python package that provides:

  • Parse ADL2 archetypes and templates
  • Parse ODIN (embedded sections and BMM persistence)
  • Build an in-memory AOM2 semantic model
  • Validate:
    • syntax (parser-level)
    • AOM2 semantic validity
    • RM conformance using BMM schemas
  • Compile templates/archetypes into OPT2 (Operational Template)

Internal architecture: Parse → Build AOM → Validate → Compile OPT → (Optional) Validate Instances


What this is NOT

  • Not a “one-click database migrator”
  • Not mapping logic for any specific vendor/hospital schema
  • Not a wrapper around existing non-Python reference implementations (this repo is pure Python only)

Project status

🚧 Early stage / under active development.
Expect breaking changes until the first stable release.

Planned milestones and tasks live in:

  • openehr_am_toolkit_todo_checklist.md
  • docs/issue-codes.md and docs/validation-rule-template.md

Install

pip install pyopenehr-am

For local development (example):

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest
ruff check .

Diagnostics and Issue Codes

All recoverable problems are returned as structured Issue objects, with:

  • stable code (e.g., ADL001, AOM200, BMM500, OPT700)
  • severity (INFO|WARN|ERROR)
  • best-effort file/line/col and optional path/node_id

See:

  • docs/issue-codes.md — canonical registry
  • docs/validation-rule-template.md — how to add rules

Specs and references

This repo is standards-driven. Pin the exact spec releases you implement in:

Curated links live in:


Contributing

Contributions are welcome.

Guidelines:

  • Keep diffs small and test-backed
  • Use stable Issue codes (update docs/issue-codes.md)
  • Add a short # Spec: URL comment for new validation rules
  • Do not edit generated parser code under openehr_am/_generated/

License

MIT


Acknowledgements

  • openEHR specifications and community resources (see openehr_am_resources.md)

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

pyopenehr_am-0.0.1.tar.gz (143.0 kB view details)

Uploaded Source

Built Distribution

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

pyopenehr_am-0.0.1-py3-none-any.whl (153.2 kB view details)

Uploaded Python 3

File details

Details for the file pyopenehr_am-0.0.1.tar.gz.

File metadata

  • Download URL: pyopenehr_am-0.0.1.tar.gz
  • Upload date:
  • Size: 143.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyopenehr_am-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c3548bf4b7a12de66c2e6c4fb6e736548d7a1d837eb417f96250e279b0c0774e
MD5 eec5aed43f305178eb316610f28232c0
BLAKE2b-256 efdda1c385bf77f051ff0114cb84a43f872c7adc11ffbc79dc1165863404f83e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyopenehr_am-0.0.1.tar.gz:

Publisher: release-package-check.yml on rubentalstra/pyopenehr-am

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

File details

Details for the file pyopenehr_am-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyopenehr_am-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 153.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyopenehr_am-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 078b4834abd9270cb1234d1b81f91e757ee8ff60ebabaaff3cc88b8babedd1e3
MD5 b573b25e35401004123445a0522c70a3
BLAKE2b-256 3b39d39833c9514bb763a5828be61841dd7783336f365050f33c942c28774c9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyopenehr_am-0.0.1-py3-none-any.whl:

Publisher: release-package-check.yml on rubentalstra/pyopenehr-am

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