浏览代码

优化电子病历

DESKTOP-0GD05B0\Administrator 2 年之前
父节点
当前提交
253e538221

+ 7 - 0
src/router/modules/dashboard.js

@@ -534,6 +534,13 @@ const route = [
                             title: '查看草药医嘱',
                         },
                     },
+                    {
+                        path: 'recoveryEmr',
+                        component: createNameComponent(() => import('@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/ResumeMedicalRecords.vue')),
+                        meta: {
+                            title: '恢复病历',
+                        },
+                    },
                 ],
             },
         ],

+ 13 - 12
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/EmrMain.vue

@@ -4,7 +4,8 @@
       <el-button :disabled="!emrConfig.editor" type="success" icon="CircleCheck" @click="clickSaveData">保存</el-button>
       <el-button :disabled="!emrConfig.editor" icon="Delete" type="danger" @click="clickDelete">删除</el-button>
       <el-button style="margin-left: 5px" @click="clickToSubmitTheMedicalRecord"
-                 :disabled="!documentId || !emrConfig.editor">提交病历
+                 :disabled="!documentId || !emrConfig.editor">
+        提交病历
       </el-button>
       <el-button-group>
         <el-button type="primary" icon="Printer" @click="frontEndPrinting">页面打印</el-button>
@@ -41,10 +42,9 @@
         <el-row>
           <el-col :span="20">
             <div class="emr-iframe">
-              <iframe
-                  ref="emrRef"
-                  :height="maxHeight - 80 + 'px' "
-                  :src="caseHistoryUrl"/>
+              <iframe ref="emrRef"
+                      :height="maxHeight - 80 + 'px' "
+                      :src="caseHistoryUrl"/>
             </div>
           </el-col>
           <el-col :span="4" style="background-color: white">
@@ -157,18 +157,18 @@ const clickSaveData = async () => {
   }
   objectValuesCannotBeNull(data)
   data.emrDataElement = editor.getDataElements('business')
+  // 检验是否必填项目
+  let validator = editor.getValidator();
+  let valid = validator.valid();
+  if (valid) {
+    BizException(ExceptionEnum.MESSAGE_ERROR, "有必填项不能为空,请仔细检查,红色输入框.")
+  }
   ElMessageBox.prompt('请输入保存的名称', '提示', {
     inputErrorMessage: '长度为2 - 20 个,汉字',
     inputPattern: /^\S{2,20}$/,
     inputValue: templateName
   }).then(async ({value}) => {
     data.name = value
-    // 检验是否必填项目
-    let validator = editor.getValidator();
-    let valid = validator.valid();
-    if (valid) {
-      BizException(ExceptionEnum.MESSAGE_ERROR, "有必填项不能为空,请仔细检查,红色输入框.")
-    }
     let res = await insertEmrData(data)
     currentEmr.value.saveDocument(data).then(emrRes => {
       // 把提取到的数据放到 patientData 中.
@@ -195,6 +195,7 @@ const clickSaveData = async () => {
   }).catch(() => {
 
   })
+
 }
 
 // 添加片段
@@ -660,7 +661,7 @@ onMounted(() => {
   })
   nextTick(async () => {
     emrSidebarRef.value.queryData()
-    patientId = props.huanZheXinXi.inpatientNo
+    patientId = props.huanZheXinXi.inpatientNo + '_' + props.huanZheXinXi.admissTimes
     await queryingBasicPatientInformation()
     currentEmr.value = new EMRInteractive(patientData, emrEvent);
     if (emrConfig.value.editor) {

+ 11 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/ResumeMedicalRecords.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script setup name='ResumeMedicalRecords'>
+
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 1 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-init.js

@@ -87,7 +87,7 @@ export function EMRInteractive(data, editorEvent) {
         return new Promise((resolve, reject) => {
             let document = this.editor.getDocument();
             document.properties.categoryCode = value.emrCategoryCode
-            document.properties.patientId = value.patNo;
+            document.properties.patientId = value.patNo + "_" + value.times;
             document.properties.creator = data['编辑者编码'];
             document.properties.createTime = new Date()
             document.properties.modifier = data['编辑者编码'];