User bio
404 bio not found
Member since Dec 4, 2015
Replies:

What part are you finding overly complicated?  If the text embedded within OBX-5 isn't too large you could treat it as a String rather than Stream, but I don't think that saves you much.  Am I even correct that you're trying to modify unstructured text?  In re-reading this it looks like maybe some of the criteria are in structured fields, e.g., Order Type. Can you give an example of input and desired output?

If I'm reading this right, you need to modify the text you're receiving in OBX-5.

If that's the case, this documentation link should help.  It'll show you how to extract the content from OBX-5 to a Stream object, and save the modified text back into the HL7 Message.

https://docs.intersystems.com/healthconnect20251/csp/docbook/DocBook.UI....

This one will help with processing the text using Stream objects.

https://docs.intersystems.com/healthconnect20251/csp/docbook/DocBook.UI....

I think the general approach would be:

  1. Use a method like GetFieldStreamRaw() or GetFieldStreamBase64() to extract the content from your HL7 message to a Stream object.
  2. Read through the stream applying your rules and write modified text to a new output stream.
  3. Use a method like StoreFieldStreamRaw() or StoreFieldStreamBase64() to replace the original content with your edited version.

You most likely need to configure the Format setting in your Business Operation, assuming you're using EnsLib.EDI.XML.Operation.FTPOperation or EnsLib.EDI.XML.Operation.FileOperation.  Set that to "w" to get the Windows-style CRLF line terminator.  Click the label in the Settings panel to get the full list of options.  Note that these are the same format codes used by the Output* methods in EnsLib.EDI.XML.Document, so you can do the same thing in your own code as well as in the Operation.  You can combine these codes.  For example "wt" would indicate Windows-style line terminators and tab indentation.

Certifications & Credly badges:
Clayton has no Certifications & Credly badges yet.
Global Masters badges:
Clayton has no Global Masters badges yet.
Followers:
Clayton has no followers yet.
Following:
Clayton has not followed anybody yet.