初始化提交
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Model\OrderPrescription;
|
||||
use Hyperf\Contract\LengthAwarePaginatorInterface;
|
||||
|
||||
class OrderPrescriptionService extends BaseService
|
||||
{
|
||||
/**
|
||||
* 获取医生是否存在被驳回处方
|
||||
* @param string $doctor_id 医生id
|
||||
* @return bool
|
||||
*/
|
||||
public function getDoctorExistsAuditFail(string $doctor_id): bool
|
||||
{
|
||||
$params = array();
|
||||
$params['doctor_id'] = $doctor_id;
|
||||
$params['prescription_audit_status'] = 2;//处方审核状态(0:审核中 1:审核成功 2:审核驳回)
|
||||
$params['is_pass'] = 1;//处方平台是否审核通过(0:否 1:是)
|
||||
$params['is_delete'] = 0;//是否删除(0:否 1:是)
|
||||
return OrderPrescription::getExists($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药师待审核处方-分页
|
||||
* @param string $pharmacist_id
|
||||
* @return array
|
||||
*/
|
||||
public function getPharmacistWaitAuditPage(string $pharmacist_id): array
|
||||
{
|
||||
$params = array();
|
||||
$params['pharmacist_id'] = $pharmacist_id;
|
||||
$params['prescription_audit_status'] = 0; //处方审核状态(0:审核中 1:审核成功 2:审核驳回)
|
||||
|
||||
$fields = [
|
||||
"order_prescription_id",
|
||||
"order_inquiry_id",
|
||||
"doctor_id",
|
||||
"pharmacist_id",
|
||||
"prescription_status",
|
||||
"prescription_audit_status",
|
||||
"is_delete",
|
||||
"is_pass",
|
||||
"prescription_code",
|
||||
"not_pass_reason",
|
||||
"audit_fail_reason",
|
||||
"doctor_name",
|
||||
"patient_name",
|
||||
"patient_sex",
|
||||
"patient_age",
|
||||
"created_at",
|
||||
];
|
||||
|
||||
$page = $this->request->input('page', 1);
|
||||
$per_page = $this->request->input('per_page', 10);
|
||||
return OrderPrescription::getPage($params,$fields);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user