|
@@ -1,358 +1,187 @@
|
|
|
-<script>
|
|
|
-import service from '@/utils/request'
|
|
|
-import Template from '@/views/work/follow/template/index.vue'
|
|
|
-import DepartmentTemplate from '@/views/work/check/DepartmentTemplate.vue'
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <!-- 行容器 -->
|
|
|
+ <el-row :gutter="20" style="height: 100%">
|
|
|
+ <!-- 列容器 -->
|
|
|
+ <!-- 左边的列表,显示各个科室 -->
|
|
|
+ <el-col
|
|
|
+ :span="4"
|
|
|
+ style="
|
|
|
+ box-shadow: 0 3px 10px 0 rgb(0 0 0 / 6%);
|
|
|
+ border-right: 1px solid #f1f2f4;
|
|
|
+ overflow-y: auto;
|
|
|
+ height: 100%;
|
|
|
+ ">
|
|
|
+ <el-tree :data="deptOptions" @node-click="handleNodeClick"> </el-tree>
|
|
|
+ </el-col>
|
|
|
+ <!-- 患者诊断记录列表 -->
|
|
|
+ <el-col :span="20" style="height: 100%">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true">
|
|
|
+ <el-form-item prop="physician">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.physician"
|
|
|
+ placeholder="请输入主治医生"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ class="se" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="patientName">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.patientName"
|
|
|
+ placeholder="请输入患者姓名"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ class="se" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ <el-button icon="el-icon-refresh" @click="resetQuery"
|
|
|
+ >重置</el-button
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-table
|
|
|
+ :data="patientList"
|
|
|
+ border
|
|
|
+ @selection-change="selects"
|
|
|
+ height="calc(100vh - 230px)">
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column label="科室" align="center" prop="department" />
|
|
|
+ <el-table-column label="患者姓名" align="center" prop="name" />
|
|
|
+ <el-table-column label="主治医生" align="center" prop="physician" />
|
|
|
+ <el-table-column
|
|
|
+ label="出院方式"
|
|
|
+ align="center"
|
|
|
+ prop="dischargeMethod">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag
|
|
|
+ :options="dict.type.discharge_method"
|
|
|
+ :value="scope.row.dischargeMethod"></dict-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="出院时间"
|
|
|
+ align="center"
|
|
|
+ prop="dischargeTime" />
|
|
|
+ <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)"
|
|
|
+ >查看</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ v-if="total > 0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList" />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
|
|
|
+<script>
|
|
|
+import search from '@/views/work/patient/search.vue'
|
|
|
+import window from '@/views/work/check/window.vue'
|
|
|
export default {
|
|
|
- components: { DepartmentTemplate, Template },
|
|
|
- name: 'Check',
|
|
|
+ dicts: ['discharge_method'],
|
|
|
+ name: 'checkUser',
|
|
|
data() {
|
|
|
return {
|
|
|
- // 检查窗口需要用到的数据
|
|
|
- dialogVisible: false,
|
|
|
- orcAndObrList: [],
|
|
|
- reportItemLabelList: [
|
|
|
- { key: 'reportNo', label: '报告单号' },
|
|
|
- // { key: "medTechProCode", label: "医技号" },
|
|
|
- { key: 'medTechProName', label: '医技项目名称' },
|
|
|
- // { key: 'reportClass', label: '报告单类别名称' },
|
|
|
- { key: 'reportCompleteTime', 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: '报告单日期' },
|
|
|
- ],
|
|
|
- timeGroup: {},
|
|
|
- currentDate: '',
|
|
|
- currentOrcAndObr: {
|
|
|
- id: '',
|
|
|
- orcId: '',
|
|
|
- medTechProCode: null,
|
|
|
- medTechProName: '',
|
|
|
- reportClass: '',
|
|
|
- reportCompleteTime: '',
|
|
|
- signs: '',
|
|
|
- sampleReceivedDate: '',
|
|
|
- checkpoint: '',
|
|
|
- executeDepartmentCode: '',
|
|
|
- executeDepartmentName: '',
|
|
|
- isFlag: '',
|
|
|
- reviewDoctorCode: null,
|
|
|
- reviewDoctorName: '',
|
|
|
- reportDate: '',
|
|
|
- reportNo: '',
|
|
|
- },
|
|
|
- currentObxList: [],
|
|
|
-
|
|
|
- /**
|
|
|
- * 当前病人相关数据
|
|
|
- * @property {string} patId - 病人id
|
|
|
- * @property {Array} reportDataList - 报告数据列表
|
|
|
- * @property {Array} resultList - 检测结果列表
|
|
|
- */
|
|
|
- current: {
|
|
|
- patId: '',
|
|
|
- obrId: '',
|
|
|
- reportDataList: [],
|
|
|
- resultList: [],
|
|
|
- },
|
|
|
- checkResultPagination: {
|
|
|
- total: 0,
|
|
|
- pageSize: 5,
|
|
|
- currentPage: 1,
|
|
|
- obrId: ''
|
|
|
+ total: 0,
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ //科室名称
|
|
|
+ deptName: undefined,
|
|
|
+ // 部门树选项
|
|
|
+ deptOptions: null,
|
|
|
+ //患者表
|
|
|
+ patientList: null,
|
|
|
+ //查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ physician: undefined,
|
|
|
+ patientName: undefined,
|
|
|
+ department: undefined,
|
|
|
+ deptId: undefined
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
+ watch: {},
|
|
|
+ created() {
|
|
|
+ this.getDepartment()
|
|
|
+ },
|
|
|
methods: {
|
|
|
- /**
|
|
|
- * 获取当前病人的所有检查项目结果,通过obrId取出对应检查项目的结果
|
|
|
- */
|
|
|
- getCurrentPatientObxList() {
|
|
|
- service
|
|
|
- .get(`/work/result/patid/${this.currentPatId}`)
|
|
|
- .then((response) => {
|
|
|
- this.obxListAll = response.rows
|
|
|
- console.log(this.obxListAll)
|
|
|
- console.log(this.currentOrcAndObr)
|
|
|
- this.currentObxList = this.obxListAll.filter(
|
|
|
- (item) => item.obrId === this.currentOrcAndObr.id,
|
|
|
- )
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- fillReportItem(reportItemLabelList) {
|
|
|
- const filledList = [...reportItemLabelList]
|
|
|
-
|
|
|
- const remainder = filledList.length % 3
|
|
|
- if (remainder !== 0) {
|
|
|
- const num = 3 - remainder
|
|
|
-
|
|
|
- for (let i = num; i > 0; i--) {
|
|
|
- filledList.push({ key: ``, label: '' })
|
|
|
- }
|
|
|
- }
|
|
|
- return filledList
|
|
|
- },
|
|
|
- /**
|
|
|
- * 处理字符串日期
|
|
|
- * @param {string} dateString 字符串日期
|
|
|
- * @example
|
|
|
- * ```
|
|
|
- * dateString取值2024-07-23 12:28:42时,
|
|
|
- * 函数将返回{year: '2024', month: '07', day: '23', time: '12:28:42'}
|
|
|
- * ```
|
|
|
- * @return {{year: string, month: string, day: string, time: string}}
|
|
|
- */
|
|
|
- handleDate(dateString) {
|
|
|
- //先把年月日和当天时间分离 2024-07-23 12:28:42->['2024-07-23','12:28:42']
|
|
|
- const [yearMonthDay, time] = dateString.split(' ')
|
|
|
-
|
|
|
- //接着把年月日分离 '2024-07-23'->['2024','07','23']
|
|
|
- const [year, month, day] = yearMonthDay.split('-')
|
|
|
-
|
|
|
- return {
|
|
|
- year,
|
|
|
- month,
|
|
|
- day,
|
|
|
- time,
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ physician: undefined,
|
|
|
+ name: undefined,
|
|
|
}
|
|
|
+ this.resetForm('form')
|
|
|
},
|
|
|
- /**
|
|
|
- * 处理日期数组
|
|
|
- * @param {{year: string, month: string, day: string, time: string}[]} dates
|
|
|
- * @return {Record<string,Record<string,Record<string,string[]>>>}
|
|
|
- * @example
|
|
|
- * ```
|
|
|
- * dates取值[
|
|
|
- { year: '2024', month: '07', day: '23', time: '18:23:23' },
|
|
|
- { year: '2024', month: '07', day: '23', time: '20:23:23' },
|
|
|
- { year: '2024', month: '08', day: '24', time: '12:23:23' },
|
|
|
- { year: '2023', month: '04', day: '08', time: '14:23:23' }
|
|
|
- ],
|
|
|
- 函数返回
|
|
|
- {
|
|
|
- '2023': { '04': { '08': '14:23:23' } },
|
|
|
- '2024': { '07': { '23': ['18:23:23','20:23:23'] }, '08': { '24': ['12:23:23'] } }
|
|
|
- }
|
|
|
- * ```
|
|
|
- */
|
|
|
- organizeDates(dates) {
|
|
|
- const result = {}
|
|
|
- dates.forEach((date) => {
|
|
|
- const { year, month, day, time } = date
|
|
|
- if (!result[year]) {
|
|
|
- result[year] = {}
|
|
|
- }
|
|
|
- if (!result[year][month]) {
|
|
|
- result[year][month] = {}
|
|
|
- }
|
|
|
- if (!result[year][month][day]) {
|
|
|
- result[year][month][day] = []
|
|
|
- }
|
|
|
- result[year][month][day].push(time)
|
|
|
- // console.log(result)
|
|
|
+ /** 查询患者列表*/
|
|
|
+ getList() {
|
|
|
+ this.get({
|
|
|
+ url: '/work/visit/patientCard',
|
|
|
+ data: {
|
|
|
+ ...this.queryParams,
|
|
|
+ },
|
|
|
+ }).then((response) => {
|
|
|
+ this.patientList = response.rows
|
|
|
+ this.total = response.total
|
|
|
})
|
|
|
- return result
|
|
|
},
|
|
|
- /**
|
|
|
- * 处理检测报告数据:把每项待检测报告数据的id属性值(即obrId)作为键,剩余作为对应的值
|
|
|
- * @param {Array} reportDataList - 待处理的检测报告数据
|
|
|
- * @example
|
|
|
- * ```
|
|
|
- * reportDataList取值[{id: '222', orcId: '33', medTechProCode: null, checkpoint: '样本', ...}]
|
|
|
- * 函数返回{'222': {orcId: '33', medTechProCode: null, checkpoint: '样本', ...},}
|
|
|
- * ```
|
|
|
- */
|
|
|
- organizeReportData(reportDataList) {
|
|
|
-
|
|
|
+ /** 查询部门 */
|
|
|
+ getDepartment() {
|
|
|
+ this.get({
|
|
|
+ url: '/system/user/deptTree',
|
|
|
+ }).then((response) => {
|
|
|
+ this.deptOptions = response.data
|
|
|
+ })
|
|
|
},
|
|
|
- /**
|
|
|
- * 映射危机标志的对应含义
|
|
|
- * @param {string} signs 危机标志数值
|
|
|
- * @return {string} 危机标志对应含义
|
|
|
- */
|
|
|
- mapSigns(signs) {
|
|
|
- switch (signs) {
|
|
|
- case '0':
|
|
|
- return '正常'
|
|
|
- case '1':
|
|
|
- return '危机'
|
|
|
- default:
|
|
|
- return ''
|
|
|
- }
|
|
|
+ handleNodeClick(data) {
|
|
|
+ this.queryParams.departmentName = data.label
|
|
|
+ this.getList()
|
|
|
},
|
|
|
- /**
|
|
|
- * 映射高低标志的对应含义
|
|
|
- * @param {string} sign 高低标志
|
|
|
- * @return {string} 高低标志对应含义
|
|
|
- */
|
|
|
- mapHighSign(sign) {
|
|
|
- switch (sign) {
|
|
|
- case '0':
|
|
|
- return '正常'
|
|
|
- case '1':
|
|
|
- return '偏低'
|
|
|
- case '2':
|
|
|
- return '偏高'
|
|
|
- default:
|
|
|
- return ''
|
|
|
- }
|
|
|
+ selects(rows) {
|
|
|
+ this.ids = rows.map((item) => item.id)
|
|
|
},
|
|
|
- /**
|
|
|
- * 表格分页组件页面变化时的处理逻辑
|
|
|
- * @param {number} newPage - 新页码
|
|
|
- */
|
|
|
- handleCurrentChange(newPage) {
|
|
|
- console.log(`查看第${newPage}页的数据`)
|
|
|
- this.checkResultPagination.currentPage = newPage
|
|
|
-
|
|
|
- this.getCheckResult()
|
|
|
- },
|
|
|
- getReportData(patientId) {
|
|
|
- service.get(`work/request/patid/${patientId}`).then((response) => {
|
|
|
- console.log(response)
|
|
|
- this.current.reportDataList = response.rows
|
|
|
+ op(tag, row) {
|
|
|
+ this.iframe({
|
|
|
+ obj: window,
|
|
|
+ param: { id: row.patId },
|
|
|
+ title: '查看患者信息',
|
|
|
+ width: '90%',
|
|
|
+ height: '90%',
|
|
|
+ scroll: true,
|
|
|
})
|
|
|
},
|
|
|
- getCheckResult() {
|
|
|
- service.get('work/result/list', {
|
|
|
- params: {
|
|
|
- obrId: this.checkResultPagination.obrId,
|
|
|
- pageNum: this.checkResultPagination.currentPage,
|
|
|
- pageSize: this.checkResultPagination.pageSize,
|
|
|
- }
|
|
|
- }).then(response => {
|
|
|
- this.checkResultPagination.total = response.total
|
|
|
- console.log(`获得${response.rows}`)
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- watch: {
|
|
|
- // 监听当前病人id的变化
|
|
|
- 'current.patId'(newPatId) {
|
|
|
- // console.log(`current.patId=${newPatId}`)
|
|
|
- this.getReportData(newPatId)
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm('queryForm')
|
|
|
+ this.handleQuery()
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
-
|
|
|
-<template>
|
|
|
- <DepartmentTemplate :patient-id.sync="current.patId">
|
|
|
- <template>
|
|
|
- <el-row class="tac" :gutter="10">
|
|
|
- <el-col :span="4">
|
|
|
- <el-menu
|
|
|
- default-active="1"
|
|
|
- class="el-menu-vertical-demo"
|
|
|
- style="height: 200px">
|
|
|
- <el-submenu
|
|
|
- v-for="(year, yearIndex) in Object.keys(timeGroup)"
|
|
|
- :index="`${yearIndex}`">
|
|
|
- <template slot="title">
|
|
|
- <span>{{ year }}年</span>
|
|
|
- </template>
|
|
|
- <el-submenu
|
|
|
- v-for="(month, monthIndex) in Object.keys(timeGroup[year])"
|
|
|
- :index="`${yearIndex}-${monthIndex}`">
|
|
|
- <template slot="title">
|
|
|
- <span>{{ month }}月</span>
|
|
|
- </template>
|
|
|
- <el-submenu
|
|
|
- v-for="(day, dayIndex) in Object.keys(timeGroup[year][month])"
|
|
|
- :index="`${yearIndex}-${monthIndex}-${dayIndex}`">
|
|
|
- <template slot="title">
|
|
|
- <span>{{ day }}日</span>
|
|
|
- </template>
|
|
|
- <el-menu-item
|
|
|
- v-for="(time, timeIndex) in timeGroup[year][month][day]"
|
|
|
- :index="`${yearIndex}-${monthIndex}-${dayIndex} ${timeIndex}`"
|
|
|
- @click="
|
|
|
- currentDate = `${year}-${month}-${day} ${time}`
|
|
|
- currentOrcAndObr = orcAndObrList.find(
|
|
|
- (item) => item.reportDate === currentDate,
|
|
|
- )
|
|
|
- getCurrentPatientObxList()
|
|
|
- ">
|
|
|
- <span>{{ time }}</span>
|
|
|
- </el-menu-item>
|
|
|
- </el-submenu>
|
|
|
- </el-submenu>
|
|
|
- </el-submenu>
|
|
|
- </el-menu>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="20" style="overflow-y: scroll">
|
|
|
- <el-descriptions
|
|
|
- class="margin-top"
|
|
|
- title="详细检测报告"
|
|
|
- :column="3"
|
|
|
- border>
|
|
|
- <el-descriptions-item
|
|
|
- v-for="item in fillReportItem(reportItemLabelList)"
|
|
|
- :key="item.key"
|
|
|
- :label="item.label">
|
|
|
- <span v-if="currentOrcAndObr[item.key] && item.key !== 'signs'">{{
|
|
|
- currentOrcAndObr[item.key]
|
|
|
- }}</span>
|
|
|
- <span v-else-if="item.key === 'signs'">{{
|
|
|
- mapSigns(currentOrcAndObr[item.key])
|
|
|
- }}</span>
|
|
|
- <span v-else>{{ '' }}</span>
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
-
|
|
|
- <div id="patient-check-projects-table">
|
|
|
- <el-table width="100%" stripe :data="currentObxList">
|
|
|
- <el-table-column
|
|
|
- label="医技项目名称"
|
|
|
- align="center"
|
|
|
- prop="mecTechObsName"></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>
|
|
|
- <el-pagination
|
|
|
- :page-size="checkResultPagination.pageSize"
|
|
|
- :total="checkResultPagination.total"
|
|
|
- :current-page.sync="checkResultPagination.currentPage"
|
|
|
- @current-change="handleCurrentChange"></el-pagination>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </template>
|
|
|
- </DepartmentTemplate>
|
|
|
-</template>
|
|
|
-
|
|
|
-<style scoped>
|
|
|
-#patient-check-projects-table {
|
|
|
- min-height: 300px;
|
|
|
- margin-top: 5vh;
|
|
|
-}
|
|
|
-</style>
|