FLOW ALGEBRA
TITLE: Medical Relationship Ontology
DOMAIN: Scientific Relationships / Medicine
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/scientific-relationships/medical-relationship-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.
flow "MedicalRelationshipOntology" v1.0 {
ontology:
id: "medical-relationship-ontology"
parent: "scientific-relationships"
purpose: "Represent evidence-backed relationships between medical concepts, observations, conditions, interventions and outcomes without replacing clinical judgement."
types:
MedicalConcept: {id: string, label: string, terminology: string?, code: string?, version: string?}
Condition: {id: string, concept: MedicalConcept, onset: datetime?, status: string?}
Symptom: {id: string, concept: MedicalConcept, severity: string?, observed_at: datetime?}
Finding: {id: string, concept: MedicalConcept, value: number|string?, unit: string?, observed_at: datetime?, method: string?}
Intervention: {id: string, concept: MedicalConcept, intent: string?, performed_at: datetime?}
Outcome: {id: string, concept: MedicalConcept, assessed_at: datetime?, measure: string?}
Evidence: {id: string, source: string, design: string?, population: string?, published_at: datetime?, limitations: string[]}
Relationship: {id: string, subject: string, predicate: string, object: string, context: string?, confidence: number, evidence: string[], valid_from: datetime?, valid_until: datetime?}
predicates:
associated_with(a: MedicalConcept, b: MedicalConcept)
presents_with(condition: Condition, symptom: Symptom)
supported_by(finding: Finding, evidence: Evidence)
suggests(finding: Finding, condition: Condition)
indicated_for(intervention: Intervention, condition: Condition)
contraindicated_for(intervention: Intervention, condition: Condition)
may_affect(intervention: Intervention, outcome: Outcome)
precedes(a: MedicalConcept, b: MedicalConcept)
interacts_with(a: Intervention, b: Intervention)
constraints:
- "All relationship endpoints must resolve to typed entities."
- "Confidence must lie within [0, 1]."
- "Association, temporal precedence and statistical prediction do not independently establish causation."
- "A symptom or finding must not be treated as a definitive diagnosis without adequate evidence."
- "Intervention relationships require population, indication, context and evidence qualification."
- "Medical quantities must include units, methods and reference intervals where relevant."
- "Patient-identifiable data must not be emitted in public graph outputs."
- "Conflicting evidence and uncertainty must be preserved rather than silently resolved."
inference:
rule evidence_link:
if suggests(f,c) and supported_by(f,e) and valid(e)
then candidate_association(f,c,e)
confidence: "calibrate to evidence quality and applicability; not a diagnosis"
rule contraindication_alert:
if indicated_for(i,c) and contraindicated_for(i,c)
then flag_context_conflict(i,c)
confidence: "requires context-specific expert review"
rule temporal_sequence:
if precedes(a,b) and precedes(b,c) and compatible_time_context(a,b,c)
then precedes(a,c)
confidence: "preserve original time evidence; no causal inference"
SEMANTIC_EQUIVALENCE:
- "Map medical terms to versioned terminology systems when authoritative mappings exist."
- "Distinguish synonyms, broader/narrower concepts, related concepts and exact identity."
- "Preserve population, anatomical site, laterality, stage and temporal context."
CONFIDENCE:
range: [0,1]
factors: [evidence_quality, population_applicability, measurement_uncertainty, replication, temporal_relevance, source_reliability]
policy: "Do not inflate confidence through inference chains or repeated citations to the same evidence."
VALIDATION:
- "Validate entity types, terminology codes, units, dates and evidence identifiers."
- "Check indication/contraindication conflicts and context compatibility."
- "Record unknown, contested or unsupported relationships explicitly."
- "Require expert review before clinical deployment or patient-specific decision support."
FLOW_HASH:
algorithm: "SHA-256"
input: "canonicalised ontology version, typed assertions, rules and provenance"
note: "Compute hash at execution; no hash value is claimed here."
UPDATE_MODEL:
strategy: "versioned, provenance-preserving incremental update"
steps: [ingest, normalise, validate, assess_evidence, reconcile, recompute_inferences, publish]
rollback: true
AI_CONSUMPTION:
representation: "typed, evidence-backed medical knowledge graph"
outputs: [concept_links, relation_triples, uncertainty_annotations, evidence_records, provenance_records, review_flags]
safeguards: [no_unsupported_diagnosis, no_unqualified_causal_claims, preserve_population_context, privacy_protection, clinical_review_required]
}
END FLOW ALGEBRA
Download Code
Copy to Clipboard