function Encode(sFormat : String; sOptions : String) : String;

Class IHL7Message

Encode and return the encoded message, using the ITS specified by the parameters. Valid values are

  ER7    (the famous vertical bars)
  XML
The default value is ER7

sOptions: any space separated combination of:

  OptimisticMapping:
    when writing XML, how the segments are mapped against the segment structure. If
    this is not defined, then the list of segments must match the expected list. If
    this is not defined, then the mapping code will attempt to deal with unexpected
    segments. Note that in optimistic mapping, things can go quite badly wrong
    if they do go wrong

  AllowMappingToFail:
    If this is set, then if mapping fails, any remaining segments not
    mapped will be mapped into the root segment. If this is not set,
    and mapping fails, then an exception will be raised and encoding
    will fail. Relevent for XML

  EscapeExtendedCharacters:
    When this is set extended characters (ascii 127+) will automatically
    be escaped in ER7 format.

  ExtraFieldDelimiter:
    for stupid OACIS system that requires an extra Field Delimiter at
    the end of every segment

  NoAddStructureName:
    suppress the automatic addition of a structure name (MSH-9-3)


© Kestral Computing P/L 2000 - 2003. HL7Connect v2.00-063 generated on 30-Nov 2015.
Keywords: EnCode