浏览代码

出院患者电子病历超 7 天申请编辑

DESKTOP-0GD05B0\Administrator 2 年之前
父节点
当前提交
3d1f6b5159

+ 26 - 18
package-lock.json

@@ -445,11 +445,6 @@
       "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==",
       "dev": true
     },
-    "@popperjs/core": {
-      "version": "npm:@sxzz/popperjs-es@2.11.7",
-      "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
-      "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
-    },
     "@rollup/plugin-node-resolve": {
       "version": "13.1.1",
       "resolved": "https://registry.npmmirror.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.1.tgz",
@@ -971,6 +966,27 @@
         "whatwg-fetch": "^3.6.2"
       },
       "dependencies": {
+        "@vue/vue-loader-v15": {
+          "version": "npm:vue-loader@15.10.1",
+          "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.10.1.tgz",
+          "integrity": "sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA==",
+          "dev": true,
+          "requires": {
+            "@vue/component-compiler-utils": "^3.1.0",
+            "hash-sum": "^1.0.2",
+            "loader-utils": "^1.1.0",
+            "vue-hot-reload-api": "^2.3.0",
+            "vue-style-loader": "^4.1.0"
+          },
+          "dependencies": {
+            "hash-sum": {
+              "version": "1.0.2",
+              "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
+              "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
+              "dev": true
+            }
+          }
+        },
         "array-union": {
           "version": "2.1.0",
           "resolved": "https://registry.npmmirror.com/array-union/-/array-union-2.1.0.tgz",
@@ -1340,19 +1356,6 @@
       "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.37.tgz",
       "integrity": "sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw=="
     },
-    "@vue/vue-loader-v15": {
-      "version": "npm:vue-loader@15.10.1",
-      "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.10.1.tgz",
-      "integrity": "sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA==",
-      "dev": true,
-      "requires": {
-        "@vue/component-compiler-utils": "^3.1.0",
-        "hash-sum": "^1.0.2",
-        "loader-utils": "^1.1.0",
-        "vue-hot-reload-api": "^2.3.0",
-        "vue-style-loader": "^4.1.0"
-      }
-    },
     "@vue/web-component-wrapper": {
       "version": "1.3.0",
       "resolved": "https://registry.npmmirror.com/@vue/web-component-wrapper/-/web-component-wrapper-1.3.0.tgz",
@@ -2941,6 +2944,11 @@
         "normalize-wheel-es": "^1.2.0"
       },
       "dependencies": {
+        "@popperjs/core": {
+          "version": "npm:@sxzz/popperjs-es@2.11.7",
+          "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
+          "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
+        },
         "@sxzz/popperjs-es": {
           "version": "npm:@sxzz/popperjs-es@2.11.7",
           "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",

+ 51 - 0
src/api/zhu-yuan-yi-sheng/emr-patient.js

@@ -135,3 +135,54 @@ export function resumeMedicalRecords(documentId) {
     })
 }
 
+export function getDisReqEmr(flag) {
+    return request({
+        url: url + 'getDisReqEmr',
+        method: 'get',
+        params: {flag}
+    })
+}
+
+export function saveDisEmrReq(data) {
+    return request({
+        url: url + 'saveDisEmrReq',
+        method: 'post',
+        data
+    })
+}
+
+
+export function deleteDisEmrDis(patNo) {
+    return request({
+        url: url + 'deleteDisEmrDis',
+        method: 'get',
+        params: {patNo}
+    })
+}
+
+export function adoptEmrDisReq(patNo) {
+    return request({
+        url: url + 'adoptEmrDisReq',
+        method: 'get',
+        params: {patNo}
+    })
+}
+
+export function refuseEmrDisReq(patNo, reviewNotes) {
+    return request({
+        url: url + 'refuseEmrDisReq',
+        method: 'get',
+        params: {patNo, reviewNotes}
+    })
+}
+
+export function isDisReqEdit(patNo) {
+    return request({
+        url: url + 'isDisReqEdit',
+        method: 'get',
+        params: {patNo}
+    })
+}
+
+
+

+ 135 - 0
src/components/zhu-yuan-yi-sheng/emr/DischargedEmrModifyApply/EmrApply.vue

@@ -0,0 +1,135 @@
+<template>
+  <xc-table :local-data="reqData" :height="220">
+    <el-table-column fixed="left" width="150">
+      <template #header>
+        <el-button type="success" icon="Plus" title="添加申请" @click="addReqClick"/>
+        <el-button type="primary" icon="Search" title="查询数据" @click="queryData"/>
+      </template>
+      <template #default="{row}">
+        <el-button type="danger" icon="Delete" title="删除" @click="deleteClick(row)"/>
+        <el-button type="warning" icon="Edit" title="编辑" @click="editClick(row)"/>
+      </template>
+    </el-table-column>
+    <el-table-column label="住院号" prop="patNo" width="70"/>
+    <el-table-column label="修改时间" prop="editDate" width="80"/>
+    <el-table-column label="状态" prop="reqStatusName" width="50">
+      <template #default="{row}">
+        <span v-html="row.reqStatusHtml"></span>
+      </template>
+    </el-table-column>
+    <el-table-column label="申请备注" prop="reqRemarks" show-overflow-tooltip/>
+    <el-table-column label="审核备注" prop="reviewNotes" show-overflow-tooltip/>
+  </xc-table>
+
+  <xc-dialog-v2 v-model="dialog" width="30%" title="申请">
+    <el-form label-width="80px" :rules="rules" ref="formRef" :model="fromData">
+      <el-row>
+        <el-col :span="24">
+          <el-form-item label="住院号:" prop="inpatient">
+            <el-input style="width: 120px" v-model="fromData.inpatientNo" @blur="model=$event.target.value.trim()"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="次数:" prop="times">
+            <el-input-number v-model="fromData.times" :min="1"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="时间:" prop="editDate">
+            <el-date-picker type="date"
+                            v-model="fromData.editDate"
+                            value-format="YYYY-MM-DD"
+                            format="YYYY-MM-DD"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="备注:" prop="reqRemarks">
+            <el-input type="textarea" rows="3" maxlength="50" show-word-limit v-model="fromData.reqRemarks"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="">
+            <el-button @click="submit">提交</el-button>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+  </xc-dialog-v2>
+</template>
+
+<script setup name='EmrApply'>
+import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
+import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
+import {deleteDisEmrDis, getDisReqEmr, saveDisEmrReq} from "@/api/zhu-yuan-yi-sheng/emr-patient";
+
+let reqData = $ref([])
+let dialog = $ref(false)
+let fromData = $ref({
+  patNo: '',
+  inpatient: '',
+  times: 1,
+  editDate: null,
+  reqRemarks: '',
+})
+let formRef = $ref(null)
+
+let rules = $ref({
+  inpatientNo: [{required: true, message: '字段值不可为空'}],
+  reqRemarks: [{required: true, message: '字段值不可为空'}],
+  editDate: [{required: true, message: '字段值不可为空'}],
+})
+
+const addReqClick = () => {
+  fromData = {
+    patNo: '',
+    inpatient: '',
+    times: 1,
+    editDate: null,
+    reqRemarks: '',
+  }
+  dialog = true
+}
+
+// 点击编辑
+const editClick = (val) => {
+  let temp = val.patNo.split("_")
+  fromData = val
+  fromData.inpatientNo = temp[0]
+  fromData.times = parseInt(temp[1])
+  dialog = true
+}
+
+// 确认申请
+const submit = () => {
+  formRef.validate(valid => {
+    if (!valid) return
+    fromData.patNo = fromData.inpatientNo + '_' + fromData.times
+    saveDisEmrReq(fromData).then((res) => {
+      dialog = false
+      queryData()
+    })
+  })
+}
+
+// 删除申请
+const deleteClick = (val) => {
+  deleteDisEmrDis(val.patNo).then(() => {
+    queryData()
+  })
+}
+
+const queryData = () => {
+  getDisReqEmr(1).then((res) => {
+    reqData = res
+  })
+}
+
+onMounted(() => {
+  queryData()
+})
+
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 68 - 0
src/components/zhu-yuan-yi-sheng/emr/DischargedEmrModifyApply/EmrToExamine.vue

@@ -0,0 +1,68 @@
+<template>
+  <xc-table :local-data="reqData" :height="220">
+    <el-table-column label="操作" fixed="left" width="150">
+      <template #header>
+        <el-button type="primary" icon="Search" title="查询数据" @click="queryData"/>
+      </template>
+      <template #default="{row}">
+        <el-button type="success" icon="Check" title="通过" @click="adoptClick(row.patNo)"/>
+        <el-button type="danger" icon="Close" title="拒绝" @click="refuseClick(row.patNo)"/>
+      </template>
+    </el-table-column>
+    <el-table-column label="住院号" prop="patNo" width="70"/>
+    <el-table-column label="修改时间" prop="editDate" width="80"/>
+    <el-table-column label="状态" prop="reqStatusName" width="50">
+      <template #default="{row}">
+        <span v-html="row.reqStatusHtml"></span>
+      </template>
+    </el-table-column>
+    <el-table-column label="申请备注" prop="reqRemarks" show-overflow-tooltip/>
+    <el-table-column label="审核备注" prop="reviewNotes" show-overflow-tooltip/>
+  </xc-table>
+</template>
+
+<script setup name='EmrToExamine'>
+
+import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
+import {adoptEmrDisReq, getDisReqEmr, refuseEmrDisReq} from "@/api/zhu-yuan-yi-sheng/emr-patient";
+import {ElMessageBox} from "element-plus";
+
+let reqData = $ref([])
+
+const queryData = () => {
+  getDisReqEmr(2).then((res) => {
+    reqData = res
+  })
+}
+
+
+const adoptClick = (patNo) => {
+  adoptEmrDisReq(patNo).then((res) => {
+    queryData()
+  })
+}
+
+const refuseClick = (patNo) => {
+  ElMessageBox.prompt('驳回信息', '提示', {
+    type: 'warning',
+    confirmButtonText: '确定',
+    cancelButtonText: '取消',
+    inputPattern: /\S/,
+    inputErrorMessage: '驳回信息不能为空且不得超过 100 字 (∩•̀ω•́)⊃-*⋆',
+  }).then(({value}) => {
+    refuseEmrDisReq(patNo, value).then((res) => {
+      queryData()
+    })
+    console.log(value)
+  })
+}
+
+onMounted(() => {
+  queryData()
+})
+
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 90 - 0
src/layout/HeaderV2/Notice.vue

@@ -0,0 +1,90 @@
+<template>
+  <div class="notice__content" :title="msg.msg" v-show="msg.isShow">
+    <div class="notice__img">
+      <img :src="msg.avatar">
+    </div>
+
+    <div class="notice__main">
+      <div class="notice__name">
+        <span style="color: red">
+          {{ msg.deptName }}
+        </span>
+        <span style="color: #0a84fd;margin-left: 10px">
+         {{ msg.name }}
+        </span>
+      </div>
+      <div class="notice__msg">
+        {{ msg.msg }}
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script setup name='Notice' lang="ts">
+import {ref} from 'vue'
+
+const msg = ref({
+  avatar: 'https://wework.qpic.cn/wwpic/983610_ph9-6vq4Tky3osn_1670953406/0',
+  deptName: '信息科',
+  name: '肖蟾',
+  msg: '阿苏和对啊是对啊哈佛啊ui是发哈送iu和导师案说法伽世界科幻大师返回八艘i的话关乎端是更好的大祭司第哦啊是',
+  isShow: false
+})
+
+</script>
+
+<style scoped lang="scss">
+$height: 50px;
+$width: 290px;
+$img_size: 40px;
+
+.notice__content {
+  position: fixed;
+  width: $width;
+  height: $height;
+  left: 50%;
+  top: 2%;
+  margin-left: -$width / 2;
+  border-radius: 5px;
+  display: flex;
+  align-items: center;
+  background-color: white;
+  z-index: 99;
+  box-shadow: var(--el-box-shadow-dark);
+
+
+  .notice__img {
+    width: $img_size;
+    height: $img_size;
+    margin-left: 10px;
+
+    img {
+      width: $img_size;
+      height: $img_size;
+    }
+  }
+
+  .notice__main {
+    width: $width - $img_size - 10 - 20;
+    padding: 0 10px;
+    height: 40px;
+
+    .notice__name {
+      width: 100%;
+    }
+
+    .notice__msg {
+      margin-top: 10px;
+      width: 100%;
+      white-space: nowrap;
+      overflow: hidden;
+      text-overflow: ellipsis;
+    }
+
+  }
+
+
+}
+
+</style>

+ 2 - 0
src/layout/index.vue

@@ -1,5 +1,6 @@
 <template>
   <el-container style="height: 100vh">
+    <Notice/>
     <div class="mask" v-show="!isCollapse && !contentFullScreen" @click="hideMenu"></div>
     <el-aside :width="isCollapse ? '50px' : '260px'"
               class="layout_aside"
@@ -32,6 +33,7 @@ import {initWebSocket} from '@/utils/websocket'
 import MenuV2 from "@/layout/MenuV2/MenuV2";
 import HeaderV2 from "@/layout/HeaderV2/HeaderV2";
 import {setVisibleSize} from "@/utils/window-size";
+import Notice from "@/layout/HeaderV2/Notice.vue";
 
 
 const store = useStore()

+ 7 - 0
src/router/modules/dashboard.js

@@ -547,6 +547,13 @@ const route = [
                             title: '恢复病历',
                         },
                     },
+                    {
+                        path: 'DischargedEmrModifyApply',
+                        component: createNameComponent(() => import('@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/DischargedEmrModifyApply.vue')),
+                        meta: {
+                            title: '申请出院病历编辑',
+                        },
+                    },
                 ],
             },
         ],

+ 22 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/DischargedEmrModifyApply.vue

@@ -0,0 +1,22 @@
+<template>
+  <el-tabs v-model="tabsMod">
+    <el-tab-pane name="1" label="申请编辑">
+      <emr-apply/>
+    </el-tab-pane>
+    <el-tab-pane name="2" label="审核" v-if="needRule(38)">
+      <emr-to-examine/>
+    </el-tab-pane>
+  </el-tabs>
+</template>
+
+<script setup name='DischargedEmrModifyApply'>
+import EmrApply from "@/components/zhu-yuan-yi-sheng/emr/DischargedEmrModifyApply/EmrApply.vue";
+import EmrToExamine from "@/components/zhu-yuan-yi-sheng/emr/DischargedEmrModifyApply/EmrToExamine.vue";
+import {needRule} from "@/utils/public";
+
+let tabsMod = $ref('1')
+</script>
+
+<style scoped lang="scss">
+
+</style>

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

@@ -8,8 +8,12 @@
         提交病历
       </el-button>
       <el-button-group>
-        <el-button type="primary" icon="Printer" @click="frontEndPrinting">页面打印</el-button>
-        <el-button type="primary" icon="Printer" @click="servicePrint">服务打印</el-button>
+        <el-button type="primary" icon="Printer" @click="frontEndPrinting"
+                   title="页面打印支持病历续打,但是可能会出现打印错误。">页面打印
+        </el-button>
+        <el-button type="primary" icon="Printer" @click="servicePrint"
+                   title="服务打印慢,但是不会出现页面打印错误,不支持病历续打。">服务打印
+        </el-button>
       </el-button-group>
       <el-button style="margin-left: 5px" type="primary" @click="openAssistant.dialog = true">
         病历助手
@@ -327,7 +331,7 @@ const nodeClick = (val, jumpOrNot, templateType) => {
 
 const updateCaseHistoryUrl = async (val) => {
   courseSegmentLocking()
-  let temp = `/emr/runtime/?documentId=${documentId}&categoryCode=${categoryCode}&categoryId=${categoryId}&patientId=${patientId}#/`
+  let temp = `/emr/runtime/?documentId=${val.documentId}&categoryCode=${val.categoryCode}&categoryId=${val.categoryId}&patientId=${patientId}#/`
   if (temp === caseHistoryUrl) return
   loaded = true
   isEditorChange = false

+ 11 - 3
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/Home.vue

@@ -26,7 +26,7 @@ import {getDisPatient, getPatientInfo} from "@/api/inpatient/patient";
 import router from "@/router";
 import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi";
 import {BizException, ExceptionEnum} from "@/utils/BizException";
-import {getDischargeTimes} from "@/api/zhu-yuan-yi-sheng/emr-patient";
+import {getDischargeTimes, isDisReqEdit} from "@/api/zhu-yuan-yi-sheng/emr-patient";
 import {getServerDateApi} from "@/api/public-api";
 import {subtractTime} from "@/utils/date";
 import {
@@ -78,7 +78,9 @@ const routerFunc = async () => {
   show = false
   if (router.currentRoute.value.query.pat) {
     resolveRoute(router.currentRoute.value.query.pat)
-    patientInfo = await getPatientInfo(query.value.patNo)
+    if (query.value.state !== 2) {
+      patientInfo = await getPatientInfo(query.value.patNo);
+    }
     if (query.value.state === 1) {
       await queryActPatient()
     } else if (query.value.state === 2) {
@@ -105,7 +107,13 @@ const queryDisPatient = async () => {
   dischargeDays = subtractTime(await getServerDateApi(), patientInfo.disDate)
   // 如果患者的出院时间大于 7 天就只能看病历和打印病历了
   emrConfig.value.editor = dischargeDays < 7;
-  show = true
+  // 如果超过了七天就去查看是否有申请编辑
+  if (!emrConfig.value.editor) {
+    emrConfig.value.editor = await isDisReqEdit(query.value.patNo + '_' + query.value.times)
+    console.log(emrConfig.value.editor)
+  }
+
+  show = true;
 }
 
 // 点击全院患者数据