03 / 04Case study · 2024 · Data · Healthcare
HIPAA-compliant HL7 ingestion, anonymization, and multi-tenant portal

Overview
This platform enables Health Information Exchanges (HIEs) to ingest raw HL7 v2 data, clean and validate it, anonymize all PHI per HIPAA Safe Harbor standards, and deliver anonymized datasets to customer-facing portals and APIs. The system uses a two-zone architecture: an air-gapped node for PHI processing and a public-facing orchestrator for the web app, dashboards, and exports. It supports multi-tenant isolation, batch job tracking, quality reports, and multiple export formats (clean HL7, FHIR R4, OMOP CSV).
The Challenge
HIEs aggregate health data from dozens of hospitals and clinics, but each facility sends data in different formats with inconsistent quality. Raw HL7 v2 messages often contain duplicates, malformed fields, missing required data, and inconsistent coding systems. Before sharing data with researchers or payers, PHI must be removed or anonymized—a process that, if done manually, is slow and error-prone. The goal was to build an automated pipeline that could ingest, parse, clean, anonymize, and export health data at scale, while maintaining strict HIPAA compliance and multi-tenant isolation.
Approach
Technical Architecture
Key Features Built
Platform Screenshots



Hard problems
HL7 parsing failures on malformed segments.
Built fault-tolerant parser with fallback extraction; logged errors for manual review.
Slow batch inserts for 100K+ messages.
Implemented batched INSERT with psycopg2 execute_batch; reduced ingestion time from minutes to seconds.
Ensuring deterministic anonymization (same patient → same anonymized ID across batches).
Used HMAC-SHA256 with org-specific salt; stored mapping (never synced).
Date shifting while preserving temporal relationships.
Applied consistent shift per patient; validated that event order remained intact.
Results