NAME

xDT::Object - Instances of this module are collections of xDT records.

VERSION

Version 1.02

SYNOPSIS

Instances should be used to aggregate records for a single patient. Each object should start and end with respective record types of the used xDT version.

use xDT::Object;

my @records = (); # should be an array of xDT::Record instances
my $object  = xDT::Object->new();
$object->add_record(@records);

say 'Patient number: '. $object->get_value('patient_number');
say 'Birthdate: '. $object->get_value('birthdate');

ATTRIBUTES

records

An ArrayRef to xDT::Record instances.

SUBROUTINES/METHODS

is_empty

Checks if this object has any records.

get_every_record($accessor)

Returns all records as arrayref, which have the given accessor.

get_record($accessor)

Returns the first record with the given accessor, if there are any, else undef.

get_every_value($accessor)

Returns the values of all records as arrayref, which have the given accessor.

get_value($accessor)

Returns the value of the first record with the given accessor, if there are any, else undef.

get_records

Corresponse to the elements function.

add_record

Corresponse to the push function.

map_records

Corresponse to the map function.

record_count

Correpsonse to the count function.

sorted_records

Corresponse to the sort function.

next_record

Corresponse to the shift function.

AUTHOR

Christoph Beger, <christoph.beger at medizin.uni-leipzig.de>