PDM
Testing results

Coverage and over-masking, measured by category

HIPAA’s Safe Harbor method requires removing 18 categories of identifiers to de-identify health data. Here’s PDM’s coverage of each one.

The argument

What we measure, and why

What counts for HIPAA compliance is the eighteen Safe Harbor categories. So that is what we measure — category by category, on each file type.

Other tools report a single figure, often around 97%, usually an F1 score: one number averaged across everything the tool found, blended from two different measures. It cannot tell you which categories were covered and which were not, and a value that should never have been masked can count toward it.

Our testing was built against the Safe Harbor requirement itself. Every identifier is planted with its category and its position known in advance, so a result is a comparison against an answer key rather than an estimate.

We also measure the opposite error. Every file contains values that look like identifiers and are not — drug names, room numbers, lot codes. Masking them does not fail a HIPAA requirement, but it costs you the use of the file. We plant those deliberately and report them separately.

The method

How we tested

How PDM’s detection is testedA flow diagram. At the top, three input files: a patient master structured extract, 226 agent-written case notes, and clinical notes in a clinical prose register. The case notes are drawn from eight healthcare service domains. Below them, both kinds of planted value: identifiers, whose position and category are known in advance, and look-alike values, which must survive masking. Both go through one masking pipeline run on one fixed configuration, the same for every file. The run produces two separate results: coverage by category across 16 of the 18 Safe Harbor categories, counted as caught, partial or missed; and an over-masking ledger tested against every look-alike value and counted rather than averaged away.Patient masterstructured extractCase notes226 agent-written notesClinical notesclinical prose registerEight service domainsinsurance, pharmacy, provider offices,discharge, care management, lab and imaging,behavioral health, home healthPlanted identifiersknown position, known categoryPlanted look-alikesmust survive maskingMasking pipelineone fixed configurationCoverage by category16 of 18 categoriescaught, partial, missedOver-masking ledgertested against every look-alikecounted, not averaged away

The left path is what has to be masked and the right is what has to survive. They are planted into the same files and go through the same run, and they are reported separately because they fail in opposite directions — a miss costs privacy, an over-mask costs the use of your data.

Patient master.
A demographic extract, one row per patient, using the column names FHIR, USCDI, OpenEMR and OpenMRS actually ship.
Case notes.
Agent-written call notes — claim denials, prior authorizations, refills, discharge follow-up — with identifiers in the prose and in the columns beside it.
Clinical notes.
Clinical prose in its own register: abbreviations, vitals, dosages, diagnosis codes, and names as often lowercase as not.

The data is synthetic. No public corpus of real case notes exists, because that data is protected health information by definition.

The numbers

Coverage by category

(A) Names
Patient master100%
Case notes97.2%
Clinical notes99.8%
(B) Geography below state
Patient master100%
Case notes97.8%
Clinical notes58.0%
(C) Dates except year
Patient master100%
Case notes84.7%
Clinical notes100%
(D) Telephone
Patient master100%
Case notes96.5%
Clinical notes100%
(E) Fax
Patient master100%
Case notes
Clinical notes
(F) Email
Patient master100%
Case notes100%
Clinical notes
(G) Social Security numbers
Patient master100%
Case notes99.6%
Clinical notes100%
(H) Medical record numbers
Patient master100%
Case notes100%
Clinical notes87.4%
(I) Health plan beneficiary numbers
Patient master100%
Case notes97.4%
Clinical notes100%
(J) Account numbers
Patient master100%
Case notes5 of 5
Clinical notes
(K) Certificate and license numbers
Patient master100%
Case notes
Clinical notes
(L) Vehicle identifiers
Patient master
Case notes0 of 1
Clinical notes
(M) Device identifiers and serial numbers
Patient master
Case notes0 of 3
Clinical notes0 of 155
(N) Web URLs
Patient master
Case notes
Clinical notes100%
(O) IP addresses
Patient master
Case notes2 of 2
Clinical notes100%
(P) Biometric identifiers
not applicable to text
(Q) Full-face photographs
not applicable to text
(R) Other unique identifying codes
Patient master100%
Case notes86.3%
Clinical notes100%

Over-masking ledger

Over-masking is when a value that identifies nobody — a drug name, a room number, a lot code — is masked anyway: no HIPAA requirement is failed, and the data loses its use.

5,061 of 5,211 look-alike values were not masked. The 150 that were all fall in the transaction references column of the patient master.

The transaction references are the only class we mask, and why is in the notes below.

Clinical abbreviations
Tested1,280
Incorrectly masked0
Room numbers, vital signs, state names
Tested960
Incorrectly masked0
Pharmacy plan codes — RxBIN, RxGroup, RxPCN
Tested681
Incorrectly masked0
Drug and dosage names
Tested659
Incorrectly masked0
Dates that identify nobody — year-only, bylines, clock times
Tested377
Incorrectly masked0
Eponyms — Crohn’s, Bell’s, Graves’
Tested320
Incorrectly masked0
Service domain labels
Tested226
Incorrectly masked0
Lot and batch numbers
Tested159
Incorrectly masked0
Order, case and reference numbers
Tested231
Incorrectly masked0
Amounts, procedure and diagnosis codes
Tested18
Incorrectly masked0
Case notes and clinical notes
Tested4,911
Incorrectly masked0
Transaction references — patient master
Tested300
Incorrectly masked150
All three files
Tested5,211
Incorrectly masked150
Notes on individual categories

Device identifiers and serial numbers — not detectedUnder GS1, the standard governing device labeling, the application identifiers for batch/lot and for serial number specify the same data format. A serial number and a lot code are not distinguishable by format, and a lot code is not an identifier of a patient.

Neighborhood and district names — 58.0% in clinical notesHyde Park and Capitol Hill are ordinary words, and a gazetteer of place names collides with surnames and business names. Of the 169 planted, 54 were missed and 17 were masked in part.

Dates in case notes — 84.7%Dates are masked when clinical context is present: an appointment, an admission, a date of service. Most dates in a case note are not about the patient at all — callback times, filing deadlines, system timestamps.

Medical record numbers in clinical prose — 87.4%A bare record number with nothing beside it naming what it is has no shape distinguishing it from any other reference number. With a nearby label, the same number is masked.

Transaction references in the patient master — 150 of 300 maskedThese are the only look-alike values we mask. The reference format is close enough to a telephone number to be read as one, and the column is confirmed on that basis, so every value in it is masked. It costs the use of that column and nothing else.

Results reflect the datasets used for testing and may vary on your own data with format, context, and how identifiers appear.