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
- Pick a mapping template for your source data.
- Paste your data, or load the template's sample to see the expected input format.
- 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
| Template | Input | Output |
|---|---|---|
| CSV to Patient Bundle | CSV with columns id, firstName, lastName, gender, dob, phone, email, street, city, state, zip | A collection Bundle with one Patient per row |
| Lab Result to Observation | A JSON object with patientId, testCode, testName, value, unit, referenceRange, collectionDate, status | One laboratory Observation |
| Vital Signs to Observation Bundle | A JSON object with weight, height, bloodPressure, heartRate, temperature | A Bundle of vital-signs Observations with LOINC codes |
The templates add the coding you'd otherwise have to look up:
genderM/Fbecomesmale/female(anything else becomesunknown).- The lab test codes
GLU,HGB,WBCandCHOLmap to LOINC2339-0,718-7,6690-2and2093-3. Other codes pass through unchanged. - Vitals use LOINC body weight
29463-7, body height8302-2, blood pressure panel85354-9(with systolic8480-6and diastolic8462-4components), heart rate8867-4and body temperature8310-5, all withcategory: 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
dobbecomes"birthDate": "", and a row with no phone or email gets an emptytelecomarray. FHIR forbids both. Run the output through the Validator and remove empty values. fullUrlvalues likeurn:uuid:patient-P001aren'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
unittext as the UCUM code, and the temperature sample's"Celsius"isn't a valid UCUM code (Celis). CheckvalueQuantity.codeagainst 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.