FHIR Mapper

Map flat CSV or JSON data to FHIR resources with built-in templates and editable field mappings. Runs entirely in your browser; nothing is uploaded.

How to use the FHIR Mapper

  1. Pick a mapping template for your source data.
  2. Paste your data, or load the template's sample to see the expected input format.
  3. Run the mapping, then copy or download the FHIR output, or open it in the Validator.

The mapping runs in your browser; your source data isn't uploaded.

The templates

TemplateInputOutput
CSV to Patient BundleCSV with columns id, firstName, lastName, gender, dob, phone, email, street, city, state, zipA collection Bundle with one Patient per row
Lab Result to ObservationA JSON object with patientId, testCode, testName, value, unit, referenceRange, collectionDate, statusOne laboratory Observation
Vital Signs to Observation BundleA JSON object with weight, height, bloodPressure, heartRate, temperatureA Bundle of vital-signs Observations with LOINC codes

The templates add the coding you'd otherwise have to look up:

  • gender M/F becomes male/female (anything else becomes unknown).
  • The lab test codes GLU, HGB, WBC and CHOL map to LOINC 2339-0, 718-7, 6690-2 and 2093-3. Other codes pass through unchanged.
  • Vitals use LOINC body weight 29463-7, body height 8302-2, blood pressure panel 85354-9 (with systolic 8480-6 and diastolic 8462-4 components), heart rate 8867-4 and body temperature 8310-5, all with category: vital-signs.

Worked example

This CSV row:

id,firstName,lastName,gender,dob,phone,email,street,city,state,zip
P001,John,Smith,M,1990-05-15,555-123-4567,john.smith@email.com,123 Main St,Boston,MA,02101

becomes a Patient with name: [{ family: "Smith", given: ["John"] }], gender: "male", birthDate: "1990-05-15", a home phone and an email in telecom, and a US address, inside a collection Bundle.

Limitations — check the output before using it

The templates are starting points for learning and prototyping, not production mappers:

  • The CSV parser is simple. It splits on commas, so quoted values containing commas ("Smith, Jr.") break the row. The column names must match the template exactly.
  • Empty cells can produce invalid FHIR. A blank dob becomes "birthDate": "", and a row with no phone or email gets an empty telecom array. FHIR forbids both. Run the output through the Validator and remove empty values.
  • fullUrl values like urn:uuid:patient-P001 aren't real UUIDs. Some servers reject them. For a transaction, rebuild the Bundle in the Bundle Builder, which generates proper UUIDs.
  • Units are copied as written. The lab template uses your unit text as the UCUM code, and the temperature sample's "Celsius" isn't a valid UCUM code (Cel is). Check valueQuantity.code against UCUM.
  • Templates are fixed. You can't define your own field mappings yet. For real pipelines, use a mapping engine such as the FHIR Mapping Language, an integration engine, or code with a FHIR library.

FAQ

Can I map HL7 v2 messages?

Not with this tool. HL7 publishes a v2-to-FHIR implementation guide with recommended mappings, and most integration engines implement it.

Which FHIR version is the output?

The resources use elements that are the same in R4 and R5, so the output works in either.

Is my source data uploaded?

No. The templates run as JavaScript in this page.

How do I turn the output into a transaction?

Paste the resources into the Bundle Builder, choose transaction, and it adds proper urn:uuid fullUrls and request elements.

FHIR Toolbox is a free collection of HL7 FHIR tools by Omindra Labs. The tools process your data in your browser; it is not uploaded for normal tool operations.