Pure-Python openEHR AM toolkit (ADL2/AOM2/ODIN/BMM/OPT2).
Project description
pyopenehr-am
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.mddocs/issue-codes.mdanddocs/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 registrydocs/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
Acknowledgements
- openEHR specifications and community resources (see
openehr_am_resources.md)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3548bf4b7a12de66c2e6c4fb6e736548d7a1d837eb417f96250e279b0c0774e
|
|
| MD5 |
eec5aed43f305178eb316610f28232c0
|
|
| BLAKE2b-256 |
efdda1c385bf77f051ff0114cb84a43f872c7adc11ffbc79dc1165863404f83e
|
Provenance
The following attestation bundles were made for pyopenehr_am-0.0.1.tar.gz:
Publisher:
release-package-check.yml on rubentalstra/pyopenehr-am
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyopenehr_am-0.0.1.tar.gz -
Subject digest:
c3548bf4b7a12de66c2e6c4fb6e736548d7a1d837eb417f96250e279b0c0774e - Sigstore transparency entry: 771608801
- Sigstore integration time:
-
Permalink:
rubentalstra/pyopenehr-am@bdb6e379c33617ef730a27c5340c3677530940bc -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/rubentalstra
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-package-check.yml@bdb6e379c33617ef730a27c5340c3677530940bc -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
078b4834abd9270cb1234d1b81f91e757ee8ff60ebabaaff3cc88b8babedd1e3
|
|
| MD5 |
b573b25e35401004123445a0522c70a3
|
|
| BLAKE2b-256 |
3b39d39833c9514bb763a5828be61841dd7783336f365050f33c942c28774c9f
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyopenehr_am-0.0.1-py3-none-any.whl -
Subject digest:
078b4834abd9270cb1234d1b81f91e757ee8ff60ebabaaff3cc88b8babedd1e3 - Sigstore transparency entry: 771608803
- Sigstore integration time:
-
Permalink:
rubentalstra/pyopenehr-am@bdb6e379c33617ef730a27c5340c3677530940bc -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/rubentalstra
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-package-check.yml@bdb6e379c33617ef730a27c5340c3677530940bc -
Trigger Event:
release
-
Statement type: