|
@@ -22,6 +22,9 @@
|
|
|
<el-button @click="recoveryDialog = true">
|
|
|
恢复
|
|
|
</el-button>
|
|
|
+ <el-button @click="auditClick" type="primary">
|
|
|
+ 审核
|
|
|
+ </el-button>
|
|
|
</el-button-group>
|
|
|
<el-divider direction="vertical"/>
|
|
|
<el-button-group>
|
|
@@ -34,6 +37,7 @@
|
|
|
title="drg的预分组">
|
|
|
DRG分组
|
|
|
</el-button>
|
|
|
+ <emr-result-returns/>
|
|
|
</el-button-group>
|
|
|
<el-divider direction="vertical"/>
|
|
|
<!-- 恢复到上一次保存的状态 -->
|
|
@@ -403,7 +407,7 @@ import {
|
|
|
copyEnum,
|
|
|
getEmrCopy,
|
|
|
delEmrCopy,
|
|
|
- completeModeSwitch, query, canIUnlockIt, unlockEnum
|
|
|
+ completeModeSwitch, query, canIUnlockIt, unlockEnum, 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";
|
|
@@ -412,6 +416,7 @@ import store from "@/store";
|
|
|
import {onBeforeRouteLeave} from "vue-router";
|
|
|
import {getServerDateApi, getUuid} from "@/api/public-api";
|
|
|
import {
|
|
|
+ audit,
|
|
|
getDrgIntelligentGrouping,
|
|
|
getExtractDataElement, hotSearchSorting,
|
|
|
submitMedicalRecord
|
|
@@ -426,12 +431,13 @@ import EmrPopup from "@/components/zhu-yuan-yi-sheng/emr/EmrPopup.vue";
|
|
|
import EmrAuxiliaryTools from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrAuxiliaryTools.vue";
|
|
|
import sleep from "@/utils/sleep";
|
|
|
import EmrWebSocket from "@/components/zhu-yuan-yi-sheng/emr/web-socket/EmrWebSocket.vue";
|
|
|
-import {stringIsBlank, stringNotBlank} from "@/utils/blank-utils";
|
|
|
-import {createRestrictions} from "@/api/zhu-yuan-yi-sheng/emr-control-rule";
|
|
|
+import {stringIsBlank} from "@/utils/blank-utils";
|
|
|
import {needRule} from "@/utils/public";
|
|
|
import {isThereADoctorEditing} from "@/api/zhu-yuan-yi-sheng/emr-socket";
|
|
|
-import {onBeforeUnmount, onDeactivated, onUnmounted} from "vue";
|
|
|
+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";
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -558,8 +564,6 @@ const emrEvent = {
|
|
|
// 是否开启审阅模式
|
|
|
reviewMode = 2
|
|
|
isRevisionMode()
|
|
|
- // 电子病历的质控限制 现在已经不需要限制医生了
|
|
|
- // await medicalRecordQualityControl()
|
|
|
// 判断是否只读
|
|
|
readonlyPattern()
|
|
|
// 填充患者数据
|
|
@@ -853,6 +857,18 @@ const clickDelete = () => {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 上级医生审核
|
|
|
+ */
|
|
|
+const auditClick = () => {
|
|
|
+ if (doctorLevel < 2) {
|
|
|
+ BizException(ExceptionEnum.MESSAGE_ERROR, '您不是改患者的上级医生,无法进行该操作。')
|
|
|
+ }
|
|
|
+ whetherThereIsAMedicalRecordId()
|
|
|
+ waitForLoadingToComplete()
|
|
|
+ audit(documentId)
|
|
|
+}
|
|
|
+
|
|
|
const whetherThereIsAMedicalRecordId = () => {
|
|
|
if (!documentId) {
|
|
|
BizException(ExceptionEnum.MESSAGE_ERROR, "请先选择患者的病历。")
|
|
@@ -1088,7 +1104,8 @@ const courseSegmentLocking = async () => {
|
|
|
let courseTitles = [];
|
|
|
let loginUserCode = userData.code;
|
|
|
循环病程返回数据元((value, node) => {
|
|
|
- courseTitles.push({
|
|
|
+ let fragment = node.getAttribute('fragment')
|
|
|
+ let pushData = {
|
|
|
code: '查房时间',
|
|
|
name: value['查房标题']?.value,
|
|
|
value: value['查房时间']?.value,
|
|
@@ -1098,8 +1115,13 @@ const courseSegmentLocking = async () => {
|
|
|
createName: createName,
|
|
|
createDate: value['查房时间']?.value,
|
|
|
createId: createId,
|
|
|
- type: 'category'
|
|
|
- })
|
|
|
+ type: 'category',
|
|
|
+ }
|
|
|
+ if (fragment != null) {
|
|
|
+ pushData.trueCreationTime = fragment?.creationTime
|
|
|
+ }
|
|
|
+ courseTitles.push(pushData);
|
|
|
+
|
|
|
if (emrConfig.value.editor) {
|
|
|
let editorCode = value['编辑者']?.value[0]?.code;
|
|
|
if (editorCode) {
|
|
@@ -1498,46 +1520,6 @@ const monitorPageRefresh = (event) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const medicalRecordQualityControl = async () => {
|
|
|
- // 空的编辑器,不触发这个
|
|
|
- if (stringIsBlank(categoryCode)) {
|
|
|
- return
|
|
|
- }
|
|
|
- // 如果有申请就不触发
|
|
|
- if (canIUnlockIt(unlockEnum.病历质控)) {
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- if (stringIsBlank(documentId)) {
|
|
|
- let {
|
|
|
- flag,
|
|
|
- message
|
|
|
- } = await createRestrictions(categoryCode, '', props.huanZheXinXi.inpatientNo + "_" + props.huanZheXinXi.admissTimes + '_' + doctorLevel)
|
|
|
- if (flag) {
|
|
|
- emptyEditor()
|
|
|
- BizException(ExceptionEnum.LOGICAL_ERROR, message)
|
|
|
- } else {
|
|
|
- if (stringNotBlank(message)) {
|
|
|
- xcMessage.success(message);
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (categoryCode !== emrCodeEnum.courseRecord) {
|
|
|
- let {
|
|
|
- flag,
|
|
|
- message
|
|
|
- } = await createRestrictions(categoryCode, documentId, props.huanZheXinXi.inpatientNo + "_" + props.huanZheXinXi.admissTimes + '_' + doctorLevel)
|
|
|
-
|
|
|
- if (flag) {
|
|
|
- editor.setEditorMode('readonly')
|
|
|
- ElMessageBox.alert(message, '提示', {type: 'error'}).then(r => {
|
|
|
- }).catch(() => {
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* 打开已经保存了的病历
|
|
|
* @param id 病历 id
|
|
@@ -1576,6 +1558,10 @@ onMounted(async () => {
|
|
|
})
|
|
|
autoSaveFunc()
|
|
|
|
|
|
+ emrMitt.on('editor', () => {
|
|
|
+ return editor
|
|
|
+ })
|
|
|
+
|
|
|
watch(() => visibility.value, () => {
|
|
|
// 离开页面的时候清空定时器
|
|
|
if (visibility.value === 'hidden' && isEditorChange) {
|
|
@@ -1687,20 +1673,14 @@ const 解析病程记录 = () => {
|
|
|
if (!fragmentData.creationTime) {
|
|
|
tempDate = values['查房时间']?.value
|
|
|
}
|
|
|
- data = {
|
|
|
- name: values['查房标题']?.value,
|
|
|
- createId: fragmentData.createId,
|
|
|
- creationTime: tempDate,
|
|
|
- referPhysician: extractFields('管床医生编码'),
|
|
|
- consultPhysician: extractFields('主治医生编码'),
|
|
|
- deptDirector: extractFields('主任医生编码'),
|
|
|
- }
|
|
|
+ data = fragmentData
|
|
|
+ data.creationTime = tempDate
|
|
|
}
|
|
|
if (!data.creationTime) {
|
|
|
- node.view.setAttribute('fragment', undefined)
|
|
|
saveDialog.close()
|
|
|
BizException(ExceptionEnum.MESSAGE_ERROR, '片段中存在异常查房时间,请检查。')
|
|
|
}
|
|
|
+ node.view.setAttribute('fragment', data)
|
|
|
fragment.push(data)
|
|
|
})
|
|
|
saveDialog.analyzeTheCourseOfTheDisease = false
|