0

I got a HL7 message with NTE segment. The HL7 message type RDE_O11 and version 2.5. While passing message with NTE, NHAPI is not parsing it. So with the following message,

MSH|^~\&|xxxx|xxxx|||||RDE^O11^RDE_O11||P|2.5||||||ASCII|||
PID||||||||||||N|||||||||    
PV1|||||||||    
ORC|||||||    
RXO||||||||||||||||||||||||||
RXR||||||
RXE|||||M
NTE|1||#2 from 10/19/15 amb|RE
TQ1||
TQ1|||PO Q6H PRN|A||
RXR||||||

If I change the position of NTE right after MSH, NHAPI is able to parse it.

MSH|^~\&|xxxx|xxxx|||||RDE^O11^RDE_O11||P|2.5||||||ASCII|||
NTE|1||#2 from 10/19/15 amb|RE
PID||||||||||||N|||||||||    
PV1|||||||||    
ORC|||||||    
RXO||||||||||||||||||||||||||
RXR||||||
RXE|||||M
TQ1||
TQ1|||PO Q6H PRN|A||
RXR||||||
Raajkumar
  • 857
  • 2
  • 13
  • 26

1 Answers1

1

What kind of error are you getting? The HL7 specification for the RDE_O11 message structure does allow NTE segments to appear after RXE (among several other locations). So it ought to work.

Nick Radov
  • 401
  • 2
  • 7
  • There are no errors but NULL values. I tried like this, **rdeo11.GetNTE().GetComment()[0].Value** – Raajkumar Oct 22 '15 at 20:39
  • 2
    Then you probably don't actually have a parsing problem, you're just using the API incorrectly. If the NTE is inside a segment group then you need to get the group first and then get the NTE segment inside it. – Nick Radov Oct 22 '15 at 23:54
  • Thank you. Didn't noticed that. NTE was inside RDE_O11_ORDER group. – Raajkumar Oct 23 '15 at 14:13