فهرست منبع

把检查项目组件与患者管理组件初步整合

吴旭宸 10 ماه پیش
والد
کامیت
a8f1e969b9

+ 46 - 0
admin-ui/src/views/work/patient/check/checkAPI.js

@@ -0,0 +1,46 @@
+import service from "@/utils/request";
+import {OBX_INIT_VALUE} from "@/views/work/patient/check/checkInitValues";
+
+/**
+ * 获取患者的某一页检查项目列表
+ * @param {string} patientId 患者id
+ * @param {{pageNum: number, pageSize: number}} paginationQueryParam 分页查询参数
+ * @return {{rows: import('index').ObxList, total: number,pages: number} }
+ */
+export function getPageObxList(patientId, paginationQueryParam) {
+  /**
+   * @type {{rows: import('index').ObxList, total: number,pages: number} }
+   */
+  let result
+  service.get(`/work/result/patid/${patientId}`, (result) => {}, {
+    data: paginationQueryParam
+  }).then((response) => {
+
+    const {rows, total, pages} = response.data
+
+    result = {
+      rows,
+      total,
+      pages,
+    }
+  }).catch((error) => {
+    console.log(error)
+    result = {
+      rows: [OBX_INIT_VALUE],
+      total: 0,
+      pages: 0
+    }
+  })
+  return result
+}
+
+/**
+ * 获取详细检测报告
+ * @param patientId
+ */
+export function getObr(patientId) {
+  service.get(`/work/request/patid/${patientId}`)
+  .then((response) => {
+    console.log(response)
+  })
+}

+ 76 - 0
admin-ui/src/views/work/patient/check/checkInitValues.js

@@ -0,0 +1,76 @@
+/**
+ * 科室-病人类型的初始值
+ * @type {import('index').Patient}
+ */
+export const PATIENT_INIT_VALUE = {
+        patId: "",
+        cardId: "",
+        pvId: "",
+        department: "",
+        physician: "",
+        name: "",
+        dischargeMethod: "",
+        dischargeTime: "",
+      }
+
+/**
+ * 病人某个检查项目
+ * @type {import('index').Obx}
+ */
+export const OBX_INIT_VALUE = {
+        id: 0,
+        mecTechObsName: "",
+        mecTechObsProject: "",
+        obrId: 0,
+        obsClassification: null,
+        obsProjectDetail: "",
+        patientId: 0,
+        projectInfo: null,
+        result: "",
+        serialNo: null,
+        sign: "1",
+        testMethod: null,
+        unitCode: "",
+        unitName: null,
+      }
+
+/**
+ * 病人某个检查项目的详细报告的初始值
+ * @type {import('index').Obr}
+ */
+export const OBR_INIT_VALUE = {
+        id: 0,
+        cardId: "",
+        orderCode: null,
+        applicationNo: null,
+        medOrderCode: null,
+        reportNo: "",
+        medOrderNo: null,
+        medTechProInfo: "",
+        medTechProName: null,
+        reportClass: "1",
+        medOrderAppTime: null,
+        chkStartTime: "",
+        reportStatus: "0",
+        examinePart: "",
+        appEmployeeId: "",
+        appEmployeeName: "",
+        appDeptCode: "",
+        appDeptName: null,
+        executeDeptCode: "",
+        executeDeptName: "",
+        releaseTime: "",
+        repTypeCode: "",
+        resultFlag: "",
+        repType: "",
+        checkEmployeeId: "",
+        checkEmployeeName: "",
+        checkTime: "",
+        publisherEmployeeId: "",
+        publisherEmployeeName: "",
+        publisherTime: "",
+        reportEntryId: "",
+        reportEntryName: "",
+        enterTime: "",
+        bookingNo: "",
+      }

+ 93 - 0
admin-ui/src/views/work/patient/check/checkProjectDetailReport.vue

@@ -0,0 +1,93 @@
+<script>
+import CheckReportItem from "./checkReportItem.vue";
+
+export default {
+  name: "checkDetailReport",
+  components: { CheckReportItem },
+  props: {
+    /**
+     * @type {import('index').Obr}
+     */
+    obr: {
+      type: Object,
+      required: true,
+      default: function () {
+        return {
+          medTechProCode: "医疗技术单号",
+        };
+      },
+    },
+  },
+  methods: {
+    // generateReportItem() {
+    //   // 获取prop报告表单的数据obr的所有键值,同时把形如id, cardId, reportEntryId等键值过滤掉
+    //   return Object.keys(this.$props.obr).filter(
+    //     (key) => !key.match(/[a-z]Id|id/),
+    //   );
+    // },
+    /**
+     * 填充报告单项
+     */
+    fillReportItem(reportItemLabelList) {
+      const filledList = [...reportItemLabelList];
+
+      const remainder =  filledList.length % 3
+      const num = 3 - remainder;
+
+      for (let i = num; i >0; i--) {
+        filledList.push({key: `filled${i}`, label: "null"})
+      }
+      return filledList;
+    }
+  },
+  data() {
+    return {
+      // itemLabels: {
+      //   label: "content",
+      // },
+      reportItemLabelList: [
+        { key: "reportNo", label: "报告单号" },
+        { key: "medTechProCode", label: "医技号" },
+        { key: "medTechProName", label: "医技项目名称" },
+        { key: "reportClass", label: "报告单类别名称" },
+        { key: "report_complete_time", label: "报告完成时间" },
+        { key: "signs", label: "危机标志" },
+        { key: "sampleReceivedDate", label: "样本收到日期" },
+        { key: "checkpoint", label: "检查部位或样本" },
+        { key: "executeDepartmentName", label: "执行科室名称" },
+        { key: "applyDoctorName", label: "申请医生" },
+        { key: "testingDoctorName", label: "检验医生信息名称" },
+        { key: "reviewDoctorName", label: "审核医生" },
+        { key: "reportDate", label: "报告单日期" },
+      ],
+    };
+  },
+  created() {
+    // this.$data.itemLabels = this.generateReportItem();
+  },
+};
+</script>
+
+<template>
+  <div id="check-report">
+    <check-report-item
+      item-width="30%"
+      v-for="item in fillReportItem(reportItemLabelList)"
+      :key="item.key"
+      :report-label="item.label"
+      :report-content="obr[item.key] || ''"
+      :item-hide = "item.label === 'null'"
+    />
+  </div>
+</template>
+
+<style scoped>
+#check-report {
+  padding: 1% 5%;
+  width: 100%;
+  display: flex;
+  justify-content: space-evenly;
+
+  flex-wrap: wrap;
+}
+</style>

+ 85 - 0
admin-ui/src/views/work/patient/check/checkReportItem.vue

@@ -0,0 +1,85 @@
+<script>
+export default {
+  name: "checkReportItem",
+  props: {
+    /**
+     * 报告项的说明标签
+     */
+    reportLabel: {
+      type: String,
+      default: "label",
+    },
+    /**
+     * 报告项的内容
+     */
+    reportContent: {
+      type: String,
+      default: "content",
+    },
+    /**
+     * 占位空项的标志,值为true时报告项的说明标签和内容都被隐藏
+     */
+    itemHide: {
+      type: Boolean,
+      required: false,
+    },
+    /**
+     * 报告项总体宽度
+     */
+    itemWidth: {
+      type: String,
+    },
+  },
+};
+</script>
+
+<template>
+  <div
+    class="check-report-item"
+    :class="{ 'check-report-item-hidden': itemHide }"
+    :style="`width: ${itemWidth};`"
+  >
+    <div class="check-report-item-label">
+      {{ reportLabel }}
+    </div>
+    <div class="check-report-item-content">
+      {{ reportContent }}
+    </div>
+  </div>
+</template>
+
+<style scoped>
+.check-report-item {
+  display: flex;
+  min-height: 45px;
+  line-height: 45px;
+}
+.check-report-item-label,
+.check-report-item-content {
+  border: 1px solid #afafaf;
+  /*  防止边框重叠 */
+  margin-right: -1px;
+  margin-bottom: -1px;
+  box-sizing: border-box;
+}
+
+.check-report-item-label {
+  width: 45%;
+  text-align: left;
+  background-color: #e1e1e1;
+  font-size: 14px;
+  padding-left: 2%;
+
+  overflow-x: hidden;
+}
+
+.check-report-item-content {
+  flex: 1;
+  text-align: center;
+  background-color: #fff;
+}
+
+.check-report-item-hidden {
+  color: transparent;
+}
+</style>

+ 128 - 0
admin-ui/src/views/work/patient/check/index.d.ts

@@ -0,0 +1,128 @@
+/**
+ * 检测项目
+* @property {number} id - 主键ID
+ * @property {number|null} obrId - 就诊id
+ * @property {string|null} serialNo - 序号
+ * @property {string|null} dataType - 数据类型
+ * @property {string|null} mecTechObsProject - 医技观察项目
+ * @property {string|null} mecTechObsName - 医技项目名称
+ * @property {string|null} obsProjectDetail - 观察子项
+ * @property {string|null} projectInfo - 项目结果信息
+ * @property {string|null} unitCode - 项目单位 单位代码
+ * @property {string|null} unitName - 项目单位 单位名称
+ * @property {string|null} result - 结果参考值
+ * @property {string|null} sign - 高低标志
+ * @property {string|null} obsClassification - 微生物观察分类
+ * @property {string|null} testMethod - 检验方法
+ * @property {number|null} patientId - 患者ID
+ */
+export interface Obx {
+  id: number;
+  obrId?: number;
+  serialNo?: string;
+  dataType?: string;
+  mecTechObsProject?: string;
+  mecTechObsName?: string;
+  obsProjectDetail?: string;
+  projectInfo?: string;
+  unitCode?: string;
+  unitName?: string;
+  result?: string;
+  sign?: string;
+  obsClassification?: string;
+  testMethod?: string;
+  patientId?: number;
+}
+
+export type ObxList = Obx[];
+
+export interface Patient {
+  patId?: string;
+  cardId?: string;
+  pvId?: string,
+  department: string,
+  physician: string,
+  name: string,
+  dischargeMethod?: string,
+  dischargeTime?: string,
+}
+
+export type PatientList = Patient[]
+
+/**
+ * 每个检查项目(obx)的详细检测报告
+ * @property {number} id - 主键ID
+ * @property {string|null} cardId - 就诊卡号
+ * @property {number|null} ordersId - 医嘱ID
+ * @property {string|null} medOrderCode - 医嘱明细序号
+ * @property {string} reportNo - 报告单号
+ * @property {string|null} medOrderNo - 医技号
+ * @property {string|null} medTechProInfo - 医技项目代码
+ * @property {string|null} medTechProName - 医技项目名称
+ * @property {string|null} reportClass - 报告单类别名称
+ * @property {string|null} reportStatus - 危机报告标志
+ * @property {string|null} examinePart - 检查部位或样本名称
+ * @property {string|null} appEmployeeId - 申请医生代码
+ * @property {string|null} appEmployeeName - 申请医生姓名
+ * @property {string|null} appDeptCode - 申请科室代码
+ * @property {string|null} appDeptName - 申请科室名称
+ * @property {string|null} executeDeptCode - 执行科室代码
+ * @property {string|null} executeDeptName - 执行科室名称
+ * @property {string|null} medOrderAppTime - 医嘱申请时间
+ * @property {string|null} chkStartTime - 检验或检查开始时间
+ * @property {string|null} releaseTime - 发布时间
+ * @property {string|null} repTypeCode - 报告单类别编码
+ * @property {string|null} resultFlag - 结果标志
+ * @property {string|null} repType - 报告类型
+ * @property {string|null} checkEmployeeId - 报告审核Id
+ * @property {string|null} checkEmployeeName - 报告审核者
+ * @property {string|null} checkTime - 审核日期
+ * @property {string|null} publisherEmployeeId - 报告发布者id
+ * @property {string|null} publisherEmployeeName - 报告发布者
+ * @property {string|null} publisherTime - 发布时间
+ * @property {string|null} reportEntryId - 报告录入人ID
+ * @property {string|null} reportEntryName - 报告录入人名称
+ * @property {string|null} enterTime - 报告单日期
+ * @property {string|null} bookingNo - 预约单号
+ * @property {number|null} patientId - 患者ID
+ */
+export interface Obr {
+  applicationNo: null;
+  orderCode: null;
+  id: number;
+  cardId?: string;
+  ordersId?: number;
+  medOrderCode?: string;
+  reportNo: string;
+  medOrderNo?: string;
+  medTechProInfo?: string;
+  medTechProName?: string;
+  reportClass?: string;
+  medOrderAppTime?: string;
+  chkStartTime?: string;
+  reportStatus?: string;
+  examinePart?: string;
+  appEmployeeId?: string;
+  appEmployeeName?: string;
+  appDeptCode?: string;
+  appDeptName?: string;
+  executeDeptCode?: string;
+  executeDeptName?: string;
+  releaseTime?: string;
+  repTypeCode?: string;
+  resultFlag?: string;
+  repType?: string;
+  checkEmployeeId?: string;
+  checkEmployeeName?: string;
+  checkTime?: string;
+  publisherEmployeeId?: string;
+  publisherEmployeeName?: string;
+  publisherTime?: string;
+  reportEntryId?: string;
+  reportEntryName?: string;
+  enterTime?: string;
+  bookingNo?: string;
+  patientId?: number;
+}
+
+export type ObrList = Obr[];

+ 178 - 0
admin-ui/src/views/work/patient/check/index.vue

@@ -0,0 +1,178 @@
+<script>
+import CheckDetailReport from "@/views/work/patient/check/checkProjectDetailReport.vue";
+
+import {
+  OBR_INIT_VALUE,
+  PATIENT_INIT_VALUE,
+} from "@/views/work/patient/check/checkInitValues";
+import { getPageObxList } from "@/views/work/patient/check/checkAPI";
+
+export default {
+  methods: { getPageObxList },
+  components: { CheckDetailReport },
+  name: "PatientCheck",
+  props: {
+    checkWindowShow: {
+      type: Boolean,
+      default: false,
+    },
+    patientInfo: {
+      type: Object,
+      default: function () {
+        return {
+          id: "",
+          name: "",
+        };
+      },
+    },
+  },
+  data() {
+    return {
+      /**
+       * 控制对话框是否显示,true是显示对话框
+       * @type {boolean}
+       */
+      dialogVisible: true,
+      reportTabDisabled: false,
+
+      /**
+       * 当前检查项目相关信息
+       * @property {import('index').Patient} patient - 当前要查看的患者
+       * @property {number} obxTotal - 患者检查项目总数
+       * @property {import('./index').ObxList} pageObxList - 当前要查看的患者的所有检查项目,注意是分页后的某一的结果
+       * @property {import('./index').Obr} obr - 当前需要查看的详细检测报告
+       */
+      currentCheckInfo: {
+        patient: PATIENT_INIT_VALUE,
+        obxTotal: 0,
+        pageObxList: [],
+        obxQueryParams: {
+          pageNum: 0,
+          pageSize: 0,
+        },
+        obr: OBR_INIT_VALUE,
+      },
+    };
+  },
+  created() {
+
+      if (this.$props.checkWindowShow) {
+        /**
+         * 请求结果
+         * @type {{rows: import('index').ObxList, total: number, pages: number}}
+         */
+        const { rows, total, pages } = getPageObxList(
+          this.patientInfo.id,
+          this.currentCheckInfo.obxQueryParams,
+        );
+
+        this.currentCheckInfo.pageObxList = rows;
+        this.currentCheckInfo.obxTotal = total;
+      }
+
+  },
+};
+</script>
+
+<template>
+  <div class="patient-check-projects">
+    <el-dialog
+      :title="`${patientInfo.name}的检测项目相关信息`"
+      :visible="checkWindowShow"
+      :before-close="() => $emit('update:checkWindowShow', false)"
+      width="80%"
+      top="5%"
+      center
+    >
+      <el-tabs value="1">
+        <el-tab-pane label="检测项目表" name="1" style="height: 400px">
+          <div id="patient-check-projects-list">
+            <el-table
+              width="75vw"
+              stripe
+              :data="currentCheckInfo.pageObxList"
+            >
+              <el-table-column
+                label="诊断名称"
+                align="center"
+                prop="mecTechObsProject"
+              ></el-table-column>
+              <el-table-column
+                label="项目信息结果"
+                align="center"
+                prop="result"
+              ></el-table-column>
+              <el-table-column
+                label="项目单位"
+                align="center"
+                prop="unitCode"
+              ></el-table-column>
+              <el-table-column
+                label="结果参考值"
+                align="center"
+                prop="result"
+              ></el-table-column>
+              <el-table-column
+                label="高低标志"
+                align="center"
+                prop="sign"
+              ></el-table-column>
+              <el-table-column
+                label="微生物观察分类"
+                align="center"
+                prop="obsClassification"
+              ></el-table-column>
+              <el-table-column
+                label="检验方法"
+                align="center"
+                prop="testMethod"
+              ></el-table-column>
+              <el-table-column label="操作" align="center">
+                <template slot-scope="scope">
+
+                  <el-button
+                    type="text"
+                    icon="el-icon-search"
+                    @click="console.log(`查看${scope.row.obrId}`)"
+                  >
+                    查看详细检验报告
+                  </el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+
+            <pagination
+              :total="currentCheckInfo.obxTotal"
+              :page.sync="currentCheckInfo.obxQueryParams.pageNum"
+              :limit.sync="currentCheckInfo.obxQueryParams.pageSize"
+              @pagination="
+                () => {
+                  this.currentCheckInfo.pageObxList = getPageObxList(
+                    patientInfo.id,
+                    currentCheckInfo.obxQueryParams,
+                  );
+                }
+              "
+            />
+          </div>
+        </el-tab-pane>
+        <el-tab-pane
+          label="详细检测报告"
+          name="2"
+          :disabled="reportTabDisabled"
+           style="height: 400px"
+        >
+          <check-detail-report :obr="currentCheckInfo.obr" />
+        </el-tab-pane>
+      </el-tabs>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button
+          type="primary"
+          @click="$emit('update:checkWindowShow', false)"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>

+ 21 - 0
admin-ui/src/views/work/patient/index.vue

@@ -39,6 +39,11 @@
           <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
               <el-button size="mini" type="text" icon="el-icon-search" @click="op('search',scope.row)" v-hasPermi="['work:dg:edit']">查看</el-button>
+                        <el-button size="mini" type="text" icon="el-icon-search" @click="()=>{checkWindowShow = true; currentPatientInfo = {id: scope.row.patId, name: scope.row.name}}">
+                查看检查项目
+              </el-button>
+<!--              检测项目信息弹窗-->
+              <patient-check :check-window-show.sync="checkWindowShow" :patient-info="currentPatientInfo" />
             </template>
           </el-table-column>
         </el-table>
@@ -50,7 +55,9 @@
 
 <script>
 import search from "@/views/work/patient/search.vue";
+import PatientCheck from "./check/index.vue";
 export default {
+  components: {PatientCheck},
   dicts:['discharge_method'],
   name: 'User',
   data() {
@@ -75,6 +82,20 @@ export default {
         physician: undefined,
         patientName:undefined,
         departmentName:undefined,
+      },
+            /**
+       * 控制检测项目信息弹窗是否显示
+       * @type {boolean} - 取值true显示弹窗
+       */
+      checkWindowShow: false,
+      /**
+       * 当前需要查看的病人信息
+       * @property {string} id - 病人Id
+       * @property {string} name - 病人姓名
+       */
+      currentPatientInfo: {
+        id: '',
+        name: ''
       }
     };
   },