Browse Source

修复已知问题和bug

xiaochan 2 years ago
parent
commit
e414cdea58

+ 17 - 0
src/components/pat-info-list/PatInfomationDialog.vue

@@ -5,7 +5,9 @@
                fullscreen
                @closed="emits('closed')"
                destroy-on-close>
+        <huan-zhe-xin-xi :huan-zhe-xin-xi="patInfo"/>
         <el-tabs>
+
             <el-tab-pane label="首页">
                 <first-page-of-medical-record :dics="props.dics"
                                               :sheet-data="sheetData"/>
@@ -55,11 +57,17 @@ import {getSheetInfo} from "@/api/case-front-sheet";
 import {formatDate} from "@/utils/date";
 import {getServerDateApi} from "@/api/public-api";
 import ChargeList from '@/components/medical-insurance/charge-list/Index.vue'
+import {getDisPatient, getPatientInfo} from "@/api/inpatient/patient";
+import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
 
 
 const props = defineProps({
     patNo: String,
     times: Number,
+    /*
+    * 出院 2
+    * 在院 1
+    * */
     leaveHospital: {
         type: Number,
         default: 1
@@ -79,6 +87,8 @@ const sheetData = ref({})
 const startDate = ref('')
 const endDate = ref('')
 
+const patInfo = ref({})
+
 
 const details = async () => {
     sheetData.value = await getSheetInfo({
@@ -93,6 +103,13 @@ const details = async () => {
 onMounted(async () => {
     endDate.value = formatDate(await getServerDateApi())
     await details()
+    if (props.leaveHospital === 1) {
+        patInfo.value = await getPatientInfo(props.patNo)
+    } else {
+        patInfo.value = await getDisPatient(props.patNo, props.times)
+    }
+    console.log(patInfo.value)
+
 })
 
 </script>

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

@@ -105,7 +105,7 @@
 <script setup name="HuanZheXinXi">
 
 import {isDev, needRule} from "@/utils/public";
-import {clickOnThePatient, huanZheXinXi} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import {clickOnThePatient} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {stringNotBlank} from "@/utils/blank-utils";
 
 const props = defineProps({

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

@@ -80,13 +80,6 @@
                 </div>
                 <div>
                     领量:
-                    <!--                    <el-input-number-->
-                    <!--                            style="width: 60px"-->
-                    <!--                            v-model="yiZhuData.drugQuan"-->
-                    <!--                            :min="1"-->
-                    <!--                            :controls="false"/>-->
-                    <!--                    <span style="color: red">{{ yiZhuData.miniUnitName }}</span>-->
-                    <!--       先暂时去掉这个限制             -->
                     <template v-if="currentPage === 'takeMedicine'">
                         <el-input-number
                                 style="width: 60px"
@@ -331,6 +324,7 @@ const searchOrders = (val) => {
 const tiShiBiaoTi = ref([])
 // 填充数据
 const xuanZhongFeiYong = async (row, laiyuan = 1) => {
+    console.log(row)
     if (row.serial === '0000' && row.groupNo === '0000') {
         props.openGroupOrderTemplate(row.orderCode);
         return;
@@ -455,6 +449,7 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
         if (!yiZhuData.value.startTime) {
             yiZhuData.value.startTime = serverDate
         }
+        console.log(yiZhuData.value.execUnit)
         // 用来加载默认的执行科室
         if (stringIsBlank(row.execUnit)) {
             if (stringNotBlank(props.patientInfo.zkWard)) {
@@ -465,6 +460,7 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
             yiZhuData.value.execUnit = props.patientInfo.zkWard
             yiZhuData.value.execUnitName = props.patientInfo.zkWardName
         }
+        console.log(yiZhuData.value.execUnit)
         if (!yiZhuData.value.frequCode) {
             yiZhuData.value.frequCode = 'ONCE'
             yiZhuData.value.frequCodeName = '一次'
@@ -507,8 +503,14 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
             yiZhuData.value.frequCode = 'ALWAYS'
         }
     }
+
 }
 
+// watch(() => yiZhuData.value, () => {
+//     console.log(yiZhuData.value)
+//     console.log(yiZhuData.value.execUnit)
+// })
+
 
 /* 频率 */
 const pingLvRef = ref()
@@ -538,13 +540,13 @@ const xuanZheJiLiang = (val) => {
 
 /* 给药方式 */
 // const geiYaoFangShiData = ref([])
-
+const userInfo = store.state.user.info
 // 医嘱限制时间不能在之前
 const disabledDate = (time) => {
     if (props.patientInfo?.admissDate) {
-        return time.getTime() < new Date(props.patientInfo?.admissDate).getTime() - 8.64e7
+        return time.getTime() < new Date(props.patientInfo?.admissDate).getTime() - 8.64e7;
     }
-    return true
+    return true;
 }
 
 /* 获取执行科室 */

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

@@ -102,6 +102,7 @@ const queryYz = async (isScroll = true) => {
             patNo: props.patientInfo.inpatientNo,
             times: props.patientInfo.admissTimes
         })
+        console.log(yzData.value)
     } catch (e) {
         yzData.value = []
     }

+ 153 - 148
src/views/examination/BloodSugarQuery.vue

@@ -1,121 +1,121 @@
 <template>
-  <page-layer>
-    <template #header>
-      住院号:
-      <el-input style="width: 120px" v-model="patNo" @blur="inputBlur"/>
-      住院次数:
-      <el-input-number v-model="times" :min="0"/>
-      <el-button>查询</el-button>
-      <el-button @click="print">打印</el-button>
-    </template>
-    <template #main>
-      <div style="width: 1122px;height: 793px" ref="printDiv">
-        <table style="width: 100%;max-height:  793px">
-          <thead>
-          <tr>
-            <th colspan="23">泰和医院内分泌科血糖单</th>
-          </tr>
-          <tr>
-            <th colspan="23">
-              <div style="width: 100%;display: flex;justify-content: space-between">
-
-                <div>
-                  床号: {{ patientInfo?.bedNo }}
-                </div>
-
+    <page-layer>
+        <template #header>
+            住院号:
+            <el-input style="width: 120px" v-model="patNo" @blur="inputBlur"/>
+            住院次数:
+            <el-input-number v-model="times" :min="0"/>
+            <el-button @click="inquire">查询</el-button>
+            <el-button @click="print">打印</el-button>
+        </template>
+        <template #main>
+            <div style="width: 1122px;height: 793px" ref="printDiv">
+                <table style="width: 100%;max-height:  793px">
+                    <thead>
+                    <tr>
+                        <th colspan="23">泰和医院内分泌科血糖单</th>
+                    </tr>
+                    <tr>
+                        <th colspan="23">
+                            <div style="width: 100%;display: flex;justify-content: space-between">
+
+                                <div>
+                                    床号: {{ patientInfo?.bedNo }}
+                                </div>
+
+                                <div>
+                                    姓名: {{ patientInfo?.name }}
+                                </div>
+
+                                <div>
+                                    年龄: {{ patientInfo?.age }}
+                                </div>
+
+                                <div>
+                                    住院号:{{ patientInfo?.inpatientNo }}
+                                </div>
+
+                                <div>
+                                    单位: mmol/l
+                                </div>
+
+                            </div>
+                        </th>
+                    </tr>
+
+                    <tr class="tr">
+                        <th style="width: 110px">日期</th>
+                        <th style="width: 30px">空腹</th>
+                        <th>时间签名</th>
+                        <th>早餐后</th>
+                        <th>时间签名</th>
+                        <th>中餐前</th>
+                        <th>时间签名</th>
+                        <th>中餐后</th>
+                        <th>时间签名</th>
+                        <th>晚餐前</th>
+                        <th>时间签名</th>
+                        <th>晚餐后</th>
+                        <th>时间签名</th>
+                        <th style="width: 30px">零点</th>
+                        <th>时间签名</th>
+                        <th style="width: 30px">三点</th>
+                        <th>时间签名</th>
+                        <th>随机血糖</th>
+                        <th>时间签名</th>
+                        <th>随机血糖</th>
+                        <th>时间签名</th>
+                        <th>随机血糖</th>
+                        <th>时间签名</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+
+                    <tr v-for="item in data">
+                        <td style="padding: 10px">
+                            {{ item.date }}
+                        </td>
+                        <blood-sugar-table v-for="index in 11"
+                                           @right-click="rightClick"
+                                           :data="htmlTd(index - 1,item.data)"/>
+                    </tr>
+                    </tbody>
+                </table>
+            </div>
+            <right-click-menu :mouse-position="position" closeManually ref="RightClickMenuRef">
                 <div>
-                  姓名: {{ patientInfo?.name }}
+                    {{ position.data.timecodeName }}
+                    <el-form label-width="70px">
+                        <el-form-item label="医生签名">
+                            <SelectStaffCode v-model="position.data" :name="['nurseId', 'nurseIdName']"/>
+                        </el-form-item>
+
+                        <el-form-item label="结果">
+                            <el-input style="width: 120px;" v-model="position.data.testResult"/>
+                        </el-form-item>
+
+                        <el-form-item label="时间">
+                            <el-time-picker
+                                    format="HH:mm:ss"
+                                    value-format="YYYY-MM-DD HH:mm:ss"
+                                    v-model="position.data.testTime"/>
+                        </el-form-item>
+
+                    </el-form>
+
+                    <el-button @click="confirmTheChanges">确认</el-button>
+                    <el-button @click="cancel">取消</el-button>
                 </div>
-
-                <div>
-                  年龄: {{ patientInfo?.age }}
-                </div>
-
-                <div>
-                  住院号:{{ patientInfo?.inpatientNo }}
-                </div>
-
-                <div>
-                  单位: mmol/l
-                </div>
-
-              </div>
-            </th>
-          </tr>
-
-          <tr class="tr">
-            <th style="width: 110px">日期</th>
-            <th style="width: 30px">空腹</th>
-            <th>时间签名</th>
-            <th>早餐后</th>
-            <th>时间签名</th>
-            <th>中餐前</th>
-            <th>时间签名</th>
-            <th>中餐后</th>
-            <th>时间签名</th>
-            <th>晚餐前</th>
-            <th>时间签名</th>
-            <th>晚餐后</th>
-            <th>时间签名</th>
-            <th style="width: 30px">零点</th>
-            <th>时间签名</th>
-            <th style="width: 30px">三点</th>
-            <th>时间签名</th>
-            <th>随机血糖</th>
-            <th>时间签名</th>
-            <th>随机血糖</th>
-            <th>时间签名</th>
-            <th>随机血糖</th>
-            <th>时间签名</th>
-          </tr>
-          </thead>
-          <tbody>
-
-          <tr v-for="item in data">
-            <td style="padding: 10px">
-              {{ item.date }}
-            </td>
-            <blood-sugar-table v-for="index in 11"
-                               @right-click="rightClick"
-                               :data="htmlTd(index - 1,item.data)"/>
-          </tr>
-          </tbody>
-        </table>
-      </div>
-      <right-click-menu :mouse-position="position" closeManually ref="RightClickMenuRef">
-        <div>
-          {{ position.data.timecodeName }}
-          <el-form label-width="70px">
-            <el-form-item label="医生签名">
-              <SelectStaffCode v-model="position.data" :name="['nurseId', 'nurseIdName']"/>
-            </el-form-item>
-
-            <el-form-item label="结果">
-              <el-input style="width: 120px;" v-model="position.data.testResult"/>
-            </el-form-item>
-
-            <el-form-item label="时间">
-              <el-time-picker
-                  format="HH:mm:ss"
-                  value-format="YYYY-MM-DD HH:mm:ss"
-                  v-model="position.data.testTime"/>
-            </el-form-item>
-
-          </el-form>
-
-          <el-button @click="confirmTheChanges">确认</el-button>
-          <el-button @click="cancel">取消</el-button>
-        </div>
-      </right-click-menu>
-    </template>
-  </page-layer>
+            </right-click-menu>
+        </template>
+    </page-layer>
 </template>
 
 <script setup name='BloodSugarQuery'>
 import {
-  getPatientLoodSugar,
-  getThePatienMaxHospitalizationTimes,
-  modifyPatientBloodGlucoseInfo
+    getPatientLoodSugar,
+    getThePatienMaxHospitalizationTimes,
+    modifyPatientBloodGlucoseInfo
 } from "@/api/blood-sugar/query";
 import BloodSugarTable from "@/components/blood-sugar-table/BloodSugarTable.vue";
 import {getLodop, initLodop} from "@/utils/c-lodop";
@@ -129,10 +129,15 @@ let patNo = $ref('0412588')
 let times = $ref(1)
 
 const queryPatientSBloodSugarInformation = () => {
-  getPatientLoodSugar(patNo, times).then((res) => {
-    data = res.bloodSugarData
-    patientInfo = res.patientInfo
-  })
+    getPatientLoodSugar(patNo, times).then((res) => {
+        data = res.bloodSugarData
+        patientInfo = res.patientInfo
+        console.log(res)
+    })
+}
+
+const inquire = () => {
+    queryPatientSBloodSugarInformation()
 }
 
 let data = $ref()
@@ -141,48 +146,48 @@ let patientInfo = $ref()
 let thead = ["空腹", "早餐后", "中餐前", "中餐后", "晚餐前", "晚餐后", "零点", "三点", "随机血糖1", "随机血糖2", "随机血糖3"]
 
 const inputBlur = () => {
-  if (patNo) {
-    getThePatienMaxHospitalizationTimes(patNo).then((res) => {
-      console.log(res)
-    })
-  }
+    if (patNo) {
+        getThePatienMaxHospitalizationTimes(patNo).then((res) => {
+            console.log(res)
+        })
+    }
 }
 
 let position = $ref()
 const RightClickMenuRef = ref()
 let tempBloodSugarData = $ref()
 const rightClick = (val, event) => {
-  position = {
-    event: event,
-    data: val
-  }
-  tempBloodSugarData = clone(val)
+    position = {
+        event: event,
+        data: val
+    }
+    tempBloodSugarData = clone(val)
 }
 
 const confirmTheChanges = () => {
-  modifyPatientBloodGlucoseInfo(position.data).then((res) => {
-    position.data.formatTestTime = getFormatDatetime(position.data.testTime, 'HH:mm')
-    RightClickMenuRef.value.close()
-  })
+    modifyPatientBloodGlucoseInfo(position.data).then((res) => {
+        position.data.formatTestTime = getFormatDatetime(position.data.testTime, 'HH:mm')
+        RightClickMenuRef.value.close()
+    })
 }
 
 const cancel = () => {
-  position.data.nurseId = tempBloodSugarData.nurseId
-  position.data.nurseIdName = tempBloodSugarData.nurseIdName
-  position.data.testResult = tempBloodSugarData.testResult
-  position.data.testTime = tempBloodSugarData.testTime
-  RightClickMenuRef.value.close()
+    position.data.nurseId = tempBloodSugarData.nurseId
+    position.data.nurseIdName = tempBloodSugarData.nurseIdName
+    position.data.testResult = tempBloodSugarData.testResult
+    position.data.testTime = tempBloodSugarData.testTime
+    RightClickMenuRef.value.close()
 }
 
 const htmlTd = (index, data) => {
-  return data[thead[index]]
+    return data[thead[index]]
 }
 
 const printDiv = ref()
 
 const print = () => {
-  let LODOP = getLodop()
-  let style = `<style>td {
+    let LODOP = getLodop()
+    let style = `<style>td {
   border: 1px solid #000;
   text-align: center;
   padding: 10px 0;
@@ -197,21 +202,21 @@ table, tr, td {
   border-collapse: collapse;
 }</style>`
 
-  const strHtml = style + '<body>' + printDiv.value.innerHTML + '</body>'
-  LODOP.PRINT_INIT('泰和医院内分泌科血糖单') // 初始化打印机 名字
-  LODOP.SET_PRINT_PAGESIZE(2, 0, 0, 'A4') // 设置纸张大小  A4
-  LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
-  LODOP.ADD_PRINT_HTM('2mm', '5mm', '100%', '100%', strHtml) //要打印的内容
-  LODOP.SET_PRINT_STYLE('ItemType', 3) //设置对象风格
-  LODOP.ADD_PRINT_TEXT('290mm', '190mm', '20mm', '2mm', '第#页/共&页') //增加纯文本项
-  LODOP.PREVIEW() // 关闭
-  console.log(printDiv)
+    const strHtml = style + '<body>' + printDiv.value.innerHTML + '</body>'
+    LODOP.PRINT_INIT('泰和医院内分泌科血糖单') // 初始化打印机 名字
+    LODOP.SET_PRINT_PAGESIZE(2, 0, 0, 'A4') // 设置纸张大小  A4
+    LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
+    LODOP.ADD_PRINT_HTM('2mm', '5mm', '100%', '100%', strHtml) //要打印的内容
+    LODOP.SET_PRINT_STYLE('ItemType', 3) //设置对象风格
+    LODOP.ADD_PRINT_TEXT('290mm', '190mm', '20mm', '2mm', '第#页/共&页') //增加纯文本项
+    LODOP.PREVIEW() // 关闭
+    console.log(printDiv)
 }
 
 
 onMounted(() => {
-  queryPatientSBloodSugarInformation()
-  initLodop()
+    queryPatientSBloodSugarInformation()
+    initLodop()
 })
 
 

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

@@ -375,18 +375,19 @@
             <iframe :src="drgData.url" :height="800" v-if="drgData.dialog"/>
         </xc-dialog-v2>
 
-        <xc-dialog-v2 v-model="saveDialog.dialog" title="提示" manualShutdown>
+        <xc-dialog-v2 v-model="saveDialog.dialog" title="提示" manualShutdown destroy-on-close>
             <el-input v-model="saveDialog.name"
                       ref="saveInputRef"
                       maxlength="20"
                       minlength="1"
                       show-word-limit/>
-
             <br> <br>
 
             <el-alert type="warning" title="正在解析病程记录,请稍等。" v-if="解析病程提示"/>
             <el-alert type="success" title="解析完成,点击确认即可。" v-else/>
 
+            <emr-connotation :category-code="categoryCode"/>
+
             <template #footer>
                 <el-button @click="saveDialog.close"
                            :disabled="saveDialog.analyzeTheCourseOfTheDisease"
@@ -450,6 +451,8 @@ import EmrResultReturns
     from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrResultReturns.vue";
 import EmrAudit
     from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrAudit.vue";
+import EmrConnotation
+    from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrConnotation.vue";
 
 
 const props = defineProps({
@@ -1763,7 +1766,7 @@ const 循环病程返回数据元 = (callback) => {
 const pageIsZoom = () => {
     let rate = changeRatio();
     if (rate !== 100) {
-        ElMessageBox.alert("当前页面不是100%显示,请按键盘ctrl+0恢复100%显示标准,以防页面显示错乱,以及续打对不准!", '提示', {
+        ElMessageBox.alert("当前页面不是100%显示,请按键盘ctrl+0恢复100%显示标准,如果页面是100%缩放请检查系统缩放(可自行百度),设置=》屏幕缩放(选择100%),以防页面显示错乱,以及续打对不准!", '提示', {
             type: "warning"
         }).then(() => {
         }).catch(() => {

+ 36 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/EmrConnotation.vue

@@ -0,0 +1,36 @@
+<template>
+
+</template>
+
+<script setup name='EmrConnotation'>
+import {emrMitt} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
+
+const props = defineProps({
+    categoryCode: String
+})
+
+const edit = emrMitt.emit('editor')
+
+const connotationData = ref([])
+
+const connotationApi = () => {
+    let editData = edit.getDataElements('business')
+    let str = `return {
+
+    }`
+    connotationData.value.push(str)
+}
+
+
+onMounted(() => {
+    let editData = edit.getDataElements('business')
+    console.log(editData)
+    console.log(editData['配偶健康状况']);
+})
+
+
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 0 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/order-data.js

@@ -1 +0,0 @@
-/*在这里加载患者的一些数据*/

+ 11 - 11
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.js

@@ -296,7 +296,15 @@ export const mingXi = ref({
  * 点击查询患者信息
  * @param patNo 住院号
  */
-export const clickOnThePatient = (patNo) => {
+export const clickOnThePatient = async (patNo) => {
+    switchPatients()
+    huanZheXinXi.value = await getPatientInfo(patNo)
+    clearAssociate()
+
+
+}
+
+const switchPatients = () => {
     let str = ''
     if (stringNotBlank(yiZhuData.value.actOrderNo) && yiZhuData.value.statusFlag === '1') {
         if (yiZhuData.value.actOrderNo !== 'tempOrderNo') {
@@ -320,21 +328,13 @@ export const clickOnThePatient = (patNo) => {
     }
 
     if (stringIsBlank(huanZheXinXi.value.inpatientNo)) {
-        return getPatientInfo(patNo).then((res) => {
-            clearAssociate()
-            huanZheXinXi.value = res
-        });
+        return true
     } else {
         if (stringNotBlank(str)) {
             BizException(ExceptionEnum.LOGICAL_ERROR, str);
         }
     }
-
-    return getPatientInfo(patNo).then((res) => {
-        clearAssociate()
-        huanZheXinXi.value = res
-    });
-
+    return true;
 }