CreateMessage

Top  Previous  Next

EasyHL7 Object

EHL7.EHL7Message

Method

CreateMessage(bIncludeDefault)

Parameters

bIncludeDefault (Optional Boolean Default = False)

Returns

String (GUID Segment Handle to the MSH segment)

Example

oMSG.CreateMessage()  OR oMSG.CreateMessage(True)

 

Name: CreateMessage()

 

Parameters:

1.        bIncludeDefault (optional Boolean default = False)

 

Returns: Handle (Segment GUID) - The segment handle for the MSH segment.

 

Description: This method will initiate the creation of an HL7.  If bIncludeDefault is passed as [True] then default values will be populated.  If bIncludeDefault is passed as [False] (the default) then default values configured in the vendor definitions will be ignored.

 

*NOTE*: Regardless of whether default values have been configured in the Extended Element Properties for the MSH segment, the following values are automatically set in the MSH Segment when the CreateMessage() method is called.  They can, of course be overwritten by you in subsequent SetFieldValue() method calls.

 

MSH - 1: Is set to the Field Delimiter designated in the Vendor Definition (this cannot be changed in a subsequent SetFieldValue() call).
MSH - 2: Is set to the Encoding Characters designated in the Vendor Definition  (this cannot be changed in a subsequent SetFieldValue() call).
MSH - 7: (Date Time of Message) is set to the current system time in 'yyyymmddhhnnss' format.
MSH - 10: (Message Control ID) is set to a control number derived from the system date and a sequential number that accumulates beginning at the instantiation of the object.
MSH - 12: (HL7 Version) is set to the VendorVersion Property of the Vendor object in use by the oMSG object.
MSH - 13: (Message Sequence) is set to "1" (no leading zeroes).

 

For further information, please see the EasyHL7 documentation http://www.hermetechnz.com/Documentation/EasyHL7/index.html.