|
|
@@ -35,7 +35,7 @@
|
|
|
<el-divider direction="vertical"/>
|
|
|
<el-button-group>
|
|
|
<!-- 工具 -->
|
|
|
- <emr-auxiliary-tools :pat-info="props.huanZheXinXi"
|
|
|
+ <emr-auxiliary-tools :pat-info="patientInfo"
|
|
|
@to-fill-in-data="clickToFillInData"
|
|
|
:emr-data="patientData"/>
|
|
|
<el-button @click="drgIntelligentGrouping"
|
|
|
@@ -149,8 +149,7 @@
|
|
|
:doctor-grade="doctorLevel"
|
|
|
:extract-data="extractData"
|
|
|
:patientData="patientData"
|
|
|
- :max-height="maxHeight"
|
|
|
- :huan-zhe-xin-xi="props.huanZheXinXi"/>
|
|
|
+ :max-height="maxHeight"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="emr-editor"
|
|
|
@@ -186,7 +185,7 @@
|
|
|
<div style="position: relative">
|
|
|
<emr-popup ref="popupRef"
|
|
|
@fill-data="popupFunc.fillData"/>
|
|
|
- <emr-web-socket :pat-info="props.huanZheXinXi"
|
|
|
+ <emr-web-socket :pat-info="patientInfo"
|
|
|
:current-editor-user="currentEditorUser"
|
|
|
ref="emrSocket"/>
|
|
|
<div class="creator_prompt" v-loading="emrConfig.loadDocument">
|
|
|
@@ -231,7 +230,7 @@
|
|
|
style="width: 100%;overflow-y:auto"
|
|
|
:style="{height : iframeHeight() }">
|
|
|
<!-- 病案首页 -->
|
|
|
- <emr-first-page-of-medical-record :pat-info="huanZheXinXi"/>
|
|
|
+ <emr-first-page-of-medical-record/>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
@@ -301,7 +300,7 @@ import {
|
|
|
delEmrCopy,
|
|
|
emrConfig,
|
|
|
emrMitt, EmrParam,
|
|
|
- getEmrCopy,
|
|
|
+ getEmrCopy, loadingTime, patientInfo,
|
|
|
query
|
|
|
} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
|
|
|
import {ElInput, ElMessage, ElMessageBox} from "element-plus";
|
|
|
@@ -371,11 +370,10 @@ import {
|
|
|
useEmrInit,
|
|
|
UseEmrInitReturn
|
|
|
} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init-v2";
|
|
|
+import moment from "moment";
|
|
|
+import {formatDateToStr} from "@/utils/moment-utils";
|
|
|
|
|
|
const props = defineProps({
|
|
|
- huanZheXinXi: {
|
|
|
- type: Object,
|
|
|
- },
|
|
|
maxHeight: {
|
|
|
type: Number
|
|
|
},
|
|
|
@@ -681,7 +679,7 @@ const setEditorModel = (val: EditorMode = 'free') => {
|
|
|
|
|
|
const sendEmrSocketMessageAndHighlight = (message, flag, userInfo) => {
|
|
|
sendEmrSocketMessage({
|
|
|
- sid: 'emr_' + props.huanZheXinXi.inpatientNo.trim() + "_" + props.huanZheXinXi.admissTimes,
|
|
|
+ sid: 'emr_' + patientInfo.value.inpatientNo.trim() + "_" + patientInfo.value.admissTimes,
|
|
|
userInfo,
|
|
|
message: JSON.stringify({"receivedMessage": {message, flag}})
|
|
|
})
|
|
|
@@ -786,8 +784,8 @@ const clickSaveData = async () => {
|
|
|
name: '',
|
|
|
emrDocumentId: id,
|
|
|
emrCategoryCode: categoryCode.value,
|
|
|
- patNo: props.huanZheXinXi.inpatientNo,
|
|
|
- times: props.huanZheXinXi.admissTimes,
|
|
|
+ patNo: patientInfo.value.inpatientNo,
|
|
|
+ times: patientInfo.value.admissTimes,
|
|
|
emrName: templateName.value,
|
|
|
fragment: [],
|
|
|
parent: parent,
|
|
|
@@ -1235,8 +1233,8 @@ const clickToSubmitTheMedicalRecord = async () => {
|
|
|
*/
|
|
|
const queryingBasicPatientInformation = async () => {
|
|
|
patientData.value = await getEmrInpatientData({
|
|
|
- patNo: props.huanZheXinXi.inpatientNo,
|
|
|
- times: props.huanZheXinXi.admissTimes
|
|
|
+ patNo: patientInfo.value.inpatientNo,
|
|
|
+ times: patientInfo.value.admissTimes
|
|
|
})
|
|
|
getCurrentPersonnelInformation()
|
|
|
}
|
|
|
@@ -1249,7 +1247,7 @@ const drgData = ref({
|
|
|
|
|
|
// 点击查看 drg 分组 通过打开 dialog 的方式, 后续可以使用打开新的页面
|
|
|
const drgIntelligentGrouping = () => {
|
|
|
- getDrgIntelligentGrouping(props.huanZheXinXi.inpatientNo, props.huanZheXinXi.admissTimes).then(async (res) => {
|
|
|
+ getDrgIntelligentGrouping(patientInfo.value.inpatientNo, patientInfo.value.admissTimes).then(async (res) => {
|
|
|
drgData.value.dialog = true
|
|
|
drgData.value.url = res as string
|
|
|
})
|
|
|
@@ -1481,7 +1479,7 @@ const showIframe = ref(1)
|
|
|
const visibility = useDocumentVisibility()
|
|
|
|
|
|
// 创建和编辑病历
|
|
|
-const emrEditCreateLimit = new EmrEditCreateLimit(props.huanZheXinXi, userInfoStore.value)
|
|
|
+const emrEditCreateLimit = new EmrEditCreateLimit(patientInfo.value, userInfoStore.value)
|
|
|
|
|
|
const currentEditorFunc = XEUtils.debounce(() => {
|
|
|
// 再看病历并且现在是编辑的状态,就执行这一步
|
|
|
@@ -1508,10 +1506,10 @@ const watchVisibility = () => {
|
|
|
watch(() => visibility.value, () => {
|
|
|
// 离开页面的时候清空定时器
|
|
|
if (visibility.value === 'hidden' && isEditorChange.value) {
|
|
|
- document.title = `患者【${props.huanZheXinXi.name}】,未保存数据`
|
|
|
+ document.title = `患者【${patientInfo.value.name}】,未保存数据`
|
|
|
} else {
|
|
|
currentEditorFunc()
|
|
|
- document.title = `电子病历-正在编辑【${props.huanZheXinXi.name}】`
|
|
|
+ document.title = `电子病历-正在编辑【${patientInfo.value.name}】`
|
|
|
}
|
|
|
}, {immediate: true})
|
|
|
}
|
|
|
@@ -1646,8 +1644,12 @@ const initEdit = () => {
|
|
|
},
|
|
|
data: patientData.value
|
|
|
}
|
|
|
- emrConfig.value.loading = true
|
|
|
+ // emrConfig.value.loading = true
|
|
|
useEmrInit(editRef.value, {appContext, event: emrEvent}).then((res) => {
|
|
|
+ emrMitt.emit('closeProgress')
|
|
|
+ const end = moment(new Date())
|
|
|
+ const start = formatDateToStr(loadingTime.value)
|
|
|
+ xcMessage.success(`加载完成耗时${end.diff(start, 'seconds')}秒`)
|
|
|
editor = res.editor
|
|
|
runtime = res.runtime
|
|
|
editMain = res
|
|
|
@@ -1669,11 +1671,14 @@ const hisSaveEmrInit = () => {
|
|
|
let hisSaveEmr: UseEmrInitReturn = {}
|
|
|
|
|
|
onMounted(async () => {
|
|
|
- extractData.value = await getExtractDataElement(props.huanZheXinXi.inpatientNo, props.huanZheXinXi.admissTimes)
|
|
|
+ doctorLevelFunc()
|
|
|
await nextTick()
|
|
|
await queryingBasicPatientInformation()
|
|
|
+ await nextTick()
|
|
|
initEdit()
|
|
|
- doctorLevelFunc()
|
|
|
+ getExtractDataElement(patientInfo.value.inpatientNo, patientInfo.value.admissTimes).then(res => {
|
|
|
+ extractData.value = res
|
|
|
+ })
|
|
|
window.addEventListener('beforeunload', monitorPageRefresh, {capture: true})
|
|
|
emrMittInit()
|
|
|
watchVisibility()
|