The Net-HL7 package is a simple Perl API for creating, parsing sending and receiving HL7 messages. To create an empty HL7 message object, do:
and add segments like:
For details, please consult the man pages of each specific class, or consult the generated API docs on http://hl7toolkit.sourceforge.net/. You might also check the test files in the 't' directory for examples.
The Net::HL7 class is only used for documentation purposes (the stuff you're reading right now), to set HL7 configuration properties such as control characters on a global level and to provide a version number of the package to the Perl installation process. This can be used in a 'require' statement, or to create a dependency from another Perl package.
Some HL7 properties may be altered on a global level. Altering the variable makes it changed for this remainder of the lifetime of this Perl process. All HL7 messages will use the values provided here, unless something is changed in the MSH segment concerning these properties.
MSH(12)field. Defaults to 2.2.