Browse Source

终末病历

xiaochan 2 years ago
parent
commit
ad5d5f949c

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

@@ -2,11 +2,11 @@ import request from "@/utils/request";
 
 let url = '/emrAudit'
 
-export function getAuditMessages(id, code) {
+export function getAuditMessages(id, code, finalControl) {
     return request({
         url: url + '/getAuditMessages',
         method: 'get',
-        params: {id, code}
+        params: {id, code, finalControl}
     })
 }
 
@@ -26,11 +26,11 @@ export function rectifyMedicalRecords(id, state) {
     })
 }
 
-export function getHistoricalAudit(emrId) {
+export function getHistoricalAudit(emrId, finalControl) {
     return request({
         url: url + '/getHistoricalAudit',
         method: 'get',
-        params: {emrId}
+        params: {emrId, finalControl}
     })
 }
 

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

@@ -474,7 +474,7 @@ const route = [
             {
                 path: 'emrControlRule',
                 component: createNameComponent(() => import('@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr_control_rule/EmrControlRule.vue')),
-                meta: {title: '在院质控'},
+                meta: {title: '环节质控'},
             },
             {
                 path: 'finalQualityControl',

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

@@ -276,6 +276,13 @@ const emrSocketUnlock = async () => {
 }
 
 onMounted(async () => {
+
+  emrMitt.on('getPatInfo', () => patientInfo)
+  emrMitt.on('setPatInfo', (name, data) => {
+    patientInfo[name] = data
+  })
+
+
   let temp = localStorage.getItem("电子病历限制")
   if (temp !== null) {
     dialog = false

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

@@ -1,7 +1,13 @@
 <template>
   <el-button @click="setAuditClick" v-if="permissions()">发送</el-button>
-  <emr-audit-dialog :emr-id="emrInfo.id"/>
-  <el-button @click="finalControl">标记终末质控</el-button>
+  <emr-audit-dialog :emr-id="emrInfo.id"
+                    :final-control="patInfo.finalControl"
+                    :count="historyCount"/>
+  <template v-if="permissions() && patInfo.finalControl === 0">
+    <el-divider direction="vertical"/>
+    <el-button @click="finalControl">标记终末质控</el-button>
+  </template>
+
   <el-table :data="data"
             :height="getWindowSize.h / 1.1"
             :expand-row-keys="expandRow"
@@ -97,10 +103,6 @@ import {BizException, ExceptionEnum} from "@/utils/BizException";
 import {uuid} from "@/utils/getUuid";
 import {scoringCriteriaList} from "@/data";
 
-const {patInfo} = defineProps({
-  patInfo: Object
-})
-
 const elTableRef = ref(null)
 
 const emrInfo = ref({
@@ -112,6 +114,10 @@ const emrInfo = ref({
   times: 0
 })
 
+const historyCount = ref(0)
+
+const patInfo = ref({})
+
 const data = ref([])
 const expandRow = ref([])
 
@@ -125,7 +131,8 @@ const setAuditClick = () => {
     doctor: emrInfo.value.code === 'shoucibingchengjilu' ? emrInfo.value.referPhysician : emrInfo.value.createId,
     patNo: emrInfo.value.patNo,
     times: emrInfo.value.times,
-    list: elTableRef.value.getSelectionRows()
+    list: elTableRef.value.getSelectionRows(),
+    finalControl: patInfo.value.finalControl
   }
   setAudit(temp).then(() => {
     queryAudit(emrInfo.value)
@@ -184,9 +191,10 @@ const rowContextmenu = (row, column, event) => {
 
 const queryAudit = (val) => {
   emrInfo.value = val
-  getAuditMessages(emrInfo.value.id, emrInfo.value.code).then(async res => {
+  getAuditMessages(emrInfo.value.id, emrInfo.value.code, patInfo.value.finalControl).then(async res => {
     expandRow.value = []
-    data.value = res
+    data.value = res.data
+    historyCount.value = res.historyCount
     elTableRef.value.clearSelection()
     await nextTick()
     let tempList = []
@@ -233,11 +241,13 @@ const addAudit = () => {
 
 const finalControl = () => {
   updateFinalControl(emrInfo.value.patNo, emrInfo.value.times).then(res => {
-    console.log(res)
+    emrMitt.emit('setPatInfo', 'finalControl', 1)
+    queryAudit(emrInfo.value)
   })
 }
 
 onMounted(() => {
+  patInfo.value = emrMitt.emit('getPatInfo')
   emrMitt.on('audit', queryAudit)
 })
 </script>

+ 18 - 5
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrAuditDialog.vue

@@ -1,5 +1,8 @@
 <template>
-  <el-button @click="historicalAuditClick">历史审核</el-button>
+
+  <el-badge :is-dot="props.count > 0">
+    <el-button @click="historicalAuditClick">历史审核</el-button>
+  </el-badge>
 
   <el-dialog v-model="dialog" title="历史记录" width="70%" destroy-on-close>
     <el-scrollbar :height="getWindowSize.h / 1.5">
@@ -18,6 +21,12 @@
             <el-table-column prop="modificationTime" label="修改时间"/>
             <el-table-column prop="remark" label="备注"/>
             <el-table-column prop="remediationStatusName" label="整改"/>
+            <el-table-column prop="finalControl" label="终末">
+              <template #default="{row}">
+                <span v-if="row.finalControl === 1">是</span>
+                <span v-else>否</span>
+              </template>
+            </el-table-column>
           </el-table>
         </el-timeline-item>
       </el-timeline>
@@ -30,17 +39,21 @@ import {getHistoricalAudit} from "@/api/zhu-yuan-yi-sheng/emr-audit";
 import {getWindowSize} from "@/utils/window-size";
 
 const props = defineProps({
-  emrId: {
-    type: Number,
-  }
+  emrId: Number,
+  count: Number,
+  finalControl: Number
 })
 
+
 const dialog = ref(false)
 
 const historicalInfo = ref({})
 
 const historicalAuditClick = () => {
-  getHistoricalAudit(props.emrId).then((res) => {
+  getHistoricalAudit(props.emrId, props.finalControl).then((res) => {
+
+
+
     historicalInfo.value = res
     dialog.value = true
   })

+ 1 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/final-quality-control/FinalQualityControl.vue

@@ -1,7 +1,7 @@
 <template>
   <page-layer>
     <template #header>
-      出院时间:
+      质控时间:
       <el-date-picker style="width: 180px" v-model="queryParam.date" type="daterange" format="YYYY-MM-DD"
                       value-format="YYYY-MM-DD"/>
       科室:

+ 12 - 8
src/views/settings/Test.vue

@@ -1,18 +1,22 @@
 <template>
-  <jc-jy-template :temp-type="2"/>
+  <el-button @click="test">测试</el-button>
+  <xc-date-picker v-model="te" :a-few-days-ago="10"/>
 </template>
 
 <script setup>
-import JcJyTemplate
-  from "@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JcJyTemplate.vue";
+import {useZIndex} from "element-plus";
+import XcDatePicker from "@/components/xiao-chan/date-picker/XcDatePicker.vue";
+
+const te = ref([])
+
+const test = () => {
+  console.log(useZIndex().nextZIndex());
+
+}
 
 
 </script>
 
 <style lang="scss">
-.twe {
-  div {
-    border: 1px solid #000;
-  }
-}
+
 </style>