POST /convert/v1/hl7tofhirr4/:patientID
This operation converts one or more HL7v2 messages into a FHIR R4 bundle.
The input is a single or newline-delimited set of HL7v2.7 messages. Supported message types include:
The Convert API utilizes context within the messages to intelligently process the message segments. For example, OBX segments may be converted to either Observations or LabObservations depending on the message type.
The output is a FHIR R4 Bundle containing the clinical data parsed out of the HL7 messages, along with an OperationOutcome resource detailing the results (including warnings or errors) of the conversion process.
The input for the HL7 to FHIR conversion is plain text, so be sure to specify content-type: text/plain
in your request header.
You can specify either accept: application/json
or accept: application/xml
in your request header to get a response in either JSON or XML format.
MSH|^~\&|||||20220308040000||ADT^A01|||2.7
EVN|A01|20220308040000
PID|1||123456||Test^Patient|||||||||||||7890
PV1|1|I||||||||||||||||||||||||||||||||||||||||||20220308040000"
FHIR Bundles are verbose, so the output below just shows a small sample to illustrate how the data is structured. For a more complete example, try out the API in the Developer Portal Sandbox, or refer to the FHIR Specification.
{
"resourceType": "Bundle",
"type": "searchset",
"entry": [
{
"resource": {
"resourceType": "Patient",
... (patient fields)
}
},
{
"resource": {
"resourceType": "Encounter",
... (encounter fields)
}
},
...
{
"resource": {
"resourceType": "OperationOutcome",
"issue": [
... (any processing issues)
}
}
]
}