Browse Source

优化检验报告

lighter 1 year ago
parent
commit
0fe593af13

+ 1 - 1
src/router/index.js

@@ -140,7 +140,7 @@ export const constantRoutes = [
     meta: { title: '报告查询' },
   },
   {
-    path: '/checkExamDetail/:orderId/:patientId',
+    path: '/checkExamDetail/:patientId',
     component: () => import('../views/hospital-service/check-exam/CheckExamDetail.vue'),
     meta: { title: '报告详情' },
   },

+ 10 - 0
src/store/index.js

@@ -15,6 +15,7 @@ export default createStore({
     currentExamDate: null,
     examDateRange: [],
     examIndexArray: [],
+    currentExamIndex: {},
     testDateRange: [],
     testIndexArray: [],
     covidExamIdCard: null,
@@ -38,6 +39,7 @@ export default createStore({
     SET_CURRENTEXAMDATE: (state, payload) => (state.currentExamDate = payload),
     SET_EXAMDATERANGE: (state, payload) => (state.examDateRange = payload),
     SET_EXAMINDEXARRAY: (state, payload) => (state.examIndexArray = payload),
+    SET_CURRENTEXAMINDEX: (state, payload) => (state.currentExamIndex = payload),
     SET_TESTDATERANGE: (state, payload) => (state.testDateRange = payload),
     SET_TESTINDEXARRAY: (state, payload) => (state.testIndexArray = payload),
     SET_COVIDEXAMIDCARD: (state, payload) => (state.covidExamIdCard = payload),
@@ -96,6 +98,10 @@ export default createStore({
     getCreateOrderRequest(state) {
       return state.createOrderRequest
     },
+
+    getCurrentExamIndex(state) {
+      return state.currentExamIndex
+    }
   },
 
   actions: {
@@ -139,5 +145,9 @@ export default createStore({
     storeCreateOrderRequest({ commit }, payload) {
       commit('CREATE_ORDER_REQUEST', payload['createOrderRequest'])
     },
+
+    storeCurrentExamIndex({ commit }, payload) {
+      commit('SET_CURRENTEXAMINDEX', payload['currentExamIndex'])
+    }
   },
 })

+ 7 - 5
src/views/hospital-service/assessments/ClinicSatisfiedAssessment.vue

@@ -83,7 +83,7 @@
 <script setup>
 import {reactive, ref} from "vue";
 import {submitClinicSatisfiedAssessment} from '../../../api/assessments'
-import {showToast} from "vant";
+import {showDialog, showToast} from "vant";
 import {useRouter} from "vue-router";
 import {receiveAssessmentGift} from "../../../api/coupon";
 
@@ -194,12 +194,14 @@ const submitAnswer = () => {
     disableSubmitButton.value = true
     if (couponGift) {
       receiveAssessmentGift(routerParams).then((res) => {
-        showToast({
+        showDialog({
+          title: '提示',
           message: res,
-          position: 'top',
-          duration: 3000,
+        }).then(() => {
+          gotoResult()
+        }).catch(() => {
+          gotoResult()
         })
-        gotoResult()
       }).catch(() => {
         gotoResult()
       })

+ 7 - 5
src/views/hospital-service/assessments/InpatientSatisfiedAssessment.vue

@@ -170,7 +170,7 @@
 <script setup>
 import {onMounted, reactive, ref} from "vue";
 import {submitInpatientSatisfiedAssessment} from '../../../api/assessments'
-import {showToast} from "vant";
+import {showDialog, showToast} from "vant";
 import {useRouter} from "vue-router";
 import {receiveAssessmentGift} from "../../../api/coupon";
 
@@ -293,12 +293,14 @@ const submitAnswer = () => {
     disableSubmitButton.value = true
     if (couponGift) {
       receiveAssessmentGift(routerParams).then((res) => {
-        showToast({
+        showDialog({
+          title: '提示',
           message: res,
-          position: 'top',
-          duration: 3000,
+        }).then(() => {
+          gotoResult()
+        }).catch(() => {
+          gotoResult()
         })
-        gotoResult()
       }).catch(() => {
         gotoResult()
       })

+ 94 - 78
src/views/hospital-service/check-exam/CheckExamDetail.vue

@@ -6,7 +6,7 @@
         <template #default>
           <div style="font-size: 12px; color: #333333">就诊人</div>
           <div style="margin-top: 5px; font-size: 14px">
-            {{ exam.reportHeader.ptnt_NAME }}
+            {{ examIndex.patientName }}
           </div>
         </template>
       </van-grid-item>
@@ -14,7 +14,7 @@
         <template #default>
           <div style="font-size: 12px; color: #333333">性别</div>
           <div style="margin-top: 5px; font-size: 14px">
-            {{ computedSex }}
+            {{ examIndex.patientGender }}
           </div>
         </template>
       </van-grid-item>
@@ -22,17 +22,16 @@
         <template #default>
           <div style="font-size: 12px; color: #333333">年龄</div>
           <div style="margin-top: 5px; font-size: 14px">
-            {{ exam.reportHeader.ptnt_AGE }}
+            {{ examIndex.patientAge }}
           </div>
         </template>
       </van-grid-item>
     </van-grid>
     <div style="height: 5px"></div>
-    <van-cell title="送检医生" :value="exam.reportHeader.audt_USR_NAME"></van-cell>
-    <van-cell title="开方科室" :value="exam.reportHeader.dept_NAME"></van-cell>
-    <van-cell title="报告时间" :value="exam.reportHeader.audt_TIME"></van-cell>
-    <van-cell title="报告单号" :value="exam.reportHeader.ordr_ID"></van-cell>
-    <van-cell v-if="isMicrobacteria" title="细菌名称" :value="exam.bacteriaResult.bac_NAME_CN"></van-cell>
+    <van-cell title="申请医生" :value="examIndex.doctorName"></van-cell>
+    <van-cell title="开方科室" :value="examIndex.departName"></van-cell>
+    <van-cell title="报告时间" :value="examIndex.trscDate"></van-cell>
+    <van-cell title="报告单号" :value="examIndex.reportId"></van-cell>
     <div style="height: 5px"></div>
     <van-grid :column-num="4">
       <van-grid-item text="检查项目"></van-grid-item>
@@ -40,12 +39,12 @@
       <van-grid-item text="单位"></van-grid-item>
       <van-grid-item text="参考值"></van-grid-item>
     </van-grid>
-    <div v-for="item in exam.reportItems" :key="item.itm_ID">
+    <div v-for="item in exam.items" :key="item.itmId">
       <van-grid :column-num="4">
         <van-grid-item>
           <template #text>
             <span class="van-grid-item__text">
-              {{ itemName(item) }}
+              {{ item.itmName }}
             </span>
           </template>
         </van-grid-item>
@@ -53,13 +52,13 @@
           <template #text>
             <span class="van-grid-item__text">
               {{ itemValue(item) }}
-              <van-tag type="danger" v-if="item.itm_ALERT">
-                {{ itemAlert(item.itm_ALERT) }}
+              <van-tag type="danger" v-if="item.itmAlert">
+                {{ itemAlert(item.itmAlert) }}
               </van-tag>
             </span>
           </template>
         </van-grid-item>
-        <van-grid-item :text="item.itm_UNIT"></van-grid-item>
+        <van-grid-item :text="item.itmUnit"></van-grid-item>
         <van-grid-item>
           <template #text>
             <span class="van-grid-item__text">
@@ -69,77 +68,94 @@
         </van-grid-item>
       </van-grid>
     </div>
+    <div v-if="exam.bacterias.antiList && exam.bacterias.antiList.length > 0" style="margin-top: 5px">
+      <van-cell :title="exam.bacterias.itmName" :value="exam.bacterias.bacNameCn"></van-cell>
+
+      <van-grid :column-num="3">
+        <van-grid-item text="抗菌药物"></van-grid-item>
+        <van-grid-item text="MIC值"></van-grid-item>
+        <van-grid-item text="敏感性"></van-grid-item>
+      </van-grid>
+      <div v-for="item in exam.bacterias.antiList" :key="item.antiId">
+        <van-grid :column-num="3">
+          <van-grid-item>
+            <template #text>
+            <span class="van-grid-item__text">
+              {{ item.antiNameCn }}
+            </span>
+            </template>
+          </van-grid-item>
+          <van-grid-item>
+            <template #text>
+            <span class="van-grid-item__text">
+              {{ item.antiMic }}
+            </span>
+            </template>
+          </van-grid-item>
+          <van-grid-item>
+            <template #text>
+            <span class="van-grid-item__text">
+              {{ item.antiValue }}
+            </span>
+            </template>
+          </van-grid-item>
+        </van-grid>
+      </div>
+
+    </div>
+
   </window-size>
 </template>
 
-<script>
+<script setup>
 import { useRouter } from 'vue-router'
 import { checkExamDetail } from '../../../api/check-exam'
 import { computed, onMounted, reactive } from 'vue'
-export default {
-  name: 'CheckExamDetail',
-  setup() {
-    const router = useRouter()
-    const exam = reactive({
-      reportHeader: {},
-      reportItems: [],
-      bacteriaResult: {},
-    })
-    const isMicrobacteria = computed(() => {
-      // info_TYPE : 报告类别   1|2|99 -- 普通报告|微生物报告|尚未审核的报告
-      return exam.reportHeader.info_TYPE === '2'
-    })
-    const computedSex = computed(() => {
-      return exam.reportHeader.ptnt_SEX === '1' ? '男' : '女'
-    })
-    const itemName = (item) => {
-      return isMicrobacteria.value ? item.anti_NAME_CN : item.itm_NAME
-    }
-    const itemValue = (item) => {
-      if (isMicrobacteria.value) {
-        return item.anti_VALUE
-      }
-      if (item.itm_STR_VALUE) {
-        return item.itm_STR_VALUE
-      }
-      return item.itm_VALUE
-    }
-    const itemAlert = (val) => {
-      return val === 'L' ? '↓' : '↑'
-    }
-    const itemRange = (item) => {
-      if (isMicrobacteria.value) {
-        return item.anti_MIC
-      }
-      if (item.itm_STR_VALUE) {
-        return item.range_STR
-      }
-      return item.range
-    }
-    onMounted(() => {
-      const params = router.currentRoute.value.params
-      checkExamDetail(params).then((res) => {
-        exam.reportHeader = res.reportHeader
-        exam.reportItems = res.reportItems
-        if (res.reportItems) {
-          res.reportItems.forEach((item) => {
-            if (item.bacteriaResults.length === 1) {
-              exam.bacteriaResult = item.bacteriaResults[0]
-              exam.reportItems = exam.bacteriaResult.antibioticResults
-            }
-          })
-        }
-      })
-    })
-    return {
-      exam,
-      computedSex,
-      isMicrobacteria,
-      itemName,
-      itemValue,
-      itemAlert,
-      itemRange,
-    }
+import {useStore} from "vuex";
+
+const router = useRouter()
+const store = useStore()
+const examIndex = store.getters.getCurrentExamIndex
+
+const exam = reactive({
+  order: {},
+  items: [],
+  bacterias: {
+    antiList: []
   },
+})
+
+const isMicrobacteria = computed(() => {
+  return examIndex.reportType === '细菌'
+})
+
+const itemValue = (item) => {
+  if (isMicrobacteria.value) {
+    return item.antiValue || item.rsltStrs
+  }
+  return item.itmStrValue || item.itmValue;
+}
+const itemAlert = (val) => {
+  return val === 'L' ? '↓' : '↑'
+}
+const itemRange = (item) => {
+  if (isMicrobacteria.value) {
+    return item.anti_MIC
+  }
+  return item.ranGeStr || item.range;
 }
+
+onMounted(() => {
+  checkExamDetail({
+    reportId: examIndex.reportId,
+    patientId: router.currentRoute.value.params.patientId
+  }).then((res) => {
+    exam.order = res.order
+    exam.items = res.items
+    if (res.bacterias && res.bacterias.length === 1) {
+      exam.bacterias = res.bacterias[0]
+    }
+  })
+})
+
 </script>

+ 13 - 4
src/views/hospital-service/check-exam/CheckExamIndex.vue

@@ -24,13 +24,13 @@
       <van-tag type="success" size="large" round plain>已发布报告</van-tag>
       <div style="height: 5px"></div>
       <div :style="scrollStyle">
-        <div v-for="item in examIndex" :key="item.ordr_ID">
+        <div v-for="item in examIndex" :key="item.reportId">
           <van-cell
-            :title="item.aply_CTNT"
-            :label="item.ordr_CREATE_DATE"
+            :title="item.examPurpose"
+            :label="item.trscDate + '(' + item.reportType + ')'"
             is-link
             center
-            :to="'/checkExamDetail/' + item.ordr_ID + '/' + patientId"
+            @click="handleClickExamIndex(item)"
           >
           </van-cell>
           <div style="height: 5px"></div>
@@ -133,6 +133,15 @@ const queryInspectionIndex = (start, end) => {
   })
 }
 
+function handleClickExamIndex(item) {
+  store.dispatch({
+    type: 'storeCurrentExamIndex',
+    currentExamIndex: item
+  }).then(() => {
+    router.push('/checkExamDetail/' + patientId);
+  })
+}
+
 onMounted(() => {
   let storeRange = store.state.examDateRange
   if (storeRange.length === 0) {

+ 1 - 0
src/views/public-pages/Cashier.vue

@@ -119,6 +119,7 @@ function executePaymentAction(order) {
     package: order.prepayId,
     signType: order.signType,
     paySign: order.paySign,
+    totalFee: order.cashpayAmt
   }, () => {
     queryOrderTradeState(order.tradeNo)
   })