更新
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\controller\stats;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\stats\RevisitCohortLogic;
|
||||
|
||||
/**
|
||||
* 新指派复诊接诊率(按指派日期选患者,订单累计至查询时刻)
|
||||
*
|
||||
* - GET stats.revisitAssignRate/overview N 诊接诊率(部门 → 医助分组 + 合计)
|
||||
* - GET stats.revisitAssignRate/deptOptions 部门下拉(前端组树)
|
||||
* - GET stats.revisitAssignRate/assignLines 「被指派数」明细(按诊单聚合)
|
||||
* - GET stats.revisitAssignRate/visitOrderLines 「N 诊单数」订单明细
|
||||
*/
|
||||
class RevisitAssignRateController extends BaseAdminController
|
||||
{
|
||||
protected const COHORT_TYPE = 'new';
|
||||
|
||||
public function overview()
|
||||
{
|
||||
// 涉及指派日志 + 全量订单序列扫描,放宽执行时间兜底
|
||||
@set_time_limit(120);
|
||||
$params = $this->request->get();
|
||||
|
||||
try {
|
||||
return $this->data(RevisitCohortLogic::overview($params, static::COHORT_TYPE));
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
return $this->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public function deptOptions()
|
||||
{
|
||||
return $this->data(RevisitCohortLogic::deptOptions());
|
||||
}
|
||||
|
||||
/** 「被指派数」点击下钻:诊单维度明细 */
|
||||
public function assignLines()
|
||||
{
|
||||
@set_time_limit(120);
|
||||
$params = $this->request->get();
|
||||
|
||||
try {
|
||||
return $this->data(RevisitCohortLogic::assignLines($params, static::COHORT_TYPE));
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
return $this->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/** 「N 诊单数」点击下钻:具体订单明细 */
|
||||
public function visitOrderLines()
|
||||
{
|
||||
@set_time_limit(120);
|
||||
$params = $this->request->get();
|
||||
|
||||
try {
|
||||
return $this->data(RevisitCohortLogic::visitOrderLines($params, static::COHORT_TYPE));
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
return $this->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\controller\stats;
|
||||
|
||||
/** 继承复诊接诊率独立接口,统计类型由服务端固定,权限与新指派页分开登记。 */
|
||||
class RevisitInheritRateController extends RevisitAssignRateController
|
||||
{
|
||||
protected const COHORT_TYPE = 'inherit';
|
||||
}
|
||||
Reference in New Issue
Block a user