FLOW ALGEBRA
TITLE: Pharmacology Domain Ontology
DOMAIN: Domain Ontologies / Medical Domains / Pharmacology
SOURCE: https://kirethresearch.org/booksai-core/ontologies/domain-ontologies/medical-domains/pharmacology-domain-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.
flow "PharmacologyDomainOntology" v1.0 {
ontology:
id: "pharmacology-domain-ontology"
parent: "medical-domains"
purpose: "Represent pharmacological substances, mechanisms, exposures, effects, interactions and evidence with explicit uncertainty and provenance."
types:
Drug: {id: string, name: string, active_ingredient: string?, classification: string?}
BiologicalTarget: {id: string, kind: enum[receptor, enzyme, transporter, ion_channel, other]}
Mechanism: {id: string, description: string}
Dose: {value: number, unit: string, route: string?, schedule: string?}
Exposure: {id: string, drug_id: string, dose: Dose?, start: datetime?, end: datetime?, context: string?}
Effect: {id: string, kind: enum[therapeutic, adverse, toxic, other], description: string}
Interaction: {id: string, participants: string[], kind: string, evidence: string[]}
Study: {id: string, design: string, population: string?, provenance: string}
Measurement: {value: number, unit: string, uncertainty: number?, timestamp: datetime?}
Assertion: {id: string, subject: string, predicate: string, object: string, confidence: number, evidence: string[], context: string?}
predicates:
acts_on(drug: Drug, target: BiologicalTarget)
has_mechanism(drug: Drug, mechanism: Mechanism)
associated_with_effect(drug: Drug, effect: Effect)
exposed_to(exposure: Exposure, drug: Drug)
interacts_with(drug_a: Drug, drug_b: Drug)
investigated_by(assertion: Assertion, study: Study)
supported_by(assertion: Assertion, study: Study)
contradicted_by(assertion: Assertion, study: Study)
constraints:
- "Every assertion must resolve to typed entities and retain provenance."
- "Confidence values must lie within [0, 1]."
- "Dose and measurement values require explicit units and relevant context."
- "Distinguish pharmacokinetics from pharmacodynamics."
- "Association, mechanistic plausibility and clinical causation are distinct claims."
- "Drug interactions are context-sensitive; do not assume symmetry of effect magnitude."
- "No therapeutic recommendation or individual dosage follows from an ontology relation alone."
- "Do not infer safety from absence of reported adverse events."
inference:
rule evidence_trace:
if supported_by(a,s) and valid(s)
then evidence_for(a,s)
confidence: "calibrate to study quality, population applicability and independence"
rule mechanism_link:
if acts_on(d,t) and mechanism_involves(m,t)
then candidate_mechanism(d,m)
confidence: "hypothesis only until independently supported"
rule interaction_flag:
if interacts_with(a,b) and co_exposure(a,b,context)
then interaction_review_required(a,b,context)
confidence: "preserve interaction evidence and context"
SEMANTIC_EQUIVALENCE:
- "Normalise ingredient identifiers against versioned pharmacological vocabularies."
- "Distinguish active ingredients, formulations, brand names and drug classes."
- "Preserve route, dose, population, indication and study context."
CONFIDENCE:
range: [0,1]
factors: [study_quality, replication, sample_size, measurement_uncertainty, biological_plausibility, population_applicability]
policy: "Do not manufacture certainty by chaining weak evidence or treating correlated studies as independent."
VALIDATION:
- "Validate identifiers, types, dose units, route and temporal context."
- "Check evidence provenance, publication versions and contradictory findings."
- "Flag unsupported causal claims and incompatible population extrapolations."
- "Keep unknown, not-assessed and negative findings distinct."
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, compare, reconcile, recompute_inferences, publish]
rollback: true
AI_CONSUMPTION:
representation: "typed evidence-backed pharmacology knowledge graph"
outputs: [entity_links, relation_triples, mechanism_hypotheses, interaction_flags, uncertainty_annotations, provenance_records]
safeguards: [no_individualised_prescribing, no_unsupported_causal_claims, preserve_dose_units_and_context, human_clinical_review]
}
END FLOW ALGEBRA
Download Code
Copy to Clipboard