Next-Generation Platform Architecture
Design aim: the system should be able to start from a crawl of the hospital website and a review step by the hospital.
Executive Summary
The project builds a healthcare navigation platform, of which the chatbot is the entry point. This document describes the intended evolution from a single-hospital knowledge graph to a multi-hospital, multi-language, multi-channel platform. It is a vision document: only the single-hospital pilot built for ZOL exists today, and the author intends to develop the platform further.
The core idea is a three-phase taxonomy extraction pipeline: the system crawls a hospital website, identifies structural pages, extracts a proposed taxonomy with large language models backed by SNOMED-CT medical terminology, and presents it for human approval. The aim is to avoid custom code per hospital and manual relationship mapping.
The problem addressed
Before: The Knowledge Graph Trap
Traditional healthcare knowledge graph systems, including the project's own first architecture, follow an extract-validate-fix loop:
Crawl website → LLM extracts entities → Store in graph database →
Quality audit reveals errors → Developer adds blocklists/rules →
New edge cases appear → Repeat
This approach has well-documented limitations in the literature. Healthcare knowledge graph construction remains "one of the most challenging tasks in healthcare informatics" due to the inherent ambiguity of medical text and the complexity of clinical relationships (Shi et al., 2023). The project's own experience pointed the same way: nine iteration rounds and a large amount of hospital-specific code still left quality-gate bypasses, canonical-name collisions and implausible department-condition assignments.
The root cause is architectural, not technical: extraction from unstructured text is inherently noisy, and no amount of post-hoc filtering makes it clean.
After: Proposed-and-Approved
The new architecture inverts the paradigm:
Crawl website → Classify pages → Extract proposed taxonomy →
Human operator reviews and approves →
Approved structure becomes the navigational backbone
Every relationship that drives patient navigation has been seen and approved by a human. The system proposes; the operator decides. This is intended to remove the class of quality issues that affected the extraction-validation approach.
Architecture Overview
The Three-Phase Pipeline
Phase 1: Crawl & Classify
The system crawls any hospital website and uses an LLM to classify each page as either a hub page (a structured directory listing multiple medical entities) or a detail page (everything else). Pages identified as hub pages are proposed as hub page candidates for operator confirmation.
The classification is designed to be hospital-agnostic, working on different page layouts and languages without custom HTML parsers. This has been exercised on one hospital only.
Phase 2: Extract & Propose
A generic LLM-powered extractor processes confirmed hub pages, producing structured entities (departments, doctors, conditions, treatments, examinations) and relationships (department handles condition, department offers treatment, doctor works in department).
Each extracted item receives:
- A confidence score from the LLM
- Provenance (source URL and extraction timestamp)
- A SNOMED-CT code mapped via three-tier matching (exact, fuzzy, LLM-assisted)
- Plausibility validation against the SNOMED hierarchy
Large language models are used for extraction; this is a cost per crawl cycle, and extraction quality is the foundation of the taxonomy.
Phase 3: Curate & Approve
A purpose-built curation interface presents the proposed taxonomy for human review. High-confidence items (>= 0.85) can be bulk-approved. Lower-confidence items are flagged for individual review, with plausibility warnings when SNOMED hierarchy analysis suggests a mismatch.
The operator can approve, reject, correct, merge duplicates, or add missing relationships. Once approved, records become the live navigational backbone that powers all search and routing.
Technical Foundation
Unified PostgreSQL Architecture
A key architectural decision is the elimination of Neo4j in favor of PostgreSQL as the single data store for vectors, structured taxonomy, content, and authentication. This is grounded in the observation that hospital navigation requires shallow traversals (2-4 hops) that are optimally served by relational JOINs, not graph database engines designed for deep traversals on millions of nodes.
This aligns with emerging best practices in healthcare data architecture. The World Economic Forum's 2026 analysis of healthcare data architectures emphasizes that flexibility and interoperability matter more than any specific database paradigm (WEF, 2026). By consolidating into PostgreSQL with pgvector, we achieve:
- Single database operations — backup, monitoring, versioning in one place
- Combined vector + structural queries — no cross-database round trips
- ACID transactions on taxonomy updates
- Standard SQL tooling — every developer knows SQL; Cypher is niche
- Multi-hospital separation through a hospital identifier on the data
The "patient journey" query (condition -> department -> campus -> doctors) is a handful of SQL joins, expected to be fast at hospital-scale data volumes (hundreds of departments, doctors and conditions).
SNOMED-CT: The Medical Lingua Franca
SNOMED Clinical Terms (SNOMED-CT) is the world's most comprehensive clinical terminology system, with over 350,000 concepts and official translations in Dutch, French, German, English, and 10+ additional languages (SNOMED International, 2026).
Our integration uses SNOMED-CT for three purposes:
-
Term Resolution: Hospital-specific terms ("hartkloppingen") map to stable concept codes, enabling canonical deduplication and synonym handling without manual alias maps.
-
Cross-Language Portability: A Dutch hospital's "hartfalen" and a French hospital's "insuffisance cardiaque" map to the same SNOMED code. Department routing logic written once works across all languages.
-
Plausibility Checking: SNOMED's IS_A hierarchy groups conditions under clinical domains. A universal mapping table (~50-100 rows) from SNOMED top-level categories to department domain groups is intended to replace large amounts of hardcoded plausibility guards.
This approach is consistent with the literature on SNOMED-CT implementation. Mills (2013) and subsequent systematic reviews demonstrate that SNOMED-CT integration is most effective when it is "not simply viewed as a bolt-on but fully integrated into the semantic understanding of clinical terms" (JMIR Medical Informatics, 2023). The three-tier matching strategy (exact match -> trigram fuzzy match -> LLM-assisted mapping) aims for high coverage while maintaining deterministic behavior for the majority of terms.
Three-Tier Term Matching
Multi-Channel Delivery
The taxonomy and RAG pipeline produces a structured response object that is channel-agnostic. Each delivery channel renders it according to its constraints:
| Channel | Response Style | Design latency target | Key Constraint |
|---|---|---|---|
| Web Chatbot | Full markdown, links, expandable sections | < 3 seconds | Rich formatting available |
| Short text, action buttons | < 2 seconds | Character limits, button constraints | |
| Voice/Phone | Concise spoken response, transfer offers | < 1.5 seconds | No visual aids, must be spoken naturally |
The unified PostgreSQL architecture directly enables the voice channel's latency requirements: combined vector + taxonomy queries execute in a single database round trip, removing the cross-database overhead of the earlier Neo4j-based architecture (Neo4j has since been removed).
Compliance by Design
EU AI Act (Regulation 2024/1689)
The system's classification under the EU AI Act depends on its intended purpose:
| Use Case | Risk Classification | Key Obligations |
|---|---|---|
| Navigational search ("find the right department") | Limited risk | Transparency: disclose AI usage |
| Pre-triage routing ("you should contact Cardiology") | Potentially high-risk | If influencing clinical decisions: MDR + AI Act dual compliance |
| Medical advice | Designed to be refused | The system is designed to refuse medical-advice questions (see the Safety overview) |
The architecture is designed with high-risk requirements in mind from the start, even while operating as limited risk. This is a design intention, not a claim of legal compliance:
- Human oversight: Every navigational relationship is operator-approved
- Audit trails: proposal and response-explanation records are intended to give decision lineage
- Explainability: Each response can trace which taxonomy relationships and content chunks contributed
- Data quality: SNOMED-CT codes provide standardized, verifiable medical concept references
This forward-looking compliance posture is informed by MDCG 2025-6, which establishes that AI systems classified as medical devices under MDR face dual compliance requirements from August 2026 (European Commission, 2025).
GDPR (Regulation 2016/679)
| Requirement | Implementation |
|---|---|
| Data minimization | The design aims to avoid collecting patient health data; see the DPIA for what is stored |
| EU data residency | See the DPIA for hosting and sub-processors |
| Right to erasure | Retention policy and an administrative deletion function (see data retention) |
| Transparency | AI disclosure shown to users |
| DPO requirement | Required when processing health-adjacent data at scale |
| Data Processing Agreements | Required with all LLM providers |
Future: HL7 FHIR Readiness
By storing SNOMED-CT codes from day one, the system is pre-positioned for hospital backend integration via HL7 FHIR — the European standard for healthcare data interoperability (HL7 Europe, 2026). SNOMED concepts map directly to FHIR resources:
- Condition: FHIR Condition
- Department: FHIR Organization
- Doctor: FHIR Practitioner
- Appointment: FHIR Schedule and Slot
Intended strengths and open questions
Curated data as the lasting asset
Each hospital's curated taxonomy is operator-reviewed, SNOMED-mapped and confidence-scored. The design reasoning is that this curated data is more durable than the code. Whether plausibility patterns learned at one hospital help the next has not been tested. See Strategic Rationale.
Compliance as a design property
Audit trails, human oversight, explainability and standardised medical terminology are built in as structural features rather than added later.
Configuration-based onboarding (intended)
The intended onboarding flow for a new hospital: provide the website address, let the system crawl and classify it, have hospital staff review and approve the proposed taxonomy, then go live. The aim is to avoid a custom integration project per hospital. This flow has not yet been run for a second hospital, and no return-on-investment figure has been measured.
Platform Vision
Phase 1 (current): Intelligent search replacing keyword search. Crawl, extract, curate, serve.
Phase 2 (intended): Multi-channel delivery with measurement of how many queries are resolved without a phone call.
Phase 3 (intended): Hospital back-end integration via FHIR, doctor-facing tools and schedule management.
References
- European Commission (2025). MDCG 2025-6: Guidance on AI systems used as or within medical devices. Medical Device Coordination Group.
- HL7 Europe (2026). Standards & Communities — HL7 FHIR Implementation Guides for European Healthcare. https://hl7europe.org/standards/
- JMIR Medical Informatics (2023). "Systematized Nomenclature of Medicine-Clinical Terminology (SNOMED CT) Clinical Use Cases in the Context of Electronic Health Record Systems: Systematic Literature Review." JMIR Med Inform, 11, e43750.
- Mills, S. (2013). "Implementation of SNOMED CT in an online clinical database." Pacific Symposium on Biocomputing.
- Shi, Y., et al. (2023). "Healthcare knowledge graph construction: A systematic review of the state-of-the-art, open issues, and opportunities." Journal of Biomedical Informatics, 141, 104361. PMC10225120.
- SNOMED International (2026). Practical Guides: Vendor Introduction to SNOMED CT — Choosing an Approach to Implementation. https://docs.snomed.org/
- World Economic Forum (2026). "Why we need to transform our healthcare data architecture." https://www.weforum.org/stories/2026/01/ai-healthcare-data-architecture/
- European Parliament (2024). Regulation (EU) 2024/1689 — The Artificial Intelligence Act. Official Journal of the European Union.