Healthcare Integrations — Taction Software

PHI vs PII: What the Distinction Means for Software Design

PHI vs PII is more than a terminology question for software teams. Protected health information is individually identifiable health information held or transmitted by HIPAA covered entities and business associates, while personally identifiable information is a broader term covering data that identifies a person in any context. The distinction decides which laws apply, which fields need encryption, what must stay out of logs and how data can be de-identified. This guide lists the 18 HIPAA identifiers with a design implication for each. Talk to our team about privacy-aware architecture.

View All Services

PHI vs PII: The Core Difference

Understanding what is PHI starts with context. The same email address can be ordinary PII in a retail app and PHI in a patient portal, because it is linked to health information and held by a covered entity or business associate. PII is regulated by many laws, including state privacy statutes and GDPR, while PHI is regulated by HIPAA when handled by covered organizations. Software often holds both, so designs must handle each correctly and consistently.

What Makes Data PHI

PHI is individually identifiable health information relating to past, present or future health, care or payment, created or received by a covered entity or business associate, in any form or medium.

What PII Covers

PII is any information that can identify a person, such as names, emails, device IDs or location data. It is not limited to healthcare, and many different laws define it differently.

Context Changes Classification

Data becomes PHI when linked with health information in a HIPAA-covered context. A consumer wellness app outside HIPAA may hold similar data that is regulated instead by state or consumer protection laws.

State Privacy Laws

State laws, such as consumer health data statutes, can regulate health-related information not covered by HIPAA. Digital health products must check state requirements, especially when serving consumers directly rather than providers.

GDPR Special Category Data

Under GDPR, health data is special category data requiring an explicit lawful basis and stronger protections. Products serving European users must meet GDPR obligations alongside, or instead of, HIPAA requirements.

HIPAA Identifiers 1–6: Names, Locations and Contact Details

HIPAA's Safe Harbor de-identification method lists 18 identifiers that must be removed, along with actual knowledge that remaining data cannot identify a person. These protected health information identifiers are also a practical design checklist. Each identifier has implications for encryption, logging, search and data sharing. The first six cover names, geography, dates and direct contact details, which appear in almost every healthcare application and must be handled carefully from the first database design decision.

1. Names

Names are the most obvious identifier. Encrypt them at rest, exclude them from logs and error messages, and avoid using them in URLs, file names or analytics event properties. Search carefully.

2. Geographic Subdivisions Smaller Than a State

Street addresses, cities, counties and most ZIP codes are identifiers. Safe Harbor allows the first three ZIP digits only if that area has over 20,000 people, so truncate carefully in analytics.

3. Dates Except Year, and Ages Over 89

Birth dates, admission dates, discharge dates and death dates are identifiers, except year. Ages over 89 must be grouped. Shift or generalize dates before sharing datasets for research or analytics.

4. Telephone Numbers

Phone numbers identify patients directly and appear in SMS and calling workflows. Mask them in support tools, keep them out of logs and send reminders through BAA-covered messaging providers only.

5. Fax Numbers

Fax numbers remain common in healthcare workflows. Store them securely, restrict who can view them, and treat fax delivery integrations as PHI transmission requiring appropriate agreements and security controls. Audit fax logs.

6. Email Addresses

Email addresses often serve as login usernames. Avoid exposing them in URLs or analytics tools, hash them where only matching is needed, and ensure email services handling PHI sign BAAs.

HIPAA Identifiers 7–12: Numbers and Account Identifiers

The next six identifiers are numbers assigned by governments, healthcare organizations and financial systems. They often become database keys, which is a common design mistake. When identifiers such as medical record numbers become primary keys or appear in URLs, they spread into logs, caches, analytics and exports. Using internal surrogate keys instead keeps these sensitive values contained. Our healthcare data anonymization service handles these identifiers when preparing datasets. Each is covered below.

7. Social Security Numbers

Collect SSNs only when necessary, as our HIPAA compliance guide advises. Encrypt them at field level, display only the last four digits, restrict decryption to specific services and never use them as identifiers or keys.

8. Medical Record Numbers

MRNs are identifiers even though they look internal. Use surrogate keys in your schema, keep MRNs in a protected identity table and avoid exposing them in URLs or client-side code.

9. Health Plan Beneficiary Numbers

Member IDs are needed for eligibility and claims workflows. Encrypt them, limit access to billing roles and ensure clearinghouse and payer integrations receive them only over encrypted, BAA-covered connections. Mask them onscreen.

10. Account Numbers

Patient account and billing numbers identify individuals in financial systems. Protect them like other identifiers, and avoid printing them in emails, notifications or exported reports shared outside secured environments. Restrict exports.

11. Certificate and License Numbers

Driver's license numbers and similar certificates identify individuals. If collected for identity verification, store them encrypted, retain them only as long as necessary and delete them according to documented policy.

12. Vehicle Identifiers and Serial Numbers

Vehicle identification numbers and license plates are identifiers, relevant for transport services and accident-related care. Treat them as PHI when linked to patient records, and exclude them from analytics datasets.

HIPAA Identifiers 13–18: Devices, Digital and Biometric Data

The final six identifiers are especially important for digital health products. Device identifiers, IP addresses, URLs and biometric data are collected automatically by apps, websites and connected devices, often without developers realizing they are PHI. Web analytics and tracking technologies on patient-facing pages have attracted regulatory attention for this reason. Our HIPAA compliant app development guide covers related mobile and web design decisions in more detail. Each is explained below.

13. Device Identifiers and Serial Numbers

Medical device serial numbers and mobile device IDs identify individuals when linked to patients. Protect them in remote monitoring platforms and avoid sending them to third-party analytics or advertising tools.

14. Web URLs

URLs can identify individuals, especially personal pages or URLs containing patient identifiers. Never place PHI in URL paths or query strings, because URLs appear in logs, browser history and referrer headers.

15. IP Addresses

IP addresses are identifiers when linked to health information. Protect server logs, restrict tracking scripts on authenticated pages and ensure monitoring tools that collect IP addresses are covered by BAAs.

16. Biometric Identifiers

Fingerprints, voiceprints and facial geometry are identifiers. Prefer platform biometric APIs that keep templates on devices, rather than collecting and storing biometric data on your own servers. Minimize any server-side retention.

17. Full-Face Photographs

Full-face photos and comparable images are identifiers, including profile pictures and clinical images. Store them encrypted, restrict access and remove or blur faces before using images for training or analytics.

18. Any Other Unique Identifying Code

Any other unique number, characteristic or code can identify individuals, except codes created for re-identification under Safe Harbor rules. Review custom identifiers, tokens and reference numbers during design reviews. Document each one.

Designing Schemas for PHI Segregation

Good schema design limits where PHI lives and who can reach it. A common pattern separates identity data from clinical and operational data, linking them with internal surrogate keys. Most application code then works with non-identifying keys, while only specific services access identity tables. This reduces exposure, simplifies encryption and supports de-identification. It also aligns with HIPAA technical safeguards for access control and audit logging. Our HIPAA software development checklist includes related tasks.

Separate Identity From Clinical Data

Store names, contact details and government identifiers in a protected identity table. Clinical, scheduling and billing tables reference patients through surrogate keys, never direct identifiers such as MRNs or emails.

CREATE TABLE patient_identity (
  patient_key UUID PRIMARY KEY,
  mrn_encrypted BYTEA NOT NULL,
  full_name_encrypted BYTEA NOT NULL,
  birth_date_encrypted BYTEA NOT NULL,
  email_hash CHAR(64)
);

CREATE TABLE lab_result (
  result_id UUID PRIMARY KEY,
  patient_key UUID REFERENCES patient_identity(patient_key),
  loinc_code VARCHAR(20) NOT NULL,
  value_numeric NUMERIC,
  resulted_at TIMESTAMPTZ NOT NULL
);

Encrypt Identifier Fields

Apply field-level encryption to high-risk identifiers, such as SSNs, MRNs and member IDs. Use hashes for matching when plaintext is unnecessary, and manage keys through a dedicated key management service.

Restrict Identity Table Access

Grant identity table access only to services that genuinely need it, such as registration or patient communication. Log every access, and review permissions whenever new services are added. Automate permission reviews.

Keep Identifiers Out of Logs and Events

Log surrogate keys and request IDs, not names or MRNs. Review analytics events, error reports and message queues, because identifiers often leak through these channels unnoticed. Scan these channels regularly.

Design for De-identification

Separating identity from clinical data makes de-identification easier, because analytics pipelines can exclude identity tables entirely, then generalize dates and locations to meet Safe Harbor or Expert Determination requirements. Document methods.

Frequently Asked Questions

What is the difference between PHI and PII?

PII is any information that can identify a person in any context. PHI is individually identifiable health information created, received, maintained or transmitted by HIPAA covered entities or business associates. All PHI includes identifying information, but not all PII is PHI, because PHI requires both a health context and HIPAA coverage.

What are the 18 HIPAA identifiers?

The 18 identifiers are names, small geographic subdivisions, dates except year, phone numbers, fax numbers, email addresses, Social Security numbers, medical record numbers, health plan beneficiary numbers, account numbers, certificate or license numbers, vehicle identifiers, device identifiers, URLs, IP addresses, biometric identifiers, full-face photos and other unique identifying codes.

Is an email address PHI?

An email address is PHI when it is linked to health information and held by a HIPAA covered entity or business associate, such as a patient portal login. In a non-healthcare context, the same email address is PII, not PHI. Context and the organization holding the data decide classification.

Are IP addresses considered PHI?

IP addresses are one of the 18 HIPAA identifiers. When linked to health information by a covered entity or business associate, such as visits to authenticated patient portal pages, they can be PHI. This is why tracking technologies and analytics tools on healthcare websites need careful review.

Does GDPR treat health data like HIPAA?

GDPR treats health data as special category data requiring an explicit lawful basis and stronger safeguards. Unlike HIPAA, GDPR applies based on processing personal data of people in the EU, regardless of whether an organization is a healthcare provider. Products serving both markets must meet both frameworks.

How should software store PHI identifiers?

Separate identity data from clinical data, use surrogate keys, encrypt high-risk identifier fields, restrict identity table access, keep identifiers out of logs and analytics, and log all access. This design reduces exposure, simplifies audits and makes de-identification for analytics and research much easier.

Need Privacy-Aware Healthcare Architecture?

Our integration engineers are ready to help. Free consultation, no obligation.