Browse Source

编码员缺陷列表

yuwandanmian 1 year ago
parent
commit
b60ec365d7

+ 10 - 0
src/api/excel.js

@@ -146,4 +146,14 @@ export function otherStatisticsMenuExport(data) {
     responseType: 'blob',
     data
   })
+}
+
+// 编码员缺陷导出
+export function encoderErrorExport(data) {
+  return request_blob({
+    url: `/api/home_bmy_quality/bmyErrorDetailsList`,
+    method: 'post',
+    responseType: 'blob',
+    data
+  })
 }

+ 113 - 0
src/components/Pagination/index.vue

@@ -0,0 +1,113 @@
+<template>
+  <div :class="{'hidden':hidden}" class="pagination-container">
+    <span class="cus-total">共{{ total }} 条记录 第 {{ page }}/{{ Math.ceil( total / limit ) }} 页</span>
+    <el-pagination
+      :background="background"
+      :current-page.sync="currentPage"
+      :page-size.sync="pageSize"
+      :layout="layout"
+      :page-sizes="pageSizes"
+      :total="total"
+      v-bind="$attrs"
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+    />
+  </div>
+</template>
+
+<script>
+// import { scrollTo } from '@/utils/scroll-to'
+
+export default {
+  name: 'Pagination',
+  props: {
+    total: {
+      required: true,
+      type: Number
+    },
+    page: {
+      type: Number,
+      default: 1
+    },
+    limit: {
+      type: Number,
+      default: 10
+    },
+    pageSizes: {
+      type: Array,
+      default() {
+        return [10, 20, 30, 50]
+      }
+    },
+    layout: {
+      type: String,
+      default: 'prev, pager, next, sizes, jumper'
+    },
+    background: {
+      type: Boolean,
+      default: true
+    },
+    autoScroll: {
+      type: Boolean,
+      default: true
+    },
+    hidden: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    currentPage: {
+      get() {
+        return this.page
+      },
+      set(val) {
+        this.$emit('update:page', val)
+      }
+    },
+    pageSize: {
+      get() {
+        return this.limit
+      },
+      set(val) {
+        this.$emit('update:limit', val)
+      }
+    }
+  },
+  methods: {
+    handleSizeChange(val) {
+      this.$emit('pagination', { page: this.currentPage, limit: val })
+      // if (this.autoScroll) {
+      //   scrollTo(0, 800)
+      // }
+    },
+    handleCurrentChange(val) {
+      this.$emit('pagination', { page: val, limit: this.pageSize })
+      // if (this.autoScroll) {
+      //   scrollTo(0, 800)
+      // }
+    }
+  }
+}
+</script>
+
+<style scoped>
+.el-pagination {
+  float: right;
+}
+.cus-total {
+  float: left;
+  font-size: 13px;
+  color: #606266;
+  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
+  line-height: 28px;
+}
+.pagination-container {
+  background: #fff;
+  padding: 0 16px;
+  overflow: hidden;
+}
+.pagination-container.hidden {
+  display: none;
+}
+</style>

+ 11 - 0
src/router/index.js

@@ -484,6 +484,17 @@ export const constantRoutes = [
           canMultipleOpen: true 
         },
       },
+      {
+        path: '/encoder/errors',
+        name: 'EncoderErrors',
+        component: () => import('@/views/encoder/errors'),
+        hidden: true,//不在导航栏展示
+        meta: { 
+          title: '缺陷病案',
+          keepAlive: 0,
+          canMultipleOpen: true 
+        },
+      },
     ],
   },
 

+ 21 - 16
src/styles/custom.scss

@@ -1,7 +1,7 @@
 // 自定义table-header
 
 .el-table .el-table__row td {
-  color: #7e8bab;
+  color: #666666;
   border-bottom: 1px solid #f4f4f4;
 }
 .el-table .el-table__header tr th:first-child {
@@ -33,24 +33,24 @@
 }
 
 // 修改默认滚动条
-// ::-webkit-scrollbar {
-//   width: 6px;
-//   height: 6px;
-//   background: transparent;
-// }
+::-webkit-scrollbar {
+  width: 6px;
+  height: 6px;
+  background: transparent;
+}
 
-// ::-webkit-scrollbar-thumb {
-//   background: transparent;
-//   border-radius: 4px;
-// }
+::-webkit-scrollbar-thumb {
+  background: transparent;
+  border-radius: 4px;
+}
 
-// :hover::-webkit-scrollbar-thumb {
-//   background: hsla(0, 0%, 53%, 0.4);
-// }
+:hover::-webkit-scrollbar-thumb {
+  background: hsla(0, 0%, 53%, 0.4);
+}
 
-// :hover::-webkit-scrollbar-track {
-//   background: hsla(0, 0%, 53%, 0.1);
-// }
+:hover::-webkit-scrollbar-track {
+  background: hsla(0, 0%, 53%, 0.1);
+}
 
 // 卡片背景
 
@@ -78,6 +78,11 @@
   .link {
     text-decoration: underline;
     color: #FF786F;
+    cursor: pointer;
+  }
+  .link2 {
+    color: #004983;
+    cursor: pointer;
   }
   .c_FF786F {
     color: #FF786F;

+ 1 - 1
src/views/data/medicalRecords/defectList.vue

@@ -37,7 +37,7 @@
           <el-button type="primary" icon="el-icon-download" @click="onExport" class="export-btn">导出数据</el-button>
         </div>
       </div>
-      <Title :title="'病案首页列表'" />
+      <Title :title="'缺陷列表'" />
       <el-table :data="tableData" style="width: 100%">
         <el-table-column type="index" label="序号"></el-table-column>
         <el-table-column prop="AAA28" label="病案号">

+ 105 - 0
src/views/encoder/components/errors/SearchBox.vue

@@ -0,0 +1,105 @@
+<template>
+  <div class="search-box">
+    <el-form :model="data" class="demo-form-inline" label-suffix=":" label-width="74px">
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="住院号码">
+            <el-input v-model="data.user" placeholder="请输入"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="住院科室">
+            <el-select v-model="data.region" placeholder="全部" style="width: 100%;">
+              <el-option label="区域一" value="shanghai"></el-option>
+              <el-option label="区域二" value="beijing"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="缺陷描述">
+            <el-input v-model="data.user" placeholder="请输入"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="缺陷归类">
+            <el-select v-model="data.region" placeholder="全部" style="width: 100%;">
+              <el-option label="区域一" value="shanghai"></el-option>
+              <el-option label="区域二" value="beijing"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="出院时间">
+            <el-date-picker
+              v-model="data.time"
+              type="datetimerange"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              :default-time="['12:00:00']"
+              style="width: 100%;">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="住院医师">
+            <el-select v-model="data.region" placeholder="全部" style="width: 100%;">
+              <el-option label="区域一" value="shanghai"></el-option>
+              <el-option label="区域二" value="beijing"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="编码员">
+            <el-select v-model="data.region" placeholder="全部" style="width: 100%;">
+              <el-option label="区域一" value="shanghai"></el-option>
+              <el-option label="区域二" value="beijing"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="手术编号">
+            <el-input v-model="data.user" placeholder="请输入"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="诊断名称">
+            <el-input v-model="data.user" placeholder="请输入"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="诊断编码">
+            <el-input v-model="data.user" placeholder="请输入"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="手术名称">
+            <el-input v-model="data.user" placeholder="请输入"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item style="text-align: right;">
+            <el-button plain @click="onSubmit" icon="el-icon-refresh">重置</el-button>
+            <el-button type="primary" @click="onSubmit" class="export-btn" icon="el-icon-search">查询</el-button>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    data: {
+      type: Object,
+      default() {
+        return {}
+      }
+    }
+  }
+}
+</script>
+
+<style>
+
+</style>

+ 194 - 0
src/views/encoder/components/errors/TableBox.vue

@@ -0,0 +1,194 @@
+<template>
+  <div class="table-box">
+    <div class="btn-box">
+      <el-button type="primary" plain icon="el-icon-upload">下载</el-button>
+      <el-popover
+        placement="bottom-end"
+        title=""
+        trigger="click"
+        popper-class="table_code_popper"
+      >
+        <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">全选</el-checkbox>
+        <el-checkbox-group v-model="codes" @change="handleChange">
+          <el-checkbox label="field">缺陷字段</el-checkbox>
+          <el-checkbox label="desc">缺陷描述</el-checkbox>
+          <el-checkbox label="AAA28">住院号码</el-checkbox>
+          <el-checkbox label="AAA01">姓名</el-checkbox>
+          <el-checkbox label="time">出院时间</el-checkbox>
+          <el-checkbox label="AAC11N">出院科室</el-checkbox>
+          <el-checkbox label="AEE08">编码员</el-checkbox>
+          <el-checkbox label="AEE04">住院医师</el-checkbox>
+          <el-checkbox label="ICD10_NAME">主要诊断名称</el-checkbox>
+          <el-checkbox label="ICD10_ID1">主要诊断编码</el-checkbox>
+          <el-checkbox label="ICD9_NAME">主要手术名称</el-checkbox>
+          <el-checkbox label="ICD9_ID1">主要手术编码</el-checkbox>
+          <el-checkbox label="level">缺陷分级</el-checkbox>
+          <el-checkbox label="type">缺陷归类</el-checkbox>
+        </el-checkbox-group>
+        <el-button slot="reference" type="primary" plain icon="el-icon-setting" style="margin-left: 10px;"></el-button>
+      </el-popover>
+    </div>
+    <el-table
+      :data="data"
+      style="width: 100%">
+      <el-table-column
+        type="index"
+        label="序号"
+        width="50"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        v-if="codes.includes('field')"
+        prop="field"
+        label="缺陷字段"
+        show-overflow-tooltip
+        width="160"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        v-if="codes.includes('desc')"
+        prop="desc"
+        label="缺陷描述"
+        show-overflow-tooltip
+        align="center">
+      </el-table-column>
+      <el-table-column
+        v-if="codes.includes('AAA28')"
+        prop=""
+        label="住院号码"
+        show-overflow-tooltip
+        width="120"
+        align="center">
+        <template slot-scope="scope">
+          <span class="link2">{{ scope.row.AAA28 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        v-if="codes.includes('AAA01')"
+        prop="AAA01"
+        label="姓名"
+        width="120"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        v-if="codes.includes('AAC01')"
+        prop="AAC01"
+        label="出院时间"
+        width="160"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        v-if="codes.includes('AAC11N')"
+        prop="AAC11N"
+        label="出院科室"
+        show-overflow-tooltip
+        width="160"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        v-if="codes.includes('coder_name')"
+        prop="coder_name"
+        label="编码员"
+        width="120"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        v-if="codes.includes('ZYYS')"
+        prop="ZYYS"
+        label="住院医师"
+        width="120"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        v-if="codes.includes('ICD10_NAME')"
+        prop="ICD10_NAME"
+        label="主要诊断名称"
+        show-overflow-tooltip
+        width="160"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        v-if="codes.includes('ICD10_ID1')"
+        prop="ICD10_ID1"
+        label="主要诊断编码"
+        show-overflow-tooltip
+        width="160"
+        align="center">
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: {
+      data: {
+        type: Array,
+        default() {
+          return []
+        }
+      }
+    },
+    data() {
+      const defaultCodes = [
+        'field',
+        'desc',
+        'AAA28',
+        'AAA01',
+        'AAC01',
+        'AAC11N',
+        'coder_name',
+        'ZYYS',
+        'ICD10_NAME',
+        'ICD10_ID1'
+      ]
+      return {
+        checkAll: true,
+        isIndeterminate: false,
+        defaultCodes,
+        codes: [
+          'field',
+          'desc',
+          'AAA28',
+          'AAA01',
+          'AAC01',
+          'AAC11N',
+          'coder_name',
+          'ZYYS',
+          'ICD10_NAME',
+          'ICD10_ID1'
+        ],
+      }
+    },
+    methods: {
+      handleCheckAllChange(val) {
+        this.codes = val ? this.defaultCodes : []
+        this.isIndeterminate = false
+      },
+      // 展示字段发生变化
+      handleChange(val) {
+        const checkedCount = val.length
+        this.checkAll = checkedCount === this.defaultCodes.length
+        this.codes = val
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+.table-box {
+  margin-bottom: 20px;
+  .btn-box {
+    text-align: right;
+    margin-bottom: 20px;
+  }
+}
+</style>
+<style lang="scss">
+.table_code_popper {
+  .el-checkbox {
+    display: block;
+    line-height: 26px;
+  }
+}
+</style>

+ 150 - 0
src/views/encoder/errors.vue

@@ -0,0 +1,150 @@
+<template>
+  <div class="bg-box">
+    <div class="bg-card">
+      <SearchBoxVue :data="formInline" @search="handleSearch" @reset="handleReset" />
+      <div style="margin-top: -22px;">
+        <el-divider></el-divider>
+        <TableBoxVue :data="tableData" @export="handleExport" />
+        <Pagination :page="paginationData.page" :limit="paginationData.page_size" :total="paginationData.total" @pagination="handlePagination" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import SearchBoxVue from './components/errors/SearchBox.vue'
+import TableBoxVue from './components/errors/TableBox.vue'
+import Pagination from '@/components/Pagination'
+
+export default {
+  components: {
+    SearchBoxVue,
+    TableBoxVue,
+    Pagination
+  },
+  data() {
+    return {
+      formInline: {
+        AAA28: '',
+        AAC11N: '',
+        time: []
+      },
+      tableData: [
+        {
+          "error_rule": 16,
+          "auth": "AAA17C",
+          "field": "现住址邮政编码",
+          "ZYH": "722801",
+          "AAA28": "",
+          "AAA01": "",
+          "AAC01": "2022-04-16 09:00:00",
+          "AAC11N": "",
+          "level": "强制",
+          "type": "患者基本信息",
+          "desc": "现住址邮政编码未填写",
+          "coder_name": "编码员姓名",
+          "ZYYS": "住院医师姓名",
+          "ICD10_NAME": "主要诊断名称",
+          "ICD10_ID1": "主要诊断编码",
+          "ICD9_NAME": "主要手术名称",
+          "ICD9_ID1": "主要手术编码"
+        }
+      ],
+      paginationData: {
+        page: 1,
+        page_size: 10,
+        total: 0
+      }
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    getList() {
+      const {
+        AAA28,
+        AAC11N,
+        time
+      } = this.formInline
+      const {
+        page,
+        page_size
+      } = this.paginationData
+      const params = {
+        error_rule: this.$route.query.error_rule,
+        page,
+        page_size,
+        AAA28,
+        AAC11N,
+        is_export: 0
+      }
+      if (time && time.length) {
+        params.start_time = time[0]
+        params.end_time = time[1]
+      }
+      this.$axios.post('/home_bmy_quality/bmyErrorDetailsList', params).then(res => {
+        this.tableData = res.data.list
+        this.paginationData.total = res.data.count
+      });
+    },
+    handleSearch() {
+      this.paginationData.page = 1
+      this.getList()
+    },
+    handleReset() {
+      this.formInline = {
+        AAA28: '',
+        AAC11N: '',
+        time: []
+      }
+    },
+    handlePagination(val) {
+      const { page, limit } = val
+      this.paginationData.page = page
+      this.paginationData.page_size = limit
+      this.getList()
+    },
+    handleExport() {
+      const {
+        AAA28,
+        AAC11N,
+        time
+      } = this.formInline
+      const params = {
+        error_rule: this.$route.query.error_rule,
+        AAA28,
+        AAC11N,
+        is_export: 1
+      }
+      if (time && time.length) {
+        params.start_time = time[0]
+        params.end_time = time[1]
+      }
+      encoderErrorExport(params).then(res => {
+        const content = res.data; // 后台返回二进制数据
+        const blob = new Blob([content]);
+        const fileName = `编码员缺陷.csv`;
+        if ('download' in document.createElement('a')) {
+          // 非IE下载
+          const elink = document.createElement('a');
+          elink.download = fileName;
+          elink.style.display = 'none';
+          elink.href = URL.createObjectURL(blob);
+          document.body.appendChild(elink);
+          elink.click();
+          URL.revokeObjectURL(elink.href); // 释放URL 对象
+          document.body.removeChild(elink);
+        } else {
+          // IE10+下载
+          navigator.msSaveBlob(blob, fileName);
+        }
+      });
+    }
+  }
+}
+</script>
+
+<style>
+
+</style>

+ 17 - 1
src/views/encoder/index.vue

@@ -261,7 +261,18 @@
           dep_id: '',
           level: ''
         },
-        tableData: [],
+        tableData: [
+          {
+            "error_rule": 1359,
+            "count": 2,
+            "eror_zb": "14.29",
+            "category": "A类",
+            "down": 0,
+            "desc": "出院病房 不能为空",
+            "level": "强制",
+            "type": "患者基本信息"
+          }
+        ],
         paginationData: {
           page: 1,
           size: 10,
@@ -271,6 +282,11 @@
       }
     },
     async mounted() {
+      const year = new Date().getFullYear()
+      const month = new Date().getMonth() + 1 > 10 ? `0${new Date().getMonth() + 1}` : new Date().getMonth() + 1
+      const day = new Date().getDay() < 10 ? `0${new Date().getDay()}` : new Date().getDay()
+      this.$set(this.formInline, 'start_time', `${year}0101`)
+      this.$set(this.formInline, 'end_time', `${year}${month}${day}`)
       this.getDepartmentData()
       await this.getTongjiData()
       this.tongjiPie()