caseIndex.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. <template>
  2. <div class="box">
  3. <el-row :gutter="16">
  4. <!-- 左侧菜单 -->
  5. <el-col :span="8">
  6. <div class="box_wrapper">
  7. <el-input placeholder="输入关键字进行过滤" v-model="filterText"></el-input>
  8. <el-tree
  9. class="filter-tree"
  10. node-key="id"
  11. highlight-current
  12. :data="menuList"
  13. :props="defaultProps"
  14. :filter-node-method="filterNode"
  15. ref="tree"
  16. @node-click="handleNodeClick"
  17. >
  18. <span class="custom-tree-node" slot-scope="{ node, data }">
  19. <span :class="{'green': greenColorMenus.includes(data.id)}">{{ node.label }}</span>
  20. </span>
  21. </el-tree>
  22. </div>
  23. </el-col>
  24. <!-- 右侧列表 -->
  25. <el-col :span="16">
  26. <div class="box_wrapper">
  27. <el-form :inline="true" :model="formInline" class="demo-form-inline">
  28. <el-form-item label="查询时间">
  29. <el-date-picker
  30. v-model="formInline.year"
  31. :clearable="false"
  32. type="year"
  33. :picker-options="pickerOptions"
  34. format="yyyy年"
  35. value-format="yyyy"
  36. placeholder="选择年份"
  37. ></el-date-picker>
  38. </el-form-item>
  39. <el-form-item>
  40. <el-button type="primary" @click="onSearch">查询</el-button>
  41. </el-form-item>
  42. <el-form-item style="float: right;">
  43. <el-button v-if="$route.query.type === 'children'" @click="onBack">返回</el-button>
  44. </el-form-item>
  45. </el-form>
  46. <el-table :data="tableData" style="width: 100%">
  47. <el-table-column prop="name" label="名称" show-overflow-tooltip></el-table-column>
  48. <el-table-column prop="time" label="日期" width="200"></el-table-column>
  49. <el-table-column prop="" label="数据" width="200">
  50. <template slot-scope="scope">
  51. <span v-if="ruleId > 100" class="link" :class="{'pointer': scope.row.source !== '人工录入'}" @click="toCaseIndexPage(scope.row)">{{ scope.row[judgeNum] }}</span>
  52. <span v-else>{{ (scope.row.res * 100).toFixed(2) + '%' }}</span>
  53. </template>
  54. </el-table-column>
  55. <el-table-column prop="" label="来源" width="200">
  56. <template slot-scope="scope">
  57. <span :class="{'green': scope.row.source === '人工录入' }">{{ scope.row.source }}</span>
  58. </template>
  59. </el-table-column>
  60. <el-table-column prop="" label="操作" width="120">
  61. <template slot="header" slot-scope="scope">
  62. <span>操作</span>
  63. <i class="el-icon-edit table_edit" v-if="scope._self.judgeEdit" @click="onChangeValue"></i>
  64. </template>
  65. <template slot-scope="scope">
  66. <!-- 全年不可修改 -->
  67. <!-- 非人工录入不可修改 -->
  68. <!-- 菜单未标记的不可修改 -->
  69. <el-button type="text" @click="onChangeValue(scope.row)" v-if="scope.row.source === '人工录入' && scope.row.time !== '全年'">修改</el-button>
  70. <span v-else>--</span>
  71. </template>
  72. </el-table-column>
  73. </el-table>
  74. </div>
  75. </el-col>
  76. </el-row>
  77. <ChangeCaseIndexValueDialogVue v-if="dialogData.bSwitch" :data="dialogData" @refresh="getList" />
  78. </div>
  79. </template>
  80. <script>
  81. import ChangeCaseIndexValueDialogVue from './components/ChangeCaseIndexValueDialog.vue';
  82. export default {
  83. components: {
  84. ChangeCaseIndexValueDialogVue
  85. },
  86. data() {
  87. return {
  88. menus: [
  89. {
  90. id: 1,
  91. name: '一、人力资源配置指标',
  92. children: [
  93. {
  94. id: 11,
  95. name: '指标一、住院病案管理人员月均负担出院患者病历数',
  96. children: [
  97. {
  98. id: 111,
  99. name: '出院患者病历总数',
  100. },
  101. {
  102. id: 112,
  103. name: '同期住院病案管理人员实际工作总月数',
  104. },
  105. ],
  106. },
  107. {
  108. id: 12,
  109. name: '指标二、门诊病案管理人员月均负担门诊患者病历数',
  110. children: [
  111. {
  112. id: 121,
  113. name: '门诊患者病历总数',
  114. },
  115. {
  116. id: 122,
  117. name: '同期门诊病案管理人员实际工作总月数',
  118. },
  119. ],
  120. },
  121. {
  122. id: 13,
  123. name: '指标三、病案编码人员月均负担出院患者病历数',
  124. children: [
  125. {
  126. id: 131,
  127. name: '出院患者病历总数',
  128. },
  129. {
  130. id: 132,
  131. name: '同期病案编码人员实际工作总月数',
  132. },
  133. ],
  134. },
  135. ],
  136. },
  137. {
  138. id: 2,
  139. name: '二、病历书写时效性指标',
  140. children: [
  141. {
  142. id: 21,
  143. name: '指标四、入院记录 24 小时内完成率',
  144. children: [
  145. {
  146. id: 211,
  147. name: '入院记录在患者入院24小时内完成的住院患者病历数',
  148. },
  149. {
  150. id: 212,
  151. name: '同期入院患者病历总数',
  152. },
  153. ],
  154. },
  155. {
  156. id: 22,
  157. name: '指标五、手术记录24小时内完成率',
  158. children: [
  159. {
  160. id: 221,
  161. name: '手术记录在术后24小时内完成的住院患者病历数',
  162. },
  163. {
  164. id: 222,
  165. name: '同期住院患者病历总数',
  166. },
  167. ],
  168. },
  169. {
  170. id: 23,
  171. name: '指标六、出院记录24小时内完成率',
  172. children: [
  173. {
  174. id: 231,
  175. name: '出院记录在患者出院后24小时内完成的病历数',
  176. },
  177. {
  178. id: 232,
  179. name: '同期出院患者病历总数',
  180. },
  181. ],
  182. },
  183. {
  184. id: 24,
  185. name: '指标七、病案首页24小时内完成率',
  186. children: [
  187. {
  188. id: 241,
  189. name: '病案首页在患者出院后24小时内完成的病历数',
  190. },
  191. {
  192. id: 242,
  193. name: '同期出院患者病历总数',
  194. },
  195. ],
  196. },
  197. ],
  198. },
  199. {
  200. id: 3,
  201. name: '三、重大检查记录符合率',
  202. children: [
  203. {
  204. id: 31,
  205. name: '指标八、CT/MRI检查记录符合率',
  206. children: [
  207. {
  208. id: 311,
  209. name: 'CT/MRI检查医嘱、报告单、病程记录相对应的住院病历数',
  210. },
  211. {
  212. id: 312,
  213. name: '同期接受CT,MRI检查的住院病历总数',
  214. },
  215. ],
  216. },
  217. {
  218. id: 32,
  219. name: '指标九、病理检查记录符合率',
  220. children: [
  221. {
  222. id: 321,
  223. name: '手术记录、病理检查报告单、病程记录相对应的住院患者病历数',
  224. },
  225. {
  226. id: 322,
  227. name: '同期开展病理检查的住院患者病历总数',
  228. },
  229. ],
  230. },
  231. {
  232. id: 33,
  233. name: '指标十、细菌培养检查记录符合率',
  234. children: [
  235. {
  236. id: 331,
  237. name: '细菌培养检查的医嘱、报告单、病程记录相对应的住院患者病历数',
  238. },
  239. {
  240. id: 332,
  241. name: '同期开展细菌培养检查的住院患者病历总数',
  242. },
  243. ],
  244. },
  245. ],
  246. },
  247. {
  248. id: 4,
  249. name: '四、诊疗行为记录符合率',
  250. children: [
  251. {
  252. id: 41,
  253. name: '指标十一、抗菌药物使用记录符合率',
  254. children: [
  255. {
  256. id: 411,
  257. name: '抗菌药物使用医嘱、病程记录相对应的住院患者病历数',
  258. },
  259. {
  260. id: 412,
  261. name: '同期使用抗菌药物的住院患者病历总数',
  262. },
  263. ],
  264. },
  265. {
  266. id: 42,
  267. name: '指标十二、恶性肿瘤化学治疗记录符合率',
  268. children: [
  269. {
  270. id: 421,
  271. name: '恶性肿瘤化学治疗医嘱、病程记录相对应的住院患者病历数',
  272. },
  273. {
  274. id: 422,
  275. name: '同期接受恶性肿瘤化学治疗的住院患者病历总数',
  276. },
  277. ],
  278. },
  279. {
  280. id: 43,
  281. name: '指标十三、恶性肿瘤放射治疗记录符合率',
  282. children: [
  283. {
  284. id: 431,
  285. name: '恶性肿瘤放射治疗医嘱(治疗单) 、病程记录相对应的住院患者病历数',
  286. },
  287. {
  288. id: 432,
  289. name: '同期开展恶性肿瘤放射治疗的住院患者病历总数',
  290. },
  291. ],
  292. },
  293. {
  294. id: 44,
  295. name: '指标十四、手术相关记录完整率',
  296. children: [
  297. {
  298. id: 441,
  299. name: '手术相关记录完整的住院手术患者病历数',
  300. },
  301. {
  302. id: 442,
  303. name: '同期住院手术患者病历总数',
  304. },
  305. ],
  306. },
  307. {
  308. id: 45,
  309. name: '指标十五、植入物相关记录符合率',
  310. children: [
  311. {
  312. id: 451,
  313. name: '植入物相关记录符合的住院患者病历数',
  314. },
  315. {
  316. id: 452,
  317. name: '同期使用植入物的住院患者病历总数',
  318. },
  319. ],
  320. },
  321. {
  322. id: 46,
  323. name: '指标十六、临床用血相关记录符合率',
  324. children: [
  325. {
  326. id: 461,
  327. name: '临床用血相关记录符合的住院患者病历数',
  328. },
  329. {
  330. id: 462,
  331. name: '同期存在临床用血的住院患者病历总数',
  332. },
  333. ],
  334. },
  335. {
  336. id: 47,
  337. name: '指标十七、医师查房记录完整率',
  338. children: [
  339. {
  340. id: 471,
  341. name: '医师查房记录完整的住院患者病历数',
  342. },
  343. {
  344. id: 472,
  345. name: '同期住院患者病历总数',
  346. },
  347. ],
  348. },
  349. {
  350. id: 48,
  351. name: '指标十八、患者抢救记录及时完成率',
  352. children: [
  353. {
  354. id: 481,
  355. name: '抢救记录及时完成的住院患者病历数',
  356. },
  357. {
  358. id: 482,
  359. name: '同期接受抢救的住院患者病历总数',
  360. },
  361. ],
  362. },
  363. ],
  364. },
  365. {
  366. id: 5,
  367. name: '五、病历归档质量指标',
  368. children: [
  369. {
  370. id: 51,
  371. name: '指标十九、出院患者病历2日归档率',
  372. children: [
  373. {
  374. id: 511,
  375. name: '2个工作日内完成归档的出院患者病历数',
  376. },
  377. {
  378. id: 512,
  379. name: '同期出院患者病历总数',
  380. },
  381. ],
  382. },
  383. {
  384. id: 52,
  385. name: '指标二十、出院患者病历归档完整率',
  386. children: [
  387. {
  388. id: 521,
  389. name: '归档病历内容完整的出院患者病历数',
  390. },
  391. {
  392. id: 522,
  393. name: '同期出院患者病历总数',
  394. },
  395. ],
  396. },
  397. {
  398. id: 53,
  399. name: '指标二十一、主要诊断填写正确率',
  400. children: [
  401. {
  402. id: 531,
  403. name: '病案首页中主要诊断填写正确的出院患者病历 数',
  404. },
  405. {
  406. id: 532,
  407. name: '同期出院患者病历总数',
  408. },
  409. ],
  410. },
  411. {
  412. id: 54,
  413. name: '指标二十二、主要诊断编码正确率',
  414. children: [
  415. {
  416. id: 541,
  417. name: '病案首页中主要诊断编码正确的出院患者病历数',
  418. },
  419. {
  420. id: 542,
  421. name: '同期出院患者病历总数',
  422. },
  423. ],
  424. },
  425. {
  426. id: 55,
  427. name: '指标二十三、主要手术填写正确率',
  428. children: [
  429. {
  430. id: 551,
  431. name: '病案首页中主要手术填写正确的出院患者病历 数',
  432. },
  433. {
  434. id: 552,
  435. name: '同期出院手术患者病历总数',
  436. },
  437. ],
  438. },
  439. {
  440. id: 56,
  441. name: '指标二十四、主要手术编码正确率',
  442. children: [
  443. {
  444. id: 561,
  445. name: '病案首页中主要手术编码正确的出院患者病历数',
  446. },
  447. {
  448. id: 562,
  449. name: '同期出院手术患者病历总数',
  450. },
  451. ],
  452. },
  453. {
  454. id: 57,
  455. name: '指标二十五、不合理复制病历发生率',
  456. children: [
  457. {
  458. id: 571,
  459. name: '出现不合理复制病历内容的出院患者病历数',
  460. },
  461. {
  462. id: 572,
  463. name: '同期出院患者病历总数',
  464. },
  465. ],
  466. },
  467. {
  468. id: 58,
  469. name: '指标二十六、知情同意书规范签署率',
  470. children: [
  471. {
  472. id: 581,
  473. name: '规范签署知情同意书的出院患者病历数',
  474. },
  475. {
  476. id: 582,
  477. name: '同期存在知情同意书签署的出院患者病历总数',
  478. },
  479. ],
  480. },
  481. {
  482. id: 59,
  483. name: '指标二十七、甲级病历率',
  484. children: [
  485. {
  486. id: 591,
  487. name: '田级出院患者病历数',
  488. },
  489. {
  490. id: 592,
  491. name: '同期出院患者病历总数',
  492. },
  493. ],
  494. },
  495. ],
  496. },
  497. ],
  498. cMenus: [
  499. {
  500. id: 34,
  501. name: '指标十、细菌培养检查记录符合率(子)',
  502. children: [
  503. {
  504. id: 341,
  505. name: '细菌培养检查的医嘱、报告单、病程记录相对应的住院患者病历数',
  506. },
  507. {
  508. id: 3432,
  509. name: '同期开展细菌培养检查的住院患者病历总数',
  510. },
  511. ],
  512. },
  513. ],
  514. formInline: {
  515. year: '',
  516. },
  517. tableData: [],
  518. filterText: '',
  519. defaultProps: {
  520. children: 'children',
  521. label: 'name',
  522. },
  523. ruleId: '',
  524. ruleName: '',
  525. time: new Date(),
  526. pickerOptions: {
  527. disabledDate(time) {
  528. const date = new Date();
  529. const year = date.getFullYear();
  530. const timeYear = time.getFullYear();
  531. return year < timeYear;
  532. },
  533. },
  534. greenColorMenus: [11, 112, 12, 121, 122, 13, 132],
  535. dialogData: {
  536. bSwitch: false,
  537. rows: []
  538. }
  539. };
  540. },
  541. computed: {
  542. // 判断是取分子还是分母
  543. judgeNum() {
  544. const str = `${this.ruleId}`;
  545. const length = str.length;
  546. const lastNum = str[length - 1];
  547. if (Number(lastNum) > 1) {
  548. // 分母
  549. return 'denominator';
  550. } else {
  551. // 分子
  552. return 'numerator';
  553. }
  554. },
  555. menuList() {
  556. return this.$route.query.type === 'children' ? this.cMenus : this.menus
  557. },
  558. judgeEdit() {
  559. console.log(this.greenColorMenus.includes(this.ruleId))
  560. return this.greenColorMenus.includes(this.ruleId) && !!this.tableData.length
  561. }
  562. },
  563. watch: {
  564. filterText(val) {
  565. this.$refs.tree.filter(val);
  566. }
  567. },
  568. methods: {
  569. onChangeValue(row) {
  570. console.log(row, 9999)
  571. if (row.time) {
  572. // 单个修改
  573. const { time } = row
  574. const obj = {
  575. year: time.split('-')[0],
  576. month: time.split('-')[1],
  577. flag: Number(this.ruleId.toString().slice(0, 2)),
  578. type: this.judgeNum,
  579. num: row[this.judgeNum],
  580. }
  581. // 先清空在赋值,防止重复
  582. this.$set(this.dialogData, 'rows', [])
  583. this.dialogData.rows.push(obj)
  584. } else {
  585. // 批量修改
  586. // 先清空在赋值,防止重复
  587. this.$set(this.dialogData, 'rows', [])
  588. this.tableData.map(item => {
  589. const { time, source } = item
  590. if (source === '人工录入' && time != '全年') {
  591. const obj = {
  592. year: time.split('-')[0],
  593. month: time.split('-')[1],
  594. flag: Number(this.ruleId.toString().slice(0, 2)),
  595. type: this.judgeNum,
  596. num: item[this.judgeNum]
  597. }
  598. this.dialogData.rows.push(obj)
  599. }
  600. })
  601. }
  602. this.dialogData.bSwitch = true
  603. },
  604. // 返回
  605. onBack() {
  606. this.$router.go(-1)
  607. },
  608. // 病案指标列表跳转
  609. toCaseIndexPage(row) {
  610. const { time, source } = row;
  611. if ( source === '人工录入') {
  612. return
  613. }
  614. this.$router.push({ path: '/caseIndexList', query: { time, ruleId: Number(`${this.ruleId}`.slice(0, 2)), type: this.judgeNum } });
  615. },
  616. // 菜单筛选
  617. filterNode(value, data) {
  618. if (!value) return true;
  619. return data.name.indexOf(value) !== -1;
  620. },
  621. handleNodeClick(data) {
  622. const { id, name } = data;
  623. this.ruleId = id;
  624. this.ruleName = name;
  625. if (id > 10 && this.formInline.year) {
  626. this.getList();
  627. }
  628. },
  629. // 获取右侧列表数据
  630. getList() {
  631. const { year } = this.formInline;
  632. const params = {
  633. start_time: `${year}0101`,
  634. end_time: `${year}1231`,
  635. year,
  636. type: Number(`${this.ruleId}`.slice(0, 2)),
  637. };
  638. if (this.ruleId < 100) {
  639. params.request_source = 1
  640. } else {
  641. params.request_source = this.judgeNum === 'denominator' ? 2 : 3
  642. }
  643. this.$axios2.post('/get_assessment_indicators', params).then(res => {
  644. if (Array.isArray(res.data)) {
  645. res.data.map(item => {
  646. item.name = this.ruleName;
  647. item.ruleId = this.ruleId
  648. });
  649. this.tableData = res.data;
  650. } else {
  651. this.tableData = [];
  652. }
  653. });
  654. },
  655. // 查询
  656. onSearch() {
  657. const { year } = this.formInline;
  658. if (!year) {
  659. this.$message.error('请选择查询时间');
  660. return;
  661. }
  662. if (!this.ruleId) {
  663. this.$message.error('请选择查询指标');
  664. return;
  665. }
  666. this.getList();
  667. },
  668. },
  669. };
  670. </script>
  671. <style lang="scss" scoped>
  672. .table_edit {
  673. margin-left: 10px;
  674. cursor: pointer;
  675. &:hover {
  676. opacity: 0.6;
  677. }
  678. }
  679. .link {
  680. font-weight: 600;
  681. color: #409eff;
  682. }
  683. .pointer {
  684. cursor: pointer;
  685. }
  686. .box {
  687. padding: 16px;
  688. .box_wrapper {
  689. padding: 16px;
  690. background: #fff;
  691. height: calc(100vh - 82px);
  692. border-radius: 5px;
  693. overflow-y: scroll;
  694. }
  695. }
  696. .filter-tree {
  697. margin-top: 16px;
  698. ::v-deep .el-tree-node__content {
  699. height: 36px;
  700. line-height: 36px;
  701. }
  702. }
  703. ::v-deep.el-table .el-table__header tr th {
  704. background: #f1f6ff;
  705. color: #13171e;
  706. border-bottom: 0px;
  707. }
  708. ::v-deep.el-table .el-table__row td {
  709. color: #7e8bab;
  710. border-bottom: 1px solid #f4f4f4;
  711. }
  712. ::v-deep.el-table .el-table__header tr th:first-child {
  713. border-radius: 5px 0px 0px 5px;
  714. }
  715. ::v-deep.el-table .el-table__header tr th:nth-child(3) {
  716. border-radius: 0px 5px 5px 0px;
  717. }
  718. .green {
  719. color: #67C23A;
  720. }
  721. </style>