修改首页接口
This commit is contained in:
@@ -758,11 +758,11 @@ class PatientDoctorService extends BaseService
|
||||
$params = array();
|
||||
$params['patient_id'] = $patient_id;
|
||||
$params['history_status'] = 1;
|
||||
$patient_history_doctors = PatientHistoryInquiryModel::getIndexHistoryDoctorList($params);
|
||||
$patient_history_doctors = PatientHistoryInquiryModel::getListOrder($params);
|
||||
if (!empty($patient_history_doctors)) {
|
||||
foreach ($patient_history_doctors as $patient_history_doctor) {
|
||||
if (empty($patient_history_doctor['userDoctor'])) {
|
||||
continue;
|
||||
if (count($results) >= 5){
|
||||
break;
|
||||
}
|
||||
|
||||
foreach ($results as $item){
|
||||
@@ -771,17 +771,33 @@ class PatientDoctorService extends BaseService
|
||||
}
|
||||
}
|
||||
|
||||
// 组合数据
|
||||
$data = array();
|
||||
$data['doctor_id'] = $patient_history_doctor['userDoctor']['doctor_id'];
|
||||
$data['user_name'] = $patient_history_doctor['userDoctor']['user_name'];
|
||||
$data['avatar'] = addAliyunOssWebsite($patient_history_doctor['userDoctor']['avatar']);
|
||||
$data['hospital_name'] = "";
|
||||
if (!empty($patient_history_doctor['userDoctor']['Hospital'])) {
|
||||
$data['hospital_name'] = $patient_history_doctor['userDoctor']['Hospital']['hospital_name'];
|
||||
// 获取医生数据
|
||||
$params = array();
|
||||
$params['doctor_id'] = $patient_history_doctor['doctor_id'];
|
||||
$user_doctor = UserDoctor::getOne($params);
|
||||
if (empty($user_doctor)){
|
||||
continue;
|
||||
}
|
||||
|
||||
$data['doctor_title'] = empty($patient_history_doctor['userDoctor']['doctor_title']) ? "" : DoctorTitleCode::getMessage($patient_history_doctor['userDoctor']['doctor_title']);
|
||||
// 获取医生医院
|
||||
$hospital_name = "";
|
||||
if (!empty($user_doctor['hospital_id'])){
|
||||
$params = array();
|
||||
$params['hospital_id'] = $user_doctor['hospital_id'];
|
||||
$hospital = Hospital::getOne($params);
|
||||
if (!empty($hospital)){
|
||||
$hospital_name = $hospital['hospital_name'];
|
||||
}
|
||||
}
|
||||
|
||||
// 组合数据
|
||||
$data = array();
|
||||
$data['doctor_id'] = $user_doctor['doctor_id'];
|
||||
$data['user_name'] = $user_doctor['user_name'];
|
||||
$data['avatar'] = addAliyunOssWebsite($user_doctor['avatar']);
|
||||
$data['hospital_name'] = $hospital_name;
|
||||
|
||||
$data['doctor_title'] = empty($user_doctor['doctor_title']) ? "" : DoctorTitleCode::getMessage($user_doctor['doctor_title']);
|
||||
|
||||
// 按照天来计算,当日为1,前一天为2 未服务过为0
|
||||
if (empty($patient_history_doctor['created_at'])) {
|
||||
|
||||
Reference in New Issue
Block a user