Question
· Jan 30

How can I correctly add the OBXgrp(1).OBX segment to an HL7 message?

Hello,

I'm trying to add another segment to an HL7 MDM message. More specifically OBXgrp(1).OBX. The addition itself works,. When I look at the message in the trace, the segment with the content can be seen. However, it is not displayed as an OBX segment.

 

Build Map Status = 'ERROR <EnsEDI>ErrMapRequired: Missing required OBXgrp(1) element at segment 6'
'ERROR <EnsEDI>ErrMapSegUnrecog: Unrecognized Segment 6:'' found after segment 5 (TXA)'


// HL7-Nachricht klonen
    Set response = msg.%ConstructClone()

// OBX-Segment erstellen
    Set tSegmentOBX = ##class(EnsLib.HL7.Segment).%New()
    Set tSegmentOBX.SegType = "2.7:OBXgrp(1).OBX"
    
   .
   .
   .
   Set tSC = tSegmentOBX.SetValueAt("bla", 3, "set")
   .
   .
   // OBX-Segment an Position 6 einfügen
    Set tSC = response.InsertSegmentAt(tSegmentOBX, 6)
    If $$$ISERR(tSC) {
        Return $$$ERROR($$$GeneralError, "Fehler beim Einfügen des OBX-Segments an Position 6.")
    }
    .
    .
    .
    Set status = ..SendRequestAsync(target, response)
    .
    .

What do I need to change or adjust so that the segment appears correctly in the message?

 

 

Many thanks in advance 

Product version: HealthShare 2023.1
Discussion (2)2
Log in or sign up to continue