Written by

Question Will · May 9, 2024

HL7 DTL Code action question

Hi 

I'm new to DTL. I'm playing with Code action and run into some syntax error with a simple assignment statement. Please see the screenshot below.

Can someone direct me to some sample code in a Code action for processing HL-7 messages please? Thanks

 

Product version: IRIS 2023.3

Comments

Scott Roth · May 9, 2024

When using a Code block, I find that I have to put a space in at the beginning of the code.

0
Robert Barbiaux · May 10, 2024

The curly brace syntax "source.{PID:12}" is not supported in code action as the block is included as is in the class code generated at compile time. Use GetValueAt() to achieve the same effect :
 

Set country = source.GetValueAt("PID:12")
0
Will  May 13, 2024 to Robert Barbiaux

Thanks, Robert and Scott. It works now.

W

0
Don Rozwick · May 13, 2024

this is how I have done it, example from view other code:
<code>
<![CDATA[
// MSH Segment
]]></code>

from a snip from SMP:

0