AshMatics Core DataModels
Version: 0.7.0
Canonical Pydantic data models for AshMatics healthcare applications.
Changelog
v0.7.0 (2026-07-12) — ASHKBAPP-99
- Added the
artifactsmodule: the aigov-framework ADR-006 artifact plane, ported field-for-field from that repo's legacymodels_pydantic/pydantic_models.py(now a deprecation shim over this module). KB base-content side:ToolRef,PracticeView,BaseArtifact,CompiledView; coreapp tenant-instantiation side:DecisionRecord,ExportRecord,InstanceArtifact,InstanceIndex. InstanceArtifactcarries the one clean ontology binding (x_ontology_class: ashcai:WorkProduct), guard-checked against the TTL. Fuller bindings (e.g.BaseArtifact.typevsash:DocumentKindScheme) deferred to the ADR-002 promotion gate — different stored values make that a redesign, not a port.- Behavior tightening vs the legacy plain
BaseModel: extra fields forbidden, assignment validation (houseAshMaticsBaseModel). A field-parity test pins the port against the legacy shape.
v0.6.0 (2026-07-12) — ASHKBAPP-99
- Added the
methodsmodule: CHAR governance-method contracts per aigov-framework ADR-011 §5.MethodDefinition/ApplicabilityProfile/EvidenceRef/DefaultRulemodelmethod_registry.yamlfield-for-field;MethodSet/ApprovedMethodSetcarry the shared-set and Blueprint-resolved shapes;MethodRegistryround-trips the whole registry document without loss (acceptance-tested against the live file). ApplicabilityProfileaxes arex_ontology_scheme-bound enums against the five ash facet schemes plus the newash:ModelClassScheme(ontology ADR-006), each also carrying itsashcai:methodAppliesTosubproperty viax_ontology_property. Values use concept local names (ap-predictive), the canonical CHAR concept IDs.- CLF v0.6.0 rule-grammar types shared with coreapp MethodRoute (ADR-031):
ConditionScope,EvaluationTime,MethodControlAction,SystemAttribute. - New ADR-002 rdflib binding guard (
tests/methods/test_ontology_binding.py): accepts concept local names in addition to notations/prefLabels (the CHAR ID convention), and adds a reverse-completeness check so facet-scheme concepts without enum members also fail CI. This supersedes the static SKOS snapshot in the aigov-framework'svalidate_method_registry.py. - ID grammars exported as constants (
METHOD_ID_PATTERN,JUNCTION_REF_PATTERN, ...) so framework validators import one truth. - Requires
ashmatics-ontology >= 2.2.0(GovernanceMethodScheme,ModelClassScheme). - Deliberately NOT included: the aigov-framework's legacy
models_pydantic/pydantic_models.pyreconciliation — a separate PR per the Phase 2 handoff (no new contracts land in that file).
v0.5.0 (2026-07-11) — ASHKBAPP-91
DocumentType(thekb_documentsdocument_typediscriminator) is now the KIND axis, single-sourced from the ontologyash:DocumentKindScheme(ADR-002 Decision 5). AddedGENERAL(kb_general) fallback;USE_CASEkept but deprecated (ADR-005 — the Mongo use-case path is retired to the Postgreskb_use_casesspine).- New
RegulatoryRegion(8) andRegulatoryPathway(7) enums, ontology-bound toash:RegulatoryRegionScheme/ash:RegulatoryPathwayScheme; added optionalregulatory_region/regulatory_pathwayfields toRegulatoryMetadataContent(regulator scoping carried as sibling fields — the "split" model). - Extended the ADR-002 rdflib binding guard to the document models (
tests/documents/test_ontology_binding.py): every scheme-bound enum value must be a real concept in its scheme, so vocabulary drift fails tests. - Requires
ashmatics-ontology >= 2.1.0(DocumentKindScheme).
v0.4.0 (2026-06-02) — JAC-27
- Added the
orgmodule: FORGE-aligned organization-instance shape, withx_ontology_schemebindings to theforge:ontology and the initial ADR-002 rdflib binding guard (tests/org/test_ontology_binding.py). Committed but never separately released to PyPI; first shipped in 0.5.0.
v0.3.1 (2026-01-25) — ASHKBAPP-66
- Added
PROCESS_DOCUMENTATIONtoGovernanceCategoryenum - This is a core CAI framework category required for MCP service compatibility
Overview
This library provides the single source of truth for data contracts across the AshMatics ecosystem:
- Knowledge Base (KB)
- CoreApp
- ashmatics-tools SDK
- AI Watch applications
Features
- FDA Vocabulary: OpenFDA-aligned schemas for manufacturers, clearances, classifications, recalls, adverse events
- MongoDB Document Schemas: Three-tier structure for all
kb_*collections (evidence, regulatory, model cards, products, manufacturers, use cases) - Governance Document Models: Clinical AI Governance Framework artifacts (policies, SOPs, work products, process documentation)
- Use Case Taxonomy: Clinical AI use case categorization
- Rich Validation: Built-in validators for regulatory identifiers (K numbers, product codes)
- Database Agnostic: Pure Pydantic models, no ORM coupling
- Type Safe: Full type hints with mypy support
Installation
# From git (recommended for now)
pip install git+https://github.com/AsherInformatics/ashmatics-core-datamodels.git
# Or add to pyproject.toml
# dependencies = [
# "ashmatics-datamodels @ git+https://github.com/AsherInformatics/ashmatics-core-datamodels.git",
# ]
Quick Start
from ashmatics_datamodels.fda import (
FDA_ManufacturerBase,
FDA_510kClearance,
FDA_DeviceClass,
ClearanceType,
)
# Create a manufacturer
manufacturer = FDA_ManufacturerBase(
manufacturer_name="Medical AI Corp",
applicant="Medical AI Corp",
)
# Create a 510(k) clearance with validation
clearance = FDA_510kClearance(
k_number="K240001", # Validated format
clearance_date="2024-08-15",
device_name="AI-Chest Scanner",
device_class=FDA_DeviceClass.CLASS_2,
)
Package Structure
ashmatics_datamodels/
├── common/ # Base models, validators, regulators, frameworks
├── fda/ # FDA vocabulary (manufacturers, clearances, classifications, recalls, adverse events)
├── documents/ # MongoDB document schemas (three-tier structure)
├── use_cases/ # Clinical AI use case taxonomy
└── utils/ # Parsing and normalization utilities
Documentation
📚 Full Documentation (when published)
Or build locally:
uv pip install -e ".[docs]"
uv run mkdocs serve
Design Documents
License
Apache 2.0 - See LICENSE for details.
Contributing
This is an internal Asher Informatics library. For questions, contact info@asherinformatics.com.
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 ashmatics_datamodels-0.7.0.tar.gz.
File metadata
- Download URL: ashmatics_datamodels-0.7.0.tar.gz
- Upload date:
- Size: 123.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f541c6eba5235db5bf51c9864f934fff3e81d8050b27363a0315f0e2757e28d
|
|
| MD5 |
4abbde38872066ad4e569ee5a14abd91
|
|
| BLAKE2b-256 |
f0332f648e2f4f771eb3941017dbb300ef48cc204f3bad9bd32e02bc37c694e0
|
Provenance
The following attestation bundles were made for ashmatics_datamodels-0.7.0.tar.gz:
Publisher:
publish.yml on AshMatics/ashmatics-datamodels
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ashmatics_datamodels-0.7.0.tar.gz -
Subject digest:
8f541c6eba5235db5bf51c9864f934fff3e81d8050b27363a0315f0e2757e28d - Sigstore transparency entry: 2154466939
- Sigstore integration time:
-
Permalink:
AshMatics/ashmatics-datamodels@38eb87dce267aacf1b72b7f3129c9a3667955d54 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/AshMatics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@38eb87dce267aacf1b72b7f3129c9a3667955d54 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ashmatics_datamodels-0.7.0-py3-none-any.whl.
File metadata
- Download URL: ashmatics_datamodels-0.7.0-py3-none-any.whl
- Upload date:
- Size: 105.2 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 |
988243da8f7578d467b97cc16fcf05be112afd6713f9b3daf071adbc55fef32c
|
|
| MD5 |
3c9c519890b29a5f85f15c518d1020a2
|
|
| BLAKE2b-256 |
17cae4c8155ff16e7dcb9c239d8a320882da65e592daeb1896c80e49a5aba51e
|
Provenance
The following attestation bundles were made for ashmatics_datamodels-0.7.0-py3-none-any.whl:
Publisher:
publish.yml on AshMatics/ashmatics-datamodels
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ashmatics_datamodels-0.7.0-py3-none-any.whl -
Subject digest:
988243da8f7578d467b97cc16fcf05be112afd6713f9b3daf071adbc55fef32c - Sigstore transparency entry: 2154467661
- Sigstore integration time:
-
Permalink:
AshMatics/ashmatics-datamodels@38eb87dce267aacf1b72b7f3129c9a3667955d54 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/AshMatics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@38eb87dce267aacf1b72b7f3129c9a3667955d54 -
Trigger Event:
push
-
Statement type: