Patches added to tracker

ytiddo wrote on Thursday, August 20, 2009:

I’m adding the following patches to the tracker for review.

001-interface_main_main_screen.php-make_default_top_pane_selectable.patch

This patch adds the ability for a user to select what content shows by default in the top pane of openemr. the file to be displayed must be in the interface/main/ directory, and is configured by adding a line in interface/globals.php as follows:

$GLOBALS[‘default_top_pane’] = ‘finder/patient_find.php’;

the default behavior when no configuration has been specified is to load the calendar, as normal.

002-interface_main_left_nav.php-disable_calendar.patch

this patch disables calendar related entries on the collapsable menu on the left hand side when calendars have been disabled in interface/globals.php, by adding the following line:

$GLOBALS[‘disable_calendar’] = true;

by default, the calendar links are left alone.

003-interface_main_left_nav.php-disable_chart_tracker_immunizations_and_prescriptions.patch

this patch disables the chart tracker, prescriptions, and immunization related links in the left hand navigation menu when the following configuration options are added to interface/globals.php:

$GLOBALS[‘disable_chart_tracker’] = true;
$GLOBALS[‘disable_immunizations’] = true;
$GLOBALS[‘disable_prescriptions’] = true;

by default, the entries are displayed unless the previous lines have been added.

04-coding.php-disable_prescriptions.patch

this patch disables prescriptions in the coding page, when the following
line is added to interface/globals.php:

$GLOBALS[‘disable_prescriptions’] = true;

by default, the prescription related entries are visible, unless the
previous line has been added.

005-interface_patient_file_summary_demographics.php-disable_calendar.patch

this patch disables links to the calendar in the demographics summary page, when the following line is added to interface/globals.php:

$GLOBALS[‘disable_calendar’] = true;

without that line, links to the calendar in the demographics summary page show up as normal.

007-interface_main_finder_patient_find.php-create_simple_find_form.patch

this patch adds a simple find form, that i use to replace the default calendar in the top pane. it requires only the configuration in the make_default_top_pane_selectable patch, and is based on an old version of the search function in the left_nav.php, before tony added more features to it.

015-interface_main_left_nav.php-disable_calendar.patch

this is more code to disable the calendar related links in the left navigation bar when the following line is added to interface/globals.php:

$GLOBALS[‘disable_calendar’] = true;

by default, the links are still visible.

020-interface_patient_file_summary_stats.php-disable_prescriptions_and_immunizations.patch

this patch disables prescription and immunization links on the patient stats page, when the following configuration options are added to interface/globals.php:

$GLOBALS[‘disable_immunizations’] = true;
$GLOBALS[‘disable_prescriptions’] = true;

without those lines, the links show up as normal.

I have more patches, but lets get started on this ‘new’(to me) integration procedure before diving into more controversial patches.

(for the record, in my first disable_calendar patch, i remove ippf_specific, and add disable_calendar in its place. I have talked with someone from the IPPF, and they were fine with me doing this)

Flame On. :smiley:

Justin Doiel

bradymiller wrote on Thursday, August 20, 2009:

hey,

For the future, I’d submit patches that are related, as one patch (for example, all disable calendar stuff in one patch then can also include the globals.php switch too)

This then makes it very easy for us to test it.

See this link on creating patch across multiple files:
http://stephenjungels.com/jungels.net/articles/diff-patch-ten-minutes.html

Since other users have asked to have the option of disabling these things, I am inclined to commit the patches to the development tip (after testing them, of course).

-brady

jwallace00 wrote on Thursday, August 20, 2009:

I just submitted patch ids 2841376 and 2841380.  I submitted them before I saw the note, brady.  These work together to satisfy the Confidentiality Notice portion for CCHIT Certification.  I didn’t see a way to submit multiple attachments to the same patch.  2841376 is a diff patch file and will patch interface/login/login.php.   2841380 is a simple sql script to add entries to lang_constants and lang_descriptions (specifically for the US locale.)  

bradymiller wrote on Thursday, August 20, 2009:

Jeremy,
For your patches, in future, create a new developer thread. Then easier to review, give input.

No need to mess with the translation tables; we have a script that picks up anything enclosed by xl() which we run intermittently to collect new constants. I would recommend just placing the entire english message (surrounded by xl() ) in interface/login/login.php . Then no need for the sql insert script.

-brady

bradymiller wrote on Thursday, August 20, 2009:

Justin,

Committed following stuff to developer tip (also placed the globals in globals.php and set to false by default):
002-interface_main_left_nav.php-disable_calendar.patch
003-interface_main_left_nav.php-disable_chart_tracker_immunizations_and_prescriptions.patch
005-interface_patient_file_summary_demographics.php-disable_calendar.patch
015-interface_main_left_nav.php-disable_calendar.patch
020-interface_patient_file_summary_stats.php-disable_prescriptions_and_immunizations.patch
04-coding.php-disable_prescriptions.patch

openemr/interface/main/left_nav.php:
line 792:
!$GLOBALS[‘disable_calendar’] && !$GLOBALS[‘ippf_specific’]
line 804:
$GLOBALS[‘ippf_specific’] && !$GLOBALS[‘disable_calendar’]

openemr/interface/patient_file/summary/stats.php
!$GLOBALS[‘disable_immunizations’] && !$GLOBALS[‘weight_loss_clinic’]

I made these changes to ensure weight_clinic and ippf stuff kept same behavior.

Last two patches are next; since we can now disable the calendar, it makes sense that we should be able to set the default top window.

-brady

bradymiller wrote on Thursday, August 20, 2009:

Justin,

committed following patch to development tip:
001-interface_main_main_screen.php-make_default_top_pane_selectable.patch

and added following to globals.php in development tip:
// Option to set the top default window. By default, it is set
// to the calendar screen. The starting directory is
// interface/main/ , hence:
//    The calendar screen is ‘main_info.php’ .
//    The patient search/add screen is ‘…/new/new.php’ .
$GLOBALS[‘default_top_pane’] = ‘main_info.php’;

Didn’t see reason why to add the new search window. Why not just let users go to …/new/new.php instead, which also has a search mechanism (then no need to support a new search window)?

-brady

bradymiller wrote on Friday, August 21, 2009:

Justin and Jeremy,

Also forgot mention; thanks for giving the patches to the community. Keep them coming.

-brady