修改心电工作站保存生成PDF

This commit is contained in:
lxd 2024-12-25 17:09:38 +08:00
parent a958b24c90
commit be889c5e23
2 changed files with 64 additions and 38 deletions

View File

@ -7,10 +7,10 @@ export interface EcganalysisparasVO {
examId: string // 检查ID体检编号、住院号、门诊号等
collectionTime: Date // 采集时间
hr: string // 心率
pAxle: string // P电轴
paxle: string // P电轴
qrsAxle: string // QRS电轴
tAxle: string // T电轴
pTimeLimit: string // P波时限
taxle: string // T电轴
ptimeLimit: string // P波时限
pr: string // PR间期
qrsTimeLimit: string // QRS时限
qt: string // QT间期
@ -34,7 +34,11 @@ export interface EcganalysisparasVO {
ecgDataFilePath: string // 心电数据文件的路径: 路径或URL
ecgJsonDataFilePath: string // 心电数据json格式的数据文件路径路径或URL
createDate: Date // 分析参数的创建时间
regId:String//患者ID
regId: String//患者ID
name:String
gender:String
age:String
diagtime:undefined
}
// 心电分析数据 API
@ -58,10 +62,10 @@ export const EcganalysisparasApi = {
updateEcganalysisparas: async (data: EcganalysisparasVO) => {
return await request.put({ url: `/tblist/ecganalysisparas/update`, data })
},
// 保存心电分析数据
SaveEcganalysisparas: async (data: EcganalysisparasVO) => {
return await request.put({ url: `/tblist/ecganalysisparas/save`, data })
},
// 保存心电分析数据
SaveEcganalysisparas: async (data: EcganalysisparasVO) => {
return await request.put({ url: `/tblist/ecganalysisparas/save`, data })
},
// 删除心电分析数据
deleteEcganalysisparas: async (id: number) => {
@ -73,20 +77,25 @@ export const EcganalysisparasApi = {
return await request.download({ url: `/tblist/ecganalysisparas/export-excel`, params })
},
// 按照examId查询心电分析数据详情
getexamIDdata: async (examId: String,orgId:String) => {
return await request.get({ url: `/tblist/ecganalysisparas/getexamIDdata?examId=${examId} &orgId=${orgId}`})
getexamIDdata: async (examId: String, orgId: String) => {
return await request.get({ url: `/tblist/ecganalysisparas/getexamIDdata?examId=${examId} &orgId=${orgId}` })
},
// 获取所有心电分析数据记录
getlist: async (regId:String,orgId:String) => {
return await request.get({ url: `/tblist/ecganalysisparas/list?regId=${regId}&orgId=${orgId}` })
},
// 获取开始和结束时间的心电分析数据记录
getDateStaAndEndData: async (doctorName:String,startDate:String,endDate:String) => {
return await request.get({ url: `/tblist/ecganalysisparas/getDateStaAndEndData?doctorName=${doctorName}&TimeSta=${startDate}&TimeEnd=${endDate}` })
},
// 添加导出Excel的方法
exportWorkloadExcel: async (doctorName:string,startTime:string,endTime:string) => {
return await request.download({ url: `/tblist/ecganalysisparas/export-workload-excel?doctorName=${doctorName}&startTime=${startTime}&endTime=${endTime} ` })
},
// 获取所有心电分析数据记录
getlist: async (regId: String, orgId: String) => {
return await request.get({ url: `/tblist/ecganalysisparas/list?regId=${regId}&orgId=${orgId}` })
},
// 获取开始和结束时间的心电分析数据记录
getDateStaAndEndData: async (doctorName: String, startDate: String, endDate: String) => {
return await request.get({ url: `/tblist/ecganalysisparas/getDateStaAndEndData?doctorName=${doctorName}&TimeSta=${startDate}&TimeEnd=${endDate}` })
},
// 添加导出Excel的方法
exportWorkloadExcel: async (doctorName: string, startTime: string, endTime: string) => {
return await request.download({ url: `/tblist/ecganalysisparas/export-workload-excel?doctorName=${doctorName}&startTime=${startTime}&endTime=${endTime} ` })
},
// 调用打印服务生成pdf
SaveEcgPdf: async (data: EcganalysisparasVO) => {
return await request.put({ url: `/tblist/ecganalysisparas/SaveEcgPdf`, data })
},
}

View File

@ -420,7 +420,9 @@
@click="getuporghiorgid(Primarykey, orgid)"
>申请诊断</el-button
>
<el-button style="width: 200px" type="primary" @click="save" :disabled="savedisabled">保存</el-button>
<el-button style="width: 200px" type="primary" @click="save" :disabled="savedisabled"
>保存</el-button
>
</div>
</el-form>
</div>
@ -561,7 +563,7 @@
<ECGWarningDialog ref="ECGDialog" />
<ECGReport ref="ECGReportDialog" />
<ECGCopmareDialog ref="ECGCompare" />
<ECGApplyforRepair ref="ECGApply"/>
<ECGApplyforRepair ref="ECGApply" />
</template>
<script setup lang="ts">
@ -599,7 +601,7 @@ const inputRef = ref() // 用于获取el-input的DOM引用
const saveFormVO = ref<EcganalysisparasVO>({} as EcganalysisparasVO)
//
const applyFormVO = ref<PatientexamlistVO>({} as PatientexamlistVO)
const examineFormVO = ref<PatientexamlistVO>({} as PatientexamlistVO)
const examineFormVO = ref<PatientexamlistVO>({} as PatientexamlistVO)
const Profilevo = ref<ProfileVO>({} as ProfileVO) //
const age = ref() //
const Isgrid = ref(1) // 1 0
@ -644,7 +646,7 @@ const open = async (row: any) => {
orgid.value = row.orgId
rowinfo.value = row
// console.log( rowinfo.value)
const data = await EcganalysisparasApi.getexamIDdata('MZCF0191729074962197_44', orgid.value)
const data = await EcganalysisparasApi.getexamIDdata(rowinfo.value.examId, orgid.value)
queryParams.value = data
snapshotTime.value = formattedDate(queryParams.value.snapshotTime)
await getlogininfo()
@ -676,7 +678,7 @@ const open = async (row: any) => {
isshowysb.value = Profilevo.value.orgId === row.orgId ? true : false
}
//
savedisabled.value=applyFormVO.value.reportstatus === '已审核'?true:false
savedisabled.value = applyFormVO.value.reportstatus === '已审核' ? true : false
}
//
async function process() {
@ -688,7 +690,7 @@ async function process() {
message.alertSuccess('审核成功')
await getPatientexamlist(keyid.value)
emit('success')
savedisabled.value=true
savedisabled.value = true
}
} else if (applyFormVO.value.reportstatus === '已审核') {
message.warning('已经审核,无需再次审核')
@ -740,13 +742,12 @@ const queryParams = ref({
})
//
async function save() {
saveFormVO.value.id = queryParams.value.id
saveFormVO.value.hr = queryParams.value.hr
saveFormVO.value.pAxle = queryParams.value.paxle
saveFormVO.value.paxle = queryParams.value.paxle
saveFormVO.value.qrsAxle = queryParams.value.qrsAxle
saveFormVO.value.tAxle = queryParams.value.taxle
saveFormVO.value.qrsTimeLimit = queryParams.value.ptimeLimit
saveFormVO.value.taxle = queryParams.value.taxle
saveFormVO.value.ptimeLimit = queryParams.value.ptimeLimit
saveFormVO.value.pr = queryParams.value.pr
saveFormVO.value.qrsTimeLimit = queryParams.value.qrsTimeLimit
saveFormVO.value.qt = queryParams.value.qt
@ -770,10 +771,20 @@ async function save() {
await PatientexamlistApi.examineupdatelist(examineFormVO.value)
//
await getPatientexamlist(keyid.value)
//pdf
const data = await EcganalysisparasApi.getexamIDdata('MZCF0191729074962197_44', orgid.value)
const data = await EcganalysisparasApi.getexamIDdata(rowinfo.value.examId, orgid.value)
queryParams.value = data
message.alertSuccess('保存成功')
//pdf
saveFormVO.value.regId = id.value
saveFormVO.value.examId = rowinfo.value.examId
saveFormVO.value.orgId = orgid.value
saveFormVO.value.name = rowinfo.value.pname
saveFormVO.value.gender = rowinfo.value.gender
saveFormVO.value.age = age.value
saveFormVO.value.diagtime = queryParams.value.doctorDiagTime
saveFormVO.value.ecgJsonDataFilePath = queryParams.value.ecgJsonDataFilePath
await EcganalysisparasApi.SaveEcgPdf(saveFormVO.value)
emit('success')
//ElMessage.info('pdf')
@ -825,7 +836,7 @@ function resetForm() {
lineratio.value = 0.05 //线
suduratio.value = 1 //线
applyFormVO.value = {} as PatientexamlistVO
examineFormVO.value={} as PatientexamlistVO
examineFormVO.value = {} as PatientexamlistVO
}
//
@ -851,7 +862,13 @@ const handleUpdate = (newValue) => {
}
//
function ECGApplyDialog() {
ECGApply.value.opendiag('1',rowinfo.value,Profilevo.value.orgId,Profilevo.value.doctorname,Profilevo.value.id)
ECGApply.value.opendiag(
'1',
rowinfo.value,
Profilevo.value.orgId,
Profilevo.value.doctorname,
Profilevo.value.id
)
}
//
function openECGDialog() {