1
This commit is contained in:
parent
673dca88ca
commit
802a5081fb
@ -173,4 +173,15 @@ class PatientOrderController extends AbstractController
|
||||
$data = $PatientOrderService->getPatientPrescriptionOrderList();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取处方订单详情
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function getPatientPrescriptionOrderInfo(): ResponseInterface
|
||||
{
|
||||
$PatientOrderService = new PatientOrderService();
|
||||
$data = $PatientOrderService->getPatientPrescriptionOrderInfo();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
}
|
||||
@ -213,4 +213,23 @@ class OrderPrescription extends Model
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 单条
|
||||
* 处方疾病表
|
||||
* 处方商品表
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @param int|null $page
|
||||
* @param int|null $per_page
|
||||
* @return object|null
|
||||
*/
|
||||
public static function getWithOne(array $params, array $fields = ["*"], int $page = null, ?int $per_page = 10): object|null
|
||||
{
|
||||
return self::with([
|
||||
"UserDoctor:doctor_id,user_name,doctor_title",
|
||||
"OrderPrescriptionIcd:prescription_icd_id,order_prescription_id,icd_name",
|
||||
"OrderPrescriptionProduct:prescription_product_id,order_prescription_id,product_name,product_spec"
|
||||
])
|
||||
->where($params)->first($fields);
|
||||
}
|
||||
}
|
||||
|
||||
@ -706,6 +706,10 @@ class PatientOrderService extends BaseService
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取处方订单列表
|
||||
* @return array
|
||||
*/
|
||||
public function getPatientPrescriptionOrderList(): array
|
||||
{
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
@ -729,4 +733,23 @@ class PatientOrderService extends BaseService
|
||||
|
||||
return success($order_prescription);
|
||||
}
|
||||
|
||||
public function getPatientPrescriptionOrderInfo(){
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
|
||||
$order_prescription_id = $this->request->route('order_prescription_id');
|
||||
|
||||
// 获取处方数据
|
||||
$fields = [
|
||||
'order_prescription_id',
|
||||
'prescription_status',
|
||||
];
|
||||
$params = array();
|
||||
$params['order_prescription_id'] = $order_prescription_id;
|
||||
$params['patient_id'] = $user_info['client_user_id'];
|
||||
$params['pharmacist_audit_status'] = 1;
|
||||
$params['platform_audit_status'] = 1;
|
||||
$params['is_delete'] = 0;
|
||||
$order_prescription = OrderPrescription::getWithOne($params);
|
||||
}
|
||||
}
|
||||
@ -412,7 +412,7 @@ class UserDoctorService extends BaseService
|
||||
$params['doctor_id'] = $user_info['client_user_id'];
|
||||
$params['pharmacist_audit_status'] = $pharmacist_audit_status;
|
||||
$params['is_delete'] = 0;
|
||||
$order_prescriptions = OrderPrescription::getWithIcdPage($params,$page,$per_page);
|
||||
$order_prescriptions = OrderPrescription::getWithIcdPage($params,['*'],$page,$per_page);
|
||||
if (empty($order_prescriptions)) {
|
||||
return success($order_prescriptions);
|
||||
}
|
||||
|
||||
@ -318,7 +318,7 @@ Router::addGroup('/patient', function () {
|
||||
Router::get('', [PatientOrderController::class, 'getPatientPrescriptionOrderList']);
|
||||
|
||||
// 获取处方订单详情
|
||||
Router::post('/8', [PatientOrderController::class, 'imCallBack']);
|
||||
Router::get('/{order_prescription_id:\d+}', [PatientOrderController::class, 'getPatientPrescriptionOrderInfo']);
|
||||
|
||||
// 获取处方订单支付页详情-处方管理
|
||||
Router::post('/16', [PatientOrderController::class, 'imCallBack']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user