Role of AI in the Analysis of Unstructured Clinical Databases
How we turned a mix of structured and free-text clinical records into a research data platform — the AritmoLab platform experience.
AritmoLabA clinical data platform hosting cardiology data and analysis tools
Dr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - I.R.C.C.S. Policlinico San Donato
“Multidimensional Characterization of Cardiac Arrhythmias: Role of Electrocardiology in the Artificial Intelligence Era”
San Donato Milanese, Milan, Italy · 2–3 October 2026
AritmoLab · Policlinico San Donato
The plan
What we wanted to build
One platform, two destinations: the 360° patient portal and a research-ready warehouse. Built on open-source pillars, with AI coding agents wherever they helped. Next, we’ll look at the hardest part: unstructured data.
→
What we built
→
AI reads the clinical text: pathologies, procedures, drug-challenge outcomes
→
→
AI builds them on demand from plain-English questions (ThothII)
→
AritmoLab Data Warehousequeried for research
AritmoLab Portalmanagement & exploration
AI coding agents — Anthropic · OpenAI — used wherever they helped, 360° in the codeAirflow · orchestrationSuperset · dashboardsDjango · portal scaffoldingAuthentik · auth — GSD LDAP
AritmoLab · Policlinico San Donato
From free text to a research platform
The clinical truth lives in unstructured columns
“Il paziente riferisce sincope ricorrente; ECG basale con sopraslivellamento ST in V1–V3; test provocativo con flecainide positivo per pattern Brugada.”
EN“The patient reports recurrent syncope; baseline ECG with ST-segment elevation in V1–V3; flecainide provocation test positive for a Brugada pattern.”
SourcesCardioref · Genetic data Omics Portal · ECG
→
Stagingraw replica
→
Integration3NF · text mining
→
Data Warehousestar schema
→
Martsdbt · Superset
four challenges to face · the answers come next
01
Volume without structuretwenty years of records locked in free-text columns
02
Ambiguous languagenegation · family history · bilingual shorthand
03
No shared ontologyevery system names conditions its own way
04
Proving reliabilityextraction must be demonstrably correct
outputs of the datamarts
Dashboardsclinical review on Superset
Machine Learningcohort tables for model training
Predictive Statisticsoutcomes & risk analysis
ThothII — natural-language → SQL over the DWH, builds the final datamarts
AritmoLab · Policlinico San Donato
What the text mining produced
Deterministic AI, audited numbers
58,438letters read
73,389pathologies extracted
10,908tests parsed
2,307Brugada patients
≈ 240letters / month
Letter readerevery discharge letter, Italian & English
Clinical matcherrecognises diagnoses, procedures, test outcomes
Context guardnegations & family history kept apart
Ontology sorterevery finding into its clinical category
Traceable. Every finding carries the version of the rules that produced it (pattern_version): any number can be rebuilt years later.
Audited. A new rule set goes live only after it proves ≥95% accuracy on 100 records reviewed by hand.
AritmoLab · Policlinico San Donato
Clinical NLP
Reading clinical text is not keyword matching
Negation — “fibrillazione atriale esclusa”, “non FA” (“AF ruled out”, “no AF”): the rule scans a window around every match before deciding
Family ≠ patient — “padre con FA” (“father with AF”) is attributed to the family member, not to the patient
Two languages — every pattern matches IT and EN forms: fibrillazione atriale / atrial fibrillation
Abbreviations & noise — FA, f.a., “TA 140/90” (blood pressure, not a diagnosis)
One field, many statements — the text is split into clauses before matching
what the rules seeexamples from the corpus
“padre con fibrillazione atriale”
“father with atrial fibrillation”
→ patologia: FA · attribuzione: familiarepathology: AF · attribution: family
“fibrillazione atriale esclusa”
“atrial fibrillation ruled out”
→ patologia: FA · negatopathology: AF · negated
“test provocativo con flecainide
positivo per pattern Brugada”
“flecainide provocation test, positive for Brugada pattern”
→ test: flecainide · esito: POSITIVOtest: flecainide · outcome: POSITIVE
AritmoLab · Policlinico San Donato
The clinical ontology
Two tiers, one clinical order
TIER 1 · arrhythmic11
AFFABrugadaFlutterATTAAVNRTTRNPSVTWPW / TPSVVTTVVFFVVentricular ectopyExtrasistolia V.SyncopeSincopeLong QTQT lungo
TIER 2 · structural5
AV blockBlocco AVBundle branch blockBlocco di brancaCardiomyopathyCardiomiopatiaHeart failureScompensoValvular diseaseValvulopatia
01
Order encodes clinical precedence— “Brugada” is matched before “TV”, so “substrato per TV” (“substrate for VT”) can't mask a Brugada pattern
02
Synonyms live inline— FA / f.a. / fib. atriale / atrial fibrillation → one canonical label
03
Versioned like software— semver for the pattern library, pattern_version on every extracted row
The output: text becomes recorded data
01
Quantitative data on the recordsevery procedure and implant the text analysis reads is written back as structured, quantitative values on the record that describes it
02
Straight into the DWH flowthese records enter the data-warehouse generation like any other source
03
As if typed at the visitthe data lands exactly as if clinicians had keyed it in themselves during the visits
AritmoLab · Policlinico San Donato
Validation
Trusting the text is a process, not a promise
Quality gateManual comparison checks procedure accuracy. Pathology coverage and clinical correctness are assessed separately.
AritmoLab · Policlinico San Donato
The portal, today
AritmoLab — a quick tour
Select a screen to enlarge · Follow the tour from 1 to 4
AritmoLab · Policlinico San Donato
All good? Not yet.
The warehouse speaks SQL. Research needs more.
The gapTwenty years of data, one warehouse — and no fast road from a research question to an answer.
AritmoLab · Policlinico San Donato
Human in the Loop · Eight phases, six screens
From clinical question to datamart, with human review
AI proposes. People review, correct and approve. · Select a screen to enlarge
AritmoLab · Policlinico San Donato
Questions?
Thank you
We are available to explore AI in data reorganization and clinical text analysis, and datamart generation from natural-language requests with ThothII. Meet us during the conference or arrange a remote session.