MAJOR CHANGE: moved sql_lib() from M::Base to new M::Role::Query; moved all M::R::QueryFormatter methods into M::R::Query; removed sql_lib() from ScriptHelpers - using new M::Roles::Query method; removed lims_dbix() from M::Base - now loaded via M::Role::DBIxSimple on demand; moved get_sql_with_constraint() from M::R::DBIxSimple to M::R::Query; method gets dbh from lims_db not lims_dbix in M::LabSection::update_lab_sections() & M::Specimen::update_specimens(); added elements() to Local::QueryLibrary
simplified turnaround_times_specimen query; patched report/report.tt to test for use of authorisation status when displaying 'confirm final diagnosis' checkbox (for Bristol)
fixed M::Request::get_new_and_relapsed_cases() to correctly handle org_code as scalar or arrayref; simplified print-run section to retrieve request ids from excluded locations; refactored & speeded up some slow audit queries
refactored user_workload to allocate 1 unit per request, not 1 unit per specimen; added totals and percentages cdata to user_workload; moved user_workload query back to RDBO from dbix
excluded exempt nhs number categories from M::Audit::nhs_number_supplied(); changed M::R::DBIxSimple::constraint (Str) to ::constraints(Array) to handle multiple constraints; included a skip list in mail_reports.pl; placed constraints list in forms in toggleviw container
modified M::Audit::turnaround_times() and more chart functions to accept arrayref of screening terms; modified C::R::SessionStore::session_store() request_options data format (was incorrect format); bugfixes to M::Roles::RequestUpdate::do_trial_number_update(), MRRU::do_request_options_update(), MRRU::do_request_consent_update() and M::Patient::merge_patients()
patched search constraints error - date_before/after -> all_before/after + validation definition; changed some instances of User::get_user_details to User::get_user_by_username in controllers; added 'query_args' to get_page() js function in date_constraints.tt to allow eg sort_by params to be passed to date constraint constructors
moved M::Chart::get_sql_with_constraint() and _get_search_constraints() to M::Roles::DBIxSimple for code shart between M::Chart and M::Audit; replaced C::Chart::_get_chart_title() function with __PACKAGE__constraint_title, set in M::Roles::DBIxSimple::_set_chart_constraints()