· Nov 20

HL7 field for base64 in orl

Hi everyone,

It could be great if some of you have had experience in hl7 v2 messages. The question is about FHIR to hl7 v2.5 conversion. I have to translate a binary resource, encoded in base64 into an orl_o22 message. Do you have advices? Which field could be used for that datatype? 
I have found some implementation using nte segment but it is limited in characters.


Thank you

Discussion (5)3
Log in or sign up to continue

The NTE segment is commonly used for plain-text "notes" containing descriptive data that doesn't conform to the structured format used for most other data in HL7 messages. It could certainly be used for the storage of base64-encoded binary data, and the likely candidate for that would be the NTE:3 Comment field.

If the base64 content is less than ~3.5MB in size, it can be assigned directly to that field in a DTL or using the SetValueAt() method of the message object (Note: the HL7 specification does not define a maximum length for the Comment field, but there are considerations for IRIS storage that need to be handled appropriately). If larger than 3.5MB, it must be stored using the StoreFieldStreamRaw() method of the EnsLib.HL7.Message object (there is also a StoreFieldStreamBase64() method but it's not applicable if your data is already in base64 format). If you must use the StoreFieldStreamRaw() method, note that it must be the last method called against the NTE segment as it makes the segment immutable.

The recipient of the ORL_O22 message must be informed of this atypical use of the NTE segment so that it can be handled appropriately.