Why this matters
Sending PHI to vendors without BAAs risks violations; de-identification reduces exposure.
Any PR that adds or modifies telemetry/analytics must prove that no PHI leaves the boundary. Use irreversible tokenization or hashing (HMAC with secret salt) for identifiers and document the data dictionary.
Sending PHI to vendors without BAAs risks violations; de-identification reduces exposure.
Side-by-side examples engineers can pattern-match during review.
PR code adds: analytics.track('view_record', { name, dob, diagnosis })PR code uses: analytics.track('view_record', { patient_token: hmac(patientId), age_bucket: '40-49' })
PR includes: analytics_data_dictionary.mdanalytics.track('lab', { patientName })analytics.track('lab', { patient_token: hmac(patientId) })From the same buckets as this rule.
Before persisting ePHI, encrypt using a data key protected by a Key Management Service (KMS). Use authenticated encryption (AES-256-GCM or equivalent), rotate keys, and store the key id and algorithm with the record.
Never write Protected Health Information (PHI/ePHI) to logs. Redact fields like name, SSN, MRN, DOB, address, diagnoses, and lab results; store only non-identifying metadata and a stable request trace id. If logging is required for troubleshooting, replace values with consistent tokens and record access separately in the audit log.