|
@@ -1,7 +1,6 @@
|
|
|
<template>
|
|
|
<el-container>
|
|
|
<el-header>
|
|
|
- <!-- <el-button icon="ArrowLeft" style="font-size: 14px" text @click="clickBack">返回</el-button>-->
|
|
|
住院次数:
|
|
|
<el-input-number :min="1" :max="huanZheXinXi.admissTimes" v-model="tempTimes"/>
|
|
|
<el-button @click="resetData">历史记录</el-button>
|
|
@@ -16,6 +15,11 @@
|
|
|
<el-button style="margin-left: 5px" type="primary" @click="openAssistant = true">
|
|
|
电子助手
|
|
|
</el-button>
|
|
|
+ <el-button-group>
|
|
|
+ <el-button icon="RefreshLeft" @click="clickUndo('undo')">撤销</el-button>
|
|
|
+ <el-button icon="RefreshRight" @click="clickUndo('redo')">重做</el-button>
|
|
|
+ </el-button-group>
|
|
|
+
|
|
|
<emr-assistant v-model="openAssistant"/>
|
|
|
<el-switch v-model="reviewMode" active-color="#ff4949" active-text="关闭审阅" :active-value="false"
|
|
|
inactive-color="#13ce66" inactive-text="开启审阅" :inactive-value="true">
|
|
@@ -57,7 +61,6 @@ import EmrSidebar from "@/components/zhu-yuan-yi-sheng/emr/EmrSidebar.vue";
|
|
|
import {EMRInteractive} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-init";
|
|
|
import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
import {BizException, ExceptionEnum} from "@/utils/BizException";
|
|
|
-import router from '@/router'
|
|
|
import EmrSnippet from "@/components/zhu-yuan-yi-sheng/emr/EmrSnippet.vue";
|
|
|
import store from "@/store";
|
|
|
import {onBeforeRouteLeave} from "vue-router";
|
|
@@ -121,17 +124,17 @@ const clickSaveData = async () => {
|
|
|
patNo: props.huanZheXinXi.inpatientNo,
|
|
|
times: props.huanZheXinXi.admissTimes,
|
|
|
emrName: templateName,
|
|
|
- emrDataElement: editor.getDataElements('business')
|
|
|
}
|
|
|
-
|
|
|
objectValuesCannotBeNull(data)
|
|
|
+ data.emrDataElement = editor.getDataElements('business')
|
|
|
ElMessageBox.prompt('请输入保存的名称', '提示', {
|
|
|
inputErrorMessage: '长度为2 - 20 个,汉字',
|
|
|
inputPattern: /^\S{2,20}$/,
|
|
|
inputValue: templateName
|
|
|
}).then(({value}) => {
|
|
|
data.name = value
|
|
|
- currentEmr.value.saveDocument(data, () => {
|
|
|
+ currentEmr.value.saveDocument(data, async () => {
|
|
|
+
|
|
|
isEditorChange = false
|
|
|
emrSidebarRef.value.queryData()
|
|
|
updateCaseHistoryUrl({
|
|
@@ -246,13 +249,14 @@ const nodeClick = (val, jumpOrNot, templateType) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const updateCaseHistoryUrl = (val) => {
|
|
|
+const updateCaseHistoryUrl = async (val) => {
|
|
|
loaded = true
|
|
|
isEditorChange = false
|
|
|
documentId = val.documentId;
|
|
|
categoryCode = val.categoryCode
|
|
|
templateName = val.name
|
|
|
categroyId = val.categoryId
|
|
|
+ await queryingBasicPatientInformation()
|
|
|
caseHistoryUrl = `/emr/runtime/?documentId=${documentId}&categoryCode=${categoryCode}&categoryId=${categroyId}&patientId=${patientId}#/`
|
|
|
}
|
|
|
|
|
@@ -272,12 +276,6 @@ const positioningTime = (val, code) => {
|
|
|
}
|
|
|
|
|
|
|
|
|
-const clickBack = () => {
|
|
|
- checkEmrChange(() => {
|
|
|
- router.push('/inpatient/zhuYuanYiSheng/yiZhuLuRu')
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
const monitorPageRefresh = (event) => {
|
|
|
if (isEditorChange) {
|
|
|
event.preventDefault();
|
|
@@ -313,13 +311,14 @@ const getCurrentPersonnelInformation = (data) => {
|
|
|
}
|
|
|
|
|
|
const emrEvent = {
|
|
|
- 'loaded': (event) => {
|
|
|
+ 'loaded': async (event) => {
|
|
|
editor = currentEmr.value.getEditor()
|
|
|
loaded = false
|
|
|
setEditorModeFun()
|
|
|
setTheProgressAnchor()
|
|
|
courseSegmentLocking()
|
|
|
deleteDataElement()
|
|
|
+ reQueryPatientInformation()
|
|
|
},
|
|
|
|
|
|
'contentchange': (event) => {
|
|
@@ -421,6 +420,25 @@ const deleteDataElement = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 重新查询患者信息
|
|
|
+ */
|
|
|
+const reQueryPatientInformation = () => {
|
|
|
+ editor.setValues(patientData)
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 撤销或者重做
|
|
|
+ */
|
|
|
+const clickUndo = (val) => {
|
|
|
+ try {
|
|
|
+ editor.execute(val)
|
|
|
+ } catch (e) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 单击“提交病历”
|
|
|
*/
|
|
@@ -441,14 +459,18 @@ watch(() => visibility, () => {
|
|
|
}
|
|
|
}, {deep: true, immediate: true})
|
|
|
|
|
|
+
|
|
|
+const queryingBasicPatientInformation = async () => {
|
|
|
+ patientData = await getEmrInpatientData({
|
|
|
+ patNo: props.huanZheXinXi.inpatientNo,
|
|
|
+ times: props.huanZheXinXi.admissTimes
|
|
|
+ })
|
|
|
+ getCurrentPersonnelInformation(patientData)
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
nextTick(async () => {
|
|
|
- patientData = await getEmrInpatientData({
|
|
|
- patNo: props.huanZheXinXi.inpatientNo,
|
|
|
- times: props.huanZheXinXi.admissTimes
|
|
|
- })
|
|
|
emrSidebarRef.value.queryData()
|
|
|
- getCurrentPersonnelInformation(patientData)
|
|
|
patientId = props.huanZheXinXi.inpatientNo
|
|
|
currentEmr.value = new EMRInteractive(patientData, emrEvent);
|
|
|
emrSnippetRef.value.setPatientData(patientData)
|