123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- <?php
- namespace app\api\controller\dict;
- use app\api\controller\ZskkDefaultController;
- use app\api\servies\dict\DictService;
- use think\Exception;
- class DictController extends ZskkDefaultController
- {
- protected $needToken = true;
- protected $logName = "DictController";
- /**
- * 获取设备列表
- */
- public function deviceList(DictService $service)
- {
- try{
- // 获取账号可以使用的设备
- $data = $service->getDevice($this->getToken());
- // 返回
- return $this->success($data);
- } catch (Exception $exception){
- $this->throwError($exception->getMessage(),0001);
- }
- }
- public function department(DictService $service)
- {
- $data = $service->getDepartment($this->getToken());
- return $this->success($data);
- }
- public function doctors(DictService $service)
- {
- $data = $service->getDoctors($this->getToken());
- return $this->success($data);
- }
- /**
- * 获取检查子类列表
- */
- public function examSubclassList(DictService $service)
- {
- try{
- // 获取检查子类
- $data = $service->getExamSubclass();
- // 返回
- return $this->success($data);
- } catch (Exception $exception){
- $this->throwError($exception->getMessage(),0001);
- }
- }
- /**
- * 获取检查项目
- */
- public function examProjectList(DictService $service)
- {
- try{
- // 获取检查子类
- $data = $service->getExamProject();
- // 返回
- return $this->success($data);
- } catch (Exception $exception){
- $this->throwError($exception->getMessage(),0001);
- }
- }
- /**
- * 获取检查类别
- */
- public function getExamClass(DictService $service)
- {
- try{
- // 获取检查子类
- $data = $service->getExamClass();
- // 返回
- return $this->success($data);
- } catch (Exception $exception){
- $this->throwError($exception->getMessage(),0001);
- }
- }
- /**
- * 获取疾病史
- * @author matielong
- */
- public function illness(DictService $service)
- {
- try{
- // 获取检查子类
- $data = $service->getIllness();
- // 返回
- return $this->success($data);
- } catch (Exception $exception){
- $this->throwError($exception->getMessage(),0001);
- }
- }
- /**
- * 获取家族疾病史
- */
- public function familyIll(DictService $service)
- {
- try{
- // 获取检查子类
- $data = $service->getFamilyIll();
- // 返回
- return $this->success($data);
- } catch (Exception $exception){
- $this->throwError($exception->getMessage(),0001);
- }
- }
- /**
- * icd大类字典
- * @param DictService $service
- * @return array|false
- */
- public function icdClass(DictService $service)
- {
- $data = $service->icdClass();
- return $this->success($data);
- }
- /**
- * icd小项列表
- * @param DictService $service
- * @return false|string
- */
- public function icdList(DictService $service)
- {
- $params = $this->getParams();
- $data = $service->icdList($params);
- return $this->success($data);
- }
- public function saveQuality(DictService $service)
- {
- $params = $this->getParams();
- $data = $service->saveQuality($params,$this->getToken());
- return $this->success($data);
- }
- public function getQuality(DictService $service)
- {
- $params = $this->getParams();
- $data = $service->getQuality($params['id'],$this->getToken());
- return $this->success($data);
- }
- public function qualityFactorPic(DictService $service)
- {
- $data = $service->qualityFactorPic();
- return $this->success($data);
- }
- public function qualityFactorReport(DictService $service)
- {
- $data = $service->qualityFactorReport();
- return $this->success($data);
- }
- public function getApplicationDepartment(DictService $service)
- {
- $data = $service->getApplicationDepartment($this->getToken());
- return $this->success($data);
- }
- public function getNewPart(DictService $service)
- {
- $data = $service->getNewPart($this->getToken());
- return $this->success($data);
- }
- }
|