123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 |
- <?php
- declare (strict_types=1);
- namespace app\zskk\controller;
- use app\admin\servies\bi\BaseQcBiServies;
- use app\common\controller\ZskkApiController;
- use app\zskk\model\Medicalinformation;
- use app\zskk\servies\BiServies;
- use fast\Http;
- use think\Config;
- use think\exception\HttpResponseException;
- use think\facade\Cache;
- use think\facade\Db;
- use think\Response;
- use Throwable;
- class Bi extends ZskkApiController
- {
- public function __construct()
- {
- set_time_limit(0);
- ini_set('memory_limit', '1080M');
- }
- public function getInstitution()
- {
- $count = Db::table('institution')->count();
- return '参与互认机构'.$count.'家';
- }
- //诊断词云
- public function getMedicalData(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getMedicalData();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
- //全部机构的上传检验、检查项目数量
- public function getAllNum(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getAllNum();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
- //检查项目分类统计
- public function getExamData(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getExamData();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
-
- //重复检查的患者比率
- public function getRepeatExam(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getRepeatExam();
- Cache::set(__FUNCTION__,$data);
- }
- // $data = ['percent'=>'41'];
- $this->biSuccess($data);
- }
- //重复检验的患者比率
- public function getRepeatInspect(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getRepeatInspect();
- Cache::set(__FUNCTION__,$data);
- }
- // $data = ['percent'=>'37'];
- $this->biSuccess($data);
- }
- //所有项目中不互认原因构成比
- public function getBhrReason(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getAllBhrReason();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
- //重复检查的患者中重复项目的构成比
- public function getRepeatExamProject(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getRepeatExamProject();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
- //重复检验的患者中重复项目的构成比
- public function getRepeatInspectProject(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getRepeatInspectProject();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
- //重复检查排在前20的医生
- public function getRepeatExamDoctor(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getRepeatExamDoctor();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
- //重复检验排在前20的医生
- public function getRepeatInspectDoctor(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getRepeatInspectDoctor();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
- //被互认最多的检查项目前50项构成比
- public function getHrExam(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getHrExamItem();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
- //被互认最多的检验项目前50项构成比
- public function getHrInspect(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getHrInspectItem();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
- //有互认提示但未查看,重复检验的医生构成比
- public function unLookRepeatInspectDoctor(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->unLookRepeatInspectDoctor();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
- //有互认提示但未查看,重复检查的医生构成比
- public function unLookRepeatExamDoctor(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->unLookRepeatExamDoctor();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
- //有互认提示并已查看,重复检查的医生构成比
- public function lookRepeatExamDoctor(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->lookRepeatExamDoctor();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- }
- public function getLeida(BiServies $biServies): void
- {
- if(Cache::get(__FUNCTION__))
- {
- $data = Cache::get(__FUNCTION__);
- }else{
- $data = $biServies->getLeida();
- Cache::set(__FUNCTION__,$data);
- }
- $this->biSuccess($data);
- // $data = [
- // 'indicator' => [
- // ['key' => 'key1', 'max' => 10000, 'name' => 'Name1'],
- // ['key' => 'key2', 'max' => 10000, 'name' => 'Name2'],
- // ['key' => 'key3', 'max' => 10000, 'name' => 'Name3'],
- // ['key' => 'key4', 'max' => 10000, 'name' => 'Name4'],
- // ['key' => 'key5', 'max' => 10000, 'name' => 'Name5'],
- // ['key' => 'key6', 'max' => 10000, 'name' => 'Name6'],
- // ],
- // 'val' => [
- // [
- // 'name' => '上传',
- // 'key1' => 2342,
- // 'key2' => 2452,
- // 'key3' => 4335,
- // 'key4' => 7469,
- // 'key5' => 6572,
- // 'key6' => 9864,
- // ],
- // [
- // 'name' => '互认',
- // 'key1' => 1342,
- // 'key2' => 5452,
- // 'key3' => 3335,
- // 'key4' => 4469,
- // 'key5' => 6572,
- // 'key6' => 2864,
- // ]
- // ]
- // ];
- // $this->biSuccess($data);
- }
- public function getBhrInstitution(BiServies $biServies): void
- {
- $data = $biServies->getBhrInstitution();
- $this->biSuccess($data);
- }
- }
|