line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::HL7::Compare::Parser::Message; |
2
|
|
|
|
|
|
|
$App::HL7::Compare::Parser::Message::VERSION = '0.001'; |
3
|
3
|
|
|
3
|
|
39
|
use v5.10; |
|
3
|
|
|
|
|
11
|
|
4
|
3
|
|
|
3
|
|
16
|
use strict; |
|
3
|
|
|
|
|
17
|
|
|
3
|
|
|
|
|
76
|
|
5
|
3
|
|
|
3
|
|
26
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
95
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
36
|
use Moo; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
19
|
|
8
|
3
|
|
|
3
|
|
977
|
use Mooish::AttributeBuilder -standard; |
|
3
|
|
|
|
|
20
|
|
|
3
|
|
|
|
|
24
|
|
9
|
3
|
|
|
3
|
|
2371
|
use Types::Standard qw(Bool); |
|
3
|
|
|
|
|
365630
|
|
|
3
|
|
|
|
|
38
|
|
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
3
|
|
8961
|
use App::HL7::Compare::Parser::Segment; |
|
3
|
|
|
|
|
18
|
|
|
3
|
|
|
|
|
135
|
|
12
|
3
|
|
|
3
|
|
1529
|
use App::HL7::Compare::Parser::MessageConfig; |
|
3
|
|
|
|
|
13
|
|
|
3
|
|
|
|
|
1000
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has param 'skip_MSH' => ( |
15
|
|
|
|
|
|
|
isa => Bool, |
16
|
|
|
|
|
|
|
default => sub { 1 }, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
with qw( |
20
|
|
|
|
|
|
|
App::HL7::Compare::Parser::Role::PartOfMessage |
21
|
|
|
|
|
|
|
App::HL7::Compare::Parser::Role::Partible |
22
|
|
|
|
|
|
|
App::HL7::Compare::Parser::Role::RequiresInput |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub part_separator |
26
|
|
|
|
|
|
|
{ |
27
|
8
|
|
|
8
|
0
|
17
|
my ($self) = @_; |
28
|
|
|
|
|
|
|
|
29
|
8
|
|
|
|
|
257
|
return $self->msg_config->segment_separator; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _build_parts |
33
|
|
|
|
|
|
|
{ |
34
|
8
|
|
|
8
|
|
232
|
my ($self) = @_; |
35
|
|
|
|
|
|
|
|
36
|
8
|
|
|
|
|
29
|
my $input = $self->consume_input; |
37
|
8
|
|
|
|
|
53
|
$self->msg_config->from_MSH($input); |
38
|
|
|
|
|
|
|
|
39
|
8
|
|
|
|
|
250
|
my $parts = $self->split_and_build($input, 'App::HL7::Compare::Parser::Segment'); |
40
|
8
|
100
|
|
|
|
254
|
@{$parts} = grep { $_->name ne 'MSH' } @{$parts} |
|
7
|
|
|
|
|
31
|
|
|
35
|
|
|
|
|
78
|
|
|
7
|
|
|
|
|
24
|
|
41
|
|
|
|
|
|
|
if $self->skip_MSH; |
42
|
|
|
|
|
|
|
|
43
|
8
|
|
|
|
|
18
|
my %last_seen; |
44
|
8
|
|
|
|
|
16
|
foreach my $item (@{$parts}) { |
|
8
|
|
|
|
|
21
|
|
45
|
43
|
|
|
|
|
1489
|
$item->set_number(++$last_seen{$item->name}); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
8
|
|
|
|
|
372
|
return $parts; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub _build_msg_config |
52
|
|
|
|
|
|
|
{ |
53
|
8
|
|
|
8
|
|
18
|
my ($self) = @_; |
54
|
|
|
|
|
|
|
|
55
|
8
|
|
|
|
|
145
|
return App::HL7::Compare::Parser::MessageConfig->new; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|