本文整理汇总了PHP中PhoneNumber::getIteratorByPatientId方法的典型用法代码示例。如果您正苦于以下问题:PHP PhoneNumber::getIteratorByPatientId方法的具体用法?PHP PhoneNumber::getIteratorByPatientId怎么用?PHP PhoneNumber::getIteratorByPatientId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhoneNumber
的用法示例。
在下文中一共展示了PhoneNumber::getIteratorByPatientId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addAppointmentAction
public function addAppointmentAction()
{
$appointmentId = $this->_getParam('appointmentId');
$appointment = new Appointment();
if (strlen($appointmentId) > 0) {
$filter = $this->getCurrentDisplayFilter();
$appointment->appointmentId = (int) $appointmentId;
$appointment->populate();
$this->view->start = date('H:i', strtotime($appointment->start));
$this->view->end = date('H:i', strtotime($appointment->end));
foreach ($filter->columns as $index => $col) {
if ($col['providerId'] > 0 && $col['roomId'] > 0 && $col['providerId'] == $appointment->providerId && $col['roomId'] == $appointment->roomId || $col['providerId'] > 0 && $col['providerId'] == $appointment->providerId || $col['roomId'] > 0 && $col['roomId'] == $appointment->roomId) {
$this->view->columnId = $index;
break;
}
}
$recordNumber = $appointment->patient->record_number;
$lastName = $appointment->patient->last_name;
$firstName = $appointment->patient->first_name;
$middleInitial = '';
if (strlen($appointment->patient->middle_name) > 0) {
$middleInitial = $appointment->patient->middle_name[0];
}
$this->view->patient = "{$lastName}, {$firstName} {$middleInitial} #{$recordNumber} PID:{$appointment->patient->person_id}";
} else {
$columnId = $this->_getParam('columnId');
$rowId = $this->_getParam('rowId');
$start = $this->_getParam('start');
if (strlen($columnId) > 0) {
$this->view->columnId = $columnId;
$filter = $this->getCurrentDisplayFilter();
if (!isset($filter->columns[$columnId])) {
throw new Exception(__("Cannot generate column with that index, there is no filter defined for that column Index: ") . $columnId);
}
$column = $filter->columns[$columnId];
$appointment->providerId = isset($column['providerId']) ? $column['providerId'] : 0;
$appointment->roomId = isset($column['roomId']) ? $column['roomId'] : 0;
}
if (strlen($start) > 0) {
$this->view->start = $start;
$this->view->end = date('H:i', strtotime('+1 hour', strtotime($start)));
}
}
$form = new WebVista_Form(array('name' => 'add-appointment'));
$form->setAction(Zend_Registry::get('baseUrl') . "calendar.raw/process-add-appointment");
$form->loadORM($appointment, "Appointment");
$form->setWindow('windowNewAppointment');
$this->view->form = $form;
$reasons = array();
$enumeration = new Enumeration();
$enumeration->populateByEnumerationName(PatientNote::ENUM_REASON_PARENT_NAME);
$enumerationsClosure = new EnumerationsClosure();
$enumerationIterator = $enumerationsClosure->getAllDescendants($enumeration->enumerationId, 1);
$ctr = 0;
foreach ($enumerationIterator as $enum) {
// since data type of patient_note.reason is tinyint we simply use the counter as id
$reasons[$ctr++] = $enum->name;
}
/*
$patientNotes = array();
$patientNote = new PatientNote();
$patientNoteIterator = $patientNote->getIterator();
$filters = array();
$filters['patient_id'] = (int)$appointment->patientId;
$filters['active'] = 1;
$filters['posting'] = 0;
$patientNoteIterator->setFilters($filters);
foreach ($patientNoteIterator as $row) {
$patientNotes[$row->patientNoteId] = $reasons[$row->reason];
}
$this->view->patientNotes = $patientNotes;
*/
$phones = array();
$phone = new PhoneNumber();
$phoneIterator = $phone->getIteratorByPatientId($appointment->patientId);
foreach ($phoneIterator as $row) {
$phones[] = $row->number;
}
$this->view->phones = $phones;
$appointmentTemplate = new AppointmentTemplate();
$appointmentReasons = $appointmentTemplate->getAppointmentReasons();
$this->view->appointmentReasons = $appointmentReasons;
$this->view->appointment = $appointment;
$this->render('add-appointment');
}