How Sales Engineers Can Automate High-Value Deal Hunting With Salesforce & HubSpot Integrations
October 1, 2025How to Build a Winning LegalTech E-Discovery Platform in 2025: Lessons from the World’s Best ‘Cherrypicks’
October 1, 2025As a HealthTech engineer building telemedicine and EHR systems, I’ve seen firsthand how HIPAA compliance can make or break a product. It’s not just about checking boxes – it’s about building trust into every line of code. After years of late-night audits and security incidents (yes, I’ve been there), I’m sharing my 2025 “cherry-picked” technical playbook for building systems that are secure, compliant, and actually work for patients and providers.
Why HIPAA Compliance Is Your System’s Security Backbone
Forget thinking of HIPAA as just encryption and access logs. The full picture includes:
- Administrative safeguards: Your policies, staff training, and risk analysis
- Physical safeguards: Who gets access to which devices and facilities
- Technical safeguards: Access controls, audit trails, data integrity, encryption
Here’s the hard truth: treating compliance as an afterthought is the #1 mistake I see teams make. HIPAA needs to be baked into your architecture from day one – not bolted on at the end.
Start with a Risk Analysis (Seriously, Do It First)
Too many startups skip this step, but I won’t let my teams start coding without one. Use tools like HIPAA Ready or Clearwater Compliance to map:
- Where patient data enters your system
- Every place it gets stored (EHR, queues, logs)
- All processing steps (AI models, API calls)
- How it ultimately gets deleted
This isn’t paperwork – it’s your treasure map to avoiding costly mistakes. One team I worked with avoided 300+ hours of rework when we caught a third-party analytics tool was processing PHI without a proper contract.
Encrypting EHR Data: What Actually Works
Using TLS and “encrypt at rest” isn’t enough. Real HIPAA compliance requires layered protection that follows your data everywhere.
1. Use AES-256 with FIPS 140-2 Validated Modules
Don’t roll your own crypto. Stick with FIPS-validated libraries:
// Node.js example with AWS KMS & FIPS-enabled encryption
const { KMSClient, EncryptCommand } = require('@aws-sdk/client-kms');
const kms = new KMSClient({ region: 'us-east-1' });
async function encryptEhrData(plaintext) {
const command = new EncryptCommand({
KeyId: process.env.EHR_ENCRYPTION_KEY,
Plaintext: plaintext,
});
const result = await kms.send(command);
return result.CiphertextBlob;
}Real-world tips:
- Use a HSM-backed KMS (AWS KMS or Google Cloud KMS)
- Rotate keys every 90 days – or after any staff changes
- Never, ever hardcode keys in your repos or CI/CD
2. Encrypt Data in Transit – Even Within Your Network
Set up mutual TLS (mTLS) between services:
# Kubernetes Ingress with mTLS
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ehr-api-ingress
annotations:
nginx.ingress.kubernetes.io/auth-tls-verify-client: 'on'
nginx.ingress.kubernetes.io/auth-tls-secret: 'default/ca-cert'This stops attackers from hopping between services if one gets compromised – a common EHR attack path.
3. Tokenize Sensitive Fields
For analytics, strip PHI before it leaves your system:
- Replace names with tokens using a secure vault (like Hashicorp Vault)
- Only authorized staff can re-identify patients
- See:
Patient Name: [TOKEN-7X9K]in your logs
Telemedicine Software: Building What Works (and Stays Compliant)
Telehealth is still the wild west for compliance. Many “HIPAA-compliant” vendors cut corners. Here’s the right way.
End-to-End Encryption for Video Calls
Zoom and Teams aren’t enough for PHI. Build with WebRTC with DTLS-SRTP + End-to-End Encryption (E2EE):
- Generate new keys for every session with the Web Crypto API
- Store keys encrypted with user-specific keys (not on servers)
- Try this: Open-source E2EE WebRTC template
Secure Messaging That Actually Stays Secure
For chat in your EHR, use the Double Ratchet Algorithm (like Signal):
// Pseudocode for secure messaging
function sendSecureMessage(recipient, plaintext) {
const ephemeralKey = generateEphemeralKey();
const sharedSecret = deriveSharedSecret(userPrivateKey, recipientPublicKey);
const encrypted = aesGcmEncrypt(sharedSecret, plaintext);
return { encrypted, ephemeralKey };
}Extra credit: Add auto-delete messages (30 days is a good default, but let orgs customize).
Audit Logs: Your Compliance Lifeline
HIPAA requires tracking every PHI access. Most systems fail by logging too little or way too much. Try this:
- Structured logging with OpenTelemetry
- Immutable storage (AWS CloudWatch Logs + AWS Backup)
- Anomaly detection (like “Dr. Smith opened 50 records in 60 seconds”)
// Log PHI access with OpenTelemetry
const { trace, context } = require('@opentelemetry/api');
tracer.startActiveSpan('EHR_READ', (span) => {
span.setAttribute('user.id', userId);
span.setAttribute('ehr.record_count', records.length);
span.setAttribute('patient.id', patientId);
span.end();
});Managing Third-Party Risks (BAA, APIs, & Subcontractors)
Your security is only as strong as your weakest vendor. Every service that touches PHI needs a Business Associate Agreement (BAA).
Vendors That Absolutely Need BAAs
- Cloud providers (AWS, GCP, Azure) ✅ (they’ll sign)
- Video conferencing (e.g., Twilio Video) ✅ (must use PHI tier)
- Analytics (e.g., Snowflake, BigQuery) ❌ (unless BAA configured)
- Email (e.g., SendGrid) ❌ (never put PHI in emails)
Pro move: Use BAAVault to track expiration dates and auto-renew.
API Contracts for PHI
When building EHR APIs:
- Require OAuth 2.0 with specific scopes (like
ehr:read) - Set rate limits (100 requests/minute per client)
- Follow FHIR R4/R5 standards for interoperability
Disaster Recovery & Data Integrity
HIPAA requires data availability, integrity, and confidentiality. Most teams nail the first two but forget integrity.
Immutable Backups
Use write-once-read-many (WORM) for EHR backups:
- AWS S3 Object Lock
- Google Cloud Storage Retention Policies
- Automate backups with Point-in-Time Recovery (PITR)
Data Integrity Checks
Hash every EHR record when written and verify on access:
// Generate SHA-256 hash on write
const crypto = require('crypto');
function createEhrRecord(data) {
const hash = crypto.createHash('sha256').update(JSON.stringify(data)).digest('hex');
return { ...data, _hash: hash };
}
// Verify on read
if (storedData._hash !== recomputeHash(storedData)) {
throw new Error('Data integrity compromised!');
}Your 2025 HealthTech Compliance Checklist
After countless audits, security incidents, and 3 AM calls, here’s what really matters:
- Start with risk analysis – it’ll save you time and money
- Encrypt everything – in transit, at rest, even in memory (mTLS, AES-256, KMS)
- Log everything – but make it audit-ready
- Tokenize PHI – especially for analytics and sharing
- Sign BAAs – with every vendor touching PHI
- Test disaster recovery – quarterly drills save lives
HIPAA compliance isn’t a headache – it’s your superpower. In 2025, patients and providers want systems they can trust. Build that trust into your code, architecture, and culture. That’s the real win.
Related Resources
You might also find these related articles helpful:
- How Sales Engineers Can Automate High-Value Deal Hunting With Salesforce & HubSpot Integrations – Great sales teams don’t just work hard—they work smart. And the secret? The right tech in the right hands. If you’re a s…
- How to Build a Custom Affiliate Tracking Dashboard That Uncovers Hidden Revenue (Like a Pro Cherry-Picker) – Want to stop leaving money on the table with your affiliate campaigns? Here’s the truth: off-the-shelf tracking pl…
- Building a Headless CMS: My Blueprint for a Flexible, API-First Architecture Using Strapi, Next.js, and Modern Jamstack Tools – Let me tell you a secret: I used to dread CMS migrations. Wrestling with WordPress? Nightmare. Monolithic systems? Clunk…