Forráskód Böngészése

添加编码组长审核功能

lighter 5 hónapja
szülő
commit
6560b8b6c1

+ 23 - 0
src/api/case-front-sheet/index.js

@@ -401,3 +401,26 @@ export function getExportableDclData(data) {
     })
 }
 
+export function fetchLeaderAudit(data) {
+    return request({
+        url: '/caseFrontSheet/fetchLeaderAudit',
+        method: 'post',
+        data,
+    })
+}
+
+export function submitLeaderAudit(data) {
+    return request({
+        url: '/caseFrontSheet/submitLeaderAudit',
+        method: 'post',
+        data
+    })
+}
+
+export function fetchLeaderExportData(data) {
+    return request({
+        url: '/caseFrontSheet/fetchLeaderExportData',
+        method: 'post',
+        data
+    })
+}

+ 75 - 33
src/components/inpatient/frontsheet-printpage/AuditHistory.vue

@@ -1,43 +1,53 @@
 <template>
-  <CyDialog title="质控记录" body-width="700px" :show-cancel-button="false" confirm-text="关闭">
-    <el-timeline style="max-width: 650px">
-      <el-timeline-item v-for="item in histories" :timestamp="item.applicationTime" placement="top">
-        <el-card>
-          <h4>
-            患者:{{ item.patName }} / {{ item.patNo }} / {{ item.times }}
-          </h4>
-          <p v-if="item.majorError" class="major-error">主要错误:{{item.majorError}}</p>
-          <p class="audit-remark">审核结果:{{ item.auditRemark }}</p>
-          <p v-if="item.coderNote" class="coder-note">编码员备注:{{ item.coderNote }}</p>
-          <p style="font-size: 12px; color: dimgray">
-            <span>审核人:{{ item.auditStaffName }}</span>
-            <span style="margin-left: 32px">审核时间:{{ item.auditTime }}</span>
-          </p>
-          <img :src="item.auditState === 'APPROVED' ? approveImg : rejectImg" alt="" class="img-state">
-        </el-card>
-      </el-timeline-item>
-    </el-timeline>
-
-    <div
-        v-if="histories.length === 0"
-        style="font-size: 36px;
-        height: 86%;
-        color: #777777;
-        display: flex;
-        align-items: center;
-        justify-content: center"
-    >
-      没有有效的质控记录
+  <div class="layout_container layout-horizontal" style="height: 550px;">
+    <aside style="width: 800px">
+      <div style="overflow-y: auto; height: 500px">
+        <el-timeline style="max-width: 800px">
+          <el-timeline-item v-for="item in histories" :timestamp="item.applicationTime" placement="top">
+            <el-card>
+              <h4>
+                患者:{{ item.patName }} / {{ item.patNo }} / {{ item.times }}
+              </h4>
+              <p v-if="item.majorError" class="major-error">主要错误:{{item.majorError}}</p>
+              <p class="audit-remark">审核结果:{{ item.auditRemark }}</p>
+              <p v-if="item.coderNote" class="coder-note">编码员备注:{{ item.coderNote }}</p>
+              <p style="font-size: 12px; color: dimgray">
+                <span>审核人:{{ item.auditStaffName }}</span>
+                <span style="margin-left: 32px">审核时间:{{ item.auditTime }}</span>
+              </p>
+              <img :src="item.auditState === 'APPROVED' ? approveImg : rejectImg" alt="" class="img-state">
+            </el-card>
+          </el-timeline-item>
+        </el-timeline>
+      </div>
+      <div
+          v-if="histories.length === 0"
+          style="font-size: 36px;
+          height: 86%;
+          color: #777777;
+          display: flex;
+          align-items: center;
+          justify-content: center"
+      >
+        没有有效的质控记录
+      </div>
+    </aside>
+    <div v-if="showLeaderAudit" style="margin-left: 12px;border-left: 1px solid #dadada">
+      <GroupLeaderAudit :data="props.patinfo" :close-modal="closeDialog" />
     </div>
-
-  </CyDialog>
+    <div style="position: absolute; bottom: 20px; right: 20px">
+      <el-button @click="openGroupLeaderAudit" size="default">{{leaderAuditText}}</el-button>
+      <el-button @click="closeDialog" size="default" color="black">关闭</el-button>
+    </div>
+  </div>
 </template>
 
-<script setup lang="ts">
-import CyDialog from "@/components/cy/dialog/src/CyDialog.vue";
+<script setup>
+import {useUserStore} from "@/pinia/user-store";
 import {fetchAuditHistories} from "@/api/case-front-sheet";
 import rejectImg from "@/assets/reject.png"
 import approveImg from "@/assets/approved.png"
+import GroupLeaderAudit from "@/components/inpatient/frontsheet-printpage/GroupLeaderAudit.vue";
 
 const props = defineProps({
   patinfo: {
@@ -46,13 +56,45 @@ const props = defineProps({
   }
 })
 
+const emits = defineEmits(["cyDialogConfirm"]);
+
 const histories = ref([])
+const userStore = useUserStore()
+const isGroupLeader = userStore.isFSCGroupLeader
+
+const showLeaderAudit = ref(false)
+const leaderAuditText = computed(() => {
+  return showLeaderAudit.value ? '还原' : '组长审核'
+})
+
+function openGroupLeaderAudit() {
+  if (showLeaderAudit.value) {
+    showLeaderAudit.value = false
+    return
+  }
+  let coderName = '';
+  histories.value.forEach(item => {
+    if (coderName.indexOf(item.auditStaffName) === -1) {
+      coderName += ("," + item.auditStaffName)
+    }
+  })
+  props.patinfo.coderName = coderName.substring(1)
+
+  if (histories.value.length > 0 && isGroupLeader) {
+    showLeaderAudit.value = true
+  }
+}
+
+function closeDialog() {
+  emits("cyDialogConfirm")
+}
 
 onMounted(() => {
   fetchAuditHistories(props.patinfo).then(res => {
     histories.value = res
   })
 })
+
 </script>
 
 <style scoped>

+ 196 - 0
src/components/inpatient/frontsheet-printpage/GroupLeaderAudit.vue

@@ -0,0 +1,196 @@
+<template>
+  <div class="layout_container" style="height: 550px;">
+    <div style="height: 500px;">
+      <div class="line-wrapper">
+        <div class="line-left">患者姓名:</div>
+        <div class="line-right">{{data.patName}}</div>
+      </div>
+      <div class="line-wrapper">
+        <div class="line-left">住院号:</div>
+        <div class="line-right">{{data.patNo}}</div>
+      </div>
+      <div class="line-wrapper">
+        <div class="line-left">编码员姓名:</div>
+        <div class="line-right">{{data.coderName}}</div>
+      </div>
+      <div class="line-wrapper" style="align-items: flex-start">
+        <div class="line-left">
+          主要错误:
+        </div>
+        <div class="line-right">
+          <el-checkbox-group v-model="majorError">
+            <div>
+              <el-checkbox value="主要诊断填写错误">主要诊断填写错误</el-checkbox>
+            </div>
+            <div>
+              <el-checkbox value="主要诊断编码错误">主要诊断编码错误</el-checkbox>
+            </div>
+            <div>
+              <el-checkbox value="主要手术填写错误">主要手术填写错误</el-checkbox>
+            </div>
+            <div>
+              <el-checkbox value="主要手术编码错误">主要手术编码错误</el-checkbox>
+            </div>
+          </el-checkbox-group>
+        </div>
+      </div>
+      <div class="line-wrapper">
+        <div class="line-left">
+          <span class="required">*</span>审核状态:
+        </div>
+        <div class="line-right">
+          <el-radio-group v-model="auditState">
+            <el-radio value="APPROVED">通过</el-radio>
+            <el-radio value="REJECTED">不通过</el-radio>
+          </el-radio-group>
+        </div>
+      </div>
+      <div class="line-wrapper" style="align-items: flex-start">
+        <div class="line-left">
+          <span class="required">*</span>审核意见:
+        </div>
+        <div class="line-right">
+          <el-input
+              v-model="auditRemark"
+              type="textarea"
+              :rows="5"
+              :placeholder="placeholder"
+          />
+        </div>
+      </div>
+      <div class="line-wrapper" style="align-items: flex-start">
+        <div class="line-left">
+        </div>
+        <div class="line-right">
+          <el-button
+              @click="handleClickConfirm"
+              size="default"
+              type="primary"
+              style="width: 100%"
+          >
+            提交审核
+          </el-button>
+          <div style="width: 100%; text-align: right; margin-top: 20px">
+            <a href="#" style="text-decoration: underline" @click="viewAuditHistory">
+              审核历史
+            </a>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <el-drawer v-model="showAuditHistory" title="组长审核历史记录">
+      <el-timeline>
+        <el-timeline-item
+            v-for="item in histories"
+            :timestamp="item.createTime"
+            placement="top"
+        >
+          <el-card>
+            <h4>
+              编码员:{{ item.coderName }}
+            </h4>
+            <p v-if="item.majorError" class="major-error">主要错误:{{item.majorError}}</p>
+            <p class="audit-remark">审核结果:{{ item.auditRemark }}</p>
+            <p style="font-size: 12px; color: dimgray">
+              <span>审核人:{{ item.auditName }}</span>
+              <span style="margin-left: 32px">审核时间:{{ item.createTime }}</span>
+            </p>
+            <img :src="item.auditState === 'APPROVED' ? approveImg : rejectImg" alt="" class="img-state">
+          </el-card>
+        </el-timeline-item>
+      </el-timeline>
+      <div
+          v-if="histories.length === 0"
+          style="font-size: 36px;
+          height: 86%;
+          color: #777777;
+          display: flex;
+          align-items: center;
+          justify-content: center"
+      >
+        没有有效的质控记录
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script lang="ts" setup>
+import {xcMessage} from "@/utils/xiaochan-element-plus";
+import {submitLeaderAudit,fetchLeaderAudit} from "@/api/case-front-sheet";
+import approveImg from "@/assets/approved.png";
+import rejectImg from "@/assets/reject.png";
+
+const props = defineProps({
+  data: {
+    type: Object,
+    required: true,
+  },
+  closeModal: {
+    type: Function,
+  }
+})
+
+const auditRemark = ref('')
+const auditState = ref('APPROVED')
+const majorError = ref([])
+const placeholder = computed(() => {
+  return auditState.value === 'APPROVED' ? '审核通过' : '请在此输入审核意见'
+})
+
+function handleClickConfirm() {
+  if (auditState.value === 'REJECTED' && !auditRemark.value) {
+    xcMessage.error('审核意见不能为空!');
+    return
+  }
+  if (auditState.value === 'APPROVED' && majorError.value.length > 0) {
+    xcMessage.error('勾选了主要错误,审核状态请选择【不通过】')
+    return
+  }
+  props.data.auditState = auditState.value
+  props.data.auditRemark = auditRemark.value
+  props.data.majorErrorList = majorError.value
+  submitLeaderAudit(props.data).then(res => {
+    xcMessage.success('操作成功。')
+    props.closeModal()
+  })
+}
+
+const showAuditHistory = ref(false);
+const histories = ref([])
+function viewAuditHistory() {
+  fetchLeaderAudit(props.data).then(res => {
+    histories.value = res
+    showAuditHistory.value = true;
+  })
+}
+
+</script>
+
+<style scoped>
+.line-wrapper {
+  display: flex;
+  margin: 12px 0;
+  align-items: center;
+}
+.line-left {
+  width: 120px;
+  text-align: right;
+  padding-right: 8px;
+}
+.line-right {
+  width: 300px;
+  text-align: left;
+  padding-left: 30px;
+}
+.required {
+  margin-right: 4px;
+  color: red;
+}
+.img-state {
+  width: 64px;
+  position: absolute;
+  top: 0;
+  right: 0;
+}
+</style>

+ 4 - 0
src/pinia/user-store.ts

@@ -72,6 +72,10 @@ export const useUserStore = defineStore("user", {
     getSid(state): string {
       return state.userInfo.sid + state.randomSid;
     },
+    isFSCGroupLeader(state): boolean {
+      let roles = state.userInfo.roles
+      return roles.indexOf(1) !== -1 || roles.indexOf(79) !== -1;
+    }
   },
   actions: {
     setToken(val: string) {

+ 49 - 7
src/views/hospitalization/case-front-sheet/FrontSheetQuality.vue

@@ -48,7 +48,8 @@
         <span v-if="auditInquiryRequest.state === 'APPROVED'" style="margin: 0 12px">
           <el-button icon="Refresh" type="danger" @click="beforeRevokeApprove">撤销审核</el-button>
         </span>
-        <el-button type="info" @click="exportExcel">导出审核记录</el-button>
+        <el-button type="info" @click="exportExcel(1)">导出审核记录</el-button>
+        <el-button v-if="isGroupLeader" type="info" @click="exportExcel(2)">导出编码组长审核记录</el-button>
       </div>
     </template>
     <CyFlex tab-position="vertical">
@@ -189,9 +190,8 @@ import {
   revokeApprovedAudit,
   getSsfzSurgeriesByIcd,
   sheetSearch,
-  fetchExportData,
-  getBaOpLogs
-} from '@/api/case-front-sheet'
+  fetchExportData, fetchLeaderExportData
+} from "@/api/case-front-sheet";
 import maleIcon from '@/assets/male-icon.png'
 import femaleIcon from '@/assets/female-icon.png'
 import FullPage from "@/components/inpatient/frontsheet-printpage/FullPage.vue";
@@ -210,9 +210,13 @@ import {
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
 import {magicApi} from "@/utils/database/magic-api-request";
 import {Export} from "@/utils/ExportExcel";
+import {useDialog} from "@/components/cy/CyDialog/index";
+import {useUserStore} from "@/pinia/user-store";
 
 const {CyDateRange, dateRange} = useDateRange({shortcutsIndex: 1, clearable: false})
 
+const isGroupLeader = useUserStore().isFSCGroupLeader
+
 const allSmallDept = ref([])
 
 const auditInquiryRequest = reactive({
@@ -393,7 +397,6 @@ function approveAudit() {
       querySearch()
     })
   }).catch(() => {});
-
 }
 
 function rejectAudit() {
@@ -425,10 +428,28 @@ function executeRevoke() {
 }
 
 function viewAuditHistory(row) {
-  useDialogToJs(AuditHistory, { patinfo: row })
+  useDialog(AuditHistory, {
+    dialogProps: {
+      title: '质控记录',
+      width: '800px',
+    },
+    showCancel: false,
+    showConfirm: false,
+    params: {
+      patinfo: row
+    }
+  })
 }
 
-function exportExcel() {
+function exportExcel(flag) {
+  if (flag === 1) {
+    exportNormalAudit()
+  } else {
+    exportLeaderAudit()
+  }
+}
+
+function exportNormalAudit() {
   fetchExportData(dateRange.value).then(res => {
     if (!res || res.length === 0) {
       xcMessage.warning('没有找到可以导出的数据。')
@@ -453,6 +474,27 @@ function exportExcel() {
   })
 }
 
+function exportLeaderAudit() {
+  fetchLeaderExportData(dateRange.value).then(res => {
+    if (!res || res.length === 0) {
+      xcMessage.warning('没有找到可以导出的数据。')
+      return
+    }
+    const field = {
+      patNo: '住院号',
+      times: '住院次数',
+      patName: '患者姓名',
+      coderName: '编码员姓名',
+      auditName: '编码组长',
+      createTime: '编码组长审核时间',
+      stateName: '审核状态',
+      majorError: '主要错误',
+      auditRemark: '审核备注',
+    }
+    Export(res, field, '编码组长审核记录')
+  })
+}
+
 onMounted(() => {
   getAllSmallDept().then(res=> {
     allSmallDept.value = res