Selected work

Architecture study

HL7 v2 → FHIR Integration

A deterministic admission and result transformation with explicit field mappings and resolvable FHIR references.

HL7 v2.5 · FHIR R4 · Python · Pydantic · FastAPI · pytest

Interoperability

Same information. A shared language.

HL7 v2.5
PID|1||SYN-1042
MUSTER^AVA
19890514
FHIR R4
Patient.identifier
Patient.name
Patient.birthDate
Mapping study · From HL7 v2 to FHIR R4
Problem

Why this system exists

Point-to-point healthcare feeds become fragile when mappings are implicit, error handling is inconsistent, or downstream resources lose their source context.

System context

Boundary and data flow

The reference design separates transport, parsing, mapping, and persistence. Each accepted message receives an immutable trace ID; mapping produces a transaction-ready FHIR Bundle plus structured warnings.

Technical decisions

Trade-offs made explicit

  • Map through a typed intermediate event model instead of transforming strings directly into FHIR JSON.
  • Keep message validation errors distinct from recoverable mapping warnings.
  • Require all local FHIR references to resolve before a bundle can be emitted.

CHALLENGES

  • Preserving repetitions and optional HL7 fields without inventing values.
  • Normalizing local codes while retaining the original coding.
  • Making reprocessing idempotent across duplicate delivery attempts.
Security

Safe system boundaries

  • Terminate transport encryption before the isolated integration boundary.
  • Redact message payloads from logs while retaining non-sensitive trace metadata.
  • Validate message size, segment count, encoding characters, and resource output.
Outcome & learning

What the build demonstrated

ADT^A01 and ORU^R01 examples produce stable Patient, Encounter, Location, Observation, and RiskAssessment resources with reviewable field lineage.

LESSONA robust mapper is less about clever conversion code and more about explicit contracts, replay safety, terminology boundaries, and observable failure modes.