yeguodong 1 maand geleden
bovenliggende
commit
d6facfad99

+ 25 - 1
src/api/inspections/index.js

@@ -77,5 +77,29 @@ export function updateWxBookableFlag(data) {
     url: '/bookableManage/updateWxBookableFlag',
     method: 'post',
     data,
-  })
+  });
+}
+
+export function getMzJyReqByPatientId(patientId) {
+  return request({
+    url: '/Lis/getMzJyReqByPatientId',
+    method: 'get',
+    params: {patientId}
+  });
+}
+
+export function getMzJyReqDetail(reqNo) {
+  return request({
+    url: '/Lis/getMzJyReqDetail',
+    method: 'get',
+    params: {reqNo}
+  });
+}
+
+export function getLabRpt(reportId, patientId) {
+  return request({
+    url: '/Lis/getLabRpt',
+    method: 'get',
+    params: {reportId, patientId}
+  });
 }

+ 26 - 6
src/views/examination/InspectionReportIndex.vue

@@ -75,18 +75,18 @@
             width="30"
           ></el-table-column>
           <el-table-column
-            prop="trscDate"
+            prop="transDt"
             label="报告时间"
             width="130"
           ></el-table-column>
           <el-table-column
-            prop="examPurpose"
+            prop="orderName"
             label="检验名称"
             width="170"
           ></el-table-column>
           <el-table-column
             v-if="reportCategory === 'JY'"
-            prop="reportType"
+            prop="groupName"
             label="报告类别"
             width="70"
           ></el-table-column>
@@ -171,6 +171,9 @@ import {
   checkExamDetail,
   checkIndexByCategory,
   checkTestDetail,
+  getMzJyReqByPatientId,
+  getMzJyReqDetail,
+  getLabRpt
 } from "@/api/inspections";
 import router from "@/router";
 import { ElMessage } from "element-plus";
@@ -244,7 +247,10 @@ const queryIndex = () => {
     reqStartTime: startTime,
     reqEndTime: endTime,
   };
-  checkIndexByCategory(params).then(res => {
+  /*checkIndexByCategory(params).then(res => {
+    inspectionIndex.value = res;
+  });*/
+  getMzJyReqByPatientId(patNo.value).then(res => {
     inspectionIndex.value = res;
   });
 };
@@ -265,6 +271,8 @@ const jcbg = ref({
   examPurpose: "",
 });
 
+
+
 function queryJcDetail(row) {
   checkTestDetail({
     reportId: row.patientUid,
@@ -277,8 +285,20 @@ const queryJyDetail = (row, clear) => {
   if (clear) {
     jyDataList.value = [];
   }
+  console.log("row", row)
   return new Promise((resolve, reject) => {
-    checkExamDetail({
+    getLabRpt(row.reportId, row.patientId).then(res => {
+      const halfBacSize = res ? Math.ceil(res.length / 2) : 1;
+      row.sex = row.sex === '1' ? '男' : '女';
+      let jyData = {
+        base: row,
+        rptList: res,
+        halfBacSize: halfBacSize
+      }
+      jyDataList.value.push(jyData);
+      console.log("jyData.value=", jyData.value)
+    });
+    /*checkExamDetail({
       reportId: row.reportId,
     }).then(res => {
       const bacterias = [];
@@ -306,7 +326,7 @@ const queryJyDetail = (row, clear) => {
       };
       jyDataList.value.push(tempJyData);
       resolve();
-    });
+    });*/
   });
 };
 

+ 44 - 49
src/views/examination/component/JyResult.vue

@@ -2,9 +2,6 @@
   <div
     style="position: relative; padding: 0 12px; height: 96%; font-size: 12px"
   >
-    <div style="position: absolute; right: 16px; top: 12px; border: 1px solid black; padding: 2px 1px">
-      湖南HR
-    </div>
     <h3
       style="
         width: 100%;
@@ -18,39 +15,36 @@
     </h3>
     <div style="display: flex">
       <div style="width: 25%">
-        姓名:{{ data.inspectionDetail.order.ptntName }}
+        姓名:{{data.base.pname}}
       </div>
       <div style="width: 25%">
-        性别:{{ filterSex(data.inspectionDetail.order.ptntSex) }}
+        性别:{{data.base.sex}}
       </div>
       <div style="width: 25%">
-        年龄:{{ data.inspectionDetail.order.ptntAge }}
-        {{ filterAgeUnit(data.inspectionDetail.order.ptntAgeUnit) }}
+        年龄:{{data.base.age}}
       </div>
       <div style="width: 25%">
-        {{ data.ptntType }}:
-        {{ data.inspectionDetail.order.ptntNo }}
+        {{data.base.patientId}}
       </div>
     </div>
     <div style="display: flex">
       <div style="width: 25%">
-        科室:{{ data.inspectionDetail.order.deptName }}
+        科室:{{data.base.reqWardName}}
       </div>
       <div style="width: 25%">
-        床号:{{ data.inspectionDetail.order.ptntBedNo }}
+        床号:床号
       </div>
       <div style="width: 25%">
-        标本类型:{{ data.inspectionDetail.order.smplName }}
+        标本类型:{{data.base.inspectStuffName}}
       </div>
       <div style="width: 25%">
         <div>
-          申请项目:{{ data.inspectionDetail.order.aplyCntn.substring(0, 13) }}
+          申请项目:{{data.base.orderName}}
         </div>
-        <div>{{ data.inspectionDetail.order.aplyCntn.substring(13) }}</div>
       </div>
     </div>
     <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-    <div v-if="data.reportType === '普通' || data.reportType === '外送'">
+    <div v-if="true">
       <div style="display: inline-block; width: 49.7%; vertical-align: top">
         <div style="display: flex">
           <div style="width: 30%">检验项目</div>
@@ -61,32 +55,28 @@
         </div>
         <div style="margin: 5px 0; border-top: 1px solid gray"></div>
         <div
-          v-for="(item, index) in data.inspectionDetail.items.slice(
+          v-for="(item, index) in data.rptList.slice(
             0,
-            data.halfSize
+            data.halfBacSize
           )"
           :key="index"
           style="display: flex"
         >
           <div style="width: 30%">
-            <div>{{ item.itmName.substring(0, 8) }}</div>
-            <div>{{ item.itmName.substring(8) }}</div>
+            <div>{{item.rptItemname}}</div>
           </div>
           <div style="width: 16.66%">
-            <div>{{ item.itmValue.substring(0, 8) }}</div>
-            <div>{{ item.itmValue.substring(8) }}</div>
-            <div>{{ item.itmStrValue.substring(0, 8) }}</div>
-            <div>{{ item.itmStrValue.substring(8) }}</div>
+            {{item.resultStr}}
           </div>
-          <div style="width: 16.66%">{{ item.itmUnit }}</div>
+          <div style="width: 16.66%">{{item.resultUnit}}</div>
           <div style="width: 16.66%">
             <span
               v-html="
-                getItemAlert(item.itmAlert, item.itmStrValue, item.itmValue)
+                getItemAlert(item.resultFlag)
               "
             ></span>
           </div>
-          <div style="width: 20%">{{ item.range || item.ranGeStr }}</div>
+          <div style="width: 20%">{{item.resultRef}}</div>
         </div>
       </div>
       <div style="display: inline-block; width: 49.7%; vertical-align: top">
@@ -99,35 +89,31 @@
         </div>
         <div style="margin: 5px 0; border-top: 1px solid gray"></div>
         <div
-          v-for="(item, index) in data.inspectionDetail.items.slice(
-            data.halfSize
+          v-for="(item, index) in data.rptList.slice(
+            data.halfBacSize
           )"
           :key="index"
           style="display: flex"
         >
           <div style="width: 30%">
-            <div>{{ item.itmName.substring(0, 8) }}</div>
-            <div>{{ item.itmName.substring(8) }}</div>
+            <div>{{item.rptItemname}}</div>
           </div>
           <div style="width: 16.66%">
-            <div>{{ item.itmValue.substring(0, 8) }}</div>
-            <div>{{ item.itmValue.substring(8) }}</div>
-            <div>{{ item.itmStrValue.substring(0, 8) }}</div>
-            <div>{{ item.itmStrValue.substring(8) }}</div>
+            {{item.resultStr}}
           </div>
-          <div style="width: 16.66%">{{ item.itmUnit }}</div>
+          <div style="width: 16.66%">{{item.resultUnit}}</div>
           <div style="width: 16.66%">
             <span
               v-html="
-                getItemAlert(item.itmAlert, item.itmStrValue, item.itmValue)
+                getItemAlert(item.resultFlag)
               "
             ></span>
           </div>
-          <div style="width: 20%">{{ item.range || item.ranGeStr }}</div>
+          <div style="width: 20%">{{item.resultRef}}</div>
         </div>
       </div>
     </div>
-    <div v-if="data.reportType === '细菌'">
+<!--    <div v-if="data.reportType === '细菌'">
       <div style="display: flex">
         <div style="width: 25%">检验项目</div>
         <div style="width: 75%">结果</div>
@@ -211,34 +197,34 @@
           <div style="width: 75%">{{ item.itmStrValue || item.rsltStrs }}</div>
         </div>
       </div>
-    </div>
+    </div>-->
     <div style="position: absolute; bottom: 10px; left: 0; right: 0">
       <span style="margin-left: 20px"
-        >备注:{{ data.inspectionDetail.order.ordrRemark }}</span
+        >{{data.base.reqComment}}</span
       >
       <div style="margin: 5px 0; border-top: 1px solid gray"></div>
       <div style="display: flex">
         <div style="width: 8%"></div>
         <div style="width: 25%">
-          接收时间:{{ data.inspectionDetail.order.aplyDate }}
+          接收时间:{{data.base.reqDate}}
         </div>
         <div style="width: 33.33%">
-          检验时间:{{ data.inspectionDetail.order.ordrCreateDate }}
+          检验时间:{{data.base.chargeDate}}
         </div>
         <div style="width: 33.33%">
-          报告时间:{{ data.inspectionDetail.order.audtTime }}
+          报告时间:{{data.base.transDt}}
         </div>
       </div>
       <div style="display: flex">
         <div style="width: 8%"></div>
         <div style="width: 25%">
-          送检医生:{{ data.inspectionDetail.order.docName }}
+          送检医生:{{data.base.doctorName}}
         </div>
         <div style="width: 33.33%">
-          检验者:{{ data.inspectionDetail.order.ordrUsrName }}
+          检验者:{{data.base.transUser}}
         </div>
         <div style="width: 33.33%">
-          审核者:{{ data.inspectionDetail.order.audtUsrName }}
+          审核者:
         </div>
       </div>
       <div style="margin: 5px 0; border-top: 1px solid gray"></div>
@@ -300,12 +286,21 @@ function filterAgeUnit(val) {
 }
 
 function getItemAlert(val, strValue, value) {
-  if (strValue !== "" || value === "") return "";
+  console.log(val, strValue, value)
+  // if (strValue !== "" || value === "") return "";
   switch (val) {
     case "L":
-      return '<span style="color:#F56C6C;font-weight:bold">↓</span>';
+      return '<span style="color:#F56C6C;font-weight:bold">偏低↓</span>';
     case "H":
-      return '<span style="color:#F56C6C;font-weight:bold">↑</span>';
+      return '<span style="color:#F56C6C;font-weight:bold">偏高↑</span>';
+    case "LL":
+      return '<span style="color:#F56C6C;font-weight:bold">偏低报警↓</span>';
+    case "HH":
+      return '<span style="color:#F56C6C;font-weight:bold">偏高报警↑</span>';
+    case "P":
+      return '<span style="color:#F56C6C;font-weight:bold">阳性+</span>';
+    case "Q":
+      return '<span style="color:#F56C6C;font-weight:bold">弱阳性+</span>';
   }
   return "";
 }