Browse Source

静态知识映射测试

Morphone0429 4 năm trước cách đây
mục cha
commit
6d0f1c6fe1

+ 29 - 1
src/api/cdss.js

@@ -510,6 +510,34 @@ export default {
       responseType: 'blob',
     });
   },
+  exportStaticCommonExcel(param) {
+    return axios.post(urls.exportStaticCommonExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  exportStaticCommonStaticExcel(param) {
+    return axios.post(urls.exportStaticCommonStaticExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  exportStaticLisExcel(param) {
+    return axios.post(urls.exportStaticLisExcel, param, {
+      responseType: 'blob',
+    });
+  },
+  exportStaticLisStaticExcel(param) {
+    return axios.post(urls.exportStaticLisStaticExcel, param, {
+      responseType: 'blob',
+    });
+  },
 
-  
+  getStaticCaseResultList(param) {
+    return axios.post(urls.getStaticCaseResultList, param);
+  },
+  getStaticPage(param) {
+    return axios.post(urls.getStaticPage, param);
+  },
+  LisStaticTest(param) {
+    return axios.post(urls.LisStaticTest, param, { timeout: 30 * 60 * 1000 });
+  },
 };

+ 8 - 0
src/api/config.js

@@ -508,6 +508,14 @@ export default {
     'otherPacsExportExcel': '/api/cdssman/test/rule/otherPacsExportExcel',   //辅检其他提醒规则测试结果导出
     'otherTransfusionExportExcel': '/api/cdssman/test/rule/otherTransfusionExportExcel',   //输血其他提醒规则测试结果导出
 
+    'exportStaticCommonExcel': '/api/cdssman/test/staticKnowledge/exportCommonExcel',   //通用未映射到标准术语测试结果导出
+    'exportStaticCommonStaticExcel': '/api/cdssman/test/staticKnowledge/exportCommonStaticExcel',   //通用缺少静态知识测试结果导出
+    'exportStaticLisExcel': '/api/cdssman/test/staticKnowledge/exportLisExcel',   //检验未映射到标准术语测试结果导出
+    'exportStaticLisStaticExcel': '/api/cdssman/test/staticKnowledge/exportLisStaticExcel',   //检验缺少静态知识测试结果导出
+    'getStaticCaseResultList': '/api/cdssman/test/staticKnowledge/getCaseResultList',   //静态知识测试总览列表
+    'getStaticPage': '/api/cdssman/test/staticKnowledge/getPage',   //静态知识测试结果明细列表
+    'LisStaticTest': '/api/cdssman/test/staticKnowledge/lisTest',   //化验静态知识测试
+
   },
   menuIconList: { //菜单对应图标
     'YH-KZT': 'el-icon-menu',

+ 0 - 1
src/components/testManager/knowledgeMapRule/BillFusionTest.vue

@@ -134,7 +134,6 @@ export default {
   },
   methods: {
     handleInitData() {
-      console.log(this.$route.params);
       const { data, type } = this.$route.params;
       this.type = type;
       console.log(this.type, '111');

+ 11 - 3
src/components/testManager/knowledgeMapRule/KnowledgeMapRuleTest.vue

@@ -106,6 +106,7 @@ export default {
   beforeRouteEnter(to, from, next) {
     next((vm) => {
       Object.assign(vm, to.params);
+      if (Object.keys(to.params).length === 0) return;
       vm.getDataList(to.params.hospitalId);
       // vm.hospitalId = to.params.hospitalId;
     });
@@ -203,11 +204,18 @@ export default {
     // 跳转至失败/成功条数页面
     goToFailedOrSuccessPage(row, type) {
       const page = this.handleGoPage(row.caseName);
-      let hospital = this.hospitalData.find(item=>item.id === this.hospitalId )
-      let hospitalName = hospital.name 
+      let hospital = this.hospitalData.find(
+        (item) => item.id === this.hospitalId
+      );
+      let hospitalName = hospital.name;
       this.$router.push({
         name: page,
-        params: { data: { ...row }, type, hospitalId: this.hospitalId, hospitalName},
+        params: {
+          data: { ...row },
+          type,
+          hospitalId: this.hospitalId,
+          hospitalName,
+        },
       });
     },
     // 处理跳转到的页面

+ 148 - 16
src/components/testManager/staticKnowledgeMap/LessStaticDisease.vue

@@ -1,24 +1,61 @@
 <template>
   <div>
     <crumbs
-      title="缺少静态知识的医院术语-诊断"
+      :title="title"
       class="topBack"
       :param="$route.params"
-      linkTo="KnowledgeMapRuleTest"
+      linkTo="StaticKnowledgeMapTest"
     >
       <el-form :inline="true" class="demo-form-inline">
-        <el-form-item style="marginBottom: 0px">
+        <el-form-item style="marginbottom: 0px">
           <el-button size="mini" @click="exportData">导出</el-button>
         </el-form-item>
       </el-form>
     </crumbs>
     <div style="margin: 60px 20px 0">
-      <el-table :data="list" border >
-        <el-table-column :resizable="false" type="index" :index="indexMethod" label="编号" width="80"></el-table-column>
-        <el-table-column :resizable="false" prop="gmtModified" label="测试时间"></el-table-column>
-        <el-table-column :resizable="false" prop="hisName" label="医院术语" show-overflow-tooltip></el-table-column>
-        <el-table-column :resizable="false" prop="uniqueName" label="标准术语" show-overflow-tooltip></el-table-column>
-        <el-table-column :resizable="false" prop="uniqueName" label="静态知识标识" show-overflow-tooltip></el-table-column>
+      <el-table :data="list" border>
+        <el-table-column
+          :resizable="false"
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="gmtModified"
+          label="测试时间"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="hisName"
+          :label="caseName === '检验' ? '医院术语(检验套餐)' : '医院术语'"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="hisDetailName"
+          label="医院术语(检验细项)"
+          show-overflow-tooltip
+          v-if="caseName === '检验'"
+        ></el-table-column>
+        <el-table-column
+          :resizable="false"
+          prop="name"
+          label="标准术语"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          v-if="type === 'lessStatic'"
+          :resizable="false"
+          prop="hasStaticKnowledge"
+          label="静态知识标识"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            {{ scope.row.hasStaticKnowledge === 0 ? '无' : '有' }}
+          </template>
+        </el-table-column>
       </el-table>
       <div class="pagination pagepage">
         <el-pagination
@@ -48,24 +85,42 @@ export default {
       pageSize: config.pageSize,
       pageSizeArr: config.pageSizeArr,
       pageLayout: config.pageLayout,
-      total: 0
+      total: 0,
+      caseName: '',
+      type: '', // 来自什么页面   noMap/lessStatic
     };
   },
   created() {
-    this.getDataList()
+    this._initData();
+    this.getDataList();
     // 非首页 编辑页返回 设置 this.currentPage
     if (Object.keys(this.$route.params).length !== 0) {
       this.currentPage = this.$route.params.currentPage;
     }
   },
+  computed: {
+    title() {
+      let text = '';
+      if (this.type === 'noMap') {
+        text = '未映射到标准术语的医院术语-';
+      } else if (this.type === 'lessStatic') {
+        text = '缺少静态知识的医院术语-';
+      }
+      return text + this.caseName;
+    },
+  },
   beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
+    next((vm) => {
       Object.assign(vm, to.params);
       vm.inCurrentPage = to.params.currentPage;
     });
   },
   methods: {
+    _initData() {
+      const { data, type } = this.$route.params;
+      this.caseName = (data && data.caseName) || '';
+      this.type = type;
+    },
     indexMethod(index) {
       return (this.currentPage - 1) * this.pageSize + index + 1;
     },
@@ -83,12 +138,89 @@ export default {
       this.getDataList();
     },
 
-    getDataList(){
+    handleParams() {
+      const { data, type } = this.$route.params;
+      let params = {
+        resultId: data.resultId, //结果id
+      };
+      if (type === 'noMap') {
+        //是否映射到标准术语(0:否,1:是)
+        params = { ...params, hasStandName: 0 };
+      } else if (type === 'lessStatic') {
+        //是否有静态知识(0:无,1:有)
+        params = { ...params, hasStaticKnowledge: 0 };
+      }
+      return params;
+    },
+    getDataList() {
+      const params = this.handleParams();
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getStaticPage(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data.data && res.data.data.records;
+        }
+        this.total = res.data.data && res.data.data.total;
+        if (this.inCurrentPage !== undefined) {
+          this.currentPage = this.inCurrentPage;
+          this.inCurrentPage = undefined;
+        }
+      });
+    },
+    // excel文件名处理
+    handleExcelName() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let exportText = ''; // excel文件名
 
+      return exportText;
     },
     // 导出
-    exportData() {}
-  }
+    exportData() {
+      const { data, hospitalId, hospitalName, type } = this.$route.params;
+      let requestAjax;
+      let exportText; // excel文件名
+      let params = {
+        resultId: data.resultId,
+      };
+      if (data.caseName === '检验' && type === 'noMap') {
+        requestAjax = 'exportStaticLisExcel';
+        exportText = `${hospitalName}-未映射到标准术语的${data.caseName}医院术语.xls`;
+        params = { ...params, hasStandName: 0 };
+      } else if (data.caseName !== '检验' && type === 'noMap') {
+        requestAjax = 'exportStaticCommonExcel';
+        exportText = `${hospitalName}-未映射到标准术语的${data.caseName}医院术语.xls`;
+        params = { ...params, hasStandName: 0 };
+      } else if (data.caseName === '检验' && type === 'lessStatic') {
+        requestAjax = 'exportStaticLisStaticExcel';
+        exportText = `${hospitalName}-缺少静态知识的${data.caseName}医院术语.xls`;
+        params = { ...params, hasStaticKnowledge: 0 };
+      } else if (data.caseName !== '检验' && type === 'lessStatic') {
+        requestAjax = 'exportStaticCommonStaticExcel';
+        exportText = `${hospitalName}-缺少静态知识的${data.caseName}医院术语.xls`;
+        params = { ...params, hasStaticKnowledge: 0 };
+      }
+      this.$alert('确定要导出静态知识映射测试结果吗?', '', {
+        confirmButtonText: '确定',
+        title: '提示',
+        type: 'warning',
+      })
+        .then(() => {
+          api[requestAjax](params).then((res) => {
+            if (res.status === 200) {
+              this.$message({ message: '导出成功', type: 'success' });
+              utils.downloadExportedData(res.data, exportText);
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  },
 };
 </script>
 

+ 62 - 54
src/components/testManager/staticKnowledgeMap/StaticKnowledgeMapTest.vue

@@ -9,15 +9,15 @@
         >
           <el-select
             size="mini"
-            v-model="hospitalName"
+            v-model="hospitalId"
             placeholder="选择医院"
-            clearable
+            @change="handleChange"
           >
             <el-option
               v-for="item in hospitalData"
               :label="item.name"
-              :value="item.val"
-              :key="item.orderNo"
+              :value="item.id"
+              :key="item.id"
             ></el-option>
           </el-select>
         </el-form-item>
@@ -40,7 +40,7 @@
         ></el-table-column>
         <el-table-column
           :resizable="false"
-          prop="hisName"
+          prop="caseName"
           label="术语类型"
           show-overflow-tooltip
         ></el-table-column>
@@ -52,7 +52,7 @@
 
         <el-table-column
           :resizable="false"
-          prop="uniqueName"
+          prop="totleNum"
           label="医院术语总条数"
           show-overflow-tooltip
         ></el-table-column>
@@ -61,8 +61,8 @@
             <el-button
               type="text"
               size="small"
-              @click="goToNoMapPage(scope.row)"
-              >5</el-button
+              @click="goToInnerPage(scope.row,'noMap')"
+              >{{ scope.row.unMappingNum }}</el-button
             >
           </template>
         </el-table-column>
@@ -71,8 +71,8 @@
             <el-button
               type="text"
               size="small"
-              @click="goToLessStaticPage(scope.row)"
-              >5</el-button
+              @click="goToInnerPage(scope.row,'lessStatic')"
+              >{{ scope.row.withoutKnowledgeNum }}</el-button
             >
           </template>
         </el-table-column>
@@ -84,18 +84,6 @@
           </template>
         </el-table-column>
       </el-table>
-      <div class="pagination pagepage">
-        <el-pagination
-          :current-page.sync="currentPage"
-          @current-change="currentChange"
-          background
-          :page-size="pageSize"
-          :page-sizes="pageSizeArr"
-          @size-change="handleSizeChange"
-          :layout="pageLayout"
-          :total="total"
-        ></el-pagination>
-      </div>
     </div>
   </div>
 </template>
@@ -109,59 +97,79 @@ export default {
   data() {
     return {
       list: [],
-      currentPage: 1,
-      pageSize: config.pageSize,
-      pageSizeArr: config.pageSizeArr,
-      pageLayout: config.pageLayout,
-      total: 0,
       hospitalData: [],
-      hospitalName: '', //选中医院
+      hospitalId: '', //选中医院
     };
   },
   created() {
-    this.getDataList();
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
+    this._getHospitalInfoCDSS();
   },
   beforeRouteEnter(to, from, next) {
     next((vm) => {
-      //const pm = to.param;
       Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
+      if (Object.keys(to.params).length === 0) return;
+      vm.getDataList(to.params.hospitalId);
     });
   },
   methods: {
     indexMethod(index) {
-      return (this.currentPage - 1) * this.pageSize + index + 1;
+      return index + 1;
     },
-    currentChange(next) {
-      this.currentPage = next;
-      this.getDataList(true);
-    },
-    handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = utils.getCurrentPage(
-        this.currentPage,
-        this.total,
-        this.pageSize
-      );
-      this.getDataList();
+    // 获取医院信息
+    _getHospitalInfoCDSS() {
+      api.getHospitalInfo().then((res) => {
+        if (res.data.code === '0') {
+          this.hospitalData = res.data && res.data.data;
+        }
+      });
     },
     // 执行测试
     handleTest() {},
     // 所有规则测试
     handleAllTest() {},
 
-    // 跳转至未映射到标准术语条数页面
-    goToNoMapPage() {},
-
-    // 跳转至缺少静态知识术语条数
+    // 跳转至未映射到标准术语条数页面 / 缺少静态知识术语条数
+    goToInnerPage(row,type) {
+      let hospital = this.hospitalData.find(
+        (item) => item.id === this.hospitalId
+      );
+      let hospitalName = hospital.name;
+      this.$router.push({
+        name: 'LessStaticDisease',
+        params: {
+          data: { ...row },
+          hospitalId: this.hospitalId,
+          hospitalName,
+          type
+        },
+      });
+    },
 
-    goToLessStaticPage() {},
+    // 选中医院
+    handleChange(val) {
+      if (val === '') return;
+      this.getDataList(val);
+    },
 
-    getDataList() {},
+    // 获取列表数据
+    getDataList(id) {
+      const params = {
+        hospitalId: id,
+      };
+      this.searched = true;
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      api.getStaticCaseResultList(params).then((res) => {
+        loading.close();
+        if (res.data.code === '0') {
+          this.list = res.data && res.data.data;
+        }
+      });
+    },
   },
 };
 </script>