AshMatics Core DataModels
Version: 0.10.0
Canonical Pydantic data models for AshMatics healthcare applications.
Changelog
v0.10.0 (2026-09-04) — ASHFORGE-604 — the AI failure mode taxonomy contracts
- Added the
failure_modesmodule:AIFailureMode, the ten-class vocabulary for how a governed AI system fails, bound toash:AIFailureModeScheme(minted in ontology 0.14.0 / v2.7.0 for this release). CHAR had no content for "how does this class of AI fail, and what follows from that failure" — zero matches for fail / degrade / mode / robust / reliability / behaviour across all eleven process domains' base practices, so a site convening subject matter experts got a method name and a blank page. FailureModeTaxonomyis the document contract for the aigov-frameworkfailure_mode_taxonomy.yaml, the wayMethodRegistryis formethod_registry.yaml. Per aigov-framework ADR-018 D3 the taxonomy is reference content resolved at SOP junctions, not a base practice and not a method:rm-wizard-config.yamlRM-2-Q5 keeps offering FMEA, FTA, HAZOP, PHA and STAMP/STPA, and this is what the chosen method is applied to.Repercussioncarries the half that makes a taxonomy usable beside a hazard analysis — what an operator, an affected person or the organization actually experiences — with separate clinical and non-clinical framings and a validator refusing an audience that has neither. Non-clinical AI is in scope by design: an administrative scheduling system fails differently and the repercussion is not patient harm.FailureModeApplicabilityreuses the ash facet enums with the same zero-free-string rule as method applicability. It differs in one way worth knowing: an omitted axis means unrestricted, because most failure classes are reachable by most systems and the axes exist to exclude the ones that are not (confabulation has no meaning for a system emitting a category).ActionAuthoritysurfaces here for the first time (ash:ActionAuthorityScheme, ontology 0.13.0 / ASHFORGE-638) because failure-mode applicability conditions on it: a system that acts closes a feedback loop with no human step in between.- Requires
ashmatics-ontology >= 0.14.0.tests/failure_modes/test_ontology_binding.pychecks all ten concepts resolve, and its reverse-completeness check is load-bearing here rather than advisory —AIFailureModeSchemeis a facet scheme, not an open registry likeGovernanceMethodScheme, so a class minted in the ontology with no enum member means the taxonomy cannot express it.
v0.9.0 (2026-09-02) — ASHFORGE-627 — controls axis vocabularies and the platform availability record
- Added the
controlsmodule: the five CHAR control axes as ontology-bound enums (ControlMaturity,AssuranceMode,EvidenceMechanism,MechanismAvailability,AssuranceCadence), each value theskos:notationof itsashcai:*Schemeconcept, with the ordinal tables and theyieldsAssuranceModeedges mirrored and guard-checked both directions against the TTL (tests/controls/test_ontology_binding.py).Edition(essentials / enterprise, coreapp ADR-039) rides along as PRODUCT vocabulary with a guard that fires if a scheme for it ever lands. MechanismAvailabilityRecordis the contract for the platform's mechanism-availability record, which lives in asher-infra (platform-capabilities/mechanism-availability.yaml) and is pinned by release manifests — the second of the three gates in ontology ADR-009's assurance-ceiling design, and until now the one with a ratified vocabulary and no assignments anywhere. Per mechanism family and per edition, exactly one entry per family, a mandatorynote,provided_byas manifestrepos:keys, anddepends_on_anyfor the computed_derivation conjunction rule. Essentials may be split by the governed system's deployment mode (DeploymentMode, bound toash:DeploymentModeScheme) because a hosted-only edition's reach to a source is structural; Enterprise is one value.is_confirmedtells a consumer whether the owner has ruled on the values.- The ceiling itself ships as pure functions on the record so coreapp and the framework share one implementation:
achievable_ceiling(declared, edition, entitled)anddiagnose_gap(target, …) -> GapCause(availability → product backlog, entitlement → licensing, customer → their governance roadmap). The customer gate is "entitled AND reachable": whether a site's IT will open the path is that gate, not availability and not the customer's governance work.betais the default threshold at which a mechanism counts; it is a parameter, not a constant. - Requires
ashmatics-ontology >= 0.12.0(the ADR-009 schemes; cut 2026-09-02 for this release). The binding guard skips without a sibling checkout and fails against v0.11.0. Of the same ontology work,EngagementScopeandRiskTierSchemestill have no contract here;DeploymentModeSchemeis now bound viaDeploymentMode. The catalog and profile document contracts (theMethodRegistryequivalent forashc_controls_catalog.yaml) remain queued; this module ships the vocabularies they will share.
v0.8.1 (2026-08-13) — ASHFORGE-536
RegistryDeploymentgains three values for admin/operational systems:ehr,enterprise_system,agentic_platform— inserted beforeplatformin the device→cloud order (SRS-REG-03). Same PRODUCT binding tier as the rest of the enum (deliberately unbound to ash:).
v0.8.0 (2026-08-03) — ASHFORGE-412
- Added the
registrymodule: the AI System Registry rule vocabularies (ADR-036 §2.5) —RegistryCategory,RegistryAIType,RegistrySourcing,RegistryDeployment— the canonical home that coreapp's DjangoTextChoicesand the frontend'saiRegistryTaxonomies.tspin to by parity test. Every value is a rule-engine key; changing one is a vocabulary decision, not a rename (SRS-REG-AC-6). - AC-2 resolved: SRS-REG-03's
clinical_useboolean is DERIVED (is_clinical_use), never stored — the stored value is the three-way category. The decision test lives in theRegistryCategorydocstring: does the system's output assert something about an individual patient's condition or care? - AC-3 resolved: the org-level typed questions retire;
PortfolioSizeBucketandOrgSourcingMixsurvive as derived vocabularies (portfolio_size_bucketfrom the active-entry count,org_sourcing_mixrolling per-system sourcing up with hybrid counting half). - Ontology anchoring declared in a
SchemeBindingtable (registry/bindings.py) with a three-state status (BOUND / PENDING / PRODUCT) and enforced by an rdflib guard:RegistryAITypeis BOUND toash:AIParadigmSchemebyskos:notation(othercarved out as a deliberate UI collapse of the finer paradigms — the guard also fails if a carved-out value later gains a concept);RegistryCategoryis PENDING the clinical/operational/administrative scope-zone triad +ash:OperationalPurposeSchemebeing authored in ashmatics-ontology (skips loudly in CI until it lands); sourcing, deployment, and the derived vocabularies are recorded PRODUCT so "unanchored" is always a decision, never an oversight. - Interop note: this module binds by
skos:notation(predictive) while themethodsmodule binds by concept local name (ap-predictive). The mapping is mechanical (ap-+ notation) but rule authors bridging registry systems to CHAR method applicability must map, not string-compare. - Ontology v2.3.0 / ADR-007 landed mid-story (ASHFORGE-436) and this release consumes it (guards require
ashmatics-ontology >= 2.3.0):RegistryCategoryis now BOUND toash:ScopeZoneScheme(the ontology allows multi-zone systems; the registry stores one primary zone — additive to widen later). NewDeploymentStatusenum BOUND toash:DeploymentStatusScheme(per-deployment lifecycle on theforge:deploysApplicationedge; distinct fromRegistryDeploymenttopology, and from coreapp's minimal active/retired entry status). Neworg.ProviderOrgTypeenum BOUND toash:SemanticType_T093, tighteningOrganizationModel.organization_typefrom barestr— coreapp emitsNonethere today, so nothing breaks; mapping coreapp's legacy org-type values is the unblocked follow-up. (NamedProviderOrgType, not the handover'sOrganizationType, because coreapp already has an unrelatedOrganizationTypeTextChoices — a platform-actor/access-control axis with zero value overlap.) - Sourcing resolved (decision 2026-08-03): the ontology's
ash:SourcingScheme(commercial / ehr_embedded / homegrown / research) is an acquisition-channel axis, not the obligation triad. The channel is what the customer answers, so newSourcingChannelis the STORED per-entry field, BOUND to the scheme; the SRS-REG-15a obligation triad (RegistrySourcing) becomes DERIVED viasourcing_obligation()(commercial/ehr_embedded → vendor, homegrown/research → in_house,locally_adapted=Trueon a vendor channel → hybrid). Same stored-fact/derived-judgment philosophy asclinical_use. Downstream: coreapp's sourcing picker and SRS-REG-15a wording must move to channel values (dev-only data so far). - NOT bound, deliberately:
ash:OperationalPurposeScheme— explicitly a seed vocabulary, nothing consumes purpose yet (note itsprior_authorization_opsnotation is distinct from the clinical scheme'sprior_authorization).
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). - Committed but never separately released to PyPI; first shipped in 0.7.0.
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.
Metadata
Release files for ashmatics-datamodels 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ashmatics_datamodels-0.10.0.tar.gz | 164.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ashmatics_datamodels-0.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 301.0 kB
Release files / ashmatics_datamodels-0.10.0.tar.gz
| Download URL | ashmatics_datamodels-0.10.0.tar.gz |
|---|---|
| Size | 164.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bde99612691a0a2277b7f67ced0e0ecdba7c7f57f4ab53197077ae0f4cb418f5
|
|
BLAKE2b-256 checksum How to use checksums |
67da41fab4c32a6d094f496b2ef300c8e78b146c2d15af533641ead66fb8c09f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency logRelease files / ashmatics_datamodels-0.10.0-py3-none-any.whl
| Download URL | ashmatics_datamodels-0.10.0-py3-none-any.whl |
|---|---|
| Size | 136.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0027405b5504cda8385e5dd4e8c64405aa31ea457672c532ef807646ef42506
|
|
BLAKE2b-256 checksum How to use checksums |
7541b596edabc133711a1a3a9f1f5fac4b5aefda105d604f0156c6288e9c8250
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency log