Commit Graph

3495 Commits

Author SHA1 Message Date
2aa8b88b3a fix(#764): 请修复 Bug #764
根因:
- Bug #请修复 Bug #764 存在的问题

修复:
- 修改文件:`healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationLabApplyServiceImpl.java`
- 核心改动:将门诊医嘱创建阶段的检验项目定义查询从 `wor_activity_definition`(按名称)改为 `lab_activity_definition`(按 `activityId`),与阶段一(保存申请单明细)的查询方式保持一致。编译通过,可进入测试/验收流程。
- Review ---
- Now I have all the information needed for a thorough review.
- Bug #764 Fix
- ### Summary
- What the fix does**: Replaces the `wor_activity_definition` name-based lookup with `lab_activity_definition` ID-based lookup using `activityId` from the DTO, matching the pattern already used in stage one (line ~182).
- ### Dimension Scores
- 1. Design Quality (4/5)**
-  Correct root-cause fix: switches from wrong table to correct table
-  Uses ID-based lookup (more reliable than name-based)
-  Consistent with stage one's query pattern (line 182)
-  Error messages are specific and actionable (include item name and ID)
- ⚠ Minor: `activityDefinitionService` field (line 79) is now unused — Spring still injects it harmlessly, but it's dead code
- 2. Craftsmanship (4/5)**
-  Null check on `labActivityId` before query — prevents NPE
-  Null check on result — handles missing records gracefully
-  `LabActivityDefinition` entity verified: has `categoryCode`, `permittedUnitCode`, `feePackageId` — all fields accessed in the fix exist
-  `adviceTableName` correctly changed to `"lab_activity_definition"` for downstream tracking
- ⚠ Minor: unused `activityDefinitionService` field could be cleaned up in a follow-up
- 3. Functionality (5/5)**
- lab items now correctly resolve from `lab_activity_definition`
-  `adviceDefinitionId`, `definitionId`, `activityId` all set to `labActivityId` — consistent
-  `categoryCode`, `permittedUnitCode`, `feePackageId` correctly read from `LabActivityDefinition`
-  Fee package logic preserved: `feePackageId` flows through to package price lookup correctly
-  Compilation passes (verified, exit code 0)
- 4. Style Consistency (4/5)**
-  Matches stage one's pattern (`labActivityDefinitionService.getById(...)`)
-  Same error-throwing style (`throw new RuntimeException(...)`)
-  Uses Lombok `@Data` entity accessors consistent with project style
-  Comments updated to explain the change rationale
- ⚠ Comment numbering jumped from "1" to "3" (skipping "2") — the old "2. 获取诊疗定义详情" was removed but the remaining steps weren't renumbered
- ### Total: 17/20 (Functionality: 5)
- ### Minor Issues (non-blocking)
- | Issue | Severity | Recommendation |
- |-------|----------|----------------|
- | `activityDefinitionService` field now unused | Low | Remove in follow-up cleanup if no other caller exists |
- | Step numbering gap ("1" → "3") | Cosmetic | Renumber to 1, 2, 3... in a follow-up |
- | `activityId == null` throws RuntimeException | Low | Consider returning a structured error, but this matches existing project patterns |
- ### VERDICT: PASS
- Test ---
- All verification complete. Here's the summary:
- ## Bug #764 Verification Report
- ### Verification Results
- | Check | Result |
- |-------|--------|
- | `mvn compile -pl healthlink-his-application -am` |  BUILD SUCCESS (33.8s, 11 modules) |
- | `mvn test` — 8 test classes |  **126 tests, 0 failures, 0 errors, 0 skipped** |
- | InspectionApiTest (direct regression) |  11 tests, 0 failures |
- | DoctorWorkstationTest (closest module) |  20 tests, 0 failures |
- | Import/injection correctness |  `LabActivityDefinition` + `ILabActivityDefinitionService` properly imported and `@Autowired` |
- | Entity field coverage |  All 3 fields (`categoryCode`, `permittedUnitCode`, `feePackageId`) exist in entity |
- | No unrelated changes |  Only `DoctorStationLabApplyServiceImpl.java` modified |
- | No regressions |  All pre-existing warnings unchanged, zero new warnings |
- VERDICT: PASS**
- Verify ---
- ## Bug #764 验收报告
- ### 1. Git Commit 存在性 —  未提交
- 最新 commit 为 `fix(#763)` — Bug #763
- 诸葛亮分析报告 Bug #764`(仅文档,非修复)
- M ...DoctorStationLabApplyServiceImpl.java`)
- ### 2. 编译 —  通过
- `mvn clean compile -DskipTests` → **BUILD SUCCESS**(12 模块全部 SUCCESS)
- ### 3. 测试 —  通过
- 全量测试:**126 tests, 0 failures, 0 errors, 0 skipped**
- 相关模块 `InspectionApiTest`:11 tests 全通过
- 其他模块:Registration(18), Billing(7), Inpatient(19), Pharmacy(17) 全通过
- ### 4. 无回归 — 
- 全部 5 个测试套件通过,无新增失败
- ### 5. 文件变更合理性 — 
- 仅修改 **1 个文件**:`DoctorStationLabApplyServiceImpl.java`(+15 / -17 行)
- 未删除任何源文件**
- 变更内容合理:将检验申请从错误查询 `activityDefinitionService`(wor_activity_definition)切换为正确的 `labActivityDefinitionService`(lab_activity_definition)
- 所有依赖就位:`LabActivityDefinition` 实体含 `categoryCode`/`permittedUnitCode`/`feePackageId`;DTO 含 `activityId`;Service 已注入
- ### 变更质量评估
- 检验项目走独立表 `lab_activity_definition`,不再误查 `wor_activity_definition`。`adviceTableName` 也正确改为 `"lab_activity_definition"`。
- 修复代码未提交。需要执行 `git add` + `git commit -m "fix(#764): ..."` 后方可视为完成。
- FAIL [修复代码已验证正确(编译通过、126测试全通过、无回归、变更合理),但缺少 git commit,不符合铁律3"测试通过后才提交"的完成标准]
2026-06-12 21:29:08 +08:00
1a51508e78 fix(#761): 修复汇总领药列表领药时间显示异常 — 改用 cli_procedure.occurrence_time 作为执行时间数据源 2026-06-12 21:29:08 +08:00
cd523cced0 docs(bug): 诸葛亮分析报告 Bug #761 2026-06-12 16:31:36 +08:00
4b3663c7d7 docs(bug): 诸葛亮分析报告 Bug #762 2026-06-12 16:21:51 +08:00
Ranyunqiao
5e594e7c25 bug 614 625 628 639 642 2026-06-12 16:20:59 +08:00
a18143ef41 docs(bug): 诸葛亮分析报告 Bug #763 2026-06-12 16:18:00 +08:00
4f3b1dff8f docs(bug): 诸葛亮分析报告 Bug #764 2026-06-12 16:05:34 +08:00
a45b6e7955 revert: 恢复误删文件(回退 81f500160) 2026-06-12 16:00:06 +08:00
cec2f47a1f docs(bug): 诸葛亮分析报告 Bug #765 2026-06-12 15:59:00 +08:00
a350095ced docs(bug): 诸葛亮分析报告 Bug #760 2026-06-12 15:57:13 +08:00
3f52a98a32 docs(bug): 诸葛亮分析报告 Bug #761 2026-06-12 15:52:41 +08:00
d60b579dcd docs(bug): 诸葛亮分析报告 Bug #762 2026-06-12 15:45:31 +08:00
d413a4cd60 docs(bug): 诸葛亮分析报告 Bug #757 2026-06-12 15:42:57 +08:00
93447b0e46 docs(bug): 诸葛亮分析报告 Bug #758 2026-06-12 15:34:50 +08:00
2921d4535a docs(bug): 诸葛亮分析报告 Bug #759 2026-06-12 15:14:05 +08:00
b71354d3b6 docs(bug): 诸葛亮分析报告 Bug #760 2026-06-12 15:09:37 +08:00
57a33e0baa docs(bug): 诸葛亮分析报告 Bug #761 2026-06-12 15:05:32 +08:00
759f10d9d0 docs(bug): 诸葛亮分析报告 Bug #762 2026-06-12 15:01:01 +08:00
d8e2c485a4 docs(bug): 诸葛亮分析报告 Bug #762 2026-06-12 14:59:21 +08:00
69e24ba2b4 docs(bug): 诸葛亮分析报告 Bug #757 2026-06-12 14:58:17 +08:00
81f5001601 docs(bug): 诸葛亮分析报告 Bug #759-762 2026-06-12 14:47:52 +08:00
96087d8dac docs(bug): 诸葛亮完整分析报告 Bug #741 (LLM深度分析) 2026-06-12 13:14:29 +08:00
9331dc7525 docs(bug): 诸葛亮分析报告 Bug #741 2026-06-12 13:14:29 +08:00
6372e3c80f docs(bug): 诸葛亮分析报告 Bug #741 2026-06-12 13:14:29 +08:00
615be87c71 docs(bug): 诸葛亮分析报告 Bug #741 2026-06-12 13:14:29 +08:00
c0ab80bd4d docs(bug): 诸葛亮分析报告 Bug #741 2026-06-12 13:14:29 +08:00
772119e320 docs(bug): 诸葛亮分析报告 Bug #698 2026-06-12 13:14:29 +08:00
256791348c docs: 新增代码模块索引表供 LLM 快速定位 2026-06-12 11:15:06 +08:00
Ranyunqiao
a08808b41d bug 588 2026-06-12 11:09:03 +08:00
Ranyunqiao
f407a2a886 700 710 711 713 bug 修复 2026-06-12 10:40:39 +08:00
babd8d0c04 fix(bug): 修复诊疗目录 SysDictData 反序列化错误
根因: commit 68cfa4882 将 Jackson 配置从 Jackson2ObjectMapperBuilderCustomizer
改为直接定义 ObjectMapper bean,导致 Spring Boot 自动配置失效。

修复: 改回 Jackson2ObjectMapperBuilderCustomizer,保留 Spring Boot 默认设置。

同时提交分析报告到 MD/bugs/
2026-06-11 17:32:01 +08:00
1f738c969a feat(orderclosedloop): 优化订单闭环统计数据查询和添加催办提醒功能
- 重构统计查询逻辑,支持按类型、分组和分页查询统计数据
- 添加催办提醒功能,支持对未完成订单进行提醒操作
- 新增多个数据库查询方法,包括按类型、科室、医生分组统计和未关闭警告查询
- 添加前端催办提醒和查看详情功能界面
- 优化临床路径完成和变更接口的查询逻辑,使用条件查询替代ID查询
- 添加分页组件和相关样式配置
2026-06-11 15:57:20 +08:00
3f67753344 fix(doctorstation): 修正页面跳转路径并优化术前讨论管理界面
- 修正住院医生工作站跳转路径从 /inHospital/inpatientDoctor/home 到 /inHospital/inpatientDoctor
- 为术前讨论管理界面添加响应式表格高度计算功能
- 添加窗口大小调整事件监听器以动态更新表格高度
- 优化术前讨论管理界面的CSS样式布局
- 添加 content-card 样式类增强界面显示效果
2026-06-11 15:15:14 +08:00
3e650dd041 perf(utils): 优化字典工具类性能并移除重复依赖
- 在DictUtils中添加类型检查避免不必要的序列化反序列化操作
- 移除pom.xml中的重复jackson-databind依赖配置
- 提升字典数据获取的执行效率
2026-06-11 14:49:42 +08:00
773a485114 refactor(redis): 重构Redis配置以兼容fastjson格式
- 移除Jackson多态类型验证器配置
- 使用FastjsonCompatibleRedisSerializer替代GenericJacksonJsonRedisSerializer
- 添加Primary注解优化Bean注入
- 移除不必要的ValueOperations Bean定义
- 更新限流脚本中的变量名提高可读性
- 在TokenService中添加对多种缓存格式的兼容性支持
- 创建FastjsonCompatibleRedisSerializer类处理不同数据格式的反序列化
- 添加数据库迁移脚本为相关表增加基础字段和删除标识
2026-06-11 14:49:19 +08:00
9675106d4b Merge remote-tracking branch 'origin/develop' into develop 2026-06-11 14:17:01 +08:00
Ranyunqiao
f655f06871 修复缓存报错问题 2026-06-11 13:07:28 +08:00
2c2dbd7542 fix(antibiotic): 修复实体类字段映射和接口路径配置问题
- 修正了AntibioticApproval实体类中的字段名从delFlag改为deleteFlag
- 移除了SysAuditLog实体类中多余的空行
- 为YbDao中的结算明细方法添加了医疗类型参数校验
- 统一了前端API接口路径,移除了healthlink-his前缀
- 更新了麻醉、抗菌药物、CA签名等多个模块的接口调用路径
- 修正了医嘱闭环、危急值管理等页面的API请求地址
2026-06-11 12:02:10 +08:00
8b47a8ab55 fix(common): 修复公共服务返回空值问题并优化查询条件
- 修复 CommonServiceImpl 中返回空集合而非 null 的问题
- 添加新的国际化错误消息用于目录不存在的情况
- 重构门诊挂号查询的时间和状态过滤条件为动态SQL
- 更新支付对账分组字段以包含合同编号
- 调整会诊相关API端点路径和请求方法
- 优化技术工作站退费审批接口路径和参数传递方式
- 重构待处理EMR页面跳转逻辑,移除确认对话框直接跳转住院医生工作站
2026-06-11 10:51:34 +08:00
5ebe6c6333 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	healthlink-his-server/core-common/src/main/java/com/core/common/utils/DictUtils.java
#	healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java
#	healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/mapper/InHospitalRegisterAppMapper.java
2026-06-11 10:06:54 +08:00
65a52e9742 fix(common): 修复字典缓存类型转换异常并优化住院登记查询
- 修复 DictUtils 中的字典缓存获取逻辑,添加类型检查避免 ClassCastException
- 优化住院登记查询接口,增加时间范围和机构ID参数支持
- 修改审核趋势接口,将开始日期参数设为可选
- 更新申请单分页查询接口,使用 ModelAttribute 替代 RequestBody
- 修复住院注册查询方法的参数传递问题
2026-06-11 10:06:05 +08:00
Ranyunqiao
d04be6062b Merge remote-tracking branch 'origin/develop' into develop 2026-06-11 10:05:41 +08:00
Ranyunqiao
defab36cca bug 737 740 2026-06-11 10:05:20 +08:00
681107ca64 fix(#666): 请修复 Bug #666:门诊发药模块无法检索到患者信息
由 AI Agent (guanyu) 自动修复,请查看 diff 确认变更内容。
2026-06-11 09:26:51 +08:00
f75133369a fix(#697): 请修复 Bug #697
由 AI Agent (guanyu) 自动修复,请查看 diff 确认变更内容。
2026-06-11 09:26:51 +08:00
ca812421d2 fix(#665): 请修复 Bug #665
由 AI Agent (guanyu) 自动修复,请查看 diff 确认变更内容。
2026-06-11 09:26:51 +08:00
ae12cb2135 fix(#735): 停嘱医生字段修复(解决 PatientManageMapper 冲突) 2026-06-11 09:26:51 +08:00
d2a1cd6f29 fix(#670): 中医处方煎药方式下拉框数据为空 — 添加 method_of_decocting_medicine 字典加载 2026-06-10 23:55:12 +08:00
d9d2b83c5b docs(agents): 更新AI开发规范文档
- 添加铁律22: 端到端验证必须有实际输出证据
- 添加铁律23: 文件读写强制UTF-8编码规范
- 重写文档头部说明AI工具自动读取规范
- 补充完整的HealthLink-HIS项目概览表格
- 扩展P0和P1铁律章节,包含更多开发约束
- 添加Karpathy编码准则指导原则
- 建立全链路6环分析方法论
- 完善Harness Engineering方法论四层约束
- 增加五层质量门禁检查体系
- 补充系统化调试流程规范
- 添加后端和前端开发详细规范
- 建立Agent角色与协作流水线
- 完善审查与审计体系
- 制定标准工作循环流程
- 添加
2026-06-10 21:17:23 +08:00
e9a8f6eedc fix(#668): 中医处方签发 null key 崩溃修复 — 合并分组过滤 + 多处方号 + 代煎账单循环处理
根因:Collectors.groupingBy() 遇到 null groupId 抛出 NPE 'element cannot be mapped to a null key'
修复:
1. groupingBy 前过滤 null groupId,无 groupId 的处方各自生成处方号
2. 代煎账单改为按处方号循环生成(不同分组可能有不同处方号)
3. 收集所有处方号并使用 IN 查询删除关联代煎账单
2026-06-10 19:27:52 +08:00