修改聊天内页基础数据接口

This commit is contained in:
2023-03-30 11:09:43 +08:00
parent 177b5f28d7
commit 1d09e024b8
4 changed files with 101 additions and 6 deletions
+3 -3
View File
@@ -665,9 +665,9 @@ class InquiryService extends BaseService
$result['patient_user_id'] = $order_inquiry['user_id'];
$result['doctor_id'] = $order_inquiry['doctor_id'];
$result['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
$result['patient_name'] = $order_inquiry['patient_name'];
$result['patient_sex'] = $order_inquiry['patient_sex'];
$result['patient_age'] = $order_inquiry['patient_age'];
$result['patient_family_name'] = $order_inquiry['patient_name'];
$result['patient_family_sex'] = $order_inquiry['patient_sex'];
$result['patient_family_age'] = $order_inquiry['patient_age'];
$result['inquiry_type'] = $order_inquiry['inquiry_type'];
$result['inquiry_status'] = $order_inquiry['inquiry_status'];
$result['times_number'] = $times_number;
+91 -1
View File
@@ -2,9 +2,14 @@
namespace App\Services;
use App\Constants\HttpEnumCode;
use App\Exception\BusinessException;
use App\Model\DoctorPharmacistCert;
use App\Model\OrderPrescription;
use App\Model\OrderPrescriptionIcd;
use App\Model\OrderPrescriptionProduct;
use App\Model\OrderProductItem;
use Extend\Ca\Ca;
use Hyperf\Contract\LengthAwarePaginatorInterface;
class OrderPrescriptionService extends BaseService
@@ -33,7 +38,7 @@ class OrderPrescriptionService extends BaseService
* @param string|int $per_page
* @return array
*/
public function getPharmacistWaitAuditPage(string $pharmacist_id,int $pharmacist_audit_status,int $platform_audit_status,string|int $page = 1,string|int $per_page = 10): array
public function getPharmacistWaitAuditPage(string $pharmacist_id, int $pharmacist_audit_status, int $platform_audit_status, string|int $page = 1, string|int $per_page = 10): array
{
$params = array();
$params['pharmacist_id'] = $pharmacist_id;
@@ -93,4 +98,89 @@ class OrderPrescriptionService extends BaseService
$params['pharmacist_audit_status'] = 1;
return OrderPrescription::getCount($params);
}
// 开具处方时获取云证书签名
public function getCaCertSign(array $order_prescription, array $order_prescription_icd, array $order_prescription_product)
{
try {
// // 获取处方数据
// $params = array();
// $params['order_prescription_id'] = $order_prescription_id;
// $order_prescription = OrderPrescription::getOne($params);
// if (empty($order_prescription)){
// throw new BusinessException("处方数据错误");
// }
//
// // 获取处方关联疾病数据
// $params = array();
// $params['order_prescription_id'] = $order_prescription_id;
// $order_prescription_icd = OrderPrescriptionIcd::getOne($params);
// if (empty($order_prescription_icd)){
// throw new BusinessException("处方疾病数据错误");
// }
//
// // 获取处方关联商品数据
// $params = array();
// $params['order_prescription_id'] = $order_prescription_id;
// $order_prescription_product = OrderPrescriptionProduct::getList($params);
// if (empty($order_prescription_product)){
// throw new BusinessException("处方药品数据错误");
// }
$ca = new Ca();
// 获取云证书签名
$data = array();
$data['created_at'] = $order_prescription;
$data['department_custom_name'] = "外科";
$data['user_name'] = "测试用户1";
$data['sex'] = "";
$data['age'] = 19;
$data['allergy_history'] = "";
$data['icd_name'] = "感冒";
$data['doctor_advice'] = "多吃药";
$data['product'] = [
[
"product_name" => "感冒药150ml*10",
"single_unit" => "一次一包",
"frequency_use" => "1天3次",
"single_use" => "口服",
"prescription_product_num" => "X1盒",
],
[
"product_name" => "感冒药250ml*10",
"single_unit" => "一次一包",
"frequency_use" => "1天3次",
"single_use" => "口服",
"prescription_product_num" => "X1盒",
],
[
"product_name" => "感冒药350ml*10",
"single_unit" => "一次一包",
"frequency_use" => "1天3次",
"single_use" => "口服",
"prescription_product_num" => "X1盒",
],
[
"product_name" => "感冒药450ml*10",
"single_unit" => "一次一包",
"frequency_use" => "1天3次",
"single_use" => "口服",
"prescription_product_num" => "X1盒",
],
[
"product_name" => "感冒药550ml*10",
"single_unit" => "一次一包",
"frequency_use" => "1天3次",
"single_use" => "口服",
"prescription_product_num" => "X1盒",
],
];
$result = $ca->getCertSign("491925054435950592", "491925054435950592", $data);
} catch (\Exception $e) {
}
}
}
+4
View File
@@ -1206,6 +1206,7 @@ class UserDoctorService extends BaseService
return fail(HttpEnumCode::SERVER_ERROR, "处方开具失败");
}
// 疾病数据
foreach ($prescription_icd as $item) {
// 获取疾病信息
$params = array();
@@ -1231,6 +1232,7 @@ class UserDoctorService extends BaseService
unset($disease_class_icd);
}
// 商品数据
foreach ($prescription_product as $item) {
// 获取商品数据
$params = array();
@@ -1277,6 +1279,8 @@ class UserDoctorService extends BaseService
unset($product);
}
// 加入分配药师队列
$data = array();
$data['order_prescription_id'] = $order_prescription['order_prescription_id'];