App-HL7-Compare

 view release on metacpan or  search on metacpan

lib/App/HL7/Compare.pod  view on Meta::CPAN

=head3 compare

Returns the comparison in arrayref format.

=head3 compare_stringify

Returns the comparison in string format.

=head1 TODO

Decoding escaped HL7 characters in App::HL7::Compare::Parser::Subcomponent.

=head1 SEE ALSO

L<App::HL7::Dump>

=head1 AUTHOR

Bartosz Jarzyna E<lt>bbrtj.pro@gmail.comE<gt>

=head1 COPYRIGHT AND LICENSE

lib/App/HL7/Compare/Parser/MessageConfig.pm  view on Meta::CPAN

has option 'component_separator' => (
	isa => StrLength [1, 1],
	writer => 1,
);

has option 'repetition_separator' => (
	isa => StrLength [1, 1],
	writer => 1,
);

has option 'escape_character' => (
	isa => StrLength [1, 1],
	writer => 1,
);

has option 'subcomponent_separator' => (
	isa => StrLength [1, 1],
	writer => 1,
);

sub from_MSH

lib/App/HL7/Compare/Parser/MessageConfig.pm  view on Meta::CPAN


	if (!$has_msh) {
		$input = DEFAULT_SEPARATORS;
		carp "no MSH segment found - using default separators ($input)";
	}

	my @order = qw(
		field_separator
		component_separator
		repetition_separator
		escape_character
		subcomponent_separator
	);

	croak 'Not enough input to read message control characters'
		unless length $input >= @order;

	my @characters = split //, substr $input, 0, scalar @order;
	foreach my $field (@order) {
		my $setter = "set_$field";
		my $predicate = "has_$field";

lib/App/HL7/Compare/Parser/Subcomponent.pm  view on Meta::CPAN

with qw(
	App::HL7::Compare::Parser::Role::Part
	App::HL7::Compare::Parser::Role::RequiresInput
	App::HL7::Compare::Parser::Role::Stringifies
);

sub _build_value
{
	my ($self) = @_;

	# TODO: unescape HL7 parts
	return $self->consume_input;
}

sub to_string
{
	my ($self) = @_;

	# TODO: escape HL7 parts
	return $self->value;
}

1;



( run in 0.713 second using v1.01-cache-2.11-cpan-c21f80fb71c )