π HOW TO BE HIPAA COMPLIANT FOR A HEALTH & MEDICAL PRACTICE
The Complete Infrastructure, Configuration & Operations Guide
How To Use This Document:
This is the single source of truth for DEEPdormir's HIPAA compliance infrastructure. It covers every layer of the technology stack β from the server the website runs on to the email a patient receives after submitting a form. It is written for the people building and operating the system. It is not a legal document β it is an operational blueprint. Read it fully once. Then use it as a build checklist.
CHAPTER 1: HIPAA FUNDAMENTALS β WHAT EVERY TECHNICAL OPERATOR MUST KNOW
1.2 β Who DEEPdormir Is Under HIPAA
DEEPdormir.ai is a dental and sleep medicine practice. It is a Covered Entity. This classification is not optional. A solo practitioner treating one patient per day has the same legal obligations as a hospital system.
1.3 β What Proscris Agency Is Under HIPAA
By providing technology infrastructure, digital marketing, and automation, Proscris Agency is a Business Associate (BA). We are not a bystander. We are a named party in the regulatory framework with direct legal liability.
1.4 β What PHI Is (The 18 Identifiers)
Protected Health Information (PHI) is created when any of the following are combined with health information:
| # | Identifier | Example in Context |
|---|---|---|
| 1 | Names | Patient names |
| 2 | Geographic data | Address, City, Zip |
| 3 | Dates (not year) | Appointment/Birth dates |
| 4 | Phone numbers | Mobile/Home |
| 5 | Fax numbers | Referral faxes |
| 6 | Email addresses | Patient email |
| 7 | SSN | Insurance forms |
| 8 | Medical record # | Internal Patient IDs |
| 9 | Health plan # | Insurance IDs |
| 10 | Account # | Billing accounts |
| 11 | License # | Provider NPI |
| 12 | Vehicle IDs | (Rarely relevant) |
| 13 | Device IDs | CPAP serial numbers |
| 14 | Web URLs | Patient record links |
| 15 | IP addresses | Visitor IP on health pages |
| 16 | Biometric IDs | Fingerprints |
| 17 | Full-face photos | Before/After photos |
| 18 | Unique numbers | Any other ID |
The Critical Vector: Identifier #15 (IP Addresses). A visitor's IP address combined with their presence on a URL like /sleep-apnea-treatment constitutes ePHI. This makes standard pixels and analytics a liability if not configured correctly.
CHAPTER 2: THE BUSINESS ASSOCIATE AGREEMENT (BAA)
A BAA must be signed before any system configuration begins. Here is the master execution list:
| Vendor | Service | How To Execute |
|---|---|---|
| Proscris Agency | CTO Services | Sign standard Proscris BAA template. |
| Google Workspace | Email/Drive/Docs | Admin Console β Account Settings β Legal β HIPAA Amendment. |
| Google Cloud (GCP) | Hosting/Database | GCP Console β IAM & Admin β Settings β Compliance β HIPAA Amendment. |
| Cloudflare | DNS/WAF | Contact Enterprise Sales/Support for BAA. |
| Paubox | Encrypted Email | Executed during account creation. |
CHAPTER 3: THE INFRASTRUCTURE β GOOGLE CLOUD PLATFORM
We use GCP because one BAA covers the entire stack: Hosting, Database, Automation, and Storage. The client owns everything.
3.2 β GCP Project Architecture
GCP PROJECT: deepdormir-production
β
βββ COMPUTE ENGINE
β βββ VM: deepdormir-wordpress (Nginx + PHP 8.2 + WordPress)
β βββ VM: deepdormir-n8n (Docker + n8n + PostgreSQL)
β
βββ CLOUD SQL
β βββ Instance: deepdormir-mysql (Encrypted at rest, Private IP)
β
βββ CLOUD STORAGE
β βββ Bucket: deepdormir-wp-media (Private, backups)
β
βββ CLOUD LOGGING
β βββ Audit Log Sink β Storage Bucket (6-year retention)
β
βββ SECRET MANAGER
βββ Stores: Database passwords, API keys, Encryption keys
3.3 β WordPress VM Configuration (Nginx Security)
# /etc/nginx/sites-available/deepdormir.ai
server {
listen 443 ssl http2;
server_name deepdormir.ai www.deepdormir.ai;
# Strong TLS β TLS 1.2 and 1.3 only
ssl_protocols TLSv1.2 TLSv1.3;
# Security headers (HIPAA Requirement)
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
# Block access to sensitive files
location ~ /\.(ht|git|env) { deny all; }
location ~ /wp-config\.php { deny all; }
location ~ /xmlrpc\.php { deny all; }
}
3.4 β n8n Docker Configuration (HIPAA Hardening)
# docker-compose.yml excerpt
n8n:
environment:
# Security β CRITICAL
N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY} # Encrypts credentials at rest
# Audit Logging
N8N_LOG_LEVEL: info
N8N_LOG_OUTPUT: file
EXECUTIONS_DATA_SAVE_ON_SUCCESS: all
EXECUTIONS_DATA_SAVE_ON_ERROR: all
EXECUTIONS_DATA_MAX_AGE: 2160 # 90 days hot
CHAPTER 5: WORDPRESS β COMPLETE HIPAA CONFIGURATION
5.1 β Approved Plugin Stack
- β ASE Pro: Admin control and role management.
- β Wordfence Security: WAF and login security.
- β WP 2FA: Mandatory Two-Factor Authentication.
- β WP Activity Log: Audit trail of all admin actions.
- β UpdraftPlus: Encrypted remote backups to Google Drive.
Banned Plugins (Risk Vectors)
- β GA4/Google Analytics Plugins (Use GTM + Consent Mode only)
- β Meta Pixel Plugins (Browser-side pixels are non-compliant)
- β Contact Form 7 / Gravity Forms (if storing entries in DB)
- β Jetpack / Akismet (Data processing without BAA)
CHAPTER 6: THE FORMS β CUSTOM HTML INTAKE ARCHITECTURE
The Principle: The website never stores, processes, or holds form data. Data flows `Browser -> HTTPS -> n8n (BAA) -> Sheets (BAA)`.
6.2 β Production Form Code
// CLIENT-SIDE FORM HANDLER
// 1. Captures form data
// 2. Captures UTM parameters
// 3. Sends DIRECTLY to n8n webhook (bypassing WP database)
const WEBHOOK_URL = 'https://n8n.deepdormir.ai/webhook/patient-inquiry';
form.addEventListener('submit', async function(e) {
e.preventDefault();
const formData = new FormData(form);
const payload = Object.fromEntries(formData.entries());
// Append Metadata
payload.submitted_at = new Date().toISOString();
payload.source_url = window.location.href;
// Send to n8n
const response = await fetch(WEBHOOK_URL, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Form-Secret': 'YOUR-SECURE-KEY'
},
body: JSON.stringify(payload),
});
// UI Feedback Handling...
});
CHAPTER 7: n8n AUTOMATION β THE PHI FIREWALL
We use n8n to filter data before it reaches marketing platforms. This is the "PHI Firewall."
Node Logic: The CAPI Filter
// DEEPdormir β Meta CAPI Payload Builder (PHI FIREWALL)
// Explicitly documents what IS and IS NOT sent to Meta
// ββ WHAT IS SENT (Allowlist) ββββββββββββββ
// β
event_name: "Lead" (Generic)
// β
event_time: Timestamp
// β
em / ph: SHA-256 HASHED email/phone (No plaintext PII)
// β
custom_data: lead_source, lead_campaign (Attribution only)
// ββ WHAT IS BLOCKED (Denylist) ββββββββββββ
// β Full Name (HIPAA Identifier #1)
// β Message Body (Potential Health Info)
// β Inquiry Type (Health Context)
// β Source URL (e.g. /sleep-apnea-treatment)
// β IP Address (HIPAA Identifier #15)
return {
event_name: 'Lead',
action_source: 'website',
user_data: {
em: [sha256(input.email)],
ph: [sha256(input.phone)]
},
custom_data: {
lead_source: input.utm_source
}
};
CHAPTER 10: ADMINISTRATIVE SAFEGUARDS
10.4 β Breach Response Protocol
- CONTAIN (1 Hour): Stop exposure, revoke access, preserve logs.
- ASSESS (24 Hours): Apply the 4-Factor Risk Assessment test.
- NOTIFY CLIENT (24 Hours): Inform DEEPdormir Privacy Officer.
- NOTIFY REGULATORS: Client notifies HHS/Patients (within 60 days).
- REMEDIATE: Fix vulnerability and update Risk Assessment.
- DOCUMENT: Retain incident report for 6 years.
10.5 β Access Control Policy
Revocation Rule: Access for departed employees/contractors must be revoked within 1 hour of termination.
CHAPTER 11: DENTAL & SLEEP SPECIFIC CONSIDERATIONS
11.2 β The Online Review Protocol ($50k Risk)
Never confirm a patient's identity in a review response.
Approved Negative Response: "Thank you for sharing your feedback. We take all patient experiences seriously and are committed to high quality care. We'd welcome the opportunity to discuss your concerns directly β please contact us at [phone]."
11.3 β Patient Photography
Strict Rule: No patient photo (smile, sleep appliance fit, before/after) goes on the website or social media without a specific, signed HIPAA Media Authorization form stored in their file.
CHAPTER 12: THE COMPLETE COMPLIANCE CHECKLIST
Phase 1: Infrastructure
- β GCP Project created & BAA signed
- β WordPress VM & Cloud SQL created (Private IP)
- β Audit logging enabled (6-year retention)
- β MFA enforced on all GCP accounts
Phase 2: WordPress Hardening
- β Plugins installed (Wordfence, WP 2FA, Activity Log)
- β XML-RPC disabled
- β Admin user not named "admin"
- β 2FA enforced for all editors/admins
Phase 5: Forms & CAPI
- β Custom HTML form deployed (No DB storage)
- β CAPI workflow tested with Test Event Code
- β Confirmed zero PHI in CAPI payload
- β Browser-side Pixel removed/blocked
Phase 8: Administrative
- β Notice of Privacy Practices published
- β Staff HIPAA training completed & logged
- β Risk Assessment documented
- β BAA Master Log updated
APPENDIX: QUICK REFERENCE
| Term | Definition |
|---|---|
| BAA | Business Associate Agreement. Required for all vendors touching PHI. |
| ePHI | Electronic Protected Health Information. |
| CAPI | Conversions API. Server-side tracking that allows PHI filtering. |
| Minimum Necessary | HIPAA rule limiting access to only what is needed for the role. |
| Paubox | HIPAA-compliant encrypted email provider. |
Sources
- HHS β HIPAA for Professionals
- HHS β HIPAA Privacy Rule
- HHS β HIPAA Security Rule
- HHS β Tracking Technology Guidance December 2022
- HHS β HIPAA Security Rule NPRM Factsheet 2025
- Google Cloud β HIPAA Compliance
- Google Cloud β HIPAA BAA Terms
- Google Workspace β HIPAA Functionality List
- HIPAA Journal β Is Google Workspace HIPAA Compliant?
- HIPAA Times β Google Calendar HIPAA Compliance 2025
- HIPAA Vault β Is GCP HIPAA Compliant?
- HIPAA Vault β HIPAA Security Rule Updates 2025
- HIPAA Insider β HIPAA Compliant WordPress on Google Cloud
- HIPAA Journal β WordPress HIPAA Compliance
- HIPAA Journal β One Third of Healthcare Websites Have Meta Pixel
- HIPAA Journal β HIPAA Rules for Dentists
- Compliancy Group β Trio of Dentist HIPAA Violations
- Compliancy Group β HIPAA Compliance Checklist
- Compliancy Group β Is Google Sheets HIPAA Compliant?
- Hipalytics β 2025 Security Rule Updates for GA4 and GTM
- Meta Developers β Conversions API Documentation
- Meta Developers β Deduplicate Pixel and Server Events
- Amsive β HIPAA Compliant Martech Stack 2025
- Curve Compliance β Facebook Healthcare Ad Policies 2026
- Paubox β Is Facebook Pixel HIPAA Compliant?
- Resonateapp β HIPAA Compliance Dentistry Statistics
- Latenode β n8n Cloud vs Self-Hosted 2025
- No Code Creative β n8n Webhooks Security Guide
- Accountable HQ β Google Sheets HIPAA Compliance