Browse Source

住院医生优化

DESKTOP-0GD05B0\Administrator 2 years ago
parent
commit
ad878e5272
22 changed files with 535 additions and 124 deletions
  1. 1 0
      package.json
  2. 16 0
      src/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing.js
  3. 1 0
      src/components/xiao-chan/combo-grid/XcComboGrid.vue
  4. 5 1
      src/components/xiao-chan/dialog/XcDialogV2.vue
  5. 19 2
      src/components/xiao-chan/xc-table/XcTable.vue
  6. 1 1
      src/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue
  7. 2 1
      src/components/zhu-yuan-yi-sheng/emr/EmrSidebar.vue
  8. 1 0
      src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/TianJiaJianChaJianYan.vue
  9. 2 1
      src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/CheckApplicationHistory.vue
  10. 37 16
      src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/NewApplication.vue
  11. 131 0
      src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/JianChaJieGuo.vue
  12. 3 5
      src/components/zhu-yuan-yi-sheng/public/PatientList.vue
  13. 71 0
      src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/jy-jc-tree/JyJcTree.vue
  14. 15 27
      src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue
  15. 11 5
      src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-header/YzQueryCondition.vue
  16. 57 0
      src/utils/evicePixelRatio.js
  17. 37 3
      src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue
  18. 27 10
      src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/EmrMain.vue
  19. 1 2
      src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/InspectionRequisition.vue
  20. 89 48
      src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/JianChaShenQing.vue
  21. 6 0
      src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.js
  22. 2 2
      src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

+ 1 - 0
package.json

@@ -5,6 +5,7 @@
     "dev": "vite",
     "start": "vite",
     "build": "vite build --mode=production",
+    "build:development": "vite build --mode=development",
     "build:stag": "vite build --mode=staging",
     "build:dev": "vite build --mode=dev",
     "build:localhost": "vite build --mode=localhost",

+ 16 - 0
src/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing.js

@@ -42,6 +42,15 @@ export function huoQuShengQingXiangQing(reqNo) {
     })
 }
 
+export function queryCheckTextResults(patNo, times, reqNo) {
+    return request({
+        url: url + 'queryCheckTextResults',
+        method: 'get',
+        params: {patNo, times, reqNo}
+    })
+}
+
+
 export function chaKanFenLeiXiangQing(code, bwCode, jianCha) {
     return request({
         url: url + 'chaKanFenLeiXiangQing',
@@ -149,6 +158,13 @@ export function shanChuJianChaJianYan(reqNo, patNo, times) {
     })
 }
 
+// 获取检验检查树状图
+export function getJyJcZdTree() {
+    return request({
+        url: url + 'getJyJcZdTree',
+        method: 'get',
+    })
+}
 
 
 

+ 1 - 0
src/components/xiao-chan/combo-grid/XcComboGrid.vue

@@ -30,6 +30,7 @@
                            :label="item.label"
                            show-overflow-tooltip
                            :prop="item.prop"
+                           :width="item.width"
           ></el-table-column>
           <slot/>
         </el-table>

+ 5 - 1
src/components/xiao-chan/dialog/XcDialogV2.vue

@@ -62,6 +62,10 @@ const props = defineProps({
   width: {
     type: [String, Number],
     default: '50%'
+  },
+  maximize: {
+    type: Boolean,
+    default: false
   }
 })
 
@@ -74,7 +78,7 @@ const imgIcon = () => {
   }
 }
 
-let fullScreen = $ref(false)
+let fullScreen = $ref(props.maximize)
 const clickFullScreen = () => {
   if (props.allowMaximization) {
     fullScreen = !fullScreen

+ 19 - 2
src/components/xiao-chan/xc-table/XcTable.vue

@@ -11,7 +11,7 @@
       :row-key="props.rowKey"
       border
       @select-all="selectAll"
-      default-expand-all
+      :default-expand-all="props.defaultExpandAll"
       stripe>
     <slot/>
   </el-table>
@@ -31,6 +31,7 @@
 import {ElMessage} from "element-plus";
 import {BizException, ExceptionEnum} from "@/utils/BizException";
 import {getVisibleSize, visibleWindowSize} from "@/utils/window-size";
+import {onClickOutside} from "@vueuse/core";
 
 const props = defineProps({
   data: {
@@ -72,6 +73,10 @@ const props = defineProps({
     type: Boolean,
     default: false
   },
+  defaultExpandAll: {
+    type: Boolean,
+    default: true
+  }
 })
 const emit = defineEmits([
   'currentChange',
@@ -85,6 +90,9 @@ const tableRef = ref(null)
 let selection = $ref([])
 
 const tableData = computed(() => {
+  if (!props.openPaging) {
+    return pageObject.data
+  }
   if (props.localPaging) {
     return props.data.data.slice((props.data.currentPage - 1) * props.data.pageSize, props.data.currentPage * props.data.pageSize)
   } else if (isLocalData) {
@@ -123,6 +131,7 @@ const selectionChange = (selection) => {
   emit('selectionChange', selection)
 }
 
+const tempRow = ref({})
 const rowClick = (row, column, event) => {
   if (row.children) {
     for (let i = 0, len = row.children.length; i < len; i++) {
@@ -130,6 +139,15 @@ const rowClick = (row, column, event) => {
     }
   }
   tableRef.value.toggleRowSelection(row)
+  if (tempRow.value) {
+    // 防止多次点击触发事件
+    if (tempRow.value === row) {
+      return
+    }
+    tempRow.value['$show'] = false
+  }
+  row['$show'] = true
+  tempRow.value = row
   emit('rowClick', row, column, event);
 }
 
@@ -200,7 +218,6 @@ let pageObject = $ref({
 
 let isLocalData = $ref(false)
 
-
 onMounted(() => {
   if (props.data !== null && props.localData !== null) {
     throw new Error('data 和 localData 不能同时使用')

+ 1 - 1
src/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue

@@ -52,7 +52,7 @@
 
     <div class="box">
       <div>
-        总费用:{{ huanZheXinXi.totalCharge }} {{ huanZheXinXi.balance }}
+        总费用:{{ huanZheXinXi.totalCharge }} {{ huanZheXinXi.balance }}
       </div>
       <div>
         药品占比:{{ huanZheXinXi.yp }}

+ 2 - 1
src/components/zhu-yuan-yi-sheng/emr/EmrSidebar.vue

@@ -86,12 +86,13 @@ const handleNodeClick = async (val, property, event) => {
       name: val.name
     }
   } else if (templateType === 2) {
+    console.log(val)
     temp = {
       documentId: val.emrDocumentId,
       categoryCode: val.emrCategoryCode,
       categoryId: null,
       patientId: null,
-      name: val.emrName ? val.emrName : val.name
+      name: val.name ? val.name : val.emrName
     }
   }
   let str = JSON.stringify(val)

+ 1 - 0
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/TianJiaJianChaJianYan.vue

@@ -22,6 +22,7 @@
                           :height="400"
                           @selection-change="xuanZhong"
                           :open-paging="false">
+                  <el-table-column type="index"></el-table-column>
                   <el-table-column type="selection"></el-table-column>
                   <el-table-column label="项目名称" prop="orderName" width="220"></el-table-column>
                   <el-table-column label="说明" prop="ybComment"></el-table-column>

+ 2 - 1
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/CheckApplicationHistory.vue

@@ -12,7 +12,8 @@
     </el-table-column>
     <el-table-column label="操作" width="120">
       <template #default="scope">
-        <el-button icon="Delete" type="danger" @click="dianJiShanChu(scope.row, scope.$index)"> 删除
+        <el-button icon="Delete" type="danger"
+                   @click.stop="dianJiShanChu(scope.row, scope.$index)"> 删除
         </el-button>
       </template>
     </el-table-column>

+ 37 - 16
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/NewApplication.vue

@@ -4,11 +4,10 @@
     <el-radio-button :label="2">个人模板</el-radio-button>
     <el-radio-button :label="3">科室模板</el-radio-button>
   </el-radio-group>
-  <div>
-    <xc-table-v2
-        v-show="chaZhaoLeiXing === 1"
-        :header="columns" :data="newApplication"
-        @rowClick="rowClick"/>
+  <div style="height: 700px;overflow: auto">
+    <div v-show="chaZhaoLeiXing === 1">
+      <JyJcTree yjyc="jc" @node-click="nodeClick"/>
+    </div>
     <div v-show="chaZhaoLeiXing !== 1">
       <xc-table
           @rowClick="rowClick"
@@ -31,32 +30,30 @@
 import {ref} from "vue";
 import {
   chaKanFenLeiXiangQing,
-  getCheckNewApplication, getTemplate
+  getCheckNewApplication,
+  getTemplate
 } from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
-import XcTableV2 from "@/components/xiao-chan/xc-table-v2/XcTableV2";
 import XcTable from "@/components/xiao-chan/xc-table/XcTable";
-
+import JyJcTree from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/jy-jc-tree/JyJcTree.vue";
+import {getServerDateApi} from "@/api/public-api";
 
 const props = defineProps({
-  returnData: Function
+  returnData: Function,
+  returnItem: Function
 })
 
+const config = {value: 'code', label: 'name', children: 'children'}
+
 const chaZhaoLeiXing = ref(1)
 
 const newApplication = ref([])
 const templateData = ref([])
-const columns = [
-  {
-    name: '名称',
-    code: 'name',
-    width: 20
-  }
-]
 
 
 const rowClick = ({code, bwCode}) => {
   chaKanFenLeiXiangQing(code, chaZhaoLeiXing.value === 1 ? bwCode : 'mb', true).then((res) => {
     props.returnData(res)
+    console.log(res)
   })
 }
 
@@ -68,6 +65,29 @@ const dianJiLeiXingChaXun = () => {
   }
 }
 
+// 树状图点击
+// {
+// "code": "003726",
+//     "name": "术中经食管超声心动图",
+//     "classes": "03",
+//     "type": 0,
+//     "execUnit": "2020300",
+//     "execUnitName": null,
+//     "bw": "心脏彩超",
+//     "children": null
+// }
+const nodeClick = async (data) => {
+  let temp = {
+    execDept: data.execUnit,
+    execDeptName: data.execUnitName,
+    orderCode: data.code,
+    orderName: data.name,
+    startTime: await getServerDateApi()
+  }
+  console.log(data, temp)
+  props.returnItem(temp)
+}
+
 const deleteTemplate = (val) => {
   console.log(val)
 }
@@ -75,6 +95,7 @@ const deleteTemplate = (val) => {
 onMounted(() => {
   getCheckNewApplication().then((res) => {
     newApplication.value = res
+    console.log(res)
   })
 })
 

+ 131 - 0
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/JianChaJieGuo.vue

@@ -0,0 +1,131 @@
+<template>
+  <div style="overflow: auto;display: flex" :style="{height: props.height + 'px'}">
+    <div
+        style="width:394.875pt;height:760px;
+               border: 1px solid;
+               background-color: white;
+               font-size: 13px"
+        ref="printRef">
+      <div style="text-align: center;line-height: 40px;font-size: 20px;">
+        泰和医院住院检查报告单
+      </div>
+      <div>
+        <table style="width: 100%;">
+          <tbody>
+          <tr>
+            <td>住院号:{{ props.patInfo.inpatientNo + '_' + props.patInfo.admissTimes }}</td>
+            <td>姓名:{{ props.patInfo.name }}</td>
+            <td>日期:{{ data.record.checkDate }}</td>
+          </tr>
+          <tr>
+            <td>性别: {{ props.patInfo.sexName }}</td>
+            <td>年龄:{{ props.patInfo.age }}</td>
+            <td>单号:{{ data.record.hisReqNo }}</td>
+          </tr>
+          </tbody>
+        </table>
+      </div>
+      <div style="padding: 5px">
+        <div>
+          检查项目:{{ data.row.orderName }}
+        </div>
+        <div style="margin-top: 3px">
+          <div>
+            检查所见:
+          </div>
+          <div style="border: 1px solid;height: 400px;">
+            {{ data.recordReport.textJc }}
+          </div>
+        </div>
+
+        <div style="margin-top: 3px">
+          <div>诊断意见:</div>
+          <div style="height: 100px">
+            {{ data.record.fsIcdText }}
+          </div>
+        </div>
+
+        <table style="width: 100%">
+          <tbody>
+          <tr>
+            <td>
+              报告医生: {{ data.record.reportName }}
+            </td>
+            <td>
+              报告时间: {{ data.record.reportDate }}
+            </td>
+          </tr>
+          <tr>
+            <td>
+              审核医生: {{ data.record.confirmName }}
+            </td>
+            <td>
+              审核时间: {{ data.record.confirmDate }}
+            </td>
+          </tr>
+          </tbody>
+        </table>
+      </div>
+    </div>
+    <div></div>
+    <div>
+      <el-button @click="printClick">打印</el-button>
+    </div>
+
+
+  </div>
+</template>
+
+<script setup name='JianChaJieGuo'>
+import {getLodop} from "@/utils/c-lodop";
+
+const props = defineProps({
+  patInfo: {
+    type: Object,
+    default: {}
+  },
+  height: {
+    type: Number,
+    default: 600
+  }
+})
+
+let data = $ref({
+  record: {},
+  recordReport: {},
+  row: {}
+})
+
+const printRef = ref()
+
+const printClick = () => {
+  let LODOP = getLodop()
+  const strHtml = '<body>' + printRef.value.innerHTML + '</body>'
+  LODOP.PRINT_INIT(0, 0, 522, 333, '检验结果')
+  LODOP.SET_PRINT_PAGESIZE(1, 0, 0, 'A5')
+  LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', strHtml)
+  LODOP.PREVIEW()
+}
+
+
+const fillData = (val) => {
+  return new Promise((resolve, reject) => {
+    if (data) {
+      data = val
+      resolve()
+    }
+  })
+}
+
+defineExpose({
+  fillData
+})
+
+</script>
+
+<style scoped>
+.header {
+
+}
+
+</style>

+ 3 - 5
src/components/zhu-yuan-yi-sheng/public/PatientList.vue

@@ -19,7 +19,9 @@
     <el-table-column label="床" prop="bedNo" width="30"/>
     <el-table-column label="姓名" width="70" prop="name">
       <template #default="{row}">
-        {{ row.name }}
+        <span>
+          {{ row.name }}
+        </span>
         <span v-if="row.orderNoCount > 0" style="color: red">
               {{ row.orderNoCount }}
           </span>
@@ -76,8 +78,6 @@ import {cptSex} from "@/utils/computed";
 import {getMyPatient, saveTheThirdLevelDoctor} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
 import {clickOnThePatient, huanZheXinXi} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
-import {getRenYuan} from "@/api/public-api";
-import store from "@/store";
 import SelectStaffCode from "@/components/SelectStaffCode.vue";
 
 const myPatient = ref(false)
@@ -150,10 +150,8 @@ onMounted(() => {
 
 <style scoped lang="scss">
 
-
 .el_table__current {
   background-color: #a7d3ff;
 }
 
-//
 </style>

+ 71 - 0
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/jy-jc-tree/JyJcTree.vue

@@ -0,0 +1,71 @@
+<template>
+  <el-input v-model="search" style="width: 220px"/>
+  <el-tree
+      ref="treeRef"
+      :data="props.yjyc === 'jc' ? jcTree : jyTree"
+      accordion
+      :filter-node-method="filterNode"
+      @node-click="nodeClick"
+      :props="config">
+    <template #default="{node, data }">
+      <el-icon>
+        <FolderOpened v-if="data.children"/>
+        <Document v-else/>
+      </el-icon>
+      <span>{{ data.name }}</span>
+    </template>
+  </el-tree>
+</template>
+
+<script setup name='JyJcTree' lang="ts">
+import {jcTree, jyTree} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import {$ref} from "vue/macros";
+import {onMounted, Ref, ref, watch} from "vue";
+import {ElTree} from "element-plus";
+
+const props = defineProps({
+  yjyc: {
+    type: String
+  }
+})
+
+const emit = defineEmits(['node-click'])
+
+const config = {
+  value: 'code',
+  label: 'name',
+  children: 'children'
+}
+
+interface Tree {
+  name: string,
+  code: string,
+  children?: Tree[]
+}
+
+const search: Ref<string> = ref('')
+const treeRef = ref<InstanceType<typeof ElTree>>()
+
+let data: Tree[] = $ref([])
+
+watch(search, (val) => {
+  treeRef.value!.filter(val)
+})
+
+const filterNode = (value: string, data: Tree) => {
+  if (!value) return true
+  return data.name.includes(value)
+}
+
+const nodeClick = (data: Tree) => {
+  if (!data.children) {
+    emit('node-click', data)
+  }
+}
+
+
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 15 - 27
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue

@@ -130,25 +130,19 @@
         </div>
         <div>
           父医嘱:
-          <el-select
-              ref="parentNoRef"
-              v-model="yiZhuData.parentNo"
-              :disabled="yiZhuData.serial === '00'"
-              id="yz_parentNo"
-              @change="modifyDosingMethod"
-              clearable
-              @focus="elSelectFocus(parentNoRef)"
-              @blur="elSelectBlur(parentNoRef)"
-              @clear="yiZhuData.parentNo = null">
-            <el-option v-for="item in fuYiZhuData"
-                       :key="item.actOrderNo"
-                       :label="item.orderName"
-                       :value="item.actOrderNo">
-              <span style="color: #8492a6; font-size: 12px">{{ item.actOrderNo }}</span>
-              <el-divider direction="vertical"></el-divider>
-              <span>{{ item.orderName }}</span>
-            </el-option>
-          </el-select>
+          <select v-model="yiZhuData.parentNo"
+                  style="width: 120px"
+                  @focus="fuYiZhuClick"
+                  @change="modifyDosingMethod"
+                  :disabled="yiZhuData.serial === '00'">
+            <option :value="null"/>
+            <template v-for="item in fuYiZhuData">
+              <option :value="item.actOrderNo"
+                      v-if="yiZhuData?.actOrderNo !== item?.actOrderNo">
+                {{ item.orderName }}
+              </option>
+            </template>
+          </select>
         </div>
         <div :title="yiZhuData.discription" class="div_center__box">
           描述:
@@ -291,7 +285,7 @@ const props = defineProps({
 
 let tableHeader = [
   {label: '编码', prop: 'orderCode'},
-  {label: '名称', prop: 'orderName'},
+  {label: '名称', prop: 'orderName', width: 220},
   {label: '规格', prop: 'drugSpecification'},
   {label: '描述', prop: 'discription'},
   {label: '库存', prop: 'stockAmount'},
@@ -311,12 +305,10 @@ const tiShiBiaoTi = ref([])
 
 // 搜索医嘱
 const xuanZhongFeiYong = async (row, laiyuan = 1) => {
-
   if (row.serial === '0000' && row.groupNo === '0000') {
     props.openGroupOrderTemplate(row.orderCode)
     return
   }
-
   if (yiZhuData.value.actOrderNo === 'tempOrderNo') {
     yiZhuData.value.actOrderNo = await getOrderNo()
   }
@@ -519,11 +511,6 @@ const fuYiZhuClick = async () => {
 }
 
 const modifyDosingMethod = () => {
-  if (yiZhuData.value.parentNo == yiZhuData.value.actOrderNo) {
-    yiZhuData.value.parentNo = ''
-    BizException(ExceptionEnum.MESSAGE_ERROR, '不能选中自己')
-  }
-
   if (yiZhuData.value.parentNo) {
     yiZhuData.value.supplyCode = '044'
     yiZhuData.value.supplyCodeName = '副药'
@@ -663,6 +650,7 @@ const toAddAnOrder = async () => {
     inpatientNo: props.patientInfo.inpatientNo,
     admissTimes: props.patientInfo.admissTimes,
     actOrderNo: yiZhuData.value.actOrderNo,
+    groupNo: queryParam.value.groupNo,
     data: yiZhuData.value
   }
   try {

+ 11 - 5
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-header/YzQueryCondition.vue

@@ -7,11 +7,10 @@
         <option :value="0">全部</option>
         <option :value="1">停止</option>
         <option :value="2">当前</option>
-        <!--        <option :value="3">当日</option>-->
       </select>
     </label>
     <label>
-      医嘱类型:
+      类型:
       <select v-model="queryParam.frequCode">
         <option :value="0">全部</option>
         <option :value="1">临时</option>
@@ -19,7 +18,7 @@
       </select>
     </label>
     <label>
-      医嘱状态:
+      状态:
       <select v-model="queryParam.zhuangTai">
         <option :value="0">全部</option>
         <option :value="1">录入</option>
@@ -28,6 +27,13 @@
         <option :value="5">停止</option>
       </select>
     </label>
+    <label>
+      药房:
+      <select v-model="queryParam.groupNo">
+        <option value="73">住院</option>
+        <option value="71">门诊</option>
+      </select>
+    </label>
 
     <button style="margin-left: 5px" @click="props.addYiZhuClick">添加</button>
     <button style="margin-left: 5px" @click="props.toDeleteAnOrder">删除</button>
@@ -35,7 +41,7 @@
     <button style="margin-left: 5px" @click="currentConfirmOrdersClick">确认</button>
     <button style="margin-left: 5px" @click="props.clickOnTheOrderTemplate">模板</button>
 
-    <div style="display: flex;margin-left: 20px">
+    <div style="display: flex;">
       <status-color color="#05ff00" label="R:录入"/>
       <status-color color="#0000fb" label="Q:确认"/>
       <status-color color="#ff07f3" label="Z:执行"/>
@@ -57,7 +63,7 @@ import StatusColor from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-header/S
 import {
   errorMsg,
   queryParam,
-  selectedData, yiZhuData,
+  selectedData,
   yzData,
   yzDataKeyAndIndex
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";

+ 57 - 0
src/utils/evicePixelRatio.js

@@ -0,0 +1,57 @@
+/**
+ * @description 校正windows页面在系统进行缩放后导致页面被放大的问题,通常放大比例是125%、150%
+ * **/
+
+class DevicePixelRatio {
+    constructor() {
+    }
+
+    //获取系统类型
+    _getSystem() {
+        let flag = false;
+        var agent = navigator.userAgent.toLowerCase();
+        if (agent.indexOf("windows") >= 0) {
+            return true;
+        }
+    }
+
+    //获取页面缩放比例
+    _addHandler(element, type, handler) {
+        if (element.addEventListener) {
+            element.addEventListener(type, handler, false);
+        } else if (element.attachEvent) {
+            element.attachEvent("on" + type, handler);
+        } else {
+            element["on" + type] = handler;
+        }
+    }
+
+    //校正浏览器缩放比例
+    _correct() {
+        let t = this;
+        //页面devicePixelRatio(设备像素比例)变化后,计算页面body标签zoom修改其大小,来抵消devicePixelRatio带来的变化。
+        document.getElementsByTagName('body')[0].style.zoom = 1 / window.devicePixelRatio;
+    }
+
+    //监听页面缩放
+    _watch() {
+        let t = this;
+        t._addHandler(window, 'resize', function () { //注意这个方法是解决全局有两个window.resize
+            //重新校正
+            t._correct()
+        })
+    }
+
+    //初始化页面比例
+    init() {
+        let t = this;
+        if (t._getSystem()) { //判断设备,目前只在windows系统下校正浏览器缩放比例
+            //初始化页面校正浏览器缩放比例
+            t._correct();
+            //开启监听页面缩放
+            t._watch();
+        }
+    }
+}
+
+export default DevicePixelRatio;

+ 37 - 3
src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue

@@ -15,7 +15,10 @@
       <div style="width: 158px">
         <patient-list/>
       </div>
-      <div style="width: 100%;overflow:auto" ref="mainRef">
+      <div ref="mainRef" class="resident_doctor__main">
+        <div class="doctor_main__setup" @click="drgPacketClick">
+          DRG预分组
+        </div>
         <div class="tag">
           <div v-for="item in pathList"
                :style="currentPagePosition(item.path)"
@@ -38,12 +41,13 @@ import store from '@/store'
 import {computed, ref, watch} from "vue";
 import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
 import router from "@/router";
-import PageLayer from "@/layout/PageLayer";
 import {
-  huanZheXinXi as patientInfo, winsize,
+  huanZheXinXi as patientInfo, jcTree, jyTree, winsize,
   youWuXuanZheHuanZhe
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import PatientList from "@/components/zhu-yuan-yi-sheng/public/PatientList";
+import {getDrgIntelligentGrouping} from "@/api/zhu-yuan-yi-sheng/emr-patient";
+import {getJyJcZdTree} from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -101,10 +105,22 @@ const currentPagePosition = (val) => {
   }
 }
 
+const drgPacketClick = () => {
+  if (youWuXuanZheHuanZhe()) return
+  getDrgIntelligentGrouping(patientInfo.value.inpatientNo, patientInfo.value.admissTimes).then((res) => {
+    window.open(res)
+  })
+}
+
 const mainRef = ref()
 onMounted(async () => {
   await nextTick()
   winsize.value.main = mainRef.value.clientWidth
+  getJyJcZdTree().then((res) => {
+    jyTree.value = res.jy
+    jcTree.value = res.jc
+  })
+
 })
 
 
@@ -164,4 +180,22 @@ onMounted(async () => {
 .main {
   overflow: auto;
 }
+
+.resident_doctor__main {
+  width: 100%;
+  overflow: auto;
+  position: relative;
+
+  .doctor_main__setup {
+    cursor: pointer;
+    position: absolute;
+    right: 4px;
+    border: 1px solid;
+    padding: 5px;
+    top: 3px;
+    border-radius: 4px;
+    background-color: #0a84fd;
+    color: white;
+  }
+}
 </style>

+ 27 - 10
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/EmrMain.vue

@@ -23,7 +23,7 @@
         <el-button icon="RefreshRight" @click="clickUndo('redo')">重做</el-button>
       </el-button-group>
 
-      <el-button @click="drgIntelligentGrouping">DRG智能分组</el-button>
+      <el-button @click="drgIntelligentGrouping" type="primary">DRG智能分组</el-button>
 
       <emr-assistant :data="openAssistant" :to-fill-in-data="clickToFillInData"/>
       <el-switch v-model="reviewMode" active-color="#ff4949" active-text="关闭审阅" :active-value="false"
@@ -57,6 +57,11 @@
       </el-main>
     </el-container>
 
+    <xc-dialog-v2 v-model="drgData.dialog" title="DRG预分组" :maximize="true">
+      <iframe :src="drgData.url" :height="800" v-if="drgData.dialog"/>
+    </xc-dialog-v2>
+
+
   </el-container>
 </template>
 
@@ -71,12 +76,14 @@ import store from "@/store";
 import {onBeforeRouteLeave} from "vue-router";
 import {getUuid} from "@/api/public-api";
 import {
-  deletePatientEmrByDocumentId,
   getDrgIntelligentGrouping,
   submitMedicalRecord
 } from "@/api/zhu-yuan-yi-sheng/emr-patient";
 import {useDocumentVisibility} from "@vueuse/core";
 import EmrAssistant from "@/components/zhu-yuan-yi-sheng/emr/EmrAssistant.vue";
+import XcDialog from "@/components/xiao-chan/dialog/XcDialog.vue";
+import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
+
 
 const props = defineProps({
   huanZheXinXi: {
@@ -136,6 +143,7 @@ const clickSaveData = async () => {
     patNo: props.huanZheXinXi.inpatientNo,
     times: props.huanZheXinXi.admissTimes,
     emrName: templateName,
+    categoryId: categoryId
   }
   objectValuesCannotBeNull(data)
   data.emrDataElement = editor.getDataElements('business')
@@ -148,13 +156,16 @@ const clickSaveData = async () => {
     currentEmr.value.saveDocument(data, async () => {
       isEditorChange = false
       emrSidebarRef.value.queryData()
-      emptyEditor()
-      await updateCaseHistoryUrl({
+      // 跳转到空白页面
+      caseHistoryUrl = `/emr/runtime/#/editor`
+      let temp = {
         documentId: data.emrDocumentId,
-        categoryCode: categoryCode,
-        name: templateName,
-        categoryId: categoryId
-      })
+        categoryCode: data.emrCategoryCode,
+        name: data.name,
+        categoryId: data.categoryId
+      }
+      console.log(temp)
+      await updateCaseHistoryUrl(temp)
     }, (err) => {
       documentId = err
       isEditorChange = true
@@ -518,9 +529,15 @@ const queryingBasicPatientInformation = async () => {
 }
 
 // DRG 智能分组
+const drgData = $ref({
+  dialog: false,
+  url: ''
+})
+// 点击查看 drg 分组 通过打开 dialog 的方式, 后续可以使用打开新的页面
 const drgIntelligentGrouping = () => {
-  getDrgIntelligentGrouping(props.huanZheXinXi.inpatientNo, props.huanZheXinXi.admissTimes).then((res) => {
-    console.log(res)
+  getDrgIntelligentGrouping(props.huanZheXinXi.inpatientNo, props.huanZheXinXi.admissTimes).then(async (res) => {
+    drgData.dialog = true
+    drgData.url = res
   })
 }
 

+ 1 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/InspectionRequisition.vue

@@ -20,8 +20,7 @@
                 format="YYYY-MM-DD HH:mm:ss"
                 style="width: 180px"
                 type="datetime"
-                value-format="YYYY-MM-DD HH:mm:ss"
-            >
+                value-format="YYYY-MM-DD HH:mm:ss">
             </el-date-picker>
           </el-form-item>
         </el-col>

+ 89 - 48
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/JianChaShenQing.vue

@@ -14,8 +14,7 @@
           size="small"
           start-placeholder="开始日期"
           style="width: 280px"
-          type="daterange"
-      ></el-date-picker>
+          type="daterange"/>
       <el-button icon="Search" type="primary" @click="dianJiChaXunHuanZheJianCha(0)">查询</el-button>
       <el-divider direction="vertical"></el-divider>
       <el-button icon="Check" type="success" @click="saveData">保存</el-button>
@@ -27,7 +26,7 @@
       <el-aside style="width: 450px">
         <el-tabs v-model="asideTabs">
           <el-tab-pane :name="0" label="新申请">
-            <new-application :return-data="asideReturnData"/>
+            <new-application :return-data="asideReturnData" :return-item="selectedCheck"/>
           </el-tab-pane>
           <el-tab-pane :name="1" label="历史记录">
             <check-application-history :data="jianChaShuJu"
@@ -37,26 +36,63 @@
         </el-tabs>
       </el-aside>
       <el-main>
-        <el-tabs v-model="mainTabs"
-                 closable
-                 @tab-remove="removeTab">
+        <el-tabs v-model="mainTabs">
           <el-tab-pane :name="0" label="检查申请单">
             <da-ying-jian-cha
                 ref="daYingJianChaRef"
                 :height="windowSize.h / 1.4"></da-ying-jian-cha>
           </el-tab-pane>
-          <el-tab-pane :name="1" label="新增检查">
+          <el-tab-pane :name="1" label="检查结果">
+            <jian-cha-jie-guo ref="jianChaJieGuoRef" :pat-info="huanZheXinXi"/>
+          </el-tab-pane>
+          <el-tab-pane :name="2" label="新增检查">
             <check-inspection-details :data="feeDetails" :return-data="selectedCheck"/>
           </el-tab-pane>
-          <el-tab-pane :label="item.orderName"
-                       :name="index + 2"
-                       v-for="(item,index) in addCheckList">
-            <inspection-requisition :data="item"
-                                    :diagnosis="diagnosis"
-                                    :search-diagnostics="searchDiagnostics"/>
+          <el-tab-pane :name="3" label="编辑数据">
+            <xc-table :local-data="addCheckList"
+                      :default-expand-all="false"
+                      :height="350">
+              <el-table-column label="编码" prop="orderCode" width="60"></el-table-column>
+              <el-table-column label="名称" prop="orderName" width="220" show-overflow-tooltip></el-table-column>
+              <el-table-column label="诊断" prop="diagText" width="120" show-overflow-tooltip></el-table-column>
+              <el-table-column label="病室摘要" prop="reqComment" show-overflow-tooltip></el-table-column>
+              <el-table-column label="体征信息" prop="reqTzComment" show-overflow-tooltip></el-table-column>
+              <el-table-column label="相关辅检结果" prop="reqOtherResult" show-overflow-tooltip></el-table-column>
+              <el-table-column label="检查时间" prop="startTime" width="130"/>
+              <el-table-column label="执行科室" prop="execDeptName" width="110"></el-table-column>
+              <el-table-column label="急诊" width="40">
+                <template #default="{row}">
+                    <span v-if="row.jzFlag === 1">
+                      √
+                    </span>
+                </template>
+              </el-table-column>
+              <el-table-column label="自费" width="40">
+                <template #default="{row}">
+                    <span v-if="row.ybSelfFlag === 1">
+                      √
+                    </span>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" width="90" fixed="right">
+                <template #default="scope">
+                  <el-button-group>
+                    <el-button type="primary" icon="Edit" title="编辑" @click="openTheEditPopUpWindow(scope.$index)"/>
+                    <el-button type="danger" icon="Delete" title="删除" @click="deleteRequest(scope.$index)"/>
+                  </el-button-group>
+                </template>
+              </el-table-column>
+            </xc-table>
           </el-tab-pane>
         </el-tabs>
-
+        <xc-dialog-v2 v-model="editor.dialog" title="检查编辑">
+          <inspection-requisition :data="editor.data"
+                                  :diagnosis="diagnosis"
+                                  :search-diagnostics="searchDiagnostics"/>
+          <template #footer>
+            <el-button @click="editor.dialog = false">确认</el-button>
+          </template>
+        </xc-dialog-v2>
       </el-main>
       <save-template-inspection ref="saveTemplateRef"/>
     </el-container>
@@ -76,14 +112,12 @@ import {
   huoQuJianChaShenQing,
   huoQuJianYanJianChaMing,
   huoQuShengQingXiangQing,
-  shanChuJianChaJianYan
+  queryCheckTextResults,
 } from '@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing'
 import store from '@/store'
 import DaYingJianCha from '@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/DaYingJianCha.vue'
-import {getDateRangeFormatDate, huanHangXianShi} from '@/utils/date'
+import {getDateRangeFormatDate} from '@/utils/date'
 import {shortcuts} from '@/data/shortcuts'
-import TianJiaJianChaJianYan from '@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/TianJiaJianChaJianYan.vue'
-import router from '@/router'
 import {ElMessageBox} from 'element-plus'
 import CheckApplicationHistory from "@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/CheckApplicationHistory";
 import NewApplication from "@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/NewApplication";
@@ -95,14 +129,15 @@ import SaveTemplateInspection
 import {BizException, ExceptionEnum} from "@/utils/BizException";
 import {yaoPinXiangMuPiPeiYiBao} from "@/api/public-api";
 import {stringNotBlank} from "@/utils/blank-utils";
+import JianChaJieGuo from "@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/JianChaJieGuo.vue";
+import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
+import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
 
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
 })
 
-
-const tableIndex = ref(-1)
 const orderName = ref('')
 const dateRange = ref(null)
 const jianChaShuJu = ref({
@@ -112,9 +147,11 @@ const jianChaShuJu = ref({
   data: [],
 })
 const asideTabs = ref(0)
-const mainTabs = ref(0)
+const mainTabs = ref(3)
 
 const daYingJianChaRef = ref()
+// 检查结果
+const jianChaJieGuoRef = ref()
 
 /**
  * 点击查询患者检查
@@ -152,10 +189,21 @@ const handleCurrentChange = (val) => {
 
 /**
  * 点击查看检查申请单详情
- * @param reqNo
+ * @param row 行数据
  */
-const dianJiaJianChaXiangQing = ({reqNo}) => {
-  huoQuShengQingXiangQing(reqNo).then((res) => {
+const dianJiaJianChaXiangQing = (row) => {
+  queryCheckTextResults(row.inpatientNo, row.admissTimes, row.reqNo).then((res) => {
+    res.row = row
+    jianChaJieGuoRef.value.fillData(res).then(() => {
+      mainTabs.value = 1
+    })
+  }).catch((e) => {
+    jianChaJieGuoRef.value.fillData({
+      record: {}, recordReport: {}, row: {}
+    })
+  })
+
+  huoQuShengQingXiangQing(row.reqNo).then((res) => {
     daYingJianChaRef.value.jieShouShuJu(res)
   })
 }
@@ -169,7 +217,7 @@ const feeDetails = ref([])
 const asideReturnData = (data) => {
   feeDetails.value = data
   if (feeDetails.value.length > 0) {
-    mainTabs.value = 1
+    mainTabs.value = 2
   }
 }
 
@@ -178,7 +226,8 @@ const asideReturnData = (data) => {
  * @param data
  */
 const selectedCheck = (data) => {
-  addCheckList.value = data
+  addCheckList.value.push(data)
+  mainTabs.value = 3
 }
 
 // 搜索临床诊断
@@ -241,20 +290,7 @@ function baoCunShuJu() {
   })
 }
 
-// 删除标签
-const removeTab = (targetName) => {
-  let temp = targetName - 2
-  if (temp < 0) {
-    BizException(ExceptionEnum.LOGICAL_ERROR, '无法删除该标签页')
-  }
-  addCheckList.value.splice(temp, 1)
-  if (targetName === mainTabs.value) {
-    mainTabs.value = mainTabs.value - 1
-  }
-
-}
-
-
+// 查询患者的检查项目名称
 const querySearchAsync = (val, cb) => {
   if (youWuXuanZheHuanZhe()) return
   huoQuJianYanJianChaMing(val, huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes, huanZheXinXi.value.bedNo, '3').then((res) => {
@@ -262,18 +298,23 @@ const querySearchAsync = (val, cb) => {
   })
 }
 
+// 编辑器弹窗
+const editor = ref({
+  dialog: false,
+  data: {}
+})
+const openTheEditPopUpWindow = (index) => {
+  editor.value.dialog = true
+  editor.value.data = addCheckList.value[index]
+}
+const deleteRequest = (index) => {
+  addCheckList.value.splice(index, 1)
+}
+
 onActivated(() => {
   dianJiChaXunHuanZheJianCha(0)
 })
 
-const tableRowClassName = ({rowIndex}) => {
-  if (rowIndex === tableIndex.value) {
-    return 'success-row'
-  } else {
-    return ''
-  }
-}
-
 
 watch(
     () => huanZheXinXi.value,

+ 6 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.js

@@ -67,6 +67,7 @@ export const queryParam = ref({
     displayRange: 0,
     frequCode: isDev ? 0 : 2,
     zhuangTai: isDev ? 0 : 3,
+    groupNo: '73',
     patNo: '',
     times: 0,
 });
@@ -193,6 +194,11 @@ export const xuanZhongJianCha = ref({
     daiXuanZhong: [],
 })
 
+// 检验树状图
+export const jyTree = ref([])
+// 检查树状图
+export const jcTree = ref([])
+
 /**
  * 点击查询患者信息
  * @param row 住院号

+ 2 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -1,5 +1,5 @@
 <template>
-  <div :style="{width: winsize.editor + 'px'}" style="margin: 0">
+  <div :style="{width: winsize.editor + 40 + 'px'}" style="margin: 0">
     <yz-query-condition :patient-info="huanZheXinXi"
                         ref="yzQueryRef"
                         :to-delete-an-order="toDeleteAnOrder"
@@ -11,7 +11,7 @@
       <button type="warning" @click="clickToStopTheOrder">批量停止</button>
       <el-divider direction="vertical"></el-divider>
       <button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)"
-                 @click="clickToModifyTheDoctorSOrderTime"> 修改医嘱时间
+              @click="clickToModifyTheDoctorSOrderTime"> 修改医嘱时间
       </button>
       <button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)" @click="jumpToMedicalRecord"> 病案首页
       </button>