Healthcare NLP Pipeline for HIPAA-Compliant Patient Data De-identification

dandelion_health · Healthcare · 2023 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: healthcare privacy-preserving data pipelines

Dandelion Health needed to de-identify free-text patient notes for HIPAA compliance while preserving the clinical fidelity needed by researchers and AI model builders.

Constraints:

Architecture

Dandelion built an air-gapped AWS de-identification pipeline for clinical notes. Partner data enters a hospital-owned AWS account with no internet access; SQS queues de-identification requests that launch tens or hundreds of Lambda jobs. Each job classifies note modality, assesses category-specific PHI risk, applies modality-specific preprocessing such as header/footer redaction and table extraction, runs John Snow Labs Healthcare NLP to detect identifiers, transforms detected PHI by redaction, hashing, or replacement, and then applies Hiding in Plain Sight (HIPS) postprocessing to lower re-identification risk. A QA/QC process with at least two clinically trained reviewers measures recall and precision, adjudicates discrepancies, retrains reviewers or revises processing when quality thresholds are missed, and only then moves approved output to the de-identified data store.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  A["Partner hospital AWS account"] --> B["SQS de-identification queue"]
  B --> C["Lambda de-identification jobs"]
  C --> D["Modality risk classifier"]
  D --> E["Modality-specific preprocessor"]
  E --> F["John Snow Labs Healthcare NLP"]
  F --> G["PHI transformation engine"]
  G --> H["HIPS postprocessor"]
  H --> I["QA/QC reviewer panel"]
  I --> J["Hospital partner report"]
  I --> K["De-identified data store"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Partner hospital AWS account Isolated deployment environment within each partner hospital's AWS organization, configured without internet access for HIPAA-aligned raw-data handling. SQS de-identification queue
SQS de-identification queue Queues de-identification requests for a given dataset and triggers parallel processing jobs. Lambda de-identification jobs
Lambda de-identification jobs Scalable workers that orchestrate note categorization, PHI detection, transformations, HIPS postprocessing, and output routing. Modality risk classifier, PHI transformation engine, HIPS postprocessor
Modality risk classifier Categorizes notes such as radiology, pathology, procedure documents, interviews, or obstetrics so risk can be assessed by modality. Modality-specific preprocessor
Modality-specific preprocessor Reduces risk before NLP by removing known headers and footers, extracting embedded tables, and applying category-specific handling for edge cases. John Snow Labs Healthcare NLP
John Snow Labs Healthcare NLP Healthcare NLP engine used to identify PHI words and phrases in free-text notes. PHI transformation engine
PHI transformation engine Applies redaction, hashing, replacement, or date shifting to detected protected health information. HIPS postprocessor
HIPS postprocessor Hiding in Plain Sight layer that replaces redacted tokens with plausible alternatives so missed tokens are less obvious to attackers. QA/QC reviewer panel
QA/QC reviewer panel Clinically trained reviewers who manually measure recall, compare reviewer discrepancies, adjudicate with a third reviewer, and trigger retraining or pipeline revision. Hospital partner report, De-identified data store
Hospital partner report Final report showing recall across HIPAA identifiers and missed/found counts for partner confidence. QA/QC reviewer panel
De-identified data store Destination for approved transformed data after successful QA/QC. —

Data flow

For each hospital dataset, de-identification requests are placed on SQS, which launches Lambda jobs inside an internet-free AWS account. The jobs categorize each note by modality, reduce category-specific risk with preprocessing, run Healthcare NLP to flag PHI, scrub detected identifiers, apply HIPS replacement or date jitter, and send transformed output to human QA/QC. If reviewers confirm the results and thresholds are met, Dandelion shares a final report with hospital partners and moves the transformed dataset to a de-identified store; otherwise the transformed data is discarded and the raw data is reprocessed.

3 supporting quotes
“for a given data set we send a series of De identification requests to the sqs queing service this in turn uh fires up tens or hundreds of deidentification Lambda jobs”transcript, stated
“our solution is adding three steps to the beginning of the process for a given Note One putting it in a modality category Radiology pathology Etc to determining the risk level for that category”transcript, stated
“then we run validation for uh confirming successful deidentification with our thorough QA QC and through this process we are able to um keep pretty much all of the data”transcript, stated

Why this architecture

Dandelion chose a risk-segmented pipeline because generic NLP over raw notes lacks enough context for messy clinical documents. Classifying modality first lets the system apply different preprocessing to low-risk radiology, high-risk interviews, obstetrics age phrases, scanned PDF footers, or ASCII tables. The air-gapped AWS design protects raw PHI, HIPS mitigates the impact of missed identifiers, and human expert review supplies the measured risk evidence required for HIPAA expert determination.

3 supporting quotes
“we use the first option expert determination in order to explicitly measure the risk involved with the deidentification decisions we have made and to perform more nuanced data Transformations”transcript, stated
“the NLP requires context for detecting Phi and sometimes that context is garbage this context might be extraneous information weird formatting or embedded metadata”transcript, stated
“everything we do has hipa compliance in mind so our AWS account has no internet access in order to ensure a zero trust environment when handling raw data”transcript, stated

Models used: John Snow Labs Healthcare NLP · Healthcare NLP · HIPS dictionary replacement

Scale

Alternatives considered (roads not taken)

Run Healthcare NLP directly over every note and scrub all detected PHI

Rejected because: The speaker says the perfect-world approach fails because patient-note context is often malformed, extraneous, or embedded in document artifacts that confuse PHI detection.

“in a perfect world we just iterate over each patient note Run Healthcare NLP scrub the Phi and call it a day unfortunately that's not the case”transcript, stated
“the patient notes we get are not perfectly processible by Healthcare NLP this is through no fault of the NLP itself or the hospital system”transcript, stated

Use HIPAA safe-harbor removal of specified identifiers

Rejected because: Dandelion chose expert determination to measure risk explicitly and permit more nuanced transformations.

“the Privacy Rule provides two deidentification methods one a formal determination by a qual expert or two the removal of specified individual identifiers”transcript, stated
“we use the first option expert determination in order to explicitly measure the risk involved with the deidentification decisions we have made”transcript, stated

Rely on raw redaction without HIPS replacement

Rejected because: Pure misses would make the missed token obvious, while HIPS mixes missed names and dates with plausible replacements so attackers cannot trivially identify which token is real.

“without hips as seen in the second column it becomes obvious that the daughter's name is Lynn the doctor's last name is white and that the event happened on May 10th”transcript, stated
“in the hip scenario in the third column these values of Lynn white and May 10th are mixed with other names and dates”transcript, stated

Validate with a single human reviewer

Rejected because: The process requires at least two analysts per document and uses third-reviewer adjudication when reviewers disagree.

“dictionaries the aformentioned manual review process is performed by at least two an two analysts for a given document”transcript, stated
“we compare any discrepancies between the analysts and if there are discrepancies It Is triaged by a third reviewer”transcript, stated

Patterns

privacy-preserving-processing (safety)

The pipeline isolates raw PHI in no-internet hospital AWS accounts, transforms identifiers through redaction, hashing, replacement, or date shifting, and applies HIPS so missed identifiers are less distinguishable from substituted tokens.

“these jobs perform Transformations on any Phi and these Transformations include redaction hashing or replacement”transcript, stated
“for a given redacted token we replace that token with a similar token from a dictionary”transcript, stated

human-in-the-loop-gate (governance)

Clinically trained analysts manually review samples, at least two reviewers examine each document, discrepancies go to a third reviewer, and failed thresholds cause processing revision rather than release.

“this measurement is performed manually by human anal human analysts who are clinically trained reviewers these analysts review a sample result set”transcript, stated
“if those results don't meet our quality thresholds we revise our processing and repeat the deidentification process otherwise we're done”transcript, stated

eval-driven-development (evaluation)

The de-identification process is driven by measured recall, precision cross-checking, reviewer discrepancy adjudication, and reruns when missed identifiers or false positives exceed quality thresholds.

“we measure our success with recall specifically the number of true positive Phi that were redacted divided by the true positive count plus the false negative count”transcript, stated
“we perform Precision crosschecking across our hips dictionaries and date Jitters to ensure false positives do not reveal the masking mechanism”transcript, stated

tool-use-orchestration (architecture)

The system coordinates AWS SQS, Lambda workers, containerized air-gapped products, Healthcare NLP, preprocessing, HIPS postprocessing, and data-store routing as a controlled processing pipeline.

“all of our processes either use AWS services within the AWS private Network or airgap products that are containerized using AWS elastic container service”transcript, stated
“for a given data set we send a series of De identification requests to the sqs queing service this in turn uh fires up tens or hundreds of deidentification Lambda jobs”transcript, stated

safety-policy-enforcement (governance)

HIPAA privacy requirements are translated into concrete release criteria: identifier categories, expert determination, de-identification transforms, recall reports, and partner-facing evidence before data egress.

“all the data we provide to our clients is deidentified and deidentification is necessary because of the hippo Privacy Rule”transcript, stated
“that final report will contain information such as recall across are each individual um Hippa U identifier”transcript, stated

Tradeoffs

Use expert determination instead of only removing specified identifiers

Chose expert determination with explicit risk measurement and nuanced transformations over safe-harbor removal of specified individual identifiers alone.

Rationale: The goal was to measure risk and preserve useful clinical information, not simply remove every specified field in the same way.

“the Privacy Rule provides two deidentification methods one a formal determination by a qual expert or two the removal of specified individual identifiers”transcript, stated
“we use the first option expert determination in order to explicitly measure the risk involved with the deidentification decisions”transcript, stated

Segment free-text notes by modality before PHI detection

Chose modality categorization with risk-specific preprocessing over one generic Healthcare NLP pass over every note.

Rationale: Clinical note categories have different PHI risks and formatting patterns, so one generic pass misses important context and edge cases.

“for a given Note One putting it in a modality category Radiology pathology Etc to determining the risk level for that category”transcript, stated
“once we categorize the notes we create strategies to reduce the risk for each catat ategory”transcript, stated

Apply HIPS replacement rather than making every miss obvious

Chose plausible token replacement with dictionary probabilities over pure redaction where missed names and dates stand out.

Rationale: HIPS cannot make detection perfect, but it lowers re-identification risk by hiding missed PHI among plausible substitutions.

“because we're going to miss a few of these cases because we can't perfectly determine that Bob is a name”transcript, stated
“if we miss a name it won't be obvious that that name was missed to an attacker because that uh name will have to be compared with other alternative names”transcript, stated

Use double-review QA with adjudication

Chose two clinically trained analysts and third-reviewer triage for discrepancies over single-review validation or fully automated acceptance.

Rationale: Manual review quality itself must be controlled because disagreements may signal low reviewer quality or ambiguous review instructions.

“each of those documents are processed by two different reviewers um and what will happen then is that um we compare any discrepancies between the analysts”transcript, stated
“that may result in an analyst being retrained or replaced if their particular review quality is low or for there to be additional clarification on a review process”transcript, stated

Gotchas (what bit them)

Free-text clinical notes can destroy the context that PHI detection relies on.

Root cause: PDF conversion artifacts, footers, metadata, and line-by-line storage can place names or dates in positions where the NLP engine cannot infer what the token is.

Resolution: Dandelion added modality classification and category-specific preprocessing before Healthcare NLP, including header/footer redaction and table extraction.

“if you're just stitching together each line one after the other the word do in all caps is going to be totally nonobvious that it's a patient name”transcript, stated
“this includes pre-processing such as redacting headers and Footers that are already available in the electronic health record”transcript, stated

ASCII tables can make identifier semantics invisible to normal NLP processing.

Root cause: When columns are represented by pipes and plus/minus delimiters, a date of birth can appear far from its column header and look like an ordinary date.

Resolution: The table structure must be extracted and processed independently before PHI classification.

“there are some patient notes that we have processed that are stored as asky tables where you would have symbols such as pluses and minuses”transcript, stated
“you really need to be able to extract this table structure and process that independently to be able to really confirm what types of objects you're processing”transcript, stated

Domain-specific codes can be confused with HIPAA identifiers.

Root cause: Five-digit CPT billing codes can resemble ZIP codes, and the correct interpretation depends on geography and surrounding clinical context.

Resolution: Use contextual checks such as hospital state, COVID-related meaning, and nearby address signals before deciding whether to treat a five-digit number as a ZIP code.

“procedure codes used for billing are five digits and can closely resemble zip codes for our hospital system in California”transcript, stated
“we'd also want to have some context like is there an address mentioned right before the five-digit number”transcript, stated

False positives can leak the HIPS masking mechanism.

Root cause: If a non-date value is mistakenly date-jittered, an attacker who knows the original value can infer the patient's date shift and reverse other dates.

Resolution: Dandelion performs precision cross-checking across HIPS dictionaries and date jitters, not recall-only validation.

“if the phrase normal value range of 1 to two is written as 1-2 but that 1-2 is processed as a date and jittered to 1-5”transcript, stated
“we do want to be careful that not just the recall is uh strong but also that we don't have too many false positives”transcript, stated

Low-risk modality assumptions can still be wrong.

Root cause: Radiology or other low-risk categories may still include patient-detail headers, footers, scanned PDF artifacts, or other PHI-bearing details.

Resolution: Perform both manual and automated confirmation before treating a modality as low risk.

“just because a patient's name is not noted in a radiology report in most cases doesn't mean that there aren't Radiology reports with patient detail headers or Footers”transcript, stated
“we perform both manual and automated confirmation of these risks to be able to say with confidence this is a low risk uh modality”transcript, stated

Evaluation

Dandelion evaluates de-identification with manual clinically trained reviewer samples, recall calculations for PHI redaction, precision cross-checks for HIPS and date-jitter false positives, reviewer discrepancy adjudication, and final partner reports broken down by HIPAA identifier category.

Metrics: PHI recall = true positive PHI redacted / (true positives + false negatives) · example 95% recall when five dates are missed out of 100 instances · HIPS estimated to reduce re-identification risk by about 90% · effective recall above 99% when 95% detection recall is combined with HIPS · at least two clinically trained reviewers per document sample · recall reported across individual HIPAA identifier categories

3 supporting quotes
“if we see in our data set 100 instances of um dates and we miss five of those we would consider it a 95% recall”transcript, stated
“dictionaries the aformentioned manual review process is performed by at least two an two analysts for a given document”transcript, stated
“that final report will contain information such as recall across are each individual um Hippa U identifier”transcript, stated

Outcomes

The talk describes a production healthcare de-identification pipeline for longitudinal, multimodal clinical data covering millions of patients, running inside hospital AWS accounts with no internet access and scaling each dataset through tens or hundreds of Lambda jobs.

3 supporting quotes
“if it was the transformed data is moved to a data deidentified data store for egress otherwise the transform data is discarded and the raw data is reprocessed”transcript, stated
“we are able to um keep pretty much all of the data that we would find valuable for our clients while maintaining high security and high trust”transcript, stated
“all of those are compiled uh and shared with our Hospital Systems to so that they can be confident that um we are redacting everything at the appropriate rate”transcript, stated