Specifying a UPoC

When using hcimsgarchive and specifying a UPoC, the UPoC returns three Tcl list, NAMELIST, TYPELIST, and VALUELIST, to the caller.

To prevent duplicates, messages in EBCDIC, messages with headers, and so on, you can manipulate the data before it is stored to the external database. For example, you can parse an HL7 message into its component parts and store those into separate fields.

Data that is inserted into the returned lists must not contain spaces or be enclosed in brackets. This makes it a distinct single list element.

If a space is added in the message content by a procedure, then this message cannot be archived completely to the external database. Tcl uses a space as the delimiter in a list, so add "{}" for any fields that include a space.

The hcimsgarchive command prompts a warning message if the fields VERSION, SEPCHARS, RECORDFORMAT, USERDATA, DRIVERCONTROL, and DATA contain a space in the returned list.

Note: Check whether the value for DATA contains whitespace and add an extra set of {} around the value if necessary.

To help you diagnose the issue, this warning is given for fields that might commonly contain spaces.

This can happen on any field that might contain a space. The space is not necessarily added by the user during the procedure; it might be part of the incoming data.

For example, a space is added to message data by changing VALUELIST in the procedure. Then, hcimsgarchive -w -p upoc is run. The data then truncates after the first space. For example, "test message 1" is truncated to "test".

To get around this, you would add "{}" for the fields which includes the space:

set namel "[list TABLENAME MID VERSION SITE PROCESS SRCTHREAD CONTEXT TIMESTORED TIMEARCHIVED DATA]"
set valuel "[lindex $vl $iTableName] [lindex $vl $iMID] {[lindex $vl $iVer]} [lindex $vl $iSite] [lindex $vl $iPro] 
[lindex $vl $iSRCThread] [lindex $vl $iCon] [lindex $vl $iTimeS] [lindex $vl $iTimeA] {[lindex $vl $iData]}"