ButtDao.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. <?php
  2. namespace app\api\dao\butt;
  3. use app\api\actions\ZskkCache;
  4. use app\api\dao\ZskkDefaultDao;
  5. use app\api\model\hr\HrModel;
  6. use app\api\model\report\ReportModel;
  7. /**
  8. * 后台控制器基类
  9. * 接口方法权限 必传参数 接口返回 错误抛出 通用参数处理
  10. */
  11. class ButtDao extends ZskkDefaultDao {
  12. protected $flag = true;
  13. protected $logName = "ButtDao";
  14. protected $report = null;
  15. protected $hrModel = null;
  16. public function __construct(ReportModel $reportModel,HrModel $hrModel)
  17. {
  18. parent::__construct();
  19. $this->report = $reportModel;
  20. $this->hrModel = $hrModel;
  21. }
  22. public function getExams($institutionId,$num,$where,$timeWhere='',$status='')
  23. {
  24. $info = $this->report->getExams($institutionId,$num,$where,$timeWhere,$status);
  25. return $info;
  26. }
  27. public function getReports($institutionId,$page,$num,$timeWhere='')
  28. {
  29. $info = $this->report->getReports($institutionId,$page,$num,$timeWhere);
  30. return $info;
  31. }
  32. public function getConfirmExams($institutionId,$num)
  33. {
  34. $info = $this->report->getConfirmExams($institutionId,$num);
  35. return $info;
  36. }
  37. public function getExamById($id)
  38. {
  39. $info = $this->report->getExamById($id);
  40. return $info;
  41. }
  42. public function getDcotorId($name,$institution_id)
  43. {
  44. if($name == ''){
  45. return '';
  46. }
  47. $sql = "SELECT id FROM doctors where instr('$name',realname) and institution_id='$institution_id' and realname <> ''";
  48. $info = $this->report->getDoctorId($sql);
  49. $id = '';
  50. if(!empty($info)){
  51. $id = $info[0]['id'];
  52. }
  53. return $id;
  54. }
  55. public function getDcotorByNull($institution)
  56. {
  57. $data = $this->report->getDoctorByNull($institution);
  58. return $data;
  59. }
  60. public function makeDcotor($doctor)
  61. {
  62. $info = $this->report->makeDoctor($doctor);
  63. return $info;
  64. }
  65. public function checkReport($id)
  66. {
  67. $info = $this->report->checkReport($id);
  68. return $info;
  69. }
  70. public function saveReport($report,$id=null)
  71. {
  72. $info = $this->report->saveReport($report,$id);
  73. return $info;
  74. }
  75. public function saveAiReport($data)
  76. {
  77. $info = $this->report->saveAiReport($data);
  78. return $info;
  79. }
  80. public function getBodyByProject($project)
  81. {
  82. $info = $this->report->getBodyByProject($project);
  83. return $info;
  84. }
  85. public function getStudyByExamId($examId)
  86. {
  87. $info = $this->report->getStudyByExamId($examId);
  88. return $info;
  89. }
  90. public function updateExam($exam,$id)
  91. {
  92. $info = $this->report->updateExamInfo($exam,$id);
  93. return $info;
  94. }
  95. public function getPatientId($examId)
  96. {
  97. $id = $this->report->getPatientId($examId);
  98. return $id;
  99. }
  100. public function updatePatient($patient,$id)
  101. {
  102. $info = $this->report->updatePatient($patient,$id);
  103. return $info;
  104. }
  105. public function getIns($id)
  106. {
  107. $info = $this->report->getIns($id);
  108. return $info;
  109. }
  110. public function getHistorySend($exam,$study)
  111. {
  112. $info = $this->report->getHistorySend($exam,$study);
  113. return $info;
  114. }
  115. public function getUserWechat()
  116. {
  117. $info = $this->report->getUserWechat();
  118. return $info;
  119. }
  120. public function getExamData()
  121. {
  122. $info = $this->report->getExamData();
  123. return $info;
  124. }
  125. public function getExamReport($where,$field,$whereTime)
  126. {
  127. $info = $this->report->getExamReport($where,$field,$whereTime);
  128. return $info;
  129. }
  130. public function getPicNumber()
  131. {
  132. $info = $this->report->getPicNumber();
  133. return $info;
  134. }
  135. public function getYestNumber()
  136. {
  137. $info = $this->report->getYestNumber();
  138. return $info;
  139. }
  140. public function getInsInfo()
  141. {
  142. $info = $this->report->getInsInfo();
  143. return $info;
  144. }
  145. public function getAllInsInfo()
  146. {
  147. $info = $this->report->getAllInsInfo();
  148. return $info;
  149. }
  150. public function insertDing($data)
  151. {
  152. $info = $this->report->insertDing($data);
  153. return $info;
  154. }
  155. public function get2Ins()
  156. {
  157. $num = $this->report->get2Ins();
  158. return $num;
  159. }
  160. public function get3Ins()
  161. {
  162. $num = $this->report->get3Ins();
  163. return $num;
  164. }
  165. public function getInstitutionId($study_id)
  166. {
  167. $id = $this->report->getInstitutionId($study_id);
  168. return $id;
  169. }
  170. public function getPatientByStudyId($study_id)
  171. {
  172. $id = $this->report->getPatientByStudyId($study_id);
  173. return $id;
  174. }
  175. public function getPatientNameByStudyId($study_id)
  176. {
  177. $id = $this->report->getPatientNameByStudyId($study_id);
  178. return $id;
  179. }
  180. public function getExamBySearch($where,$institution)
  181. {
  182. $info = $this->report->getExamBySearch($where,$institution);
  183. return $info;
  184. }
  185. public function getExamByPatient($where)
  186. {
  187. $info = $this->report->getExamByPatient($where);
  188. return $info;
  189. }
  190. public function save_video_url($data)
  191. {
  192. $info = $this->report->save_video_url($data);
  193. return $info;
  194. }
  195. public function getHrItems($project)
  196. {
  197. return $this->hrModel->where('name',$project)->find();
  198. }
  199. public function getWorkList()
  200. {
  201. $info = $this->report->getWorkList();
  202. return $info;
  203. }
  204. public function getNotInsReport($where_status,$where_institution,$time,$field)
  205. {
  206. $info = $this->report->getNotInsReport($where_status,$where_institution,$time,$field);
  207. return $info;
  208. }
  209. public function getRisVersion()
  210. {
  211. $info = $this->report->getRisVersion();
  212. return $info;
  213. }
  214. public function saveCache($k,$v,$time=86400*2)
  215. {
  216. $cache = $this->setCache($k,$v,$time);
  217. return $cache;
  218. }
  219. public function getInsIds()
  220. {
  221. $ids = $this->report->getInsIds();
  222. return $ids;
  223. }
  224. public function getExamMaxTime($id)
  225. {
  226. $time = $this->report->getExamMaxTime($id);
  227. return $time;
  228. }
  229. public function get7OutExam($id)
  230. {
  231. $count = $this->report->get7OutExam($id);
  232. return $count;
  233. }
  234. public function getProjectName($id)
  235. {
  236. $name = $this->report->getProjectName($id);
  237. return $name;
  238. }
  239. public function getVersionInfo($project)
  240. {
  241. $info = $this->report->getVersionInfo($project);
  242. return $info;
  243. }
  244. public function getBindInfo($ins,$start,$finish)
  245. {
  246. $info = $this->report->getBindInfo($ins,$start,$finish);
  247. return $info;
  248. }
  249. public function getExamByIds($ids)
  250. {
  251. $info = $this->report->getExamByIds($ids);
  252. return $info;
  253. }
  254. public function getInsById($id)
  255. {
  256. $info = $this->report->getInsById($id);
  257. return $info;
  258. }
  259. public function checkAnnes($where)
  260. {
  261. $info = $this->report->checkAnnes($where);
  262. return $info;
  263. }
  264. public function saveAnnex($data)
  265. {
  266. $info = $this->report->saveAnnex($data);
  267. return $info;
  268. }
  269. public function updateAnnex($data,$where)
  270. {
  271. $info = $this->report->updateAnnex($data,$where);
  272. return $info;
  273. }
  274. public function getRegisterExam($where)
  275. {
  276. $info = $this->report->getRegisterExam($where);
  277. return $info;
  278. }
  279. public function getField($ins)
  280. {
  281. $info = $this->report->getField($ins);
  282. return $info;
  283. }
  284. public function getExam($where,$field)
  285. {
  286. $id = $this->report->getExamInfo($where,$field);
  287. return $id;
  288. }
  289. public function getPrint($where)
  290. {
  291. $info = $this->report->getPrint($where);
  292. return $info;
  293. }
  294. public function updatePrintSync($data,$where)
  295. {
  296. $info = $this->report->updatePrintSync($data,$where);
  297. return $info;
  298. }
  299. public function savePrintSync($data)
  300. {
  301. $info = $this->report->savePrintSync($data);
  302. return $info;
  303. }
  304. public function checkPrint($where,$time)
  305. {
  306. $info = $this->report->checkPrint($where,$time);
  307. return $info;
  308. }
  309. public function printZz($where)
  310. {
  311. $info = $this->report->printZz($where);
  312. return $info;
  313. }
  314. public function getExamFromReport($id)
  315. {
  316. $info = $this->report->getExamFromReport($id);
  317. return $info;
  318. }
  319. public function insertExam($data)
  320. {
  321. $info = $this->report->insertExam($data);
  322. return $info;
  323. }
  324. public function saveFileData($data)
  325. {
  326. $info = $this->report->saveFileData($data);
  327. return $info;
  328. }
  329. public function insertPatient($data)
  330. {
  331. $info = $this->report->insertPatient($data);
  332. return $info;
  333. }
  334. public function getPayExam($where,$time)
  335. {
  336. $info = $this->report->getPayExam($where,$time);
  337. return $info;
  338. }
  339. public function getPayExams($where,$field)
  340. {
  341. $info = $this->report->getPayExams($where,$field);
  342. return $info;
  343. }
  344. public function changeSyncStatus($id)
  345. {
  346. $info = $this->report->changeSyncStatus($id);
  347. return $info;
  348. }
  349. public function changePayStatus($patientNum,$ins)
  350. {
  351. $info = $this->report->changePayStatus($patientNum,$ins);
  352. return $info;
  353. }
  354. public function getMiddleInfo($where)
  355. {
  356. $info = $this->report->getMiddleInfo($where);
  357. return $info;
  358. }
  359. public function changeMiddleStatus($where,$update)
  360. {
  361. $info = $this->report->changeMiddleStatus($where,$update);
  362. return $info;
  363. }
  364. public function saveMiddle($data)
  365. {
  366. $info = $this->report->saveMiddle($data);
  367. return $info;
  368. }
  369. public function getNoteUrl($id)
  370. {
  371. $info = $this->report->getNoteUrl($id);
  372. return $info;
  373. }
  374. public function insertSpecialLog($url, $diff)
  375. {
  376. $this->report->insertSpecialLog($url, $diff);
  377. }
  378. public function getAllIns()
  379. {
  380. $info = $this->report->getAllIns();
  381. return $info;
  382. }
  383. public function getYestExams()
  384. {
  385. $info = $this->report->getYestExams();
  386. return $info;
  387. }
  388. public function getYestCompleteExams()
  389. {
  390. $info = $this->report->getYestCompleteExams();
  391. return $info;
  392. }
  393. }