
Hospital records alone may predict who returns within 30 days, without reading clinical notes
Hospitals keep detailed records of diagnoses, procedures, lab tests and medicines for every admission. Those structured entries are usually treated as dry administrative data, while the richer story lives in doctors' notes. But predicting whether a patient will come back within a month may not require reading any prose at all. Turning routine hospital codes into named medical concepts makes it possible to estimate readmission risk from the record itself.
Quick takeaways
Turning hospital codes into named medical concepts
Hospital records store many short codes that mean little to anyone who has not learned the coding system. A diagnosis code may name a disease, while a procedure code may point to an operation. Lab results and drug names add more layers, but each layer uses its own vocabulary. The method replaces these raw codes with named medical concepts that a clinician can recognize. It does this by consulting four external knowledge sources, each built to organize one kind of record. For diseases, it uses a concept map that links specific diagnoses to broader and narrower categories. A code for pneumonia can sit under respiratory disease, while also pointing to a more precise condition. For procedures, it groups many operation codes into clinically meaningful families. A knee replacement and a related joint procedure can share the same group without losing their difference. For drugs, it strips brand names and formulations down to active ingredients. Two tablets with different labels can be treated as the same medicine if they contain the same ingredient. For laboratory tests, it assigns each test to an organ system or body process. A kidney function panel and a liver enzyme panel then become separate named signals. The result is a patient profile made of explicit names, not hidden numbers inside an opaque vector. Each feature in the model can be traced to one clinical item, such as a disease category or drug ingredient. This makes the representation easier to inspect, because every nonzero entry has a medical label attached. The profile is also sparse, since most patients do not have every possible diagnosis, procedure, lab abnormality, or drug. The structured feature set contains 23,430 named dimensions, and 99.78% of the entries are empty. By contrast, a transformer based alternative stores dense vectors with 2,481 dimensions. The named concept set uses about 24 times less storage for the full cohort. It takes roughly 176 MB, while the dense alternative needs about 4.2 GB. That difference matters when a hospital wants to keep many patient records in a working model. It also means the method does not need free text clinical notes, which are often harder to obtain and audit. The named concepts come from resources such as MONDO, Orphanet, and RxNorm. These resources provide shared medical language, so the same code can be understood across different hospital systems. The approach keeps the model close to clinical meaning, because each feature still names a real item. A doctor or data analyst can ask what a feature means and receive a direct answer. That clarity is the main point of turning codes into named medical concepts.
The admission data behind the prediction task
A de-identified single-center hospital record system supplies the admissions. It covers years from 2008 to 2019. After removing patients under 18 and deaths during admission, the cohort holds 422,622 admissions. Those admissions belong to 176,901 distinct people across the database. The group is about half female and averages 56.6 years of age.
Each admission carries structured fields such as diagnoses, procedures, lab tests, and medications. For every discharge, the task asks whether the same person returns within 30 calendar days. A return inside that window makes the case positive. No return within thirty days makes it negative. Across the full cohort, about one in five admissions is positive, at a rate of 20.1 percent.
The base rate sets a low bar for any model that simply guesses no return. To keep evaluation honest, splits are made at patient level, so no person appears in more than one set. The training set holds 253,254 admissions, the validation set 84,328, and the test set 85,040. This layout prevents a person’s later history from leaking into earlier training.
The structured fields include 25,809 diagnosis codes, 12,575 procedure codes, and 9,610 prescription drug names. That variety gives the model many different clinical signals to weigh. The data are de-identified, so no patient name is part of the task. They come from one center, so the patterns reflect one hospital’s experience.
How well the structured records perform on return admissions
The structured records reach a strong level of prediction for return admissions within thirty days after discharge. The best configuration scores an AUROC of 0.743 under repeated cross-validation across the data. That score means the model ranks true readmissions above nonreadmissions well beyond chance. On the fixed test set, LightGBM reaches an AUROC of 0.7412 and balanced accuracy of 0.6739. Balanced accuracy averages correct calls for patients who return and those who do not. The imbalance is important, since only about one in five admissions leads to a return visit. A model that always says no would score high on plain accuracy but miss most returns. The structured features therefore capture enough clinical signal to separate the two groups. They do so without reading free-text notes or building dense patient embeddings. The result is close to methods that use clinical text, while using far less storage and computation. For the full cohort, the named-concept representation needs about 176 MB instead of 4.2 GB. That gap makes repeated evaluation and deployment much easier in a hospital setting. Gradient tree models gain the most from these structured features. LightGBM improves by about 0.028 AUROC over the transformer-based feature set. The improvement is statistically clear, with a narrow confidence interval around it. Combining both feature types does not consistently raise performance beyond either single source.
What drives the predictions and where they hold up
The strongest signal in the model came from basic patient information, not from the newest medical concepts. Age and sex carried most of the predictive weight, accounting for 48.5 percent of the gain in the best tree model. When those values were shuffled, performance fell by 0.1117 AUROC, a much larger drop than any single clinical feature produced. A model trained on demographics alone still reached an AUROC of 0.6985, which is close to earlier structured-only baselines.
The named medical concepts added real value, but the gain was modest. Above the demographic baseline, those named concepts contributed roughly four AUROC points. Organ-system lab abnormalities, drug ingredients, unmapped diagnosis codes, and direct disease categories each made a small difference. Deeper levels of the disease hierarchy did not help; grandparent and great-grandparent categories added essentially no discriminative power.
The size of the benefit depended strongly on the type of classifier used. Gradient-boosted trees made the most use of the named concepts, with LightGBM improving by about 0.028 AUROC over a transformer-based feature set. That margin was statistically reliable, with a confidence interval from +0.026 to +0.031 and p below 0.001. XGBoost also favored the ontology-enriched feature set, though its advantage was less central to the overall story. Neural networks and random forests did not follow the same pattern as clearly.
Across broad patient groups, the predictions held up reasonably well. Discrimination stayed stable by sex, insurance type, and race, with AUROC values ranging from 0.727 for White patients to 0.779 for those coded as Other or Unknown. No group fell near chance performance, and racial-minority or Medicaid groups did not show a clear disadvantage at the AUROC level.
A transparent path through hospital data
The strongest signal is not a large prediction gain, but that the model stayed close to note-based methods while using only structured records. That difference changes what hospitals can do with existing systems. A model built from named diseases, procedure groups, lab abnormalities, and drug ingredients takes far less storage than dense learned embeddings. That makes it easier to run, inspect, and move across departments.
The broader lesson is that medical knowledge can act as a bridge between raw codes and useful prediction. Instead of letting an algorithm compress diagnoses into opaque numbers, the method keeps each feature tied to something a clinician could recognize. That transparency helps with debugging, audit, and trust, because a risk score can be traced back to concrete clinical items rather than hidden vector directions.
The limits matter because demographics carried much of the predictive weight, and the remaining gain from disease categories, labs, drugs, and unmapped codes was modest. One hospital’s data cannot prove that the same balance will hold elsewhere, and an average score can hide differences in who benefits most. The opportunity is a cheaper, explainable tool for spotting patients at risk before they return to the emergency department. The obstacle is turning that signal into fair action across many health systems. Can a model that names its reasons become more trustworthy than one that hides them?
You may also like
Health and medicine · Brain and mind
Stress leaves a clear mark in your breathing, but amusement does not
Technology and computing
Cars can be tracked through surveillance cameras nobody gave access to
Health and medicine · Brain and mind
Can a routine prescription become a clue to possible Alzheimer's protection?
Technology and computing · Genetics and biotechnology · Life sciences



