feat(NTO): WoA predicate fills + Healthcare clinical-workflow bootstrap#2
Merged
Merged
Conversation
…ration
Closes the property gaps identified by the 2026-05-07 WoA OGIT audit
(per .claude/plans/lance-graph-ontology-v5.md follow-on work). 24 new
rdfs:Property declarations across three entities so the woa-bridge can
project every Python WoA/models.py field as a 2-line scoped view over
OntologyRegistry::enumerate("WorkOrder") per Pillar 3 of the v1
cascade plan.
- Order.ttl (+112 lines): zeitStart, zeitEnde, anfahrten, mitarbeiter,
pauseStunden, zusatzStunden, notizen, internNotizen, bezahltAm,
mahnstufe, letzteMahnung, unterschrift, createdAt, updatedAt — 14
predicates covering temporal bounds, on-site labour, payment + dunning
workflow, and audit timestamps.
- Customer.ttl (+64 lines): anrede, mailAnrede, adresszusatz, fahrtKm,
fahrtKosten, notizen, aktiv, createdAt — 8 predicates covering
salutation, billing-address overflow, travel-cost derivation,
internal notes, and lifecycle.
- Article.ttl (+15 lines): lieferantAnr, aktiv — 2 predicates covering
supplier-side SKU and lifecycle.
Provenance: every new predicate carries dcterms:source pointing at the
exact AdaWorldAPI/WoA/models.py field. Cross-ref: v5 D-1 (dcterms:source
threading already shipped at the entity level; this extends the same
pattern to the per-attribute level).
Out of scope: docType enum formalization. The audit flagged docType as
unconstrained xsd:string; formalizing it requires a workspace-wide
decision on OGIT enumeration shape (no prior art in NTO/ today). Tracked
as a v3 follow-on — does not block woa-bridge migration.
HistoryEntry.ttl unchanged: already declares ogit:relates ogit.WorkOrder:User
on line 30; the audit's "+1 missing" was a false positive against the
v4-shipped state.
https://claude.ai/code/session_01WevBiZ3jzVocu8fBpTY8sq
…re-bridge Healthcare namespace did not exist before this commit; medcare-bridge at lance-graph/crates/lance-graph-ontology/src/bridges/medcare_bridge.rs:12 locks NAMESPACE = "Healthcare" and previously failed at hydrate with UnknownNamespace. This bootstraps the minimum-viable clinical workflow so the bridge can be migrated to OGIT O(1) per Pillar 3 of the ogit-cascade-supabase-callcenter-v1 plan. 7 entity TTL files (650 lines): - Patient.ttl (166 lines, source: praxis_patient) - Visit.ttl (86 lines, source: praxis_patient_waitingroom) - Diagnosis.ttl (95 lines, source: pf_diagnosis) - Treatment.ttl (57 lines, source: pf_therapy) - Medication.ttl (124 lines, source: pat_medication; relates 5 combo_medication_*) - VitalSign.ttl (60 lines, source: pf_vital_bloodpressure as base; pf_vital_* family extensible) - LabValue.ttl (62 lines, source: pf_laboratory_values; loincid carried as external reference for future BioPortal LOINC ingestion) 7 enumeration TTL files (196 lines, header + class declaration only — values populated as a follow-on import): - combo_medication_typ - combo_medication_interval - combo_medication_dailydose - combo_medication_dose_unit - combo_medication_stop_reason - combo_addtreatment - combo_spez Relations: - Visit belongs Patient (pid FK) - Diagnosis belongs Patient + relates Visit - Treatment belongs Patient - Medication belongs Patient + relates combo_medication_* enums - VitalSign belongs Patient - LabValue belongs Patient + carries external loincid - Patient belongs Tenant (via global ogit:tenant predicate) Out of scope (deferred to lance-graph-rdf-fma-snomed-v1): - Full SNOMED CT / FMA / RadLex / LOINC import (license + size gated). - BioPortal namespace stubs under OGIT/NTO/Medical/ (D-CASCADE-V1-4). - The remaining ~22 combo_* enum tables (pf_allergy_*, combo_operation, combo_vaccination, combo_morbidity, etc.). Provenance: every entity carries dcterms:source pointing at the exact MedCare-rs/.MYSQL/Struktur.sql table. https://claude.ai/code/session_01WevBiZ3jzVocu8fBpTY8sq
AdaWorldAPI
pushed a commit
that referenced
this pull request
May 7, 2026
…ch validator Follow-up to commit 13a8d3f. The codex-recommended flat depth-3 layout (NTO/Medical/<NAME>.ttl) passes single-file validator invocation (java -jar bin/ogit-validator.jar <one-file>) but FAILS batch invocation through ./validate.sh. agent-ogit-validator-fix empirically verified: validate.sh's xargs- batch pipeline triggers a path.subpath(2, getNameCount-1) extraction that requires >= 4 path components. Depth-3 fails with "Directory mismatch: <NAME>.ttl should be under directory Medical". Depth-4 (NTO/Medical/namespaces/<NAME>.ttl) yields "Validation successful". Moved the 10 BioPortal namespace stubs (git mv preserves history): NTO/Medical/ICD10CM.ttl -> NTO/Medical/namespaces/ICD10CM.ttl NTO/Medical/RxNorm.ttl -> NTO/Medical/namespaces/RxNorm.ttl NTO/Medical/LOINC.ttl -> NTO/Medical/namespaces/LOINC.ttl NTO/Medical/FMA.ttl -> NTO/Medical/namespaces/FMA.ttl NTO/Medical/RadLex.ttl -> NTO/Medical/namespaces/RadLex.ttl NTO/Medical/SNOMED.ttl -> NTO/Medical/namespaces/SNOMED.ttl NTO/Medical/MONDO.ttl -> NTO/Medical/namespaces/MONDO.ttl NTO/Medical/HPO.ttl -> NTO/Medical/namespaces/HPO.ttl NTO/Medical/DRON.ttl -> NTO/Medical/namespaces/DRON.ttl NTO/Medical/CHEBI.ttl -> NTO/Medical/namespaces/CHEBI.ttl The depth-4 layout still satisfies the codex P1 finding (file basename == subject IRI local name). The new `namespaces/` parent segment is canonical OGIT shape (mirrors `entities/`, `verbs/`, `enumerations/`). SQL stubs at NTO/Medical/sql_mirror/<NAME>.ttl are already at depth-4 (4 components: NTO + Medical + sql_mirror + file) and pass the batch validator after the metadata enrichment in commit fe551f0. Verification: - validate.sh on this checkout: ZERO errors mention Medical/ or sql_mirror/ - Other validate.sh errors (WorkOrder verbs Issued/HasPosition/ AccessesPortal/OwnsPasswords basename mismatch + Tenant.ttl missing dcterms:valid/dcterms:creator/ogit:allowed) are pre-existing in the v4-shipped WorkOrder namespace from prior OGIT PR #1 + PR #2 merges. Out of scope for this PR; tracked as separate cleanup work. Together with commits 13a8d3f (initial flat layout) and fe551f0 (SQL stub metadata enrichment), this closes both codex P1 findings on #3. https://claude.ai/code/session_01WevBiZ3jzVocu8fBpTY8sq
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the per-attribute property gaps that blocked the woa-bridge and medcare-bridge from migrating to OGIT-O(1) lookup — the architectural anchor of Pillar 3 in
lance-graph/.claude/plans/ogit-cascade-supabase-callcenter-v1.md(collapse bridges to 2-line projections overOntologyRegistry::enumerate(ns)).Two consumer namespaces touched, two atomic commits:
74ef035NTO/WorkOrder/entities/Order.ttl(+14),Customer.ttl(+8),Article.ttl(+2)38c2788NTO/Healthcare/Total: 17 files, +1037 LOC. Pure additions — no existing OGIT triple is mutated.
Scope
Commit 1 —
feat(NTO/WorkOrder): expand entity properties for woa-bridge O(1) migrationSource-of-truth:
AdaWorldAPI/WoA/models.py. Per the 2026-05-07 OGIT audit, three entities had property-list gaps relative to their Python source:Order.ttl(+14 predicates):zeitStart,zeitEnde,anfahrten,mitarbeiter,pauseStunden,zusatzStunden,notizen,internNotizen,bezahltAm,mahnstufe,letzteMahnung,unterschrift,createdAt,updatedAt— temporal bounds, on-site labour, payment + dunning workflow, audit timestamps.Customer.ttl(+8 predicates):anrede,mailAnrede,adresszusatz,fahrtKm,fahrtKosten,notizen,aktiv,createdAt— salutation, billing-address overflow, travel-cost derivation, internal notes, lifecycle.Article.ttl(+2 predicates):lieferantAnr,aktiv— supplier-side SKU + lifecycle.Every new predicate carries
dcterms:source "AdaWorldAPI/WoA/models.py:<Class>.<field>"— extends thelance-graph-ontology-v5D-1 (dcterms:source) discipline from entity-level to per-attribute level.HistoryEntry.ttlwas checked but not modified — already declaresogit:relates ogit.WorkOrder:Useron line 30; the audit's "+1 missing" was a false positive against the v4-shipped state.Commit 2 —
feat(NTO/Healthcare): bootstrap clinical-workflow namespace for medcare-bridgeSource-of-truth:
AdaWorldAPI/MedCare-rs/.MYSQL/Struktur.sql(104 MySQL tables; this PR maps the 7 minimum-viable clinical-workflow tables + 7 enumeration tables).The
medcare-bridgeatlance-graph/crates/lance-graph-ontology/src/bridges/medcare_bridge.rs:12locksNAMESPACE = "Healthcare"and previously failed at hydrate withUnknownNamespacebecause noNTO/Healthcare/directory existed. This bootstrap unblocks it.7 entity TTL files (650 lines) under
NTO/Healthcare/entities/:Patient.ttlpraxis_patientVisit.ttlpraxis_patient_waitingroomDiagnosis.ttlpf_diagnosisTreatment.ttlpf_therapyMedication.ttlpat_medication(relates 5combo_medication_*)VitalSign.ttlpf_vital_bloodpressure(base;pf_vital_*family extensible)LabValue.ttlpf_laboratory_values(carries externalloincidfor future BioPortal LOINC)7 enumeration TTL files (196 lines) under
NTO/Healthcare/enumerations/— class declarations only; values populated as a follow-on import (deferred):combo_medication_typ,combo_medication_interval,combo_medication_dailydose,combo_medication_dose_unit,combo_medication_stop_reason,combo_addtreatment,combo_spez.Relations:
VisitbelongsPatient(viapidFK)DiagnosisbelongsPatient+ relatesVisitTreatmentbelongsPatientMedicationbelongsPatient+ relatescombo_medication_*enumsVitalSignbelongsPatientLabValuebelongsPatient+ carries externalloincidPatientbelongsTenant(via globalogit:tenant)Cross-references
8e2f088):lance-graph-ontology-v5plan +ogit-cascade-supabase-callcenter-v1plan that motivated this OGIT work.4d0c2d9):palantir-parity-cascade-v2capstone + SoA DTO entropy ledger.?source=lancetoggle exercisinglance-graph-callcenter::rls::RlsRewriter+policy::ColumnMaskRewriter— validates the Zone 2 → Zone 3 path from v1/v2 plans.490566b): v4 namespace setup that shipped the originalNTO/WorkOrder/scaffolding this PR extends.medcare_bridge.rs:12(lance-graph): theNAMESPACE = "Healthcare"lock this PR unblocks.Out of scope (deferred, NOT punted)
docTypeenum formalization onOrder.ttl— currently an unconstrainedxsd:string. Formalizing requires a workspace-wide decision on OGIT enumeration shape (no prior art inNTO/today; no existingogit:Enumerationinstances). Tracked as a v3 follow-on.NTO/Medical/{ICD10CM,RxNorm,LOINC,FMA,RadLex,SNOMED,MONDO,HPO,DRON,CHEBI}/— 25 ontologies, ~2.4 GB; full ingestion gated on thelance-graph-rdf-fma-snomed-v1plan.combo_*enumeration tables (pf_allergy_*,combo_operation,combo_vaccination,combo_morbidity,combo_addexamination, etc.) — only the 7combo_*referenced by the 7 minimum entities are bootstrapped here.combo_*files — class declarations are present, values are a follow-onINSERT INTO ogit:Enumerationpass.NTO/SMB/): perlance-graph-ontology-v5ratification Q1 (smb-ontology export-only forever), the SMB consumer keeps its native Rust dictionary insmb-office-rs::smb-ontology. OGIT SMB namespace is NOT created in this PR; on-demand export path issmb-ontology::export_ogit_ttl().Test plan
@prefixblock (ogit:,ogit.<namespace>:,rdfs:,dcterms:,xsd:).rdfs:subClassOf ogit:Entity+ogit:scope "NTO"+ogit:parent ogit:Node.a rdfs:Property+rdfs:label+dcterms:description+dcterms:source(per v5 D-1 discipline).oxttl(lance-graph-ontology's parser dependency) and confirm zero parse errors. Local sandbox can't run cargo against this OGIT repo directly; lance-graph'shydrate_real_ogitexample will exercise these on the consumer side.lance-graph::woa-rs/tests/ontology_cypher_round_trip.rs --features ontologyshould resolveogit.WorkOrder:OrderviaOntologyRegistry::resolve_uri(...)and now reach the new predicates viaenumerate("WorkOrder").What's NOT in this PR
This PR does not open an upstream PR to
almatoai/OGIT. Perlance-graph-ontology-v5ratification Q4:AdaWorldAPI/OGITis the extension-fork-only target; the upstream canonical repo never receives PRs from this workspace.https://claude.ai/code/session_01WevBiZ3jzVocu8fBpTY8sq
Generated by Claude Code