HL7 v2 Parser Parse to FHIR Deidentify ACK API
Free tier included · MedicalHL7 v2 Parser is a hosted micro-API that parses HL7 v2.x healthcare messages into structured JSON, respecting MSH-declared delimiters for fields, components, subcomponents, and repeats. It decodes escape sequences (\F\ \S\ \T\ \R\ \E\ \Xhh\ \.br\), strips MLLP framing, and handles FHS/BHS batch messages. Beyond parsing, it converts HL7 v2 messages into FHIR R4 Bundles (Patient, Encounter, Observation), validates FHIR R4 JSON resources, generates standard ACK responses, performs HIPAA Safe Harbor de-identification, and extracts Base64/ED attachments from OBX segments.
This API covers parsing, FHIR conversion, validation, and PHI handling. It's ideal for healthtech integrators, lab interface testing, ETL pipelines, and debugging HL7 feeds without self-hosting Mirth or Rhapsody.
The service is stateless and makes no external calls. Messages up to 2 MB are accepted. Parsing is text-based using only Python stdlib. However, the new endpoints (to-fhir, validate-fhir, deidentify, extract-attachments) extend functionality beyond pure parsing. Limits: 500k requests/month on Free, 1M on Pro, 5M on Ultra, 20M on Mega. Hourly caps: 1,000 / 5,000 / 20,000 / 50,000.
Honest limits: This is a parsing and transformation tool, not a clinical validation engine. It does not perform conformance or terminology validation. Use it for integration, debugging, and data transformation — not for clinical decision-making.
Endpoints
| Method | Path | What it does |
|---|---|---|
GET | / | API metadata: name, version, and paths to the interactive docs and health endpoint. |
GET | /health | Liveness probe; returns status "ok" while the process is up. |
POST | /parse | Parse a raw HL7 v2.x message into structured JSON. Body: {"message": "..."}. Respects MSH delimiters, decodes escapes, strips MLLP, handles batches. |
POST | /to-json | Alias of /parse. Parses a raw HL7 v2.x message into structured JSON. |
POST | /to-fhir | Convert an HL7 v2.x message into a FHIR R4 Bundle containing Patient, Encounter, and Observation resources mapped from MSH, PID, PV1, and OBX segments. |
POST | /validate-fhir | Validate a FHIR R4 JSON resource or bundle against structural rules, checking mandatory resourceType and basic field integrity. |
POST | /ack | Generate a standard HL7 v2 ACK response message for an incoming HL7 message, indicating successful parsing and receipt. |
POST | /deidentify | Redact or mask Protected Health Information (PHI) in an HL7 v2 message according to HIPAA Safe Harbor rules (names, dates, IDs). |
POST | /extract-attachments | Scan OBX segments for Encapsulated Data (ED) or Base64 encoded attachments and extract them inline. |
Quick start
curl -X POST "https://hl7.p.rapidapi.com/parse" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: hl7.p.rapidapi.com" \
-H "Content-Type: application/json" \
-d '{"message":"MSH|^~\\&|SENDAPP|SENDFAC|RECVAPP|RECVFAC|20240101120000||ADT^A01|12345|P|2.5\rPID|1||123456^^^MRN||DOE^JOHN||19700101\rOBR|1|ORD12345|TEST^LAB||20240101120000\r"}'
FAQ
Does this API perform clinical validation or conformance checking?
No. It parses HL7 v2.x messages structurally and transforms them. It does not validate against HL7 conformance profiles or terminology. Use it for integration and debugging, not clinical decision-making.
Is the API stateless and does it store my data?
Yes, the API is stateless. Messages are parsed in-memory and not stored. No logs or persistent storage are used.
What is the maximum message size I can send?
Messages up to 2 MB (2,097,152 characters) are accepted. Larger messages will be rejected with a 413 error.
Can I convert HL7 v2 messages to FHIR and also validate the resulting resources?
Yes. Use POST /to-fhir to convert, then POST /validate-fhir to check the structural integrity of the resulting FHIR R4 resources or bundles.
Try HL7 v2 Parser Parse to FHIR Deidentify ACK free
Free tier on every plan. Get an API key and start calling in under a minute.
Open on RapidAPI