浏览代码

住院医生的医嘱录入

xiaochan 3 年之前
父节点
当前提交
15b7959f8a

+ 7 - 3
src/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru.js

@@ -1,6 +1,7 @@
 import request from '@/utils/request'
 import {ElMessage} from "element-plus";
 import {ref} from "vue";
+import {stringIsBlank} from "../../utils/blank-utils";
 
 
 const url = '/yiZhuLuRu'
@@ -10,17 +11,20 @@ export const xuanZheHuanZhe = ref(false)
 // 获取患者的频率数据
 export const huanZhePinLvData = ref([])
 // 患者信息
-export const gongYongHuanZheXinXi = ref('')
+export const huanZheXinXi = ref({})
+// 患者信息中的高度
+export const huanZheXinXiHeight = ref(0)
 
 export function youWuXuanZheHuanZhe() {
-    if (!xuanZheHuanZhe.value) {
+    if (stringIsBlank(huanZheXinXi.value.inpatientNo)) {
         ElMessage({
             message: '请先选择患者',
             showClose: true,
             type: 'error'
         })
-        return !xuanZheHuanZhe.value
+        return true
     }
+    return false
 }
 
 export function huoQuHuanZheLieBiao(wardCode) {

+ 5 - 6
src/components/zhu-yuan-yi-sheng/HuanZheLieBiao.vue

@@ -11,7 +11,7 @@
       <el-checkbox style="margin-left: 10px" v-model="woDeBingRen" @change="woDeBingRenClick">我的病人</el-checkbox>
       <el-table
           :data="cptHuanZheLieBiaoData.slice((huanZheLieBiaoCurrentPage - 1) * 20,huanZheLieBiaoCurrentPage * 20 )"
-          :height="tableHeight / 1.15" @row-click="huanZheXinXi" :row-style="tableBackColor">
+          :height="tableHeight / 1.15" @row-click="tableClick" :row-style="tableBackColor">
         <el-table-column label="床位" prop="bedNo" width="40"></el-table-column>
         <el-table-column label="姓名" prop="name">
           <template #default="scope">
@@ -42,7 +42,7 @@
 import {computed, onMounted, ref, watch} from "vue";
 import store from "../../store";
 import {
-  gongYongHuanZheXinXi,
+  huanZheXinXi,
   huanZhePinLvData,
   huoQuHuanZheLieBiao,
   huoQuHuanZheXinXi, huoQuGeRenPinLv, xuanZheHuanZhe
@@ -86,7 +86,7 @@ export default {
       huanZheLieBiaoCurrentPage.value = val
     }
 
-    const huanZheXinXi = (val) => {
+    const tableClick = (val) => {
       inpatientNo.value = val.inpatientNo
     }
 
@@ -96,8 +96,7 @@ export default {
         cptHuanZheLieBiaoData.value = huanZheLieBiaoData.value
       } else {
         huoQuHuanZheXinXi(inpatientNo.value).then((res) => {
-          gongYongHuanZheXinXi.value = res
-          cxt.emit('clickHuanZheXinXi', {res})
+          huanZheXinXi.value = res
           xuanZheHuanZhe.value = true
           // 加载患者的频率
           huoQuGeRenPinLv(res.inpatientNo, res.admissTimes).then((res) => {
@@ -150,7 +149,7 @@ export default {
       femaleIcon,
       woDeBingRen,
       cptHuanZheLieBiaoData,
-      huanZheXinXi,
+      tableClick,
       inpatientNo,
       filterMethod,
       tableBackColor,

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

@@ -1,79 +1,94 @@
 <template>
   <el-container>
     <el-main>
-      <el-row>
-        <el-col :span="2" style="text-align: right">住院号:</el-col>
-        <el-col :span="4">
-          {{ gongYongHuanZheXinXi.inpatientNo }}
-        </el-col>
-        <el-col :span="2" style="text-align: right">住院次数:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.bedNo }}</el-col>
-        <el-col :span="2" style="text-align: right">身份证号:</el-col>
-        <el-col :span="4">{{ gongYongHuanZheXinXi.socialNo }}</el-col>
-        <el-col :span="2" style="text-align: right">出生日期:</el-col>
-        <el-col :span="4">
-          <span>{{ gongYongHuanZheXinXi.birthDate }}</span> &nbsp;&nbsp;
-          <span>{{ gongYongHuanZheXinXi.age }} 岁</span></el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="2" style="text-align: right">姓名:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.name }}</el-col>
-        <el-col :span="2" style="text-align: right">性别:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.sexName }}</el-col>
-        <el-col :span="2" style="text-align: right">联系电话:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.homeTel }}</el-col>
-        <el-col :span="2" style="text-align: right">入院日期:</el-col>
-        <el-col :span="4">
-          <span>{{ gongYongHuanZheXinXi.admissDate }}</span> &nbsp;
-          <span>{{ gongYongHuanZheXinXi.actIptDays }}天</span>
-        </el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="2" style="text-align: right">管床医生:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.referPhysicianName }}</el-col>
-        <el-col :span="2" style="text-align: right">病区:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.admissWardName }}</el-col>
-        <el-col :span="2" style="text-align: right">入院医生:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.admissPhysicianName }}</el-col>
-        <el-col :span="2" style="text-align: right">入院诊断:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.admissDiagStr }}</el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="2" style="text-align: right">小科室:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.smallDeptName }}</el-col>
-        <el-col :span="2" style="text-align: right">登记日期:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.ybRegisterDate }}</el-col>
-        <el-col :span="2" style="text-align: right">身份:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.responceTypeName }}</el-col>
-        <el-col :span="2" style="text-align: right">总费用:</el-col>
-        <el-col :span="4">
-          <span>{{ gongYongHuanZheXinXi.totalCharge }}</span> &nbsp;&nbsp;
-          <span style="color: red">{{ gongYongHuanZheXinXi.balance }}</span>
-        </el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="2" style="text-align: right">药品占比:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.yp }}</el-col>
-        <el-col :span="2" style="text-align: right">检验检查:</el-col>
-        <el-col :span="4"> {{ gongYongHuanZheXinXi.jyjc }}</el-col>
-        <el-col :span="2" style="text-align: right">医保:</el-col>
-        <el-col :span="4">
-          <span>{{ gongYongHuanZheXinXi.chargeYb }}</span> &nbsp;&nbsp;
-          <span>{{ gongYongHuanZheXinXi.yb }}</span>
-        </el-col>
-      </el-row>
+      <el-collapse v-model="activeNames" @change="collapseHeight">
+        <el-collapse-item title="患者信息" class="collapse-item-height" name="1" id="collapseHeight">
+          <el-row>
+            <el-col :span="2" style="text-align: right">住院号:</el-col>
+            <el-col :span="4">
+              {{ huanZheXinXi.inpatientNo }}
+            </el-col>
+            <el-col :span="2" style="text-align: right">住院次数:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.admissTimes }}</el-col>
+            <el-col :span="2" style="text-align: right">床号:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.bedNo }}</el-col>
+            <el-col :span="2" style="text-align: right">身份证号:</el-col>
+            <el-col :span="4">{{ huanZheXinXi.socialNo }}</el-col>
+
+          </el-row>
+          <el-row>
+            <el-col :span="2" style="text-align: right">姓名:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.name }}</el-col>
+            <el-col :span="2" style="text-align: right">性别:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.sexName }}</el-col>
+            <el-col :span="2" style="text-align: right">联系电话:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.homeTel }}</el-col>
+            <el-col :span="2" style="text-align: right">入院日期:</el-col>
+            <el-col :span="4">
+              <span>{{ huanZheXinXi.admissDate }}</span> &nbsp;
+              <span>{{ huanZheXinXi.actIptDays }}天</span>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="2" style="text-align: right">管床医生:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.referPhysicianName }}</el-col>
+            <el-col :span="2" style="text-align: right">病区:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.admissWardName }}</el-col>
+            <el-col :span="2" style="text-align: right">入院医生:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.admissPhysicianName }}</el-col>
+            <el-col :span="2" style="text-align: right">入院诊断:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.admissDiagStr }}</el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="2" style="text-align: right">小科室:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.smallDeptName }}</el-col>
+            <el-col :span="2" style="text-align: right">登记日期:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.ybRegisterDate }}</el-col>
+            <el-col :span="2" style="text-align: right">身份:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.responceTypeName }}</el-col>
+            <el-col :span="2" style="text-align: right">出生日期:</el-col>
+            <el-col :span="4">
+              <span>{{ huanZheXinXi.birthDate }}</span> &nbsp;&nbsp;
+              <span>{{ huanZheXinXi.age }} 岁</span>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="2" style="text-align: right">总费用:</el-col>
+            <el-col :span="4">
+              <span>{{ huanZheXinXi.totalCharge }}</span> &nbsp;&nbsp;
+              <span style="color: red">{{ huanZheXinXi.balance }}</span>
+            </el-col>
+            <el-col :span="2" style="text-align: right">药品占比:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.yp }}</el-col>
+            <el-col :span="2" style="text-align: right">检验检查:</el-col>
+            <el-col :span="4"> {{ huanZheXinXi.jyjc }}</el-col>
+            <el-col :span="2" style="text-align: right">医保:</el-col>
+            <el-col :span="4">
+              <span>{{ huanZheXinXi.chargeYb }}</span> &nbsp;&nbsp;
+              <span>{{ huanZheXinXi.yb }}</span>
+            </el-col>
+          </el-row>
+        </el-collapse-item>
+      </el-collapse>
     </el-main>
   </el-container>
 </template>
 
 <script>
-import {gongYongHuanZheXinXi} from "../../api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
+import {huanZheXinXi, huanZheXinXiHeight} from "../../api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
+import {ref} from "vue";
+import {listIsBlank} from "../../utils/blank-utils";
 
 export default {
   name: "HuanZheXinXi",
   setup(props, cxt) {
+    const activeNames = ref('1')
+
+    const collapseHeight = (val) => {
+      val.length > 0 ? huanZheXinXiHeight.value = 0 : huanZheXinXiHeight.value = 163
+    }
 
-    return {gongYongHuanZheXinXi}
+    return {huanZheXinXi, activeNames, collapseHeight}
   }
 }
 </script>
@@ -82,4 +97,8 @@ export default {
 .el-col-4 span {
   border-bottom: 1px solid;
 }
+
+.collapse-item-height >>> .el-collapse-item__header {
+  height: 20px;
+}
 </style>

+ 124 - 14
src/components/zhu-yuan-yi-sheng/YiZhuLuRuZhuJian.vue

@@ -13,44 +13,85 @@
           :shortcuts="shortcuts"
       ></el-date-picker>
       医嘱名称:
-      <el-select style="width: 120px" v-model="yiZhuMingZi" remote filterable clearable
+      <el-select style="width: 120px" v-model="orderName" remote filterable clearable
                  :remote-method="remoteMethodChargeCode">
-        <el-option v-for="item in yiZhuMingZiData" :key="item.code" :label="item.name" :value="item.code">
+        <el-option v-for="item in yiZhuMingZiData" :key="item.name" :name="item.name" :value="item.name">
           <span>{{ item.name }}</span>
         </el-option>
       </el-select>
       频率:
       <el-select v-model="pinLv" size="mini" filterable clearable style="width: 120px">
-        <el-option v-for="item in huanZhePinLvData" :key="item.code" :label="item.name" :value="item.code">
-          <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
+        <el-option v-for="item in huanZhePinLvData" :key="item.name" :name="item.name" :value="item.name">
+          <span style="color: #8492a6; font-size: 12px">{{ item.name }}</span>
           <el-divider direction="vertical"></el-divider>
           <span>{{ item.name }}</span>
         </el-option>
       </el-select>
       <el-divider direction="vertical"></el-divider>
       <el-button type="primary" icon="el-icon-search" @click="chaXunYiZhuClick">查询</el-button>
+      <el-divider direction="vertical"></el-divider>
+      <el-tag type="info" effect="dark">录入</el-tag>
+      <el-tag effect="dark" type="success">确认</el-tag>
+      <el-tag effect="dark">执行</el-tag>
+      <el-tag effect="dark" type="danger">停止</el-tag>
     </el-header>
+    <el-main>
+      <el-table :data="yiZhuPage.data" :height="(windowSize.h / 1.6) + huanZheXinXiHeight" row-key="actOrderNo" border
+                highlight-current-row>
+        <el-table-column label="医嘱号" prop="actOrderNo" width="130">
+          <template #default="scope">
+            <el-tag :type="getYiZhuFlag( scope.row.statusFlag)" effect="dark">{{ scope.row.actOrderNo }}</el-tag>
+          </template>
+        </el-table-column>
+        <template v-for="(item,index) in elTableHeader">
+          <el-table-column :label="item.name" :prop="item.code" :width="item.width"></el-table-column>
+        </template>
+        <el-table-column label="操作" fixed="right" width="150">
+          <template #default="scope">
+            <el-button>修改</el-button>
+            <el-button>删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+          :page-sizes="[10, 20, 30, 40, 50]"
+          :page-size="yiZhuPage.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="yiZhuPage.total"
+          :current-page="yiZhuPage.currentPage"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+      >
+      </el-pagination>
+    </el-main>
   </el-container>
 </template>
 
 <script>
-import {ref} from "vue";
+import {computed, ref, watch} from "vue";
 import {shortcuts} from '../../data/shortcuts'
 import {
-  gongYongHuanZheXinXi,
+  huanZheXinXi,
   huanZhePinLvData,
   huoQuYiZhuMingCheng,
   huoQuYiZhuShuJu,
-  youWuXuanZheHuanZhe
+  youWuXuanZheHuanZhe, huanZheXinXiHeight
 } from "../../api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
 import {getDateRangeFormatDate} from "../../utils/date";
+import store from '../../store'
+import {stringIsBlank, stringNotBlank} from '../../utils/blank-utils';
+
 
 export default {
   name: "YiZhuLuRuZhuJian",
   setup(props, cxt) {
+    const windowSize = computed(() => {
+      return store.state.app.windowSize
+    })
+
     const dateRange = ref('')
     // 根据医嘱的名字来进行搜索
-    const yiZhuMingZi = ref('')
+    const orderName = ref('')
     const yiZhuMingZiData = ref([])
     // 获取频率
     const pinLv = ref('')
@@ -65,7 +106,7 @@ export default {
     const remoteMethodChargeCode = (val) => {
       if (youWuXuanZheHuanZhe()) return
       if (val.length > 1) {
-        huoQuYiZhuMingCheng(gongYongHuanZheXinXi.value.inpatientNo, gongYongHuanZheXinXi.value.admissTimes, val).then((res) => {
+        huoQuYiZhuMingCheng(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes, val).then((res) => {
           yiZhuMingZiData.value = res
         })
       }
@@ -80,31 +121,100 @@ export default {
         currentPage: yiZhuPage.value.currentPage,
         pageSize: yiZhuPage.value.pageSize,
         total: 0,
-        patNo: gongYongHuanZheXinXi.value.inpatientNo,
-        times: gongYongHuanZheXinXi.value.admissTimes,
+        patNo: huanZheXinXi.value.inpatientNo,
+        times: huanZheXinXi.value.admissTimes,
         startTime: dateS.startTime,
         endTime: dateS.endTime,
-        frequCode: pinLv.value
+        frequCode: pinLv.value,
+        orderName: orderName.value
       }
       huoQuYiZhuShuJu(data).then((res) => {
         console.log(res)
+        yiZhuPage.value.total = res.total
+        yiZhuPage.value.data = res.records
+      }).catch(e => {
+        yiZhuPage.value.total = 0
+        yiZhuPage.value.data = []
       })
     }
 
+
+    const handleSizeChange = () => {
+
+    }
+
+    const handleCurrentChange = () => {
+
+    }
+
+    watch(() => huanZheXinXi.value, () => {
+      chaXunYiZhuClick()
+    })
+
+
     return {
       dateRange,
       shortcuts,
-      yiZhuMingZi,
+      orderName,
       yiZhuMingZiData,
       remoteMethodChargeCode,
       chaXunYiZhuClick,
       pinLv,
       huanZhePinLvData,
+      yiZhuPage,
+      windowSize,
+      handleSizeChange,
+      handleCurrentChange,
+      huanZheXinXiHeight,
+      stringNotBlank,
+      elTableHeader: [
+        {name: "医嘱名称", code: "orderName"},
+        {name: "剂量", code: "doseUnitName"},
+        {name: "频率", code: "frequCode"},
+        {name: "给药方式", code: "supplyCodeName"},
+        {name: "开始时间", code: "startTime"},
+        {name: "结束时间", code: "enterTime"},
+        {name: "医嘱时间", code: "orderTime"},
+        {name: "紧急", code: "1"},
+        {name: "医保自费", code: "1"},
+        {name: "医生", code: "physicianName"},
+        {name: "费用标志", code: "1"},
+        {name: "执行科室", code: "execUnitName"},
+        {name: "领量", code: "drugQuanName"},
+        {name: "类别", code: "drugFlagName"},
+        {name: "药房", code: "groupNoName"},
+        {name: "序号", code: "serialName"},
+        {name: "医保备注", code: "1"},
+      ],
+      getYiZhuFlag,
     }
   }
 }
+
+function getYiZhuFlag(val) {
+  if (stringIsBlank(val)) {
+    return 'warning'
+  }
+  switch (val) {
+    case "1":
+      return 'info'
+    case "2":
+      return 'success'
+    case "3":
+      return ''
+    case "4":
+      return ''
+    case "5":
+      return 'danger'
+    default:
+      return 'warning'
+  }
+}
+
 </script>
 
 <style scoped>
-
+.el-table__row .el-table__row--level-0 {
+  background: rgba(145, 247, 145, .5);
+}
 </style>

+ 4 - 24
src/views/hospitalization/zhu-yuan-yi-sheng/YiZhuLuRu.vue

@@ -2,14 +2,10 @@
   <el-container>
     <el-container>
       <el-aside style="width:auto !important;">
-        <huan-zhe-lie-biao @clickHuanZheXinXi="clickHuanZheXinXi"></huan-zhe-lie-biao>
+        <huan-zhe-lie-biao></huan-zhe-lie-biao>
       </el-aside>
       <el-main>
-        <el-collapse v-model="activeNames">
-          <el-collapse-item title="患者信息" class="collapse-item-height" name="1">
-            <huan-zhe-xin-xi></huan-zhe-xin-xi>
-          </el-collapse-item>
-        </el-collapse>
+        <huan-zhe-xin-xi></huan-zhe-xin-xi>
         <el-tabs>
           <el-tab-pane label="医嘱录入">
             <yi-zhu-lu-ru-zhu-jian></yi-zhu-lu-ru-zhu-jian>
@@ -23,42 +19,26 @@
 
 <script>
 import store from '../../../store'
-import {computed, ref} from "vue";
+import {computed} from "vue";
 import HuanZheLieBiao from "../../../components/zhu-yuan-yi-sheng/HuanZheLieBiao.vue";
 import HuanZheXinXi from "../../../components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
-import {clone} from "../../../utils/clone";
 import YiZhuLuRuZhuJian from "../../../components/zhu-yuan-yi-sheng/YiZhuLuRuZhuJian.vue";
 
 export default {
   name: "YiZhuLuRu",
   components: {YiZhuLuRuZhuJian, HuanZheXinXi, HuanZheLieBiao},
   setup() {
-    // 手风琴
-    const activeNames = ref(['1'])
-    // 选中的患者
-    const huanZhe = ref('')
-
     const tableHeight = computed(() => {
       return store.state.app.windowSize.h
     })
 
-    const clickHuanZheXinXi = (val) => {
-      huanZhe.value = clone(val.res)
-    }
-
-
     return {
       tableHeight,
-      activeNames,
-      clickHuanZheXinXi,
-      huanZhe,
     }
   }
 }
 </script>
 
 <style scoped>
-.collapse-item-height >>> .el-collapse-item__header {
-  height: 20px;
-}
+
 </style>