暂时去除短信发送
This commit is contained in:
@@ -11,6 +11,7 @@ use App\Model\PatientFamily;
|
||||
use App\Model\Product;
|
||||
use App\Model\SystemInquiryConfig;
|
||||
use App\Model\UserDoctor;
|
||||
use App\Utils\PcreMatch;
|
||||
use Hyperf\DbConnection\Db;
|
||||
use Hyperf\Snowflake\IdGeneratorInterface;
|
||||
|
||||
@@ -109,15 +110,10 @@ class OrderInquiryService extends BaseService
|
||||
return fail(HttpEnumCode::HTTP_ERROR,"患者信息错误");
|
||||
}
|
||||
|
||||
// 检测当前家庭成员是否和医生有未完成订单
|
||||
$params = array();
|
||||
$params[] = ['patient_id','=',$user_info['client_user_id']];
|
||||
$params[] = ['family_id','=',$request_params['family_id']];
|
||||
$params[] = ['inquiry_mode','=',1];
|
||||
$params[] = ['inquiry_status','in',[1,2,3,4]]; // 1:待支付 2:待分配 3:待接诊 4:已接诊 5:已完成 6:已结束 7:已取消
|
||||
$params[] = ['inquiry_refund_status','=',0];
|
||||
$order_inquiry_count = OrderInquiry::getCount($params);
|
||||
if ($order_inquiry_count != 0){
|
||||
// 检测当前家庭成员是否存在未完成的问诊订单
|
||||
$UserPatientService = new UserPatientService();
|
||||
$res = $UserPatientService->getNotFinishedOrdeInquiry($user_info['client_user_id']);
|
||||
if (!empty($res)){
|
||||
return fail(HttpEnumCode::HTTP_ERROR,"当前患者存在进行中的问诊订单");
|
||||
}
|
||||
|
||||
@@ -222,6 +218,16 @@ class OrderInquiryService extends BaseService
|
||||
return fail(HttpEnumCode::SERVER_ERROR,"订单创建失败");
|
||||
}
|
||||
|
||||
|
||||
// 处理复诊凭证
|
||||
if (!empty($request_params['diagnose_images'])){
|
||||
// 医师资格证
|
||||
$diagnose_images = implode(',', $request_params['diagnose_images']);
|
||||
$diagnose_images = PcreMatch::pregRemoveOssWebsite($diagnose_images);
|
||||
}
|
||||
|
||||
dump($patient_family->toArray());
|
||||
dump($patient_family['card_name']);
|
||||
// 增加患者问诊病例
|
||||
$data = array();
|
||||
$data['user_id'] = $user_info['user_id'];
|
||||
@@ -233,18 +239,21 @@ class OrderInquiryService extends BaseService
|
||||
|
||||
$data['sex'] = $patient_family['sex'] ?? 0; // 患者性别(0:未知 1:男 2:女)
|
||||
$data['age'] = $patient_family['age'] ?? null; // 患者年龄
|
||||
$data['height'] = $request_params['height'] ?: $patient_family['height'] ?: null; // 身高(cm)
|
||||
$data['weight'] = $request_params['weight'] ?: $patient_family['weight'] ?: null;; // 体重(kg)
|
||||
$data['height'] = $request_params['height'] ?? $patient_family['height'] ?: null; // 身高(cm)
|
||||
$data['weight'] = $request_params['weight'] ?? $patient_family['weight'] ?: null;; // 体重(kg)
|
||||
|
||||
$data['disease_class_id'] = $disease_class['disease_class_id']; // 疾病分类id-系统
|
||||
$data['disease_class_name'] = $patient_family['card_name']; // 疾病名称-系统
|
||||
$data['diagnosis_date'] = $patient_family['card_name']; // 确诊日期
|
||||
$data['disease_desc'] = $patient_family['card_name']; // 病情描述(主诉)
|
||||
$data['diagnose_images'] = $patient_family['card_name']; // 复诊凭证(多个使用逗号分隔)
|
||||
$data['is_allergy_history'] = $patient_family['card_name']; // 是否存在过敏史(0:否 1:是)
|
||||
$data['allergy_history'] = $patient_family['card_name']; // 过敏史描述
|
||||
$data['is_family_history'] = $patient_family['card_name']; // 是否存在家族病史(0:否 1:是)
|
||||
$data['family_history'] = $patient_family['card_name']; // 家族病史描述
|
||||
$data['disease_class_name'] = $disease_class['disease_class_name']; // 疾病名称-系统
|
||||
$data['diagnosis_date'] = $request_params['diagnosis_date'] ?: null; // 确诊日期
|
||||
$data['disease_desc'] = $request_params['disease_desc'] ?: null; // 病情描述(主诉)
|
||||
$data['diagnose_images'] = $diagnose_images ?? ""; // 复诊凭证(多个使用逗号分隔)
|
||||
$data['is_allergy_history'] = $request_params['is_allergy_history'] ?: 0; // 是否存在过敏史(0:否 1:是)
|
||||
$data['allergy_history'] = $request_params['allergy_history'] ?? null; // 过敏史描述
|
||||
$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:是)
|
||||
|
||||
dump($data);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Db::rollBack();
|
||||
|
||||
Reference in New Issue
Block a user