浏览代码

分诊部分

lighter 3 年之前
父节点
当前提交
92958a79e1

+ 7 - 0
src/api/triage/triage.js

@@ -62,6 +62,13 @@ export function getTriagedPatients() {
   })
 }
 
+export function getTreatedPatients() {
+  return request({
+    url: '/triage/getTreatedPatients',
+    method: 'get',
+  })
+}
+
 export function cancelTriage(serialNo) {
   return request({
     url: '/triage/cancelTriage',

二进制
src/assets/thyylogo.png


+ 1 - 0
src/layout/Menu/MenuItem.vue

@@ -65,6 +65,7 @@ export default defineComponent({
       }
       return type
     })
+
     // TODO: 优化多层if
     const pathResolve = computed(() => {
       let path = ''

+ 10 - 6
src/router/modules/dashboard.js

@@ -313,7 +313,6 @@ const route = [
       },
     ],
   },
-
   {
     path: '/inpatient',
     component: Layout,
@@ -481,6 +480,11 @@ const route = [
         component: createNameComponent(() => import('@/views/clinic/triage/Triaged.vue')),
         meta: { title: '已分诊', icon: 'iconfont icon-yifenzhen' },
       },
+      {
+        path: 'triage/treated',
+        component: createNameComponent(() => import('@/views/clinic/triage/Treated.vue')),
+        meta: { title: '已接诊', icon: 'iconfont icon-daping' },
+      },
       {
         path: 'triage/allTriages',
         component: createNameComponent(() => import('@/views/clinic/triage/AllTriages.vue')),
@@ -506,13 +510,13 @@ const route = [
         component: createNameComponent(() => import('@/views/clinic/triage/DisplaySettings.vue')),
         meta: { title: '显示管理', icon: 'iconfont icon-xianshishezhi' },
       },
-      {
-        path: 'triage/triageFloorScreen',
-        component: createNameComponent(() => import('@/views/clinic/triage/FloorScreen.vue')),
-        meta: { title: '分诊大屏', icon: 'iconfont icon-daping' },
-      },
     ],
   },
+  {
+    path: '/outpatient/triage/triageFloorScreen',
+    component: createNameComponent(() => import('@/views/clinic/triage/FloorScreen.vue')),
+    meta: { title: '分诊大屏', icon: 'iconfont icon-daping', hideTabs: true },
+  },
   {
     path: '/settings',
     component: Layout,

+ 2 - 2
src/utils/websocket.js

@@ -24,9 +24,9 @@ export function setCallback(callback) {
   }
 }
 
-export function initWebSocket(sid) {
+export function initWebSocket(sid, force) {
   if ('WebSocket' in window) {
-    if (webSocket === null) {
+    if (webSocket === null || force) {
       const url = socketUrl + sid
       webSocket = new WebSocket(url)
     }

+ 11 - 20
src/views/clinic/triage/FloorScreen.vue

@@ -39,29 +39,19 @@
               <el-col :span="6">
                 <el-card>
                   <div class="small-notify center-text">
-                    <el-tag effect="dark" style="height: 42px; line-height: 42px" type="danger"> {{
-                        room.deptName
-                      }}
-                    </el-tag>
+                    <el-tag effect="dark" style="height: 42px; line-height: 42px" type="danger"> {{ room.deptName }} </el-tag>
                     <el-divider></el-divider>
-                    <el-tag effect="dark" style="height: 42px; line-height: 42px" type="danger"> 诊室{{
-                        room.roomNo
-                      }}
-                    </el-tag>
+                    <el-tag effect="dark" style="height: 42px; line-height: 42px" type="danger"> 诊室{{ room.roomNo }} </el-tag>
                   </div>
                 </el-card>
               </el-col>
-              <el-col v-for="(p, index) in room.patients.slice((room.page - 1) * 3, room.page * 3)" :key="index"
-                      :span="6">
+              <el-col v-for="(p, index) in room.patients.slice((room.page - 1) * 3, room.page * 3)" :key="index" :span="6">
                 <el-card>
                   <div class="small-notify center-text">
                     <el-tag effect="dark" style="height: 42px; line-height: 42px" type="success">{{ p.fzNo }}号</el-tag>
                     <el-tag effect="dark" style="height: 42px; line-height: 42px">{{ p.name }}</el-tag>
                     <el-divider></el-divider>
-                    <el-tag effect="dark" style="height: 42px; line-height: 42px" type="danger"> 医师:{{
-                        room.doctorName
-                      }}
-                    </el-tag>
+                    <el-tag effect="dark" style="height: 42px; line-height: 42px" type="danger"> 医师:{{ room.doctorName }} </el-tag>
                   </div>
                 </el-card>
               </el-col>
@@ -76,10 +66,10 @@
 
 <script>
 import store from '@/store'
-import {onMounted, onUnmounted, reactive, ref} from 'vue'
-import {initWebSocket, setCallback} from '@/utils/websocket'
+import { onMounted, onUnmounted, reactive, ref } from 'vue'
+import { initWebSocket, setCallback } from '@/utils/websocket'
 import MyClock from '@/components/MyClock.vue'
-import {getBigScreenData, notifyComplete} from '@/api/triage/triage'
+import { getBigScreenData, notifyComplete } from '@/api/triage/triage'
 
 export default {
   components: {
@@ -158,7 +148,8 @@ export default {
     }
     const socketCallback = (data) => {
       if (data.action === 1) {
-        audio.src = 'http://172.16.32.160:8888/voices/' + data.serialNo + '.mp3' // 生产
+        // audio.src = 'http://172.16.32.160:8888/voices/' + data.serialNo + '.mp3' // 生产
+        audio.src = 'http://172.16.30.26:8888/voices/' + data.serialNo + '.mp3' // 测试
         playCount.value = 0
         audioPlay()
         notifyMsg.value = data
@@ -173,8 +164,8 @@ export default {
     }
 
     onMounted(() => {
-      const sid = store.getters['user/sid'] + '-triageFloorScreen'
-      initWebSocket(sid)
+      const sid = store.state.user.sid + '-triageFloorScreen'
+      initWebSocket(sid, true)
       setCallback(socketCallback)
       fetchScreenData(true)
     })

+ 229 - 0
src/views/clinic/triage/Treated.vue

@@ -0,0 +1,229 @@
+<template>
+  <el-container>
+    <el-main>
+      <div style="height: 10px"></div>
+      <div style="width: 320px; margin-bottom: 8px">
+        <el-input v-model="searchContent" size="small" clearable placeholder="请输入患者姓名 / ID号">
+          <template #prepend>检索患者</template>
+        </el-input>
+      </div>
+      <el-table :data="cptPatients.slice((currentPage - 1) * pageSize, currentPage * pageSize)" stripe highlight-current-row :height="tableHeight">
+        <el-table-column fixed prop="fzNo" label="分诊号" sortable></el-table-column>
+        <el-table-column fixed prop="name" label="姓名"></el-table-column>
+        <el-table-column prop="patientId" label="id号"></el-table-column>
+        <el-table-column prop="deptName" label="科室"></el-table-column>
+        <el-table-column prop="roomName" label="诊室"></el-table-column>
+        <el-table-column prop="doctorName" label="医生"></el-table-column>
+        <el-table-column prop="serialNo" label="流水号" sortable></el-table-column>
+        <el-table-column label="状态">
+          <template #default="scope">
+            {{ statusFlagFilter(scope.row.statusFlag) }}
+          </template>
+        </el-table-column>
+        <el-table-column fixed="right" label="操作">
+          <template #default="scope">
+            <el-button type="primary" @click="getDepts(scope.row)">复诊</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-sizes="[15, 30, 45, 70, 100]"
+        :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="patients.length"
+        style="margin-top: 5px"
+      ></el-pagination>
+
+      <el-dialog v-model="showTriageDialog" title="选择诊室" width="50%">
+        <div style="background-color: lightblue; padding: 4px 8px; margin-top: -16px; border-radius: 4px; color: red">
+          <div class="dialog-head">
+            <div style="width: 20%">病人Id:{{ currentPatient.patientId }}</div>
+            <div style="width: 20%">姓名:{{ currentPatient.name }}</div>
+            <div style="width: 40%">挂号时间:{{ currentPatient.visitDate }}</div>
+            <div style="width: 20%">诊查费:{{ currentPatient.clinicFee }}</div>
+          </div>
+          <div class="dialog-head">
+            <div style="width: 20%">科室:{{ currentPatient.deptName }}</div>
+            <div style="width: 20%">医生:{{ currentPatient.doctorName }}</div>
+            <div style="width: 40%">号别:{{ currentPatient.reqName }}</div>
+            <div style="width: 20%">挂号费:{{ currentPatient.ghFee }}</div>
+          </div>
+        </div>
+        <div style="display: flex">
+          <div style="width: 25%">
+            <el-table ref="chosenDeptsTable" :data="chosenDepts" stripe highlight-current-row height="350" @row-click="fetchRooms">
+              <el-table-column type="index" label="序号"></el-table-column>
+              <el-table-column prop="name" label="科室"></el-table-column>
+            </el-table>
+          </div>
+          <div style="width: 75%">
+            <el-table ref="roomTable" :data="rooms" height="350" stripe highlight-current-row>
+              <el-table-column fixed label="操作">
+                <template #default="scope">
+                  <el-button type="primary" @click="executeTriage(scope.row)">分诊</el-button>
+                </template>
+              </el-table-column>
+              <el-table-column prop="roomNo" label="诊室号"></el-table-column>
+              <el-table-column prop="roomName" label="诊室名称"></el-table-column>
+              <el-table-column prop="doctorName" label="医生"></el-table-column>
+              <el-table-column prop="reqName" label="号别"></el-table-column>
+            </el-table>
+          </div>
+        </div>
+      </el-dialog>
+    </el-main>
+  </el-container>
+</template>
+
+<script>
+import { ref } from 'vue'
+import { watch } from '@vue/runtime-core'
+import store from '@/store'
+import { fenZhen, getTreatedPatients, getChosenDept, getRooms } from '@/api/triage/triage'
+import { onActivated } from 'vue'
+import { ElMessage } from 'element-plus'
+export default {
+  setup() {
+    const windowSize = store.state.app.windowSize
+    const tableHeight = windowSize.h - 100
+    const patients = ref([])
+    const searchContent = ref('')
+
+    const pageSize = ref(30)
+    const currentPage = ref(1)
+    const handleSizeChange = (val) => {
+      pageSize.value = val
+    }
+    const handleCurrentChange = (val) => {
+      currentPage.value = val
+    }
+
+    const fetchTreatedPatients = () => {
+      getTreatedPatients().then((res) => {
+        patients.value = res
+      })
+    }
+
+    const cptPatients = computed(() => {
+      if (!searchContent.value) {
+        return patients.value
+      }
+      return patients.value.filter((item) => {
+        return item.patientId.indexOf(searchContent.value) !== -1 || item.name.indexOf(searchContent.value) !== -1
+      })
+    })
+
+    watch(
+      () => cptPatients.value,
+      () => {
+        currentPage.value = 1
+      }
+    )
+
+    const showTriageDialog = ref(false)
+    const chosenDeptsTable = ref(null)
+    const roomTable = ref(null)
+    const currentPatient = ref({})
+    const chosenDepts = ref([])
+    const rooms = ref([])
+    const getDepts = (row) => {
+      currentPatient.value = row
+      getChosenDept().then((res) => {
+        chosenDepts.value = res
+        showTriageDialog.value = true
+        res.forEach((item) => {
+          if (item.code === row.deptCode.trim()) {
+            setTimeout(() => {
+              chosenDeptsTable.value.setCurrentRow(item)
+              fetchRooms(item)
+            }, 100)
+          }
+        })
+      })
+    }
+    const fetchRooms = (row) => {
+      getRooms(row.code).then((res) => {
+        rooms.value = res
+        res.forEach((item) => {
+          if (item.doctorCode.trim() === currentPatient.value.doctorCode.trim()) {
+            setTimeout(() => {
+              roomTable.value.setCurrentRow(item)
+            }, 100)
+          }
+        })
+      })
+    }
+    const executeTriage = (row) => {
+      row.serialNo = currentPatient.value.serialNo
+      row.fuzhenFlag = 1
+      fenZhen(row).then((res) => {
+        showTriageDialog.value = false
+        ElMessage({
+          message: res,
+          type: 'success',
+          duration: 2000,
+          showClose: true,
+        })
+      })
+    }
+
+    onActivated(() => {
+      fetchTreatedPatients()
+    })
+
+    return {
+      tableHeight,
+      statusFlagFilter,
+      roomStatusFilter,
+      patients,
+      searchContent,
+      cptPatients,
+      pageSize,
+      currentPage,
+      handleSizeChange,
+      handleCurrentChange,
+      getChosenDept,
+      getDepts,
+      showTriageDialog,
+      currentPatient,
+      chosenDeptsTable,
+      chosenDepts,
+      rooms,
+      fetchRooms,
+      executeTriage,
+      roomTable,
+    }
+  },
+}
+
+function statusFlagFilter(val) {
+  switch (val) {
+    case '0':
+      return '初值'
+    case '1':
+      return '报到'
+    case '2':
+      return '可通知'
+    case '3':
+      return '已通知'
+    case '4':
+      return '检查'
+    case '9':
+      return '就诊'
+  }
+}
+function roomStatusFilter(val) {
+  return val === 0 ? '在线' : '离线'
+}
+</script>
+
+<style scoped>
+.dialog-head {
+  display: flex;
+  height: 26px;
+  line-height: 26px;
+}
+</style>

+ 22 - 41
src/views/clinic/triage/Untriaged.vue

@@ -16,9 +16,9 @@
         </el-table-column>
         <el-table-column fixed="right" label="操作" width="250">
           <template #default="scope">
-            <el-button type="primary" @click="fuZhen(scope.row)">复诊</el-button>
+            <el-button type="warning" @click="getDepts(scope.row, 1)">复诊</el-button>
             <el-button type="primary" @click="getMzVitalSigns(scope.row)">生命体征</el-button>
-            <el-button type="primary" @click="getDepts(scope.row)">分诊</el-button>
+            <el-button type="success" @click="getDepts(scope.row, 0)">分诊</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -90,21 +90,21 @@
         <el-button type="primary" size="small" :loading="drawSaving" @click="saveVitals" style="width: 200px; margin-left: 120px; margin-top: 20px"> 保存 </el-button>
       </el-drawer>
 
-      <el-dialog v-model="showTriageDialog" title="选择诊室" width="70%">
-        <el-divider></el-divider>
-        <div class="dialog-head">
-          <div>病人Id:{{ currentPatient.patientId }}</div>
-          <div>姓名:{{ currentPatient.name }}</div>
-          <div>挂号时间:{{ currentPatient.visitDate }}</div>
-          <div>诊查费:{{ currentPatient.clinicFee }}</div>
-        </div>
-        <div class="dialog-head">
-          <div>科室:{{ currentPatient.deptName }}</div>
-          <div>医生:{{ currentPatient.doctorName }}</div>
-          <div>号别:{{ currentPatient.reqName }}</div>
-          <div>挂号费:{{ currentPatient.ghFee }}</div>
+      <el-dialog v-model="showTriageDialog" title="选择诊室" width="50%">
+        <div style="background-color: lightblue; padding: 4px 8px; margin-top: -16px; border-radius: 4px; color: red">
+          <div class="dialog-head">
+            <div style="width: 20%">病人Id:{{ currentPatient.patientId }}</div>
+            <div style="width: 20%">姓名:{{ currentPatient.name }}</div>
+            <div style="width: 40%">挂号时间:{{ currentPatient.visitDate }}</div>
+            <div style="width: 20%">诊查费:{{ currentPatient.clinicFee }}</div>
+          </div>
+          <div class="dialog-head">
+            <div style="width: 20%">科室:{{ currentPatient.deptName }}</div>
+            <div style="width: 20%">医生:{{ currentPatient.doctorName }}</div>
+            <div style="width: 40%">号别:{{ currentPatient.reqName }}</div>
+            <div style="width: 20%">挂号费:{{ currentPatient.ghFee }}</div>
+          </div>
         </div>
-        <el-divider></el-divider>
         <div style="display: flex">
           <div style="width: 25%">
             <el-table ref="chosenDeptsTable" :data="chosenDepts" stripe highlight-current-row height="350" @row-click="fetchRooms">
@@ -135,9 +135,9 @@
 <script>
 import { ref } from '@vue/reactivity'
 import store from '@/store'
-import { confirmFuZhen, fenZhen, fetchVitalSign, getChosenDept, getRooms, getUnTriagedPatient, saveMzVitalSigns } from '@/api/triage/triage'
+import { fenZhen, fetchVitalSign, getChosenDept, getRooms, getUnTriagedPatient, saveMzVitalSigns } from '@/api/triage/triage'
 import { onActivated, onDeactivated, onMounted } from 'vue'
-import { ElMessage, ElMessageBox } from 'element-plus'
+import { ElMessage } from 'element-plus'
 export default {
   setup() {
     const windowSize = store.state.app.windowSize
@@ -164,24 +164,6 @@ export default {
       })
     }
 
-    const fuZhen = (row) => {
-      ElMessageBox.confirm('是否确认复诊?', '提示', {
-        confirmButtonText: '确认',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {
-          confirmFuZhen(row.serialNo).then(() => {
-            ElMessage({
-              message: '操作成功',
-              type: 'success',
-              duration: 2000,
-              showClose: true,
-            })
-          })
-        })
-        .catch(() => {})
-    }
     const getMzVitalSigns = (row) => {
       fetchVitalSign(row.patientId).then((res) => {
         vitalSigns.value = res
@@ -193,7 +175,8 @@ export default {
     const currentPatient = ref({})
     const chosenDepts = ref([])
     const rooms = ref([])
-    const getDepts = (row) => {
+    const getDepts = (row, fuzhenFlag) => {
+      row.fuzhenFlag = fuzhenFlag
       currentPatient.value = row
       getChosenDept().then((res) => {
         chosenDepts.value = res
@@ -222,7 +205,9 @@ export default {
     }
     const executeTriage = (row) => {
       row.serialNo = currentPatient.value.serialNo
+      row.fuzhenFlag = currentPatient.value.fuzhenFlag
       fenZhen(row).then((res) => {
+        showTriageDialog.value = false
         ElMessage({
           message: res,
           type: 'success',
@@ -276,7 +261,6 @@ export default {
       handleCurrentChange,
       statusFlagFilter,
       roomStatusFilter,
-      fuZhen,
       getMzVitalSigns,
       getDepts,
       showVital,
@@ -329,7 +313,4 @@ function roomStatusFilter(val) {
   height: 26px;
   line-height: 26px;
 }
-.dialog-head > div {
-  width: 25%;
-}
 </style>