瀏覽代碼

优化住院医生

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

+ 67 - 82
src/components/hui-zhen-da-ying/DaYingHuiZhen.vue

@@ -66,7 +66,7 @@
         <div class="qingQiuHuiZhenXinXi">
           <div class="div1">会诊科室:{{ huanZheXinXi.reqDept1 }}</div>
           <div class="div2">
-            医师:{{ huanZheXinXi.hzDoctor2Name ? huanZheXinXi.hzDoctor2Name : store.state.user.info.name }}
+            医师:{{ props.laiYuan === 2 ? huanZheXinXi.hzDoctor2Name : store.state.user.info.name }}
           </div>
           <div>会诊时间:{{ huanZheXinXi.hzDate }}</div>
         </div>
@@ -75,9 +75,8 @@
   </div>
 </template>
 
-<script>
+<script setup name="JieShouHuiZhenDaYing">
 import store from '@/store'
-import {ref} from '@vue/reactivity'
 import {cptSex} from '@/utils/computed'
 import '@/css/hui-zhen-ji-lv-dan.css'
 import {computed, onMounted} from 'vue'
@@ -85,96 +84,82 @@ import {getLodop, initLodop} from '@/utils/c-lodop'
 import {huiZhenJiLvDanCss} from '@/data/css-for-print'
 import {getServerDateApi} from '@/api/public-api'
 
-export default {
-  name: 'JieShouHuiZhenDaYing',
-  emits: ['fanHuiXinXi'],
-  props: {
-    laiYuan: {
-      type: Number,
-      default: 1,
-    },
+const props = defineProps({
+  laiYuan: {
+    type: Number,
+    default: 1,
   },
-  setup(props, cxt) {
-    const windowSize = computed(() => {
-      return store.state.app.windowSize
-    })
+})
 
-    /**
-     * 患者信息
-     * @type {Ref<UnwrapRef<{}>>}
-     */
-    const huanZheXinXi = ref({})
-
-    function shiJian() {
-      if (props.laiYuan === 1) {
-        getServerDateApi().then((res) => {
-          huanZheXinXi.value.hzDate = res
-        })
-      }
-    }
+const emit = defineEmits(['fanHuiXinXi'])
 
-    const huiZhenXinXiXiangQing = (val) => {
-      shiJian()
-      huanZheXinXi.value = val
-    }
+const windowSize = computed(() => {
+  return store.state.app.windowSize
+})
 
-    const mainInfo = {
-      padding: '0 20px',
-      overflowY: 'scroll',
-      scrollbarWidth: 'none',
-    }
+/**
+ * 患者信息
+ * @type {Ref<UnwrapRef<{}>>}
+ */
+const huanZheXinXi = ref({})
 
-    const daYing = () => {
-
-
-      shiJian()
-      setTimeout(() => {
-        // 在vue 中使用 v-model 绑定的 都需要 这样不然没有数据
-        const allTextArea = document.body.getElementsByTagName('textarea')
-        const textInput = document.body.getElementsByTagName('input')
-        for (let i = 0; i < textInput.length; i++) {
-          textInput[i].setAttribute('value', textInput[i].value)
-        }
-        for (let i = 0; i < allTextArea.length; i++) {
-          allTextArea[i].innerText = allTextArea[i].value
-        }
-        // A4: 210毫米 × 297毫米 = 793.70px *  1122.52px
-        let LODOP = getLodop()
-        // 导入css样式,以及 内容
-        const strFormHtml = huiZhenJiLvDanCss + '<body>' + document.getElementById('huiZhenXinXiDaYin').innerHTML + '</body>'
-        LODOP.PRINT_INIT('会诊记录单') // 初始化打印机 名字
-        LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '') // 设置纸张大小  A4
-        LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
-        LODOP.ADD_PRINT_HTM('2mm', '5mm', '100%', '100%', strFormHtml) //要打印的内容
-        LODOP.SET_PRINT_STYLE('ItemType', 3) //设置对象风格
-        LODOP.ADD_PRINT_TEXT('290mm', '190mm', '20mm', '2mm', '第#页/共&页') //增加纯文本项
-        LODOP.PREVIEW() // 关闭
-      }, 100)
-    }
+function shiJian() {
+  if (props.laiYuan === 1) {
+    getServerDateApi().then((res) => {
+      huanZheXinXi.value.hzDate = res
+    })
+  }
+}
 
-    const fanHuiXinXi = () => {
-      cxt.emit('fanHuiXinXi', {huanZheXinXi})
-    }
+const huiZhenXinXiXiangQing = (val) => {
+  shiJian()
+  huanZheXinXi.value = val
+}
 
-    onMounted(() => {
-      initLodop()
-    })
+const mainInfo = {
+  padding: '0 20px',
+  overflowY: 'scroll',
+  scrollbarWidth: 'none',
+}
 
-    return {
-      mainInfo,
-      huanZheXinXi,
-      cptSex,
-      hzLeiBie,
-      huiZhenXinXiXiangQing,
-      daYing,
-      windowSize,
-      fanHuiXinXi,
-      laiYuan: props.laiYuan,
-      store
+const daYing = () => {
+  shiJian()
+  setTimeout(() => {
+    // 在vue 中使用 v-model 绑定的 都需要 这样不然没有数据
+    const allTextArea = document.body.getElementsByTagName('textarea')
+    const textInput = document.body.getElementsByTagName('input')
+    for (let i = 0; i < textInput.length; i++) {
+      textInput[i].setAttribute('value', textInput[i].value)
     }
-  },
+    for (let i = 0; i < allTextArea.length; i++) {
+      allTextArea[i].innerText = allTextArea[i].value
+    }
+    // A4: 210毫米 × 297毫米 = 793.70px *  1122.52px
+    let LODOP = getLodop()
+    // 导入css样式,以及 内容
+    const strFormHtml = huiZhenJiLvDanCss + '<body>' + document.getElementById('huiZhenXinXiDaYin').innerHTML + '</body>'
+    LODOP.PRINT_INIT('会诊记录单') // 初始化打印机 名字
+    LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '') // 设置纸张大小  A4
+    LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
+    LODOP.ADD_PRINT_HTM('2mm', '5mm', '100%', '100%', strFormHtml) //要打印的内容
+    LODOP.SET_PRINT_STYLE('ItemType', 3) //设置对象风格
+    LODOP.ADD_PRINT_TEXT('290mm', '190mm', '20mm', '2mm', '第#页/共&页') //增加纯文本项
+    LODOP.PREVIEW() // 关闭
+  }, 100)
 }
 
+const fanHuiXinXi = () => {
+  emit('fanHuiXinXi', {huanZheXinXi})
+}
+
+onMounted(() => {
+  initLodop()
+})
+
+defineExpose({
+  huiZhenXinXiXiangQing
+})
+
 function hzLeiBie(val) {
   switch (val) {
     case '1':

+ 2 - 1
src/components/xiao-chan/select-v3/XcSelectV3.vue

@@ -111,7 +111,7 @@ const props = defineProps({
 })
 
 
-const emit = defineEmits(['change'])
+const emit = defineEmits(['change', 'rowClick'])
 
 const judgingCodeIsEmpty = () => {
   if (props.modelValue[props.code] === null) {
@@ -402,6 +402,7 @@ const clickToSelect = (val) => {
   props.modelValue[props.name] = val.name
   inputData = val[props.name]
   closePopup()
+  emit('rowClick', val)
 }
 
 //选中样式

+ 9 - 2
src/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue

@@ -1,6 +1,6 @@
 <template>
   <el-collapse class="collapse" v-model="collapse" @change="collapseChange" accordion>
-    <el-collapse-item title="患者信息" name="1">
+    <el-collapse-item :title="titleName()" name="1">
       <div class="header" style="border: 0;color: #000000">
         <div class="box">
           <div>
@@ -83,7 +83,7 @@
 <script setup name="HuanZheXinXi">
 
 import {isDev, needRule} from "@/utils/public";
-import {clickOnThePatient} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import {clickOnThePatient, huanZheXinXi} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {stringNotBlank} from "@/utils/blank-utils";
 
 const props = defineProps({
@@ -113,6 +113,13 @@ const collapseChange = async () => {
   emit('isShow', collapse.value === '1', height)
 }
 
+const titleName = () => {
+  if (props.huanZheXinXi.inpatientNo) {
+    return `患者 【${props.huanZheXinXi.name}】`;
+  }
+  return `请选择患者`;
+}
+
 onMounted(() => {
   collapseChange()
 })

+ 6 - 6
src/components/zhu-yuan-yi-sheng/hui-zhen-shen-qing/TianJiaHuiZhenShenQing.vue

@@ -239,11 +239,6 @@ const huiZhenShenQingClick = async () => {
   }
 }
 
-const dianJiTianJiaZhuYaoZhenDuan = (val) => {
-  huiZhenShenQing.value.hzZd += val + ','
-}
-
-
 let popUpPrompt = false
 const inquireAboutTheConsultingDoctor = (val) => {
   getConsultingDoctorInfo(val).then((res) => {
@@ -277,7 +272,12 @@ const autofillData = async (val) => {
     deptList.value = [dept]
     huiZhenShenQing.value.reqDept1 = res.deptCode
     huiZhenShenQing.value.reqDeptName = res.deptName
-    huiZhenShenQing.value.hzType = res.empTitCode
+    if (res.empTitCode === '3') {
+      huiZhenShenQing.value.hzType = '1'
+    } else if (res.empTitCode === '1') {
+      huiZhenShenQing.value.hzType = '3'
+    }
+
 
   }).catch((action) => {
     if (action === 'cancel') {

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

@@ -42,6 +42,7 @@
         <div>
           频率:
           <xc-select-v3 style="width: 120px"
+                        @rowClick="pingLvRowClick"
                         :disabled="queryParam.frequCode === 1"
                         v-model="yiZhuData"
                         :data="yaoPinPingLvData"
@@ -554,8 +555,10 @@ const modifyDosingMethod = (val) => {
   yiZhuData.value.orderTime = val.orderTime
   yiZhuData.value.startTime = val.startTime
   yiZhuData.value.endTime = val.endTime
-  yiZhuData.value.supplyCode = val.supplyCode
-  yiZhuData.value.supplyCodeName = val.supplyCodeName
+
+  yiZhuData.value.supplyCode = '044'
+  yiZhuData.value.supplyCodeName = '副药'
+
   yiZhuData.value.frequCode = val.frequCode
   yiZhuData.value.frequCodeName = val.frequCodeName
   yiZhuData.value.groupNo = val.groupNo
@@ -857,6 +860,11 @@ const dosePrecision = () => {
   }
 }
 
+// 频率点击
+const pingLvRowClick = (val) => {
+  yiZhuData.value.instruction = val.name
+}
+
 let shortcutKeyRegistration = {
   ctrl: {s: toAddAnOrder, f: openSearch},
   alt: {a: addOrderNo}

+ 137 - 165
src/views/hospitalization/case-front-sheet/JieShouHuiZhen.vue

@@ -55,7 +55,7 @@
   </page-layer>
 </template>
 
-<script>
+<script setup>
 import {getHuanZheXinXi, getHuiZhenData, wanChenHuiZhen} from '@/api/case-front-sheet/jie-shou-hui-zhen'
 import {cptSex} from '@/utils/computed'
 import store from '@/store'
@@ -69,183 +69,155 @@ import router from '@/router'
 import {getServerDateApi} from '@/api/public-api'
 import PageLayer from "@/layout/PageLayer";
 
-export default {
-  components: {PageLayer, DaYingHuiZhen},
-  setup() {
-    ////////////////////////////// 获取屏幕高度 /////////////////////////////////////////
-
-    const windowSize = computed(() => {
-      return store.state.app.windowSize
-    })
+////////////////////////////// 获取屏幕高度 /////////////////////////////////////////
+
+const windowSize = computed(() => {
+  return store.state.app.windowSize
+})
+
+const daYingHuiZhenRef = ref(null)
+
+onMounted(() => {
+  dateRange.value[0] = shortcuts[0].value[0]
+  dateRange.value[1] = shortcuts[0].value[1]
+  getHuiZhenDataClick()
+  console.log(store.state.user.info)
+})
+
+////////////////////////////// 获取患者信息 需分页  /////////////////////////////////////////
+const dateRange = ref([])
+const huanZeData = ref([])
+const currentPage = ref(1)
+const pageSize = ref(10)
+const total = ref(0)
+
+const getHuiZhenDataClick = () => {
+  let riQi = getDateRangeFormatDate(dateRange.value)
+  getHuiZhenData(store.state.user.info.deptCode, currentPage.value, pageSize.value, riQi.startTime, riQi.endTime).then((res) => {
+    huanZeData.value = res.records
+    total.value = res.total
+  })
+}
 
-    const doctorName = store.state.user.info.name
-    const daYingHuiZhenRef = ref(null)
+/// 点击下一页触发
+const handleCurrentChange = (val) => {
+  currentPage.value = val
+  getHuiZhenDataClick()
+}
+//////////////////////////////////////////// 点击右边的表格 ///////////////////////////////////////////////////////////
+const huanZheXinXi = ref({})
+
+const dianJiDanYuanGe = (val) => {
+  getHuanZheXinXi(val.admissTimes, val.reqTimes, val.inpatientNo).then((res) => {
+    huanZheXinXi.value = res
+    daYingHuiZhenRef.value.huiZhenXinXiXiangQing(res)
+  })
+}
 
-    onMounted(() => {
-      dateRange.value[0] = shortcuts[0].value[0]
-      dateRange.value[1] = shortcuts[0].value[1]
-      getHuiZhenDataClick()
+/**
+ * 点击保存 会诊信息
+ * 要判断 一下 是仅保存 还是 完成会诊
+ */
+const baoCunHuiZhenClick = () => {
+  if (!huanZheXinXi.value.name) {
+    ElMessage({
+      message: '请先选择患者',
+      showClose: true,
+      type: 'error',
     })
-
-    ////////////////////////////// 获取患者信息 需分页  /////////////////////////////////////////
-    const dateRange = ref([])
-    const huanZeData = ref([])
-    const currentPage = ref(1)
-    const pageSize = ref(10)
-    const total = ref(0)
-
-    const getHuiZhenDataClick = () => {
-      let riQi = getDateRangeFormatDate(dateRange.value)
-      getHuiZhenData(store.state.user.info.deptCode, currentPage.value, pageSize.value, riQi.startTime, riQi.endTime).then((res) => {
-        huanZeData.value = res.records
-        total.value = res.total
-      })
-    }
-
-    /// 点击下一页触发
-    const handleCurrentChange = (val) => {
-      currentPage.value = val
-      getHuiZhenDataClick()
-    }
-    //////////////////////////////////////////// 点击右边的表格 ///////////////////////////////////////////////////////////
-    const huanZheXinXi = ref({})
-
-    const dianJiDanYuanGe = (val) => {
-      getHuanZheXinXi(val.admissTimes, val.reqTimes, val.inpatientNo).then((res) => {
-        huanZheXinXi.value = res
-        daYingHuiZhenRef.value.huiZhenXinXiXiangQing(res)
+    return
+  }
+  if (stringIsBlank(huanZheXinXi.value.hzComment)) {
+    return ElMessage({
+      message: '请填写会诊意见',
+      showClose: true,
+      type: 'error',
+    })
+  }
+  ElMessageBox.confirm('是否保存【' + huanZheXinXi.value.name + '】的会诊信息', '提示', {
+    type: 'warning',
+    distinguishCancelAndClose: true,
+    cancelButtonText: '仅保存',
+    confirmButtonText: '完成会诊',
+  })
+      .then(() => {
+        huanZheXinXi.value.statusFlag = 2
+        // 完成 会诊 发送 axios
+        wanChenHuiZhen(huanZheXinXi.value)
+        getHuiZhenDataClick()
+        huanZheXinXi.value = {}
+        daYingHuiZhenRef.value.huanZheXinXi.value = {}
       })
-    }
-
-    /**
-     * 点击保存 会诊信息
-     * 要判断 一下 是仅保存 还是 完成会诊
-     */
-    const baoCunHuiZhenClick = () => {
-      if (!huanZheXinXi.value.name) {
-        ElMessage({
-          message: '请先选择患者',
-          showClose: true,
-          type: 'error',
-        })
-        return
-      }
-      if (stringIsBlank(huanZheXinXi.value.hzComment)) {
-        return ElMessage({
-          message: '请填写会诊意见',
-          showClose: true,
-          type: 'error',
-        })
-      }
-      ElMessageBox.confirm('是否保存【' + huanZheXinXi.value.name + '】的会诊信息', '提示', {
-        type: 'warning',
-        distinguishCancelAndClose: true,
-        cancelButtonText: '仅保存',
-        confirmButtonText: '完成会诊',
+      .catch((e) => {
+        if (e === 'cancel') {
+          huanZheXinXi.value.statusFlag = 1
+          wanChenHuiZhen(huanZheXinXi.value)
+        }
       })
-          .then(() => {
-            huanZheXinXi.value.statusFlag = 2
-            // 完成 会诊 发送 axios
-            wanChenHuiZhen(huanZheXinXi.value)
-            getHuiZhenDataClick()
-            huanZheXinXi.value = {}
-            daYingHuiZhenRef.value.huanZheXinXi.value = {}
-          })
-          .catch((e) => {
-            if (e === 'cancel') {
-              huanZheXinXi.value.statusFlag = 1
-              wanChenHuiZhen(huanZheXinXi.value)
-            }
-          })
-    }
+}
 
-    const huiZhenFanHuiXinXi = (val) => {
-      huanZheXinXi.value = val.value
-    }
+const huiZhenFanHuiXinXi = (val) => {
+  huanZheXinXi.value = val.value
+}
 
-    ///////////////////////////////////////////////////////// 开启打印 ///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////// 开启打印 ///////////////////////////////////////////////////////////////////////////////
 
-    const daYingClick = () => {
-      if (!huanZheXinXi.value.inpatientNo) {
-        ElMessage.error({
-          message: '请先选择患者',
-          showClose: true,
-        })
-        return
-      }
-      daYingHuiZhenRef.value.daYing()
-    }
+const daYingClick = () => {
+  if (!huanZheXinXi.value.inpatientNo) {
+    ElMessage.error({
+      message: '请先选择患者',
+      showClose: true,
+    })
+    return
+  }
+  daYingHuiZhenRef.value.daYing()
+}
 
-    ///////////////////////////// 查看患者检验
-    const dianJiChaKanHuanZheJianYan = () => {
-      if (!huanZheXinXi.value.inpatientNo) {
-        return ElMessage({
-          message: '请先选择患者',
-          showClose: true,
-          type: 'error',
-        })
-      } else {
-        let end = ''
-        getServerDateApi().then((res) => {
-          end = getFormatDatetime(res, 'YYYY-MM-DD')
-          router.push({
-            name: 'inspectionReportIndex',
-            params: {
-              passRule: true,
-              patNo: huanZheXinXi.value.inpatientNo,
-              start: huanZheXinXi.value.admissDate,
-              end: end,
-            },
-          })
-        })
-      }
-    }
+///////////////////////////// 查看患者检验
+const dianJiChaKanHuanZheJianYan = () => {
+  if (!huanZheXinXi.value.inpatientNo) {
+    return ElMessage({
+      message: '请先选择患者',
+      showClose: true,
+      type: 'error',
+    })
+  } else {
+    let end = ''
+    getServerDateApi().then((res) => {
+      end = getFormatDatetime(res, 'YYYY-MM-DD')
+      router.push({
+        name: 'inspectionReportIndex',
+        params: {
+          passRule: true,
+          patNo: huanZheXinXi.value.inpatientNo,
+          start: huanZheXinXi.value.admissDate,
+          end: end,
+        },
+      })
+    })
+  }
+}
 
-    const enterMedicalOrder = () => {
-      if (!huanZheXinXi.value.inpatientNo) {
-        return ElMessage({
-          message: '请先选择患者',
-          showClose: true,
-          type: 'error',
-        })
-      } else {
-        router.push({
-          name: 'yiZhuLuRu',
-          params: {
-            inpatientNo: huanZheXinXi.value.inpatientNo,
-            admissTimes: huanZheXinXi.value.admissTimes
-          }
-        })
+// 跳转到医嘱录入页面
+const enterMedicalOrder = () => {
+  if (!huanZheXinXi.value.inpatientNo) {
+    return ElMessage({
+      message: '请先选择患者',
+      showClose: true,
+      type: 'error',
+    })
+  } else {
+    router.push({
+      name: 'yiZhuLuRu',
+      params: {
+        inpatientNo: huanZheXinXi.value.inpatientNo,
+        admissTimes: huanZheXinXi.value.admissTimes
       }
-    }
-
-    return {
-      doctorName,
-      enterMedicalOrder,
-      windowSize,
-      huanZeData,
-      currentPage,
-      pageSize,
-      total,
-      cptSex,
-      handleCurrentChange,
-      huanZheXinXi,
-      dianJiDanYuanGe,
-      dateRange,
-      getHuiZhenDataClick,
-      baoCunHuiZhenClick,
-      daYingClick,
-      hzLeiBie,
-      getDatetime,
-      daYingHuiZhenRef,
-      huiZhenFanHuiXinXi,
-      shortcuts,
-      hzJiBie,
-      dianJiChaKanHuanZheJianYan,
-    }
-  },
+    })
+  }
 }
 
+// 会诊级别
 function hzJiBie(val) {
   switch (val) {
     case '1':

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

@@ -27,7 +27,6 @@
                :current-page="currentPage"
                :open-group-order-template="openGroupOrderTemplate"
                :successfullyEntered="successfullyEntered"/>
-
     <div style="overflow-x: auto; " :style="{width: winsize.main - 20  + 'px'}">
       <yz-table :data="tempYzData"
                 ref="tableRef"
@@ -294,6 +293,7 @@ const muBanShuJu = (val) => {
   if (currentPage.value === 'takeMedicine') {
     val = val.filter((item) => {
       item.selfBuy = '4'
+      item.instruction = item.frequCodeName
       return item.serial !== '00'
     })
     if (val.length === 0) {