|
@@ -9,7 +9,8 @@
|
|
|
<el-button @click="finalControl">标记终末质控</el-button>
|
|
|
</template>
|
|
|
<template v-else-if="permissions()">
|
|
|
- <el-button>病历评分</el-button>
|
|
|
+ <el-divider direction="vertical"/>
|
|
|
+ <el-button @click="ratingClick">病历评分</el-button>
|
|
|
</template>
|
|
|
|
|
|
<el-table :data="data"
|
|
@@ -76,7 +77,11 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="remark" label="备注">
|
|
|
<template #default="{row}" v-if="permissions()">
|
|
|
- <el-input v-model="row.remark" :maxlength="100"></el-input>
|
|
|
+ <el-input v-model="row.remark"
|
|
|
+ :maxlength="100"
|
|
|
+ :title="row.remark"
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="numberOfDefects" label="缺陷数">
|
|
@@ -90,11 +95,40 @@
|
|
|
<el-table-column type="selection" v-if="permissions()"/>
|
|
|
</el-table>
|
|
|
<right-click-menu v-if="!permissions()" :config="opt" :mouse-position="mousePosition"/>
|
|
|
+
|
|
|
+ <xc-dialog-v2 title="系统自动评级" v-model="scoreDialog"
|
|
|
+ @confirm="confirmTheQuality"
|
|
|
+ show-button
|
|
|
+ @cancel="scoreDialog = false"
|
|
|
+ manual-shutdown
|
|
|
+ >
|
|
|
+ <span style="color: red">
|
|
|
+ 注:此功能会直接修改病案首页中
|
|
|
+ 病案质量、质控医师、质控日期
|
|
|
+ </span>
|
|
|
+ <br>
|
|
|
+ <br>
|
|
|
+ 病案质控等级:
|
|
|
+ <el-select v-model="scoreLevel" style="width: 60px">
|
|
|
+ <xc-el-option :data="scoreList"/>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ 质控人: {{ userInfoStore.name }}
|
|
|
+
|
|
|
+
|
|
|
+ </xc-dialog-v2>
|
|
|
+
|
|
|
</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, updateFinalControl} from "@/api/zhu-yuan-yi-sheng/emr-audit";
|
|
|
+import {
|
|
|
+ getAuditMessages,
|
|
|
+ rectifyMedicalRecords,
|
|
|
+ setAudit,
|
|
|
+ updateControlLevel,
|
|
|
+ updateFinalControl
|
|
|
+} 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";
|
|
@@ -107,6 +141,10 @@ import {BizException, ExceptionEnum} from "@/utils/BizException";
|
|
|
import {uuid} from "@/utils/getUuid";
|
|
|
import {scoringCriteriaList} from "@/data";
|
|
|
import {ElMessageBox} from "element-plus";
|
|
|
+import {selectControlByPatNo} from "@/api/emr-control/emr-control";
|
|
|
+import XcElOption from "@/components/xiao-chan/xc-el-option/XcElOption.vue";
|
|
|
+import {userInfoStore} from "../../../../../../utils/store-public";
|
|
|
+import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
|
|
|
|
|
|
const elTableRef = ref(null)
|
|
|
|
|
@@ -203,7 +241,7 @@ const queryAudit = (val) => {
|
|
|
elTableRef.value.clearSelection()
|
|
|
await nextTick()
|
|
|
let tempList = []
|
|
|
- console.log(res)
|
|
|
+ console.log('质控数据', res)
|
|
|
for (let i = 0, len = data.value.length; i < len; i++) {
|
|
|
let item = data.value[i]
|
|
|
item.rowId = i;
|
|
@@ -226,7 +264,7 @@ const queryAudit = (val) => {
|
|
|
|
|
|
}
|
|
|
|
|
|
-const addAudit = () => {
|
|
|
+const addAudit = async () => {
|
|
|
let editor = emrMitt.emit('editor')
|
|
|
if (stringIsBlank(editor?.documentData._id)) {
|
|
|
BizException(ExceptionEnum.MESSAGE_ERROR, "请先选择病历。");
|
|
@@ -242,27 +280,50 @@ const addAudit = () => {
|
|
|
}
|
|
|
data.value.push(tempData)
|
|
|
elTableRef.value.toggleRowSelection(tempData);
|
|
|
+ await nextTick();
|
|
|
+ elTableRef.value.setScrollTop(elTableRef.value.$el.querySelector('.el-scrollbar__view').scrollHeight)
|
|
|
}
|
|
|
|
|
|
-const finalControl = () => {
|
|
|
+const scoreDialog = ref(false)
|
|
|
+const scoreLevel = ref(1)
|
|
|
+const ratingClick = async () => {
|
|
|
+ let res = await selectControlByPatNo(patInfo.value.inpatientNo, patInfo.value.admissTimes)
|
|
|
+ scoreDialog.value = true
|
|
|
+ scoreLevel.value = res.patient[0].score
|
|
|
+}
|
|
|
|
|
|
+const finalControl = () => {
|
|
|
ElMessageBox.confirm('是否标记此患者为终末质控。', '提示', {
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- updateFinalControl(emrInfo.value.patNo, emrInfo.value.times).then(res => {
|
|
|
+ updateFinalControl(patInfo.value.inpatientNo, patInfo.value.admissTimes).then(res => {
|
|
|
emrMitt.emit('setPatInfo', 'finalControl', 1)
|
|
|
queryAudit(emrInfo.value)
|
|
|
})
|
|
|
}).catch(() => {
|
|
|
-
|
|
|
})
|
|
|
+}
|
|
|
|
|
|
+const confirmTheQuality = async () => {
|
|
|
+ await ElMessageBox.alert('是否改变病案质量,点击后病案首页会改变。', '提示', {
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ updateControlLevel(patInfo.value.inpatientNo, patInfo.value.admissTimes, scoreLevel.value)
|
|
|
+ scoreDialog.value = false
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
patInfo.value = emrMitt.emit('getPatInfo')
|
|
|
emrMitt.on('audit', queryAudit)
|
|
|
})
|
|
|
+
|
|
|
+let scoreList = [
|
|
|
+ {code: 1, name: 'Ⅰ'},
|
|
|
+ {code: 2, name: 'Ⅱ'},
|
|
|
+ {code: 3, name: 'Ⅲ'},
|
|
|
+ {code: 4, name: 'Ⅳ'},
|
|
|
+ {code: 5, name: 'Ⅴ'},
|
|
|
+]
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|