feat(分诊队列): 实现分诊队列核心功能与日志记录
新增分诊队列相关服务接口与实现,包括队列管理、叫号操作和日志记录 添加DivLogService和CallRecordService用于记录分诊操作和叫号历史 在CurrentDayEncounterDto和TriageQueueItem中增加seqNo字段用于显示预约序号 实现分诊操作日志记录功能,包括添加队列、移除队列、叫号、完成等操作 新增CallType枚举定义叫号类型,并实现叫号记录功能 优化队列状态映射逻辑,支持更多状态类型显示
This commit is contained in:
@@ -37,7 +37,8 @@ export function getCandidatePool(params) {
|
||||
pageNo: params?.pageNo || 1,
|
||||
pageSize: params?.pageSize || 10000,
|
||||
searchKey: params?.searchKey || '',
|
||||
statusEnum: params?.statusEnum ?? 1 // 1=PLANNED(待诊),已挂号未接诊的患者;不传或传-1会返回已接诊的患者
|
||||
statusEnum: params?.statusEnum ?? 1, // 1=PLANNED(待诊),已挂号未接诊的患者
|
||||
excludeFromCandidatePool: true // 显式传参过滤已入队患者,配合后端 opt-in 逻辑
|
||||
},
|
||||
skipErrorMsg: true // 跳过错误提示,由组件处理
|
||||
})
|
||||
|
||||
@@ -840,7 +840,8 @@ const syncCurrentCallFromQueue = () => {
|
||||
return
|
||||
}
|
||||
currentCall.value = {
|
||||
number: String(calling.queueOrder),
|
||||
// 优先显示预约序号 seqNo,让患者凭挂号单号识别;无预约序号时回退到排队序号
|
||||
number: String(calling.seqNo ?? calling.queueOrder),
|
||||
name: calling.patientName,
|
||||
room: calling.room
|
||||
}
|
||||
@@ -877,7 +878,7 @@ const mapBackendStatusToFrontend = (status) => {
|
||||
switch (numStatus) {
|
||||
case 0: return '等待'
|
||||
case 10: return '叫号中'
|
||||
case 20: return '诊中'
|
||||
case 20: return '就诊中' // 统一文案,与医生站"就诊中"保持一致,原"诊中"过于简略
|
||||
case 30: return '已完成'
|
||||
case 40: return '跳过'
|
||||
case 50: return '已退费'
|
||||
@@ -894,7 +895,7 @@ const mapFrontendStatusToBackend = (status) => {
|
||||
switch (status) {
|
||||
case '叫号中': return 10
|
||||
case '等待': return 0
|
||||
case '诊中': return 20
|
||||
case '就诊中': return 20
|
||||
case '已完成': return 30
|
||||
case '跳过': return 40
|
||||
case '已退费': return 50
|
||||
@@ -960,6 +961,8 @@ const loadQueueFromDb = async () => {
|
||||
return {
|
||||
id: it.id,
|
||||
queueOrder: it.queueOrder,
|
||||
// 预约序号,优先于queueOrder用于叫号屏显示,患者凭此识别
|
||||
seqNo: it.seqNo,
|
||||
patientName: it.patientName ?? '-',
|
||||
// 队列数据已从入队时存储的 healthcareName 读取(包含"预约"或"挂号"后缀)
|
||||
appointmentType: it.healthcareName ?? '普通号挂号',
|
||||
@@ -1715,8 +1718,8 @@ const handleSelectCall = async () => {
|
||||
const latest = originalQueueList.value.find((i) => i.id === selectedQueueRow.value.id)
|
||||
if (latest) {
|
||||
selectedQueueRow.value = latest
|
||||
// 如果有多个"叫号中"的患者,显示当前选中的这个
|
||||
currentCall.value = { number: String(latest.queueOrder), name: latest.patientName, room: latest.room }
|
||||
// 如果有多个"叫号中"的患者,显示当前选中的这个,seqNo优先于queueOrder
|
||||
currentCall.value = { number: String(latest.seqNo ?? latest.queueOrder), name: latest.patientName, room: latest.room }
|
||||
}
|
||||
|
||||
// 统计当前"叫号中"的患者数量
|
||||
|
||||
Reference in New Issue
Block a user