危急值
This commit is contained in:
parent
682fdd882a
commit
62aa487fb5
14
src/api/ECG/warningStatisticsReport/index.ts
Normal file
14
src/api/ECG/warningStatisticsReport/index.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/*
|
||||
* 李传洋
|
||||
* WarningStatisticsReportApi
|
||||
*/
|
||||
export const WarningStatisticsReportApi = {
|
||||
getWarningStatisticsReport: async (params: any) => {
|
||||
return await request.get({ url: `/tblist/patientexamlist/warningStatisticsReport`, params })
|
||||
},
|
||||
getWarningListbyPatient: async (params: any) => {
|
||||
return await request.get({ url: `/system/warning/warningListbyPatient`, params })
|
||||
}
|
||||
}
|
452
src/views/ECG/warningStatisticsReport/index.vue
Normal file
452
src/views/ECG/warningStatisticsReport/index.vue
Normal file
@ -0,0 +1,452 @@
|
||||
<template>
|
||||
<div>
|
||||
<ContentWrap>
|
||||
<el-form
|
||||
ref="queryFormRef"
|
||||
:model="queryParams"
|
||||
size="default"
|
||||
label-width="78px"
|
||||
label-position="right"
|
||||
label-suffix=""
|
||||
class="-mb-15px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="诊断日期" prop="diagDate_ge" class="item-style date-picker">
|
||||
<el-date-picker
|
||||
v-model="queryParams.diagDate_ge"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="开始日期"
|
||||
class="item-width"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item
|
||||
label=""
|
||||
label-width="0px"
|
||||
prop="diagDate_le"
|
||||
class="item-style date-picker"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="queryParams.diagDate_le"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="结束日期"
|
||||
class="item-width"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="登记号" prop="regId" class="item-style">
|
||||
<el-input
|
||||
v-model="queryParams.regId"
|
||||
placeholder="请输入登记号"
|
||||
clearable
|
||||
class="item-width"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5" style="text-align: right">
|
||||
<el-button
|
||||
@click="handleQuery"
|
||||
style="background-color: rgba(56, 119, 246, 1); color: rgba(255, 255, 255, 1)"
|
||||
>
|
||||
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<ContentWrap class="mb-1px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
size="default"
|
||||
border
|
||||
:stripe="false"
|
||||
:show-overflow-tooltip="true"
|
||||
:data="list_infos"
|
||||
:header-cell-style="{
|
||||
background: 'rgb(235, 241, 250)',
|
||||
height: '40px',
|
||||
color: '#333333'
|
||||
}"
|
||||
:row-style="{ height: '40px' }"
|
||||
height="max(calc(100vh - 344px),100px)"
|
||||
>
|
||||
<el-table-column label="序号" align="center" width="54px">
|
||||
<template #default="scope"> {{ scope.$index + 1 }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="登记号" align="center" prop="regId" width="240px" />
|
||||
<el-table-column label="检查号" align="center" prop="examId" width="240px" />
|
||||
<el-table-column label="患者姓名" align="center" prop="pname" width="130px" />
|
||||
<el-table-column label="性别" align="center" prop="gender" width="54px" />
|
||||
<el-table-column
|
||||
label="出生日期"
|
||||
align="center"
|
||||
prop="birthday"
|
||||
:formatter="dateFormatter2"
|
||||
width="110px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="诊断日期"
|
||||
align="center"
|
||||
prop="diagDate"
|
||||
:formatter="dateFormatter2"
|
||||
width="110px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="检查日期"
|
||||
align="center"
|
||||
prop="examDate"
|
||||
:formatter="dateFormatter2"
|
||||
width="110px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="检查项目"
|
||||
header-align="center"
|
||||
prop="examItemName"
|
||||
min-width="260px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="影像设备"
|
||||
header-align="center"
|
||||
prop="deviceName"
|
||||
min-width="260px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="60px">
|
||||
<template #default="scope">
|
||||
<el-button link @click="handleRowClick(scope.row)" style="color: rgb(56, 119, 246)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 数据列 -->
|
||||
</el-table>
|
||||
<div>
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</ContentWrap>
|
||||
|
||||
<el-drawer
|
||||
v-model="activeDrawer"
|
||||
direction="rtl"
|
||||
:with-header="false"
|
||||
:modal="activeDrawerModal"
|
||||
:size="activeDrawerSize"
|
||||
@closed="
|
||||
() => {
|
||||
reportInfoType = ''
|
||||
activeTabName = ''
|
||||
activeDrawerModal = true
|
||||
activeDrawerSize = '440px'
|
||||
}
|
||||
"
|
||||
>
|
||||
<div style="position: relative; z-index: 100">
|
||||
<el-button
|
||||
link
|
||||
@click="activeDrawer = false"
|
||||
style="position: absolute; top: 3px; right: 1px"
|
||||
>
|
||||
<Icon icon="ep:close" />
|
||||
</el-button>
|
||||
</div>
|
||||
<el-tabs v-model="activeTabName" style="margin-top: -8px; height: 100%">
|
||||
<el-tab-pane label="危急报告信息" name="diagnosisInfo">
|
||||
<el-form
|
||||
ref="infoFormRef"
|
||||
:model="infoParams"
|
||||
size="default"
|
||||
label-width="74px"
|
||||
label-position="top"
|
||||
label-suffix=""
|
||||
class="mt-20px ml-16px"
|
||||
>
|
||||
<div class="mt-40px ml-50px">
|
||||
<el-timeline>
|
||||
<el-timeline-item
|
||||
:timestamp="formattedDate(warnings[0] ? warnings[0].reportDate : '')"
|
||||
placement="top"
|
||||
type="primary"
|
||||
:hollow="true"
|
||||
>
|
||||
<span style="font-size: 18px">危急值上报</span>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item
|
||||
:timestamp="new Date(conreadDateTime).toLocaleString().replace(/\//g, '-')"
|
||||
placement="top"
|
||||
type="primary"
|
||||
:hollow="true"
|
||||
>
|
||||
<span style="font-size: 18px">检查端收到提醒</span>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item
|
||||
:timestamp="checkDateTime"
|
||||
placement="top"
|
||||
type="primary"
|
||||
:hollow="true"
|
||||
v-if="isshowwjztime"
|
||||
>
|
||||
<span style="font-size: 18px">检查端确认危急值</span>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item
|
||||
:timestamp="checkDateTime"
|
||||
placement="top"
|
||||
type="primary"
|
||||
:hollow="true"
|
||||
v-if="isshowwjztime"
|
||||
>
|
||||
<span style="font-size: 18px">检查端发送确认回执</span>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-drawer>
|
||||
<!-- 可参考内容 -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { formatDate, dateFormatter, dateFormatter2 } from '@/utils/formatTime'
|
||||
import { WarningStatisticsReportApi } from '@/api/ECG/warningStatisticsReport'
|
||||
|
||||
defineOptions({ name: 'WarningStatisticsReport' })
|
||||
/*
|
||||
* 李传洋
|
||||
* 危急报告统计
|
||||
**/
|
||||
/** 导入内容 **/
|
||||
|
||||
/** 组件引用 **/
|
||||
const queryFormRef = ref()
|
||||
const infoFormRef = ref()
|
||||
|
||||
/** 数据结构 **/
|
||||
const message = useMessage()
|
||||
const { t } = useI18n()
|
||||
const activeDrawer = ref(false)
|
||||
const activeDrawerModal = ref(true)
|
||||
const activeDrawerSize = ref<any>('440px')
|
||||
const activeTabName = ref('diagnosisInfo')
|
||||
const reportInfoType = ref('') //us、ct
|
||||
const age = ref<any>('')
|
||||
const examItemNameEdit = ref('')
|
||||
//表单核心
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
orgId: '',
|
||||
regId: '',
|
||||
diagDate_ge: '',
|
||||
diagDate_le: ''
|
||||
})
|
||||
const infoParams = ref({
|
||||
id: '',
|
||||
examId: '',
|
||||
regId: '',
|
||||
orgId: '',
|
||||
pname: '',
|
||||
gender: '',
|
||||
birthday: '',
|
||||
billDoctorDepartment: '',
|
||||
applicationDate: '',
|
||||
examDescription: '',
|
||||
diagResults: '',
|
||||
examItemName: '',
|
||||
deviceName: '',
|
||||
deviceType: '',
|
||||
diagDoctor: '',
|
||||
diagDate: '',
|
||||
reviewDoctor: '',
|
||||
reviewDate: ''
|
||||
})
|
||||
const warnings = ref<any[]>([])
|
||||
const conreadDateTime = ref<any>()
|
||||
const checkDateTime = ref<any>()
|
||||
const isshowwjztime = ref(false)
|
||||
//表格核心
|
||||
const list_infos = ref<any[]>([])
|
||||
const loading = ref(true)
|
||||
const total = ref(0)
|
||||
|
||||
/****** 自定义内容 ******/
|
||||
const formattedDate = (timestamp) => {
|
||||
if (!timestamp) return ''
|
||||
const date = new Date(timestamp)
|
||||
const strdata = formatDate(date, 'YYYY-MM-DD HH:mm:ss')
|
||||
return strdata
|
||||
}
|
||||
|
||||
const calculateAge = async (birthdate) => {
|
||||
if (!birthdate) {
|
||||
age.value = ''
|
||||
return
|
||||
}
|
||||
const today = new Date()
|
||||
const birth = new Date(birthdate)
|
||||
let yearsDiff = today.getFullYear() - birth.getFullYear()
|
||||
// Check if the birthday hasn't occurred yet this year
|
||||
const hasBirthdayPassed =
|
||||
today.getMonth() > birth.getMonth() ||
|
||||
(today.getMonth() === birth.getMonth() && today.getDate() >= birth.getDate())
|
||||
if (!hasBirthdayPassed) {
|
||||
yearsDiff--
|
||||
}
|
||||
age.value = yearsDiff
|
||||
}
|
||||
|
||||
const resetDiagnosisInfo = async () => {
|
||||
infoParams.value = {
|
||||
id: '',
|
||||
examId: '',
|
||||
regId: '',
|
||||
orgId: '',
|
||||
pname: '',
|
||||
gender: '',
|
||||
birthday: '',
|
||||
billDoctorDepartment: '',
|
||||
applicationDate: '',
|
||||
examDescription: '',
|
||||
diagResults: '',
|
||||
examItemName: '',
|
||||
deviceName: '',
|
||||
deviceType: '',
|
||||
diagDoctor: '',
|
||||
diagDate: '',
|
||||
reviewDoctor: '',
|
||||
reviewDate: ''
|
||||
}
|
||||
warnings.value = []
|
||||
conreadDateTime.value = {}
|
||||
checkDateTime.value = {}
|
||||
age.value = ''
|
||||
examItemNameEdit.value = ''
|
||||
infoFormRef.value?.clearValidate()
|
||||
}
|
||||
|
||||
const getList = async () => {
|
||||
resetDiagnosisInfo()
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await WarningStatisticsReportApi.getWarningStatisticsReport(queryParams.value)
|
||||
list_infos.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/****** 可参考内容 ******/
|
||||
/** 组件事件 **/
|
||||
const handleQuery = async () => {
|
||||
queryParams.value.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
const resetQuery = async () => {
|
||||
queryParams.value = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
orgId: '',
|
||||
regId: '',
|
||||
diagDate_ge: '',
|
||||
diagDate_le: ''
|
||||
}
|
||||
queryFormRef.value?.clearValidate()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
const handleRowClick = async (row) => {
|
||||
resetDiagnosisInfo()
|
||||
if (row) {
|
||||
infoParams.value = row
|
||||
warnings.value = await WarningStatisticsReportApi.getWarningListbyPatient({
|
||||
orgId: '',
|
||||
regId: row.regId,
|
||||
examId: row.examId
|
||||
})
|
||||
if (
|
||||
warnings.value &&
|
||||
Array.isArray(warnings.value) &&
|
||||
warnings.value.length > 0 &&
|
||||
warnings.value[0] &&
|
||||
warnings.value[0].readDateTime
|
||||
)
|
||||
conreadDateTime.value = warnings.value[0].readDateTime
|
||||
else conreadDateTime.value = new Date().toLocaleString().replace(/\//g, '-')
|
||||
if (
|
||||
warnings.value &&
|
||||
Array.isArray(warnings.value) &&
|
||||
warnings.value.length > 0 &&
|
||||
warnings.value[0] &&
|
||||
warnings.value[0].checkDateTime
|
||||
) {
|
||||
checkDateTime.value = formattedDate(warnings.value[0].checkDateTime)
|
||||
isshowwjztime.value = true
|
||||
} else {
|
||||
checkDateTime.value = new Date().toLocaleString().replace(/\//g, '-')
|
||||
isshowwjztime.value = false
|
||||
}
|
||||
calculateAge(row.birthday)
|
||||
examItemNameEdit.value = row.examItemName
|
||||
if (row.deviceType && row.deviceType.trim().toLowerCase() == 'us') reportInfoType.value = 'us'
|
||||
else if (row.deviceType && row.deviceType.trim().toLowerCase() == 'csh1')
|
||||
reportInfoType.value = 'csh1'
|
||||
else reportInfoType.value = 'ct'
|
||||
}
|
||||
activeTabName.value = 'diagnosisInfo'
|
||||
activeDrawer.value = true
|
||||
}
|
||||
|
||||
/** 钩子方法 **/
|
||||
onMounted(async () => {
|
||||
getList()
|
||||
})
|
||||
|
||||
/** 防空作用域 **/
|
||||
console.log(dateFormatter)
|
||||
console.log(message)
|
||||
console.log(t)
|
||||
//console.log(null)
|
||||
|
||||
/** 导出内容 **/
|
||||
/**
|
||||
* 备注:
|
||||
*
|
||||
* **/
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-form-item__label {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.item-style {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.item-width {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.date-picker :deep(.item-width) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.radio-group {
|
||||
border: 1px solid #ececec;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user