The capacity team wants a model that forecasts tomorrow's ICU and ward occupancy. Someone exports the encounter table to train it: birth dates, ZIP codes, admission dates, one row per stay. Preparing hospital data for AI means giving the model the grain it needs, here counts by unit and day, and stripping or generalising whatever could single out a patient. HIPAA allows two routes to de-identified data, Expert Determination and Safe Harbor [1].
We measured how identifying each step leaves the data, on 30,000 synthetic encounters. With area, birth date, sex and admission date, 99.6% of encounters matched no other encounter in the extract. Safe Harbor-style generalisation brought that to one encounter. A unit-by-day capacity table holds no patient rows at all.
Figures checked 16 November 2026. This guide is for hospital data and analytics teams preparing operational data for forecasting or AI tools. It explains the mechanics; whether a dataset meets HIPAA's standard is for your privacy officer and counsel to decide. For the integration side of the same capacity work, see DataFuseAI's healthcare page.
Key Takeaways
- Start from the grain the model needs. A bed-occupancy forecast needs counts by unit and day, which identify no individual patient.
- Exact dates keep records identifiable. Keeping exact admission dates left 81.7% of encounters unique even after birth dates were cut to the year and ZIP codes to a region.
- Safe Harbor-style generalisation cut uniqueness to one encounter in 30,000 in our test, but adding unit and length of stay brought it back to 25.5%.
- Small counts are the risk in aggregates. 1,906 of 5,475 daily counts in the capacity table were between 1 and 10, almost all in small units.
- Masking is not de-identification. A masked or tokenised dataset may still be protected health information unless it meets HIPAA's standard [2].
What does a hospital AI use case actually need?
Most operational AI in a hospital forecasts volumes, so it needs counts over time, not patient rows. Deciding the grain first is the strongest privacy control available, because a field never extracted needs no de-identification. The table below is an editorial guide to common cases, not a rule.
| Use case | Grain the model needs | Patient-level rows needed? |
|---|---|---|
| Bed occupancy forecast | Occupied beds by unit and day | No |
| Emergency department arrivals | Arrivals by hour | No |
| Staffing by shift | Admissions, discharges and occupied beds by unit and shift | No |
| Length-of-stay benchmarking | Stays by unit, month and age band | Usually not |
| Discharge planning for current patients | One row per current inpatient | Yes, so it stays inside the clinical systems |
Source: DataFuseAI editorial guide, 16 November 2026. Confirm each case with your privacy officer.
Free-text clinical notes are a separate problem: names, dates and places can appear anywhere in the text, so field-level rules like the ones below do not cover them.
HHS's guidance supports the logic of aggregation. Its example is a health plan report of average member age, which identifies no plan member because it was built by aggregating individual records [1]. The same guidance notes that agencies set their own policies on small cell counts in summary data [1].
What are HIPAA's two routes to de-identified data?
HIPAA's Privacy Rule gives two methods for de-identifying protected health information: Safe Harbor and Expert Determination [1]. Safe Harbor removes 18 categories of identifiers. Expert Determination has a qualified expert conclude that the risk of identifying anyone is very small.
Safe Harbor requires removing names, contact details, record and account numbers, and the other listed identifiers [1]. Three of the rules shape operational data most:
- Geography: nothing smaller than a state, except the first three digits of a ZIP code where that three-digit area holds more than 20,000 people; smaller areas become 000 [1].
- Dates: every element of a date directly related to a person except the year, including admission and discharge dates. Ages over 89, and any date element that reveals such an age, are grouped as 90 or older [1].
- Knowledge: the covered entity must have no actual knowledge that what remains could identify someone, alone or combined with other information [1].
Expert Determination is the route when you need more detail than Safe Harbor leaves. HHS says there is no explicit numerical level of identification risk that universally counts as very small, and it designates no universal value for k in k-anonymity [1].
De-identification is not the only route either. Morgan Lewis lists HIPAA's treatment, payment and healthcare operations permissions among the pathways for AI analytics, and cautions that each proposed use needs fact-specific analysis [2].
| Route | What can remain | Who decides | Agreement |
|---|---|---|---|
| Safe Harbor | Data with the 18 identifier types removed, dates cut to the year | The covered entity, with no actual knowledge that what remains identifies anyone [1] | None required; the entity may still ask for one [1] |
| Expert Determination | Whatever detail a qualified expert finds leaves only a very small risk | A qualified expert, who documents the method [1] | Not required, though an entity may require one [1] |
| Healthcare operations inside the covered entity | Identified data, used for the entity's own operations and limited to the minimum necessary [3] | Privacy officer and counsel, case by case [2] | Business associate contracts for any vendor involved [4] |
Source: HHS de-identification guidance and covered entities page; Morgan Lewis, June 2026. Summary only; not legal advice.
How we tested
We generated an illustrative year of hospital data with a fixed seed: a pool of 22,000 synthetic patients, 16,294 of whom had at least one of 30,000 encounters across five units in 2025. Nothing in it is real. Areas and regions are synthetic codes standing in for five-digit and three-digit ZIP codes, so the 20,000-person population check was not applied.
For each set of fields, we counted the encounters whose combination of values matches no other encounter, and the encounters whose values belong to only one patient. The second count matters because a patient's repeat stays share birth date, sex and area. Uniqueness in an extract is not the same as identifiability, which depends on what outside data someone can link to. It shows where the risk sits. The Methodology section lists the other limits.
Which fields make hospital records unique?
Once direct identifiers are gone, exact dates do most of the work of making hospital records unique. Area, birth date and sex pointed 99.1% of encounters to a single patient. Cutting area to a region and birth date to a year still left 81.7% of encounters unique while the exact admission date stayed in.
| Fields kept | Unique encounters | Point to one patient | In groups smaller than 5 |
|---|---|---|---|
| Area, birth date, sex, admission date | 29,894 (99.6%) | 29,998 (over 99.9%) | 30,000 (100%) |
| Area, birth date, sex | 7,453 (24.8%) | 29,744 (99.1%) | 28,440 (94.8%) |
| Region, birth year, sex, admission date | 24,495 (81.7%) | 24,579 (81.9%) | 29,990 (over 99.9%) |
| Region, birth year, sex, admission year | 1 | 3 | 10 |
| The same plus unit and length of stay | 7,640 (25.5%) | 7,786 (26.0%) | 19,581 (65.3%) |
| Region, 10-year age band, sex, admission year | 0 | 0 | 0 |
Source: DataFuseAI test on illustrative synthetic hospital data, 16 November 2026. Ages 90 and over grouped in every generalised row.
The patient column is the one to read. Without the admission date, a patient's repeat stays look alike and drop out of the unique count, yet 99.1% of encounters still point to one person. The pattern matches older population research. Sweeney's analysis of 1990 Census data found that 87% of the US population, 216 million of 248 million people, were likely unique on five-digit ZIP, gender and date of birth [5]. Our extract is far smaller than a population, so its percentages are not comparable, but the same three fields carry the risk.
Why a Safe Harbor-style extract still needs a second look
Fields that Safe Harbor does not list can still single people out when combined. Adding the care unit and the length of stay to our Safe Harbor-style extract took unique encounters from 1 to 7,640, or 25.5%. Neither field is on the list of 18 identifiers.
This is what the actual knowledge condition and the catch-all identifier exist for. Safe Harbor's list ends with any other unique identifying number, characteristic or code, which HHS describes as unique features not explicitly enumerated that could identify someone [1]. A length of stay in a small unit can be such a feature.
Two practical responses follow from the test. Coarser categories work: a 10-year age band in place of birth year left no unique encounters. If the model needs unit and stay length per patient, that is a case for Expert Determination rather than a longer field list.
Small counts in an aggregate table
Aggregated tables carry a smaller, different risk: very small counts. Our unit-by-day capacity table had 1,825 rows and 5,475 counts, and 1,906 of those counts were between 1 and 10. Almost all were daily admissions and discharges in the ICU, paediatrics and maternity units.
How much that matters depends on who sees the table. One published example of a small-cell rule is CMS's policy for its own research files. It bars reporting any cell of 1 to 10, or any figure that lets such a value be derived from totals [6]. That policy covers CMS data, not your internal forecasts, but it shows how release rules are written.
Coarsening time fixed the problem in our data. Weekly admissions by unit had no counts between 1 and 10, and midnight occupied beds had only six. A forecast that needs daily detail can stay internal while weekly summaries go further.
The aggregate-first ladder
The aggregate-first ladder is a DataFuseAI editorial framework, not legal advice. It orders the choices from least patient detail to most, so a team climbs only as far as the use case requires and the privacy officer decides each step up.
- Aggregate first. Build counts by unit and day or hour inside the systems that hold patient data, and export only the counts. In our test, that table had 1,825 rows and no patient identifiers.
- Generalise what remains. Where a use case needs record-level data, remove the 18 identifier types and cut dates to the year, geography to an allowed region and ages over 89 to one group [1].
- Check what is still unique. Count records that match no other on the fields kept, and count cells of 1 to 10 in any table that leaves the team. Our check found 7,640 unique encounters that a field list alone would have missed.
- Escalate the rest. Detail beyond that needs an Expert Determination, a limited data set released under a data use agreement [1], or work that stays inside the clinical systems.
Mistakes to avoid
- Exporting the encounter table to build counts elsewhere. Aggregate where the data already lives and move only the result.
- Treating masked IDs as de-identified. A tokenised dataset may still be protected health information [2].
- Keeping exact admission dates "for the model". In our test, the exact admission date with region, birth year and sex left 81.7% of encounters unique.
- Checking fields against the list and stopping. Unit plus length of stay made a quarter of our Safe Harbor-style extract unique.
- Publishing daily counts for small units. Most small counts in our capacity table came from ICU, paediatric and maternity days.
Where DataFuseAI fits (and where it doesn't)
DataFuseAI runs data preparation as scheduled pipelines over your existing systems. Its healthcare page walks through a surge-capacity pipeline on demo data: it filters to active cases, branches on surge level and ranks ICU utilisation per facility [3]. It reads from source systems rather than sitting inside them [3]. Scheduled jobs can rerun the counts daily or hourly and log each run [7].
The same page names the controls that help with minimum necessary: role-scoped workspace access and pipeline steps that drop or withhold fields [3]. Access is managed through permission groups, and the governance and audit log page describes who changed what [8]. It says on-premise and hybrid deployment is available where policy requires protected health information to stay inside your perimeter [3].
DataFuseAI's healthcare page states plainly that DataFuseAI claims no HIPAA certification, and it tells readers to ask every vendor, DataFuseAI included, where it stands on a Business Associate Agreement [3]. None of the DataFuseAI pages we read describes a de-identification method, a uniqueness check or small-cell suppression. Steps 2 and 3 of the ladder are therefore work your team designs and your privacy officer approves.
To try step 1 on one recurring capacity report, DataFuseAI's free 30-day POC asks for one recurring workflow and two or three data sources [9]. Applications are reviewed for fit, there is no POC fee or obligation, and external cloud costs stay with you [9]. Use demo or synthetic data, or a deployment inside your perimeter, and settle the Business Associate Agreement question before any protected health information is involved.
Frequently Asked Questions
Is aggregated hospital data still protected health information?
Aggregated data that identifies no individual is not protected health information under HHS's example of an average-age report [1]. The judgement gets harder when counts are very small or when tables can be combined to recover them. Ask your privacy officer to set a minimum cell size for anything shared outside the team.
Can we keep admission dates if we remove names and record numbers?
Not under Safe Harbor, which removes every element of dates directly related to a person except the year, including admission and discharge dates [1]. If your model needs exact dates per patient, that detail needs an Expert Determination or another permitted pathway. A count by date, rather than a date per patient, often avoids the question.
Is masked or tokenised data de-identified?
Not automatically. Replacing names or record numbers with tokens hides direct identifiers but leaves dates, places and other fields that can still point to one person. Morgan Lewis notes that a masked or tokenised dataset may still be protected health information unless it meets HIPAA's de-identification standard [2]. Treat tokens as one step, not the result.
Do we need a vendor agreement to build these pipelines?
If a vendor handles protected health information on your behalf, HHS says the covered entity must have a written business associate contract or other arrangement with it [4]. DataFuseAI's healthcare page advises asking every vendor, DataFuseAI included, where it stands on a Business Associate Agreement [3]. Building counts inside your own perimeter with on-premise deployment changes what the vendor touches, so map that before signing.
Methodology
Data. Synthetic and illustrative, generated in Python with seed 20261209: a pool of 22,000 patients, 16,294 of whom appear in 30,000 encounters with admission dates in 2025, in five units with different typical stays. Thirty synthetic areas stand in for five-digit ZIP codes and three synthetic regions for three-digit ones. 1,643 encounters involved patients aged 90 or over at admission.
Uniqueness. For each field set, an encounter is unique when no other encounter shares all its values. "Point to one patient" counts encounters whose values belong to a single patient, and "groups smaller than 5" counts encounters sharing values with three or fewer others. Generalised rows group ages 90 and over at admission. Regions were not checked against the 20,000-person rule because they are synthetic.
Capacity table. Occupied beds are counted at midnight from admission to the day before discharge; admissions and discharges are counted on their dates. Because the data starts on 1 January 2025, early-January occupancy omits stays that began in 2024. Scripts ran on 16 November 2026 from 18:18 UTC; a later rerun with an added measure reproduced every earlier value.
Limits. Real hospital data has more fields, free-text notes, linked visits and outside datasets that change re-identification risk. These results show which fields drive uniqueness, not whether any dataset is de-identified. The test measures data preparation steps, not any product, and is not legal advice.
References
- U.S. Department of Health and Human Services, Office for Civil Rights. "Guidance Regarding Methods for De-identification of Protected Health Information in Accordance with the HIPAA Privacy Rule." Accessed 16 November 2026. https://www.hhs.gov/hipaa/for-professionals/special-topics/de-identification/index.html
- Madderra, M. J. and Edalur, R. (Morgan Lewis). "Feeding the Machine: Improving Population Health Analyses Through AI Tools." 30 June 2026. Accessed 16 November 2026. https://www.morganlewis.com/pubs/2026/06/feeding-the-machine-improving-population-health-analyses-through-ai-tools
- DataFuseAI. "Healthcare Data Integration for Hospital Data Teams." Accessed 16 November 2026. https://www.datafuseai.com/industries/healthcare
- U.S. Department of Health and Human Services. "Covered Entities and Business Associates." Content last reviewed 21 August 2024. Accessed 16 November 2026. https://www.hhs.gov/hipaa/for-professionals/covered-entities/index.html
- Sweeney, L. "Simple Demographics Often Identify People Uniquely." Carnegie Mellon University, Data Privacy Working Paper 3, 2000. Accessed 16 November 2026. https://dataprivacylab.org/projects/identifiability/paper1.pdf
- Centers for Medicare & Medicaid Services. "CMS Cell Size Suppression Policy." HHS guidance repository, issue date 1 January 2020. Accessed 16 November 2026. https://www.hhs.gov/guidance/document/cms-cell-suppression-policy
- DataFuseAI. "Data Pipeline Automation, Scheduling & Monitoring." Accessed 16 November 2026. https://www.datafuseai.com/solutions/data-pipeline-automation
- DataFuseAI. "Data Governance & Compliance: RBAC, Audit Logs, Isolation." Accessed 16 November 2026. https://www.datafuseai.com/solutions/data-governance-compliance
- DataFuseAI. "Free 30-Day POC." Accessed 16 November 2026. https://www.datafuseai.com/free-poc