RSS Git Download  Clone
..
  Outreach fixed ajax error on NHS number validation when length exceeded 10 chars - fatal error due to RDBO patch; extensive changes to outreach questionnaire section to accomodate new questionnaire and CML patients 13 years ago
  AdditionalOption.pm 927B hilis3 conversion scripts for YHHN 15 years ago
  AdminMessage.pm 628B added a user messaging system; user change registered email resource 15 years ago
  AuditRequestCategory.pm 964B hilis3 conversion scripts for YHHN 15 years ago
  AuditRequestOption.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  ClinicalTrial.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  ConsentOption.pm 925B hilis3 conversion scripts for YHHN 15 years ago
  ContextWarningDiagnosis.pm 809B hilis3 conversion scripts for YHHN 15 years ago
  DeletedRequest.pm 900B hilis3 conversion scripts for YHHN 15 years ago
  Diagnosis.pm 3kB HMRN calculation of indices 15 years ago
  DiagnosisChangeOption.pm 817B changed diagnosis_change_options.reason col to option_id 14 years ago
  DiagnosisContextWarning.pm 787B hilis3 conversion scripts for YHHN 15 years ago
  DiagnosticCategory.pm 1kB HMRN calculation of indices 15 years ago
  EmailAddress.pm 407B hilis3 conversion scripts for YHHN 15 years ago
  EmailContact.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  ErrorCode.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  ErrorCodeAssignment.pm 689B added new category to error_code_assignments; bugfixes to error_code_assignments method spellings 14 years ago
  HospitalDepartment.pm 863B hilis3 conversion scripts for YHHN 15 years ago
  ICDOCategory.pm 638B hilis3 conversion scripts for YHHN 15 years ago
  LabSection.pm 3kB new tables sample_types, lab_section_sample_type & specimen_sample_type; added sample-type data to lab sections and specimens configuration functions; replaced arg to ErrorHandler::set_errorhandler_args with L::Local::Config->instance, as used in QueryLog 14 years ago
  LabSectionSampleType.pm 789B new tables sample_types, lab_section_sample_type & specimen_sample_type; added sample-type data to lab sections and specimens configuration functions; replaced arg to ErrorHandler::set_errorhandler_args with L::Local::Config->instance, as used in QueryLog 14 years ago
  LabSectionStatusOption.pm 866B added ability to arrange order of status options in worklists 14 years ago
  LabTest.pm 3kB MAJOR UPDATE - moved results summary update to test results section; added admin function for configuring lab-tests in panels 14 years ago
  LabTestDataType.pm 834B hilis3 conversion scripts for YHHN 15 years ago
  LabTestResultDataType.pm 973B hilis3 conversion scripts for YHHN 15 years ago
  LabTestResultOption.pm 836B hilis3 conversion scripts for YHHN 15 years ago
  LabTestStatusOption.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  LocalNetworkLocation.pm 534B hilis3 conversion scripts for YHHN 15 years ago
  Login.pm 801B hilis3 conversion scripts for YHHN 15 years ago
  PanelLabTest.pm 746B MAJOR UPDATE - moved results summary update to test results section; added admin function for configuring lab-tests in panels 14 years ago
  ParentOrganisation.pm 3kB added ability to restrict non-network users to own records; added missing _debug_path() to controller methods 15 years ago
  Patient.pm 2kB new role to replace PAS with PDS (in progress); modified activity_data.pl to exempt PB accompanying BMA[T] from charge 13 years ago
  PatientCase.pm 2kB hilis3 conversion scripts for YHHN 15 years ago
  PatientDemographic.pm 1kB moved HMRN data functions to new C::HMRN; fixed error in C::Test::print_pdf - now passes hashref (not string) to make_pdf(); new DB::PatientDemographic; new rule for capitalisation of $input in LIMS::Dispatch 15 years ago
  PatientDemographicHistory.pm 1kB more YHHN/HMRN functions 15 years ago
  PatientEdit.pm 2kB hilis3 conversion scripts for YHHN 15 years ago
  PatientNote.pm 590B moved patient_notes from Outreach reqeusts to all reqeusts; report page loads chart if applicable to request type 14 years ago
  PatientTrial.pm 941B hilis3 conversion scripts for YHHN 15 years ago
  PhoneLogOption.pm 500B hilis3 conversion scripts for YHHN 15 years ago
  PreRegistration.pm 897B hilis3 conversion scripts for YHHN 15 years ago
  PreRegistrationLabTest.pm 895B hilis3 conversion scripts for YHHN 15 years ago
  PreRegistrationSpecimen.pm 977B hilis3 conversion scripts for YHHN 15 years ago
  ReferralSource.pm 2kB referral_source autosuggest loads only active records for registrtaion and request edit functions; new column is_active on referral_sources table; refactored list_all_screen_tests table to show screen categories 14 years ago
  ReferralType.pm 2kB added GP menu to HMRN demographics section; fixed more circular refs in C::Report::outreach() callbacks 15 years ago
  Referrer.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  ReferrerDepartment.pm 2kB added referrer department infomation to admin/config/clinicians, and ability to set inactive on edit 15 years ago
  ReportErrorCode.pm 758B hilis3 conversion scripts for YHHN 15 years ago
  Request.pm 10kB fixed ajax error on NHS number validation when length exceeded 10 chars - fatal error due to RDBO patch; extensive changes to outreach questionnaire section to accomodate new questionnaire and CML patients 13 years ago
  RequestAudit.pm 965B hilis3 conversion scripts for YHHN 15 years ago
  RequestAuthorisationDiagnosis.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  RequestConsent.pm 990B hilis3 conversion scripts for YHHN 15 years ago
  RequestDiagnosisHistory.pm 1kB changed diagnosis_change_options.reason col to option_id 14 years ago
  RequestDispatchLog.pm 705B hilis3 conversion scripts for YHHN 15 years ago
  RequestErrorCode.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  RequestExternalRef.pm 887B new local worklist histology blocks 15 years ago
  RequestGeneralNote.pm 623B hilis3 conversion scripts for YHHN 15 years ago
  RequestGrossDescription.pm 636B hilis3 conversion scripts for YHHN 15 years ago
  RequestHaematology.pm 3kB added LIMS::DB::RequestHaematology 14 years ago
  RequestHistory.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  RequestInitialScreen.pm 931B hilis3 conversion scripts for YHHN 15 years ago
  RequestLabSectionForeignID.pm 907B hilis3 conversion scripts for YHHN 15 years ago
  RequestLabSectionNote.pm 891B hilis3 conversion scripts for YHHN 15 years ago
  RequestLabTestHistory.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  RequestLabTestResult.pm 994B hilis3 conversion scripts for YHHN 15 years ago
  RequestLabTestStatus.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  RequestOption.pm 885B hilis3 conversion scripts for YHHN 15 years ago
  RequestPhoneLog.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  RequestPrintLog.pm 802B hilis3 conversion scripts for YHHN 15 years ago
  RequestReport.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  RequestReportHistory.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  RequestResultSummary.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  RequestSpecimen.pm 896B hilis3 conversion scripts for YHHN 15 years ago
  RequestTrial.pm 904B hilis3 conversion scripts for YHHN 15 years ago
  RequestViewLog.pm 875B hilis3 conversion scripts for YHHN 15 years ago
  ResultSummaryOption.pm 840B hilis3 conversion scripts for YHHN 15 years ago
  SampleType.pm 854B new tables sample_types, lab_section_sample_type & specimen_sample_type; added sample-type data to lab sections and specimens configuration functions; replaced arg to ErrorHandler::set_errorhandler_args with L::Local::Config->instance, as used in QueryLog 14 years ago
  Screen.pm 1kB new screen_category table; moved screens 'type' col to category_id; modified all screening terms & screening tests admin functions to accomodate new screen_category table; removed ajax validation from screen description & lab test field_label as these use 2 & 3-col unique keys so can't be validated by AJAX; email reports function uses users secure email address as sender; modifed portal_access function to supply SHA1 hash of current date - so failed login not sent back to portal page without explanation; modified mail_reports.pl to use item names instead of table id accessors 15 years ago
  ScreenCategory.pm 697B new screen_category table; moved screens 'type' col to category_id; modified all screening terms & screening tests admin functions to accomodate new screen_category table; removed ajax validation from screen description & lab test field_label as these use 2 & 3-col unique keys so can't be validated by AJAX; email reports function uses users secure email address as sender; modifed portal_access function to supply SHA1 hash of current date - so failed login not sent back to portal page without explanation; modified mail_reports.pl to use item names instead of table id accessors 15 years ago
  ScreenLabTest.pm 732B hilis3 conversion scripts for YHHN 15 years ago
  ScreenLabTestDetail.pm 852B hilis3 conversion scripts for YHHN 15 years ago
  Session.pm 865B set flag in cgiapp_prerun() to update sessions.userid on re-authentication after a session timeout, as session is deleted & re-created (without userid) - still needs more worksvk_diff 15 years ago
  Specimen.pm 1kB new tables sample_types, lab_section_sample_type & specimen_sample_type; added sample-type data to lab sections and specimens configuration functions; replaced arg to ErrorHandler::set_errorhandler_args with L::Local::Config->instance, as used in QueryLog 14 years ago
  SpecimenLabTest.pm 712B hilis3 conversion scripts for YHHN 15 years ago
  SpecimenSampleType.pm 770B new tables sample_types, lab_section_sample_type & specimen_sample_type; added sample-type data to lab sections and specimens configuration functions; replaced arg to ErrorHandler::set_errorhandler_args with L::Local::Config->instance, as used in QueryLog 14 years ago
  StatusOption.pm 945B hilis3 conversion scripts for YHHN 15 years ago
  User.pm 5kB added allow_inline_column_values() to DB::User to allow 'NOW()' to be passed inline - first attempt to fix peristent "could not parse datetime 'now' - invalid date format" error 14 years ago
  UserFunction.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  UserGroup.pm 1kB hilis3 conversion scripts for YHHN 15 years ago
  UserGroupFunction.pm 916B hilis3 conversion scripts for YHHN 15 years ago
  UserLocation.pm 1kB minor tweaks to bring test suite up to date with recent changes 15 years ago
  UserMessage.pm 904B new user message alert ajax function - might be causing loss of html_wrapper until next server restart 15 years ago
  UserPermission.pm 909B hilis3 conversion scripts for YHHN 15 years ago
  README
ENV ATTRIBUTES FOR DEV SERVER: useage: export ATTR=1 LOCALHOST_SOCKET - diverts slide labels to ~/cgi-bin/test_scripts/socket.pl (START IT 1ST) USE_FILE_SESSIONS - uses file-system directory instead of sessions table USE_DB_SESSIONS - uses sessions table instead of file-system directory OVERRIDE_LOCK - prevents record being 'locked' by request status HTTP_REPORT - returns report as web-page instead of PDF RDBO_DEBUG_ON - force RDBO queries to stdout (eg test scripts) SMTP_TEST - dumps message content to logs/mail.test instead of using SMTP out DEBUG_ON - use in test suite to dump application debug info to console CURRENT ISSUES: Jul/2011: KNOWN ISSUE - sessions leaking in CGI v3.43 or less. Fixed in 3.44, BUT url handling changed!!! self_url() & path_info() apparently did not return query params - SEE DOCS under mod_perl (only) report function issues rollback on request_report table insert in M::Report::update_report(). remove Apache::DBI and issue goes away, but get 1 -2 new db conenctions for every new web request. override dbi_connect() in LIMS::DB and issue also goes away, but get error if a transaction fails (eg duplicate UK): rollback ineffective with AutoCommit enabled at /home/raj/perl5/lib/perl5/Rose/DB.pm line 1208. set autocommit to 0 and some db edits fail IDENTIFIED PROBLEM IN M::Roles::RequestUpdate::update_request_status() - APPEARS TO BE DUE TO LIMS::DB::StatusOption->new() ACTION, AND IS FIXED IF TRANSACTION DBH IS USED. Other actions causing same failure in same transaction: LIMS::DB::AdditionalOption::Manager->get_additional_options in do_additional_options() LIMS::DB::RequestLabTestStatus::Manager->get_request_lab_test_status() in has_outstanding_tests() LIMS::DB::StatusOption->new() in _is_authorisation_active() # patching using git: If you want to create a patch file via "git diff" that can be applied using "patch -p0 < patchfile" use the following command: git diff --no-prefix > patchfile then apply the patch: patch -p0 < patchfile If you have an existing "git diff" patch file that was created without the "--no-prefix" option, you can apply that patch via: patch -p1 < patchfile this will ignore the default a/ b/ source prefixes. # from #rdbo (26/3/2010): 14:08 < siracusa> here's what I think is happening 14:08 < siracusa> when you don't explicitly supply a db object, RDBO calls init_db() to make one 14:08 < siracusa> and init_db() eventually leads to DBI->connect() being called 14:08 < siracusa> and under Apache::DBI, DBI->connect looks first in its cache of database handles that are already connected 14:08 < siracusa> it finds an already-connected handle 14:09 < siracusa> but Apache::DBI also resets all the handle attributes to their original values before returning its cached $dbh 14:09 < siracusa> and teh original value for AutoCommit was 1 14:10 < siracusa> so it takes this $dbh which, unbeknownst to it, is still being used in an outstanding transaction 14:10 < siracusa> and sets its AutoCommit to 1 14:10 < siracusa> which apparently angers the transaction in flight and causes the weird rollback issues 14:10 < siracusa> it's always best/safest to explicitly share a db object during the course of a transaction 14:11 < siracusa> which avoids situations like this where Apache::DBI is handing out your transaction $dbh to other objects and resetting its attributes when it does *********** so solution is to use same shared dbh throughout transaction ************** Template name generation CAT::TT default is LIMS/App/runmode.tmpl overridden in tt_config using TEMPLATE_NAME_GENERATOR - generates app/runmode.tt, but only works if runmode is requested, not forwarded. Automatic template generation for forwarded rm's is handled by LIMS::get_template_name DBH cgiapp_init() uses LIMS::DB->new->retain_dbh to initialise $self->dbh_config LIMS::RDBO init_db() returns LIMS::DB->new_or_cached They are not the same dbh as $dbi->{Profile} = DBI::Profile->new set in cgiapp_init prints login sql to console, but rest of sql calls by RDBO are not. Can set $dbh->{Profile} in LIMS::RDBO but sql never output. Seems to depend on whether new_or_cached set, and whether retain_dbh used. Might be mis-using db connections: [Dispatch] ERROR' for request '/hmds/admin/lab_section': Error executing class callback in init stage: DBI connect('database=hmds_lims;host=localhost','raj',...) failed: Too many connections at /home/raj/perl5/lib/perl5/Rose/DB.pm line 887 SHOW PROCESSLIST shows sleeping processes increasing for each request, under lims_server (not mod_perl). Re-start lims_server resets to 0. Have set wait_timeout = 120 in my.cnf until this is fixed. FIXED - need to call new_or_cached->retain_dbh instead of new->retain_dbh in cgiapp_init Transactions: If using RDBO do_transaction(), methods in anon sub MUST use same db as parent method - see: http://groups.google.com/group/rose-db-object/browse_thread/thread/a30231b7c0be219d Sub-selects: 1) 'request_report.request_id' => { eq => undef }, with_objects => 'request_report' 2) my $subselect = q!NOT EXISTS (SELECT request_id FROM request_report rr WHERE rr.request_id = id)!; $data = RBDO::Manager->get_objects( clauses => [ $subselect ] ); DBH sharing - might be dangerous in commit/roll-back situations where rollback undoes previous commits in unrelated sections of code - see http://thread.gmane.org/gmane.comp.lang.perl.modules.dbi.rose-db-object/2570/focus=2575 might be safer to use new dbh for transactions. Database selection in LIMS::DB defaults to test - overridden in lims_server.pl and mod_perl config using env variable ROSEDB_DEVINIT which points to config/rosedb_devinit_[devel|prod].pl which uses modify_db() method to change db to devel/production. dbi_connect returns DBIx::Log4perl enabled dbh if ROSEDB_DEVINIT flag set, so we don't get t/ files dumping sql to console. Variable persistence: Using CAD::Server, passing id in url eg /admin/update/2 and retrieving via $data->{id} = $self->param('id') causes value to persist across subsequent requests, so if next request is to generate new record, previous id is retained and record gets updated with new data instead of creating new record - safer to hand id in hidden param in form. CA::Server & mod_perl don't suffer from this. FIXED - use CA::Server instead. mod_perl or fastcgi: See 'is my app caching db connection ?' in cgiapp list for issues regarding FastCGI and transactions: Incidentally, I hope you have something in there to catch errors at the top level of your FastCGI adapter and issue a rollback on any open database handles. If you don't, you might leave some partially completed uncommitted data around that the next request would commit. Aoache::DBI solves this for mod_perl by doing a rollback on all open connections after every request, in case the request exited abnormally. Issue using non-external fastcgi (ie FastCgiServer) - FCGI.pm (in this context ony - doesn't affect external fastcgi) redefines the warn handler set in LIMS::Local::QueryLog, so SQL statements get written to Apache error log. Solution is to use external fastcgi, or call L::L::Q::ensure_warn_handler_capture() somewhere in app (eg cgiapp_prerun), which forces L::L::Q::_warn_handler() method Debug: $self->debug( scalar, arrayref, hashref, obj or subroutine ref; followed by optional number 1 ..7) - uses Log::Dispatch either via CAP::LogDispatch or LIMS::LogDispatch - setup at top of LIMS.pm If using LIMS::LogDispatch, $self->log_dispatch->log(message => sub{Dumper $foo}, level => 'bar') also works - use for expensive ops like Data::Dumper expansion of object, which may be discarded if log level too low. TODO - integrate with debug() - need to test for presence of subroutine in args Config: Files in config directory labelled lims_*.pl are automatically loaded in LIMS::Dispatch RBDO errors: Cannot load MyApp::DB::Foo without a primary key (id) with a non-null value or another unique key with at least one non-null value - creating a new record on a table with no unique keys (except PK), using MyApp::DB::Foo->new(%data)->insert_or_update() - it can't - behaviour fixed in 0.775 - see ChangeLog ErrorHandler: LIMS::Local::ErrorHandler uses a $SIG{__DIE__} handler which interfers with CAP::Redirect (see http://www.mail-archive.com/cgiapp@lists.erlbaum.net/msg05184.html) Copied CAP::Redirect function into LIMS::Base::redirect(), omitting eval block causing problem with SIG{__DIE__} Works under test_harness & mod_perl but not fastcgi - get std server error msg capture SIGDIE in test harness mode: export DEBUG_ON=1; perl -Ilib -e '$SIG{__DIE__} = sub { warn $_[0]; die $_[0]; }; do "t/test.t";' New db tables: SQL to setup/lims.sql, any dependency data to setup/data.sql. Test db creation in rebuild.pl - set db to test or lims_scratch. Generate DB classes with script/make_classes.pl -> setup/classes.pl -> DB/Foo.pm MySQL binary logfiles: To turn off log-bin, edit /etc/mysql/my.cnf and comment out log-bin: #log-bin = /var/log/mysql/mysql-bin.log This will save 100MBs of space if you have a fast insert going on. You also have to comment out the following if you comment out log-bin or mysqld will not start: #expire_logs_days = 10 Autosuggest js: bsn.Autosuggest.jQuery.js is a compressed version of bsn.Autosuggest_2.1.3.js, with true/false changes made to 'onKeyPress bubble', so that 'return/enter' keypress just selects from list & doesn't submit form - see last posting by Igor - http://www.brandspankingnew.net/archive/2007/02/ajax_auto_suggest_v2.html DFV messages: see: http://sourceforge.net/mailarchive/forum.php?thread_name=20080108163239.GA12455%40apartia.fr&forum_name=cascade-dataform The 'msgs' hashref refers to constraint names, not field names. For this to work, you have to call the "name_this" method inside of the custom FV_URI_HTTP method. HTMLDOC: from wdir: sh .configure --prefix=/home/raj/perl-lib/htmldoc; make; make install ln -s /home/raj/www/perl-lib/htmldoc/bin/htmldoc /usr/local/bin/htmldoc; cpan HTML::HTMLDoc ASPELL: need to apt-get install aspell-en if not aleady installed Win32 - see http://www.nosq.com/blog/2005/07/aspell-0603-for-win32/ svk: svk mirror http://address.of.repo //mirror/mirror_name svk sync //mirror/mirror_name svk cp //mirror/hmds_lims/trunk //mirror/hmds_lims/branches/foo -m 'creating branch for version 0.01' then, from root dir: svk up -s svk cp //mirror/hmds_lims/trunk //mirror/hmds_lims/tags/0.01 -m 'tagging version 0.01' svk mirror --detach //mirror/hmds-lims svk co --purge svk checkout --list svk checkout --relocate //mirror/mirror_name /path/to/new/location svk mirror //mirror/hmds_lims https://www.jti.org.uk/svn/hmds_lims to merge trunk & branches: cd app/branches/foo; svk push; cd app/trunk; svk up -s 'svk pull' in your branch pulls all changes from trunk down to your branch Moose: use Moose; extends foo; works in Model classes, but in all Controller classes, get: Invalid CODE attribute: StartRunmode OR: can't locate object method 'add_callback' in RunmodeDeclare (if using Sugar) REQUEST STATUS: new request automatically gets status_option_id 1 (new) - 'requests' table default value screening -> status_option_id 2 (screened) reporting: if 'authorise' status_option inactive and no outstanding tests, status_option_id = 5 (completed) else status_option_id = 3 (reported) authorising (available in template only if request reported & 'authorise' option is active): if no oustanding tests, status_option_id = 5 (completed) else status_option_id = 4 (authorised) final_diagnosis - tmpl param enabled if request authorised (or reported if 'authorise' option inactive) AND status NOT complete AND no outstanding tests: status_option_id = 5 (completed) new lab_tests -> reverts status_option to <5 (complete) if appropriate EMAIL ALERT RULES: 1) Authorised & status = new / relapse & have e-mail contact (overriden for age / PNH) 2) test = TBCulture & diagnosis = 'Granulomatous inflammation' & LTH case 3) special rules for diagnosis = 'DLBCL or Burkitt lymphoma - further tests pending' DateTime: Unfortunately, DateTime does not seem to provide a good way to set the default stringification format for DateTime objects. A hack to do that would be to put this code somewhere in your app: use DateTime; no warnings 'redefine'; sub DateTime::_stringify { shift->strftime('%Y-%m-%d %H:%M:%S') } Then all DateTime objects will stringify "without the T" everywhere in your code, yielding: $dt = $user->expires; # a DateTime object, but... print $dt; # prints a string like "2003-12-31 12:34:56" -- no "T"!