Browse Source

电子病历新需求

DESKTOP-0GD05B0\Administrator 2 years ago
parent
commit
7551e113e5

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

@@ -237,7 +237,7 @@ export function getEmrTipsData(name) {
     })
 }
 
-export function hotSearchSorting(userCode, code, tableName,) {
+export function hotSearchSorting(userCode, code, tableName) {
     return request({
         url: url + 'hotSearchSorting',
         method: 'get',
@@ -245,6 +245,14 @@ export function hotSearchSorting(userCode, code, tableName,) {
     })
 }
 
+export function getListOfDischargedPatients(patNo) {
+    return request({
+        url: url + 'getListOfDischargedPatients',
+        method: 'get',
+        params: {patNo}
+    })
+}
+
 
 
 

+ 5 - 1
src/components/xiao-chan/xc-table/XcTable.vue

@@ -5,7 +5,7 @@
       style="width: 100%"
       @selection-change="selectionChange"
       @row-click="rowClick"
-      :height="visibleWindowSize.height - props.height  "
+      :height="props.finalHeight === null ? visibleWindowSize.height - props.height : props.finalHeight"
       highlight-current-row
       @row-contextmenu="contextmenu"
       :row-key="props.rowKey"
@@ -34,6 +34,10 @@ import {getVisibleSize, visibleWindowSize} from "@/utils/window-size";
 import {onClickOutside} from "@vueuse/core";
 
 const props = defineProps({
+  finalHeight: {
+    type: Number,
+    default: null
+  },
   data: {
     type: Object,
     default: null

+ 56 - 0
src/components/zhu-yuan-yi-sheng/emr/EmrLeaveHospitalPatient.vue

@@ -0,0 +1,56 @@
+<template>
+  <el-button @click="clickQuery">
+    出院患者
+  </el-button>
+
+  <xc-dialog-v2 v-model="dialog" title="出院患者信息">
+    <xc-table :local-data="list" :final-height="500" @rowClick="rowClick">
+      <el-table-column prop="name" label="姓名"/>
+      <el-table-column prop="admissTimes" label="住院次数"/>
+      <el-table-column prop="admissDate" label="入院时间"/>
+      <el-table-column prop="disDate" label="出院时间"/>
+      <el-table-column prop="zkWard" label="科室"/>
+      <el-table-column prop="admissWard" label="入院科室"/>
+      <el-table-column prop="disWard" label="出院科室"/>
+    </xc-table>
+  </xc-dialog-v2>
+
+</template>
+
+<script setup name='EmrLeaveHospitalPatient'>
+// 电子病历中查询出院患者信息
+import {stringIsBlank} from "@/utils/blank-utils";
+import {xcMessage} from "@/utils/xiaochan-element-plus";
+import {getListOfDischargedPatients} from "@/api/zhu-yuan-yi-sheng/emr-patient";
+import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
+import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
+import {query} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-init";
+
+let dialog = $ref(false)
+let list = $ref([])
+
+const emit = defineEmits(['rowClick'])
+let patNo = '1'
+const clickQuery = () => {
+  if (stringIsBlank(query.value.patNo)) return xcMessage.error('请输入住院号')
+  if (patNo === query.value.patNo) return dialog = true
+  getListOfDischargedPatients(query.value.patNo).then(res => {
+    patNo = query.value.patNo
+    list = res
+    dialog = true
+  })
+}
+
+const rowClick = ({inpatientNo, admissTimes}) => {
+  query.value.patNo = inpatientNo
+  query.value.times = admissTimes
+  emit('rowClick')
+  dialog = false
+}
+
+
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 0 - 1
src/components/zhu-yuan-yi-sheng/emr/EmrPopup.vue

@@ -31,7 +31,6 @@ const inputValue = ref()
 const gridRef = ref()
 
 const positionChange = (evt, view, position) => {
-  console.log(position)
   position.x = position.x + 2 + 'px'
   position.y += 'px'
   coordinate.value = position

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

@@ -100,7 +100,7 @@
       </el-button-group>
     </el-header>
     <el-container>
-      <div :class="foldBothSides.isLeft ? 'editor-template-open' : 'editor-template-put-away' ">
+      <div :class="foldBothSides.isLeft ? 'emr-template-open' : 'emr-template-put-away' ">
         <emr-sidebar @nodeClick="nodeClick"
                      @patient-medical-record="foldBothSides.isLeft = true"
                      v-show="foldBothSides.isLeft"
@@ -258,7 +258,7 @@
                   :src="caseHistoryUrl"/>
         </div>
       </div>
-      <div :class="foldBothSides.isRight ? 'editor-fragment-open' : 'editor-fragment-put-away' ">
+      <div :class="foldBothSides.isRight ? 'emr-fragment-open' : 'emr-fragment-put-away' ">
         <emr-snippet
             v-show="foldBothSides.isRight"
             @node-click="clickSnippet"
@@ -330,7 +330,7 @@ let documentId = $ref('')
 let patientId = $ref('')
 let categoryId = $ref('')
 let templateName = $ref('')
-let caseHistoryUrl = $ref('/editor/runtime/#/editor')
+let caseHistoryUrl = $ref('/emr/runtime/#/editor')
 let openAssistant = $ref({
   data: {},
   dialog: false
@@ -422,7 +422,7 @@ const emrEvent = {
   'contentchange': (event) => {
     if (!readonlyPattern()) {
       // 如果是空的编辑器就不触发了
-      if (!emrRef.value.src.includes('/editor/runtime/#/editor')) {
+      if (!emrRef.value.src.includes('/emr/runtime/#/editor')) {
         // 判断内容是否改变
         isEditorChange = true
         emrSidebarRef.value.changeTemplateType(2)
@@ -447,8 +447,8 @@ const emrEvent = {
   'ready': (event) => {
     editor = currentEmr.value.getEditor()
     popupFunc.setShortcutKey()
+    rightClickOnRegistration()
   }
-
 }
 
 // 点击保存病历
@@ -636,7 +636,7 @@ const nodeClick = (val, jumpOrNot, templateType) => {
 
 const updateCaseHistoryUrl = async (val) => {
   courseSegmentLocking()
-  let temp = `/editor/runtime/?documentId=${val.documentId}&categoryCode=${val.categoryCode}&categoryId=${val.categoryId}&patientId=${patientId}#/`
+  let temp = `/emr/runtime/?documentId=${val.documentId}&categoryCode=${val.categoryCode}&categoryId=${val.categoryId}&patientId=${patientId}#/`
   if (temp === caseHistoryUrl) return
   loaded = true
   isEditorChange = false
@@ -644,7 +644,7 @@ const updateCaseHistoryUrl = async (val) => {
   categoryCode = val.categoryCode
   templateName = val.name
   categoryId = val.categoryId
-  caseHistoryUrl = `/editor/runtime/?documentId=${documentId}&categoryCode=${categoryCode}&categoryId=${categoryId}&patientId=${patientId}#/`
+  caseHistoryUrl = `/emr/runtime/?documentId=${documentId}&categoryCode=${categoryCode}&categoryId=${categoryId}&patientId=${patientId}#/`
 }
 
 // 空的编辑器
@@ -1159,6 +1159,7 @@ const popupRef = ref(null)
 const popupFunc = {
   setShortcutKey: () => {
     editor.setShortcutKey("ALT+Q", (evt, view, position) => {
+      console.log(position)
       popupRef.value.positionChange(evt, view, position)
     });
   },
@@ -1169,6 +1170,24 @@ const popupFunc = {
 
 }
 
+const rightClickOnRegistration = () => {
+  editor.regCtxMenu({
+    global: [{
+      text: '病历提示',
+
+      handler: function (menu) {
+        console.log(menu)
+        let position = {
+          x: menu.x,
+          y: menu.y
+        }
+        popupRef.value.positionChange(null, null, position)
+      }
+
+    }]
+  })
+}
+
 
 onMounted(() => {
   getExtractDataElement(props.huanZheXinXi.inpatientNo, props.huanZheXinXi.admissTimes).then((res) => {

+ 2 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/Home.vue

@@ -5,7 +5,7 @@
       <el-input v-model="query.patNo" @keydown.enter="getMaxTimes" style="width: 120px"/>
       次数 ({{ query.maxTimes }}) :
       <el-input-number v-model="query.times" @keydown.enter="disPatients"/>
-      <el-button @click="disPatients">出院患者</el-button>
+      <emr-leave-hospital-patient @rowClick="disPatients"/>
       <el-button @click="allPatientsInTheHospital">全院患者</el-button>
       <el-button @click="patientListDrawer = !patientListDrawer">患者列表</el-button>
       出院天数:{{ dischargeDays }}
@@ -42,6 +42,7 @@ import {
   resolveRoute
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-init";
 import EmrPatientList from "@/components/zhu-yuan-yi-sheng/emr/EmrPatientList.vue";
+import EmrLeaveHospitalPatient from "@/components/zhu-yuan-yi-sheng/emr/EmrLeaveHospitalPatient.vue";
 
 const divRef = ref(null)
 const headerRef = ref(null)