修正获取处方详情接口返回数据

This commit is contained in:
2023-03-01 15:55:25 +08:00
parent 5a4fcaaf7f
commit e047f4971c
9 changed files with 138 additions and 20 deletions
+3 -3
View File
@@ -212,10 +212,10 @@ class BasicDataService extends BaseService
'frequency_use',
'available_days',
];
$params = array();
$params[] = ['product_name', 'like', '%' . $product_keyword . '%'];
$product = Product::getList($params, $fields);
$params = array();
$product = Product::getSearchKeywordList($params, $product_keyword,$fields);
if (empty($product)) {
return success();
}
+7 -8
View File
@@ -70,7 +70,7 @@ class OrderPrescriptionService extends BaseService
$params = array();
$params['order_inquiry_id'] = $order_inquiry_id;
$params['order_prescription_id'] = $order_prescription_id;
$order_prescription_products = OrderPrescriptionProduct::getWithProductList($params);
$order_prescription_products = OrderPrescriptionProduct::getLimit($params);
if(empty($order_prescription_products)){
return [];
}
@@ -82,13 +82,12 @@ class OrderPrescriptionService extends BaseService
$data['prescription_product_id'] = $order_prescription_product['prescription_product_id'];
$data['product_id'] = $order_prescription_product['product_id'];
$data['prescription_product_num'] = $order_prescription_product['prescription_product_num'];
$data['product_name'] = $order_prescription_product['Product']['product_name'];
$data['product_cover_img'] = addAliyunOssWebsite($order_prescription_product['Product']['product_cover_img']);
$data['product_spec'] = $order_prescription_product['Product']['product_spec'];
$data['single_unit'] = $order_prescription_product['Product']['single_unit'];
$data['single_use'] = $order_prescription_product['Product']['single_use'];
$data['packaging_unit'] = $order_prescription_product['Product']['packaging_unit'];
$data['frequency_use'] = $order_prescription_product['Product']['frequency_use'];
$data['product_name'] = $order_prescription_product['product_name'] ?? "";
$data['product_spec'] = $order_prescription_product['product_spec'] ?? "";
$data['single_unit'] = $order_prescription_product['single_unit'] ?? "";
$data['single_use'] = $order_prescription_product['single_use'] ?? "";
$data['packaging_unit'] = $order_prescription_product['packaging_unit'] ?? "";
$data['frequency_use'] = $order_prescription_product['frequency_use'] ?? "";
$result[] = $data;
}
+24 -1
View File
@@ -18,6 +18,7 @@ use App\Model\OrderEvaluation;
use App\Model\OrderInquiry;
use App\Model\OrderInquiryCase;
use App\Model\OrderPrescription;
use App\Model\OrderPrescriptionIcd;
use App\Model\OrderProductItem;
use App\Model\User;
use App\Model\UserDoctor;
@@ -851,17 +852,39 @@ class UserDoctorService extends BaseService
$order_prescription_product = $OrderPrescriptionService->getproductList($order_inquiry_id,$order_prescription_id);
// 获取处方关联疾病表
$fields = [
'prescription_icd_id',
'icd_id',
'icd_name',
];
$params = array();
$params['order_prescription_id'] = $order_prescription_id;
$order_prescription_icd = OrderPrescriptionIcd::getList($params,$fields);
}
$result = array();
$result['inquiry_case_product'] = $inquiry_case_product;// 用药意向
$result['order_prescription_product'] = $order_prescription_product ?? [];// 开方药品
$result['prescription_product'] = $order_prescription_product ?? [];// 开方药品
$result['case'] = $order_inquiry_case;// 病例数据
$result['prescription_icd'] = $order_prescription_icd ?? [];// 处方诊断疾病
$result['prescription']['doctor_advice'] = $order_prescription['doctor_advice'] ?? "";// 医嘱
return success($result);
}
/**
* 修改处方
* @return array
*/
public function putPrescription(): array
{
$user_info = $this->request->getAttribute("userInfo") ?? [];
$order_inquiry_id = $this->request->input('order_inquiry_id');
$order_prescription_id = $this->request->input('order_prescription_id');
return success();
}
/**
* 检测医生身份认证
* @param object|array $user_doctor 医生表数据