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
| Name | Type | Required | Description |
|---|---|---|---|
text | text | Yes | Text to scan for PII/PHI |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
result | json | No | PII detection output with has_pii, findings, count, type_counts, and risk_level (none/medium/high) |
success | boolean | No | Whether the scan completed successfully |
Settings
Basic
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Detect Types | detect_types | string | No | all | Comma-separated PII types to detect, or 'all' |
Advanced
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Include Positions | include_positions | boolean | No | true | Include start/end character positions in findings |
Errors
| Code | Description |
|---|---|
MISSING_TEXT | Text 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.
Quelque chose n'est pas clair ? Envoyez vos commentaires sur la documentation par courriel.