Browse Source

优化会诊以及电子病历添加血糖

xiaochan 2 years ago
parent
commit
27e37f4cdb

+ 94 - 91
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrAuxiliaryTools.vue

@@ -1,66 +1,68 @@
 <template>
-    <el-popover width="220">
-        <template #reference>
-            <el-button>
-                辅助工具
-            </el-button>
-        </template>
-        <template #default>
-            <el-button @click="open(0)" type="success">医嘱</el-button>
-            <el-button @click="open(1)" type="primary">护理</el-button>
-            <el-button @click="open(2)" type="warning">检验</el-button>
-            <el-button @click="open(3)" type="info">检查</el-button>
-            <hr/>
-            <el-button @click="open(4)" text type="success" plain>会诊</el-button>
-            <el-button @click="open(5)" text type="primary" plain>手术</el-button>
-            <el-button @click="open(6)" text type="warning" plain>检验</el-button>
-            <el-button @click="open(7)" text type="info" plain>草药</el-button>
-            <hr/>
-            <el-button @click="emrChannelClick(emrChannelEnum.firstPageOfMedicalRecord)" type="success" round>首页
-            </el-button>
-            <el-button @click="emrChannelClick(emrChannelEnum.medicalAdvice)" type="primary" round>医嘱</el-button>
-            <el-button @click="open(8)" type="warning" round>心电</el-button>
-
-        </template>
-    </el-popover>
-    <el-drawer v-model="drawer"
-               direction="btt"
-               append-to-body
-               destroy-on-close
-               size="100%"
-               :with-header="false">
-        <el-button class="close_but"
-                   type="danger"
-                   icon="Close"
-                   @click="drawer =false">
-            关闭
-        </el-button>
-        <emr-order-list v-if="index === 0"
-                        :pat-no="patInfo.inpatientNo"
-                        :times="patInfo.admissTimes"/>
-        <emr-yz-temperature v-if="index === 1"/>
-        <inspection-report-index
-                style="font-size: 12px;height: 100%"
-                v-if="index === 2"
-                :pat-no="patInfo.inpatientNo"
-                :start="start"
-                :end="end"/>
-        <emr-inspect v-if="index === 3"
-                     :pat-no="patInfo.inpatientNo"
+  <el-popover width="220">
+    <template #reference>
+      <el-button>
+        辅助工具
+      </el-button>
+    </template>
+    <template #default>
+      <el-button @click="open(0)" type="success">医嘱</el-button>
+      <el-button @click="open(1)" type="primary">护理</el-button>
+      <el-button @click="open(2)" type="warning">检验</el-button>
+      <el-button @click="open(3)" type="info">检查</el-button>
+      <hr/>
+      <el-button @click="open(4)" text type="success" plain>会诊</el-button>
+      <el-button @click="open(5)" text type="primary" plain>手术</el-button>
+      <el-button @click="open(6)" text type="warning" plain>检验</el-button>
+      <el-button @click="open(7)" text type="info" plain>草药</el-button>
+      <hr/>
+      <el-button @click="emrChannelClick(emrChannelEnum.firstPageOfMedicalRecord)" type="success" round>首页
+      </el-button>
+      <el-button @click="emrChannelClick(emrChannelEnum.medicalAdvice)" type="primary" round>医嘱</el-button>
+      <el-button @click="open(8)" type="warning" round>心电</el-button>
+      <el-button @click="open(9)" type="info" round>血糖</el-button>
+    </template>
+  </el-popover>
+  <el-drawer v-model="drawer"
+             direction="btt"
+             append-to-body
+             destroy-on-close
+             size="100%"
+             :with-header="false">
+    <el-button class="close_but"
+               type="danger"
+               icon="Close"
+               @click="drawer =false">
+      关闭
+    </el-button>
+    <emr-order-list v-if="index === 0"
+                    :pat-no="patInfo.inpatientNo"
+                    :times="patInfo.admissTimes"/>
+    <emr-yz-temperature v-if="index === 1"/>
+    <inspection-report-index
+        style="font-size: 12px;height: 100%"
+        v-if="index === 2"
+        :pat-no="patInfo.inpatientNo"
+        :start="start"
+        :end="end"/>
+    <emr-inspect v-if="index === 3"
+                 :pat-no="patInfo.inpatientNo"
+                 :times="patInfo.admissTimes"/>
+    <emr-group-consultation v-if="index === 4"/>
+    <emr-operation v-if="index === 5"
+                   :emr-data="props.emrData"
+                   @to-fill-in-data="toFillInData"/>
+    <emr-test @close="close" v-if="index === 6"/>
+    <emr-herbs v-if="index === 7"
+               @close="close"
+               :pat-no="patInfo.inpatientNo"
+               :times="patInfo.admissTimes"/>
+    <emr-electrocardiogram v-if="index === 8"
+                           :pat-no="patInfo.inpatientNo"
+                           :times="patInfo.admissTimes"/>
+    <BloodSugarQuery v-if="index === 9" :pat-no="patInfo.inpatientNo"
                      :times="patInfo.admissTimes"/>
-        <emr-group-consultation v-if="index === 4"/>
-        <emr-operation v-if="index === 5"
-                       :emr-data="props.emrData"
-                       @to-fill-in-data="toFillInData"/>
-        <emr-test @close="close" v-if="index === 6"/>
-        <emr-herbs v-if="index === 7"
-                   @close="close"
-                   :pat-no="patInfo.inpatientNo"
-                   :times="patInfo.admissTimes"/>
-        <emr-electrocardiogram v-if="index === 8"
-                               :pat-no="patInfo.inpatientNo"
-                               :times="patInfo.admissTimes"/>
-    </el-drawer>
+  </el-drawer>
 
 </template>
 
@@ -78,19 +80,20 @@ import EmrOperation from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/Emr
 import EmrTest from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrTest.vue";
 import EmrHerbs from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrHerbs.vue";
 import {
-    emrChannelEnum,
-    emrMitt
+  emrChannelEnum,
+  emrMitt
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
 import EmrElectrocardiogram from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrElectrocardiogram.vue";
+import BloodSugarQuery from "@/views/examination/BloodSugarQuery/BloodSugarQuery.vue";
 
 const props = defineProps({
-    patInfo: {
-        type: Object
-    },
-    emrData: {
-        type: Object
-    }
+  patInfo: {
+    type: Object
+  },
+  emrData: {
+    type: Object
+  }
 })
 
 const emits = defineEmits(['toFillInData'])
@@ -101,40 +104,40 @@ const start = ref('')
 const drawer = ref(false)
 
 onMounted(async () => {
-    patInfo.value = props.patInfo
-    end.value = formatDate(await getServerDateApi())
-    start.value = formatDate(props.patInfo.admissDate)
+  patInfo.value = props.patInfo
+  end.value = formatDate(await getServerDateApi())
+  start.value = formatDate(props.patInfo.admissDate)
 })
 
 const toFillInData = (data) => {
-    emits('toFillInData', data)
-    close()
+  emits('toFillInData', data)
+  close()
 }
 
 const index = ref(-1)
 const open = (val) => {
-    localStorage.removeItem('clipBoardData');
-    drawer.value = true
-    index.value = val
+  localStorage.removeItem('clipBoardData');
+  drawer.value = true
+  index.value = val
 }
 
 const close = () => {
-    drawer.value = false
-    index.value = -1
+  drawer.value = false
+  index.value = -1
 }
 
 let emrChannel = new BroadcastChannel('emrChannel')
 const emrChannelClick = (name) => {
-    let str = {
-        name,
-        data: props.patInfo
-    }
-    let patInfoStr = JSON.stringify(str)
-    if (emrMitt.emit('患者病区判断')) {
-        emrChannel.postMessage(patInfoStr)
-    } else {
-        xcMessage.error('当前患者不存在您的病区,无法进行该操作。')
-    }
+  let str = {
+    name,
+    data: props.patInfo
+  }
+  let patInfoStr = JSON.stringify(str)
+  if (emrMitt.emit('患者病区判断')) {
+    emrChannel.postMessage(patInfoStr)
+  } else {
+    xcMessage.error('当前患者不存在您的病区,无法进行该操作。')
+  }
 }
 
 </script>
@@ -142,7 +145,7 @@ const emrChannelClick = (name) => {
 <style scoped lang="scss">
 .close_but {
   position: absolute;
-  top: 10px;
-  right: 5px;
+  top: 0.13rem;
+  right: 0.07rem;
 }
 </style>

+ 4 - 2
src/components/zhu-yuan-yi-sheng/hui-zhen-shen-qing/TianJiaHuiZhenShenQing.vue

@@ -1,6 +1,9 @@
 <template>
   <div style="width: 500px">
-    <el-form ref="huiZhenShenQingForm" :model="huiZhenShenQing" :rules="huiZhenShenQingRules" label-width="100px">
+    <el-form ref="huiZhenShenQingForm"
+             :model="huiZhenShenQing"
+             :rules="huiZhenShenQingRules"
+             label-width="100px">
       <el-form-item label="会诊科室:" prop="reqDept1">
         <el-select
             v-model="huiZhenShenQing.huiZhenKeShi"
@@ -304,7 +307,6 @@ onMounted(() => {
         huiZhenShenQing.value.hzZd += res[i].name + ','
       }
     }
-
   })
 
 })

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

@@ -151,7 +151,6 @@ onMounted(() => {
     })
 })
 
-
 </script>
 
 <style scoped lang="scss">

+ 0 - 7
src/layout/HeaderV2/function-list/Theme.vue

@@ -4,10 +4,7 @@
       <i class="sfont system-shezhi"></i>
     </div>
 
-
     <el-drawer v-model="drawer" title="系统设置" custom-class="herder_height">
-      <!--     这里是否需要开启黑夜模式   -->
-      <!--      <el-button @click="toggleDark(false) ">黑夜模式</el-button>-->
       <el-collapse v-model="activeNames">
         <el-collapse-item title="菜单配置" name="0">
           <el-form>
@@ -51,7 +48,6 @@
 
 <script setup name="Theme">
 import {theme} from "@/theme";
-import {useDark, useToggle} from '@vueuse/core'
 
 const tabsHook = {
   setItem: function (val) {
@@ -62,9 +58,6 @@ const tabsHook = {
   },
 }
 
-const isDark = useDark()
-const toggleDark = useToggle(isDark)
-
 
 let drawer = $ref(false)
 let activeNames = $ref(['0', '1', '2'])

+ 1 - 1
src/router/modules/dashboard.js

@@ -46,7 +46,7 @@ const route = [
             },
             {
                 path: 'huiZhenShenQing',
-                component: createNameComponent(() => import('@/views/hospitalization/zhu-yuan-yi-sheng/HuiZhenShenQing.vue')),
+                component: createNameComponent(() => import('@/views/hospitalization/zhu-yuan-yi-sheng/hui-zhen/HuiZhenShenQing.vue')),
                 meta: {
                     title: '会诊申请',
                 },

+ 3 - 1
src/tsconfig.json

@@ -3,6 +3,8 @@
     "types": [
       "vue/ref-macros"
     ],
+    "noEmit": true,
+    "allowJs": true,
     "target": "esnext",
     "useDefineForClassFields": true,
     "module": "esnext",
@@ -31,7 +33,7 @@
     "src/**/*.ts",
     "src/**/*.d.ts",
     "src/**/*.tsx",
-    "src/**/*.vue",
+    "src/**/*.vue"
   ],
   "references": [
     {

+ 1 - 2
src/utils/BizException.ts

@@ -1,4 +1,3 @@
-// @ts-ignore
 import {ElMessage, ElMessageBox} from "element-plus";
 
 export const ExceptionEnum = {
@@ -8,7 +7,7 @@ export const ExceptionEnum = {
     LOGICAL_ERROR: {code: 2001, name: '成功', turnOnHtml: false},
     LOGICAL_HTML_ERROR: {code: 2002, name: '成功', turnOnHtml: true},
 
-} as const;
+};
 
 class ExceptionCode {
     code: number;

+ 68 - 62
src/views/examination/BloodSugarQuery/BloodSugarQuery.vue

@@ -1,22 +1,22 @@
 <template>
-    <page-layer>
-        <template #header>
-            住院号:
-            <el-input style="width: 120px" v-model="patNo"/>
-            住院次数:
-            <el-input-number v-model="times" :min="0"/>
-            <el-button @click="inquire">查询</el-button>
-            <el-button @click="print">打印</el-button>
-        </template>
-        <template #main>
-            <blood-sugar-table ref="printDiv" :data="tempData" :page="page" :patient-info="patientInfo"/>
-        </template>
-    </page-layer>
+  <page-layer>
+    <template #header>
+      住院号:
+      <el-input style="width: 120px" v-model="patNo"/>
+      住院次数:
+      <el-input-number v-model="times" :min="0"/>
+      <el-button @click="inquire">查询</el-button>
+      <el-button @click="print">打印</el-button>
+    </template>
+    <template #main>
+      <blood-sugar-table ref="printDiv" :data="tempData" :page="page" :patient-info="patientInfo"/>
+    </template>
+  </page-layer>
 </template>
 
 <script setup name='BloodSugarQuery'>
 import {
-    getPatientLoodSugar,
+  getPatientLoodSugar,
 } from "@/api/blood-sugar/query";
 import {getLodop, initLodop} from "@/utils/c-lodop";
 import PageLayer from "@/layout/PageLayer.vue";
@@ -25,14 +25,20 @@ import {isDev, nullToEmpty} from "@/utils/public";
 import BloodSugarTable from "@/views/examination/BloodSugarQuery/components/BloodSugarTable.vue";
 import Dig from "@/utils/math";
 
+
+const props = defineProps({
+  patNo: String,
+  times: Number
+})
+
 let patNo = $ref('')
 let times = $ref(0)
 
 let page = $ref({
-    total: 0,
-    currentPage: 1,
-    totalPage: 1,
-    pageSize: 10,
+  total: 0,
+  currentPage: 1,
+  totalPage: 1,
+  pageSize: 10,
 })
 
 let data = $ref([])
@@ -40,37 +46,37 @@ let patientInfo = $ref()
 
 
 const queryPatientSBloodSugarInformation = () => {
-    getPatientLoodSugar(patNo, times).then((res) => {
-        page.total = res.size
-        data = res.bloodSugarData
-        patientInfo = res.patientInfo
-        page.totalPage = Math.ceil(Dig.division(data.length, page.pageSize))
-    })
+  getPatientLoodSugar(patNo, times).then((res) => {
+    page.total = res.size
+    data = res.bloodSugarData
+    patientInfo = res.patientInfo
+    page.totalPage = Math.ceil(Dig.division(data.length, page.pageSize))
+  })
 }
 
 const inquire = () => {
-    queryPatientSBloodSugarInformation()
+  queryPatientSBloodSugarInformation()
 }
 
 
 const tempData = computed(() => {
-    return data.slice((page.currentPage - 1) * page.pageSize, page.pageSize * page.currentPage);
+  return data.slice((page.currentPage - 1) * page.pageSize, page.pageSize * page.currentPage);
 })
 
 const printDiv = ref(null)
 let thead = ["空腹", "早餐后", "中餐前", "中餐后", "晚餐前", "晚餐后", "零点", "三点", "随机血糖1", "随机血糖2", "随机血糖3"]
 const htmlTd = (index, data) => {
-    return data[thead[index]]
+  return data[thead[index]]
 }
 const print = () => {
-    let trStr = ''
-    for (let i = 0, len = data.length; i < len; i++) {
-        let item = data[i]
-        let childStr = ``
+  let trStr = ''
+  for (let i = 0, len = data.length; i < len; i++) {
+    let item = data[i]
+    let childStr = ``
 
-        for (let j = 0; j < 11; j++) {
-            let childItem = htmlTd(j, item.data)
-            childStr += `
+    for (let j = 0; j < 11; j++) {
+      let childItem = htmlTd(j, item.data)
+      childStr += `
             <td>
              ${nullToEmpty(childItem?.formatTestTime)}
              <div style="border-top: 1px solid #000;width: 100%;margin-bottom: 3px"/>
@@ -80,16 +86,16 @@ const print = () => {
             ${nullToEmpty(childItem?.nurseIdName)}
             </td>
             `
-        }
+    }
 
-        trStr += `
+    trStr += `
         <tr style="padding: 7.5pt;">
             <td>${item.date}</td>
             ${childStr}
         </tr>
         `
-    }
-    let a = `
+  }
+  let a = `
 <table style="width: 100%;">
             <thead>
             <tr class="no_border">
@@ -240,50 +246,50 @@ const print = () => {
             </tfoot>
         </table>
  `
-    const LODOP = getLodop();
-    LODOP.PRINT_INIT("血糖");
-    LODOP.SET_PRINT_PAGESIZE(2, '210mm', '297mm', '')
+  const LODOP = getLodop();
+  LODOP.PRINT_INIT("血糖");
+  LODOP.SET_PRINT_PAGESIZE(2, '210mm', '297mm', '')
 
-    LODOP.SET_PRINT_MODE('RESELECT_PRINTER', true)
-    LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Full-Width')
-    LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1)
+  LODOP.SET_PRINT_MODE('RESELECT_PRINTER', true)
+  LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Full-Width')
+  LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1)
 
-    const strStyle = "<style>.no_border th{border:0;}td{border:0.75pt solid #000;text-align:center;padding:0;}thead th{border:0.75pt solid #000;}tbody th{border:0.75pt solid #000;text-align:center;}table,tr,td{border-collapse:collapse;}</style>";
-    LODOP.ADD_PRINT_TABLE('2mm', '5mm', '100%', '100%', strStyle + a);
-    LODOP.PREVIEW();
+  const strStyle = "<style>.no_border th{border:0;}td{border:0.75pt solid #000;text-align:center;padding:0;}thead th{border:0.75pt solid #000;}tbody th{border:0.75pt solid #000;text-align:center;}table,tr,td{border-collapse:collapse;}</style>";
+  LODOP.ADD_PRINT_TABLE('2mm', '5mm', '100%', '100%', strStyle + a);
+  LODOP.PREVIEW();
 }
 
 
 onMounted(() => {
-    initLodop()
-    if (isDev) {
-        patNo = '0397171'
-        times = 7
-        queryPatientSBloodSugarInformation()
-    }
+  initLodop()
+  if (props.patNo) {
+    patNo = props.patNo;
+    times = props.times
+    queryPatientSBloodSugarInformation()
+  }
 })
 
 
 onActivated(() => {
-    let data = router.currentRoute.value.params
-    if (data.patNo) {
-        patNo = data.patNo;
-        times = parseInt(data.times)
-        queryPatientSBloodSugarInformation()
-    }
+  let data = router.currentRoute.value.params
+  if (data.patNo) {
+    patNo = data.patNo;
+    times = parseInt(data.times)
+    queryPatientSBloodSugarInformation()
+  }
 })
 
 </script>
 
 <style scoped lang="scss">
 td {
-  border: 1px solid #000;
+  border: 0.01rem solid #000;
   text-align: center;
-  padding: 10px 0;
+  padding: 0.13rem 0;
 }
 
 .tr th {
-  border: 1px solid #000;
+  border: 0.01rem solid #000;
   text-align: center;
 }
 

+ 53 - 55
src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue

@@ -1,31 +1,30 @@
 <template>
-    <emr-control-rule/>
-    <div style="color:#000;height: 100%;width: 100%;min-width: 1200px">
-        <div ref="yzHeader">
-            <huan-zhe-xin-xi
-                    :huan-zhe-xin-xi="patientInfo"/>
-        </div>
-        <div class="yz__main"
-             :style="{height:`calc(100vh - ${yzHeaderHeight}px)`}">
-            <!--            v-if="!returnToTheConsultation"-->
-            <div style="width: 158px" v-if="!returnToTheConsultation">
-                <patient-list :height="windowSize.h  - (yzHeaderHeight  - 30 )  "/>
-            </div>
-            <div>
-                <yz-tag :patient-info="patientInfo"/>
-                <el-scrollbar
-                        :style="{width: 'calc(100vw - 160px)',
+  <emr-control-rule/>
+  <div style="color:#000;height: 100%;width: 100%;min-width: 1200px">
+    <div ref="yzHeader">
+      <huan-zhe-xin-xi
+          :huan-zhe-xin-xi="patientInfo"/>
+    </div>
+    <div class="yz__main"
+         :style="{height:`calc(100vh - ${yzHeaderHeight}px)`}">
+      <div style="width: 158px" v-if="!returnToTheConsultation">
+        <patient-list :height="windowSize.h  - (yzHeaderHeight  - 30 )  "/>
+      </div>
+      <div>
+        <yz-tag :patient-info="patientInfo"/>
+        <el-scrollbar
+            :style="{width: 'calc(100vw - 160px)',
                                  height:`calc(100vh - (${yzHeaderHeight}px + 27px))`
                                 }">
-                    <router-view v-slot="{ Component }">
-                        <keep-alive>
-                            <component :is="Component"/>
-                        </keep-alive>
-                    </router-view>
-                </el-scrollbar>
-            </div>
-        </div>
+          <router-view v-slot="{ Component }">
+            <keep-alive>
+              <component :is="Component"/>
+            </keep-alive>
+          </router-view>
+        </el-scrollbar>
+      </div>
     </div>
+  </div>
 </template>
 
 <script name="Home" setup>
@@ -33,9 +32,9 @@ import store from '@/store'
 import {computed, ref} from "vue";
 import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
 import {
-    huanZheXinXi as patientInfo,
-    jcTree,
-    jyTree, yzHeaderSize,
+  huanZheXinXi as patientInfo,
+  jcTree,
+  jyTree, yzHeaderSize,
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import PatientList from "@/components/zhu-yuan-yi-sheng/public/PatientList";
 import {getJyJcZdTree} from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
@@ -49,7 +48,7 @@ import {uuid} from "@/utils/getUuid";
 
 
 const windowSize = computed(() => {
-    return store.state.app.windowSize
+  return store.state.app.windowSize
 })
 
 const yzHeader = ref(null)
@@ -57,50 +56,49 @@ const {height: yzHeaderHeight} = useElementSize(yzHeader)
 
 let keyWatch = null
 let shortcutKeyRegistration = {
-    'F2': () => {
-        router.push('/')
-    }
+  'F2': () => {
+    router.push('/')
+  }
 }
 
 onDeactivated(() => {
-    if (keyWatch != null) {
-        keyWatch()
-    }
+  if (keyWatch != null) {
+    keyWatch()
+  }
 })
 
-const returnToTheConsultation = ref(true)
-
+const returnToTheConsultation = ref(false)
 
 onActivated(() => {
-    returnToTheConsultation.value = !!router.currentRoute.value.params.consultation;
-    keyWatch = watch(() => xcEvent.value, () => {
-        shortcutTrigger(xcEvent.value, shortcutKeyRegistration)
-    })
+  returnToTheConsultation.value = !!router.currentRoute.value.params.consultation;
+  keyWatch = watch(() => xcEvent.value, () => {
+    shortcutTrigger(xcEvent.value, shortcutKeyRegistration)
+  })
 })
 
 watch(() => yzHeaderHeight.value, () => {
-    yzHeaderSize.value = yzHeaderHeight.value
+  yzHeaderSize.value = yzHeaderHeight.value
 }, {immediate: true})
 
 const initSocket = () => {
-    const sid = store.getters['user/sid']
-    if (sid && sid !== 'undefined') {
-        initWebSocket(sid + uuid(8, 62))
-    } else {
-        router.push('/login')
-    }
+  const sid = store.getters['user/sid']
+  if (sid && sid !== 'undefined') {
+    initWebSocket(sid + uuid(8, 62))
+  } else {
+    router.push('/login')
+  }
 }
 
 
 onMounted(async () => {
-    if (store.getters['user/token']) {
-        initSocket()
-    }
-    await nextTick()
-    getJyJcZdTree().then((res) => {
-        jyTree.value = res.jy
-        jcTree.value = res.jc
-    })
+  if (store.getters['user/token']) {
+    initSocket()
+  }
+  await nextTick()
+  getJyJcZdTree().then((res) => {
+    jyTree.value = res.jy
+    jcTree.value = res.jc
+  })
 })
 
 </script>

+ 49 - 50
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr_control_rule/EmrControlRule.vue

@@ -1,80 +1,79 @@
 <template>
-    <page-layer>
-        <template #header>
-            入院区间:
-            <el-date-picker
-                    :shortcuts="shortcuts"
-                    style="width: 220px"
-                    type="daterange"
-                    v-model="intervalPatients"/>
-            <el-button type="primary" @click="queryQualityControlData">查询质控数据</el-button>
+  <page-layer>
+    <template #header>
+      质控区间:
+      <el-date-picker
+          :shortcuts="shortcuts"
+          style="width: 220px"
+          type="daterange"
+          v-model="intervalPatients"/>
+      <el-button type="primary" @click="queryQualityControlData">查询质控数据</el-button>
+    </template>
+
+    <template #main>
+      <el-tabs v-model="tabsModel">
+        <el-tab-pane label="质控数量" name="质控数量">
+          <rule-total/>
+        </el-tab-pane>
+
+        <el-tab-pane label="详情" name="详情">
+          <rule-sift :data="ruleReturnData.details"/>
+        </el-tab-pane>
+
+        <template v-for="(val, key) in siftData">
+          <el-tab-pane :label="key" :name="key">
+            <rule-sift :data="val"/>
+          </el-tab-pane>
         </template>
-
-        <template #main>
-            <el-tabs v-model="tabsModel">
-                <el-tab-pane label="质控数量" name="质控数量">
-                    <rule-total/>
-                </el-tab-pane>
-
-                <el-tab-pane label="详情" name="详情">
-                    <rule-sift :data="ruleReturnData.details"/>
-                </el-tab-pane>
-
-                <template v-for="(val, key) in siftData">
-                    <el-tab-pane :label="key" :name="key">
-                        <rule-sift :data="val"/>
-                    </el-tab-pane>
-                </template>
-            </el-tabs>
-        </template>
-    </page-layer>
+      </el-tabs>
+    </template>
+  </page-layer>
 
 </template>
 
 <script setup name='EmrControlRule'>
 import {onMounted} from "vue";
 import {
-    specifyAdmissionQualityControl
+  specifyAdmissionQualityControl
 } from '@/api/zhu-yuan-yi-sheng/emr-control-rule'
 import {getDateRangeFormatDate} from "@/utils/date";
 import PageLayer from "@/layout/PageLayer.vue";
 import {shortcuts} from "@/data/shortcuts";
 import RuleTotal
-    from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr_control_rule/RuleTotal.vue";
+  from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr_control_rule/RuleTotal.vue";
 import {
-    numberToArray,
-    ruleReturnData, siftData, tabsModel
+  numberToArray,
+  ruleReturnData, siftData, tabsModel
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr_control_rule/rule-store";
 import RuleSift
-    from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr_control_rule/RuleSift.vue";
+  from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr_control_rule/RuleSift.vue";
 
 const intervalPatients = ref([])
 const dialog = ref(false)
 
 const queryQualityControlData = () => {
-    let {startTime, endTime} = getDateRangeFormatDate(intervalPatients.value)
-
-    specifyAdmissionQualityControl(startTime, endTime).then(res => {
-        siftData.value = {}
-        ruleReturnData.value = res
-        numberToArrayFunc()
-        console.log(res)
-        dialog.value = false
-    })
+  let {startTime, endTime} = getDateRangeFormatDate(intervalPatients.value)
+
+  specifyAdmissionQualityControl(startTime, endTime).then(res => {
+    siftData.value = {}
+    ruleReturnData.value = res
+    numberToArrayFunc()
+    dialog.value = false
+  })
 }
 
 const numberToArrayFunc = () => {
-    numberToArray.value = []
-    for (let key in ruleReturnData.value.numberOfQuestions) {
-        numberToArray.value.push({
-            name: key,
-            total: ruleReturnData.value.numberOfQuestions[key]
-        })
-    }
+  numberToArray.value = []
+  for (let key in ruleReturnData.value.numberOfQuestions) {
+    numberToArray.value.push({
+      name: key,
+      total: ruleReturnData.value.numberOfQuestions[key]
+    })
+  }
 }
 
 onMounted(() => {
-    intervalPatients.value = shortcuts[2].value
+  intervalPatients.value = shortcuts[2].value
 })
 
 </script>

+ 0 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/HuiZhenShenQing.vue → src/views/hospitalization/zhu-yuan-yi-sheng/hui-zhen/HuiZhenShenQing.vue


+ 107 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/hui-zhen/components/HuiZhenAside.vue

@@ -0,0 +1,107 @@
+<script setup>
+import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
+import {
+  huanZheXinXi,
+  yzHeaderSize
+} from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
+import {getWindowSize} from "@/utils/window-size";
+import {getHuanZheXinXi} from "@/api/case-front-sheet/jie-shou-hui-zhen";
+import {
+  consultationSheets,
+  huiZhenList,
+  hzMitt,
+  hzMittEnum,
+  hzTypeName
+} from "@/views/hospitalization/zhu-yuan-yi-sheng/hui-zhen/hui-zhen";
+import {shanChuHuiZhenShenQing} from "@/api/case-front-sheet";
+
+
+const chaKanHuiZhenDan = (val) => {
+  getHuanZheXinXi(val.admissTimes, val.reqTimes, val.inpatientNo).then((res) => {
+    consultationSheets.value = res
+    console.log(res)
+  })
+}
+
+
+const shanChuHuiZhenShenQingClick = (index, val) => {
+  shanChuHuiZhenShenQing(val.inpatientNo, val.admissTimes, val.actOrderNo, val.reqTimes).then((res) => {
+    huiZhenList.value.splice(index, 1)
+  })
+}
+
+let watchPat = null
+
+const startListening = () => {
+  watchPat = watch(() => huanZheXinXi.value, () => {
+    hzMitt.emit(hzMittEnum.queryHz)
+  }, {immediate: true})
+}
+
+const closeListening = () => {
+  watchPat()
+}
+
+onDeactivated(() => {
+  closeListening()
+})
+
+onActivated(() => {
+  startListening()
+})
+
+
+</script>
+
+<template>
+  <div style="width: 400px">
+    <xc-table :final-height="getWindowSize.h  - yzHeaderSize"
+              :local-data="huiZhenList"
+              @rowClick="chaKanHuiZhenDan"
+              layout='total, prev,  next'>
+      <el-table-column label="申请时间" prop="inputDate" width="70">
+        <template #default="scope">
+          {{ scope.row.inputDate + '_' + scope.row.reqTimes }}
+        </template>
+      </el-table-column>
+      <el-table-column label="科室" prop="deptName"></el-table-column>
+      <el-table-column label="接受日期" prop="hzDate" show-overflow-tooltip></el-table-column>
+      <el-table-column label="接受医生" prop="hzDoctor2Name"></el-table-column>
+      <el-table-column label="申请人" prop="inputName" width="60"></el-table-column>
+      <el-table-column label="申请科室" prop="reqDeptName"></el-table-column>
+      <el-table-column label="类别" prop="hzLevelName"></el-table-column>
+      <el-table-column label="医生" prop="hzDoctor1Name"></el-table-column>
+      <el-table-column label="级别" prop="hzType">
+        <template #default="scope">
+          <span>{{ hzTypeName(scope.row.hzType) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="接受意见" prop="hzComment" show-overflow-tooltip></el-table-column>
+      <el-table-column fixed="left" label="操作" width="50">
+        <template #default="scope">
+          <el-popconfirm
+              cancel-button-text="取消"
+              confirm-button-text="确定"
+              icon="InfoFilled"
+              icon-color="red"
+              title="确定要删除吗?"
+              @confirm="shanChuHuiZhenShenQingClick(scope.$index, scope.row)"
+          >
+            <template #reference>
+              <el-button :disabled="scope.row.statusFlag == 2"
+                         title="删除"
+                         circle
+                         @click.stop.prevent
+                         icon="Delete"
+                         type="danger"/>
+            </template>
+          </el-popconfirm>
+        </template>
+      </el-table-column>
+    </xc-table>
+  </div>
+</template>
+
+<style scoped lang="scss">
+
+</style>

+ 231 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/hui-zhen/components/HuiZhenMain.vue

@@ -0,0 +1,231 @@
+<script setup lang="jsx">
+import {getWindowSize} from "@/utils/window-size";
+import {yzHeaderSize} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import {consultationSheets, huiZhenTypeList} from "@/views/hospitalization/zhu-yuan-yi-sheng/hui-zhen/hui-zhen";
+import {ElTag} from 'element-plus'
+import {queryDept} from "@/api/public-api";
+import XcComboGrid from "@/components/xiao-chan/combo-grid/XcComboGrid.vue";
+import {gethuiZhenLeiBie, huiZhenYiSheng} from "@/api/case-front-sheet";
+import PrintTheConsultationForm from "@/components/hui-zhen-da-ying/PrintTheConsultationForm.vue";
+
+const maxMain = computed(() => {
+  return (getWindowSize.h - yzHeaderSize) + 36
+})
+
+//会诊申请的字段
+const huiZhenShenQing = ref({
+  inpatientNo: '', //住院号
+  admissTimes: '', //住院次数
+  reqTimes: '', //请求时间
+  reqComment: '', //请求简介
+  inputId: '', //输入人的id
+  inputDate: '', //输入的时间
+  reqDate: '', //请求的时间 和 上面那个一样
+  deptCode: '', //科室 code
+  wardCode: '', //病房 code 和上面的一样
+  reqDept1: '', //请求的 科室
+  reqDeptName: '', //请求科室的名字
+  statusFlag: '', // 状态标志 1 未读 2 已读
+  hzType: '', // 会诊的级别
+  hzLevel: '', // 会诊的类别
+  hzZd: '', //目前的主要诊断
+  hzMd: '', //会诊的目的
+  actOrderNo: '', //新开的医嘱号
+  hzDoctor1: '', //会诊的医生
+  name: '', // 申请人
+  emergencyFlag: null, // 医嘱紧急
+  ybSelfFlag: null, // 自费
+  huiZhenKeShi: {},
+})
+
+// 科室
+const deptList = ref([])
+
+const huiZhenYiShengList = ref([])
+//会诊类别集合
+const huiZhenLeiBieList = ref()
+
+let popUpPrompt = false
+//会诊医生判断 , 要会诊医生在这个科室的 才可以
+const huiZhenYiShengPanDuan = (val) => {
+  popUpPrompt = false
+  try {
+    val = JSON.parse(val)
+  } catch (e) {
+
+  }
+  if (val.dept) {
+    huiZhenShenQing.value.reqDeptName = val.name
+    huiZhenShenQing.value.reqDept1 = val.code
+  }
+  huiZhenShenQing.value.hzDoctor1 = null
+  if (huiZhenShenQing.value.reqDept1 && huiZhenShenQing.value.hzType) {
+    huiZhenYiSheng(huiZhenShenQing.value.reqDept1, huiZhenShenQing.value.hzType).then((res) => {
+      huiZhenYiShengList.value = res
+    })
+  } else {
+    huiZhenYiShengList.value = []
+  }
+}
+
+const printTheData = () => {
+  let ad = h(PrintTheConsultationForm, {
+    laiYuan: 2
+  })
+}
+
+onMounted(() => {
+  gethuiZhenLeiBie().then((res) => {
+    huiZhenLeiBieList.value = res
+  })
+})
+
+</script>
+
+<template>
+
+  <div class="hz_main"
+       :style="{height:  maxMain+ 'px' }">
+    <div class="hz_header">
+      住院号:{{ consultationSheets.inpatientNo }}&nbsp;
+      次数: {{ consultationSheets.admissTimes }}&nbsp;
+      会诊次数: {{ consultationSheets.reqTimes }}&nbsp;
+      会诊日期:{{ consultationSheets.reqDate }}&nbsp;
+      <el-tag
+          effect="dark"
+          type="info" v-if="consultationSheets.statusFlag==1">
+        申请
+      </el-tag>
+      <el-tag
+          effect="dark"
+          type="success"
+          v-else-if="consultationSheets.statusFlag==2">
+        完成
+      </el-tag>
+      <el-button style="margin-left: 2rem" type="primary" @click="printTheData">打印</el-button>
+    </div>
+
+    <div style="flex: 1;">
+      <el-row>
+        <el-col :span="8">
+          会诊科室:
+          <xc-combo-grid
+              v-model="huiZhenShenQing.huiZhenKeShi"
+              :query-data-func="queryDept"/>
+        </el-col>
+        <el-col :span="8">
+          会诊级别:
+          <el-select v-model="huiZhenShenQing.hzType"
+                     clearable
+                     placeholder="请选择"
+                     @change="huiZhenYiShengPanDuan">
+            <el-option v-for="item in huiZhenTypeList"
+                       :key="item.code" :label="item.name"
+                       :value="item.code">
+              <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
+              <el-divider direction="vertical"></el-divider>
+              <span>{{ item.name }}</span>
+            </el-option>
+          </el-select>
+        </el-col>
+        <el-col :span="8">
+          会诊类别:
+          <el-select v-model="huiZhenShenQing.hzLevel" placeholder="请选择">
+            <el-option v-for="item in huiZhenLeiBieList"
+                       :key="item.code"
+                       :label="item.name"
+                       :value="item.code"
+                       clearable>
+              <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
+              <el-divider direction="vertical"/>
+              <span>{{ item.name }}</span>
+            </el-option>
+          </el-select>
+        </el-col>
+      </el-row>
+      <el-row :gutter="3">
+        <el-col :span="8">
+          <div>
+            病情简介: <br>
+            <el-input v-model="huiZhenShenQing.reqComment"
+                      :rows="10"
+                      placeholder="请输入内容"
+                      resize="none"
+                      type="textarea"/>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div>
+            目前主要诊断: <br>
+            <el-input v-model="huiZhenShenQing.hzZd"
+                      maxlength="100"
+                      :rows="2"
+                      resize="none"
+                      placeholder="请输入内容"
+                      type="textarea"/>
+          </div>
+          <div>
+            会诊目的: <br>
+            <el-input v-model="huiZhenShenQing.hzMd"
+                      :rows="7"
+                      resize="none"
+                      placeholder="请输入内容"
+                      type="textarea"/>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          会诊结果: <br>
+          <el-input v-model="huiZhenShenQing.hzComment"
+                    :rows="10"
+                    resize="none"
+                    placeholder="请输入内容"
+                    type="textarea"/>
+        </el-col>
+      </el-row>
+      <div style="line-height: 2.3125rem">
+        自费:
+        <el-switch
+            v-model="huiZhenShenQing.ybSelfFlag"
+            :active-value="1"
+            :inactive-value="null"
+            active-color="#13ce66"
+            active-text="是"
+            inactive-color="#ff4949"
+            inactive-text="否">
+        </el-switch>
+        紧急:
+        <el-switch
+            v-model="huiZhenShenQing.emergencyFlag"
+            :active-value="1"
+            :inactive-value="null"
+            active-color="#13ce66"
+            active-text="是"
+            inactive-color="#ff4949"
+            inactive-text="否">
+        </el-switch>
+      </div>
+
+      <div>
+        <el-tag>申请人:{{ consultationSheets.reqDoctor }}</el-tag>
+        <el-tag style="margin-left: 20px">申请时间:{{ consultationSheets.reqDate }}</el-tag>
+
+        <el-button style="margin-right: 0">申请</el-button>
+      </div>
+
+    </div>
+
+  </div>
+
+</template>
+
+<style scoped lang="scss">
+.hz_main {
+  flex: 1;
+  display: flex;
+  flex-flow: column;
+}
+
+.hz_header {
+  line-height: 2rem;
+}
+</style>

+ 78 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/hui-zhen/hui-zhen.js

@@ -0,0 +1,78 @@
+import Mitt from "../../../../utils/mitt";
+import {ref} from 'vue'
+import {
+    huanZheXinXi,
+    youWuXuanZheHuanZhe
+} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import {chaKanHuiZhenShenQing} from "@/api/case-front-sheet";
+
+export const hzMitt = new Mitt();
+
+export const huiZhenList = ref([])
+
+export const hzMittEnum = {
+    // 查询会诊信息
+    queryHz: 'queryHz'
+}
+
+hzMitt.on('queryHz', () => {
+    if (youWuXuanZheHuanZhe()) return
+    chaKanHuiZhenShenQing(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes).then((res) => {
+        huiZhenList.value = res
+    })
+})
+
+export const consultationSheets = ref({
+    "inpatientNo": "0403883",
+    "admissDate": "2023-05-11 10:25:56",
+    "name": "梁建",
+    "bedNo": -6,
+    "admissTimes": 3,
+    "sex": 2,
+    "reqDate": "2023-05-18 11:02:13",
+    "reqDept1": "1190000",
+    "reqDept1Name": "中医科",
+    "reqDept2": null,
+    "reqTimes": 1,
+    "birthDate": "1969-08-29 00:00:00",
+    "statusFlag": 1,
+    "deptCodeName": "七病室",
+    "reqDoctor": "刘子琨",
+    "hzType": "2",
+    "hzDoctor2": "02606",
+    "hzLevel": "01",
+    "hzLevelName": "常规会诊",
+    "hzDoctor2Name": "赵克刚",
+    "hzDeptName": null,
+    "age": 53,
+    "reqComment": "患者中年女性,因“发热1天”入院。现患者无明显发热等,但感咳痰增多,请贵科行中医治疗。",
+    "hzZd": "新冠肺炎 肾小球肾炎 慢性肾功能不全",
+    "hzMd": "协诊。",
+    "hzComment": "病史已拜阅,诊查病友,中医治疗。患者咳嗽痰稠,口干口苦,大便黄,舌淡红,苔薄白,脉细。证属痰湿郁肺,肾气不固,治以祛湿化痰,补益肾气。方药:桑叶十二克,金银花十五克,连翘十克,桔梗十克,鱼腥草十五克,浙贝母十五克,法半夏十克,陈皮六克,地黄十五克,泽泻十克,牡丹皮十克,茯苓十五克,菟丝子十五克,山药三十克,黄芪十五克,甘草六克。七付代煎。谢邀!",
+    "hzDate": "2023-05-18 11:39:32",
+    "currentPage": 0,
+    "pageSize": 0,
+    "startTime": null,
+    "endTime": null,
+    "deptCode": null,
+    "hzDoctor": null,
+    "inputName": null,
+    "actOrderNo": 17592321
+})
+
+export const huiZhenTypeList = [
+    {code: '1', name: '主治医师'},
+    {code: '2', name: '副主任医生'},
+    {code: '3', name: '主任医生'},
+]
+
+export function hzTypeName(val) {
+    switch (val) {
+        case '1':
+            return '主治医师'
+        case '2':
+            return '副主任医生'
+        case '3':
+            return '主任医生'
+    }
+}

+ 1 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.js

@@ -9,6 +9,7 @@ import {getFormatDatetime} from "@/utils/date";
 import {isDev} from "@/utils/public";
 import {getFrequency, getSupplyType} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
 import EventBus from "@/utils/mitt";
+import {hzMitt, hzMittEnum} from "@/views/hospitalization/zhu-yuan-yi-sheng/hui-zhen/hui-zhen";
 
 // 患者信息
 export const huanZheXinXi = ref({})
@@ -297,8 +298,6 @@ export const clickOnThePatient = async (patNo) => {
     switchPatients()
     huanZheXinXi.value = await getPatientInfo(patNo)
     clearAssociate()
-
-
 }
 
 const switchPatients = () => {