Book a free call

Software That Finds Protected Health Information

PHI detection software scans notes and files for names, dates and record numbers so teams can redact them before sharing. How it works, and which tools do it.

Hertiv engineering teamReviewed by a senior engineer
6 min read
Software That Finds Protected Health Information
On this page

Short answer

PHI detection software finds protected health information inside text, such as patient names, dates of birth, medical record numbers and addresses, and reports where each item sits. Health teams use it to redact documents, de-identify data for research, and stop sensitive details from reaching chatbots or support tools. Detection alone does not make data compliant; the handling around it matters just as much.

What is PHI detection software?

PHI detection software is software that finds protected health information inside text and reports the type and position of each item. Protected health information is health data that can be linked to a person, such as a diagnosis written next to a patient name or a medical record number.

Teams use it before data moves: before a note is shared with a researcher, before a support chat is logged, or before a document is sent to a vendor. The software flags the identifiers so they can be removed, replaced or masked.

Detection is the first step, not the whole job. After detection comes redaction, which removes the item, or de-identification, which changes the data so a person can no longer be identified from it.

What counts as protected health information?

Protected health information covers any health information that can identify a person, including the 18 identifier classes in the HIPAA Safe Harbor rule. The list is wider than most people expect, and dates and places count alongside names.

IdentifierExampleWhy it matters
NamesPatient, relative, employerDirectly identifies a person
DatesBirth date, admission dateNarrows identity when combined
NumbersMedical record, Social SecurityUnique to one person
PlacesAddress, ZIP codeLocates a person
ContactPhone, emailReaches a person directly
OtherPhotos, device IDsLinks data to a body or device

A single identifier is rarely enough on its own. The risk comes from combination: a rare diagnosis plus a small town plus an admission date can point at one person even when the name is gone. That is why detection has to cover all 18 classes, not just names.

How does PHI detection work?

PHI detection works by combining pattern rules, named-entity models and context checks. Rules catch the obvious items, such as phone numbers and record numbers, while models catch names and places that follow no fixed pattern.

Most tools run in three passes. First, rules and dictionaries flag formatted items such as dates, phone numbers and ID numbers. Second, a trained model reads the surrounding words and labels names, places and organisations. Third, context rules resolve the hard cases, such as whether 'May' is a month or a name.

No detector is perfect. Tools are tuned for high recall, which means they flag more than they should, because missing a real identifier is worse than flagging an extra word. A human review step is therefore part of every serious setup.

What is the difference between detecting, redacting and de-identifying?

Detecting finds identifiers and reports their type and position. Redacting replaces or removes them. De-identifying is a legal standard: health information is de-identified when the risk of identifying anyone is very small, or when all 18 Safe Harbor identifier classes are removed.

Redaction is what most teams do day to day: a name becomes a black bar, a date becomes a year only, a record number becomes a token. De-identification is the formal outcome that lets data be shared more freely, and it needs either an expert determination or the full Safe Harbor process.

The distinction matters because a redacted document can still identify someone through what is left. Dates, places and rare conditions can combine into a fingerprint, so de-identification checks the whole record, not just the flagged words. For the wider compliance picture, see what HIPAA compliance means.

Which tools identify PHI?

The main PHI detection tools fall into three groups: cloud APIs, tools that run inside your own systems, and data-loss-prevention platforms that watch data as it moves.

ToolWhere it runsWhat it does
Amazon Comprehend MedicalAWS cloud APIDetects PHI entities in text
Microsoft PresidioYour own serversDetects and redacts, open source
Azure AI LanguageAzure cloud APIDetects, redacts, replaces
Google Cloud Healthcare NLPGoogle cloud APIDetects clinical entities
Limina (formerly Private AI)Your own serversDetects and de-identifies
NightfallCloud platformWatches data in motion

Cloud APIs are the fastest way to start: send text, get back the identifiers and their positions. Tools that run in your own systems suit teams that cannot send patient text to a vendor at all.

Prices and terms change, so see vendor site for current pricing. A business associate agreement is needed before any patient data goes to a cloud vendor.

How do you choose a PHI detection tool?

You choose a PHI detection tool by deciding where the text may go, what must happen to it, and how the results will be checked.

  1. Decide where text can run. If patient text cannot leave your systems, pick a tool that runs inside them.
  2. List what must be found. Names, dates, numbers, places, and any identifiers specific to your records.
  3. Check the agreement. Confirm the vendor will sign a business associate agreement before any real data is sent.
  4. Test on your own notes. Run a sample of real note styles and count what the tool misses, not just what it finds.
  5. Plan the review step. Decide who checks flagged items and what happens to a document that fails the check.
  6. Measure after launch. Track missed identifiers and false flags each month, and retune the rules.

Test with your own documents, not the vendor demo. Clinical notes, scanned forms and chat messages each hide identifiers in different ways. Teams building AI health features should read how to build HIPAA-compliant AI health platforms before choosing a tool.

Example (hypothetical): a clinic prepares notes for research

Example (hypothetical): a clinic wants to share 10,000 visit notes with a university research team. The notes must be de-identified first, and the clinic has four weeks.

The team runs a detector over the notes. It flags 8,400 notes as containing at least one identifier, and 1,600 notes as clean. Two reviewers then check a sample of 500 flagged notes and find the detector missed an identifier in 15 of them, which is 3 in 100.

The arithmetic guides the fix. Three missed identifiers in 100 notes means about 300 missed identifiers across 10,000 notes, so the team adds a second rule pass for dates and places, then re-runs the check. After the fix, a new sample of 500 notes shows 2 missed identifiers, which is under 1 in 100, and the team accepts that level with a final human review of the riskiest notes.

What are the common mistakes?

The most common PHI detection mistakes are trusting the detector alone, testing on demo data, and forgetting that dates and places can identify someone.

  • No human review. A detector tuned for recall still misses items, and an unreviewed miss is a breach.
  • Testing on clean samples. Vendor demos use tidy notes; real notes have typos, shorthand and scanned pages.
  • Forgetting combinations. A name removed but a rare diagnosis, town and date left in can still point at one person.
  • Sending data without an agreement. Patient text sent to a cloud vendor needs a business associate agreement first.
  • Treating detection as compliance. Detection is one control; access rules, logging and training still matter.

Key takeaways

  • PHI detection finds names, dates, numbers and places in text and reports where each sits
  • Detection is only the first step; redaction removes items and de-identification is the formal standard
  • Cloud APIs are fastest to start, while tools that run in your own systems suit stricter data rules
  • Test on your own notes and count what the tool misses, not just what it finds
  • No detector is perfect, so a human review step is part of every serious setup

Frequently asked questions

What is protected health information?

Protected health information is health data that can be linked to a specific person, such as a diagnosis next to a patient name, a medical record number, a birth date or an address. The HIPAA Safe Harbor rule lists 18 identifier classes that count, including dates, places and contact details.

Can PHI detection software de-identify data on its own?

It can find and remove identifiers, which is the technical part of de-identification. The legal part still needs either an expert determination or the full Safe Harbor process, plus a check that what is left cannot identify anyone in combination.

What is the difference between redaction and de-identification?

Redaction replaces or removes flagged items in a document. De-identification is the formal outcome where the risk of identifying anyone is very small, reached either by expert determination or by removing all 18 Safe Harbor identifier classes.

Which PHI detection tool should a small clinic use?

Start with a cloud API such as Amazon Comprehend Medical or Azure AI Language if patient text may go to a vendor under a business associate agreement. If it may not leave your systems, use an open source tool such as Microsoft Presidio that runs on your own servers.

Do I need a business associate agreement to use a cloud PHI tool?

Yes, before any real patient data is sent to the vendor. The agreement is what makes the vendor a business associate under HIPAA, and without it the data should not leave your systems.

How accurate is PHI detection software?

Tools are tuned for high recall, so they flag more than they should rather than miss real identifiers. Accuracy depends on the note style, and every serious setup adds a human review step to catch what the detector misses.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: software products in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building health software that handles patient data safely? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Data Security & Compliance service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call