Forráskód Böngészése

合理用药优化,以及添加过敏源信息

DESKTOP-MINPJAU\Administrator 3 éve
szülő
commit
7d5aecf936

+ 57 - 0
src/api/public-api.js

@@ -60,4 +60,61 @@ export function huoQuYuanGongXinXi(code) {
     });
 }
 
+export function getAllergens(name) {
+    return request({
+        url: '/publicApi/getAllergens',
+        method: 'get',
+        params: {name}
+    });
+}
+
+export function getPatientAllergens(patNo) {
+    return request({
+        url: '/publicApi/getPatientAllergens',
+        method: 'get',
+        params: {patNo}
+    });
+}
+
+export function whetherThePatientHasAllergens(patNo) {
+    return request({
+        url: '/publicApi/whetherThePatientHasAllergens',
+        method: 'get',
+        params: {patNo}
+    });
+}
+
+export function newPatientAllergens(patNo, allergenCode, allergenType) {
+    return request({
+        url: '/publicApi/newPatientAllergens',
+        method: 'get',
+        params: {patNo, allergenCode, allergenType}
+    });
+}
+
+export function removePatientAllergens(id) {
+    return request({
+        url: '/publicApi/removePatientAllergens',
+        method: 'get',
+        params: {id}
+    });
+}
+
+export function getDrugInfo(name) {
+    return request({
+        url: '/publicApi/getDrugInfo',
+        method: 'get',
+        params: {name}
+    });
+}
+
+
+
+
+
+
+
+
+
+
 

+ 135 - 0
src/components/zhu-yuan-yi-sheng/AllergenEntry.vue

@@ -0,0 +1,135 @@
+<template>
+  <el-dialog v-model="dialog" title="患者过敏源信息" @closed="emit('close')">
+    <el-radio-group v-model="allergenType" @change="typeChangeClear()">
+      <el-radio-button :label="0">过敏源</el-radio-button>
+      <el-radio-button :label="1">本院药品</el-radio-button>
+    </el-radio-group>
+    <xc-select v-model="newAllergen" :data="allergenData" remote @method="methodAllergen"/>
+    <el-button icon="el-icon-plus" type="primary" @click="clickNewPatientAllergens">添加</el-button>
+    <el-table :data="patientAllergenData.data" :height="windowSize.h - 400">
+      <el-table-column label="编码" prop="allergenCode"></el-table-column>
+      <el-table-column label="名称" prop="allergenName"></el-table-column>
+      <el-table-column label="来源" prop="type">
+        <template #default="scope">
+          <span v-if="scope.row.type === 0">
+            过敏源
+          </span>
+          <span v-else>
+            本院药品
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column>
+        <template #default="scope">
+          <el-popconfirm
+              cancel-button-text="取消"
+              confirm-button-text="确定"
+              icon="el-icon-info"
+              icon-color="red"
+              title="确定要删除吗?"
+              @confirm="clickRemoveAllergens(scope.$index, scope.row.id)">
+            <template #reference>
+              <el-button icon="el-icon-delete" type="danger">删除</el-button>
+            </template>
+          </el-popconfirm>
+        </template>
+      </el-table-column>
+    </el-table>
+  </el-dialog>
+</template>
+
+<script name="AllergenEntry" setup>
+import {stringNotBlank} from "@/utils/blank-utils";
+import {
+  getAllergens,
+  getDrugInfo,
+  getPatientAllergens,
+  newPatientAllergens,
+  removePatientAllergens
+} from "@/api/public-api";
+import store from '@/store'
+import {ElMessage} from "element-plus";
+
+const props = defineProps({
+  patNo: '',
+})
+const emit = defineEmits(['close'])
+
+const windowSize = computed(() => {
+  return store.state.app.windowSize
+})
+const newAllergen = $ref({
+  code: '',
+  name: '',
+})
+let allergenData = $ref([])
+let allergenType = $ref(0)
+
+const dialog = ref(true)
+let patNo = $ref('')
+let patientAllergenData = $ref({
+  data: [],
+  currentPage: 1,
+  sizePage: 10,
+  total: 0
+})
+
+const methodAllergen = (val) => {
+  if (allergenType === 0) {
+    getAllergens(val).then((res) => {
+      allergenData = res
+    })
+  } else {
+    getDrugInfo(val).then((res) => {
+      allergenData = res
+    })
+  }
+}
+
+const clickNewPatientAllergens = () => {
+  if (newAllergen.code === '') {
+    return ElMessage.error('请先选择数据')
+  }
+  if (typeof patientAllergenData.data.find(item => item.allergenCode === newAllergen.code) !== 'undefined') {
+    return ElMessage.error('无法录入相同的过敏源')
+  }
+  newPatientAllergens(patNo, newAllergen.code, allergenType).then((res) => {
+    patientAllergenData.data.push({
+      id: res,
+      allergenCode: newAllergen.code,
+      allergenName: newAllergen.name,
+      type: allergenType
+    })
+    patientAllergenData.total = patientAllergenData.data.length
+  })
+}
+
+const clickRemoveAllergens = (index, id) => {
+  removePatientAllergens(id).then((res) => {
+    patientAllergenData.data.splice(index, 1)
+  })
+}
+
+const typeChangeClear = () => {
+  newAllergen.code = '';
+  newAllergen.name = '';
+  allergenData = []
+}
+
+onMounted(() => {
+  patNo = props.patNo
+  if (stringNotBlank(patNo)) {
+    getPatientAllergens(patNo).then((res) => {
+      patientAllergenData.data = res
+      patientAllergenData.total = patientAllergenData.data.length
+      console.log(res);
+    })
+  }
+})
+
+
+</script>
+
+<style scoped>
+
+</style>

+ 4 - 1
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/SouSuoYiZhu.vue

@@ -28,7 +28,10 @@
       <el-table-column label="毒麻类型" prop="drugFlagName"></el-table-column>
       <el-table-column label="药品详情">
         <template #default="scope">
-          <el-button @click="yaoPinXiangQing.dialog = true;yaoPinXiangQing.code = scope.row.orderCode">药品详情</el-button>
+          <el-button
+              @click="yaoPinXiangQing.dialog = true;yaoPinXiangQing.code = scope.row.orderCode.trim() + '_' + scope.row.serial.trim()">
+            药品详情
+          </el-button>
         </template>
       </el-table-column>
     </el-table>

+ 13 - 0
src/router/modules/dashboard.js

@@ -545,6 +545,19 @@ const route = [
         ],
     },
 
+    {
+        path: '/shouShuGuanLi',
+        component: Layout,
+        meta: {title: '手术管理', icon: 'iconfont icon-shoushuguanli'},
+        children: [
+            {
+                path: 'shouShuAnPai',
+                component: createNameComponent(() => import('@/views/surgical-management/SurgeryArrangement.vue')),
+                meta: {title: '手术安排', icon: 'iconfont icon-shoushuanpai'},
+            },
+        ],
+    },
+
     {
         path: '/utilities',
         component: Layout,

+ 1 - 1
src/utils/blank-utils.js

@@ -9,7 +9,7 @@ export function stringNotBlank(val) {
 }
 
 export function listIsBlank(val) {
-    return typeof val === 'undefined' || val.length === 0
+    return typeof val === 'undefined' || val === null || val.length === 0
 }
 
 export function listNotBlank(val) {

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

@@ -17,6 +17,7 @@
   </el-button>
   <el-divider direction="vertical"></el-divider>
   <el-button @click="tiaoZhuanZhiHeLiYongYao">合理用药</el-button>
+  <el-button @click="allergenDialog = true ">患者过敏信息</el-button>
   <yao-ping-xiang-qing v-if="HeLiYongYao.dialog" :code="HeLiYongYao.code"
                        @close="HeLiYongYao.dialog = false"></yao-ping-xiang-qing>
   <el-form ref="yiZhuRef" v-model="yiZhuData" label-width="90px" size="mini">
@@ -260,6 +261,8 @@
   <!-- 这里是搜索医嘱的 -->
   <sou-suo-yi-zhu v-if="yiZhuMingDialog" @close="yiZhuMingDialog = false"
                   @xuanZhongFeiYong="xuanZhongFeiYong"></sou-suo-yi-zhu>
+  <AllergenEntry v-if="allergenDialog" :pat-no="huanZheXinXi.inpatientNo"
+                 @close="allergenDialog = false"></AllergenEntry>
 </template>
 
 <script name="TianJiaYiZhu" setup>
@@ -286,11 +289,12 @@ import {clone} from '@/utils/clone'
 import HuoQuMuBan from '../../../../components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/HuoQuMuBan.vue'
 import {uuid} from '@/utils/getUuid'
 import BaoCunMuBan from '../../../../components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/BaoCunMuBan.vue'
-import {getServerDateApi, yaoPinShiFouPiPeiYiBao} from '@/api/public-api'
+import {getServerDateApi, whetherThePatientHasAllergens, yaoPinShiFouPiPeiYiBao} from '@/api/public-api'
 import router from '@/router'
 import SouSuoYiZhu from '@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/SouSuoYiZhu.vue'
 import CuoWuXinXi from '@/components/zhu-yuan-yi-sheng/CuoWuXinXi.vue'
 import YaoPingXiangQing from '@/components/zhu-yuan-yi-sheng/he-li-yong-yao/YaoPingXiangQing.vue'
+import AllergenEntry from "@/components/zhu-yuan-yi-sheng/AllergenEntry.vue";
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -772,6 +776,9 @@ onMounted(() => {
   } else {
     ElMessage.warning('您现在进入的是医嘱编辑模块,' + '您的编辑时间有 10 分钟,你准备好了吗?Are ya ready kids?')
     kaiQiDaoJiShi()
+    whetherThePatientHasAllergens(huanZheXinXi.value.inpatientNo).then((res) => {
+      allergenDialog = res
+    })
   }
   if (stringNotBlank(huanZheXinXi.value.inpatientNo)) {
     zhiXingKeShiData.value = [
@@ -782,6 +789,7 @@ onMounted(() => {
     ]
   }
   fuZhiYiZhu.value = []
+
 })
 
 onUnmounted(() => {
@@ -832,6 +840,13 @@ let HeLiYongYao = $ref({
 const tiaoZhuanZhiHeLiYongYao = () => {
   window.open('http://172.16.32.121:9097/index.html')
 }
+
+
+//// 下面都是过敏源信息
+let allergenDialog = $ref(false)
+
+
+/////  过敏源结束
 </script>
 
 <style scoped>