新增病例禁忌字段
This commit is contained in:
@@ -72,6 +72,11 @@ class InquiryService extends BaseService
|
||||
return fail(HttpEnumCode::HTTP_ERROR, "请您到线下问诊");
|
||||
}
|
||||
|
||||
// 是否存在禁忌
|
||||
if (!empty($request_params['is_taboo'])) {
|
||||
return fail(HttpEnumCode::HTTP_ERROR, "无法为您开具药物");
|
||||
}
|
||||
|
||||
// 检测所患疾病是否正确
|
||||
$params = array();
|
||||
$params['disease_class_id'] = $request_params['disease_class_id'];
|
||||
@@ -83,26 +88,26 @@ class InquiryService extends BaseService
|
||||
|
||||
// 获取当前问诊医生信息
|
||||
// 专家问诊-公益问诊
|
||||
// if ($request_params['inquiry_type'] == 3 || $request_params['inquiry_type'] == 1) {
|
||||
// if (empty($request_params['doctor_id'])) {
|
||||
// return fail(HttpEnumCode::HTTP_ERROR, "未选择医生");
|
||||
// }
|
||||
//
|
||||
// $params = array();
|
||||
// $params['doctor_id'] = $request_params['doctor_id'];
|
||||
// $doctor = UserDoctor::getOne($params);
|
||||
// if (empty($doctor)) {
|
||||
// return fail(HttpEnumCode::HTTP_ERROR, "未知医生");
|
||||
// }
|
||||
//
|
||||
// if ($doctor['idcard_status'] != 1) {
|
||||
// return fail(HttpEnumCode::HTTP_ERROR, "当前医生无法接诊,请重新选择");
|
||||
// }
|
||||
//
|
||||
// if ($doctor['iden_auth_status'] != 1) {
|
||||
// return fail(HttpEnumCode::HTTP_ERROR, "当前医生无法接诊,请重新选择");
|
||||
// }
|
||||
// }
|
||||
if ($request_params['inquiry_type'] == 3 || $request_params['inquiry_type'] == 1) {
|
||||
if (empty($request_params['doctor_id'])) {
|
||||
return fail(HttpEnumCode::HTTP_ERROR, "未选择医生");
|
||||
}
|
||||
|
||||
$params = array();
|
||||
$params['doctor_id'] = $request_params['doctor_id'];
|
||||
$doctor = UserDoctor::getOne($params);
|
||||
if (empty($doctor)) {
|
||||
return fail(HttpEnumCode::HTTP_ERROR, "未知医生");
|
||||
}
|
||||
|
||||
if ($doctor['idcard_status'] != 1) {
|
||||
return fail(HttpEnumCode::HTTP_ERROR, "当前医生无法接诊,请重新选择");
|
||||
}
|
||||
|
||||
if ($doctor['iden_auth_status'] != 1) {
|
||||
return fail(HttpEnumCode::HTTP_ERROR, "当前医生无法接诊,请重新选择");
|
||||
}
|
||||
}
|
||||
|
||||
// 获取问诊价格
|
||||
$DoctorInquiryService = new DoctorInquiryService();
|
||||
@@ -185,6 +190,7 @@ class InquiryService extends BaseService
|
||||
$data['is_family_history'] = $request_params['is_family_history'] ?: 0; // 是否存在家族病史(0:否 1:是)
|
||||
$data['family_history'] = $request_params['family_history'] ?? null; // 家族病史描述
|
||||
$data['is_pregnant'] = $request_params['is_pregnant'] ?: 0; // 是否备孕、妊娠、哺乳期(0:否 1:是)
|
||||
$data['is_taboo'] = $request_params['is_taboo'] ?: 0; // 是否存在禁忌药物(0:否 1:是)问诊购药时存在
|
||||
$order_inquiry_case = OrderInquiryCase::addOrderInquiryCase($data);
|
||||
if (empty($order_inquiry_case)) {
|
||||
Db::rollBack();
|
||||
|
||||
Reference in New Issue
Block a user