Sample dataset · CC0

A year of hospital stays, winter included.

One row per inpatient stay at an invented hospital in 2025: department, diagnosis, admission type, age, insurer, charges, how the patient left and whether they came back within 30 days. There are no names and no patient ids. Nothing in it describes a real person.

12 columns · 100 or 1,000 rows as a file · up to 1,000,000 rows generated here · CSV, JSON, JSONL, Excel, Parquet

Download the hospital admissions data

The 1,000-row file is the one for a dashboard: 101 admissions in January against 74 in June, nine departments with enough stays each to compare, and 105 readmissions to study. The 100-row file is about two admissions a week. That is enough to test a formula and thin for anything else.

A bigger hospital

A mid-sized hospital admits something like 20,000 to 30,000 inpatients a year, so the 10,000 and 100,000 row sizes are a realistic year for one building. A million rows is a regional health system, and a fair test of whether your tool can count overlapping date ranges at scale.

The first eight rows

The first eight rows of the 1,000-row file, all admitted in the first three days of January. Two of them are Pediatrics, which fills up in winter, and length_of_stay is always the gap between the two dates.

admission_idadmit_datedischarge_datelength_of_staydepartmentadmission_typediagnosisageinsurancetotal_chargesdischarge_statusreadmitted_30d
ADM-0000012025-01-012025-01-054ObstetricsEmergencyVaginal delivery40Private14668.25Hometrue
ADM-0000022025-01-012025-01-032General SurgeryEmergencyAppendicitis73Medicare17843.97Home with carefalse
ADM-0000032025-01-012025-01-054OncologyElectiveChemotherapy complications60Medicaid26498.09Homefalse
ADM-0000042025-01-022025-01-064OrthopedicsUrgentHip fracture60Private20992.47Homefalse
ADM-0000052025-01-022025-01-031PediatricsEmergencyBronchiolitis4Private6668.95Homefalse
ADM-0000062025-01-022025-01-075OncologyElectiveNeutropenic fever75Medicare29153.73Homefalse
ADM-0000072025-01-022025-01-075NeurologyElectiveSeizure79Medicare23290.00Homefalse
ADM-0000082025-01-032025-01-074PediatricsEmergencyGastroenteritis8Private12863.93Hometrue

Twelve columns, and what each one holds

Column Type What it holds Example
admission_id text ADM-000001 upward, in admission order. One row per stay; there are no patient names or ids. ADM-000001
admit_date date Day the patient was admitted, 2025-01-01 to 2025-12-31, ascending through the file. 2025-01-01
discharge_date date Day the patient left, alive or not. Always after admit_date. 2025-01-05
length_of_stay integer Nights in hospital: discharge_date minus admit_date, exactly, on every row. 4
department text One of nine departments. Pediatrics, Pulmonology and General Medicine fill up in winter. Obstetrics
admission_type text Emergency, Urgent or Elective. Elective admissions are rare at weekends. Emergency
diagnosis text Primary diagnosis in plain words, always one that belongs to the department. Vaginal delivery
age integer Age in years at admission. 0 to 17 in Pediatrics, 18 to 44 in Obstetrics. 40
insurance text Private, Medicare, Medicaid or Self-pay. Almost everyone 65 and over is on Medicare. Private
total_charges decimal Billed charges in USD: a department base plus a nightly rate times length_of_stay. 14668.25
discharge_status text Home, Home with care, Rehab facility, Transferred or Died. Home
readmitted_30d boolean true when the patient came back within 30 days of discharge. Never true when discharge_status is Died. true

Practice questions to try

  1. Which month has the most admissions, and which departments grow most in winter? In the 1,000-row file: January, with 101. Pediatrics and Pulmonology together go from 8 admissions in July to 25 in January.
  2. What is the average length of stay by department, and why might the median be the better number to report? Oncology is longest at 6.7 nights. Across the hospital the mean is 4.17 nights but the median is 3, because a few long stays pull the mean up.
  3. What is the 30-day readmission rate for heart failure, for COPD and for everything else? 24.4% (11 of 45), 19.1% (9 of 47) and 9.4% (85 of 908).
  4. How do elective admissions differ between weekdays and weekends? 192 of 767 weekday admissions are elective (25.0%); at weekends it is 6 of 233 (2.6%).
  5. How many patients were in the hospital on 15 January 2025? 17: every stay admitted on or before that day and discharged after it. On 15 July it was 11.
  6. Do older patients stay longer? Patients under 65 average 3.09 nights; patients 80 and over average 5.58.
  7. Which insurer is billed the most in total? Medicare, about $10.4 million of the $18.7 million billed. 460 of the 540 patients aged 65 or over are on it.

The occupancy question is the hard one. It needs a calendar of dates joined to the stays, or a running total of admissions minus discharges, and it is the question hospital analysts are asked most. Most of the rest you can answer from the dashboard view in a few clicks.

What one row is

A row is a stay, not a patient. Admissions run from 1 January to 31 December 2025, ascending through the file, and a patient admitted late in December goes home in January 2026: 16 rows in the 1,000-row file end in the new year. length_of_stay is the number of nights, exactly discharge_date minus admit_date, and it is never zero, because a stay with no night in it would be an outpatient visit.

The columns agree with one another. A diagnosis always belongs to its department, so there is no heart attack in Obstetrics. Pediatrics patients are 0 to 17 years old and mostly very young; Obstetrics patients are 18 to 44. Nearly everyone 65 and over is on Medicare. Charges are a department base plus a nightly rate times the length of stay, so a long stay in Oncology costs what you would expect.

discharge_status says how the patient left: home, home with care, to a rehab facility, transferred to another hospital, or died. A patient who died is never marked as readmitted. Older orthopedic patients and stroke patients are the ones most often sent to rehab.

The patterns in it

Winter is busy. January has 101 admissions and June 74, and the extra load is not spread evenly: respiratory illness drives it, so Pediatrics and Pulmonology together more than triple between July and January, while Obstetrics and General Surgery do not rise at all. Pneumonia is the most common diagnosis in January.

Weekends are quiet in a particular way. Fewer people are admitted on Saturday and Sunday (118 and 115, against about 150 on each weekday), and almost none of them are elective, because planned surgery is booked Monday to Friday. Emergencies do not keep office hours, which is why the weekend share of emergency admissions is so much higher.

Length of stay has a long right tail. The most common stay is two nights, the mean is 4.17, and the longest in the 1,000-row file is 18 nights. Oncology stays longest and Pediatrics and Obstetrics shortest. Heart failure and COPD come back within 30 days far more often than anything else, which matches what hospitals report.

Before you draw conclusions

total_charges is what the hospital billed, not what anyone paid. Real hospitals bill far more than insurers settle for, so treat the column as a measure of resource use, and compare departments with it, rather than reading it as revenue.

The file is synthetic, and its patterns are built to be plausible rather than taken from any real hospital. It is for learning analysis, building dashboards and testing software. It should not inform a clinical decision or a claim about real hospital performance, and nothing in it has been checked by a clinician.

What people use it for

  • A healthcare operations dashboard: admissions by month, average length of stay by department, readmission rate.
  • Date arithmetic, from a simple length of stay to the bed occupancy question.
  • Learning when to report a median instead of a mean, on a column with a real tail.
  • Rates with care: readmissions among patients who could be readmitted, which leaves out those who died.
  • SQL practice with date ranges, window functions and calendar joins.

License, and the people in it

This dataset is dedicated to the public domain under CC0 1.0. Put it in a course, a paid product, a test suite, a bug report, a screenshot, a conference talk or a book. There is nothing to ask for, nothing to sign and no attribution required. A link back is welcome and is not a condition.

There is no patient in this file. Each row is a stay, with an age and a diagnosis and no name, date of birth, address, record number or patient id. The hospital is invented. That is deliberate: a real admissions extract is protected health information, and this file is something you can publish, share with a class or paste into a bug report.

Questions people ask about this file

Is this real patient data?

No. Every row comes from a seeded generator, and there is no name, date of birth, address, record number or patient id anywhere in it. The hospital is invented. Its patterns, like the January peak and the heart failure readmissions, are built to look like a real hospital so that the analysis is worth doing.

Why is there no patient id?

Because a patient id would invite exactly the thing this file cannot honestly support: linking stays together and computing readmissions from the rows. Here the readmission is a flag on the stay. That keeps the file simple and the flag consistent, and it removes any temptation to treat the rows as people.

How is length_of_stay counted?

In nights: discharge_date minus admit_date. A patient admitted on 2 January and discharged on 7 January has a length_of_stay of 5. Every row has at least one night, because a stay with none would be an outpatient visit, not an admission.

Can I use it to compare departments?

Yes, for practice. Admissions, stays, charges and readmissions all differ by department in plausible ways. Just remember that a department like Oncology looks expensive because its patients need more care, not because it is inefficient. That point matters more in real data than in this file.

Can I use it in a course or a published project?

Yes. It is CC0 1.0, a public domain dedication. Use it in a lecture, a portfolio, a vendor demo or a published dashboard, with or without credit. Because no real patient is in it, there is no privacy approval to get first.