Question
Scott Roth · Jun 3

Setting Body properties within HL7 message (DTL)

I noticed today that when we are creating a message from one doc type to another doc type, that the message type categories are not necessarily set. This is causing some issues with routing rules when we try to reference the Message Type Categories. Is there a way to make sure the Message Type Categories are being set within a DTL to make sure this doesn't cause problems down the road?

Thanks

Scott

Product version: Caché 2018.1
$ZV: Cache for UNIX (IBM AIX for System Power System-64) 2018.1.3 (Build 414U) Mon Oct 28 2019 11:24:02 EDT
0
0 71
Discussion (7)2
Log in or sign up to continue

If you're using New as the Create selection in the Transform tab, the target message should be set to the Target Doc Type specified in that same tab. If you're using Copy or Existing, the Target's Doc Type will be the same as the Source's.

Are you seeing instances where the Doc Type is not set at all, or is it set to the wrong Doc Type?

Here is what I am seeing....

But when I look at the trace view...

So in the router if you are looking at the for the particular docName nothing is found, so in the rule itself you have to specify the MessageType.TriggerEvent that you need to filter off of.

The Name property in a message object is actually calculated from the contents of MSH:9 and is what the constraint editor evaluates. Is MSH:9 in the target message being set using some unconventional method in the Target message?

EDIT: The constraint editor uses the DocTypeName, not the Name property, as Scott points out in followup comments.

Not all the MSH:9 fields are filled out as most of our downstream systems only use MSH:9.1 and MSH:9.2, so MSH:9.3 is not filled out. Do we need to fill out MSH:9.3?

You shouldn't need to ...

DEV>Set msg = ##class(EnsLib.HL7.Message).%OpenId(29485840)

DEV>Write msg.Name
ADT_A11
DEV>Write msg.GetValueAt("MSH:9")
ADT^A11
DEV>Do msg.SetValueAt("A08","MSH:9.2")

DEV>Write msg.GetValueAt("MSH:9")
ADT^A08
DEV>Write msg.Name
ADT_A08

But I guess it wouldn't hurt wink

Is it possible that there's an action somewhere in the DTL that clears MSH:9?

I figured it out. Its because in our custom structures we defined the DocType Structures as a generic DocType like SIUOSU instead of defining separate DocTypes per message type. 

Yes, in retrospect I should have realized that the DocType Structure was what the constraint required rather than the calculated value in the Name property. Sorry for any head-scratching I might have caused wink