Fix Bug #362: 住院护士站:入出转管理双击查看详情时,"入科时间"字段显示当前系统时间而非实际入科时间

在 selectAdmissionPatientInfo SQL 中,startTime 原取自 bed.start_time(床位级别的位置记录),
当该 LEFT JOIN 无匹配记录时返回 NULL,前端 fallback 到当前系统时间。
改为 COALESCE(bed.start_time, ae.start_time),无床位记录时回退到 encounter 的入院时间。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
张飞
2026-05-13 01:03:00 +08:00
parent b96acc2402
commit 3590a18adc

View File

@@ -231,7 +231,7 @@
ae.priority_enum, ae.priority_enum,
ae.organization_id, ae.organization_id,
ae.start_time AS in_hos_time, ae.start_time AS in_hos_time,
bed.start_time, COALESCE(bed.start_time, ae.start_time) AS start_time,
bed.location_id AS bed_id, bed.location_id AS bed_id,
bed.location_name AS bed_name, bed.location_name AS bed_name,
house.location_id AS house_id, house.location_id AS house_id,