瀏覽代碼

草药医嘱优化

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

+ 5 - 6
src/components/xiao-chan/combo-grid/XcComboGrid.vue

@@ -64,16 +64,12 @@ const props = defineProps({
   },
   rowKey: {
     type: String,
-    default: 'id'
+    default: 'code'
   },
   currentKey: {
     type: String,
     default: null
   },
-  data: {
-    type: Array,
-    default: []
-  },
   clearable: {
     type: Boolean,
     default: false
@@ -84,7 +80,10 @@ const props = defineProps({
   },
   tableHeader: {
     type: Array,
-    default: []
+    default: [
+      {label: '编码', prop: 'code'},
+      {label: '名称', prop: 'name'},
+    ]
   },
   placeholder: {
     type: String,

+ 33 - 17
src/components/zhu-yuan-yi-sheng/AllergenEntry.vue

@@ -4,7 +4,12 @@
       <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" />
+    <xc-combo-grid v-model="newAllergen.name"
+                   @rowClick="rowClick"
+                   row-key="code"
+                   :current-key="newAllergen.code"
+                   :query-data-func="methodAllergen">
+    </xc-combo-grid>
     <el-button 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>
@@ -18,13 +23,12 @@
       <el-table-column>
         <template #default="scope">
           <el-popconfirm
-            cancel-button-text="取消"
-            confirm-button-text="确定"
-            icon="Info"
-            icon-color="red"
-            title="确定要删除吗?"
-            @confirm="clickRemoveAllergens(scope.$index, scope.row.id)"
-          >
+              cancel-button-text="取消"
+              confirm-button-text="确定"
+              icon="Info"
+              icon-color="red"
+              title="确定要删除吗?"
+              @confirm="clickRemoveAllergens(scope.$index, scope.row.id)">
             <template #reference>
               <el-button icon="Delete" type="danger">删除</el-button>
             </template>
@@ -36,10 +40,17 @@
 </template>
 
 <script name="AllergenEntry" setup>
-import { stringNotBlank } from '@/utils/blank-utils'
-import { getAllergens, getDrugInfo, getPatientAllergens, newPatientAllergens, removePatientAllergens } from '@/api/public-api'
+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'
+import {ElMessage} from 'element-plus'
+import XcComboGrid from "@/components/xiao-chan/combo-grid/XcComboGrid.vue";
 
 const props = defineProps({
   patNo: '',
@@ -66,17 +77,22 @@ let patientAllergenData = $ref({
 })
 
 const methodAllergen = (val) => {
+  if (val.length < 1) {
+    return
+  }
   if (allergenType === 0) {
-    getAllergens(val).then((res) => {
-      allergenData = res
-    })
+    return getAllergens(val)
   } else {
-    getDrugInfo(val).then((res) => {
-      allergenData = res
-    })
+    return getDrugInfo(val)
   }
 }
 
+const rowClick = (value) => {
+  newAllergen.code = value.code
+  newAllergen.name = value.name
+  clickNewPatientAllergens()
+}
+
 /**
  *
  * @returns {IMessageHandle} 错误信息

+ 0 - 89
src/components/zhu-yuan-yi-sheng/cao-yao-yi-zhu/ChaXuanCaoYao.vue

@@ -1,89 +0,0 @@
-<template>
-  <el-dialog v-model="dialog" title="搜索草药" @close="emit('close')">
-    <el-input ref="queryNameInput" v-model="queryName" clearable style="width: 120px" @keyup.enter="dianJiChaXunCaoYao(0)"></el-input>
-    <el-divider direction="vertical"></el-divider>
-    <el-button icon="Search" type="primary" @click="dianJiChaXunCaoYao(0)">查询</el-button>
-    <el-divider direction="vertical"></el-divider>
-    <el-divider></el-divider>
-    <el-table :data="caoYaoShuJu.data" :height="windowSize.h / 2.1" highlight-current-row stripe>
-      <el-table-column label="编码" prop="chargeCode"></el-table-column>
-      <el-table-column label="名称" prop="chargeCodeName"></el-table-column>
-      <el-table-column label="单价" prop="retprice"></el-table-column>
-      <el-table-column label="规格" prop="specification"></el-table-column>
-      <el-table-column label="药房" prop="groupName"></el-table-column>
-      <el-table-column label="包装大小" prop="serial">
-        <template #default="scope">
-          <span v-if="scope.row.serial === '01'">小包装</span>
-          <span v-else-if="scope.row.serial === '99'">大包装</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="选中">
-        <template #default="scope">
-          <el-button text @click="emit('xuanZhongShuJu', scope.row)">选中</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    <el-pagination :current-page="caoYaoShuJu.currentPage" :page-size="caoYaoShuJu.pageSize" :total="caoYaoShuJu.total" layout="total,  prev, pager, next" @current-change="fanYe">
-    </el-pagination>
-  </el-dialog>
-</template>
-
-<script>
-import { computed, onMounted, ref } from 'vue'
-import { huoQuCaoYao } from '@/api/zhu-yuan-yi-sheng/cao-yao-yi-zhu'
-import store from '@/store'
-
-export default {
-  name: 'ChaXuanCaoYao',
-  emits: ['close', 'xuanZhongShuJu'],
-  props: {
-    groupNo: {
-      type: String,
-    },
-  },
-  setup(props, { emit }) {
-    const windowSize = computed(() => {
-      return store.state.app.windowSize
-    })
-    const queryName = ref('')
-    const queryNameInput = ref(null)
-    const caoYaoShuJu = ref({
-      currentPage: 1,
-      pageSize: 20,
-      total: 0,
-    })
-
-    const dianJiChaXunCaoYao = (val) => {
-      huoQuCaoYao(queryName.value, props.groupNo, caoYaoShuJu.value.currentPage, caoYaoShuJu.value.pageSize, caoYaoShuJu.value.total).then((res) => {
-        if (val === 0) {
-          caoYaoShuJu.value.total = res.total
-        }
-        caoYaoShuJu.value.data = res.records
-      })
-    }
-
-    const fanYe = (val) => {
-      caoYaoShuJu.value.currentPage = val
-      dianJiChaXunCaoYao(caoYaoShuJu.value.total)
-    }
-
-    onMounted(() => {
-      setTimeout(() => {
-        queryNameInput.value.focus()
-      }, 300)
-    })
-    return {
-      dialog: true,
-      emit,
-      queryName,
-      dianJiChaXunCaoYao,
-      fanYe,
-      caoYaoShuJu,
-      windowSize,
-      queryNameInput,
-    }
-  },
-}
-</script>
-
-<style scoped></style>

+ 12 - 3
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/jy-jc-tree/JyJcTree.vue

@@ -7,12 +7,14 @@
       :filter-node-method="filterNode"
       @node-click="nodeClick"
       :props="config">
-    <template #default="{node, data }">
+    <template #default="{node, data}">
       <el-icon>
-        <FolderOpened v-if="data.children"/>
+        <FolderOpened v-if="data?.code === null || data?.code.length < 5"/>
         <Document v-else/>
       </el-icon>
-      <span>{{ data.name }} <a v-if="props.yjyc === 'jy'">{{ data.inspectStuffName }}</a> </span>
+      <span :title="showName(data)">
+        {{ showName(data) }}
+      </span>
     </template>
   </el-tree>
 </template>
@@ -63,6 +65,13 @@ const nodeClick = (data: Tree) => {
   }
 }
 
+const showName = (data) => {
+  if (props.yjyc === 'jy') {
+    return data.name + ' ' + (data?.inspectStuffName === null ? '' : data?.inspectStuffName)
+  }
+  return data.name;
+}
+
 
 </script>
 

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

@@ -27,7 +27,9 @@
               @rowClick="xuanZhongFeiYong">
             <el-table-column label="说明书">
               <template #default="{row}">
-                <el-button @click.stop="drugManual.open(row.orderCode,row.serial)" :disabled="row.groupNo === '00'">说明书
+                <el-button @click.stop="drugManual.open(row.orderCode,row.serial)"
+                           :disabled="row.groupNo === '00'">
+                  说明书
                 </el-button>
               </template>
             </el-table-column>
@@ -651,7 +653,6 @@ const isEdit = computed(() => {
 
 let baoCunXinXiRef = ref(null)
 const toAddAnOrder = async () => {
-
   if (stringIsBlank(props.patientInfo.inpatientNo)) {
     BizException(ExceptionEnum.MESSAGE_ERROR, '请先选择患者')
   }

+ 4 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue

@@ -1,7 +1,7 @@
 <template>
   <div style="overflow: auto; width: calc(100% - 10px)"
        :style="{height: windowSize.h + 'px'}">
-    <div style="color:#000; height: 947px;width:2063px;  ">
+    <div style="color:#000; height: 947px;width:2063px;">
       <div class="yz__header">
         <div class="yz__close" @click="basicPatientInformation = !basicPatientInformation">
           <el-icon>
@@ -22,7 +22,9 @@
             <div v-for="(item,index) in pathList"
                  :style="currentPagePosition(item.path)"
                  @click="item.func? item.func(index) :  handleClick(item.path,item.disable)">
-              <span> {{ item.title }}</span>
+              <span>
+                {{ item.title }}
+              </span>
             </div>
             <div @click="downloadGuide" style="background-color: red;color: white">
               <span>操作指南 {{ fileName }}</span>

+ 6 - 17
src/views/hospitalization/zhu-yuan-yi-sheng/cao-yao-yi-zhu/XinZhengCaoYao.vue

@@ -152,9 +152,6 @@
       </el-table>
     </el-main>
   </el-container>
-  <!--搜索草药弹框-->
-  <cha-xuan-cao-yao v-if="chaXunCaoYaoZuJian" :group-no="chuFang.groupNo" @close="chaXunCaoYaoZuJian = false"
-                    @xuanZhongShuJu="dianJiXuanZhongCaoYao"></cha-xuan-cao-yao>
   <!-- 获取草药模板 -->
   <cao-yao-mu-ban v-if="muBanZuJian" @close="muBanZuJian = false"
                   @xuanZhongShuJu="dianJiXuanZhongMuBanShuJu"></cao-yao-mu-ban>
@@ -171,7 +168,8 @@ import {computed, onMounted, ref, watch} from 'vue'
 import {
   cuoWuXinXi,
   huanZheXinXi,
-  youWuXuanZheHuanZhe
+  youWuXuanZheHuanZhe,
+  mingXi
 } from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
 import {
   baoCunCaoYao,
@@ -183,7 +181,6 @@ import {
 import store from '@/store'
 import {ElMessage, ElMessageBox} from 'element-plus'
 import {stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
-import ChaXuanCaoYao from '@/components/zhu-yuan-yi-sheng/cao-yao-yi-zhu/ChaXuanCaoYao.vue'
 import CaoYaoMuBan from '@/components/zhu-yuan-yi-sheng/cao-yao-yi-zhu/CaoYaoMuBan.vue'
 import {yaoPinXiangMuPiPeiYiBao} from '@/api/public-api'
 import CuoWuXinXi from '@/components/zhu-yuan-yi-sheng/CuoWuXinXi.vue'
@@ -252,17 +249,6 @@ const wipeData = () => {
   }
 }
 
-/**
- * 具体的草药明细
- * @type {Ref<UnwrapRef<{weiYi: *[], list: *[]}>>}
- */
-const mingXi = ref({
-  weiYi: [],
-  list: [],
-})
-
-const chaXunCaoYaoZuJian = ref(false)
-
 /**
  * 删除草药下标
  * @param index
@@ -275,7 +261,10 @@ const removeHerbs = (index) => {
 const headerTable = [
   {label: '编码', prop: 'chargeCode'},
   {label: '名称', prop: 'chargeCodeName'},
-  {label: '药房', prop: 'groupName'}
+  {label: '药房', prop: 'groupName'},
+  {label: '单价', prop: 'retprice'},
+  {label: '规格', prop: 'specification'},
+  {label: '包装大小', prop: 'serial'},
 ]
 const queryHerbalMedicineOrder = (val) => {
   return huoQuCaoYao(val, chuFang.value.groupNo)

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

@@ -207,14 +207,22 @@ export const jyTree = ref([])
 // 检查树状图
 export const jcTree = ref([])
 
+/**
+ * 具体的草药明细
+ * @type {Ref<UnwrapRef<{weiYi: *[], list: *[]}>>}
+ */
+
+export const mingXi = ref({
+    weiYi: [],
+    list: [],
+})
+
 /**
  * 点击查询患者信息
  * @param patNo 住院号
  */
 export const clickOnThePatient = (patNo) => {
-
     let str = ''
-
     if (stringNotBlank(yiZhuData.value.actOrderNo) && yiZhuData.value.statusFlag === '1') {
         if (yiZhuData.value.actOrderNo !== 'tempOrderNo') {
             str += "存在未保存的医嘱。"
@@ -232,6 +240,9 @@ export const clickOnThePatient = (patNo) => {
     if (xuanZhongJianCha.value.data.length > 0) {
         str += '存在未保存的检验申请。'
     }
+    if (mingXi.value.list.length > 0) {
+        str += '存在未保存的草药医嘱。'
+    }
 
     if (stringIsBlank(huanZheXinXi.value.inpatientNo)) {
         getPatientInfo(patNo).then((res) => {

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

@@ -302,10 +302,7 @@
     </el-table-column>
   </el-table>
 
-  <!-- 这个是过敏源的 -->
-  <!--  <AllergenEntry v-if="allergenDialog"-->
-  <!--                 :pat-no="props.patientInfo.inpatientNo"-->
-  <!--                 @close="allergenDialog = false"></AllergenEntry>-->
+
   <yao-ping-xiang-qing v-if="drugProblem.dialog"
                        :url="drugProblem.url"
                        @close="drugProblem.dialog = false"/>

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

@@ -8,16 +8,19 @@
                         :confirm-orders-click="confirmOrdersClick"/>
     <div>
       <button @click="orderTemplateClick">维护模板</button>
-      <button type="warning" @click="clickToStopTheOrder">批量停止</button>
+      <button @click="clickToStopTheOrder">批量停止</button>
       <el-divider direction="vertical"></el-divider>
-      <button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)"
-              @click="clickToModifyTheDoctorSOrderTime"> 修改医嘱时间
+      <button :disabled="stringIsBlank(huanZheXinXi.inpatientNo)"
+              @click="clickToModifyTheDoctorSOrderTime">
+        修改医嘱时间
       </button>
-      <button type="warning"
-              :disabled="stringIsBlank(huanZheXinXi.inpatientNo)"
-              @click="jumpToMedicalRecord">病案首页
+      <button :disabled="stringIsBlank(huanZheXinXi.inpatientNo)"
+              @click="jumpToMedicalRecord">
+        病案首页
       </button>
       <button @click="confirmAssociationClick">关联</button>
+      <button @click="openRationalDrugUse">合理用药</button>
+      <button @click="allergen.open()">患者过敏原信息维护</button>
     </div>
     <div>
       <yz-editor :patient-info="huanZheXinXi"
@@ -39,6 +42,7 @@
                         v-if="chargeDetails.dialog"
                         :sum="chargeDetails.sum"
                         @close="chargeDetails.dialog = false"/>
+    <!--  获取模板的数据  -->
     <huo-qu-mu-ban
         ref="mubanRef"
         @muBanShuJu="muBanShuJu"/>
@@ -54,6 +58,11 @@
     <yao-ping-xiang-qing v-if="drugManual.dialog"
                          :code="drugManual.code"
                          @close="drugManual.dialog = false"/>
+
+    <!-- 这个是过敏源的 -->
+    <AllergenEntry v-if="allergen.dialog"
+                   :pat-no="huanZheXinXi.inpatientNo"
+                   @close="allergen.dialog = false"/>
   </div>
 
 </template>
@@ -75,7 +84,7 @@ import {
   clickOnThePatient,
   drugManual,
   associateOrders,
-  clearAssociate
+  clearAssociate, youWuXuanZheHuanZhe
 } from '../public-js/zhu-yuan-yi-sheng'
 import store from '@/store'
 import {stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
@@ -94,6 +103,7 @@ import {getFormatDatetime} from "@/utils/date";
 import XcDialog from "@/components/xiao-chan/dialog/XcDialog";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
 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
@@ -103,6 +113,14 @@ const user = computed(() => {
   return store.state.user.info
 })
 
+let allergen = $ref({
+  dialog: false,
+  open: () => {
+    if (youWuXuanZheHuanZhe()) return
+    allergen.dialog = true
+  }
+})
+
 // 医嘱查询
 const yzQueryRef = ref(null)
 
@@ -138,7 +156,9 @@ const toDeleteAnOrder = () => {
   yzEditorRef.value.toDeleteAnOrderClick()
 }
 
-// 是否开启成组关联
+const openRationalDrugUse = () => {
+  window.open('http://172.16.32.121:9097/index.html')
+}
 
 // 表格
 let tableRef = ref(null)