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
patched M::Request::get_print_run_request_ids() to pass 'sort_by' to _print_run_restricted(), and cloned args to prevent RDBO modification of original hashref 'sort_by' param persisting
changed print-run model logic to speed up slow initial request count - separated restrictions on locations into a separate query in M::Request::get_print_run_request_ids()
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
trivial change to C::Test::test_error(); ErrorHandler only sends email if ROSE_DEVINIT set to production db; mail_reports.pl retrieves request data object stashed in RecordHandler::_format_report() instead of calling Request model again - can now introduce skip rules eg on screening term if required
M::Request::new_request() should not require auto_screen_config to save form_data - needed in HistoryAction regardless of auto_screen function; other minor bugfixes
bugfixes - cannot use DateTime->now default in DB::Request for new request as DB classes loaded once so new request fails on turn of year unless server restarted; activity data requests without referral source list trial name if exists
moved auto-generated specimen-associated lab-tests function from M::Request::new_request to own method in M::R::LabTestUpdate for sharing between new request and specimen code update methods
MAJOR CHANGES: search form uses jQuery watermark instead of dd-mm-yyyy display - changed date-field validation to accommodate; moved do_new_lab_test() method out of M::Role::ScreenUpdate to new M::Role::LabTestUpdate to share function with auto-requesting tests at diagnosis/authorissation; changed 'teaching' field to radio button in report page and changed handling of report_option fields in M::Roles::ReportUpdate::do_additional_options() - all request_options were being cleared during report stage; added updated_at timestamp field in M::Roles::ReportUpdate::do_request_report() to any unchanged request_report object to trigger mail_report.pl on authorised cases - were being missed as updated_at col was not being modified
fixed remaining incorrect procedure calls on $db->error in Model causing 'silent' RDBO errors to trigger application error; L::Local::Mail::dispatch() & send_attachment() methods list any missing params instead of just reporting there are some missing