瀏覽代碼

医嘱审核和长期医嘱默认执行频率为 qd

xiaochan 2 年之前
父節點
當前提交
c966796f01

+ 19 - 3
src/api/zhu-yuan-yi-sheng/qrder-quash.js

@@ -10,11 +10,27 @@ export function applicationForRevocation(data) {
     })
 }
 
-export function getReqOrderQuash(startTime, endTime) {
+export function getReqOrderQuash(startTime, endTime, state) {
     return request({
-        url: url + 'applicationForRevocation',
+        url: url + 'getReqOrderQuash',
+        method: 'get',
+        params: {startTime, endTime, state}
+    })
+}
+
+
+export function selectReqListByPat(patNo, times, state) {
+    return request({
+        url: url + 'selectReqListByPat',
         method: 'get',
-        params: {startTime, endTime}
+        params: {patNo, times, state}
     })
 }
 
+export function saveDataApi(data) {
+    return request({
+        url: url + 'saveData',
+        method: 'post',
+        data
+    })
+}

+ 23 - 0
src/components/xiao-chan/xc-el-option/XcElOption.vue

@@ -0,0 +1,23 @@
+<script setup lang="ts" name='XcElOption'>
+import {defineProps} from 'vue'
+
+const {data} = defineProps({
+  data: Array<{
+    code: string,
+    name: string
+  }>
+})
+
+
+</script>
+
+<template>
+  <el-option v-for="item in data"
+             :key="item.code"
+             :value="item.code"
+             :label="item.name"/>
+</template>
+
+<style scoped lang="scss">
+
+</style>

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

@@ -1,11 +1,12 @@
 <template>
-  <div style="width: 500px">
+  <div style="width: 550px">
     <el-form ref="huiZhenShenQingForm"
              :model="huiZhenShenQing"
              :rules="huiZhenShenQingRules"
              label-width="100px">
       <el-form-item label="会诊科室:" prop="reqDept1">
         <el-select
+            style="width: 120px"
             v-model="huiZhenShenQing.huiZhenKeShi"
             :remote-method="remoteMethodHuiZhenKeShi"
             clearable
@@ -67,7 +68,7 @@
         <el-switch
             v-model="huiZhenShenQing.ybSelfFlag"
             :active-value="1"
-            :inactive-value="null"
+            :inactive-value="0"
             active-color="#13ce66"
             active-text="是"
             inactive-color="#ff4949"
@@ -78,7 +79,7 @@
         <el-switch
             v-model="huiZhenShenQing.emergencyFlag"
             :active-value="1"
-            :inactive-value="null"
+            :inactive-value="0"
             active-color="#13ce66"
             active-text="是"
             inactive-color="#ff4949"
@@ -86,14 +87,23 @@
         </el-switch>
       </el-form-item>
       <el-form-item label="病情简介:" prop="reqComment">
-        <el-input v-model="huiZhenShenQing.reqComment" :rows="3" placeholder="请输入内容" type="textarea"></el-input>
+        <el-input v-model="huiZhenShenQing.reqComment"
+                  :rows="6"
+                  placeholder="请输入内容"
+                  type="textarea"/>
       </el-form-item>
       <el-form-item label="目前主要诊断:" prop="hzZd">
-        <el-input v-model="huiZhenShenQing.hzZd" :rows="3" maxlength="100" placeholder="请输入内容" show-word-limit
-                  type="textarea"></el-input>
+        <el-input v-model="huiZhenShenQing.hzZd"
+                  :rows="6" maxlength="100"
+                  placeholder="请输入内容"
+                  show-word-limit
+                  type="textarea"/>
       </el-form-item>
       <el-form-item label="会诊目的:" prop="hzMd">
-        <el-input v-model="huiZhenShenQing.hzMd" :rows="3" placeholder="请输入内容" type="textarea"></el-input>
+        <el-input v-model="huiZhenShenQing.hzMd"
+                  :rows="6"
+                  placeholder="请输入内容"
+                  type="textarea"/>
       </el-form-item>
       <el-button style="margin-left: 20px" type="success" @click="huiZhenShenQingClick">申请</el-button>
       <el-tag style="margin-left: 20px">申请人:{{ huiZhenShenQing.name }}</el-tag>
@@ -144,8 +154,8 @@ const huiZhenShenQing = ref({
   actOrderNo: '', //新开的医嘱号
   hzDoctor1: '', //会诊的医生
   name: '', // 申请人
-  emergencyFlag: null, // 医嘱紧急
-  ybSelfFlag: null, // 自费
+  emergencyFlag: 0, // 医嘱紧急
+  ybSelfFlag: 0, // 自费
   huiZhenKeShi: {},
 })
 

+ 2 - 2
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/HuoQuMuBan.vue

@@ -108,7 +108,7 @@ import {
   huoQuZhuYuanPinLv,
 } from '@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru'
 import {
-  frequCodeEnum,
+  frequCodeEnum, frequencyConfig,
   muBanMing,
   queryParam
 } from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
@@ -249,7 +249,7 @@ const dianJiQueDing = () => {
     if (queryParam.value.frequCode === frequCodeEnum.temporary && item.frequCode !== 'ONCE') {
       item.frequCode = 'ONCE'
     } else if (queryParam.value.frequCode === frequCodeEnum.longTerm && item.frequCode === 'ONCE') {
-      item.frequCode = frequCodeEnum.always
+      item.frequCode = frequencyConfig
     }
   })
   emit('mu-ban-shu-ju', clone(xuanZhongShuJu.value))

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

@@ -296,7 +296,7 @@ import {
   frequCodeEnum,
   yaoPinPingLvData,
   geiYaoFangShiData,
-  yzMitt, huanZheXinXi
+  yzMitt, huanZheXinXi, frequencyConfig
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {ElMessageBox} from "element-plus";
 import YzDialog from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/dialog/YzDialog";
@@ -338,6 +338,7 @@ const searchOrders = (val) => {
 const tiShiBiaoTi = ref([])
 // 填充数据
 const xuanZhongFeiYong = async (row, laiyuan = 1) => {
+  // 这里是用的模板数据
   if (row.serial === '0000' && row.groupNo === '0000') {
     props.openGroupOrderTemplate(row.orderCode);
     return;
@@ -359,7 +360,7 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
   qingKong()
   await Sleep(200)
   // 克隆一下数据防止有问题
-  yiZhuData.value = clone(row) // clone(row)
+  yiZhuData.value = clone(row)
   if (tempOrderNo !== null) {
     yiZhuData.value.actOrderNo = tempOrderNo;
     yiZhuData.value.statusFlag = '1'
@@ -415,8 +416,13 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
             yiZhuData.value.frequCode = res.data.frequCode
             yiZhuData.value.frequCodeName = res.data.frequCodeName
           } else {
-            yiZhuData.value.frequCode = 'ONCE'
-            yiZhuData.value.frequCodeName = '一次'
+            if (queryParam.value.frequCode === frequCodeEnum.longTerm) {
+              yiZhuData.value.frequCode = frequencyConfig
+            } else if (queryParam.value.frequCode === frequCodeEnum.temporary) {
+              yiZhuData.value.frequCode = 'ONCE'
+            } else {
+              yiZhuData.value.frequCode = frequencyConfig
+            }
           }
         }
         // 加载给药方式 如果已经有了就没事了
@@ -519,7 +525,7 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
     if (queryParam.value.frequCode === frequCodeEnum.temporary && yiZhuData.value.frequCode !== 'ONCE') {
       yiZhuData.value.frequCode = 'ONCE'
     } else if (queryParam.value.frequCode === frequCodeEnum.longTerm && yiZhuData.value.frequCode === 'ONCE') {
-      yiZhuData.value.frequCode = 'ALWAYS'
+      yiZhuData.value.frequCode = frequencyConfig
     }
   }
 
@@ -911,7 +917,7 @@ const pasteClick = () => {
   if (queryParam.value.frequCode === frequCodeEnum.temporary && copyOrderNo.frequCode !== 'ONCE') {
     copyOrderNo.frequCode = 'ONCE'
   } else if (queryParam.value.frequCode === frequCodeEnum.longTerm && copyOrderNo.frequCode === 'ONCE') {
-    copyOrderNo.frequCode = 'ALWAYS'
+    copyOrderNo.frequCode = frequencyConfig
   } else if (queryParam.value.frequCode === frequCodeEnum.takeMedicine) {
     copyOrderNo.frequCode = 'ONCE'
   }

+ 84 - 9
src/views/data-modify/OrderQuash.vue

@@ -1,24 +1,57 @@
 <script setup name='OrderQuash'>
-import {getReqOrderQuash} from "@/api/zhu-yuan-yi-sheng/qrder-quash";
+import {getReqOrderQuash, saveDataApi, selectReqListByPat} from "@/api/zhu-yuan-yi-sheng/qrder-quash";
 import {getDateRangeFormatDate} from "@/utils/date";
 import {getServerDateApi} from "@/api/public-api";
+import XcElOption from "@/components/xiao-chan/xc-el-option/XcElOption.vue";
+import {stateList} from "@/data/order-quash-data";
+import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
+import {getWindowSize} from "@/utils/window-size";
+import XEUtils from 'xe-utils'
+import {BizException, ExceptionEnum} from "@/utils/BizException";
 
 const dateRange = ref([])
+const stateRaf = ref(1)
+
+const returnData = ref([])
 
 const queryData = () => {
   let {startTime, endTime} = getDateRangeFormatDate(dateRange.value)
-  console.log(startTime, endTime)
-  getReqOrderQuash(startTime, endTime).then((res) => {
-    console.log(res)
+  getReqOrderQuash(startTime, endTime, stateRaf.value).then((res) => {
+    console.log('侧边栏数据 %o ', res)
+    returnData.value = res
   })
+}
 
+const patReqData = ref([])
+const currentPat = ref({})
+const rowClick = (row) => {
+  let {patNo, times, state} = row
+  currentPat.value = row
+  selectReqListByPat(patNo, times, state).then((res) => {
+    patReqData.value = res
+  })
 }
 
+const saveData = () => {
+
+  if (XEUtils.isEmpty(patReqData.value)) {
+    BizException(ExceptionEnum.MESSAGE_ERROR, "请先选择数据。");
+  }
+
+  XEUtils.arrayEach(patReqData.value, (item, key) => {
+    if (item.state === 1) {
+      BizException(ExceptionEnum.MESSAGE_ERROR, `第${(key + 1)}个,未处理。`);
+    }
+  })
+  saveDataApi(patReqData.value).then((res) => {
+    queryData()
+    patReqData.value = []
+  })
+}
 
 onMounted(async () => {
   let now = await getServerDateApi()
   dateRange.value = [now, now]
-  console.log(dateRange.value)
   queryData()
 })
 
@@ -26,15 +59,57 @@ onMounted(async () => {
 
 <template>
   <el-container>
-    <el-aside>
-
+    <el-aside class="quash_table">
+      <xc-table :local-data="returnData"
+                small
+                @row-click="rowClick"
+                layout="total,  prev, pager, next"
+                :final-height="getWindowSize.h / 1.02">
+        <el-table-column prop="patNo" label="住院号"/>
+        <el-table-column prop="name" label="姓名"/>
+        <el-table-column prop="count" label="数量"/>
+      </xc-table>
     </el-aside>
     <el-container>
       <el-header>
-
+        <el-date-picker v-model="dateRange"
+                        type="daterange"
+                        style="width: 220px"/>
+        <el-divider direction="vertical"/>
+        <el-select v-model="stateRaf"
+                   style="width: 120px">
+          <xc-el-option :data="stateList"/>
+        </el-select>
+        <el-button @click="queryData" type="primary">查询</el-button>
+        <el-button @click="saveData" type="success"
+                   :disabled="currentPat.state !== 1">
+          保存
+        </el-button>
       </el-header>
       <el-main>
-        <el-date-picker v-model="dateRange" type="daterange" style="width: 220px"/>
+        <xc-table :local-data="patReqData"
+                  :open-paging="false"
+                  :final-height="getWindowSize.h / 1.05">
+          <el-table-column type="index"/>
+          <el-table-column label="医嘱名" prop="orderName"/>
+          <el-table-column label="频率" prop="frequCode" width="120"/>
+          <el-table-column label="撤销备注" prop="reqRemark"/>
+          <el-table-column label="操作">
+            <template #default="scope">
+              <el-radio-group v-model="scope.row.state" size="small">
+                <el-radio-button :label="1">申请</el-radio-button>
+                <el-radio-button :label="2">通过</el-radio-button>
+                <el-radio-button :label="3">拒绝</el-radio-button>
+              </el-radio-group>
+            </template>
+          </el-table-column>
+          <el-table-column label="审核备注" prop="approverRemark">
+            <template #default="scope">
+              <el-input maxlength="20" :disabled="scope.row.state !== 3"
+                        v-model="scope.row.approverRemark"/>
+            </template>
+          </el-table-column>
+        </xc-table>
       </el-main>
     </el-container>
   </el-container>

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

@@ -77,6 +77,9 @@ export const frequCodeEnum = {
     takeMedicine: 'takeMedicine',
 }
 
+// 生成的长期医嘱频率
+export const frequencyConfig = 'QD'
+
 // 医嘱数据
 export const yiZhuData = ref({
     id: '',
@@ -216,6 +219,9 @@ export const tempYzData = computed(() => {
         if (isCydy()) {
             return item.selfBuy === '4'
         }
+        if (item.statusFlag === '1') {
+            return true
+        }
 
         if (queryParam.value.displayRange === 1) {
             // 停止的医嘱

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

@@ -266,7 +266,9 @@ const orderQuash = (val) => {
   }).then(({value}) => {
     applicationForRevocation({
       actOrderNo: val.actOrderNo,
-      reasonsForRevocation: value
+      reqRemark: value,
+      patNo: val.inpatientNo,
+      times: val.admissTimes
     })
   })
 }