Saltar al contenido principal

Detect PII

Deprecated

Use phi-deidentify node instead. It provides NLP-based detection and FHIR-aware processing.

Category: Security
Node id: detect-pii
Maturity: beta
Risk tier: B

Standards: HIPAA, SOC2

Scans text for Protected Health Information (PHI) and Personally Identifiable Information (PII) using pattern matching

What it does​

  • Regex-based detection for SSN, phone, email, MRN, dates, and more
  • Risk level assessment: none, medium, high
  • Per-type finding counts and breakdowns
  • Character position tracking for precise PII location
  • Configurable detection type filtering

Use cases​

  • Scan clinical notes for PHI before sharing or export
  • Detect PII in free-text fields for compliance review
  • Pre-screen data for anonymization pipeline processing

Runtime​

  • Performance tier: fast

Input ports​

NameTypeRequiredDescription
texttextYesText to scan for PII/PHI

Output ports​

NameTypeRequiredDescription
resultjsonNoPII detection output with has_pii, findings, count, type_counts, and risk_level (none/medium/high)
successbooleanNoWhether the scan completed successfully

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Detect Typesdetect_typesstringNoallComma-separated PII types to detect, or 'all'

Advanced​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Include Positionsinclude_positionsbooleanNotrueInclude start/end character positions in findings

Errors​

CodeDescription
MISSING_TEXTText input is required for PII detection

Runtime notes​

  • Detection is regex over a fixed pattern set: it finds what the patterns describe and nothing else. A miss is PHI reaching the next node, so treat it as a filter, not a guarantee.
  • Risk levels: 'high' if SSN/MRN/credit_card/NPI found, 'medium' for other PII, 'none' if clean
  • Findings include start/end character positions when include_positions is true (default)
  • Detected types: ssn, phone, email, mrn, date_of_birth, zip_code, credit_card, ip_address, npi, person_name
  • Regex-based detection — may produce false positives for zip codes and phone-like numbers

See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.

¿Algo no está claro? Envíe sus comentarios sobre la documentación por correo electrónico..