Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see How to Migrate to InterSystems IRIS, available on the WRC Distributions page (login required).

Curly Bracket { } Syntax

Describes how to use curly bracket { } syntax to access virtual properties.

Where Applicable

You can use this syntax in business rules, search tables, search filters, BPL elements (other than <code> and <sql>), and DTL elements (other than <code> and <sql>).

For curly bracket syntax to resolve, the message structure must be known. If the message structure is unknown in the current context, use square bracket [ ] syntax instead, if possible.

Details

To use curly bracket { } syntax to access a virtual property, use the following syntax:

message.{myVirtualPropertyPath}

Where:

  • message is a variable that refers to the current message. The name of this variable depends upon the context.

  • myVirtualPropertyPath is a virtual property path as described earlier in this reference.

The preceding syntax is equivalent to the following method call:

message.GetValueAt("myVirtualPropertyPath")

Curly bracket {} syntax is simpler and so is commonly used where available.

Wholesale Copy

When you are using curly bracket {} notation in BPL or DTL, you can copy whole segments, groups of segments, or whole composite fields within a segment. To do so, omit the field part of the virtual property path (as well as the colon separator). Thus, the following DTL <assign> statements are all legal:

<assign property='target.{MSH}' value='source.{MSH}' />
<assign property='target.{DG1()}' value='source.{DG1()}' />
<assign property='target.{DG1(1):DiagnosingClinician}' value='"^Bones^Billy"'/>
Note:

If the source and target types are different, such as copying from an EnsLib.HL7.Message to an EnsLib.EDI.XML.Document, you cannot use the wholesale copy to assign subproperties, even if the structures appear to be parallel. For such a copy, you must assign each leaf node of a structure independently and add a For Each action to process iterations.

The last line of the previous example uses the caret (^) as a component separator character. For details specific to each EDI format, see:

  • Separators” in the reference section of the Ensemble HL7 Version 2 Development Guide

  • Separators” in the reference section of the Ensemble ASTM Development Guide

  • Separators” in the reference section of the Ensemble EDIFACT Development Guide

  • Separators” in the reference section of the Ensemble X12 Development Guide

Examples

Here is a BPL example:

<if condition='source.{MSH:9.1}="BAR"'>

Here is a DTL example:

<transform targetClass='EnsLib.HL7.Message'
           targetDocType='2.3:ADT_A01'
           sourceClass='EnsLib.HL7.Message'
           sourceDocType='2.3:ADT_A01'
           create='copy'
           language='objectscript'>
  <assign property='target.{PR1grp(1).PR1:Anesthesiologist.nametype}'
          value='"M"'
          action='set'/>
</transform>

Here is an example from a business rule:

Document.Name
Document.Parent.DocType
Document.{PIDgrp.PV1grp.PV1:18}
Document.{PIDgrp.PID:PatientName.familylastname}
Document.{ORCgrp(1).OBRuniongrp.OBRunion.OBR:4.3}

Here is an excerpt from a search table:

<Item DocType="" PropName="MSHControlID"
                 PropType="String:CaseSensitive" >{1:10}</Item>
Feedback