CalendarModule(); } // end constructor DailyAppointmentCalendar function view () { global $display_buffer; if ($_REQUEST['my_action']) { // For extra space, turn off template $GLOBALS['__freemed']['no_template_display'] = true; $this->displayCalendar($_REQUEST['provider']); return true; } $display_buffer .= "
".__("Date")." : ".fm_date_entry("date")."
".__("Select a Provider")." : ".module_function('providermodule', 'widget', array ( 'provider', "phyref != 'yes'" ) )."
"; } // end method view function displayCalendar ($provider) { ob_start(); $date = fm_date_assemble('date'); $scheduler = CreateObject('_FreeMED.Scheduler'); include_once('lib/calendar-functions.php'); if ($provider > 0) { $r = $scheduler->find_date_appointments($date, $provider); } else { $r = $scheduler->find_date_appointments($date); } print "
\n"; print "

".__("Daily Appointments")."

\n"; if ($provider > 0) { $p = CreateObject('_FreeMED.Physician', $provider); print "

".$p->fullName()."

\n"; } print "

".fm_date_print($date)."

\n"; print "
\n"; print "
\n"; print "\n"; print "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n"; foreach ($r AS $a) { $patient = CreateObject('_FreeMED.Patient', $a['calpatient']); $provider = CreateObject('_FreeMED.Physician', $a['calphysician']); $age = array_element(date_diff($patient->local_record['ptdob']), 0); print "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n"; print "\n". "\n". "\n". "\n"; } print "
".__("Date")."".__("Time")."".__("Acct #")."".__("Patient")."".__("Age")."".__("Gender")."".__("DOB")."".__("Provider")."".__("Home Phone")."".__("Work Phone")."
".$a['caldateof']."".fc_get_time_string($a['calhour'],$a['calminute'])."".$patient->idNumber()."".$patient->fullName()."".( $age < 1 ? '< 1' : $age )."".strtoupper($patient->ptsex)."".$patient->dateOfBirth()."".$provider->fullName()."".freemed::phone_display($patient->local_record['pthphone'])."".freemed::phone_display($patient->local_record['ptwphone'])."
 ".__("NOTE").": ".$a['calprenote']."
\n"; $GLOBALS['display_buffer'] .= ob_get_contents(); ob_end_clean(); } // end method displayCalendar } // end class DailyAppointmentCalendar register_module ('DailyAppointmentCalendar'); ?>