Mapping HL7 v2 to FHIR without rewriting your system
Most hospitals in LATAM still emit HL7 v2 messages. This is how Harmony translates them into FHIR resources with versioned, auditable rules.
An ADT^A01 message contains almost everything needed to create a FHIR Patient and Encounter. The problem lies in the “almost.”
Rules, not scripts
Harmony defines the mapping as a set of declarative rules. Each rule specifies a source field, a transformation and a target FHIR path.
PID-5.1 → Patient.name.family
PID-7 → Patient.birthDate (format: YYYYMMDD → date)
PV1-2 → Encounter.class (map: I→IMP, O→AMB, E→EMER)
Test before you activate
Every mapping is validated against the country's FHIR profile before it goes into production. Harmony only reports validation codes and counts: it never exposes patient values during testing.
Versioning
When a rule changes, the previous version stays on record. If a resource was generated with rule 12, you will always be able to know what rule 12 said.

