HL7 v2 integration with Aidbox Project
Last updated
Was this helpful?
Last updated
Was this helpful?
The HL7 v2 pipeline is the next step in , which uses new versions of the HL7 v2 parser and mapper driven by zen/lang configurations. The HL7 v2 pipeline is fully configurable API and is robust against mismatches with HL7 v2 specification.
The HL7 v2 pipeline uses a new version of the HL7 v2 parser, transforming the message into an intermediate format between FHIR and HL7 v2. This is necessary to preserve the original HL7 v2 fields, while allowing you to write the mapping from a structure close to FHIR.
HL7 v2 into intermediate format example:
Now only the default configuration is available, but in future versions of the HL7 v2 pipeline it is expected to be possible to configure the transformation of Z segments and unusual message structures.
To convert from an intermediate format to FHIR Bundle or Aidbox Bundle, you need to define mapping, which should be tagged as lisp/mapping
and contain the :mapping
key. The :mapping
value confirms as lisp/expr
so you may use to define which intermediate format properties should be included in the Bundle resource.
The HL7 v2 pipeline is primarily a user-configurable API that allows you to describe REST endpoints for different message types and operations for them. HL7 v2 pipeline operations must use hl7v2.api/in-op
engine, as well as contain previously defined mapping and parser-config.
For example, you need to define an API with an operation to process an ADT message and then write it to the database.
Also, each endpoint accepts a boolean query argument debug
, which allows you to return a response instead of writing data to the database.
Each declared endpoint accepts a HL7 v2 message under the "message"
key. It can be invoked directly through a REST request or through the on the corresponding tab in the Aidbox UI.