Node Types for Iguana Node Trees

Introduction

Iguana stores messages internally using a node tree structure. Their purpose is to make it easier for us to locate, map, and manipulate message data. A node tree is a custom data type that organizes information like tables do, but they are enhanced by methods that add extra functionality. These methods that are defined in the Iguana Node module. Iguana uses various node trees: HL7, XML, DB (database query results), table (database data for updates), X12 (same as HL7), and Table Grammar (a historical format).

Tip: The node tree is actually a Lua userdata type that we created for the the Iguana Translator. For programmers who would like to know more, check out these links:

DB node types [top]

Returned from db.query() and db.execute() (read only)

Type node.nodeType() return Icon Description
Result Set result_set DB result set
Row row DB row
Value String string DB string valueolder versions use
Value Integer integer DB integer value
Value Double double DB double value
Value Datetime datetime DB datetime value
Value Binary binary DB binary value

Table node types [top]

Returned from db.tables() (writeable)

Type node.nodeType() return Icon Description
Root or Table Collection table_collection Table root  or collection of tables
Table table Table
Table Row row Table row  ro
String string   Table string value
 strolder versions use
Integer integer Table integer value  integer value 
Double double   Table double value
Datetime datetime   Table datetime value

Table Grammar node types [top]

Returned from chm.parse() (writeable)

Type node.nodeType() return Icon Description
Root table_grammar_root Table Group root
Table Group table_group Table Group group of tables
Table Group Row table_group_row Table Group row
Table table Table Group table
Table Row row Table Group row  ro
String string   Table Group string valueolder versions use str
Integer integer Table Group integer value  integer value 
Double double   Table Group double value
Datetime datetime   Table Group datetime value

JSON node types [top]

Returned from json.parse() and json.createObject() (writeable)

JSON does not use an Iguana node tree instead it uses Lua tables.

Type node.nodeType() return Icon Description
Object function not available for Lua tables Lua table
Array function not available for Lua tables Lua table with sequential integer indices
String function not available for Lua tables Lua string valueolder versions use
Integer function not available for Lua tables Lua number value
Double function not available for Lua tables Lua number value
Boolean function not available for Lua tables Lua boolean value
json.NULL function not available for Lua tables Lua special value indicating null in JSON

HL7 node types [top]

Returned from hl7.parse() and hl7.message() (writeable)

Type node.nodeType() return Icon Description
Message message HL7 message
Repeated Segment Group segment_group_repeated HL7 repeated segment group
Segment Group segment_group HL7 segment group  segment sessssssskkkkkkk
Repeated Segment segment_repeated HL7 repeated segment
Segment segment HL7 segmentsegment
Repeated Field field_repeated HL7 repeated field (or composite)  repeatdd
Field field HL7 field (or composite)
Sub Field subfield HL7 sub field (or composite)
Sub Sub Field subsubfield HL7 sub sub field (or composite)

X12 node types [top]

Returned from x12.parse() and x12.message() (writeable)

X12 uses the HL7 node types above.

XML node types [top]

Returned from xml.parse()

Type node.nodeType() return Icon Description
Document document XML Document
CDATA cdata XML CDATA
Element element XML Element
Text text XML Text  Te Tes
Attribute attribute XML Attribute

Generic node type [top]

This is a node tree that represents any userdata type other than those above, for example: A file handle returned from io.open(), database connection returned from db.connect{}, and time returned from various time functions, and dateparse.

Note: The datatype “userdata” can be extended by anyone, including interfaceware developers, to be “anything”.

Type node.nodeType() return Icon Description
Generic node function not available for file and db handles, and time lua_userdata Generic userdata type
Function not applicable lua_function Function for a userdata type like file or database handles

Leave A Comment?