Question
· Feb 22, 2019

How to get the specific HL7 message structur by coding (ObjectScript) ?

Hello gentlemen,

I'm wondering how to get the specific HL7 message structur by coding in ObjectScript. I'm explaining myself, when you receive a hl7 message, you have to set its DocType to be able to read it conveniently. For example, an ADT_A15 (2.3.1) must have the docType of an ADT_A09 (2.3.1) to be well read. So you have 2 possibilities to know that, either you go in the documentation to see which structur to set in but I don't think it's generic.... Either there is a way to code it and to get the correct specific structur and this is why I'm here, if it's possible, how? 

I hope my question is cleared and I'm waiting you gentlemen :-)

Faithfully,

Thomas

Discussion (1)1
Log in or sign up to continue

You'll find the Message Structure as the value after the colon in the message body's DocType property. The Name property is used to look up the associated message structure in the schema (the portion before the colon in the DocType property).

HICG > set msg=##class(EnsLib.HL7.Message).%OpenId(26872)

HICG > w msg.DocType

2.3.1:ADT_A01

HICG > w msg.Name

ADT_A04