EasyHL7 Object
|
EHL7.EHL7Message
|
Method
|
AddSegment(strSegment, bIncludeDefault)
|
Parameters
|
(see below)
|
Returns
|
String (GUID Segment Handle) or "" on failure.
|
Example
|
strPIDKey = oMSG.AddSegment("PID") -- Returns a handle for the new PID segment
|
Name: AddSegment()
Parameters:
1. strSegment (String) the name of the HL7 Segment to add.
2. bIncludeDefault (optional Boolean default = False)
Returns: Handle (GUID) - A Handle to the segment object that was created.
Description: Adds a segment to the current message
Programming Notes:
1. | The segment name passed in strSegment must exist in the HL7 Definition of the vendor being used to create the message. |
2. | The MSH segment is automatically created, see CreateMessage() |
3. | EasyHL7 does not validate the sequential validity of the message, segments will appear in the message in the order in which they are added. It is up to you to add the segments in the correct order (if applicable) for the type of hl7 message you are creating. |
4. | If bIncludeDefault is passed as [True] then IF default values have been set up in the vendor definitions, the default values will be populated for all elements in the segment. If bIncludeDefault is passed as [False] (the default) default values configured in the vendor definition are ignored. |
For further information, please see the EasyHL7 documentation http://www.hermetechnz.com/Documentation/EasyHL7/index.html.
|