弃检逻辑修改
This commit is contained in:
parent
e66d1cddac
commit
38400a3924
@ -420,6 +420,7 @@ import { PacsDataApi } from '@/api/inspect/inspectpacsdata' // 导入PacsDataApi
|
||||
import { getStrDictOptions } from '@/utils/dict' //导入字典
|
||||
import Summary from './summary.vue' // 导入Summary组件用于汇总页面
|
||||
import TemplateDrawer from './Drawer-Template.vue'
|
||||
import { updateItemsAnalyse } from '@/api/summary'
|
||||
|
||||
const dialogTitle = ref('体检报告')
|
||||
const { t } = useI18n() // 国际化
|
||||
@ -2221,13 +2222,28 @@ const handleAbandonExam = async () => {
|
||||
}
|
||||
|
||||
// 准备更新的数据
|
||||
const updatedItems = currentItems.map(item => ({
|
||||
id: item.id,
|
||||
medicalSn: selectedPatient.value?.medicalSn,
|
||||
itemStatus: '2', // 设置为弃检状态
|
||||
inspectdoctor: inspectDoctor.value || user.value?.nickname || '',
|
||||
inspecttime: Date.now() // 使用当前时间戳
|
||||
}))
|
||||
const updatedItems = currentItems.map(item => {
|
||||
const baseFields = {
|
||||
id: item.id,
|
||||
medicalSn: selectedPatient.value?.medicalSn,
|
||||
itemStatus: '2' // 设置为弃检状态
|
||||
}
|
||||
|
||||
// 根据当前标签页类型添加不同的弃检信息
|
||||
if (currentTab.value === 'ultrasound' || currentTab.value === 'ecg') {
|
||||
return {
|
||||
...baseFields,
|
||||
examDescription: '已弃检',
|
||||
itemResult: '已弃检',
|
||||
analyse: '检查所见:已弃检\n检查结果:已弃检'
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
...baseFields,
|
||||
analyse: '该项目已弃检'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 批量更新检查项目
|
||||
await PatientitemsApi.updatePatientitemsBatch(updatedItems)
|
||||
@ -2235,6 +2251,21 @@ const handleAbandonExam = async () => {
|
||||
// 更新本地检查项目状态
|
||||
currentItems.forEach(item => {
|
||||
item.itemStatus = '2'
|
||||
|
||||
if (currentTab.value === 'ultrasound' || currentTab.value === 'ecg') {
|
||||
item.value = '已弃检'
|
||||
|
||||
// 同时更新小结数据
|
||||
if (currentTab.value === 'ultrasound') {
|
||||
conclusionData.value.ultrasound.finding = '已弃检'
|
||||
conclusionData.value.ultrasound.diagnosis = '已弃检'
|
||||
} else if (currentTab.value === 'ecg') {
|
||||
conclusionData.value.ecg.finding = '已弃检'
|
||||
conclusionData.value.ecg.diagnosis = '已弃检'
|
||||
}
|
||||
} else {
|
||||
item.analyse = '该项目已弃检'
|
||||
}
|
||||
})
|
||||
|
||||
loading.close()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user