Medical Knowledge Architecture
A central design challenge in building a hospital knowledge graph is separating universal medical knowledge from hospital-specific organisational data. Which department handles which condition is a fact about medicine; which doctors work in that department at a particular hospital is a fact about that hospital. Conflating these two layers produces a system that cannot be transferred, audited, or maintained.
This page documents the Three-Source Knowledge Architecture, a separation of automated knowledge derivation from human curation. The architecture organises all knowledge inputs by their provenance: automated web scraping (Source 1), a standards-based medical ontology (Source 2: SNOMED CT), and irreducible human judgment (Source 3: curated configuration). Published research reports that ontology-enhanced knowledge graphs can improve retrieval accuracy (Jimeno-Yepes et al., 2012; Soman et al., 2024), and the Belgian government has announced SNOMED CT for primary diagnoses by 2027 (FPS Public Health, 2024). Those findings come from the cited studies, not from this project.
The Problem: Coupled Domain Knowledge
In early iterations of the graph extraction pipeline, medical relationships were encoded as hardcoded constants scattered across several source files: one mapped conditions to departments, another mapped treatments to conditions, a third defined department aliases. This arrangement had three consequences:
- No portability. Hospital-specific data (department names, campus locations, doctor rosters) was interleaved with general medical knowledge (which conditions a cardiology department typically handles). Deploying the system for a second hospital would require disentangling hundreds of constants.
- No auditability. When a clinician asked "why does the graph say Neurochirurgie handles Aneurysma?", the answer was buried in a code dictionary with no provenance, no generation date, and no model attribution.
- Inconsistent coverage. Each constant was maintained by hand. Some departments had 20 condition mappings; others had none. There was no systematic process to ensure completeness.
The Three-Source Knowledge Architecture addresses all three problems by separating knowledge inputs by provenance: what the hospital website says (Source 1), what the medical ontology says (Source 2), and what requires human judgment (Source 3).
Architectural Overview: Three-Source Knowledge Architecture
The system organises knowledge inputs by the mechanism by which the knowledge was derived. This separation enables automated verification: scraped data can be re-scraped, SNOMED relationships can be validated against the ontology, and curated overrides are explicitly flagged as human judgment.
Why Three Sources?
An internal audit of the knowledge pipeline found 57 hardcoded data structures, around 3,400 entries in total, spread over ten source files. Classified by how they could be derived:
| Category | Share of entries |
|---|---|
| Web-scrapable (Source 1) | about 15% |
| SNOMED-derivable (Source 2) | about 20% |
| LLM-derivable | about 8% |
| Curated (Source 3) | about 9% |
| Hybrid (partially derivable) | about 47% |
Roughly 85% of the hardcoded data is therefore theoretically derivable from automated sources. For an academic project evaluated on architectural quality, hand-maintained dictionaries encoding medical knowledge are a defensibility risk, especially when SNOMED CT is already imported into PostgreSQL. (These shares come from the project's own internal audit.)
Source Priority and Confidence
Each knowledge source carries a provenance tag and a confidence score:
| Source | Confidence | Priority |
|---|---|---|
| Curated configuration | 1.0 | Highest: human judgment overrides all |
| Web scraper | 1.0 | High: directly observed on the hospital website |
| LLM enrichment | 0.8 | Medium: LLM-classified, human-reviewed |
| SNOMED CT | 0.7 | Lower: ontology-derived, may not reflect local practice |
Curated "negative maps" (relationships that must not exist) filter relationships from all sources equally, so plausibility guards apply regardless of provenance.
Implementation: Three Layers
The Three-Source Architecture is implemented through three code layers that mirror the source separation. Each layer has a strict dependency direction: dependencies flow from general to specific, never the reverse.
Layer 1: Universal Medical Knowledge
Layer 1 is the portable foundation. It contains general Dutch medical knowledge applicable to any Belgian hospital: entity aliases, classification rules, plausibility guards, and LLM-generated relationship mappings. Nothing in this layer references hospital-specific entities (campuses, department rosters, department-campus assignments). It has three parts.
1a. Dutch Medical Vocabulary
A vocabulary module encodes general medical-domain knowledge in Dutch and has no dependencies on any other part of the codebase, which makes it portable to any Dutch-speaking hospital deployment. It covers:
| Area | Purpose |
|---|---|
| Utility matching | Dutch compound-word matching and fuzzy text matching |
| Doctor-name cleanup | Filter non-physician names (job titles, body parts) |
| Entity-type classification | Resolve ambiguous entities (for example, "radiotherapie" is both a department and a treatment) |
| Condition normalization | Map patient-friendly Dutch ("hoge bloeddruk") to canonical terms ("Hypertensie"); filter overly broad terms |
| Treatment normalization | Aliases and noise filtering |
| Examination normalization | Casing rules (for example RX to Röntgen), alias groups, case-insensitive lookup |
| Service and specialty aliases | Deduplication of hospital services and specialty names |
| Noise and hub guards | Prevent over-connected nodes ("pijn", "tumor", "allergie") from corrupting the graph |
| Domain plausibility | Domain-group-based rules and runtime validation of extracted relationships |
| Resolvers | Query-time and extraction-time alias resolution |
Key design property. Because this module has no project dependencies, it can be extracted into a standalone package and shared across hospital deployments without modification. The hospital-specific taxonomy depends on it, never the reverse.
1b. Standard Belgian Hospital Departments
A second module defines the standard Belgian hospital department names, the canonical department vocabulary shared across Belgian hospitals. It serves two roles:
- Enrichment portability. The LLM enrichment step uses the standard list as the allowed values in its classification prompts. Generated relationship mappings therefore reference standard names (for example "Cardiologie", "Neurologie") rather than hospital-specific brand names (for example a named heart centre or stroke centre).
- Hospital-specific resolution. A mapping from the hospital's branded centre and programme names back to the standard equivalents resolves standard names to hospital-specific canonical names during graph seeding. For a new hospital deployment, only this mapping needs to be replaced.
1c. Enrichment Modules (Relationship Mappings)
Five data modules map medical entities to each other. They encode facts such as "Cardiologie handles Hartfalen" or "CT examinations diagnose Aneurysma" that are true regardless of which hospital's website is being indexed.
- LLM-generated, human-reviewed. The mappings are produced by an enrichment script that calls an advanced (Tier 3) model with the full entity inventories from the hospital's taxonomy. The LLM's task is not to invent relationships but to map known entities to known departments, a constrained classification task where the model's medical knowledge is most reliable.
- Standard department names. Post-generation resolution maps standard names back to hospital-specific canonical names during graph seeding.
- Provenance metadata. Each file records the generation date, the model used, and a note that human review is required before deployment.
| Relationship | Description |
|---|---|
| HANDLES | Which departments handle which conditions |
| OFFERS | Which departments offer which treatments |
| PERFORMS | Which departments perform which examinations |
| DIAGNOSES | Which examinations diagnose which conditions |
| TREATS | Which treatments treat which conditions |
These relationships are many-to-many: a single condition may be handled by several departments, and a single department handles many conditions.
Layer 2: Hospital-Specific Taxonomy
The second layer contains everything specific to the hospital as an organisation, driven by a validated configuration file:
- Campus definitions (exactly four): Sint-Jan, André Dumont, Sint-Barbara, and Maas en Kempen, each with address, aliases and contact information.
- Department-campus mappings: which departments operate at which campuses, a fact about organisational structure, not about medicine.
- Department roster: the canonical list of departments with their aliases, including branded names.
- Centre-department mappings: multidisciplinary centres mapped to their constituent departments, enabling transitive doctor inference (see Centre-Doctor Inference).
- Hospital-specific domain maps: overrides derived from the hospital's hub pages that take precedence over universal knowledge.
- Search aliases: query-time rules mapping user search terms to department names (for example "hartfilmpje" to "ECG", "NMR" to "MRI").
- Doctor page classification: rules for identifying authoritative doctor profile pages on the hospital's website.
A frozen taxonomy registry, scraped from the hospital's hub pages (authoritative listing pages for all doctors, departments, conditions and treatments), offers constant-time lookups by canonical name, with pre-built indexes for doctors and for department, condition, treatment and examination aliases.
Dependency direction. The hospital-specific taxonomy imports from the universal vocabulary; the reverse does not exist. This enforces the constraint that general medical knowledge never depends on hospital-specific data.
Layer 3: Graph Seeding
The third layer combines the previous two. The golden-page seeder merges universal medical knowledge with hospital-specific taxonomy data and stores the resulting relationships in the PostgreSQL-backed taxonomy. The merge follows a simple precedence rule: hospital-specific data takes priority. If the hospital's hub pages say that "Hartfalen" is handled by "Cardiologie" and "Geriatrie", and the universal layer also maps "Hartfalen" to "Cardiologie" and "Interne Geneeskunde", the merged result includes all three departments. "Cardiologie" and "Geriatrie" (from the hospital's own data) are listed first, and duplicates are removed case-insensitively.
Layer Separation: Implementation Details
The layer separation refactoring was the most significant architectural change to the knowledge architecture since its initial design.
Before: Monolithic Taxonomy
Before the refactoring, a single, very large taxonomy file contained both general Dutch medical knowledge and hospital-specific data. It had grown organically through iterative graph-quality fixes, accumulating condition aliases, treatment aliases, examination casing rules, entity type overrides, plausibility guards, hub blocklists and domain maps, all interleaved with campus definitions and department mappings. The dependency graph was flat: every module that needed medical knowledge imported from this one file, making it impossible to reuse medical knowledge without also importing hospital-specific data.
After: Three-Layer Dependency Graph
The refactoring enforced one rule: dependencies flow from general to specific, never the reverse. The vocabulary module sits at the bottom with no project dependencies. Consumer modules use both layers but never create circular dependencies.
What Moved Where
General medical knowledge (condition, treatment and examination aliases; entity type overrides; hub and noise guards; domain plausibility maps; doctor-name cleanup rules; plausibility and resolver functions; service and specialty aliases) moved out of the hospital-specific taxonomy into the universal vocabulary. The standard department list is new. The hospital-specific module shrank substantially, and a configuration file now carries most of the hospital-specific declarations.
Registry Fallback Enhancement
The frozen taxonomy registry provides hospital-specific entity resolution at query time and extraction time. When the registry has no match for an entity, the system falls back to the general medical knowledge in Layer 1 rather than to hospital-specific maps. Fallback resolution therefore remains portable and does not introduce hospital-specific assumptions into the general path.
Design Rationale
Why Separate Universal Knowledge from Hospital Data?
The separation is motivated by three engineering concerns and one epistemological principle.
1. Portability. If the system is deployed for a second hospital, Layer 1 transfers unchanged. Only Layer 2 needs to be rebuilt: scrape the new hospital's hub pages, define its campuses, and configure its department aliases. The medical knowledge that "Cardiologie handles Hartfalen" remains valid.
2. Testability. Layer 1 modules are pure data with no side effects. A domain expert can validate them by reading them, with no database connections, API calls or runtime state. Layer 2 can be tested against the live hospital website. Layer 3 can be tested with mocked inputs from both layers.
3. Auditability. Each layer has a clear provenance chain. Layer 1 records its generation model and date. Layer 2 data is scraped from URLs that can be revisited. Layer 3's merge logic is a deterministic function. When a clinician questions why the graph contains a particular relationship, the provenance chain identifies where it came from.
4. The epistemological principle. Medical knowledge and organisational knowledge are different kinds of facts. "Cardiologie handles Hartfalen" is a fact about medicine, true at any hospital with a cardiology department. "A given cardiologist consults on Monday and Wednesday at campus Sint-Jan" is a fact about one hospital's staffing schedule. Mixing these in a single data structure obscures the difference.
Why LLM-Generated Knowledge?
The relationship mappings in Layer 1 could have been authored manually by domain experts. The decision to use LLM generation was driven by three factors:
Coverage. The taxonomy contains well over a hundred conditions, treatments and examinations each, across dozens of departments. Manually mapping the cross-product is a combinatorial task (tens of departments times hundreds of conditions gives thousands of potential HANDLES relationships alone). An LLM processes the full matrix in minutes.
Medical plausibility. Modern LLMs trained on medical literature encode extensive knowledge of which departments handle which conditions. For the constrained task of classifying known entities into known departments, the model is not generating novel medical knowledge but recognising established associations. This is an assumption the project relies on, not a measured accuracy; it is the reason for the human review gate below.
Human review as the quality gate. The LLM output is written to files that are kept under version control. A domain expert reviews the difference before deployment. The LLM handles the bulk classification; the human handles the edge cases.
SNOMED CT as Source 2: From Query-Time to Seeding-Time
SNOMED CT is the international clinical-terminology standard (glossary); its full role, the 5-tier matcher, and the query-time mechanism are documented on the SNOMED CT Terminology page. This section covers only how it participates as Source 2 of the three-source merge. Its integration evolved through two phases:
Phase 1 (implemented). Query-time synonym expansion: patient terms resolve to clinical synonyms and unknown conditions route to departments via the anatomical site of the finding. See SNOMED CT Terminology.
Phase 2 (approved design). Seeding-time graph enrichment. SNOMED CT becomes a first-class knowledge source when the graph is seeded, not just a query-time fallback. This addresses weak results on SNOMED-specific queries in the project's own small question set, where conditions existed as graph nodes but lacked the relationship to the correct department. SNOMED anatomical-site data can create these missing relationships automatically.
| Enrichment | Mechanism | Impact |
|---|---|---|
| Concept IDs on nodes | Match entity names against SNOMED descriptions | Deterministic concept-level matching; language-independent identity |
| Dutch synonyms as properties | Fetch all Dutch descriptions for the matched concept | Replaces hand-maintained aliases with SNOMED descriptions |
| IS_A hierarchy relationships | Traverse the pre-computed hierarchy between existing graph nodes | "Find all subtypes" queries (diabetes: type 1, type 2, gestational) |
| FINDING_SITE to HANDLES | Condition concept, body structure, department | Creates missing condition-to-department links |
| PROCEDURE_SITE to OFFERS | Treatment concept, body structure, department | Creates missing treatment-to-department links |
Scoping guard. Only the entities already in the taxonomy are enriched. SNOMED's roughly 356,000 concepts are not bulk-imported, so the taxonomy grows only by a modest number of hierarchy and derived relationships.
Why SNOMED CT complements (not replaces) LLM enrichment. SNOMED CT maps clinical concepts, not hospital workflows. It encodes that "Heart failure" IS_A "Disorder of cardiovascular system" and has the finding site "Heart structure". It does not encode that heart failure patients in a Belgian hospital should be directed to Cardiology. The bridge from body structures to hospital departments requires a small curated organisational mapping that is universal across Belgian hospitals. For department-to-condition, treatment and examination relationships that lack anatomical grounding, LLM enrichment remains the primary source.
The Dutch Medical Terminology Challenge
Building a medical search system in Dutch presents challenges that do not arise in English-language systems.
Morphological Complexity
Dutch is a head-final compounding language (Booij, 2012) in which medical terms routinely appear as single compounds without spaces: hartchirurgie (heart surgery), bloedonderzoek (blood test), ruggenmergtumor (spinal cord tumour). A keyword search for "hart" (heart) will not match "hartchirurgie" unless the system decomposes the compound or maintains an alias map. The vocabulary module therefore implements substring matching that lets "hart" match "hartchirurgie", "hartritmestoornissen" and "hartfalen" without full morphological decomposition.
Register Gap: Patient vs. Clinical Terminology
Hospital websites serve two audiences, patients and referring physicians, who use different vocabularies for the same concepts:
| Patient Dutch | Clinical Dutch | Latin/International |
|---|---|---|
| hoge bloeddruk | hypertensie | hypertensio arterialis |
| suikerziekte | diabetes mellitus | diabetes mellitus type 2 |
| beroerte | cerebrovasculair accident | CVA |
| spataders | varices | varicosis |
| grijze staar | cataract | cataracta senilis |
| open rug | spina bifida | myelomeningocele |
| huidkanker | melanoom | melanoma malignum |
| nierstenen | urolithiasis | nephrolithiasis |
The condition alias map bridges this gap by mapping patient-friendly terms to canonical clinical equivalents. Treatment aliases normalise treatment terminology, and examination aliases map colloquial examination names to canonical forms (for example "NMR" to "MRI", "bloedafname" to "Bloedonderzoek").
Ambiguity: Departments, Treatments, and Conditions
In Dutch hospital terminology, a single term frequently denotes several entity types at once. "Radiotherapie" is both a department (an organisational unit with staff) and a treatment (a therapeutic modality). "Orthopedie" is a department and a medical specialty. "Dialyse" is a treatment, while "Nefrologie", the department that provides it, is a specialty.
Entity-type overrides and a small dual-entity map resolve these ambiguities at extraction time. The dual-entity map covers cases where both interpretations are correct: "Radiotherapie" needs to exist as both a department node and a treatment node. Other examples are nuclear medicine (with radio-isotope therapy and PET-CT), neonatology and clinical biology.
Hub Node Prevention
Certain medical terms, such as "pijn" (pain), "tumor", "allergie" (allergy) and "infectie" (infection), are so broadly applicable that, treated as conditions, they would create hub nodes connecting to nearly every department. Such hubs degrade search specificity: a query for "pijn" would return every department rather than routing to the Pain Centre where it belongs. Blocklists for hub conditions and hub treatments prevent these terms from creating HANDLES/TREATS relationships, and a further guard covers terms such as "koorts" (fever), "vermoeidheid" (fatigue) and "hoofdpijn" (headache) that are symptoms rather than conditions.
Examination Normalisation
Medical imaging examinations present a specific normalisation challenge. The hospital website uses inconsistent names for the same examination: "RX", "RX-onderzoek", "RX Onderzoeken", "RX-beeld" and "Röntgen" all refer to X-ray imaging; "NMR", "MRI" and "Kernspinresonantie" all refer to magnetic resonance imaging. Casing rules canonicalise these variants to a single display name, which removed fragmented examination nodes from the graph. Specific procedures (for example RX Arthrografie) keep their identity as distinct examinations; only generic references are collapsed.
Together with the SNOMED CT synonym layer (about 656,000 Dutch descriptions), the system resolves patient-facing Dutch, clinical Dutch and international medical terminology to the same canonical entities.
The LLM Enrichment Pipeline
The enrichment script generates Layer 1's relationship mappings. Its design reflects the principle that LLMs are classifiers, not inventors: the script provides the full list of entities and asks the LLM to classify relationships between them, rather than asking it to generate entities from scratch.
Standard Department Names for Portability
The pipeline uses standard Belgian hospital department names rather than hospital-specific names in the LLM classification prompt, so the generated mappings are portable across hospitals. The resolution flow:
When the seeder runs, a resolution step maps standard names back to hospital-specific canonical names. For a new hospital, only the name map needs to be replaced; the enrichment modules remain unchanged.
Pipeline Stages
- Entity filtering. Raw entity names include noise: section headers from web pages ("Brochures 2", "Dag 1"), generic medical terms ("Aandoeningen", "Behandeling") and very short strings. Filtering applies section-header detection, a curated list of generic terms, a minimum length, and case-insensitive deduplication.
- LLM classification. Five separate LLM calls, one per relationship type. Each provides the filtered entities and the standard Belgian departments, and asks for a JSON mapping. The LLM can only use names that appear in the provided lists, which limits hallucination.
- Output validation. The LLM occasionally maps entities to department names that do not exist in the standard list (misspellings, synonyms). Any mapping whose target is not a known department is removed.
- Hub page merge. The hospital's hub pages contain authoritative relationship data scraped from the website. It is merged with the LLM output, with hub page data taking precedence, so hospital-verified relationships survive even if the LLM disagrees.
- Post-merge cleanup. A final pass removes noise keys that survived into the merged output.
- Output. The pipeline writes five data modules (one per relationship type), a Markdown review report and the raw JSON output for auditing.
Quality Assurance
The review report gives transparency into the generation process: for each relationship type it lists the entities mapped, the total mappings, how many were confirmed by hub pages, and how many came only from the LLM. For the department-to-condition relationship, the large majority of mappings were confirmed by the hospital's own hub pages and only a small number came exclusively from the LLM; those are the ones requiring the most careful human review.
For cross-entity relationships (examinations that diagnose conditions, treatments that treat conditions), hub-page confirmation is nil, because hospital web pages do not state these relationships. They represent general medical knowledge that only the LLM supplies. They are medically standard (for example, "CT examinations diagnose Aneurysma") and can be validated by any clinician, which is why the human review step is mandatory.
Centre-Doctor Inference
Hospital knowledge graphs face a specific challenge in linking doctors to multidisciplinary centres. Centres such as the Breast Centre or the Stroke Centre are not departments with their own staff rosters: they are cross-departmental programmes whose doctors are employed by constituent departments (Oncology, Neurology, Surgery and so on). The website lists doctors under departments, not centres. Without explicit centre-doctor relationships, a patient searching for a doctor at the breast centre would find nothing.
The Transitive Inference Pattern
A configuration map defines the constituent departments of each centre. At seeding time, a transitive rule is applied: for each centre, for each constituent department, every doctor who works in that department receives a works-in relationship to the centre, with a confidence of 0.7 (against 1.0 for relationships read directly from hub pages). The lower confidence signals that the relationship is inferred rather than observed. It is available to downstream consumers such as search ranking but is not currently shown to users.
Coverage
The map covers about twenty centres, each mapped to its constituent departments and to a campus. The centres include clinical centres, rehabilitation programmes, specialised clinics and support programmes.
Integration with the RAG Pipeline
The medical knowledge layer enhances the RAG pipeline at two points: graph seeding (ingestion time) and graph querying (query time).
At Ingestion Time
When the seeder runs, it merges Layer 1 (universal knowledge) with Layer 2 (hospital taxonomy) and stores the relationships. The resulting data quality is monitored by an automated data-quality check that evaluates naming consistency (canonical name adherence, alias coverage, casing uniformity) and search effectiveness (relationship connectivity, entity-to-document coverage, cross-entity navigability). At the time of writing it reported that every doctor had a department link, every department had a campus link, every centre had inferred doctors and there were no orphan nodes. This is the project's own check; it shows structural completeness, not correctness of the links.
At Query Time
When a user asks "Welke onderzoeken worden gebruikt om hartfalen vast te stellen?" (Which examinations are used to diagnose heart failure?), the query pipeline:
- Intent classification identifies this as a condition-information query.
- Entity extraction identifies "hartfalen" as a condition.
- Taxonomy resolution resolves it to the canonical condition name (with SNOMED synonym fallback).
- DIAGNOSES traversal finds the examinations linked to this condition.
- SNOMED synonym matching lets queries also match through synonyms stored on the nodes, for example "suikerziekte" matches "Diabetes Mellitus" without a static alias entry.
- Response generation formats the results with source citations.
Without the knowledge graph relationships, this query would fall through to vector search and return generic passages that mention heart failure, which is useful but imprecise. With the graph, the system can return a structured list of specific diagnostic examinations with the departments that perform them.
Query Pipeline Simplification (Phase B)
With SNOMED synonyms stored directly on taxonomy entities, queries become synonym-aware without query-time SNOMED lookups for known entities. A lookup now matches either the canonical name or any stored synonym. This reduces query-time work by pre-computing synonym matches at seeding time, while keeping the query-time SNOMED fallback for terms not in the taxonomy.
Multi-Tenancy Path
The layer separation is the architectural foundation for evolving from a single-hospital deployment into a multi-tenant hospital search product. This section covers multi-tenancy from the knowledge-layer angle, that is, which medical-vocabulary components are portable and which are hospital-specific. For the system-level onboarding pathway, tenant isolation and routing, see Multi-Tenancy Architecture.
What Transfers Unchanged (Layer 1)
These components are designed to work for any Dutch-speaking hospital without modification:
| Component | Content |
|---|---|
| Dutch medical vocabulary | Condition, treatment and examination aliases, entity-type overrides, plausibility guards, resolvers, compound-word matching |
| Standard Belgian department names | The canonical department list and a normalisation function |
| Enrichment modules | Mappings across the five relationship types |
| Enrichment pipeline script | The LLM enrichment generator |
| SNOMED CT reference data | Concepts, descriptions, relationships and a pre-computed hierarchy (see SNOMED CT integration), loaded from the Belgian Edition distribution |
What Needs Replacement (Layer 2)
For a new hospital deployment, only the following need to be created or replaced:
| Component | Effort | Description |
|---|---|---|
| Hospital taxonomy | Medium | Campus definitions, department-campus mappings, department aliases specific to the new hospital |
| Hub page scrape | Automated | Run the hub page scraper against the new hospital's website |
| Hospital-to-standard name map | Low | Map the new hospital's branded department names to standard Belgian names |
| Site configuration | Low | The new hospital's domain and configuration |
The Enrichment Pipeline as a Portable Generator
Because the enrichment pipeline uses standard Belgian department names, its output is designed to be portable. When onboarding a new hospital:
- Scrape the new hospital's hub pages to populate the taxonomy.
- Run the enrichment pipeline, which uses standard names, not hospital-specific names.
- Create a mapping from the new hospital's branded names to the standard equivalents.
- Seed the taxonomy; the seeder resolves standard names to hospital-specific names automatically.
The enrichment modules do not need to be regenerated for each hospital. The same "Cardiologie handles Hartfalen" mapping applies universally. Only the resolution from "Cardiologie" to a hospital's specific department name (which may be "Hartcentrum", "Cardiologische Dienst", or simply "Cardiologie") happens at seeding time. This describes the design intent; the project has been deployed for one hospital only.
Comparison with Related Approaches
Medical Knowledge Graphs in Literature
| Approach | Examples | Strengths | Limitations |
|---|---|---|---|
| Ontology-based | SNOMED CT, ICD-10, UMLS | Standardised, comprehensive, internationally maintained | Clinical focus (not navigational), licensing requirements, Dutch coverage gaps |
| NER + relation extraction | scispaCy, MedCAT, BioBERT | Automated, handles novel entities | Requires training data, language-specific models needed for Dutch |
| Manual curation | Hospital-internal databases | High precision, domain-expert validated | Does not scale, maintenance burden, no portability |
| LLM classification (this system) | Tier 3 model + hub page merge | Scalable, auditable, portable, Dutch-native | Requires human review, no novel entity discovery |
The system's approach is closest to constrained LLM classification with human-in-the-loop validation, a pattern that uses LLM medical knowledge for bulk classification while keeping auditability through version-controlled output files and hub page cross-referencing.
Hybrid Architecture Advantages
- Scalable like LLM extraction. New entities are classified automatically.
- Precise like manual curation. Hub page data overrides the LLM when available.
- Portable like ontology-based systems. Layer 1 is designed to transfer across hospitals.
- Auditable. The provenance chain runs from LLM output to hub page confirmation to human review.
Way Forward: Three-Source Architecture Roadmap
The Three-Source Architecture is being implemented in phases, each gated by a run of the project's golden question set before merging.
Phase A: Web Scraper Campus Inference (complete)
The scraper infers department-to-campus mappings from doctor campus data, eliminating manual campus maintenance. The data-quality check confirmed that no department lacked a campus link.
Phase B: SNOMED Graph Enrichment (approved design)
Add a SNOMED enrichment phase to the graph seeding pipeline, running after all entities and relationships are built:
- Concept ID matching against SNOMED descriptions.
- Synonym enrichment with Dutch synonyms as node properties.
- IS_A hierarchy relationships between existing condition nodes (limited to three hops).
- FINDING_SITE to HANDLES: create condition-to-department links via anatomical routing.
- PROCEDURE_SITE to OFFERS: create treatment-to-department links via procedure site mapping.
The target is to raise the pass rate on the project's small SNOMED-specific question set (15 questions, of which 4 passed when the design was written) substantially. This is a self-reported target on the project's own question set.
Phase C: Alias Elimination (planned)
Replace hand-maintained alias dictionaries (condition, treatment and examination aliases and casing, and the condition and examination domain maps) with SNOMED-derived synonyms and anatomical-site lookups at seeding time. This would remove several hundred hand-maintained entries, roughly one fifth of all hardcoded data.
Completed: SNOMED CT Phase 1, Query-Time Synonym Expansion
SNOMED CT Belgian Edition (about 356,000 concepts and 656,000 Dutch descriptions) is integrated as a query-time synonym expansion layer, following the BMQExpander pattern (Mao et al., 2024). The implementation includes:
- PostgreSQL reference tables for concepts, descriptions, relationships and a pre-computed hierarchy (about 4.7 million ancestor/descendant pairs).
- A terminology service that resolves patient terms (for example "cataract") to clinical synonyms ("staar") that match taxonomy entries.
- Anatomical-site routing that maps unknown conditions to departments through SNOMED CT body structure relationships, using a curated body-structure-to-department mapping and a hierarchy walk of limited depth.
- Always-on operation. SNOMED is not behind a feature switch, and calls degrade gracefully when the reference data is absent.
On a targeted 15-question evaluation set, synonym expansion raised entity recall from 40% to between 47% and 60%, depending on LLM response variability (self-reported; very small set, no independent evaluation).
Future: Cross-Lingual Search
With SNOMED CT concept identifiers on graph nodes, the system could accept queries in any language that SNOMED CT supports (Dutch, English, French, German) and resolve them to the same concepts. This is relevant for a multilingual patient population in the province of Limburg.
Future: Neural Entity Extraction
For discovering novel entities not in the taxonomy, two approaches are under evaluation: GLiNER-BioMed (zero-shot NER) and MedCAT (NER with SNOMED CT concept linking). Both require a baseline on the project's golden question set (108 questions across 15 categories at the time of writing).
Theoretical Foundations
The Three-Source Knowledge Architecture draws on established principles from knowledge engineering, medical informatics, and information retrieval. Effects mentioned below are reported by the cited studies, not measured by this project.
- Separation of concerns (Dijkstra, 1982): Universal medical knowledge, standards-based ontology data and hospital-specific organisational data are orthogonal concerns that change for different reasons and at different rates.
- Open-world assumption (Reiter, 1978): The absence of a relationship in the knowledge graph does not mean it does not exist. The tiered query strategy (graph, then vector fallback) treats graph results as high-confidence and vector results as exploratory.
- Knowledge graph completion (Bordes et al., 2013): The LLM enrichment pipeline can be understood as knowledge graph completion, where a pre-trained model predicts missing links between known entities.
- Ontology-enhanced RAG (Soman et al., 2024): OntologyRAG reported that grounding retrieval-augmented generation in formal ontologies improves accuracy on medical QA benchmarks.
- SNOMED CT concept-based information retrieval (Ruch et al., 2006): Using SNOMED concepts and body-structure relationships improved retrieval in that study, which motivates the anatomical-site approach in Source 2.
- Biomedical query expansion (Jimeno-Yepes et al., 2012; Mao et al., 2024): Using SNOMED CT and MeSH synonyms for query expansion improved results on medical QA benchmarks. This underpins both the query-time synonym expansion and the seeding-time synonym-as-property design.
- Cross-lingual medical embeddings (Yuan et al., 2022): The CODER model reported that cross-lingual embeddings improve medical entity matching. SNOMED CT's multilingual descriptions provide a basis for cross-lingual search without language-specific embedding models.
- Frozen ontology pattern (Uschold & Gruninger, 1996): The taxonomy layer is a frozen snapshot of the hospital's entity inventory at scrape time. This prevents drift between the graph and the hospital's current data, at the cost of periodic re-scraping.
- Multi-tenancy through abstraction (Bezemer & Zaidman, 2010): Multi-tenant systems should isolate tenant-specific configuration from shared logic. Sources 1 and 2 are portable; Source 3 is tenant-specific.
- Dutch morphological compounding (Booij, 2012): Dutch medical terms are formed by concatenating morphemes without spaces (for example hartchirurgie, schildklieraandoening). A finite alias dictionary can never fully cover the space of valid terms, which motivates SNOMED CT's Dutch descriptions as a scalable synonym source.
References
- Bezemer, C. P., & Zaidman, A. (2010). Multi-tenant SaaS applications: Maintenance dream or nightmare? Joint ERCIM Workshop on Software Evolution and International Workshop on Principles of Software Evolution, 88--92. https://doi.org/10.1145/1862372.1862393
- Booij, G. (2012). The Grammar of Words: An Introduction to Linguistic Morphology (3rd ed.). Oxford University Press.
- Bordes, A., Usunier, N., Garcia-Duran, A., Weston, J., & Yakhnenko, O. (2013). Translating embeddings for modeling multi-relational data. Advances in Neural Information Processing Systems, 26, 2787--2795.
- Dijkstra, E. W. (1982). On the role of scientific thought. In Selected Writings on Computing: A Personal Perspective (pp. 60--66). Springer-Verlag.
- FPS Public Health. (2024). Belgian eHealth Action Plan: SNOMED CT Implementation Roadmap. Federal Public Service Health, Food Chain Safety and Environment.
- Hartendorp, R., et al. (2024). Biomedical entity linking for Dutch. In Proceedings of CL4Health Workshop, LREC-COLING 2024.
- Hogan, A., et al. (2021). Knowledge graphs. ACM Computing Surveys, 54(4), 1--37. https://doi.org/10.1145/3447772
- Jimeno-Yepes, A., Berlanga, R., & Rebholz-Schuhmann, D. (2012). Ontology-based query expansion for biomedical information retrieval. BMC Bioinformatics, 13(S14). https://doi.org/10.1186/1471-2105-13-S14-S1
- Mao, Y., et al. (2024). BMQExpander: Biomedical query expansion using SNOMED/MeSH synonyms. Proceedings of NAACL 2024.
- Reiter, R. (1978). On closed world data bases. In H. Gallaire & J. Minker (Eds.), Logic and Data Bases (pp. 55--76). Plenum Press.
- Ruch, P., et al. (2006). Using SNOMED CT body structure hierarchy for concept-based information retrieval. Proceedings of AMIA Annual Symposium, 674--678.
- Searle, T., et al. (2024). MedCAT -- Medical concept annotation toolkit. Artificial Intelligence in Medicine, 149, 102779. https://doi.org/10.1016/j.artmed.2024.102779
- SNOMED International. (2024). SNOMED CT Starter Guide. https://www.snomed.org/
- Soman, K., et al. (2024). OntologyRAG: Ontology-enhanced retrieval-augmented generation. arXiv preprint, arXiv:2412.09050.
- Uschold, M., & Gruninger, M. (1996). Ontologies: Principles, methods and applications. Knowledge Engineering Review, 11(2), 93--136. https://doi.org/10.1017/S0269888900007797
- Yuan, Z., et al. (2022). CODER: Knowledge-infused cross-lingual medical term embeddings. Findings of ACL 2022, 3924--3935. https://doi.org/10.18653/v1/2022.findings-acl.312