Problem
A regional registry of patients after acute coronary syndrome (ACS) was filled by hand from discharge summaries, 3–6 pages of unstructured text each. This took several hours of qualified staff time every week. About 70% of patients do not return for a repeat visit, so follow-up depended on manual tracking. The documents contain personal data (PD), which must be removed before machine processing and analysis.
Example from the article: more than 13 thousand discharge summaries from vascular centers of the Tula Region for 2021–2025 had to become a registry with more than 90 fields.
Solution in brief
Documents are converted to Markdown and processed by an LLM with a user-defined schema. The LLM extracts PD fields as structured output. Per-field strategies (delete, generalize, add deterministic noise) then de-identify the text, and a hash creates a stable person ID. Clinical fields are extracted only from the cleaned text. Quality is checked in stages, ending with a manual review of a 10% sample.
Questions this case answers
- How to turn unstructured documents into a structured dataset with an LLM when personal data must be removed first and per-person records must stay linkable
- How to validate a sensitive-data redaction pipeline when any single miss is unacceptable and probabilistic metrics are not enough
- How to extract structured fields from thousands of free-text clinical documents that contain personal data which must be removed before analysis?
- How to de-identify documents so that records of one person can still be linked and dates keep their order?
Tools and methods
- Structured outputs — the LLM returns exactly the given JSON schema.
- De-identification strategies — JSON and Python files: delete, generalize, add noise.
- Hash identifiers (UID) — link documents of one person after de-identification.
- YandexGPT Lite and Alice AI LLM — the models used, via Yandex AI Studio.
Google or a one-time email code. No password.