There are a few points on this topic that I'd like to clarify, since the
topic arises frequently and documents keep getting larger.
- Ensemble has always been able to pass through large HL7 messages and
segments. To retrieve the contents of such a message or segment, use
any of the OutputTo... methods except OutputToString().
- Long strings support enables use of strings up to 4Gb.
OutputToString() will return up to that amount of contents if long
strings are enabled. Long strings are enabled by default in new
installs of Ensemble 2012.2 or later. They are available as an option
since Ensemble 2007.1.
- Even with long strings enabled, until DDP879 which is first available
in our current Field Test versions, Ensemble's other HL7 API's don't
support working with string values longer than 32k.
- When working with the contents of large HL7 segments, it is not safe
to use strings, whether long or short, because if a segment is that long
it means it is containing large documents and those documents could be
larger than 4Gb.
- Therefore we strongly advise customers to always use stream interfaces
when working with the contents of large segments. This will avoid nasty
surprises when an extra-large document happens to come through. This
should not be an especial burden because you need to work with this sort
of segment you have to write special purpose code to do it in any case.
It's just a matter of writing the code the proper way.
- To manipulate stream data in an HL7 segment, use the GetFieldStream...
and StoreFieldStream... methods of the HL7 Segment class. These were
introduced in Ensemble 2012.1 by TAP1311. In earlier versions, the
methods ReadRawDataStream and StoreRawDataStream were available.
Ted