瀏覽代碼

患者复制

DESKTOP-0GD05B0\Administrator 2 年之前
父節點
當前提交
2b2a2e3c90

+ 13 - 2
src/components/xiao-chan/xc-table-v3/XcTableV3.vue

@@ -41,6 +41,13 @@ const props = defineProps({
   rowClassName: {
     type: Function,
     default: null
+  },
+  highlightRow: {
+    type: Object,
+    default: {
+      key: null,
+      rowKey: 'tempDate'
+    }
   }
 })
 
@@ -106,14 +113,18 @@ useResizeObserver(tableRef, (entries) => {
 
 // 需要同时使用 highlight-current-row 不然当时没有效果因为渲染没有变化,所以要使用 highlight-current-row
 const rowClassName = ({row}) => {
+  if (props.highlightRow.key !== null) {
+    if (props.highlightRow.key === row[props.highlightRow.rowKey]) {
+      return 'current-row'
+    }
+  }
   if (props.rowClassName !== null) {
-    return props.rowClassName(row)
+    return props.rowClassName(row);
   } else {
     if (row === highlightCurrentRow) {
       return 'current-row';
     }
   }
-
 }
 
 const rowClick = (row, column, event) => {

+ 3 - 0
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrAuxiliaryTools.vue

@@ -10,6 +10,7 @@
       <el-button @click="open(1)" type="primary">护理</el-button>
       <el-button @click="open(2)" type="warning">检验</el-button>
       <el-button @click="open(3)" type="info">检查</el-button>
+      <el-button @click="open(4)" type="info">会诊</el-button>
     </template>
   </el-popover>
   <el-drawer v-model="drawer"
@@ -33,6 +34,7 @@
         :start="start"
         :end="end"/>
     <emr-inspect v-if="index === 3"/>
+    <emr-group-consultation v-if="index === 4"/>
   </el-drawer>
 
 </template>
@@ -46,6 +48,7 @@ import EmrInspect from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrIn
 import {getServerDateApi} from "@/api/public-api";
 import {formatDate} from "@/utils/date";
 import InspectionReportIndex from "@/views/examination/InspectionReportIndex.vue";
+import EmrGroupConsultation from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrGroupConsultation.vue";
 
 const props = defineProps({
   patInfo: {

+ 140 - 0
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrGroupConsultation.vue

@@ -0,0 +1,140 @@
+<template>
+  <div style="height: 5%"/>
+  <div style="height: 95%">
+    <el-auto-resizer>
+      <template #default="{ height, width }">
+        <div style="display: flex">
+          <div style="width: 50%">
+            <xc-table-v3 :height="height"
+                         :data="rightData"
+                         @row-click="rowClick"
+                         :columns="rightColumns"/>
+          </div>
+
+          <div class="right_main">
+            <el-button @click="copyClick">复制</el-button>
+            <div>
+              病情简介: {{ hzData.reqComment }}
+            </div>
+            <div>
+              目前主要诊断: {{ hzData.hzZd }}
+            </div>
+            <div>
+              会诊目的: {{ hzData.hzMd }}
+            </div>
+            <div>
+              会诊意见: {{ hzData.hzComment }}
+            </div>
+          </div>
+        </div>
+      </template>
+    </el-auto-resizer>
+  </div>
+</template>
+
+<script setup name='EmrGroupConsultation'>
+// 电子病历 查询会诊
+import {chaKanHuiZhenShenQing} from "@/api/case-front-sheet";
+import {patInfo} from './emr-tools-store'
+import XcTableV3 from "@/components/xiao-chan/xc-table-v3/XcTableV3.vue";
+import {getHuanZheXinXi} from "@/api/case-front-sheet/jie-shou-hui-zhen";
+import store from "@/store";
+import {
+  copyEnum,
+  setEmrCopy
+} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
+import {xcMessage} from "@/utils/xiaochan-element-plus";
+import {BizException, ExceptionEnum} from "@/utils/BizException";
+
+const rightData = ref([])
+const rightColumns = ref([
+  {
+    title: '申请时间',
+    key: 'inputDate'
+  },
+  {
+    title: '次数',
+    key: 'deptName'
+  },
+  {
+    title: '接受日期',
+    key: 'hzDate'
+  },
+  {
+    title: '接受医生',
+    key: 'hzDoctor2Name'
+  },
+  {
+    title: '申请人',
+    key: 'inputName'
+  },
+  {
+    title: '申请科室',
+    key: 'reqDeptName'
+  },
+  {
+    title: '类别',
+    key: 'hzLevelName'
+  },
+  {
+    title: '医生',
+    key: 'hzDoctor1Name'
+  }
+])
+
+const hzData = ref({})
+const query = () => {
+  chaKanHuiZhenShenQing(patInfo.value.inpatientNo, patInfo.value.admissTimes).then((res) => {
+    console.log(res)
+    rightData.value = res
+  })
+}
+
+const rowClick = (val) => {
+  getHuanZheXinXi(val.admissTimes, val.reqTimes, val.inpatientNo).then((res) => {
+    console.log(res)
+    hzData.value = res
+  })
+}
+
+
+const copyClick = () => {
+  let temp = hzData.value
+  if (!temp.inpatientNo) {
+    BizException(ExceptionEnum.MESSAGE_ERROR, "请先获取患者信息。")
+  }
+  let data = {
+    '会诊科室': [
+      {code: temp.reqDept1, name: temp.reqDept1Name}
+    ],
+    '会诊医生': [
+      {code: temp.hzDoctor2, name: temp.hzDoctor2Name}
+    ],
+    '会诊意见': temp.hzComment,
+    '编辑者': [
+      {code: store.state.user.info.code, name: store.state.user.info.name}
+    ]
+  }
+  setEmrCopy(copyEnum.会诊, data)
+  xcMessage.success('复制成功。')
+}
+
+onMounted(() => {
+  query()
+})
+
+
+</script>
+
+<style scoped lang="scss">
+.right_main {
+  flex: 1;
+
+  div {
+    margin: 5px 5px;
+    padding: 5px;
+    border: 1px solid #000;
+    border-radius: 5px;
+  }
+}
+</style>

+ 80 - 43
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrYzTemperature.vue

@@ -1,40 +1,63 @@
 <template>
-  <div style="height: 5%"/>
-  <div style="height: 95%">
+  <div style="height: 10%;font-size: 12px;display: flex">
+    <el-button @click="copyClick">复制</el-button>
+    <div style="width: 90%;color: blue;border: 1px solid #000;border-radius: 5px;padding: 0 5px">
+      {{ otherInfo }}
+    </div>
+  </div>
+  <div style="height: 90%">
     <el-auto-resizer>
       <template #default="{ height, width }">
         <xc-table-v3 :height="height"
                      :columns="columns"
-                     :data="list"/>
+                     @row-click="rowClick"
+                     :highlight-row="{key,rowKey: 'tempDate'}"
+                     :data="listRef"/>
       </template>
     </el-auto-resizer>
   </div>
 </template>
 
 <script setup name='EmrYzTemperature' lang="tsx">
-import {Ref, ref, h, onMounted} from "vue";
+import {Ref, ref, onMounted} from "vue";
 import {getYzTemperature} from "@/api/zhu-yuan-yi-sheng/emr-patient";
 import XcTableV3 from "@/components/xiao-chan/xc-table-v3/XcTableV3.vue";
 import {XcColumn} from "@/components/xiao-chan/xc-table-v3/XcColumn";
 import {patInfo} from './emr-tools-store'
-import {stringIsBlank} from '@/utils/blank-utils'
+import {emrClipBoardData} from '@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init'
 
 const columns: XcColumn[] = [
   {
     key: 'recDateStr',
     title: '日期',
     width: 80,
-    cellRenderer: ({cellData}) => (
-        <span>{cellData}</span>
-    )
+    cellRenderer: ({row, cellData, index}) => {
+      let temp = listRef.value[index - 1]
+      if (temp === null || typeof temp === 'undefined') {
+        return <span>{cellData}</span>
+      }
+      if (row.tempDate === temp.tempDate) {
+        return <span></span>
+      } else {
+        return <span>{cellData}</span>
+      }
+    }
   },
   {
     key: 'recTimeStr',
     title: '时间',
     width: 40,
-    cellRenderer: ({cellData}) => (
-        <span>{cellData}</span>
-    )
+    cellRenderer: ({row, cellData, index}) => {
+      let temp = listRef.value[index - 1]
+      if (temp === null || typeof temp === 'undefined') {
+        return <span>{cellData}</span>
+      }
+      if (row.tempDate === temp.tempDate) {
+        return <span></span>
+      } else {
+        return <span>{cellData}</span>
+      }
+    }
   },
   {
     key: 'patientState',
@@ -111,6 +134,7 @@ const columns: XcColumn[] = [
         width: 30,
         key: 'col1Am'
       },
+      // todo 颜色 状态 不知道
       {
         title: '颜色',
         width: 40
@@ -128,52 +152,65 @@ const columns: XcColumn[] = [
     width: 40
   },
   {
-    key: 'userid',
-    title: '护士签名',
-    width: 90
-  },
-  {
-    title: '血压 ',
-    width: 90,
+    title: '管道',
     children: [
-      {title: 'AM', key: 'pressure1Am'},
-      {title: 'PM', key: 'pressure1Pm'}
+      {
+        key: 'tubesName',
+        title: '管道名称',
+        width: 90
+      },
+      {
+        key: 'tubesStatus',
+        title: '管道情况',
+        width: 90
+      },
     ]
   },
-  {
-    key: 'tubesName',
-    title: '管道名称',
-    width: 90
-  },
-  {
-    key: 'tubesStatus',
-    title: '管道情况',
-    width: 90
-  },
   {
     key: 'otherInfo',
     title: '护理措施及效果',
     width: 240,
   },
+  {
+    key: 'userid',
+    title: '护士',
+    width: 70,
+    cellRenderer: ({row, cellData, index}) => {
+      let temp = listRef.value[index + 1]
+      if (temp === null || typeof temp === 'undefined') {
+        return <span>{cellData}</span>
+      }
+      if (row.tempDate === temp.tempDate) {
+        return <span></span>
+      } else {
+        return <span>{cellData}</span>
+      }
+    }
+  },
 ];
 
 const drawer: Ref<boolean> = ref(false)
-const list: Ref<Array<any>> = ref([])
+const listRef: Ref = ref([])
+const mapRef: Ref = ref({})
+const key: Ref<string> = ref('')
+const otherInfo: Ref<string> = ref('')
 
-const nullToEmpty = (val) => {
-  if (stringIsBlank(val)) {
-    return ''
-  } else {
-    return val
-  }
+const rowClick = (val) => {
+  key.value = val.tempDate
+  otherInfo.value = mapRef.value[key.value]?.otherInfo
 }
-
-
 const query = () => {
-  getYzTemperature(patInfo.value.inpatientNo, patInfo.value.admissTimes).then(res => {
-    drawer.value = true
-    list.value = res as any
-  })
+  getYzTemperature(patInfo.value.inpatientNo, patInfo.value.admissTimes)
+      .then((res) => {
+        let {list, map} = res
+        drawer.value = true
+        listRef.value = list
+        mapRef.value = map
+      })
+}
+
+const copyClick = () => {
+  emrClipBoardData(otherInfo.value)
 }
 
 onMounted(() => {

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

@@ -1,6 +1,8 @@
 import store from '@/store'
 import router from "@/router";
 import {deletePatientEmrByDocumentId, insertEmrData} from "@/api/zhu-yuan-yi-sheng/emr-patient";
+import {stringNotBlank} from "@/utils/blank-utils";
+import {xcMessage} from "@/utils/xiaochan-element-plus";
 
 // 患者数据
 export function EMRInteractive(data, editorEvent) {
@@ -177,6 +179,17 @@ export const copyEnum = {
     "会诊": 'huizhenjilv'
 }
 
+export const emrClipBoardData = (val) => {
+    if (stringNotBlank(val)) {
+        window.localStorage.setItem("clipBoardData",
+            JSON.stringify({
+                content: [{type: 'text', data: val}],
+                plainText: val,
+            }));
+        xcMessage.success('复制成功。')
+    }
+}
+
 export const fontSizes = [
     {
         "code": "42pt",