Policlinico San Donato AritmoLab · Policlinico San Donato

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.

AritmoLab A clinical data platform hosting cardiology data and analysis tools
Dr. Marco Pancotti - MultiPhysixLab Dr. 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

Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202601 / 13
AritmoLab · Policlinico San Donato

Where we started - Four islands and four missing pieces

?Clinical Intelligencedashboards on the clinical history of the Unit and its patients
?Datawarehousethe single source of truth
?ML-ready datacohort tables, ready for model training
?Professional PortalAritmoLab — the grown-up Omics Portal
Missing Pieces

▸ click a system: how it was used — and what held it back · click a missing piece: what it would have given

Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202602 / 13
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 code Airflow · orchestration Superset · dashboards Django · portal scaffolding Authentik · auth — GSD LDAP
Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202603 / 13
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
Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202604 / 13
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.
Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202605 / 13
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: familiare
pathology: AF · attribution: family

“fibrillazione atriale esclusa”
“atrial fibrillation ruled out”
  → patologia: FA · negato
pathology: AF · negated

“test provocativo con flecainide
  positivo per pattern Brugada”
“flecainide provocation test, positive for Brugada pattern”
  → test: flecainide · esito: POSITIVO
test: flecainide · outcome: POSITIVE
Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202606 / 13
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
Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202607 / 13
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.
Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202608 / 13
AritmoLab · Policlinico San Donato
The portal, today

AritmoLab — a quick tour

Select a screen to enlarge · Follow the tour from 1 to 7

Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202609 / 13
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.
Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202610 / 13
AritmoLab · Policlinico San Donato
ThothII, step by step

From question to datamart — the app

Select a screen to enlarge · Follow the tour from 1 to 12

Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202611 / 13
AritmoLab · Policlinico San Donato
From datamart to discovery

One datamart — many questions answered

Multivariate analysis[SVG chart — next step]
Machine learning[SVG chart — next step]

[Illustrative data, modeled on published arrhythmology predictors — Brugada focus]

Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202612 / 13
AritmoLab · Policlinico San Donato
Questions?

Thank you

Want the deep dives? The technical walkthroughs of the text miner, the mapping agents and ThothII are coming as videos on our Substack.

Dr. Marco Pancotti - MultiPhysixLab Dr. Sara Paratico - I.R.C.C.S. Policlinico San Donato
Role of AI in the Analysis of Unstructured Clinical DatabasesDr. Marco Pancotti - MultiPhysixLabDr. Sara Paratico - Gruppo San DonatoSan Donato Milanese, Milan, Italy · 2–3 October 202613 / 13