Browse Source

电子病历审核,以及电子病历质控

xiaochan 2 years ago
parent
commit
4448f81556

+ 27 - 0
src/api/zhu-yuan-yi-sheng/emr-audit.js

@@ -0,0 +1,27 @@
+import request from "@/utils/request";
+
+let url = '/emrAudit'
+
+export function getAuditMessages(id, code) {
+    return request({
+        url: url + '/getAuditMessages',
+        method: 'get',
+        params: {id, code}
+    })
+}
+
+export function setAudit(data) {
+    return request({
+        url: url + '/setAudit',
+        method: 'post',
+        data
+    })
+}
+
+export function rectifyMedicalRecords(id, state) {
+    return request({
+        url: url + '/rectifyMedicalRecords',
+        method: 'get',
+        params: {id, state}
+    })
+}

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

@@ -153,6 +153,7 @@ const handleNodeClick = async (val) => {
             createId: val.createId,
             createName: val.createName
         }
+        emrMitt.emit('audit', val.id, val.emrCategoryCode)
     }
     if (val.children) {
         return

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

@@ -53,7 +53,7 @@
                 </el-table-column>
                 <el-table-column v-if="!jianCha" label="标本" prop="inspectStuffName"
                                  show-overflow-tooltip></el-table-column>
-                <el-table-column :label="jianCha ? '病摘要' : '申请说明'" prop="reqComment"
+                <el-table-column :label="jianCha ? '病摘要' : '申请说明'" prop="reqComment"
                                  show-overflow-tooltip></el-table-column>
                 <el-table-column v-if="jianCha" label="体征信息" prop="reqTzComment"
                                  show-overflow-tooltip></el-table-column>

+ 3 - 3
src/utils/public.js

@@ -3,9 +3,9 @@ import {stringIsBlank} from "@/utils/blank-utils";
 
 export function needRule(...val) {
     const userRoles = store.state.user.info.roles
-    if (userRoles.includes(1)) {
-        return true;
-    }
+    // if (userRoles.includes(1)) {
+    //     return true;
+    // }
     for (let i = 0; i < val.length; i++) {
         if (userRoles.includes(val[i])) {
             return true;

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

@@ -284,10 +284,11 @@
                     <el-button @click="showIframe  = 2" :type="showIframe === 2? 'primary' : ''">已保存病历</el-button>
                     <el-button @click="showIframe  = 3" :type="showIframe === 3? 'primary' : ''">同时打开</el-button>
                     <el-button @click="showIframe  = 4" :type="showIframe === 4? 'primary' : ''">病案首页</el-button>
+                    <el-button @click="showIframe  = 5" :type="showIframe === 5? 'primary' : ''">审核</el-button>
                 </div>
                 <div style="display: flex;width: 100%">
-                    <div :style="{width: showIframe === 3 ? '50%' : '100%'}"
-                         v-show="showIframe === 1 || showIframe === 3">
+                    <div :style="emrMainWidth()"
+                         v-show="showIframe === 1 || showIframe === 3 ||showIframe === 5">
                         <div style="position: relative">
                             <emr-popup ref="popupRef"
                                        @fill-data="popupFunc.fillData"/>
@@ -323,8 +324,13 @@
                                     :src="caseHistoryUrl"/>
                         </div>
                     </div>
+
+                    <div v-show="showIframe === 5" style="width: 40%;">
+                        <emr-audit/>
+                    </div>
+
                     <div :style="{width: showIframe === 3 ? '50%' : '100%'}"
-                         v-show="showIframe === 2 || showIframe === 3">
+                         v-show="showIframe === 2 || showIframe === 3  ">
                         <div style="position:relative;">
                             <div style="position:absolute;top: 0;left: 0">
                                 此病历为只读
@@ -335,7 +341,8 @@
 
                     </div>
 
-                    <div v-show="showIframe === 4" style="width: 100%;overflow-y:auto"
+                    <div v-show="showIframe === 4"
+                         style="width: 100%;overflow-y:auto"
                          :style="{height : iframeHeight() }">
                         <!--             病案首页           -->
                         <emr-first-page-of-medical-record :pat-info="huanZheXinXi"/>
@@ -407,7 +414,8 @@ import {
     copyEnum,
     getEmrCopy,
     delEmrCopy,
-    completeModeSwitch, query, canIUnlockIt, unlockEnum, emrMitt
+    completeModeSwitch,
+    emrMitt
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
 import {ElMessage, ElMessageBox} from "element-plus";
 import {BizException, ExceptionEnum} from "@/utils/BizException";
@@ -432,12 +440,14 @@ import EmrAuxiliaryTools from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tool
 import sleep from "@/utils/sleep";
 import EmrWebSocket from "@/components/zhu-yuan-yi-sheng/emr/web-socket/EmrWebSocket.vue";
 import {stringIsBlank} from "@/utils/blank-utils";
-import {needRule} from "@/utils/public";
+import {isDev, needRule} from "@/utils/public";
 import {isThereADoctorEditing} from "@/api/zhu-yuan-yi-sheng/emr-socket";
 import {onDeactivated} from "vue";
 import EmrFirstPageOfMedicalRecord from "@/components/zhu-yuan-yi-sheng/emr/EmrFirstPageOfMedicalRecord.vue";
 import EmrResultReturns
     from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrResultReturns.vue";
+import EmrAudit
+    from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrAudit.vue";
 
 
 const props = defineProps({
@@ -548,6 +558,22 @@ const predefineColors = ref([
 
 let autoSave = $ref(true)
 
+const emrMainWidth = () => {
+    if (showIframe.value === 3) {
+        return {
+            width: '50%'
+        }
+    }
+    if (showIframe.value === 5) {
+        return {
+            width: '60%'
+        }
+    }
+    return {
+        width: '100%'
+    }
+}
+
 const emrEvent = {
     'loaded': async (event) => {
         editor = currentEmr.value.getEditor()
@@ -1532,7 +1558,7 @@ const openAndSaveTheMedicalRecord = (id) => {
     showIframe.value = 2
 }
 
-const showIframe = ref(1)
+const showIframe = ref(isDev ? 5 : 1)
 const saveDocumentId = ref()
 
 const visibility = useDocumentVisibility()

+ 166 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrAudit.vue

@@ -0,0 +1,166 @@
+<template>
+    <el-button @click="setAuditClick" v-if="permissions()">发送</el-button>
+    <el-table :data="data"
+              :max-height="getWindowSize.h / 1.1"
+              :expand-row-keys="expandRow"
+              @row-contextmenu="rowContextmenu"
+              ref="elTableRef"
+              row-key="rowId">
+        <el-table-column type="expand">
+            <template #default="{row}">
+                <div style="width: 100%;padding: 10px">
+                    <table width="100%">
+                        <tr>
+                            <td>
+                                审核人:{{ row.approverName }}
+                            </td>
+                            <td>
+                                审核时间:{{ row.reviewTime }}
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                修改人:{{ row.modifyPersonName }}
+                            </td>
+                            <td>
+                                修改时间:{{ row.modificationTime }}
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                状态: {{ row.remediationStatusName }}
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+            </template>
+        </el-table-column>
+        <el-table-column prop="name" label="项目" width="180"/>
+        <el-table-column prop="scoringCriteriaName" label="等级" width="40"/>
+        <el-table-column prop="remark" label="备注" show-overflow-tooltip>
+            <template #default="{row}" v-if="permissions()">
+                <el-input v-model="row.remark"></el-input>
+            </template>
+        </el-table-column>
+        <el-table-column prop="numberOfDefects" label="缺陷数">
+            <template #default="{row}" v-if="permissions()">
+                <el-input-number style="width: 40px"
+                                 v-model="row.numberOfDefects"
+                                 :min="1"
+                                 :controls="false"/>
+            </template>
+        </el-table-column>
+        <el-table-column type="selection" v-if="permissions()"/>
+    </el-table>
+    <right-click-menu :config="opt" :mouse-position="mousePosition"/>
+</template>
+
+<script setup name='EmrAudit'>
+import {emrMitt} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
+import {getAuditMessages, rectifyMedicalRecords, setAudit} from "@/api/zhu-yuan-yi-sheng/emr-audit";
+import {needRule} from "@/utils/public";
+import {getWindowSize} from "@/utils/window-size";
+import RightClickMenu from "@/components/menu-item/RightClickMenu.vue";
+import {ref} from "vue";
+import {stringNotBlank} from "@/utils/blank-utils";
+
+let editor = emrMitt.emit('editor')
+
+const elTableRef = ref(null)
+
+const emrInfo = ref({
+    id: 0,
+    code: "",
+})
+
+const data = ref([])
+const expandRow = ref([])
+
+const permissions = () => {
+    return needRule(56);
+}
+
+const setAuditClick = () => {
+    let temp = {
+        id: emrInfo.value.id,
+        list: elTableRef.value.getSelectionRows()
+    }
+    setAudit(temp).then(() => {
+        queryAudit(emrInfo.value.id, emrInfo.value.code)
+    })
+}
+
+const mousePosition = ref()
+const opt = [
+    {
+        name: '已整改',
+        click: (data) => {
+            rectifyMedicalRecords(data.id, 1).then(() => {
+                queryAudit(emrInfo.value.id, emrInfo.value.code)
+            })
+        },
+        validator: (data) => {
+            return !!data.approver;
+        }
+    },
+    {
+        name: '已知无需整改',
+        click: (data) => {
+            rectifyMedicalRecords(data.id, 2).then(() => {
+                queryAudit(emrInfo.value.id, emrInfo.value.code)
+            })
+        },
+        validator: (data) => {
+            return !!data.approver;
+        }
+    }
+]
+const rowContextmenu = (row, column, event) => {
+    event.preventDefault()
+    mousePosition.value = {
+        event,
+        data: row,
+        index: 0
+    }
+}
+
+const queryAudit = (id, code) => {
+    emrInfo.value = {
+        id,
+        code
+    }
+
+    getAuditMessages(id, code).then(async res => {
+        expandRow.value = []
+        data.value = res
+        elTableRef.value.clearSelection()
+        await nextTick()
+        let tempList = []
+
+        for (let i = 0, len = data.value.length; i < len; i++) {
+            let item = data.value[i]
+            item.rowId = i;
+            if (stringNotBlank(item.approver)) {
+                expandRow.value.push(i);
+                elTableRef.value.toggleRowSelection(item);
+                tempList.push(item);
+            }
+        }
+
+        if (!permissions()) {
+            data.value = tempList
+        }
+
+    })
+
+}
+
+
+onMounted(() => {
+    emrMitt.on('audit', queryAudit)
+})
+</script>
+
+<style scoped lang="scss">
+
+</style>

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

@@ -102,7 +102,7 @@
                     </el-form-item>
                 </el-col>
                 <el-col :span="12">
-                    <el-form-item :label="jianCha ? '病摘要:' : '申请说明'" class="bi_tian">
+                    <el-form-item :label="jianCha ? '病摘要:' : '申请说明'" class="bi_tian">
                         <el-input v-model="bianJiJianChaShuJu.reqComment" :rows="6" maxlength="125" show-word-limit
                                   type="textarea"></el-input>
                     </el-form-item>
@@ -222,7 +222,7 @@ const xuanZhongMuBan = (val) => {
         bianJiJianChaShuJu.value.reqComment = ''
     }
     if (val.length + bianJiJianChaShuJu.value.reqComment.length > 125) {
-        return ElMessage.error('字符超长无法添加,病摘要最多125个字。')
+        return ElMessage.error('字符超长无法添加,病摘要最多125个字。')
     }
     bianJiJianChaShuJu.value.reqComment += val + ','
     ElMessage.success('复制成功。')

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

@@ -85,7 +85,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item :label="jianCha ? '病摘要:' : '申请说明'" class="bi_tian">
+          <el-form-item :label="jianCha ? '病摘要:' : '申请说明'" class="bi_tian">
             <el-input v-model="props.data.reqComment" :rows="6" maxlength="125" show-word-limit
                       type="textarea"></el-input>
           </el-form-item>

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

@@ -68,7 +68,7 @@
                                              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="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"