新增心电危急值模块

This commit is contained in:
Euni4U 2024-12-04 19:17:17 +08:00
parent 7db3a6e5b2
commit 7628120b07
6 changed files with 577 additions and 68 deletions

View File

@ -1,52 +1,67 @@
import request from '@/config/axios'
// 危急值记录 VO
export interface WarningVO {
id: string // 主键
orgId: string // 机构ID
examId: string // 检查ID,一人多个检查的检查id
regId: string // 登记ID :patientid
reportOrgId: string // 上报机构id
reportorgName: string // 上报机构名称
reportDoctor: string // 上报医生
reportDate: Date // 上报时间
warningContent: string // 危急值内容
receiveDoctor: string // 危急值接收医生
dealDoctor: string // 处理医生
checkDateTime: Date // 确认时间
remark: string // 备注
warningProcess: string // 危急值报告进程Json格式
}
// 危急值记录 API
export const WarningApi = {
// 查询危急值记录分页
getWarningPage: async (params: any) => {
return await request.get({ url: `/system/warning/page`, params })
},
// 查询危急值记录详情
getWarning: async (id: number) => {
return await request.get({ url: `/system/warning/get?id=` + id })
},
// 新增危急值记录
createWarning: async (data: WarningVO) => {
return await request.post({ url: `/system/warning/create`, data })
},
// 修改危急值记录
updateWarning: async (data: WarningVO) => {
return await request.put({ url: `/system/warning/update`, data })
},
// 删除危急值记录
deleteWarning: async (id: number) => {
return await request.delete({ url: `/system/warning/delete?id=` + id })
},
// 导出危急值记录 Excel
exportWarning: async (params) => {
return await request.download({ url: `/system/warning/export-excel`, params })
},
}
import request from '@/config/axios'
// 危急值记录 VO
export interface WarningVO {
id: string // 主键
orgId: string // 机构ID
examId: string // 检查ID,一人多个检查的检查id
regId: string // 登记ID :patientid
reportOrgId: string // 上报机构id
reportorgName: string // 上报机构名称
reportDoctor: string // 上报医生
reportDate: Date // 上报时间
warningContent: string // 危急值内容
receiveDoctor: string // 危急值接收医生
dealDoctor: string // 处理医生
checkDateTime: Date // 确认时间
remark: string // 备注
warningProcess: string // 危急值报告进程Json格式
readDateTime:string
receiptDateTime:string
readremark:string
}
// 危急值记录 API
export const WarningApi = {
// 查询危急值记录分页
getWarningPage: async (params: any) => {
return await request.get({ url: `/system/warning/page`, params })
},
// 查询危急值记录详情
getWarning: async (id: number) => {
return await request.get({ url: `/system/warning/get?id=` + id })
},
// 新增危急值记录
createWarning: async (data: WarningVO) => {
return await request.post({ url: `/system/warning/create`, data })
},
// 修改危急值记录
updateWarning: async (data: WarningVO) => {
return await request.put({ url: `/system/warning/update`, data })
},
// 删除危急值记录
deleteWarning: async (id: number) => {
return await request.delete({ url: `/system/warning/delete?id=` + id })
},
// 导出危急值记录 Excel
exportWarning: async (params) => {
return await request.download({ url: `/system/warning/export-excel`, params })
},
// 查询患者危急值记录详情
getexmidororgiddata: async (examId: String,orgId: String) => {
return await request.get({ url: `/system/warning/getexmidororgiddata?examID=${examId}&&orgID=${orgId}` })
},
// 查询患者危急值记录详情
updateWarningdate: async (id:String,readDateTime: String,receiptDateTime: String) => {
return await request.get({ url: `/system/warning/updateWarningdate?id=${id}&&readDateTime=${readDateTime}&&receiptDateTime=${receiptDateTime}` })
},
// 修改危急值记录
SaveupdateWarning: async (data: WarningVO) => {
return await request.put({ url: `/system/warning/Saveupdate`, data })
},
}

View File

@ -35,6 +35,8 @@ export interface PatientexamlistVO {
StudyInsta:string
isFavourite:string //是否收藏
pdfurl:String//pdf地址
warning:String//是否有危急值
applyhighLevelname:String//申请上级机构医生
}
export interface inspdfscreenshotVO {

View File

@ -61,6 +61,12 @@
<el-button type="primary" plain @click="print"
><el-icon><Printer /></el-icon></el-button
>
<el-button type="primary" plain @click="openECGDialog" v-if="isshowwjz"
><el-icon><Warning /></el-icon></el-button
>
<el-button type="primary" plain @click="openreprotdiag"
><el-icon><Check /></el-icon></el-button
>
</el-button-group>
</el-header>
<el-container>
@ -465,6 +471,8 @@
/>
</div>
</div>
<ECGWarningDialog ref="ECGDialog" />
<ECGReport ref="ECGReportDialog" />
</template>
<script setup lang="ts">
@ -480,6 +488,8 @@ import { PatientexamlistApi, PatientexamlistVO } from '@/api/tblist/patientexaml
import QRCode from 'qrcode'
import ECGprint from '@/views/ECG/ECGprint.vue'
import htmlToPdf from '@/utils/htmlPdf'
import ECGWarningDialog from '@/views/ECG/ECGWaring/ECGWarningDialog.vue'
import ECGReport from '@/views/ECG/ECGWaring/ECGReport.vue'
/** 提交表单 */
const emit = defineEmits(['success']) // success
const message = useMessage() //
@ -511,7 +521,9 @@ const qrcodeRef = ref(null)
const isdiagshow = ref(false) //
const imagebase64 = ref()
const isprintimage = ref(false) //base64
const ECGDialog = ref() //
const isshowwjz = ref(false)
const ECGReportDialog = ref() //
//
const treeDefaultProps = {
children: 'children',
@ -537,6 +549,9 @@ const open = async (row: any) => {
calculateAge(row.birthday)
Isgrid.value = 1 //
isChildVisible.value = true
isshowwjz.value=true
//
// isshowwjz.value=Profilevo.value.orgId===row.highLevelOrgId?true:false
nextTick(() => {
/* 计算右侧诊断*/
const canvasContainer = document.getElementById('elform')
@ -648,20 +663,19 @@ function updateimagebase(newValue) {
}
//
function resetForm()
{
Isgrid.value=1 // 1 0
Ismeasure.value =0 // 1 0
IsFD.value = false //
lineratio.value =0.05 //线
suduratio.value = 1 //线
function resetForm() {
Isgrid.value = 1 // 1 0
Ismeasure.value = 0 // 1 0
IsFD.value = false //
lineratio.value = 0.05 //线
suduratio.value = 1 //线
}
//
function printclose() {
imagebase64.value=''
isdiagshow.value=false
isprintimage.value=false
imagebase64.value = ''
isdiagshow.value = false
isprintimage.value = false
}
//
function print() {
@ -678,7 +692,14 @@ function print() {
const handleUpdate = (newValue) => {
correct.value = newValue
}
//
function openECGDialog() {
ECGDialog.value.opendiag('1', rowinfo.value)
}
//
function openreprotdiag(){
ECGReportDialog.value.opendiag(rowinfo.value)
}
//
function iscorrect() {
correct.value = correct.value ? false : true

View File

@ -0,0 +1,307 @@
<template>
<el-dialog
v-model="dialogVisible"
title="危急值上报详情"
width="1000px"
style="height: 720px"
:before-close="handleClose"
>
<div class="modal">
<div class="modal-content">
<div class="left-side">
<!-- 左边的内容 -->
<el-timeline style="max-width: 600px">
<el-timeline-item :timestamp="formattedDate(warintinfo?.reportDate)" placement="top">
<span>危急值上报</span>
</el-timeline-item>
<el-timeline-item
:timestamp="new Date(conreadDateTime).toLocaleString().replace(/\//g, '-')"
placement="top"
>
<span>检查端收到提醒</span>
</el-timeline-item>
<el-timeline-item
:timestamp="new Date(newdatetime).toLocaleString().replace(/\//g, '-')"
placement="top"
v-if="isshowwjztime"
>
<span>检查端确认危急值</span>
</el-timeline-item>
<el-timeline-item
:timestamp="new Date(newdatetime).toLocaleString().replace(/\//g, '-')"
placement="top"
v-if="isshowwjztime"
>
<span>发送确认通知</span>
</el-timeline-item>
</el-timeline>
</div>
<div class="right-side">
<!-- 基础信息 -->
<div class="info-section">
<div class="section-title">基础信息</div>
<el-form label-width="80px">
<el-row :gutter="24">
<el-col :span="9">
<el-form-item label="检查日期:" label-width="80">
<el-input
style="width: 160px"
:value="formatDate(rowinfo.examDate, 'YYYY-MM-DD HH:mm:ss')"
/>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="姓名:" label-width="60">
<el-input :value="rowinfo.pname" style="width: 100px" disabled />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="性别:" label-width="50">
<el-input :value="rowinfo.gender" style="width: 100px" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="检查编号:">
<el-input :value="rowinfo.examId" style="width: 160px" disabled />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="检查机构:" label-width="30">
<el-input :value="rowinfo.orgName" style="width: 200px" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!-- 上报信息 -->
<div class="info-section">
<div class="section-title">上报信息</div>
<el-form label-width="80px">
<el-row :gutter="24">
<el-col :span="9">
<el-form-item label="上报机构:" label-width="100">
<el-input :value="warintinfo.reportorgName" style="width: 160px" disabled />
</el-form-item>
</el-col>
<el-col :span="7" style="padding: 0px">
<el-form-item label="上报医生:">
<el-input :value="warintinfo.reportDoctor" style="width: 100px" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="上报时间:" label-width="50">
<el-input
style="width: 160px"
:value="formatDate(warintinfo.reportDate, 'YYYY-MM-DD HH:mm:ss')"
disabled
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="危急值内容:" label-width="100px">
<el-input :value="warintinfo.warningContent" type="textarea" rows="3" />
</el-form-item>
<el-form-item label="备注:" label-width="100px">
<el-input :value="warintinfo.remark" type="textarea" rows="2" />
</el-form-item>
</el-form>
</div>
<!-- 处理信息 -->
<div class="info-section">
<div class="section-title">处理信息</div>
<el-form label-width="80px">
<el-row :gutter="24">
<el-col :span="7">
<el-form-item label="接报医生:">
<el-input v-model="receivename" />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="处理医生:">
<el-input v-model="dealname" />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="确认时间:">
<el-date-picker
v-model="formData.checkDateTime"
type="datetime"
value-format="x"
placeholder="检查时间"
style="width: 190px"
:default-value="new Date()"
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注:">
<el-input v-model="warintinfo.readremark" type="textarea" rows="2" disabledz />
</el-form-item>
</el-form>
</div>
<el-form-item>
<el-button type="primary" @click="save">确认</el-button>
<el-button @click="() => (dialogVisible = false)">取消</el-button>
</el-form-item>
</div>
</div>
</div>
</el-dialog>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
import { WarningApi, WarningVO } from '@/api/system/warning'
import { formatDate } from '@/utils/formatTime'
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const warintinfo = ref()
const rowinfo = ref() //
const conreadDateTime = ref() //
const Profilevo = ref<ProfileVO>({} as ProfileVO) //
const receivename = ref() //
const dealname = ref() //
const isshowwjztime = ref(false) //
const opendiag = async (row) => {
//
rowinfo.value = row
resetForm()
await getlogininfo()
//
const data = await WarningApi.getexmidororgiddata(rowinfo.value.examId, rowinfo.value.orgId)
warintinfo.value = data
if (!data.readDateTime) {
await updatereadDateTime(data.id)
} else {
conreadDateTime.value = data.readDateTime
}
if (data.checkDateTime) {
isshowwjztime.value = true
} else {
isshowwjztime.value = false
}
receivename.value = Profilevo.value.nickname
dealname.value = Profilevo.value.nickname
dialogVisible.value = true
}
//
async function save() {
formData.value.id = warintinfo.value.id
formData.value.receiveDoctor = receivename.value
formData.value.dealDoctor = dealname.value
formData.value.readremark = warintinfo.value.readremark
const savedata = formData.value as unknown as WarningVO
const data = await WarningApi.SaveupdateWarning(savedata)
if (data) {
isshowwjztime.value = true
}
}
//
async function updatereadDateTime(id) {
conreadDateTime.value = new Date().toLocaleString()
await WarningApi.updateWarningdate(id, conreadDateTime.value, '')
}
//
const getlogininfo = async () => {
Profilevo.value = await getUserProfile()
}
nextTick(async () => {})
//
function formattedDate(timestamp) {
const date = new Date(timestamp)
const strdata = formatDate(date, 'YYYY-MM-DD HH:mm:ss')
return strdata //
}
const formData = ref({
id: undefined,
orgId: undefined,
examId: undefined,
regId: undefined,
reportOrgId: '',
reportorgName: undefined,
reportDoctor: '',
reportDate: undefined,
warningContent: '',
receiveDoctor: undefined,
dealDoctor: undefined,
checkDateTime: '',
remark: undefined,
warningProcess: undefined,
readremark: ''
})
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
orgId: undefined,
examId: undefined,
regId: undefined,
reportOrgId: '',
reportorgName: undefined,
reportDoctor: '',
reportDate: undefined,
warningContent: '',
receiveDoctor: undefined,
dealDoctor: undefined,
checkDateTime: '',
remark: undefined,
warningProcess: undefined,
readremark: ''
}
}
defineExpose({ opendiag }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
/** */
defineOptions({ name: 'ECGReport' })
</script>
<style lang="css" scoped>
.modal {
width: 950px;
height: 650px;
display: flex;
justify-content: center;
}
.modal-content {
display: flex;
width: 100%; /* 可以根据需要调整宽度 */
}
.left-side {
flex: 1; /* 左边div占据剩余空间的比例 */
}
.right-side {
flex: 3;
background-color: #fff;
}
.info-section {
margin-bottom: 10px;
padding: 2px;
border: 1px solid #d7d7d7;
}
.section-title {
font-size: 16px;
font-weight: bold;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid #d7d7d7;
}
</style>

View File

@ -0,0 +1,164 @@
<template>
<el-dialog
v-model="dialogVisible"
title="危急值上报"
width="600"
style="height: 600px"
:before-close="handleClose"
>
<el-form ref="formRef" :model="formData" label-width="100px" v-loading="formLoading">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="受检者" prop="pname">
<el-input v-model="rowinfo.pname" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查机构" prop="orgName">
<el-input v-model="rowinfo.orgName" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="检查科室" prop="billDoctorDepartment">
<el-input v-model="rowinfo.billDoctorDepartment" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查医生" prop="applyhighLevelname">
<el-input v-model="rowinfo.applyhighLevelname" disabled />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="危急值内容">
<el-input v-model="formData.warningContent" type="textarea" :rows="8" />
</el-form-item>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="接报医生" prop="applyhighLevelname">
<el-input v-model="rowinfo.applyhighLevelname" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上报医生" prop="reportDoctor">
<el-input v-model="formData.reportDoctor" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注">
<el-input v-model="formData.remark" type="textarea" :rows="5" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="report">上报</el-button>
<el-button @click="() => (dialogVisible = false)">取消</el-button>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
import { WarningApi, WarningVO } from '@/api/system/warning'
import { ReportPrintStatisticsApi } from '@/api/applyregistration/reportPrintStatistics'
const { t } = useI18n() //
const message = useMessage() //
const orgInfo = ref<any>('')
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formRef = ref() // Ref
const rowinfo = ref() //
const Profilevo = ref<ProfileVO>({} as ProfileVO) //
/** 打开弹窗 */
const opendiag = async (type, row) => {
// const reportDate = await isdata(row.examId, row.orgId)
// if (reportDate) {
// message.alertError('')
// return
// }
formLoading.value = true
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
resetForm()
rowinfo.value = row
await getlogininfo()
formData.value.reportDoctor = Profilevo.value.nickname
formLoading.value = false
}
//
async function isdata(examId: String, orgId: String) {
const data = await WarningApi.getexmidororgiddata(examId, orgId)
if (data) {
return data.reportDate
} else {
return ''
}
}
//
async function report() {
formData.value.examId = rowinfo.value.examId
formData.value.orgId = rowinfo.value.orgId
formData.value.regId = rowinfo.value.regId
formData.value.reportOrgId = Profilevo.value.orgId
formData.value.reportorgName = orgInfo.value.orgName
const data = formData.value as unknown as WarningVO
await WarningApi.createWarning(data)
dialogVisible.value = false
}
const formData = ref({
id: undefined,
orgId: undefined,
examId: undefined,
regId: undefined,
reportOrgId: '',
reportorgName: undefined,
reportDoctor: '',
reportDate: undefined,
warningContent: '',
receiveDoctor: undefined,
dealDoctor: undefined,
checkDateTime: undefined,
remark: undefined,
warningProcess: undefined
})
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
orgId: undefined,
examId: undefined,
regId: undefined,
reportOrgId: '',
reportorgName: undefined,
reportDoctor: '',
reportDate: undefined,
warningContent: '',
receiveDoctor: undefined,
dealDoctor: undefined,
checkDateTime: undefined,
remark: undefined,
warningProcess: undefined
}
}
//
const getlogininfo = async () => {
Profilevo.value = await getUserProfile()
orgInfo.value = await ReportPrintStatisticsApi.getOrg(Profilevo.value.orgId.trim())
}
defineExpose({ opendiag }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
/** */
defineOptions({ name: 'ECGWarningDialog' })
</script>
<style lang="css" scoped></style>

View File

@ -348,7 +348,7 @@ const openultrForm = (row:any) => {
const clickNumber = ref(0)
function handleEdit(row) {
console.log(111111121212)
if (row.deviceType.includes('US')) {
if (row.deviceType.includes('ECG')) {
//US
openultrForm(row)
@ -409,7 +409,7 @@ function nowDate(time) {
const getList = async () => {
loading.value = true
try {
queryParams.deviceType = 'US'
queryParams.deviceType = 'ECG'
const data = await PatientexamlistApi.getPatientexamlistPage(queryParams)
list.value = data.list
total.value = data.total
@ -421,7 +421,7 @@ const getList = async () => {
const selectcollect = () => {
queryFormRef.value.resetFields()
queryParams.pageNo = 1
queryParams.deviceType = 'US'
queryParams.deviceType = 'ECG'
queryParams.isFavourite = '1'
getList()
}
@ -458,7 +458,7 @@ const dicomDataSync = async () => {
const handleQuery = () => {
queryParams.pageNo = 1
queryParams.isFavourite = ''
queryParams.deviceType = 'US'
queryParams.deviceType = 'ECG'
getList()
}