|
@@ -1,29 +1,34 @@
|
|
|
<script setup lang="tsx">
|
|
|
+import { emrAuditRootContextKey } from "./useEmrAudit";
|
|
|
import {
|
|
|
- emrAuditRootContextKey
|
|
|
-} from "./useEmrAudit";
|
|
|
-import {EmrAuditDetailTable, setAudit, updateControlLevel, updateFinalControl} from "@/api/zhu-yuan-yi-sheng/emr-audit";
|
|
|
-import {scoringCriteriaList} from "@/data";
|
|
|
-import {useCompRef} from "@/utils/useCompRef";
|
|
|
-import {ElTable} from "element-plus";
|
|
|
+ EmrAuditDetailTable,
|
|
|
+ setAudit,
|
|
|
+ updateControlLevel,
|
|
|
+ updateFinalControl,
|
|
|
+} from "@/api/zhu-yuan-yi-sheng/emr-audit";
|
|
|
+import { scoringCriteriaList } from "@/data";
|
|
|
+import { useCompRef } from "@/utils/useCompRef";
|
|
|
+import { ElTable } from "element-plus";
|
|
|
import XcElOption from "@/components/xiao-chan/xc-el-option/XcElOption.vue";
|
|
|
-import {stringNotBlank} from "@/utils/blank-utils";
|
|
|
-import {needRule} from "@/utils/public";
|
|
|
-import {patientInfo} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
|
|
|
-import {CyMessageBox} from "@/components/cy/message-box";
|
|
|
-import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
-
|
|
|
-const SystemStaffSelect = defineAsyncComponent(() => import('@/components/system/staff-select/SystemStaffSelect.vue'))
|
|
|
-
|
|
|
-const root = inject(emrAuditRootContextKey)
|
|
|
-const tableRef = useCompRef(ElTable)
|
|
|
+import { stringNotBlank } from "@/utils/blank-utils";
|
|
|
+import { needRule } from "@/utils/public";
|
|
|
+import { patientInfo } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
|
|
|
+import { CyMessageBox } from "@/components/cy/message-box";
|
|
|
+import { xcMessage } from "@/utils/xiaochan-element-plus";
|
|
|
+
|
|
|
+const SystemStaffSelect = defineAsyncComponent(
|
|
|
+ () => import("@/components/system/staff-select/SystemStaffSelect.vue")
|
|
|
+);
|
|
|
+
|
|
|
+const root = inject(emrAuditRootContextKey);
|
|
|
+const tableRef = useCompRef(ElTable);
|
|
|
// 全院审核的权限
|
|
|
-const permissions = needRule(56)
|
|
|
-const level = ref(permissions ? 0 : 1)
|
|
|
+const permissions = needRule(56);
|
|
|
+const level = ref(permissions ? 0 : 1);
|
|
|
const sendDoctor = ref({
|
|
|
code: patientInfo.value.referPhysician,
|
|
|
name: patientInfo.value.referPhysicianName,
|
|
|
-})
|
|
|
+});
|
|
|
|
|
|
function selectRow(row) {
|
|
|
if (stringNotBlank(row.name)) {
|
|
@@ -33,132 +38,140 @@ function selectRow(row) {
|
|
|
|
|
|
function addAudit() {
|
|
|
root!.store.state.auditTemplate.push({
|
|
|
- name: '',
|
|
|
+ name: "",
|
|
|
scoringCriteria: 1,
|
|
|
- remark: '',
|
|
|
- numberOfDefects: 1
|
|
|
- })
|
|
|
+ remark: "",
|
|
|
+ numberOfDefects: 1,
|
|
|
+ });
|
|
|
nextTick(() => {
|
|
|
- tableRef.value?.setScrollTop(tableRef.value?.$el.querySelector('.el-scrollbar__view').scrollHeight)
|
|
|
- })
|
|
|
+ tableRef.value?.setScrollTop(
|
|
|
+ tableRef.value?.$el.querySelector(".el-scrollbar__view").scrollHeight
|
|
|
+ );
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
function handleSendAudit() {
|
|
|
-
|
|
|
const data = {
|
|
|
...root!.store.state.currentEmrInfo,
|
|
|
list: tableRef.value?.getSelectionRows(),
|
|
|
doctor: sendDoctor.value.code,
|
|
|
level: level.value,
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
- data.id = data.emrId
|
|
|
+ data.id = data.emrId;
|
|
|
|
|
|
if (data.emrId === null) {
|
|
|
- xcMessage.error('打开需要审核的病历');
|
|
|
+ xcMessage.error("打开需要审核的病历");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (data.list.length === 0) {
|
|
|
- xcMessage.error('请先选中需要审核的数据');
|
|
|
+ xcMessage.error("请先选中需要审核的数据");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
CyMessageBox.confirm({
|
|
|
- title: '发送审核',
|
|
|
- message: `请确认是否发送给【${sendDoctor.value.name}】医生`
|
|
|
- }).then(() => {
|
|
|
- setAudit(data).then(() => {
|
|
|
- root?.store.queryCurrentAudit()
|
|
|
- })
|
|
|
- }).catch(() => {
|
|
|
-
|
|
|
+ title: "发送审核",
|
|
|
+ message: `请确认是否发送给【${sendDoctor.value.name}】医生`,
|
|
|
})
|
|
|
+ .then(() => {
|
|
|
+ setAudit(data).then(() => {
|
|
|
+ root?.store.queryCurrentAudit();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
|
|
|
|
const levelList = [
|
|
|
- {code: 0, name: '全院', disabled: !permissions},
|
|
|
- {code: 1, name: '科室'},
|
|
|
-]
|
|
|
+ { code: 0, name: "全院", disabled: !permissions },
|
|
|
+ { code: 1, name: "科室" },
|
|
|
+];
|
|
|
|
|
|
function handleFinalControl() {
|
|
|
CyMessageBox.confirm({
|
|
|
- title: '提示',
|
|
|
- message: '是否标记此患者为终末质控。',
|
|
|
- }).then(() => {
|
|
|
- updateFinalControl(patientInfo.value.inpatientNo, patientInfo.value.admissTimes).then(res => {
|
|
|
- patientInfo.value.finalControl = 1
|
|
|
- })
|
|
|
- }).catch(() => {
|
|
|
+ title: "提示",
|
|
|
+ message: "是否标记此患者为终末质控。",
|
|
|
})
|
|
|
+ .then(() => {
|
|
|
+ updateFinalControl(
|
|
|
+ patientInfo.value.inpatientNo,
|
|
|
+ patientInfo.value.admissTimes
|
|
|
+ ).then(res => {
|
|
|
+ patientInfo.value.finalControl = 1;
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
|
|
|
|
function ratingClick() {
|
|
|
CyMessageBox.prompt({
|
|
|
- title: '病历评分',
|
|
|
- message: '是否改变病案质量,点击后病案首页会改变。',
|
|
|
+ title: "病历评分",
|
|
|
+ message: "是否改变病案质量,点击后病案首页会改变。",
|
|
|
selectOption: [
|
|
|
- {code: 1, name: 'Ⅰ'},
|
|
|
- {code: 2, name: 'Ⅱ'},
|
|
|
- {code: 3, name: 'Ⅲ'},
|
|
|
- {code: 4, name: 'Ⅳ'},
|
|
|
- {code: 5, name: 'Ⅴ'},
|
|
|
- ]
|
|
|
- }).then(({value}) => {
|
|
|
- updateControlLevel(patientInfo.value.inpatientNo, patientInfo.value.admissTimes, value)
|
|
|
- })
|
|
|
+ { code: 1, name: "Ⅰ" },
|
|
|
+ { code: 2, name: "Ⅱ" },
|
|
|
+ { code: 3, name: "Ⅲ" },
|
|
|
+ { code: 4, name: "Ⅳ" },
|
|
|
+ { code: 5, name: "Ⅴ" },
|
|
|
+ ],
|
|
|
+ }).then(({ value }) => {
|
|
|
+ updateControlLevel(
|
|
|
+ patientInfo.value.inpatientNo,
|
|
|
+ patientInfo.value.admissTimes,
|
|
|
+ value
|
|
|
+ );
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<div class="layout_container">
|
|
|
<header style="overflow-x: auto">
|
|
|
等级:
|
|
|
- <el-select
|
|
|
- style="width: 70px"
|
|
|
- v-model="level">
|
|
|
- <xc-el-option :data="levelList"/>
|
|
|
+ <el-select style="width: 70px" v-model="level">
|
|
|
+ <xc-el-option :data="levelList" />
|
|
|
</el-select>
|
|
|
医生:
|
|
|
<SystemStaffSelect
|
|
|
- style="width: 80px"
|
|
|
- value="code"
|
|
|
- label="name"
|
|
|
- v-model="sendDoctor"/>
|
|
|
- <el-divider direction="vertical"/>
|
|
|
+ style="width: 80px"
|
|
|
+ value="code"
|
|
|
+ label="name"
|
|
|
+ v-model="sendDoctor"
|
|
|
+ />
|
|
|
+ <el-divider direction="vertical" />
|
|
|
<el-button @click="addAudit" type="primary">新增</el-button>
|
|
|
<el-button @click="handleSendAudit" type="success">发送</el-button>
|
|
|
- <el-button v-if="permissions" @click="handleFinalControl">标记终末</el-button>
|
|
|
- <el-button v-if="permissions && patientInfo.finalControl !== 0 "
|
|
|
- @click="ratingClick">
|
|
|
+ <el-button v-if="permissions" @click="handleFinalControl"
|
|
|
+ >标记终末</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-if="permissions && patientInfo.finalControl !== 0"
|
|
|
+ @click="ratingClick"
|
|
|
+ >
|
|
|
病历评分
|
|
|
</el-button>
|
|
|
</header>
|
|
|
<div class="layout_main layout_el-table">
|
|
|
- <el-table
|
|
|
- :data="root.store.state.auditTemplate"
|
|
|
- ref="tableRef"
|
|
|
- >
|
|
|
- <el-table-column type="selection"/>
|
|
|
+ <el-table :data="root.store.state.auditTemplate" ref="tableRef">
|
|
|
+ <el-table-column type="selection" />
|
|
|
<el-table-column prop="name" label="项目" width="180">
|
|
|
<template #default="{row}: EmrAuditDetailTable">
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- v-model="row.name"
|
|
|
- :rows="2"
|
|
|
- />
|
|
|
+ <el-input type="textarea" v-model="row.name" :rows="2" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="scoringCriteria" label="等级" width="40">
|
|
|
+ <el-table-column
|
|
|
+ prop="scoringCriteria"
|
|
|
+ label="等级"
|
|
|
+ width="40"
|
|
|
+ v-if="false"
|
|
|
+ >
|
|
|
<template #default="{row}: EmrAuditDetailTable">
|
|
|
- <select
|
|
|
- v-model="row.scoringCriteria"
|
|
|
- @change="selectRow(row)"
|
|
|
- >
|
|
|
- <option v-for="item in scoringCriteriaList"
|
|
|
- :key="item.code"
|
|
|
- :value="item.code">
|
|
|
+ <select v-model="row.scoringCriteria" @change="selectRow(row)">
|
|
|
+ <option
|
|
|
+ v-for="item in scoringCriteriaList"
|
|
|
+ :key="item.code"
|
|
|
+ :value="item.code"
|
|
|
+ >
|
|
|
{{ item.name }}
|
|
|
</option>
|
|
|
</select>
|
|
@@ -166,21 +179,30 @@ function ratingClick() {
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="remark" label="备注">
|
|
|
<template #default="{row}: EmrAuditDetailTable">
|
|
|
- <el-input v-model="row.remark"
|
|
|
- :maxlength="500"
|
|
|
- :title="row.remark"
|
|
|
- @change="selectRow(row)"
|
|
|
- type="textarea"
|
|
|
- :rows="2"/>
|
|
|
+ <el-input
|
|
|
+ v-model="row.remark"
|
|
|
+ :maxlength="500"
|
|
|
+ :title="row.remark"
|
|
|
+ @change="selectRow(row)"
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="numberOfDefects" label="缺陷数" width="45">
|
|
|
+ <el-table-column
|
|
|
+ prop="numberOfDefects"
|
|
|
+ label="缺陷数"
|
|
|
+ width="45"
|
|
|
+ v-if="false"
|
|
|
+ >
|
|
|
<template #default="{row}: EmrAuditDetailTable">
|
|
|
- <el-input-number style="width: 40px"
|
|
|
- v-model="row.numberOfDefects"
|
|
|
- @change="selectRow(row)"
|
|
|
- :min="0"
|
|
|
- :controls="false"/>
|
|
|
+ <el-input-number
|
|
|
+ style="width: 40px"
|
|
|
+ v-model="row.numberOfDefects"
|
|
|
+ @change="selectRow(row)"
|
|
|
+ :min="0"
|
|
|
+ :controls="false"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -188,6 +210,4 @@ function ratingClick() {
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<style lang="scss">
|
|
|
-
|
|
|
-</style>
|
|
|
+<style lang="scss"></style>
|