Question
· Dec 22, 2016

Query related to schema message structure

Hi All,

I have below schema structure:

base:MSH~{~[~base:PID~[~{~base:NK1~}~]~[~base:PV1~[~base:PV2~]~]~]~{~[~base:ORC~]~base:OBR~[~{~base:NTE~}~]~base:TQS~[~{~[~{~OBX~}~]~[~{~base:NTE~}~]~}~]~}~}

Now there are few cases where source application is sending NTE segment after TQS segment

Is there any way of updating the schema to use the same NTE from OBXgrp, cause we dont want to update the code logic as its happening for few messages only.

Example:

ORC
OBR
NTE  ---Main NTE
TQS
OBX
NTE  ---OBXgrp NTE
ORC
OBR
NTE  ---Main NTE
SFT
NTE  ---want it to be OBXgrp NTE, however it is unrecognized as when we are entering OBXgrp we are expecting OBX segment before NTE.


Is there any way to update schema to consider that last NTE in above message is from OBXgrp or I need to add optional NTE outside OBXgrp and change DTL code as well?

Discussion (3)0
Log in or sign up to continue

There's no SFT in your DocType structure.  Your ORCgrp has optional/repeatable NTE, and your OBXgrp has optional/repeatable OBX and NTE.  Your ORCgrp also requires there to be a TQS segment before the start of OBXgrp.

Without a TQS segment, any NTEs after an OBR will be part of ORCgrp.  In other words, all NTEs after an OBR but before a TQS are part of the ORCgrp, not the OBXgrp.

If you expect that the TQS segment can be missing before the start of the OBXgrp then it needs to be optional.  The SFT segment also needs to be accounted for, either in the ORCgrp or the OBXgrp.

It's probably a good idea to contact your sales engineers for assistance designing your custom schema, or to open a WRC problem to investigate this further.

I just tested this in latest and it worked fine for me.  Here is the Message Structure Raw Definition I used:

2.3.1:MSH~{~[~2.3.1:PID~[~{~2.3.1:NK1~}~]~[~2.3.1:PV1~[~2.3.1:PV2~]~]~]~{~[~2.3.1:ORC~]~2.3.1:OBR~[~{~2.3.1:NTE~}~]~CommunityTest:TQS~[~{~[~{~2.3.1:OBX~}~]~[~{~2.3.1:NTE~}~]~}~]~}~}

Here is a screenshot showing the visual representation of the Message Structure:

I created a sample message by modifying a sample ORU_R01 I had and I opened it in the Interoperate message viewer using these settings (my Schema is named CommunityTest and my DocType is named TEST):

When I view the file and mouse over the final NTE segment, here is the VDoc path I'm given.  You can see that it's in the OBXgrp:

What version are you on?  I think you should open a WRC problem to investigate this further.  You can call the WRC at 617-621-0700 or you can email support@intersystems.com