Data-Seek
view release on metacpan or search on metacpan
t/data/seek.t view on Meta::CPAN
"dose" => "1 tab",
"route" => "PO",
"sig" => "daily",
"pillCount" => "#90",
"refills" => "Refill 3"
}
],
"betaBlocker" => [
{ "name" => "metoprolol tartrate",
"strength" => "25 mg Tab",
"dose" => "1 tab",
"route" => "PO",
"sig" => "daily",
"pillCount" => "#90",
"refills" => "Refill 3"
}
],
"diuretic" => [
{ "name" => "furosemide",
"strength" => "40 mg Tab",
"dose" => "1 tab",
"route" => "PO",
"sig" => "daily",
"pillCount" => "#90",
"refills" => "Refill 3"
}
],
"mineral" => [
{ "name" => "potassium chloride ER",
"strength" => "10 mEq Tab",
"dose" => "1 tab",
"route" => "PO",
"sig" => "daily",
"pillCount" => "#90",
"refills" => "Refill 3"
}
]
}
],
"labs" => [
{ "name" => "Arterial Blood Gas",
"time" => "Today",
"location" => "Main Hospital Lab"
},
{ "name" => "BMP",
"time" => "Today",
"location" => "Primary Care Clinic"
},
{ "name" => "BNP",
"time" => "3 Weeks",
"location" => "Primary Care Clinic"
},
{ "name" => "BUN",
"time" => "1 Year",
"location" => "Primary Care Clinic"
},
{ "name" => "Cardiac Enzymes",
"time" => "Today",
"location" => "Primary Care Clinic"
},
{ "name" => "CBC",
"time" => "1 Year",
"location" => "Primary Care Clinic"
},
{ "name" => "Creatinine",
"time" => "1 Year",
"location" => "Main Hospital Lab"
},
{ "name" => "Electrolyte Panel",
"time" => "1 Year",
"location" => "Primary Care Clinic"
},
{ "name" => "Glucose",
"time" => "1 Year",
"location" => "Main Hospital Lab"
},
{ "name" => "PT/INR",
"time" => "3 Weeks",
"location" => "Primary Care Clinic"
},
{ "name" => "PTT",
"time" => "3 Weeks",
"location" => "Coumadin Clinic"
},
{ "name" => "TSH",
"time" => "1 Year",
"location" => "Primary Care Clinic"
}
],
"imaging" => [
{ "name" => "Chest X-Ray",
"time" => "Today",
"location" => "Main Hospital Radiology"
},
{ "name" => "Chest X-Ray",
"time" => "Today",
"location" => "Main Hospital Radiology"
},
{ "name" => "Chest X-Ray",
"time" => "Today",
"location" => "Main Hospital Radiology"
}
]
};
my $seek = Data::Seek->new(data => $data);
my $result = $seek->search('*', 'imaging.@.name');
isa_ok $result, 'Data::Seek::Search::Result';
is_deeply $result->data, {
id => 12345,
imaging => [
{ name => "Chest X-Ray" },
{ name => "Chest X-Ray" },
{ name => "Chest X-Ray" },
]
};
is_deeply $result->datasets, [
{
criterion => '*',
( run in 2.542 seconds using v1.01-cache-2.11-cpan-e1769b4cff6 )