Add your description here
Project description
omop_semantics
omop_semantics is a Python library for defining and managing semantic conventions on top of OMOP CDM.
It lets you describe conventions in code
- which OMOP concepts you want to have on hand as named key concepts to improve ergonomics in analytic code,
- how they are grouped,
- what roles they play
- and provide profiles to render these targets uniformly into CDM tables.
The goal is to make these conventions explicit, versioned, and reusable, instead of being buried in code, SQL, or documentation. They are also extensible so that you can add opinionated layers on top of default specifications that may be relevant in a domain-specific context only.
Current structure
The library currently has two main runtime surfaces and one older compatibility surface:
-
Value-set runtime For stable named ids and ergonomic downstream access such as
from omop_semantics.runtime.default_valuesets import runtime. -
Template/profile runtime For working with semantic templates, compiled template views, and CDM row shapes via
OmopSemanticEngine. -
ConceptRegistry compatibility API The older
load()/ConceptRegistrypath is still exported for workflows that rely on it, but it should be treated as a compatibility surface rather than the only mental model for the package.
If you are starting new downstream code today:
- use
runtime.default_valuesetswhen you need stable named concept ids, - use
OmopSemanticEnginewhen you need templates, profiles, or profile groups, - use
load()/ConceptRegistrywhen you specifically need the older registry behavior.
Key ideas
-
Human-authored
Semantic rules and concept groups are written in YAML and validated with schemas. -
Portable
No database or graph store required. -
Versionable
Conventions can evolve over time and be tracked in git. -
Integrates with pipelines
Can drive ETL logic, validation, and documentation so they stay in sync.
Typical workflow
-
Define a schema
Describes what kinds of semantic objects and roles exist (e.g. staging, modifiers). -
Write YAML instances
Lists actual OMOP concepts, profiles, and templates used in your project. -
Load the runtime surface you need
Use value sets for named ids, or the semantic engine for template/profile work. -
Use it in code
For validation, cohort logic, ETL constraints, or documentation.
When should you use this?
Use omop_semantics if you:
- have project-specific rules about which OMOP concepts are valid,
- need consistent concept groupings across ETL and analytics,
- want semantic conventions to be explicit, testable, and versioned,
- are working in domains like oncology where OMOP alone is too permissive.
Docs map
-
docs/usage.mdRecommended loading paths for value sets, templates/profiles, and older registry workflows. -
docs/data-model.mdThe conceptual distinction between profiles, profile groups, templates, and semantic objects. -
docs/schema-and-instances.mdCanonical authoring assets and how the shipped schema/instance files are organized. -
docs/internals.mdRepo structure, public runtime surfaces, and compatibility notes.
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 omop_semantics-0.2.0.tar.gz.
File metadata
- Download URL: omop_semantics-0.2.0.tar.gz
- Upload date:
- Size: 29.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5471443210f4c07dac1fef5f7b1c278f3bf4f942ec47052b688b252ec18765af
|
|
| MD5 |
42482d222aa35cc107f3a18569623133
|
|
| BLAKE2b-256 |
9dc391511c136a8482ae136d2188cd8e10798e4a62eee42cc69441ceb4fa2fa5
|
Provenance
The following attestation bundles were made for omop_semantics-0.2.0.tar.gz:
Publisher:
python-publish.yml on AustralianCancerDataNetwork/omop-semantics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omop_semantics-0.2.0.tar.gz -
Subject digest:
5471443210f4c07dac1fef5f7b1c278f3bf4f942ec47052b688b252ec18765af - Sigstore transparency entry: 1640852849
- Sigstore integration time:
-
Permalink:
AustralianCancerDataNetwork/omop-semantics@1bdaaf4fc73535ab90bc117386c54eeb47a3b4b8 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/AustralianCancerDataNetwork
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@1bdaaf4fc73535ab90bc117386c54eeb47a3b4b8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file omop_semantics-0.2.0-py3-none-any.whl.
File metadata
- Download URL: omop_semantics-0.2.0-py3-none-any.whl
- Upload date:
- Size: 47.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb81c5f737da1a52d271349090dca2e6adaf4eae4035f3e88e9333341740b76d
|
|
| MD5 |
5b8538e9b363854ff4f03509ef4f3a4d
|
|
| BLAKE2b-256 |
238595690ff8c77699a6b3233e4f8f59a01b398af20c0dca3a32a01ece67182e
|
Provenance
The following attestation bundles were made for omop_semantics-0.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on AustralianCancerDataNetwork/omop-semantics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omop_semantics-0.2.0-py3-none-any.whl -
Subject digest:
eb81c5f737da1a52d271349090dca2e6adaf4eae4035f3e88e9333341740b76d - Sigstore transparency entry: 1640853029
- Sigstore integration time:
-
Permalink:
AustralianCancerDataNetwork/omop-semantics@1bdaaf4fc73535ab90bc117386c54eeb47a3b4b8 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/AustralianCancerDataNetwork
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@1bdaaf4fc73535ab90bc117386c54eeb47a3b4b8 -
Trigger Event:
release
-
Statement type: