# Modele bazowe na danych z dokumentacji pacjenta

EN: **Foundation models for electronic health records** · id `ehrfoundation` · aliases: EHR foundation models, FEMR, clinical foundation models, structured EHR pretraining, modele bazowe EHR

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [AI w medycynie i ochronie zdrowia](https://aiatlasgraph.com/t/healthai.md) › [Prognozowanie ryzyka z dokumentacji pacjenta](https://aiatlasgraph.com/t/clinicalprediction.md) › Modele bazowe na danych z dokumentacji pacjenta

## Description

- PL: Modele pretrenowane na sekwencjach ustrukturyzowanych zdarzeń z EHR (kody, leki, wyniki badań), zwracające reprezentacje pacjenta do wielu zadań predykcyjnych.
- EN: Models pretrained on sequences of structured EHR events (codes, medications, lab results) that produce patient representations for many prediction tasks.

## In one sentence

- PL: Duże modele, które uczą się na historiach chorób milionów pacjentów i potem pomagają przewidywać wiele różnych zdarzeń.
- EN: Large models that learn from the medical histories of millions of patients and then help predict many different events.

## Problem it solves

- PL: Szpital buduje osobny model dla każdego ryzyka, każdy wymaga własnych danych i pracy, więc większości nigdy nie powstaje.
- EN: Hospitals build a separate model for every risk, each needing its own data and work, so most never get built.

## What it does

- PL: Najpierw uczy się typowego przebiegu historii choroby, jak czytelnik tysięcy biografii, a potem szybko uczy się nowych pytań z kilku przykładów.
- EN: First learns how medical histories usually unfold, like a reader of thousands of biographies, then picks up new questions from few examples.

## Everyday example

- PL: Szpital chce przewidywać ponowne przyjęcia po operacji i zamiast nowego projektu dostraja istniejący model w kilka dni.
- EN: A hospital wants to predict readmissions after surgery and, instead of a new project, adapts an existing model in a few days.

## This concerns you if you…

- PL: budujesz modele ryzyka na danych szpitalnych
- PL: masz mało oznaczonych przypadków dla nowego pytania
- EN: build risk models on hospital data
- EN: have few labelled cases for a new question

## Keywords

CLMBR · MOTOR · BEHRT · Med-BERT · EHRSHOT · OMOP CDM · FEMR · next-event prediction

## How it works

- PL: Historię pacjenta zapisuje się jako ciąg tokenów zdarzeń z czasem, a transformer uczy się przewidywać kolejne zdarzenia lub czas do nich. Uzyskane osadzenia pacjenta zasilają proste klasyfikatory dla konkretnych wyników (np. ponowne przyjęcie, długi pobyt), często z mniejszą liczbą etykiet niż modele od zera.
- EN: A patient history is written as a sequence of timed event tokens, and a transformer learns to predict next events or time to them. The resulting patient embeddings feed simple classifiers for specific outcomes (e.g. readmission, long stay), often needing fewer labels than models trained from scratch.

## Limits

- PL: Przegląd kilkudziesięciu modeli wykazał, że ocenia się je głównie na wąskich zbiorach i metrykach dokładności, a koszty wdrożenia i użyteczność kliniczna pozostają słabo zbadane. Kody rozliczeń odzwierciedlają praktykę szpitala, nie tylko stan pacjenta, a dane rzadko można udostępniać.
- EN: A review of dozens of models found they are mostly evaluated on narrow datasets with accuracy metrics, while deployment cost and clinical usefulness remain understudied. Billing codes reflect hospital practice, not just patient state, and data rarely can be shared.

## Key terms

- PL: **EHR**: Elektroniczna dokumentacja medyczna: rozpoznania, leki, wyniki, wizyty.
- PL: **reprezentacja pacjenta**: Wektor liczb streszczający historię choroby jednej osoby.
- PL: **standard OMOP**: Wspólny format zapisu danych medycznych z różnych szpitali.
- EN: **EHR**: Electronic health record: diagnoses, medications, results, visits.
- EN: **patient representation**: Vector of numbers summarising one person's medical history.
- EN: **OMOP standard**: Common format for medical data from different hospitals.

## Know first

- [Trening od zera / pretraining (Training from scratch and pretraining)](https://aiatlasgraph.com/t/pretraining.md)
- [Transformery i attention (Transformers and attention)](https://aiatlasgraph.com/t/transformers.md)

## Related topics

Untyped, symmetric "see also" links.

- [Modele bazowe dla danych tabelarycznych (Tabular foundation models)](https://aiatlasgraph.com/t/tabularfm.md)

## Sources

- [The shaky foundations of large language models and foundation models for electronic health records](<https://www.nature.com/articles/s41746-023-00879-8>) `shaky-foundations-ehr-2023` · by Michael Wornow, Yizhe Xu, Rahul Thapa i in.

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/ehrfoundation · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
