You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

468 lines
17 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div>
  3. <div class="listBtn">
  4. <el-button type="primary" class="btnClass" @click="prList">人员列表</el-button>
  5. </div>
  6. <div class="listBtn">
  7. <el-button type="primary" class="btnClass" @click="toDoctorCheck">医生诊台</el-button>
  8. </div>
  9. <div class="listBtn">
  10. <el-button type="primary" class="btnClass" @click="save">保存</el-button>
  11. </div>
  12. <div class="listBtn">
  13. <el-button type="primary" class="btnClass" @click="edit">修改</el-button>
  14. </div>
  15. <div class="listBtn">
  16. <el-button type="primary" class="btnClass" @click="del">取消总检</el-button>
  17. </div>
  18. <div class="listBtn">
  19. <el-button type="primary" class="btnClass" @click="audit">审核</el-button>
  20. </div>
  21. <div class="listBtn">
  22. <el-button type="primary" class="btnClass" @click="unAudit">取消审核</el-button>
  23. </div>
  24. <div class="listBtn">
  25. <el-button type="primary" class="btnClass" @click="addSuggtion">新增建议</el-button>
  26. </div>
  27. <div class="listBtn">
  28. <el-button type="primary" class="btnClass" @click="addDiagnosis">疾病诊断</el-button>
  29. </div>
  30. <div class="listBtn">
  31. <el-button type="primary" class="btnClass" @click="report">体检报告</el-button>
  32. </div>
  33. <div class="listBtn">
  34. <el-button type="primary" class="btnClass" @click="reCheck">复查</el-button>
  35. </div>
  36. <div class="listBtn">
  37. <el-button type="primary" class="btnClass" @click="intervene">干预措施</el-button>
  38. </div>
  39. <!-- 体检人员列表
  40. <el-dialog title="体检人员列表" :visible.sync="sumDoctorCheck.sumDoctorCheckDialogVisible" width="1000px">
  41. <PatientRegisterList win="sumDoctorCheck" />
  42. </el-dialog>
  43. -->
  44. <el-drawer title="体检人员列表" :visible.sync="sumDoctorCheck.sumDoctorCheckDialogVisible" direction="rtl"
  45. :wrapperClosable="false">
  46. <PatientRegisterList :win="sumDoctorCheck" />
  47. </el-drawer>
  48. <el-drawer title="诊断列表" :visible.sync="sumDoctorCheck.sumDiagnosisVisible" direction="ltr" size="300"
  49. :wrapperClosable="false">
  50. <SumDiagnosis :patientRegisterId="sumDoctorCheck.sumPREdit.id" />
  51. </el-drawer>
  52. </div>
  53. </template>
  54. <script>
  55. import { mapState } from "vuex";
  56. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  57. import { arrayExistObj, parseID } from "../../utlis/proFunc";
  58. import PatientRegisterList from "../doctorCheck/PatientRegisterList.vue";
  59. import SumDiagnosis from "./SumDiagnosis.vue";
  60. export default {
  61. components: {
  62. PatientRegisterList,
  63. SumDiagnosis,
  64. },
  65. data() {
  66. return {
  67. dialogVisible: false,
  68. tableData: [
  69. {
  70. col: 'col',
  71. details: [{ id: 1, name: '000' }, { id: 2, name: '001' }]
  72. }
  73. ],
  74. };
  75. },
  76. created() { },
  77. //挂载完成
  78. mounted() {
  79. },
  80. computed: {
  81. ...mapState(["dict", "patientRegister", "doctorCheck", "sumDoctorCheck"]),
  82. },
  83. methods: {
  84. prList() {
  85. this.sumDoctorCheck.sumDoctorCheckDialogVisible = true
  86. },
  87. //诊断列表
  88. addDiagnosis(){
  89. this.sumDoctorCheck.sumDiagnosisVisible = true
  90. },
  91. //to医生诊台
  92. toDoctorCheck() {
  93. this.$router.push({ path: "/doctorCheck" });
  94. },
  95. //操作判断
  96. optGrant(optType) {
  97. let ret = ''
  98. if (!this.sumDoctorCheck.sumPREdit.id) return '请选择体检人员'
  99. if (this.sumDoctorCheck.sumPREdit.isLock == 'Y') return '人员已锁定,不可执行此操作'
  100. if (optType == 'save') {
  101. //if (!this.sumDoctorCheck.sumPREdit.summaryDoctor) return "请选择总检医生"
  102. if (this.sumDoctorCheck.sumPREdit.completeFlag == '3') return "该人员已总检,不可再执行此操作,如需操作请点【修改】"
  103. if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
  104. }
  105. if (optType == 'edit') {
  106. if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员尚未总检,无需执行此操作"
  107. if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
  108. }
  109. if (optType == 'del') {
  110. if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员尚未总检,无需执行此操作"
  111. if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
  112. }
  113. if (optType == 'audit') {
  114. if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该检查项目尚未保存,不可执行此操作"
  115. if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return "该人员检查已审核,无需再执行此操作"
  116. }
  117. if (optType == 'unAudit') {
  118. if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员尚未总检,不可执行此操作"
  119. if (this.sumDoctorCheck.sumPREdit.isAudit == 'N') return "该人员检查尚未审核,无需执行此操作"
  120. }
  121. if (optType == 'report') {
  122. if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员检查尚未总检,不可执行此操作"
  123. if (this.sumDoctorCheck.sumPREdit.isAudit == 'N') return "该人员检查尚未审核,不可执行此操作"
  124. }
  125. return ret
  126. },
  127. //保存数据
  128. save() {
  129. let ret = this.optGrant('save')
  130. if (ret) {
  131. alert(ret)
  132. return
  133. }
  134. //更新总检
  135. this.updateSumDoctorCheck();
  136. //更新综述
  137. this.saveSummary();
  138. //更新建议与诊断
  139. this.saveSuggestion();
  140. },
  141. //修改结果
  142. edit() {
  143. let ret = this.optGrant('edit')
  144. if (ret) {
  145. alert(ret)
  146. return
  147. }
  148. this.sumDoctorCheck.sumPREdit.completeFlag = '2'
  149. },
  150. //取消结果
  151. del() {
  152. let body = {
  153. patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
  154. //summaryDoctor: this.sumDoctorCheck.sumPREdit.summaryDoctor,
  155. //summaryDate: this.sumDoctorCheck.sumPREdit.summaryDate,
  156. completeFlag: '2'
  157. }
  158. console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
  159. postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
  160. .then((res) => {
  161. console.log("del", res.data);
  162. if (res.code != -1) {
  163. this.sumDoctorCheck.sumPREdit.completeFlag = '2';
  164. console.log(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
  165. return postapi(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
  166. }
  167. })
  168. .then((res) => {
  169. console.log("deletesumsuggestionmany", res.data);
  170. if (res.code != -1) {
  171. console.log(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
  172. return postapi(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
  173. }
  174. })
  175. .then((res) => {
  176. console.log("deletesumsuggestionmany", res.data);
  177. if (res.code != -1) {
  178. this.$message({ type: "success", message: `取消总检成功!` });
  179. }
  180. })
  181. .catch((err) => {
  182. this.$message({ type: "error", message: `取消总检失败,原因:${err}` });
  183. });
  184. },
  185. //审核
  186. audit() {
  187. let ret = this.optGrant('audit')
  188. if (ret) {
  189. alert(ret)
  190. return
  191. }
  192. let body = {
  193. patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
  194. //auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  195. //auditDate: "string" 不传时,取当前时间
  196. isAudit: 'Y'
  197. }
  198. console.log(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
  199. postapi(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
  200. .then((res) => {
  201. console.log("audit", res.data);
  202. if (res.code != -1) {
  203. this.sumDoctorCheck.sumPREdit.isAudit = 'Y';
  204. this.$message({ type: "success", message: `总检审核成功` });
  205. }
  206. })
  207. .catch((err) => {
  208. this.$message({ type: "error", message: `总检审核失败,原因:${err}` });
  209. });
  210. },
  211. //取消审核
  212. unAudit() {
  213. let ret = this.optGrant('unAudit')
  214. if (ret) {
  215. alert(ret)
  216. return
  217. }
  218. let body = {
  219. patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
  220. //auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  221. //auditDate: "string" 不传时,取当前时间
  222. isAudit: 'N'
  223. }
  224. console.log(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
  225. postapi(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
  226. .then((res) => {
  227. console.log("unAudit", res.data);
  228. if (res.code != -1) {
  229. this.sumDoctorCheck.sumPREdit.isAudit = 'N';
  230. this.$message({ type: "success", message: `取消总检审核成功` });
  231. }
  232. })
  233. .catch((err) => {
  234. this.$message({ type: "error", message: `取消总检审核失败,原因:${err}` });
  235. });
  236. },
  237. //体检报告
  238. report() {
  239. let ret = this.optGrant('report')
  240. if (ret) {
  241. alert(ret)
  242. return
  243. }
  244. ///3a0c990e-5756-2dc0-19d5-69a617fe4048
  245. let ReportCode = '0005';
  246. let token = localStorage.getItem('token');
  247. let user = localStorage.getItem('user');
  248. let toOutShell = {
  249. ReportCode, token,
  250. preViewCanPrint: this.sumDoctorCheck.sumPREdit.isAudit,
  251. Parameters: [
  252. { Name: 'printer', Value: user },
  253. { Name: 'LTS', Value: 'Y' }, //Y、N
  254. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  255. { Name: "peisReportFirstPage", Value: "pic/peisReportFirstPage.jpg" },
  256. { Name: "peisReportPageHeader", Value: "pic/peisReportPageHeader.jpg" },
  257. { Name: "peisReportPageFooter", Value: "pic/peisReportPageFooter.jpg" }
  258. ],
  259. };
  260. postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
  261. .then((res) => {
  262. if (res.code != -1) {
  263. toOutShell.ReportTable = res.data;
  264. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  265. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  266. }
  267. })
  268. .catch(err => {
  269. this.$message.warning(err);
  270. });
  271. },
  272. //增加建议
  273. addSuggtion() {
  274. let id = String(new Date().getTime())
  275. let pojo = {
  276. id,
  277. patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
  278. diagnosisId: null,
  279. details: [
  280. {
  281. sumSuggestionHeaderId: id,
  282. suggestionContent: '',
  283. }
  284. ]
  285. }
  286. this.sumDoctorCheck.suggestionList.push(pojo);
  287. },
  288. //复查
  289. reCheck() {
  290. console.log("parseID('123456198007240000')", parseID('123456198007240000'))
  291. let ret = this.optGrant('reCheck')
  292. if (ret) {
  293. alert(ret)
  294. return
  295. }
  296. },
  297. //干预措施
  298. intervene() {
  299. let ret = this.optGrant('intervene')
  300. if (ret) {
  301. alert(ret)
  302. return
  303. }
  304. },
  305. //更新总检
  306. updateSumDoctorCheck() {
  307. let body = {
  308. patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
  309. //summaryDoctor:this.sumDoctorCheck.sumPREdit.summaryDoctor,
  310. //summaryDate: this.sumDoctorCheck.sumPREdit.summaryDate,
  311. completeFlag: '3'
  312. }
  313. console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
  314. postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
  315. .then((res) => {
  316. console.log("updateSumDoctorCheck", res.data);
  317. if (res.code != -1) {
  318. this.sumDoctorCheck.sumPREdit.completeFlag = '3';
  319. this.$message({ type: "success", message: `总检保存成功!` });
  320. }
  321. })
  322. .catch((err) => {
  323. this.$message({ type: "error", message: `总检保存失败,原因:${err}` });
  324. });
  325. },
  326. //更新综述
  327. saveSummary() {
  328. let body = []
  329. this.sumDoctorCheck.summaryList.forEach(item => {
  330. delete item.id;
  331. delete item.summaryFlag;
  332. delete item.displayOrder;
  333. item.details.forEach(e => {
  334. delete e.sumSummaryHeaderId;
  335. delete e.displayOrder;
  336. })
  337. body.push(item)
  338. });
  339. console.log(`/api/app/sumsummaryheader/createsumsummary`, body)
  340. if (body.length < 1) return
  341. postapi(`/api/app/sumsummaryheader/createsumsummary`, body)
  342. .then((res) => {
  343. console.log("saveSummary", res.data);
  344. if (res.code != -1) {
  345. //this.sumDoctorCheck.sumPREdit.completeFlag = '1';
  346. }
  347. })
  348. .catch((err) => {
  349. this.$message({ type: "error", message: `综述保存失败,原因:${err}` });
  350. });
  351. },
  352. //更新建议
  353. saveSuggestion() {
  354. let body = []
  355. this.sumDoctorCheck.suggestionList.forEach(item => {
  356. delete item.id;
  357. delete item.suggestionFlag;
  358. delete item.displayOrder;
  359. item.details.forEach(e => {
  360. delete e.sumSuggestionHeaderId;
  361. delete e.displayOrder;
  362. })
  363. body.push(item)
  364. });
  365. console.log(`/api/app/sumsuggestionheader/createsumsuggestion`, body)
  366. if (body.length < 1) return
  367. postapi(`/api/app/sumsuggestionheader/createsumsuggestion`, body)
  368. .then((res) => {
  369. console.log("saveSuggestion", res.data);
  370. if (res.code != -1) {
  371. //this.sumDoctorCheck.sumPREdit.completeFlag = '1';
  372. }
  373. })
  374. .catch((err) => {
  375. this.$message({ type: "error", message: `建议保存失败,原因:${err}` });
  376. });
  377. },
  378. addSummary() {
  379. if (!this.sumDoctorCheck.sumPREdit.id) {
  380. alert("请选择检查项目")
  381. return
  382. }
  383. this.doctorCheck.checkSummaryList.push({
  384. registerCheckId: this.sumDoctorCheck.sumPREdit.id,
  385. summary: '',
  386. summaryFlag: 'N',
  387. })
  388. this.doctorCheck.checkSuggestionList.push({
  389. registerCheckId: this.sumDoctorCheck.sumPREdit.id,
  390. suggestion: '',
  391. })
  392. },
  393. },
  394. //监听事件()
  395. watch: {
  396. //1级单位值改变,分组改变
  397. "patientRegister.query.CustomerOrgParentId"(newVal, oldVal) {
  398. console.log(
  399. "watch patientRegister.query.CustomerOrgParentId newVal:",
  400. newVal,
  401. " oldVal:",
  402. oldVal
  403. );
  404. if (newVal != oldVal && newVal !== this.dict.personOrgId) {
  405. this.getCustomerOrgGroup(newVal);
  406. }
  407. },
  408. },
  409. };
  410. </script>
  411. <style scoped>
  412. .listBtn {
  413. margin-top: 10px;
  414. margin-left: 10px;
  415. text-align: center;
  416. }
  417. .btnClass {
  418. width: 110px;
  419. }
  420. </style>