From a195d99ce289cf1260131faeddbf5f9ddda7e58d Mon Sep 17 00:00:00 2001 From: bradymiller Date: Tue, 20 Oct 2015 23:44:46 -0700 Subject: [PATCH] Minor changes to prior commit --- interface/reports/pat_ledger.php | 11 ++++------- library/appointments.inc.php | 13 +++++++++++++ library/globals.inc.php | 2 +- version.php | 2 +- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/interface/reports/pat_ledger.php b/interface/reports/pat_ledger.php index 1557c99ae..f5c12cc8e 100644 --- a/interface/reports/pat_ledger.php +++ b/interface/reports/pat_ledger.php @@ -681,13 +681,10 @@ if ($_REQUEST['form_refresh'] || $_REQUEST['form_csvexport']) {  

\n"; } if (! $_REQUEST['form_csvexport']) { @@ -741,4 +738,4 @@ if (!$_REQUEST['form_refresh'] && !$_REQUEST['form_csvexport']) { ?> \ No newline at end of file +?> diff --git a/library/appointments.inc.php b/library/appointments.inc.php index 5981a91aa..d72cb1a0f 100644 --- a/library/appointments.inc.php +++ b/library/appointments.inc.php @@ -43,6 +43,19 @@ $ORDERHASH = array( 'trackerstatus' => array( 'trackerstatus', 'date', 'time', 'patient' ), ); +// Returns the next appointment. +// (typically is used to collect the next appointment for a patient, although the patient id is not required) +// will return as an arrayed structure for the elements of the next appointment +// (note it returns data in the first array element of the array (so same code can support functions in future that return multiple elements) +function collect_next_appointment($from_date,$patient_id=null) { + $events = array(); + $events = fetchAppointments($from_date, null, $patient_id, null, null, null, null, null, null, false, true); + $events = sortAppointments($events); + $return_event = array(); + $return_event[0] = $events[0]; + return $return_event; +} + function fetchEvents( $from_date, $to_date, $where_param = null, $orderby_param = null, $tracker_board = false, $flagPSM = false ) { ////// diff --git a/library/globals.inc.php b/library/globals.inc.php index 7182576fc..3eb44cd25 100644 --- a/library/globals.inc.php +++ b/library/globals.inc.php @@ -778,7 +778,7 @@ $GLOBALS_METADATA = array( 'print_next_appointment_on_ledger' => array( xl('Print the Next Appointment on the Bottom of the Ledger'), 'bool', // data type - '0', // default = false + '1', // default = true xl('This Will Print the Next Appointment on the Bottom of the Patient Ledger') ), diff --git a/version.php b/version.php index c05f9ccb5..7564ec96e 100644 --- a/version.php +++ b/version.php @@ -17,7 +17,7 @@ $v_realpatch = '0'; // is a database change in the course of development. It is used // internally to determine when a database upgrade is needed. // -$v_database = 139; +$v_database = 140; // Access control version identifier, this is to be incremented whenever there // is a access control change in the course of development. It is used -- 2.11.4.GIT