Removing iteration from OBX;5 in ORU 2.5.1 outbound results

Primary tabs

Ensemble, HL7

Hello,

I have been struggling and could use some help as I think I'm burnt.  I am trying to change a Textual 2.5.1 OBX;5 with multiple iterations to a simple non-iterating outbound result.  I have played around with $piece but can't seem to get it to work.  The outcome I would like is for OBX;5 to look like this: |Positive| and currently it looks like this: |Positive~_~_~_~_~|.  Any suggestions would be appreciated.

  • 0
  • 0
  • 209
  • 2
  • 1

Answers

Hi Gigi,

As you've not supplied any code it's hard to know where you are going wrong.

Firstly, just in case you are trying to change the original message object, you can't (it's immutable).

If you are doing this from code then you will need to make a clone of the original object and then set the OBX:5 from the OBX:5.1 value.

If you are using a DTL then map from the OBX:5.1 value to the OBX:5.

Sean.

FOO>set msg=##class(EnsLib.HL7.Message).%OpenId(15)
 
FOO>w msg.RawContent
PID|2|2161348462|20809880170|1614614|20809880170^TESTPAT||19760924|M|||^^^^00000
OBR|1|8642753100012^LIS|20809880170^LCS|008342^UPPER RESPIRATORYCULTURE^L|||19980727175800||||||SS#634748641 CH14885 SRC:THROASRC:PENI|19980727000000||||||20809
OBX|1|ST|008342^UPPER RESPIRATORY||POSITIVE~~~~~~~|

FOO>w !,msg.SetValueAt("Positive","PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).OBX:5")
 
0 0<Ens>ErrGeneralObject is immutable
 
FOO>set msg2=msg.%ConstructClone()
 
FOO>w !,msg2.SetValueAt(msg.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).OBX:5.1"),"PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).OBX:5")
 

1
 
FOO>w msg2.RawContent                                                           

PID|2|2161348462|20809880170|1614614|20809880170^TESTPAT||19760924|M|||^^^^00000
OBR|1|8642753100012^LIS|20809880170^LCS|008342^UPPER RESPIRATORYCULTURE^L|||19980727175800||||||SS#634748641 CH14885 SRC:THROASRC:PENI|19980727000000||||||20809
OBX|1|ST|008342^UPPER RESPIRATORY||POSITIVE|

Comments

Gigi, you tagged your question "Developer Community", but I think that's primarily intended for posts about DC itself. Using one or more of the Ensemble-related subtags, e.g "HL7", might help your post.