HL7.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« HL7/Segments/MSH.pm ↑ Summary HL7/Request.pm »
1 package Net::HL7;
2  
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 7 our $VERSION = "0.82";
6  
7 =pod
8  
9 =head1 NAME
10  
11 Net::HL7
12  
13 =head1 DESCRIPTION
14  
15 The Net-HL7 package is a simple Perl API for creating, parsing sending
16 and receiving HL7 messages. To create an empty HL7 message object, do:
17  
18 =begin text
19  
20 use Net::HL7::Message;
21  
22 my $msg = new Net::HL7::Message();
23  
24 =end text
25  
26 and add segments like:
27  
28 =begin text
29  
30 my $msh = new Net::HL7::Segments::MSH();
31 my $pid = new Net::HL7::Segment("PID");
32  
33 $pid->setField(3, "1231313");
34  
35 $msg->addSegment($msh);
36 $msg->addSegment($pid);
37  
38 =end text
39  
40 For details, please consult the man pages of each specific class, or
41 consult the generated API docs on
42 I<http://hl7toolkit.sourceforge.net/>. You might also check the test files
43 in the 't' directory for examples.
44  
45 The Net::HL7 class is only used for documentation purposes (the stuff
46 you're reading right now), to set HL7 configuration properties such as
47 control characters on a global level and to provide a version number
48 of the package to the Perl installation process. This can be used in a
49 'require' statement, or to create a dependency from another Perl
50 package.
51  
52 =head1 PROPERTIES
53  
54 Some HL7 properties may be altered on a global level. Altering the
55 variable makes it changed for this remainder of the lifetime of this
56 Perl process. All HL7 messages will use the values provided here,
57 unless something is changed in the MSH segment concerning these
58 properties.
59  
60 =over 4
61  
62 =item B<SEGMENT_SEPARATOR>
63  
64 Separator for segments within a message. Usually this is \015.
65  
66 =cut
67  
68 7 our $SEGMENT_SEPARATOR = "\015";
69  
70 =pod
71  
72 =item B<FIELD_SEPARATOR>
73  
74 Field separator for this message. In general '|' is used.
75  
76 =cut
77  
78 7 our $FIELD_SEPARATOR = "|";
79  
80 =pod
81  
82 =item B<NULL>
83  
84 HL7 NULL field, defaults to "". This is therefore different from not
85 setting the fields at all.
86  
87 =cut
88  
89 7 our $NULL = "\"\"";
90  
91 =pod
92  
93 =item B<COMPONENT_SEPARATOR>
94  
95 Separator used in fields supporting components. Usually this is the
96 '^' character.
97  
98 =cut
99  
100 7 our $COMPONENT_SEPARATOR = "^";
101  
102 =pod
103  
104 =item B<REPETITION_SEPARATOR>
105  
106 Separator for fields that may be repeated. Defaults to '~'.
107  
108 =cut
109  
110 7 our $REPETITION_SEPARATOR = "~";
111  
112 =pod
113  
114 =item B<ESCAPE_CHARACTER>
115  
116 Escape character for escaping special characters. Defaults to '\'.
117  
118 =cut
119  
120 7 our $ESCAPE_CHARACTER = "\\";
121  
122 =pod
123  
124 =item B<SUBCOMPONENT_SEPARATOR>
125  
126 Separator used in fields supporting subcomponents. Usually this is
127 the '&' character.
128  
129 =cut
130  
131 7 our $SUBCOMPONENT_SEPARATOR = "&";
132  
133 =pod
134  
135 =item B<HL7_VERSION>
136  
137 This is the version used in the MSH(12) field. Defaults to 2.2.
138  
139 =back
140  
141 =cut
142  
143 7 our $HL7_VERSION = "2.2";
144  
145 7 1;
« HL7/Segments/MSH.pm ↑ Summary HL7/Request.pm »