浏览代码

住院医生和电子病历优化

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

+ 7 - 1
src/api/zhu-yuan-yi-sheng/emr-patient.js

@@ -79,5 +79,11 @@ export function submitMedicalRecord(documentId) {
 }
 
 
-
+export function getDrgIntelligentGrouping(patNo, times) {
+    return request({
+        url: url + 'getDrgIntelligentGrouping',
+        method: 'get',
+        params: {patNo, times}
+    })
+}
 

+ 2 - 2
src/components/zhu-yuan-yi-sheng/emr/EmrSidebar.vue

@@ -91,7 +91,7 @@ const handleNodeClick = async (val, property, event) => {
       categoryCode: val.emrCategoryCode,
       categoryId: null,
       patientId: null,
-      name: val.emrName
+      name: val.emrName ? val.emrName : val.name
     }
   }
   let str = JSON.stringify(val)
@@ -111,11 +111,11 @@ const handleNodeClick = async (val, property, event) => {
       }
     }
   }
-
   if (val.jump) {
     temp.code = val.code
     temp.value = val.value
     emit('nodeClick', temp, true, templateType);
+    key = str
   } else {
     if (key !== str) {
       key = str

+ 12 - 2
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/table/YzTable.vue

@@ -71,6 +71,7 @@ import {getFormatDatetime} from "@/utils/date";
 import {computed, defineEmits, defineProps, nextTick, onMounted, Ref, ref, watch} from 'vue'
 import sleep from "@/utils/sleep";
 import store from "@/store"
+import {ElScrollbar} from "element-plus";
 
 const props = defineProps({
   data: {
@@ -222,7 +223,8 @@ watch(() => tempYzData.value, (oldData, newData) => {
   }
 })
 
-const elScrollbarRef: Ref<HTMLElement> = ref()
+const elScrollbarRef = ref<InstanceType<typeof ElScrollbar>>()
+
 
 const windowSize = computed(() => {
   calculateTableHeight()
@@ -231,10 +233,18 @@ const windowSize = computed(() => {
 
 const calculateTableHeight = async () => {
   await nextTick()
-  let divTop = elScrollbarRef.value['wrap$'].getBoundingClientRect().top
+  let divTop = elScrollbarRef.value.wrap$.getBoundingClientRect().top
   maxHeight.value = Math.ceil(windowSize.value.h - divTop + 60)
 }
 
+const scrollToTheEnd = () => {
+  elScrollbarRef.value!.setScrollTop(virtualHeight.value)
+}
+
+defineExpose({
+  scrollToTheEnd
+})
+
 
 const nu = (val) => {
   if (val === null) {

+ 1 - 2
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue

@@ -645,6 +645,7 @@ const isEdit = computed(() => {
 
 let baoCunXinXiRef = ref(null)
 const toAddAnOrder = async () => {
+
   if (stringIsBlank(props.patientInfo.inpatientNo)) {
     BizException(ExceptionEnum.MESSAGE_ERROR, '请先选择患者')
   }
@@ -828,8 +829,6 @@ onMounted(async () => {
   await nextTick();
   // 获取编辑器的宽度
   winsize.value.editor = editingAreaRef.value.clientWidth
-  console.log(editingAreaRef)
-  console.log(winsize.value.editor)
 
   let inputs = editorMainRef.value.querySelectorAll('input')
 

+ 7 - 4
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-header/YzQueryCondition.vue

@@ -78,17 +78,20 @@ const props = defineProps({
   clickOnTheOrderTemplate: Function
 })
 
-const queryYz = () => {
+const queryYz = async () => {
   if (!props.patientInfo.inpatientNo) {
     BizException(ExceptionEnum.MESSAGE_ERROR, '请先选择患者')
   }
   queryParam.value.patNo = props.patientInfo.inpatientNo
   queryParam.value.times = props.patientInfo.admissTimes
-  huoQuYiZhuShuJu(queryParam.value).then((res) => {
+
+  try {
+    let res = await huoQuYiZhuShuJu(queryParam.value)
     yzData.value = res
-  }).catch(() => {
+  } catch (e) {
     yzData.value = []
-  })
+  }
+
 }
 
 const currentConfirmOrdersClick = () => {

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

@@ -23,6 +23,8 @@
         <el-button icon="RefreshRight" @click="clickUndo('redo')">重做</el-button>
       </el-button-group>
 
+      <el-button @click="drgIntelligentGrouping">DRG智能分组</el-button>
+
       <emr-assistant :data="openAssistant" :to-fill-in-data="clickToFillInData"/>
       <el-switch v-model="reviewMode" active-color="#ff4949" active-text="关闭审阅" :active-value="false"
                  inactive-color="#13ce66" inactive-text="开启审阅" :inactive-value="true">
@@ -68,7 +70,11 @@ import EmrSnippet from "@/components/zhu-yuan-yi-sheng/emr/EmrSnippet.vue";
 import store from "@/store";
 import {onBeforeRouteLeave} from "vue-router";
 import {getUuid} from "@/api/public-api";
-import {submitMedicalRecord} from "@/api/zhu-yuan-yi-sheng/emr-patient";
+import {
+  deletePatientEmrByDocumentId,
+  getDrgIntelligentGrouping,
+  submitMedicalRecord
+} from "@/api/zhu-yuan-yi-sheng/emr-patient";
 import {useDocumentVisibility} from "@vueuse/core";
 import EmrAssistant from "@/components/zhu-yuan-yi-sheng/emr/EmrAssistant.vue";
 
@@ -208,6 +214,10 @@ const servicePrint = () => {
 const clickDelete = () => {
   waitForLoadingToComplete()
   whetherThereIsAMedicalRecordId()
+  // deletePatientEmrByDocumentId(documentId).then(() => {
+  //
+  // })
+  // return
   ElMessageBox.alert('是否要删除该模板。', '提示', {
     type: 'warning'
   }).then(() => {
@@ -263,6 +273,7 @@ const nodeClick = (val, jumpOrNot, templateType) => {
     if (val.documentId === documentId) {
       positioningTime(val.value, val.code)
     } else {
+      console.log(val)
       updateCaseHistoryUrl(val);
       jumpPositioning = {
         value: val.value,
@@ -422,8 +433,8 @@ const courseSegmentLocking = () => {
           jump: true
         })
         // select dept_director /* 主任医生*/,
+        // consult_physician /*主治医生*/
         //     refer_physician /*管床医生*/,
-        //     consult_physician /*主治医生*/
         // from zy_actpatient;
         let editorCode = values['编辑者']?.value[0]?.code
         if (editorCode) {
@@ -493,7 +504,10 @@ watch(() => visibility.value, () => {
   }
 }, {immediate: true})
 
-
+/**
+ * 查询患者信息
+ * @returns {Promise<void>}
+ */
 const queryingBasicPatientInformation = async () => {
   patientData = await getEmrInpatientData({
     patNo: props.huanZheXinXi.inpatientNo,
@@ -503,6 +517,13 @@ const queryingBasicPatientInformation = async () => {
   openAssistant.data = patientData
 }
 
+// DRG 智能分组
+const drgIntelligentGrouping = () => {
+  getDrgIntelligentGrouping(props.huanZheXinXi.inpatientNo, props.huanZheXinXi.admissTimes).then((res) => {
+    console.log(res)
+  })
+}
+
 onMounted(() => {
   nextTick(async () => {
     emrSidebarRef.value.queryData()

+ 17 - 42
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -7,16 +7,15 @@
                         :click-on-the-order-template="clickOnTheOrderTemplate"
                         :confirm-orders-click="confirmOrdersClick"/>
     <div>
-      <el-button @click="orderTemplateClick">维护模板</el-button>
-      <el-button type="warning" @click="clickToStopTheOrder">批量停止</el-button>
+      <button @click="orderTemplateClick">维护模板</button>
+      <button type="warning" @click="clickToStopTheOrder">批量停止</button>
       <el-divider direction="vertical"></el-divider>
-      <el-button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)"
+      <button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)"
                  @click="clickToModifyTheDoctorSOrderTime"> 修改医嘱时间
-      </el-button>
-      <el-button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)" @click="jumpToMedicalRecord"> 病案首页
-      </el-button>
-      <el-button type="primary" @click="openElectronicMedicalRecord"> 电子病历</el-button>
-      <el-button type="danger" @click="clickDrugReturn"> 退药</el-button>
+      </button>
+      <button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)" @click="jumpToMedicalRecord"> 病案首页
+      </button>
+      <button type="primary" @click="openElectronicMedicalRecord"> 电子病历</button>
     </div>
     <div>
       <yz-editor :patient-info="huanZheXinXi"
@@ -27,6 +26,7 @@
 
     <div style="overflow-x: auto" :style="{width: winsize.main - 20  + 'px'}">
       <yz-table :data="tempYzData"
+                ref="tableRef"
                 @rowClick="rowClick"
                 :void-orders="voidOrdersClick"/>
     </div>
@@ -63,7 +63,7 @@ import {
   youWuXuanZheHuanZhe,
   getYzIndex,
   winsize,
-  zkList, selectedData
+  zkList, selectedData, queryParam
 } from '../public-js/zhu-yuan-yi-sheng'
 import store from '@/store'
 import {stringIsBlank} from '@/utils/blank-utils'
@@ -94,8 +94,12 @@ const yzQueryRef = ref(null)
 
 // 医嘱编辑
 const yzEditorRef = ref(null)
-const successfullyEntered = () => {
-  yzQueryRef.value.queryYz()
+const successfullyEntered = async () => {
+  await yzQueryRef.value.queryYz()
+  queryParam.value.displayRange = 0
+  queryParam.value.frequCode = 0
+  queryParam.value.zhuangTai = 0
+  tableRef.value.scrollToTheEnd()
   addYiZhuClick()
 }
 /**
@@ -110,7 +114,7 @@ const addYiZhuClick = () => {
  */
 const confirmOrdersClick = async () => {
   await yzEditorRef.value.confirmOrdersClick()
-  yzQueryRef.value.queryYz()
+  await yzQueryRef.value.queryYz()
 }
 
 /**
@@ -121,7 +125,7 @@ const toDeleteAnOrder = () => {
 }
 
 // 表格
-let tableRef = $ref(null)
+let tableRef = ref(null)
 const rowClick = (val) => {
   yzEditorRef.value.fillData(val)
 }
@@ -317,35 +321,6 @@ const jumpToMedicalRecord = () => {
   })
 }
 
-/**
- * 点击医嘱退药
- */
-const clickDrugReturn = () => {
-  if (xuanZhongDeShuJu.value.length === 0) {
-    return ElMessage.error('请先选中数据')
-  }
-  ElMessageBox.confirm('请确认是否要退这些药品,项目无法退费。', '提示', {
-    type: 'warning',
-    confirmButtonText: '已确认',
-    cancelButtonText: '让我在想想'
-  }).then(() => {
-    let temp = []
-    xuanZhongDeShuJu.value.forEach(item => {
-      if (item.serial !== '00' && item.drugFlag !== 'd' && item.orderCode !== '06054') {
-        temp.push(item.id)
-      }
-    })
-
-    drugWithdrawal(temp).then(() => {
-      tableRef.clearSelection(false)
-    })
-
-  }).catch(() => {
-
-  })
-
-}
-
 
 </script>