1
This commit is contained in:
parent
5a47161d1f
commit
43e19756f4
@ -783,11 +783,11 @@ class CallBackController extends AbstractController
|
||||
$sign_params['nonce'] = $request_params['nonce'];
|
||||
$sign_params['clientSecret'] = config('prescription_platform.client_secret');
|
||||
$sign = md5(http_build_query($sign_params, '', '&'));
|
||||
if ($sign != $sign_params['sign']){
|
||||
if ($sign != $request_params['sign']){
|
||||
Log::getInstance()->error("处方平台物流回调数据处理失败:签名错误");
|
||||
Log::getInstance()->error("系统签名:" . $sign);
|
||||
Log::getInstance()->error("处方平台签名:" . $sign);
|
||||
Log::getInstance()->error("处方平台签名:" . $sign_params['sign']);
|
||||
Log::getInstance()->error("处方平台签名:" . $request_params['sign']);
|
||||
return $this->platformLogisticsErrorReturn("签名错误");
|
||||
}
|
||||
|
||||
@ -801,10 +801,11 @@ class CallBackController extends AbstractController
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// 验证失败
|
||||
Log::getInstance()->error("Im回调数据处理失败:" . $e->getMessage());
|
||||
Log::getInstance()->error("处方平台物流回调数据处理失败:" . $e->getMessage());
|
||||
return $this->platformLogisticsErrorReturn($e->getMessage());
|
||||
}
|
||||
|
||||
Log::getInstance()->info("处方平台物流回调数据处理成功");
|
||||
return $this->platformLogisticsSuccessReturn();
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ use App\Constants\HttpEnumCode;
|
||||
use App\Exception\BusinessException;
|
||||
use App\Model\DoctorInquiryTime;
|
||||
use App\Model\HospitalDepartmentCustom;
|
||||
use App\Model\OrderInquiryCase;
|
||||
use App\Model\OrderPrescriptionProduct;
|
||||
use App\Model\OrderProduct;
|
||||
use App\Model\OrderProductItem;
|
||||
@ -18,6 +19,7 @@ use App\Model\OrderInquiry;
|
||||
use App\Model\OrderPrescription;
|
||||
use App\Model\OrderPrescriptionIcd;
|
||||
use App\Model\UserDoctor;
|
||||
use App\Model\UserDoctorInfo;
|
||||
use App\Services\ImService;
|
||||
use App\Services\MessagePush;
|
||||
use App\Services\OrderPrescriptionService;
|
||||
@ -653,6 +655,7 @@ class TestController extends AbstractController
|
||||
if (empty($order_inquiry)) {
|
||||
throw new BusinessException("处方药品数据错误");
|
||||
}
|
||||
$order_inquiry = $order_inquiry->toArray();
|
||||
|
||||
// 获取医生数据
|
||||
$params = array();
|
||||
@ -662,6 +665,13 @@ class TestController extends AbstractController
|
||||
throw new BusinessException("医生数据错误");
|
||||
}
|
||||
|
||||
$params = array();
|
||||
$params['doctor_id'] = $order_inquiry['doctor_id'];
|
||||
$user_doctor_info = UserDoctorInfo::getOne($params);
|
||||
if (empty($user_doctor_info)) {
|
||||
throw new BusinessException("医生数据错误");
|
||||
}
|
||||
|
||||
// 获取医生自定义科室数据
|
||||
$params = array();
|
||||
$params['department_custom_id'] = $user_doctor['department_custom_id'];
|
||||
@ -678,6 +688,22 @@ class TestController extends AbstractController
|
||||
throw new BusinessException("医生自定义数据错误");
|
||||
}
|
||||
|
||||
// 获取患者问诊病例
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
$params['status'] = 1;
|
||||
$order_inquiry_case = OrderInquiryCase::getOne($params);
|
||||
if (empty($order_inquiry_case)){
|
||||
throw new BusinessException("医生自定义数据错误");
|
||||
}
|
||||
|
||||
// 获取问诊处方数据
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
$params['pharmacist_audit_status'] = 1;
|
||||
$params['platform_audit_status'] = 1;
|
||||
$order_prescription = OrderPrescription::getOne($params);
|
||||
|
||||
$arg = array();
|
||||
$arg['thirdUniqueid'] = $order_inquiry['order_inquiry_id']; // 唯一标识
|
||||
$arg['orgName'] = "成都金牛欣欣相照互联网医院"; // 机构名称
|
||||
@ -686,7 +712,7 @@ class TestController extends AbstractController
|
||||
$arg['section'] = $hospital_department_custom['department_name'];//科室名称
|
||||
$arg['sectionCode'] = $hospital_department_custom['department_code'];//科室编码
|
||||
$arg['docName'] = $user_doctor['user_name'];// 姓名(医师、护师、技师)
|
||||
$arg['certificateNum'] = ""; // 执业资格证号
|
||||
$arg['certificateNum'] = $user_doctor_info['qualification_cert_num']; // 执业资格证号
|
||||
$arg['patientName'] = $order_inquiry['patient_name']; // 患者姓名
|
||||
$arg['patientAge'] = $order_inquiry['patient_age']; // 患者年龄
|
||||
$arg['patientSex'] = $order_inquiry['patient_sex'] == 0 ?: 1; // 患者性别
|
||||
@ -695,8 +721,21 @@ class TestController extends AbstractController
|
||||
$arg['serviceType'] = 1; // 服务类型 1网络咨询 2网络门诊
|
||||
$arg['consultNo'] = $order_inquiry['inquiry_no']; // 网络咨询或网络门诊编号 订单编号
|
||||
$arg['consultType'] = 1; // 咨询类别 1、图文咨询 2语音咨询3、视频咨询
|
||||
$arg['consultApplyTime'] = 1; // 咨询类别 1、图文咨询 2语音咨询3、视频咨询
|
||||
|
||||
$arg['consultApplyTime'] = $order_inquiry['created_at']; // 咨询申请时间
|
||||
$arg['consultStartTime'] = $order_inquiry['reception_time']; // 咨询开始时间
|
||||
$arg['consultEndTime'] = $order_inquiry['complete_time']; // 咨询结束时间
|
||||
$arg['feeType'] = 1; // 费别 1自费 2医保
|
||||
$arg['price'] = $order_inquiry['payment_amount_total']; // 咨询价格 元
|
||||
$arg['isReply'] = 1; //咨询是否回复 0未回复 1已回复
|
||||
$arg['patientEvaluate'] = 1; //患者满意度 1-5 1代表非常满意 5代表非常不满意
|
||||
$arg['complainInfo'] = "无"; //投诉举报信息
|
||||
$arg['disposeResult'] = "无"; //处理结果信息
|
||||
$arg['isRiskWarn'] = 1; //是否进行诊前风险提示 0否 1是
|
||||
$arg['isPatientSign'] = 1; //是否确认患者为签约对象 0否 1是
|
||||
$arg['uploadTime'] = date('Y-m-d H:i:s',time()); //上传时间
|
||||
$arg['medicalHistory'] = $order_inquiry_case['disease_desc']; //患者病史描述
|
||||
$arg['docAdvice'] = $order_prescription['doctor_advice'] ?? "无"; // 医生建议描述 医嘱
|
||||
$arg['isMark'] = 1;//是否留痕 1:代表留痕;0代表未留痕
|
||||
|
||||
$result = $regulatoryPlatform->uploadConsult($arg);
|
||||
dump($result);
|
||||
|
||||
@ -4,6 +4,7 @@ namespace Extend\RegulatoryPlatform;
|
||||
|
||||
use App\Constants\HttpEnumCode;
|
||||
use App\Exception\BusinessException;
|
||||
use App\Utils\Log;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hyperf\Di\Annotation\Inject;
|
||||
@ -142,6 +143,7 @@ class regulatoryPlatform
|
||||
$arg = array_merge($arg, $option);
|
||||
}
|
||||
|
||||
Log::getInstance()->info(json_encode($arg,JSON_UNESCAPED_UNICODE));
|
||||
$response = $this->client->post($path, $arg);
|
||||
|
||||
if ($response->getStatusCode() != '200') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user