Compare commits
1 Commits
9ae9fae2c8
...
1212
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d85686b06 |
493
.aider.conf.yml
493
.aider.conf.yml
@@ -1,493 +0,0 @@
|
||||
# Aider configuration for HealthLink-HIS
|
||||
# Aider 自动读取此文件获取开发规范
|
||||
|
||||
instructions: |
|
||||
# HealthLink-HIS — AI 开发规范(自动加载)
|
||||
|
||||
> 🤖 **本文件供所有 AI 编码工具自动读取**。进入本项目后必须遵守以下规范。
|
||||
>
|
||||
> **模型决定上限,Harness 决定底线。**
|
||||
|
||||
---
|
||||
|
||||
## 一、项目概览
|
||||
|
||||
| 属性 | 值 |
|
||||
|------|------|
|
||||
| 项目名 | HealthLink-HIS(医院信息系统) |
|
||||
| 后端路径 | `healthlink-his-server/` |
|
||||
| 前端路径 | `healthlink-his-ui/` |
|
||||
| 文档路径 | `MD/` |
|
||||
| JDK | 25 (OpenJDK) |
|
||||
| Spring Boot | 4.0.6 |
|
||||
| MyBatis-Plus | 3.5.16 |
|
||||
| Vue | 3.x + Vite + Element Plus |
|
||||
| 数据库 | PostgreSQL 15+ |
|
||||
| 包名 | `com.healthlink.his` |
|
||||
| 后端端口 | 18082 |
|
||||
| 前端端口 | 81 |
|
||||
|
||||
---
|
||||
|
||||
## 二、铁律(必须遵守,违反即失败)
|
||||
|
||||
### 🔴 P0 铁律 — 不可违反
|
||||
|
||||
**铁律1: 修改完必须测试**
|
||||
```
|
||||
后端: mvn clean compile -DskipTests → mvn install -DskipTests → mvn test
|
||||
前端: npm run build:dev → npm run lint
|
||||
```
|
||||
- 白盒:编译通过,无 ERROR
|
||||
- 黑盒:关键接口返回 `{code:200, data:...}`,验证业务逻辑
|
||||
- 冒烟:应用正常启动,核心流程通畅
|
||||
|
||||
**铁律2: Flyway 数据库迁移**
|
||||
- 凡是新建表、新增字段,必须创建 Flyway 迁移脚本
|
||||
- 路径:`healthlink-his-domain/src/main/resources/db/migration/`
|
||||
- 命名:`V{版本号}__{描述}.sql`(双下划线)
|
||||
|
||||
**铁律3: 测试通过后才提交**
|
||||
- 编译 + 测试全部通过后才能 git commit
|
||||
- 不提交未完成的功能、调试代码、临时文件
|
||||
|
||||
**铁律4: 前后端API路径对齐**
|
||||
- 后端前缀:`/healthlink-his/api/v1/`
|
||||
- 前端 `request.js` 的 baseURL 必须与后端匹配
|
||||
|
||||
**铁律5: 状态值一致性(Bug #574 教训)**
|
||||
- 修改任何状态值前,必须先列出完整的状态流转链路
|
||||
- 检查项:枚举定义 → Service 设置 → 查询映射 → 前端 STATUS_CLASS_MAP → 前端 v-if → 统计SQL
|
||||
- 禁止:只改一端不检查其他端
|
||||
|
||||
**铁律6: 禁止删除源文件(Bug #574 教训)**
|
||||
- 绝对禁止删除项目中已有的 Java/Vue/SQL 源文件
|
||||
- 编译错误 → 修复错误;重复文件 → 重构合并
|
||||
- 唯一例外:明确由人类确认删除的文件
|
||||
|
||||
**铁律7: 禁止修改已有公开方法签名**
|
||||
- 不能删除/重命名已有的 public 方法,不能修改参数列表
|
||||
- 需要新功能 → 添加重载方法;需要改行为 → 修改内部实现
|
||||
|
||||
**铁律8: 验证后才宣称完成(Verification Before Completion)**
|
||||
- **没有跑过验证命令,就不能说"完成了""通过了""没问题"**
|
||||
- 禁止使用"应该可以""大概没问题""看起来正确"
|
||||
- 必须:运行命令 → 读取输出 → 确认结果 → 才能宣称
|
||||
- 这是诚实原则,不是效率问题
|
||||
|
||||
|
||||
**铁律9: 开发前必须审核原有代码(P0 — 铁律)**
|
||||
- **任何新功能开发前,必须先搜索项目中是否已有相关代码**
|
||||
- 搜索路径:Controller / AppService / Service / Mapper / Entity / 前端页面 / API接口
|
||||
- 如果已有部分功能 → 在原有代码基础上**升级优化完善**,禁止另起炉灶
|
||||
- 如果已有接口但前端缺失 → 只补前端,不重复建后端
|
||||
- 如果已有前端但后端缺失 → 只补后端,不重写前端
|
||||
- 搜索命令:`rg -l "关键词" healthlink-his-server/ healthlink-his-ui/src/`
|
||||
- 禁止:不看代码就新建模块、重复实现已有功能、废弃原有代码另写一套
|
||||
|
||||
|
||||
**铁律12: 设计文档确认后自主开发(铁律)**
|
||||
- 设计文档(如 `MD/architecture/GRADE3A_GAP_ANALYSIS_AND_DESIGN.md`)一旦确认,后续开发**必须按文档自主执行**
|
||||
- **禁止反复询问"是否继续""下一步做什么""是否开始"**——直接按计划推进
|
||||
- 每完成一个 Sprint,自动提交推送,然后立即开始下一个 Sprint
|
||||
- 只在遇到**无法解决的阻塞**(如技术选型冲突、需求不明确、第三方依赖不可用)时才暂停询问
|
||||
- 设计文档是"**已签合同**",不是"参考意见"。铁律执行优先级:设计文档 > 人类临时指令 > AI 自行判断
|
||||
|
||||
|
||||
### 🟡 P1 铁律 — 强烈建议
|
||||
|
||||
**铁律9: 先分解再行动**
|
||||
- 修改超过3个文件、涉及多模块、数据库变更,必须先制定计划
|
||||
|
||||
**铁律10: 验证后信**
|
||||
- 每次修改后必须验证编译通过,不信记忆
|
||||
|
||||
**铁律13: 文档统一管理**
|
||||
- 所有文档存储在 `MD/` 目录
|
||||
- 文件名:大写英文+下划线(如 `BACKEND_CHECKLIST.md`)
|
||||
- 文档头部必须包含元数据块(文档类型、版本、日期)
|
||||
|
||||
---
|
||||
|
||||
|
||||
**铁律14: 设计文档必须包含UI设计和调用流程**
|
||||
- 所有新模块/页面的设计文档必须包含:UI布局描述、交互效果清单、前后端调用流程
|
||||
- 没有明确UI设计的模块,禁止直接编码
|
||||
- 详见
|
||||
- 设计文档必须写清楚:系统调用关系、方法函数调用关系、完整业务流程
|
||||
- 设计文档中每个用户操作必须对应:前端事件 → API调用 → 后端处理链路 → 返回数据 → UI渲染
|
||||
|
||||
---
|
||||
|
||||
## 三、Karpathy 编码准则
|
||||
|
||||
> 减少 LLM 常见编码错误。偏向谨慎而非速度。
|
||||
|
||||
### 3.1 先想再写
|
||||
- 明确陈述假设,不确定就问
|
||||
- 多种解读时都列出来,不要默默选一种
|
||||
- 有更简单的方案就说出来,该推回就推回
|
||||
- 不清楚的地方停下来,说清楚哪里不清楚
|
||||
|
||||
### 3.2 简洁优先
|
||||
- 不做没要求的功能,不做一次性代码的抽象
|
||||
- 不加没要求的"灵活性"和"可配置性"
|
||||
- 200 行能 50 行搞定就重写
|
||||
- 自问:"高级工程师会不会觉得这过度设计?"
|
||||
|
||||
### 3.3 精准修改
|
||||
- 只改必须改的,不"顺手改进"相邻代码
|
||||
- 匹配现有代码风格,即使你有不同的偏好
|
||||
- 每行改动都能追溯到用户的请求
|
||||
- 只清理你自己改动产生的无用代码
|
||||
|
||||
### 3.4 目标驱动
|
||||
- 把任务转化为可验证目标
|
||||
- 多步任务声明计划:`[步骤] → 验证: [检查]`
|
||||
- 强验收标准让 Agent 能独立循环,弱标准需要持续澄清
|
||||
|
||||
---
|
||||
|
||||
## 四、全链路 6 环分析
|
||||
|
||||
> ⚠️ **涉及数据库字段的 Bug / 需求,必须走完整链路。**
|
||||
|
||||
```
|
||||
前端/页面 → Controller → Service → Mapper → DB/SQL → 关联模块
|
||||
①录入 ②验证 ③业务 ④持久化 ⑤存储 ⑥联动
|
||||
```
|
||||
|
||||
| 环 | 检查内容 |
|
||||
|----|---------|
|
||||
| ① 录入 | 前端有无输入入口(弹窗、表格行编辑、表单) |
|
||||
| ② 验证 | Controller 参数校验、@Valid、权限控制 |
|
||||
| ③ 业务 | Service 业务逻辑、事务边界、多个 Service 实现类入口 |
|
||||
| ④ 持久化 | Mapper XML、DTO 字段映射、类型转换 |
|
||||
| ⑤ 存储 | 数据库表结构、索引、NOT NULL 约束 |
|
||||
| ⑥ 联动 | 上游(医嘱→护士站)、下游(打印、计费、报表)是否同步 |
|
||||
|
||||
**修复后的验证顺序**:
|
||||
1. 数据库:确认状态值已正确写入
|
||||
2. 后端接口:确认返回的状态映射正确
|
||||
3. 前端显示:确认页面显示正确状态文本
|
||||
4. 前端交互:确认按钮/操作基于正确状态启用/禁用
|
||||
5. 统计数据:确认池/报表统计包含新状态
|
||||
|
||||
---
|
||||
|
||||
## 五、Harness Engineering 方法论
|
||||
|
||||
> Harness = 约束 + 反馈 + 控制平面 + 持久执行
|
||||
|
||||
### 5.1 四层约束金字塔
|
||||
|
||||
| 层级 | 内容 | 落地方式 |
|
||||
|------|------|---------|
|
||||
| **L1 架构约束** | 接口合约、包结构、命名规范、禁止模式 | 本文件铁律 |
|
||||
| **L2 代码质量** | 圈复杂度、代码风格、类型提示 | 编译门禁 + ESLint |
|
||||
| **L3 安全约束** | 敏感信息检测、权限检查、输入验证 | 配置不可硬编码 |
|
||||
| **L4 业务规则** | 领域逻辑、数据一致性、事务边界 | 全链路 6 环验证 |
|
||||
|
||||
**约束设计原则**:
|
||||
- **可验证**:每条约束必须能被自动化检查("覆盖率>90%"✅ "质量要高"❌)
|
||||
- **无歧义**:"每函数不超过50行"✅ "函数不要太长"❌
|
||||
- **优先级**:安全(1) > 架构(2) > 业务(3) > 质量(4) > 性能(5)
|
||||
- **渐进增强**:L1编译通过 → L2+命名规范 → L3+测试覆盖 → L4+安全扫描
|
||||
|
||||
### 5.2 三层反馈系统
|
||||
|
||||
| 层级 | 速度 | 覆盖范围 | 失败处理 |
|
||||
|------|------|---------|---------|
|
||||
| **L1 编译检查** | <30秒 | 语法、类型、签名 | 立即阻断,自行修复 |
|
||||
| **L2 数据流验证** | <5分钟 | 全链路字段、Mapper XML、DTO | 修复后上报 |
|
||||
| **L3 人工审查** | 10-30分钟 | 架构、设计、业务正确性 | 驳回/指导/批准 |
|
||||
|
||||
**反馈铁律**:
|
||||
- 反馈必须可行动(文件 + 行号 + 错误类型 + 修复方向)
|
||||
- 失败后先回滚到最近检查点,再重试
|
||||
- 持续失败3次 → 上报人类
|
||||
|
||||
### 5.3 控制平面
|
||||
|
||||
```
|
||||
战略层(人类) → 设定目标、审批决策、异常升级
|
||||
战术层(Agent) → 任务分解、update_plan、依赖协调、检查点保存
|
||||
执行层(Agent) → 代码生成、测试执行、错误恢复、幂等重试
|
||||
```
|
||||
|
||||
### 5.4 持久执行
|
||||
|
||||
- 每个关键步骤保存检查点(`update_plan` 进度)
|
||||
- 失败后从最新检查点恢复,不从头开始
|
||||
- 幂等设计:同一操作重复执行结果一致
|
||||
- **三层状态管理**:系统层(工作流ID/超时/重试) → 执行层(当前活动/进度) → 业务层(已完成工作/中间产物)
|
||||
|
||||
---
|
||||
|
||||
## 六、五层质量门禁
|
||||
|
||||
| 门禁 | 时间 | 范围 | 失败处理 |
|
||||
|------|------|------|---------|
|
||||
| **L1 编译检查** | <30秒 | 语法、类型、导入 | Agent 自行修复 |
|
||||
| **L2 静态分析** | <2分钟 | 代码风格、复杂度、安全 | Agent 修复 |
|
||||
| **L3 单元测试** | <5分钟 | 功能正确性、边界条件 | 自动修复或上报 |
|
||||
| **L4 集成测试** | <15分钟 | 模块间交互、数据流 | 上报人工 |
|
||||
| **L5 生产验证** | 持续 | 监控、告警、性能 | 自动回滚 |
|
||||
|
||||
**提交铁律**:L1-L2 必须通过才能 commit,L3(如有DB变更)必须通过才能 push
|
||||
|
||||
---
|
||||
|
||||
## 七、系统化调试(Systematic Debugging)
|
||||
|
||||
> **铁律:没有根因调查,不能提出修复方案。**
|
||||
|
||||
### 四阶段流程
|
||||
|
||||
**阶段1:根因调查**(修复前必须完成)
|
||||
1. 仔细阅读错误信息(堆栈、行号、错误码)
|
||||
2. 稳定复现(能否可靠触发?步骤?每次?)
|
||||
3. 检查最近变更(git diff、新依赖、配置变更)
|
||||
4. 多组件系统:在每个组件边界加诊断日志,定位哪一层断裂
|
||||
5. 追踪数据流:坏值从哪里来?谁调用的?一直追溯到源头
|
||||
|
||||
**阶段2:模式分析**
|
||||
- 找到同代码库中类似的正常工作代码
|
||||
- 逐项对比差异
|
||||
- 理解依赖关系
|
||||
|
||||
**阶段3:假设与测试**
|
||||
- 形成单一假设:"我认为X是根因,因为Y"
|
||||
- 做最小改动测试
|
||||
- 有效 → 阶段4;无效 → 新假设
|
||||
|
||||
**阶段4:实施**
|
||||
- 创建失败测试用例
|
||||
- 修复根因(不是症状)
|
||||
- 验证修复
|
||||
|
||||
---
|
||||
|
||||
## 八、后端开发规范
|
||||
|
||||
### 分层架构
|
||||
```
|
||||
Controller → AppService → Service → Mapper → Entity
|
||||
```
|
||||
|
||||
### 命名规范
|
||||
| 类型 | 规则 | 示例 |
|
||||
|------|------|------|
|
||||
| Controller | `XxxController` | `RegistrationController` |
|
||||
| AppService | `IXxxAppService` / `XxxAppServiceImpl` | `IRegistrationAppService` |
|
||||
| Service | `IXxxService` / `XxxServiceImpl` | `IRegistrationService` |
|
||||
| Mapper | `XxxMapper` | `RegistrationMapper` |
|
||||
| Entity | `Xxx` | `Registration` |
|
||||
| DTO | `XxxDto` / `XxxQueryDto` | `RegistrationDto` |
|
||||
|
||||
### 包结构
|
||||
```
|
||||
com.healthlink.his.web.{module}.controller
|
||||
com.healthlink.his.web.{module}.appservice
|
||||
com.healthlink.his.web.{module}.service
|
||||
com.healthlink.his.web.{module}.mapper
|
||||
com.healthlink.his.web.{module}.dto
|
||||
com.healthlink.his.domain.{module}
|
||||
com.healthlink.his.common.enums
|
||||
```
|
||||
|
||||
### 关键约束
|
||||
- 所有查询使用 `LambdaQueryWrapper`,禁止字符串拼接 SQL
|
||||
- `@Transactional(rollbackFor = Exception.class)` 管理事务
|
||||
- 所有接口标注 `@PreAuthorize` 权限控制
|
||||
- 患者敏感信息在日志中脱敏
|
||||
- **扩展功能不修改原有函数签名**
|
||||
|
||||
---
|
||||
|
||||
## 九、前端开发规范
|
||||
|
||||
### 技术栈
|
||||
- Vue 3 + Vite + Element Plus + Pinia + Axios(基于 RuoYi-Vue3)
|
||||
|
||||
### 目录结构
|
||||
```
|
||||
src/api/{module}/ # API接口
|
||||
src/views/{module}/ # 页面组件
|
||||
src/store/modules/ # Pinia状态管理
|
||||
src/components/ # 公共组件
|
||||
```
|
||||
|
||||
### 关键约束
|
||||
- API前缀:`/healthlink-his/api/v1/`
|
||||
- 路由懒加载:`() => import('@/views/xxx/index.vue')`
|
||||
- 页面使用 `<script setup>` 语法
|
||||
- 按钮权限使用 `v-hasPermi` 指令
|
||||
- `onMounted` 中注册的事件在 `onUnmounted` 中移除
|
||||
|
||||
---
|
||||
|
||||
## 十、Agent 体系
|
||||
|
||||
### 角色与路由
|
||||
|
||||
| 代号 | 名称 | 角色 | 路由关键词 |
|
||||
|------|------|------|-----------|
|
||||
| liubei | 刘备 | 项目经理 | 协调、分派、异常升级 |
|
||||
| zhugeliang | 诸葛亮 | 架构师 | 分析、路由、设计 |
|
||||
| guanyu | 关羽 | 后端开发 | java, api, spring, service, controller |
|
||||
| zhaoyun | 赵云 | 前端开发 | vue, 界面, 显示, 弹窗, 按钮 |
|
||||
| xunyu | 荀彧 | DBA | 数据库, sql, 迁移, mapper xml |
|
||||
| zhangfei | 张飞 | 测试 | 测试, QA, 回归 |
|
||||
| huatuo | 华佗 | 验收 | 需求验收、质量确认 |
|
||||
| chenlin | 陈琳 | 文档 | 文档、归档、Git提交 |
|
||||
|
||||
### 协作流水线
|
||||
|
||||
```
|
||||
刘备(协调) → 诸葛亮(分析路由) → {关羽|赵云}(修复) → 荀彧(DB审查) → 张飞(测试) → 华佗(验收) → 陈琳(归档)
|
||||
```
|
||||
|
||||
### Bug 修复完整管线(BDT 方法论)
|
||||
|
||||
```
|
||||
获取Bug → 设计测试用例 → 基线测试(应失败) → 全链路修复 → 回归测试(应通过) → 扩展测试(无回归) → 提交
|
||||
```
|
||||
|
||||
### Bug 状态管理铁律
|
||||
- 人类提的 Bug:只加备注,不改状态,不改分配
|
||||
- 智能体提的 Bug:可以改分配和加备注
|
||||
- 已关闭/已解决的 Bug 不再处理
|
||||
|
||||
---
|
||||
|
||||
## 十一、审查与审计
|
||||
|
||||
### 三层审查体系
|
||||
|
||||
| 层级 | 内容 | 时机 |
|
||||
|------|------|------|
|
||||
| **L1 自审** | Agent 对照约束逐条检查 | 每次提交前 |
|
||||
| **L2 配对审查** | Agent 生成变更摘要,人类终审 | PR/提交时 |
|
||||
| **L3 合规审查** | 审计追踪,记录所有 AI 操作 | 持续 |
|
||||
|
||||
### L1 自审清单
|
||||
```yaml
|
||||
self_review:
|
||||
- "所有修改能通过编译?"
|
||||
- "遵守命名规范?"
|
||||
- "测试覆盖达标?"
|
||||
- "没有遗漏的 TODO / DEBUG?"
|
||||
- "变更范围没超出任务边界?"
|
||||
```
|
||||
|
||||
### 评审评分维度
|
||||
| 维度 | 问题 |
|
||||
|------|------|
|
||||
| 正确性 | 行为是否符合目标功能? |
|
||||
| 验证 | 检查是否真的跑过并留下证据? |
|
||||
| 范围纪律 | 是否保持在选定功能范围内? |
|
||||
| 可靠性 | 结果能否在重启后继续工作? |
|
||||
| 可维护性 | 代码和文档是否清楚到可交接? |
|
||||
|
||||
---
|
||||
|
||||
## 十二、标准工作循环
|
||||
|
||||
```
|
||||
开始会话
|
||||
├→ 1. Init — 读 AGENTS.md + PROGRESS.md + git log
|
||||
├→ 2. Select — 只选一个未完成功能
|
||||
├→ 3. Implement — 一次只做一个,不扩大范围
|
||||
├→ 4. Verify — 运行验证命令,有证据才标记完成
|
||||
└→ 5. Cleanup — 更新进度 + clean-state-checklist + git commit
|
||||
```
|
||||
|
||||
### 会话结束前必须运行 Clean State Checklist
|
||||
```
|
||||
□ 标准启动路径仍然可用
|
||||
□ 标准验证路径仍然可运行
|
||||
□ 当前进度已记录到进度日志
|
||||
□ 无半成品步骤处于未记录状态
|
||||
□ 下一轮会话无需人工修复即可继续
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十三、开发流程
|
||||
|
||||
```
|
||||
收到任务
|
||||
├→ ① 分析需求 → 读相关文档(MD/)、读全链路6环
|
||||
├→ ② 制定计划 → update_plan (3-6个阶段)
|
||||
├→ ③ 后端开发 → Controller → AppService → Service → Mapper → Entity → Flyway
|
||||
├→ ④ 后端测试 → mvn test → 接口测试(业务逻辑验证)
|
||||
├→ ⑤ 前端开发 → API接口 → 页面组件 → 路由配置
|
||||
├→ ⑥ 前端测试 → npm run build:dev → 功能验证
|
||||
├→ ⑦ 质量门禁 → L1编译 → L2测试 → L3DB审查 → L4验收 → L5归档
|
||||
└→ ⑧ 提交代码 → git commit(规范格式) → git push → 文档更新
|
||||
```
|
||||
|
||||
### Git Commit 格式
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
type: feat|fix|docs|refactor|test|chore
|
||||
scope: 模块名(如 registration, billing, pharmacy)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十四、快速参考命令
|
||||
|
||||
```bash
|
||||
# === 后端 ===
|
||||
export JAVA_HOME=/opt/jdk-25
|
||||
mvn clean compile -DskipTests # 编译
|
||||
mvn install -DskipTests # 构建
|
||||
mvn test -pl healthlink-his-application -Dtest="XxxTest" -Dsurefire.failIfNoSpecifiedTests=false
|
||||
|
||||
# === 前端 ===
|
||||
cd healthlink-his-ui
|
||||
npm run dev && npm run build:dev && npm run lint && npm run test:run
|
||||
|
||||
# === Git ===
|
||||
git status && git add -A && git commit -m "feat(module): desc" && git push origin develop
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十五、详细规范文档索引
|
||||
|
||||
| 文档 | 路径 | 用途 |
|
||||
|------|------|------|
|
||||
| 执行铁律 | `MD/specs/IRON_RULES.md` | 铁律完整版 |
|
||||
| 后端规范 | `MD/specs/BACKEND_DEVELOPMENT_STANDARD.md` | 后端编码标准 |
|
||||
| 前端规范 | `MD/specs/FRONTEND_DEVELOPMENT_STANDARD.md` | 前端编码标准 |
|
||||
| Harness方法论 | `MD/specs/HARNESS_ENGINEERING.md` | 完整Harness+Agent方法论 |
|
||||
| 文档规范 | `MD/DOCUMENTATION_STANDARD.md` | 文档管理标准 |
|
||||
| 后端清单 | `MD/specs/BACKEND_CHECKLIST.md` | 发布前检查 |
|
||||
| 前端清单 | `MD/specs/FRONTEND_CHECKLIST.md` | 发布前检查 |
|
||||
| 三甲标准 | `MD/standards/GRADE3A_HIS_STANDARD.md` | 三甲医院达标标准 |
|
||||
| Flyway指南 | `MD/guides/FLYWAY_USAGE_GUIDE.md` | 数据库迁移指南 |
|
||||
|
||||
---
|
||||
|
||||
## 十六、过往教训
|
||||
|
||||
| 教训 | 内容 |
|
||||
|------|------|
|
||||
| 状态链路断裂 | Bug#574: 签到设 BOOKED(1) 而非 CHECKED_IN(3),前端映射缺失 → 必须走完整状态链路 |
|
||||
| 盲删源文件 | AI 看到编译错误直接删文件,没检查 baseline → 必须先确认文件来源 |
|
||||
| 修复方向偏差 | 多次 fallback 改的是错误的 Service → 必须用 rg 搜索所有相关代码路径 |
|
||||
| bug_reports 缺列 | INSERT 静默失败 → 必须检查表结构 |
|
||||
| 禅道 comment API | API 不存在,用 resolve+activate workaround |
|
||||
| SQLite WAL 并发 | 多进程并发写需要 checkpoint |
|
||||
| UTF-8 切片 | 多字节字符不能用 byte index 切片 |
|
||||
| 上下文焦虑 | Agent 感觉上下文快满时会匆忙结束,跳过验证 → 注意 context 40% 阈值 |
|
||||
| 过早宣告胜利 | 自评≠验证,分开"干活"和"检查" |
|
||||
| 覆盖率幻觉 | 覆盖率达标但逻辑没测 → 引入变异测试 |
|
||||
|
||||
---
|
||||
|
||||
> ⚠️ 本文件是 AI 开发规范的唯一信源。各工具配置文件由 `bash scripts/sync-ai-rules.sh` 同步。
|
||||
509
.clinerules
509
.clinerules
@@ -1,509 +0,0 @@
|
||||
# HealthLink-HIS — AI 开发规范 (Cline)
|
||||
|
||||
> 🤖 Cline 打开本项目时自动加载此文件。
|
||||
|
||||
---
|
||||
|
||||
# HealthLink-HIS — AI 开发规范(自动加载)
|
||||
|
||||
> 🤖 **本文件供所有 AI 编码工具自动读取**。进入本项目后必须遵守以下规范。
|
||||
>
|
||||
> **模型决定上限,Harness 决定底线。**
|
||||
|
||||
---
|
||||
|
||||
## 一、项目概览
|
||||
|
||||
| 属性 | 值 |
|
||||
|------|------|
|
||||
| 项目名 | HealthLink-HIS(医院信息系统) |
|
||||
| 后端路径 | `healthlink-his-server/` |
|
||||
| 前端路径 | `healthlink-his-ui/` |
|
||||
| 文档路径 | `MD/` |
|
||||
| JDK | 25 (OpenJDK) |
|
||||
| Spring Boot | 4.0.6 |
|
||||
| MyBatis-Plus | 3.5.16 |
|
||||
| Vue | 3.x + Vite + Element Plus |
|
||||
| 数据库 | PostgreSQL 15+ |
|
||||
| 包名 | `com.healthlink.his` |
|
||||
| 后端端口 | 18082 |
|
||||
| 前端端口 | 81 |
|
||||
|
||||
---
|
||||
|
||||
## 二、铁律(必须遵守,违反即失败)
|
||||
|
||||
### 🔴 P0 铁律 — 不可违反
|
||||
|
||||
**铁律1: 修改完必须测试**
|
||||
```
|
||||
后端: mvn clean compile -DskipTests → mvn install -DskipTests → mvn test
|
||||
前端: npm run build:dev → npm run lint
|
||||
```
|
||||
- 白盒:编译通过,无 ERROR
|
||||
- 黑盒:关键接口返回 `{code:200, data:...}`,验证业务逻辑
|
||||
- 冒烟:应用正常启动,核心流程通畅
|
||||
|
||||
**铁律2: Flyway 数据库迁移**
|
||||
- 凡是新建表、新增字段,必须创建 Flyway 迁移脚本
|
||||
- 路径:`healthlink-his-domain/src/main/resources/db/migration/`
|
||||
- 命名:`V{版本号}__{描述}.sql`(双下划线)
|
||||
|
||||
**铁律3: 测试通过后才提交**
|
||||
- 编译 + 测试全部通过后才能 git commit
|
||||
- 不提交未完成的功能、调试代码、临时文件
|
||||
|
||||
**铁律4: 前后端API路径对齐**
|
||||
- 后端前缀:`/healthlink-his/api/v1/`
|
||||
- 前端 `request.js` 的 baseURL 必须与后端匹配
|
||||
|
||||
**铁律5: 状态值一致性(Bug #574 教训)**
|
||||
- 修改任何状态值前,必须先列出完整的状态流转链路
|
||||
- 检查项:枚举定义 → Service 设置 → 查询映射 → 前端 STATUS_CLASS_MAP → 前端 v-if → 统计SQL
|
||||
- 禁止:只改一端不检查其他端
|
||||
|
||||
**铁律6: 禁止删除源文件(Bug #574 教训)**
|
||||
- 绝对禁止删除项目中已有的 Java/Vue/SQL 源文件
|
||||
- 编译错误 → 修复错误;重复文件 → 重构合并
|
||||
- 唯一例外:明确由人类确认删除的文件
|
||||
|
||||
**铁律7: 禁止修改已有公开方法签名**
|
||||
- 不能删除/重命名已有的 public 方法,不能修改参数列表
|
||||
- 需要新功能 → 添加重载方法;需要改行为 → 修改内部实现
|
||||
|
||||
**铁律8: 验证后才宣称完成(Verification Before Completion)**
|
||||
- **没有跑过验证命令,就不能说"完成了""通过了""没问题"**
|
||||
- 禁止使用"应该可以""大概没问题""看起来正确"
|
||||
- 必须:运行命令 → 读取输出 → 确认结果 → 才能宣称
|
||||
- 这是诚实原则,不是效率问题
|
||||
|
||||
|
||||
**铁律9: 开发前必须审核原有代码(P0 — 铁律)**
|
||||
- **任何新功能开发前,必须先搜索项目中是否已有相关代码**
|
||||
- 搜索路径:Controller / AppService / Service / Mapper / Entity / 前端页面 / API接口
|
||||
- 如果已有部分功能 → 在原有代码基础上**升级优化完善**,禁止另起炉灶
|
||||
- 如果已有接口但前端缺失 → 只补前端,不重复建后端
|
||||
- 如果已有前端但后端缺失 → 只补后端,不重写前端
|
||||
- 搜索命令:`rg -l "关键词" healthlink-his-server/ healthlink-his-ui/src/`
|
||||
- 禁止:不看代码就新建模块、重复实现已有功能、废弃原有代码另写一套
|
||||
|
||||
|
||||
**铁律12: 设计文档确认后自主开发(铁律)**
|
||||
- 设计文档(如 `MD/architecture/GRADE3A_GAP_ANALYSIS_AND_DESIGN.md`)一旦确认,后续开发**必须按文档自主执行**
|
||||
- **禁止反复询问"是否继续""下一步做什么""是否开始"**——直接按计划推进
|
||||
- 每完成一个 Sprint,自动提交推送,然后立即开始下一个 Sprint
|
||||
- 只在遇到**无法解决的阻塞**(如技术选型冲突、需求不明确、第三方依赖不可用)时才暂停询问
|
||||
- 设计文档是"**已签合同**",不是"参考意见"。铁律执行优先级:设计文档 > 人类临时指令 > AI 自行判断
|
||||
|
||||
**铁律18: 禁止破坏原有功能(P0绝对铁律)**
|
||||
- **完善增加功能和流程时,绝对不能破坏或者让原有功能不能用**
|
||||
- 修改已有实体前必须对比原始文件(`git show HEAD~N:./file.java`),保留所有原有字段和方法
|
||||
- 新增字段只能追加,不能删除或重命名已有字段
|
||||
- SQL迁移只允许 `ALTER TABLE ADD COLUMN`,不允许 `DROP COLUMN` 或 `RENAME COLUMN`
|
||||
- Controller新端点不能修改已有端点的路径或参数
|
||||
- 前端新页面不能修改已有页面的组件结构
|
||||
- 每次修改后必须 `mvn clean compile -DskipTests` 验证
|
||||
- **违规判定**: 因修改导致原有代码编译失败或运行报错,视为违反铁律18,必须立即回滚修复
|
||||
|
||||
|
||||
### 🟡 P1 铁律 — 强烈建议
|
||||
|
||||
**铁律9: 先分解再行动**
|
||||
- 修改超过3个文件、涉及多模块、数据库变更,必须先制定计划
|
||||
|
||||
**铁律10: 验证后信**
|
||||
- 每次修改后必须验证编译通过,不信记忆
|
||||
|
||||
**铁律13: 文档统一管理**
|
||||
- 所有文档存储在 `MD/` 目录
|
||||
- 文件名:大写英文+下划线(如 `BACKEND_CHECKLIST.md`)
|
||||
- 文档头部必须包含元数据块(文档类型、版本、日期)
|
||||
|
||||
---
|
||||
|
||||
|
||||
**铁律14: 设计文档必须包含UI设计和调用流程**
|
||||
- 所有新模块/页面的设计文档必须包含:UI布局描述、交互效果清单、前后端调用流程
|
||||
- 没有明确UI设计的模块,禁止直接编码
|
||||
- 详见
|
||||
- 设计文档必须写清楚:系统调用关系、方法函数调用关系、完整业务流程
|
||||
- 设计文档中每个用户操作必须对应:前端事件 → API调用 → 后端处理链路 → 返回数据 → UI渲染
|
||||
|
||||
---
|
||||
|
||||
## 三、Karpathy 编码准则
|
||||
|
||||
> 减少 LLM 常见编码错误。偏向谨慎而非速度。
|
||||
|
||||
### 3.1 先想再写
|
||||
- 明确陈述假设,不确定就问
|
||||
- 多种解读时都列出来,不要默默选一种
|
||||
- 有更简单的方案就说出来,该推回就推回
|
||||
- 不清楚的地方停下来,说清楚哪里不清楚
|
||||
|
||||
### 3.2 简洁优先
|
||||
- 不做没要求的功能,不做一次性代码的抽象
|
||||
- 不加没要求的"灵活性"和"可配置性"
|
||||
- 200 行能 50 行搞定就重写
|
||||
- 自问:"高级工程师会不会觉得这过度设计?"
|
||||
|
||||
### 3.3 精准修改
|
||||
- 只改必须改的,不"顺手改进"相邻代码
|
||||
- 匹配现有代码风格,即使你有不同的偏好
|
||||
- 每行改动都能追溯到用户的请求
|
||||
- 只清理你自己改动产生的无用代码
|
||||
|
||||
### 3.4 目标驱动
|
||||
- 把任务转化为可验证目标
|
||||
- 多步任务声明计划:`[步骤] → 验证: [检查]`
|
||||
- 强验收标准让 Agent 能独立循环,弱标准需要持续澄清
|
||||
|
||||
---
|
||||
|
||||
## 四、全链路 6 环分析
|
||||
|
||||
> ⚠️ **涉及数据库字段的 Bug / 需求,必须走完整链路。**
|
||||
|
||||
```
|
||||
前端/页面 → Controller → Service → Mapper → DB/SQL → 关联模块
|
||||
①录入 ②验证 ③业务 ④持久化 ⑤存储 ⑥联动
|
||||
```
|
||||
|
||||
| 环 | 检查内容 |
|
||||
|----|---------|
|
||||
| ① 录入 | 前端有无输入入口(弹窗、表格行编辑、表单) |
|
||||
| ② 验证 | Controller 参数校验、@Valid、权限控制 |
|
||||
| ③ 业务 | Service 业务逻辑、事务边界、多个 Service 实现类入口 |
|
||||
| ④ 持久化 | Mapper XML、DTO 字段映射、类型转换 |
|
||||
| ⑤ 存储 | 数据库表结构、索引、NOT NULL 约束 |
|
||||
| ⑥ 联动 | 上游(医嘱→护士站)、下游(打印、计费、报表)是否同步 |
|
||||
|
||||
**修复后的验证顺序**:
|
||||
1. 数据库:确认状态值已正确写入
|
||||
2. 后端接口:确认返回的状态映射正确
|
||||
3. 前端显示:确认页面显示正确状态文本
|
||||
4. 前端交互:确认按钮/操作基于正确状态启用/禁用
|
||||
5. 统计数据:确认池/报表统计包含新状态
|
||||
|
||||
---
|
||||
|
||||
## 五、Harness Engineering 方法论
|
||||
|
||||
> Harness = 约束 + 反馈 + 控制平面 + 持久执行
|
||||
|
||||
### 5.1 四层约束金字塔
|
||||
|
||||
| 层级 | 内容 | 落地方式 |
|
||||
|------|------|---------|
|
||||
| **L1 架构约束** | 接口合约、包结构、命名规范、禁止模式 | 本文件铁律 |
|
||||
| **L2 代码质量** | 圈复杂度、代码风格、类型提示 | 编译门禁 + ESLint |
|
||||
| **L3 安全约束** | 敏感信息检测、权限检查、输入验证 | 配置不可硬编码 |
|
||||
| **L4 业务规则** | 领域逻辑、数据一致性、事务边界 | 全链路 6 环验证 |
|
||||
|
||||
**约束设计原则**:
|
||||
- **可验证**:每条约束必须能被自动化检查("覆盖率>90%"✅ "质量要高"❌)
|
||||
- **无歧义**:"每函数不超过50行"✅ "函数不要太长"❌
|
||||
- **优先级**:安全(1) > 架构(2) > 业务(3) > 质量(4) > 性能(5)
|
||||
- **渐进增强**:L1编译通过 → L2+命名规范 → L3+测试覆盖 → L4+安全扫描
|
||||
|
||||
### 5.2 三层反馈系统
|
||||
|
||||
| 层级 | 速度 | 覆盖范围 | 失败处理 |
|
||||
|------|------|---------|---------|
|
||||
| **L1 编译检查** | <30秒 | 语法、类型、签名 | 立即阻断,自行修复 |
|
||||
| **L2 数据流验证** | <5分钟 | 全链路字段、Mapper XML、DTO | 修复后上报 |
|
||||
| **L3 人工审查** | 10-30分钟 | 架构、设计、业务正确性 | 驳回/指导/批准 |
|
||||
|
||||
**反馈铁律**:
|
||||
- 反馈必须可行动(文件 + 行号 + 错误类型 + 修复方向)
|
||||
- 失败后先回滚到最近检查点,再重试
|
||||
- 持续失败3次 → 上报人类
|
||||
|
||||
### 5.3 控制平面
|
||||
|
||||
```
|
||||
战略层(人类) → 设定目标、审批决策、异常升级
|
||||
战术层(Agent) → 任务分解、update_plan、依赖协调、检查点保存
|
||||
执行层(Agent) → 代码生成、测试执行、错误恢复、幂等重试
|
||||
```
|
||||
|
||||
### 5.4 持久执行
|
||||
|
||||
- 每个关键步骤保存检查点(`update_plan` 进度)
|
||||
- 失败后从最新检查点恢复,不从头开始
|
||||
- 幂等设计:同一操作重复执行结果一致
|
||||
- **三层状态管理**:系统层(工作流ID/超时/重试) → 执行层(当前活动/进度) → 业务层(已完成工作/中间产物)
|
||||
|
||||
---
|
||||
|
||||
## 六、五层质量门禁
|
||||
|
||||
| 门禁 | 时间 | 范围 | 失败处理 |
|
||||
|------|------|------|---------|
|
||||
| **L1 编译检查** | <30秒 | 语法、类型、导入 | Agent 自行修复 |
|
||||
| **L2 静态分析** | <2分钟 | 代码风格、复杂度、安全 | Agent 修复 |
|
||||
| **L3 单元测试** | <5分钟 | 功能正确性、边界条件 | 自动修复或上报 |
|
||||
| **L4 集成测试** | <15分钟 | 模块间交互、数据流 | 上报人工 |
|
||||
| **L5 生产验证** | 持续 | 监控、告警、性能 | 自动回滚 |
|
||||
|
||||
**提交铁律**:L1-L2 必须通过才能 commit,L3(如有DB变更)必须通过才能 push
|
||||
|
||||
---
|
||||
|
||||
## 七、系统化调试(Systematic Debugging)
|
||||
|
||||
> **铁律:没有根因调查,不能提出修复方案。**
|
||||
|
||||
### 四阶段流程
|
||||
|
||||
**阶段1:根因调查**(修复前必须完成)
|
||||
1. 仔细阅读错误信息(堆栈、行号、错误码)
|
||||
2. 稳定复现(能否可靠触发?步骤?每次?)
|
||||
3. 检查最近变更(git diff、新依赖、配置变更)
|
||||
4. 多组件系统:在每个组件边界加诊断日志,定位哪一层断裂
|
||||
5. 追踪数据流:坏值从哪里来?谁调用的?一直追溯到源头
|
||||
|
||||
**阶段2:模式分析**
|
||||
- 找到同代码库中类似的正常工作代码
|
||||
- 逐项对比差异
|
||||
- 理解依赖关系
|
||||
|
||||
**阶段3:假设与测试**
|
||||
- 形成单一假设:"我认为X是根因,因为Y"
|
||||
- 做最小改动测试
|
||||
- 有效 → 阶段4;无效 → 新假设
|
||||
|
||||
**阶段4:实施**
|
||||
- 创建失败测试用例
|
||||
- 修复根因(不是症状)
|
||||
- 验证修复
|
||||
|
||||
---
|
||||
|
||||
## 八、后端开发规范
|
||||
|
||||
### 分层架构
|
||||
```
|
||||
Controller → AppService → Service → Mapper → Entity
|
||||
```
|
||||
|
||||
### 命名规范
|
||||
| 类型 | 规则 | 示例 |
|
||||
|------|------|------|
|
||||
| Controller | `XxxController` | `RegistrationController` |
|
||||
| AppService | `IXxxAppService` / `XxxAppServiceImpl` | `IRegistrationAppService` |
|
||||
| Service | `IXxxService` / `XxxServiceImpl` | `IRegistrationService` |
|
||||
| Mapper | `XxxMapper` | `RegistrationMapper` |
|
||||
| Entity | `Xxx` | `Registration` |
|
||||
| DTO | `XxxDto` / `XxxQueryDto` | `RegistrationDto` |
|
||||
|
||||
### 包结构
|
||||
```
|
||||
com.healthlink.his.web.{module}.controller
|
||||
com.healthlink.his.web.{module}.appservice
|
||||
com.healthlink.his.web.{module}.service
|
||||
com.healthlink.his.web.{module}.mapper
|
||||
com.healthlink.his.web.{module}.dto
|
||||
com.healthlink.his.domain.{module}
|
||||
com.healthlink.his.common.enums
|
||||
```
|
||||
|
||||
### 关键约束
|
||||
- 所有查询使用 `LambdaQueryWrapper`,禁止字符串拼接 SQL
|
||||
- `@Transactional(rollbackFor = Exception.class)` 管理事务
|
||||
- 所有接口标注 `@PreAuthorize` 权限控制
|
||||
- 患者敏感信息在日志中脱敏
|
||||
- **扩展功能不修改原有函数签名**
|
||||
|
||||
---
|
||||
|
||||
## 九、前端开发规范
|
||||
|
||||
### 技术栈
|
||||
- Vue 3 + Vite + Element Plus + Pinia + Axios(基于 RuoYi-Vue3)
|
||||
|
||||
### 目录结构
|
||||
```
|
||||
src/api/{module}/ # API接口
|
||||
src/views/{module}/ # 页面组件
|
||||
src/store/modules/ # Pinia状态管理
|
||||
src/components/ # 公共组件
|
||||
```
|
||||
|
||||
### 关键约束
|
||||
- API前缀:`/healthlink-his/api/v1/`
|
||||
- 路由懒加载:`() => import('@/views/xxx/index.vue')`
|
||||
- 页面使用 `<script setup>` 语法
|
||||
- 按钮权限使用 `v-hasPermi` 指令
|
||||
- `onMounted` 中注册的事件在 `onUnmounted` 中移除
|
||||
|
||||
---
|
||||
|
||||
## 十、Agent 体系
|
||||
|
||||
### 角色与路由
|
||||
|
||||
| 代号 | 名称 | 角色 | 路由关键词 |
|
||||
|------|------|------|-----------|
|
||||
| liubei | 刘备 | 项目经理 | 协调、分派、异常升级 |
|
||||
| zhugeliang | 诸葛亮 | 架构师 | 分析、路由、设计 |
|
||||
| guanyu | 关羽 | 后端开发 | java, api, spring, service, controller |
|
||||
| zhaoyun | 赵云 | 前端开发 | vue, 界面, 显示, 弹窗, 按钮 |
|
||||
| xunyu | 荀彧 | DBA | 数据库, sql, 迁移, mapper xml |
|
||||
| zhangfei | 张飞 | 测试 | 测试, QA, 回归 |
|
||||
| huatuo | 华佗 | 验收 | 需求验收、质量确认 |
|
||||
| chenlin | 陈琳 | 文档 | 文档、归档、Git提交 |
|
||||
|
||||
### 协作流水线
|
||||
|
||||
```
|
||||
刘备(协调) → 诸葛亮(分析路由) → {关羽|赵云}(修复) → 荀彧(DB审查) → 张飞(测试) → 华佗(验收) → 陈琳(归档)
|
||||
```
|
||||
|
||||
### Bug 修复完整管线(BDT 方法论)
|
||||
|
||||
```
|
||||
获取Bug → 设计测试用例 → 基线测试(应失败) → 全链路修复 → 回归测试(应通过) → 扩展测试(无回归) → 提交
|
||||
```
|
||||
|
||||
### Bug 状态管理铁律
|
||||
- 人类提的 Bug:只加备注,不改状态,不改分配
|
||||
- 智能体提的 Bug:可以改分配和加备注
|
||||
- 已关闭/已解决的 Bug 不再处理
|
||||
|
||||
---
|
||||
|
||||
## 十一、审查与审计
|
||||
|
||||
### 三层审查体系
|
||||
|
||||
| 层级 | 内容 | 时机 |
|
||||
|------|------|------|
|
||||
| **L1 自审** | Agent 对照约束逐条检查 | 每次提交前 |
|
||||
| **L2 配对审查** | Agent 生成变更摘要,人类终审 | PR/提交时 |
|
||||
| **L3 合规审查** | 审计追踪,记录所有 AI 操作 | 持续 |
|
||||
|
||||
### L1 自审清单
|
||||
```yaml
|
||||
self_review:
|
||||
- "所有修改能通过编译?"
|
||||
- "遵守命名规范?"
|
||||
- "测试覆盖达标?"
|
||||
- "没有遗漏的 TODO / DEBUG?"
|
||||
- "变更范围没超出任务边界?"
|
||||
```
|
||||
|
||||
### 评审评分维度
|
||||
| 维度 | 问题 |
|
||||
|------|------|
|
||||
| 正确性 | 行为是否符合目标功能? |
|
||||
| 验证 | 检查是否真的跑过并留下证据? |
|
||||
| 范围纪律 | 是否保持在选定功能范围内? |
|
||||
| 可靠性 | 结果能否在重启后继续工作? |
|
||||
| 可维护性 | 代码和文档是否清楚到可交接? |
|
||||
|
||||
---
|
||||
|
||||
## 十二、标准工作循环
|
||||
|
||||
```
|
||||
开始会话
|
||||
├→ 1. Init — 读 AGENTS.md + PROGRESS.md + git log
|
||||
├→ 2. Select — 只选一个未完成功能
|
||||
├→ 3. Implement — 一次只做一个,不扩大范围
|
||||
├→ 4. Verify — 运行验证命令,有证据才标记完成
|
||||
└→ 5. Cleanup — 更新进度 + clean-state-checklist + git commit
|
||||
```
|
||||
|
||||
### 会话结束前必须运行 Clean State Checklist
|
||||
```
|
||||
□ 标准启动路径仍然可用
|
||||
□ 标准验证路径仍然可运行
|
||||
□ 当前进度已记录到进度日志
|
||||
□ 无半成品步骤处于未记录状态
|
||||
□ 下一轮会话无需人工修复即可继续
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十三、开发流程
|
||||
|
||||
```
|
||||
收到任务
|
||||
├→ ① 分析需求 → 读相关文档(MD/)、读全链路6环
|
||||
├→ ② 制定计划 → update_plan (3-6个阶段)
|
||||
├→ ③ 后端开发 → Controller → AppService → Service → Mapper → Entity → Flyway
|
||||
├→ ④ 后端测试 → mvn test → 接口测试(业务逻辑验证)
|
||||
├→ ⑤ 前端开发 → API接口 → 页面组件 → 路由配置
|
||||
├→ ⑥ 前端测试 → npm run build:dev → 功能验证
|
||||
├→ ⑦ 质量门禁 → L1编译 → L2测试 → L3DB审查 → L4验收 → L5归档
|
||||
└→ ⑧ 提交代码 → git commit(规范格式) → git push → 文档更新
|
||||
```
|
||||
|
||||
### Git Commit 格式
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
type: feat|fix|docs|refactor|test|chore
|
||||
scope: 模块名(如 registration, billing, pharmacy)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十四、快速参考命令
|
||||
|
||||
```bash
|
||||
# === 后端 ===
|
||||
export JAVA_HOME=/opt/jdk-25
|
||||
mvn clean compile -DskipTests # 编译
|
||||
mvn install -DskipTests # 构建
|
||||
mvn test -pl healthlink-his-application -Dtest="XxxTest" -Dsurefire.failIfNoSpecifiedTests=false
|
||||
|
||||
# === 前端 ===
|
||||
cd healthlink-his-ui
|
||||
npm run dev && npm run build:dev && npm run lint && npm run test:run
|
||||
|
||||
# === Git ===
|
||||
git status && git add -A && git commit -m "feat(module): desc" && git push origin develop
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十五、详细规范文档索引
|
||||
|
||||
| 文档 | 路径 | 用途 |
|
||||
|------|------|------|
|
||||
| 执行铁律 | `MD/specs/IRON_RULES.md` | 铁律完整版 |
|
||||
| 后端规范 | `MD/specs/BACKEND_DEVELOPMENT_STANDARD.md` | 后端编码标准 |
|
||||
| 前端规范 | `MD/specs/FRONTEND_DEVELOPMENT_STANDARD.md` | 前端编码标准 |
|
||||
| Harness方法论 | `MD/specs/HARNESS_ENGINEERING.md` | 完整Harness+Agent方法论 |
|
||||
| 文档规范 | `MD/DOCUMENTATION_STANDARD.md` | 文档管理标准 |
|
||||
| 后端清单 | `MD/specs/BACKEND_CHECKLIST.md` | 发布前检查 |
|
||||
| 前端清单 | `MD/specs/FRONTEND_CHECKLIST.md` | 发布前检查 |
|
||||
| 三甲标准 | `MD/standards/GRADE3A_HIS_STANDARD.md` | 三甲医院达标标准 |
|
||||
| Flyway指南 | `MD/guides/FLYWAY_USAGE_GUIDE.md` | 数据库迁移指南 |
|
||||
|
||||
---
|
||||
|
||||
## 十六、过往教训
|
||||
|
||||
| 教训 | 内容 |
|
||||
|------|------|
|
||||
| 状态链路断裂 | Bug#574: 签到设 BOOKED(1) 而非 CHECKED_IN(3),前端映射缺失 → 必须走完整状态链路 |
|
||||
| 盲删源文件 | AI 看到编译错误直接删文件,没检查 baseline → 必须先确认文件来源 |
|
||||
| 修复方向偏差 | 多次 fallback 改的是错误的 Service → 必须用 rg 搜索所有相关代码路径 |
|
||||
| bug_reports 缺列 | INSERT 静默失败 → 必须检查表结构 |
|
||||
| 禅道 comment API | API 不存在,用 resolve+activate workaround |
|
||||
| SQLite WAL 并发 | 多进程并发写需要 checkpoint |
|
||||
| UTF-8 切片 | 多字节字符不能用 byte index 切片 |
|
||||
| 上下文焦虑 | Agent 感觉上下文快满时会匆忙结束,跳过验证 → 注意 context 40% 阈值 |
|
||||
| 过早宣告胜利 | 自评≠验证,分开"干活"和"检查" |
|
||||
| 覆盖率幻觉 | 覆盖率达标但逻辑没测 → 引入变异测试 |
|
||||
|
||||
---
|
||||
|
||||
> ⚠️ 本文件是 AI 开发规范的唯一信源。各工具配置文件由 `bash scripts/sync-ai-rules.sh` 同步。
|
||||
|
||||
---
|
||||
|
||||
> 📅 最后同步: 2026-06-06 15:09 | 源文件: RULES.md | 重新同步: `bash scripts/sync-ai-rules.sh`
|
||||
509
.cursorrules
509
.cursorrules
@@ -1,509 +0,0 @@
|
||||
# HealthLink-HIS — AI 开发规范 (Cursor)
|
||||
|
||||
> 🤖 Cursor IDE 打开本项目时自动加载此文件。
|
||||
|
||||
---
|
||||
|
||||
# HealthLink-HIS — AI 开发规范(自动加载)
|
||||
|
||||
> 🤖 **本文件供所有 AI 编码工具自动读取**。进入本项目后必须遵守以下规范。
|
||||
>
|
||||
> **模型决定上限,Harness 决定底线。**
|
||||
|
||||
---
|
||||
|
||||
## 一、项目概览
|
||||
|
||||
| 属性 | 值 |
|
||||
|------|------|
|
||||
| 项目名 | HealthLink-HIS(医院信息系统) |
|
||||
| 后端路径 | `healthlink-his-server/` |
|
||||
| 前端路径 | `healthlink-his-ui/` |
|
||||
| 文档路径 | `MD/` |
|
||||
| JDK | 25 (OpenJDK) |
|
||||
| Spring Boot | 4.0.6 |
|
||||
| MyBatis-Plus | 3.5.16 |
|
||||
| Vue | 3.x + Vite + Element Plus |
|
||||
| 数据库 | PostgreSQL 15+ |
|
||||
| 包名 | `com.healthlink.his` |
|
||||
| 后端端口 | 18082 |
|
||||
| 前端端口 | 81 |
|
||||
|
||||
---
|
||||
|
||||
## 二、铁律(必须遵守,违反即失败)
|
||||
|
||||
### 🔴 P0 铁律 — 不可违反
|
||||
|
||||
**铁律1: 修改完必须测试**
|
||||
```
|
||||
后端: mvn clean compile -DskipTests → mvn install -DskipTests → mvn test
|
||||
前端: npm run build:dev → npm run lint
|
||||
```
|
||||
- 白盒:编译通过,无 ERROR
|
||||
- 黑盒:关键接口返回 `{code:200, data:...}`,验证业务逻辑
|
||||
- 冒烟:应用正常启动,核心流程通畅
|
||||
|
||||
**铁律2: Flyway 数据库迁移**
|
||||
- 凡是新建表、新增字段,必须创建 Flyway 迁移脚本
|
||||
- 路径:`healthlink-his-domain/src/main/resources/db/migration/`
|
||||
- 命名:`V{版本号}__{描述}.sql`(双下划线)
|
||||
|
||||
**铁律3: 测试通过后才提交**
|
||||
- 编译 + 测试全部通过后才能 git commit
|
||||
- 不提交未完成的功能、调试代码、临时文件
|
||||
|
||||
**铁律4: 前后端API路径对齐**
|
||||
- 后端前缀:`/healthlink-his/api/v1/`
|
||||
- 前端 `request.js` 的 baseURL 必须与后端匹配
|
||||
|
||||
**铁律5: 状态值一致性(Bug #574 教训)**
|
||||
- 修改任何状态值前,必须先列出完整的状态流转链路
|
||||
- 检查项:枚举定义 → Service 设置 → 查询映射 → 前端 STATUS_CLASS_MAP → 前端 v-if → 统计SQL
|
||||
- 禁止:只改一端不检查其他端
|
||||
|
||||
**铁律6: 禁止删除源文件(Bug #574 教训)**
|
||||
- 绝对禁止删除项目中已有的 Java/Vue/SQL 源文件
|
||||
- 编译错误 → 修复错误;重复文件 → 重构合并
|
||||
- 唯一例外:明确由人类确认删除的文件
|
||||
|
||||
**铁律7: 禁止修改已有公开方法签名**
|
||||
- 不能删除/重命名已有的 public 方法,不能修改参数列表
|
||||
- 需要新功能 → 添加重载方法;需要改行为 → 修改内部实现
|
||||
|
||||
**铁律8: 验证后才宣称完成(Verification Before Completion)**
|
||||
- **没有跑过验证命令,就不能说"完成了""通过了""没问题"**
|
||||
- 禁止使用"应该可以""大概没问题""看起来正确"
|
||||
- 必须:运行命令 → 读取输出 → 确认结果 → 才能宣称
|
||||
- 这是诚实原则,不是效率问题
|
||||
|
||||
|
||||
**铁律9: 开发前必须审核原有代码(P0 — 铁律)**
|
||||
- **任何新功能开发前,必须先搜索项目中是否已有相关代码**
|
||||
- 搜索路径:Controller / AppService / Service / Mapper / Entity / 前端页面 / API接口
|
||||
- 如果已有部分功能 → 在原有代码基础上**升级优化完善**,禁止另起炉灶
|
||||
- 如果已有接口但前端缺失 → 只补前端,不重复建后端
|
||||
- 如果已有前端但后端缺失 → 只补后端,不重写前端
|
||||
- 搜索命令:`rg -l "关键词" healthlink-his-server/ healthlink-his-ui/src/`
|
||||
- 禁止:不看代码就新建模块、重复实现已有功能、废弃原有代码另写一套
|
||||
|
||||
|
||||
**铁律12: 设计文档确认后自主开发(铁律)**
|
||||
- 设计文档(如 `MD/architecture/GRADE3A_GAP_ANALYSIS_AND_DESIGN.md`)一旦确认,后续开发**必须按文档自主执行**
|
||||
- **禁止反复询问"是否继续""下一步做什么""是否开始"**——直接按计划推进
|
||||
- 每完成一个 Sprint,自动提交推送,然后立即开始下一个 Sprint
|
||||
- 只在遇到**无法解决的阻塞**(如技术选型冲突、需求不明确、第三方依赖不可用)时才暂停询问
|
||||
- 设计文档是"**已签合同**",不是"参考意见"。铁律执行优先级:设计文档 > 人类临时指令 > AI 自行判断
|
||||
|
||||
**铁律18: 禁止破坏原有功能(P0绝对铁律)**
|
||||
- **完善增加功能和流程时,绝对不能破坏或者让原有功能不能用**
|
||||
- 修改已有实体前必须对比原始文件(`git show HEAD~N:./file.java`),保留所有原有字段和方法
|
||||
- 新增字段只能追加,不能删除或重命名已有字段
|
||||
- SQL迁移只允许 `ALTER TABLE ADD COLUMN`,不允许 `DROP COLUMN` 或 `RENAME COLUMN`
|
||||
- Controller新端点不能修改已有端点的路径或参数
|
||||
- 前端新页面不能修改已有页面的组件结构
|
||||
- 每次修改后必须 `mvn clean compile -DskipTests` 验证
|
||||
- **违规判定**: 因修改导致原有代码编译失败或运行报错,视为违反铁律18,必须立即回滚修复
|
||||
|
||||
|
||||
### 🟡 P1 铁律 — 强烈建议
|
||||
|
||||
**铁律9: 先分解再行动**
|
||||
- 修改超过3个文件、涉及多模块、数据库变更,必须先制定计划
|
||||
|
||||
**铁律10: 验证后信**
|
||||
- 每次修改后必须验证编译通过,不信记忆
|
||||
|
||||
**铁律13: 文档统一管理**
|
||||
- 所有文档存储在 `MD/` 目录
|
||||
- 文件名:大写英文+下划线(如 `BACKEND_CHECKLIST.md`)
|
||||
- 文档头部必须包含元数据块(文档类型、版本、日期)
|
||||
|
||||
---
|
||||
|
||||
|
||||
**铁律14: 设计文档必须包含UI设计和调用流程**
|
||||
- 所有新模块/页面的设计文档必须包含:UI布局描述、交互效果清单、前后端调用流程
|
||||
- 没有明确UI设计的模块,禁止直接编码
|
||||
- 详见
|
||||
- 设计文档必须写清楚:系统调用关系、方法函数调用关系、完整业务流程
|
||||
- 设计文档中每个用户操作必须对应:前端事件 → API调用 → 后端处理链路 → 返回数据 → UI渲染
|
||||
|
||||
---
|
||||
|
||||
## 三、Karpathy 编码准则
|
||||
|
||||
> 减少 LLM 常见编码错误。偏向谨慎而非速度。
|
||||
|
||||
### 3.1 先想再写
|
||||
- 明确陈述假设,不确定就问
|
||||
- 多种解读时都列出来,不要默默选一种
|
||||
- 有更简单的方案就说出来,该推回就推回
|
||||
- 不清楚的地方停下来,说清楚哪里不清楚
|
||||
|
||||
### 3.2 简洁优先
|
||||
- 不做没要求的功能,不做一次性代码的抽象
|
||||
- 不加没要求的"灵活性"和"可配置性"
|
||||
- 200 行能 50 行搞定就重写
|
||||
- 自问:"高级工程师会不会觉得这过度设计?"
|
||||
|
||||
### 3.3 精准修改
|
||||
- 只改必须改的,不"顺手改进"相邻代码
|
||||
- 匹配现有代码风格,即使你有不同的偏好
|
||||
- 每行改动都能追溯到用户的请求
|
||||
- 只清理你自己改动产生的无用代码
|
||||
|
||||
### 3.4 目标驱动
|
||||
- 把任务转化为可验证目标
|
||||
- 多步任务声明计划:`[步骤] → 验证: [检查]`
|
||||
- 强验收标准让 Agent 能独立循环,弱标准需要持续澄清
|
||||
|
||||
---
|
||||
|
||||
## 四、全链路 6 环分析
|
||||
|
||||
> ⚠️ **涉及数据库字段的 Bug / 需求,必须走完整链路。**
|
||||
|
||||
```
|
||||
前端/页面 → Controller → Service → Mapper → DB/SQL → 关联模块
|
||||
①录入 ②验证 ③业务 ④持久化 ⑤存储 ⑥联动
|
||||
```
|
||||
|
||||
| 环 | 检查内容 |
|
||||
|----|---------|
|
||||
| ① 录入 | 前端有无输入入口(弹窗、表格行编辑、表单) |
|
||||
| ② 验证 | Controller 参数校验、@Valid、权限控制 |
|
||||
| ③ 业务 | Service 业务逻辑、事务边界、多个 Service 实现类入口 |
|
||||
| ④ 持久化 | Mapper XML、DTO 字段映射、类型转换 |
|
||||
| ⑤ 存储 | 数据库表结构、索引、NOT NULL 约束 |
|
||||
| ⑥ 联动 | 上游(医嘱→护士站)、下游(打印、计费、报表)是否同步 |
|
||||
|
||||
**修复后的验证顺序**:
|
||||
1. 数据库:确认状态值已正确写入
|
||||
2. 后端接口:确认返回的状态映射正确
|
||||
3. 前端显示:确认页面显示正确状态文本
|
||||
4. 前端交互:确认按钮/操作基于正确状态启用/禁用
|
||||
5. 统计数据:确认池/报表统计包含新状态
|
||||
|
||||
---
|
||||
|
||||
## 五、Harness Engineering 方法论
|
||||
|
||||
> Harness = 约束 + 反馈 + 控制平面 + 持久执行
|
||||
|
||||
### 5.1 四层约束金字塔
|
||||
|
||||
| 层级 | 内容 | 落地方式 |
|
||||
|------|------|---------|
|
||||
| **L1 架构约束** | 接口合约、包结构、命名规范、禁止模式 | 本文件铁律 |
|
||||
| **L2 代码质量** | 圈复杂度、代码风格、类型提示 | 编译门禁 + ESLint |
|
||||
| **L3 安全约束** | 敏感信息检测、权限检查、输入验证 | 配置不可硬编码 |
|
||||
| **L4 业务规则** | 领域逻辑、数据一致性、事务边界 | 全链路 6 环验证 |
|
||||
|
||||
**约束设计原则**:
|
||||
- **可验证**:每条约束必须能被自动化检查("覆盖率>90%"✅ "质量要高"❌)
|
||||
- **无歧义**:"每函数不超过50行"✅ "函数不要太长"❌
|
||||
- **优先级**:安全(1) > 架构(2) > 业务(3) > 质量(4) > 性能(5)
|
||||
- **渐进增强**:L1编译通过 → L2+命名规范 → L3+测试覆盖 → L4+安全扫描
|
||||
|
||||
### 5.2 三层反馈系统
|
||||
|
||||
| 层级 | 速度 | 覆盖范围 | 失败处理 |
|
||||
|------|------|---------|---------|
|
||||
| **L1 编译检查** | <30秒 | 语法、类型、签名 | 立即阻断,自行修复 |
|
||||
| **L2 数据流验证** | <5分钟 | 全链路字段、Mapper XML、DTO | 修复后上报 |
|
||||
| **L3 人工审查** | 10-30分钟 | 架构、设计、业务正确性 | 驳回/指导/批准 |
|
||||
|
||||
**反馈铁律**:
|
||||
- 反馈必须可行动(文件 + 行号 + 错误类型 + 修复方向)
|
||||
- 失败后先回滚到最近检查点,再重试
|
||||
- 持续失败3次 → 上报人类
|
||||
|
||||
### 5.3 控制平面
|
||||
|
||||
```
|
||||
战略层(人类) → 设定目标、审批决策、异常升级
|
||||
战术层(Agent) → 任务分解、update_plan、依赖协调、检查点保存
|
||||
执行层(Agent) → 代码生成、测试执行、错误恢复、幂等重试
|
||||
```
|
||||
|
||||
### 5.4 持久执行
|
||||
|
||||
- 每个关键步骤保存检查点(`update_plan` 进度)
|
||||
- 失败后从最新检查点恢复,不从头开始
|
||||
- 幂等设计:同一操作重复执行结果一致
|
||||
- **三层状态管理**:系统层(工作流ID/超时/重试) → 执行层(当前活动/进度) → 业务层(已完成工作/中间产物)
|
||||
|
||||
---
|
||||
|
||||
## 六、五层质量门禁
|
||||
|
||||
| 门禁 | 时间 | 范围 | 失败处理 |
|
||||
|------|------|------|---------|
|
||||
| **L1 编译检查** | <30秒 | 语法、类型、导入 | Agent 自行修复 |
|
||||
| **L2 静态分析** | <2分钟 | 代码风格、复杂度、安全 | Agent 修复 |
|
||||
| **L3 单元测试** | <5分钟 | 功能正确性、边界条件 | 自动修复或上报 |
|
||||
| **L4 集成测试** | <15分钟 | 模块间交互、数据流 | 上报人工 |
|
||||
| **L5 生产验证** | 持续 | 监控、告警、性能 | 自动回滚 |
|
||||
|
||||
**提交铁律**:L1-L2 必须通过才能 commit,L3(如有DB变更)必须通过才能 push
|
||||
|
||||
---
|
||||
|
||||
## 七、系统化调试(Systematic Debugging)
|
||||
|
||||
> **铁律:没有根因调查,不能提出修复方案。**
|
||||
|
||||
### 四阶段流程
|
||||
|
||||
**阶段1:根因调查**(修复前必须完成)
|
||||
1. 仔细阅读错误信息(堆栈、行号、错误码)
|
||||
2. 稳定复现(能否可靠触发?步骤?每次?)
|
||||
3. 检查最近变更(git diff、新依赖、配置变更)
|
||||
4. 多组件系统:在每个组件边界加诊断日志,定位哪一层断裂
|
||||
5. 追踪数据流:坏值从哪里来?谁调用的?一直追溯到源头
|
||||
|
||||
**阶段2:模式分析**
|
||||
- 找到同代码库中类似的正常工作代码
|
||||
- 逐项对比差异
|
||||
- 理解依赖关系
|
||||
|
||||
**阶段3:假设与测试**
|
||||
- 形成单一假设:"我认为X是根因,因为Y"
|
||||
- 做最小改动测试
|
||||
- 有效 → 阶段4;无效 → 新假设
|
||||
|
||||
**阶段4:实施**
|
||||
- 创建失败测试用例
|
||||
- 修复根因(不是症状)
|
||||
- 验证修复
|
||||
|
||||
---
|
||||
|
||||
## 八、后端开发规范
|
||||
|
||||
### 分层架构
|
||||
```
|
||||
Controller → AppService → Service → Mapper → Entity
|
||||
```
|
||||
|
||||
### 命名规范
|
||||
| 类型 | 规则 | 示例 |
|
||||
|------|------|------|
|
||||
| Controller | `XxxController` | `RegistrationController` |
|
||||
| AppService | `IXxxAppService` / `XxxAppServiceImpl` | `IRegistrationAppService` |
|
||||
| Service | `IXxxService` / `XxxServiceImpl` | `IRegistrationService` |
|
||||
| Mapper | `XxxMapper` | `RegistrationMapper` |
|
||||
| Entity | `Xxx` | `Registration` |
|
||||
| DTO | `XxxDto` / `XxxQueryDto` | `RegistrationDto` |
|
||||
|
||||
### 包结构
|
||||
```
|
||||
com.healthlink.his.web.{module}.controller
|
||||
com.healthlink.his.web.{module}.appservice
|
||||
com.healthlink.his.web.{module}.service
|
||||
com.healthlink.his.web.{module}.mapper
|
||||
com.healthlink.his.web.{module}.dto
|
||||
com.healthlink.his.domain.{module}
|
||||
com.healthlink.his.common.enums
|
||||
```
|
||||
|
||||
### 关键约束
|
||||
- 所有查询使用 `LambdaQueryWrapper`,禁止字符串拼接 SQL
|
||||
- `@Transactional(rollbackFor = Exception.class)` 管理事务
|
||||
- 所有接口标注 `@PreAuthorize` 权限控制
|
||||
- 患者敏感信息在日志中脱敏
|
||||
- **扩展功能不修改原有函数签名**
|
||||
|
||||
---
|
||||
|
||||
## 九、前端开发规范
|
||||
|
||||
### 技术栈
|
||||
- Vue 3 + Vite + Element Plus + Pinia + Axios(基于 RuoYi-Vue3)
|
||||
|
||||
### 目录结构
|
||||
```
|
||||
src/api/{module}/ # API接口
|
||||
src/views/{module}/ # 页面组件
|
||||
src/store/modules/ # Pinia状态管理
|
||||
src/components/ # 公共组件
|
||||
```
|
||||
|
||||
### 关键约束
|
||||
- API前缀:`/healthlink-his/api/v1/`
|
||||
- 路由懒加载:`() => import('@/views/xxx/index.vue')`
|
||||
- 页面使用 `<script setup>` 语法
|
||||
- 按钮权限使用 `v-hasPermi` 指令
|
||||
- `onMounted` 中注册的事件在 `onUnmounted` 中移除
|
||||
|
||||
---
|
||||
|
||||
## 十、Agent 体系
|
||||
|
||||
### 角色与路由
|
||||
|
||||
| 代号 | 名称 | 角色 | 路由关键词 |
|
||||
|------|------|------|-----------|
|
||||
| liubei | 刘备 | 项目经理 | 协调、分派、异常升级 |
|
||||
| zhugeliang | 诸葛亮 | 架构师 | 分析、路由、设计 |
|
||||
| guanyu | 关羽 | 后端开发 | java, api, spring, service, controller |
|
||||
| zhaoyun | 赵云 | 前端开发 | vue, 界面, 显示, 弹窗, 按钮 |
|
||||
| xunyu | 荀彧 | DBA | 数据库, sql, 迁移, mapper xml |
|
||||
| zhangfei | 张飞 | 测试 | 测试, QA, 回归 |
|
||||
| huatuo | 华佗 | 验收 | 需求验收、质量确认 |
|
||||
| chenlin | 陈琳 | 文档 | 文档、归档、Git提交 |
|
||||
|
||||
### 协作流水线
|
||||
|
||||
```
|
||||
刘备(协调) → 诸葛亮(分析路由) → {关羽|赵云}(修复) → 荀彧(DB审查) → 张飞(测试) → 华佗(验收) → 陈琳(归档)
|
||||
```
|
||||
|
||||
### Bug 修复完整管线(BDT 方法论)
|
||||
|
||||
```
|
||||
获取Bug → 设计测试用例 → 基线测试(应失败) → 全链路修复 → 回归测试(应通过) → 扩展测试(无回归) → 提交
|
||||
```
|
||||
|
||||
### Bug 状态管理铁律
|
||||
- 人类提的 Bug:只加备注,不改状态,不改分配
|
||||
- 智能体提的 Bug:可以改分配和加备注
|
||||
- 已关闭/已解决的 Bug 不再处理
|
||||
|
||||
---
|
||||
|
||||
## 十一、审查与审计
|
||||
|
||||
### 三层审查体系
|
||||
|
||||
| 层级 | 内容 | 时机 |
|
||||
|------|------|------|
|
||||
| **L1 自审** | Agent 对照约束逐条检查 | 每次提交前 |
|
||||
| **L2 配对审查** | Agent 生成变更摘要,人类终审 | PR/提交时 |
|
||||
| **L3 合规审查** | 审计追踪,记录所有 AI 操作 | 持续 |
|
||||
|
||||
### L1 自审清单
|
||||
```yaml
|
||||
self_review:
|
||||
- "所有修改能通过编译?"
|
||||
- "遵守命名规范?"
|
||||
- "测试覆盖达标?"
|
||||
- "没有遗漏的 TODO / DEBUG?"
|
||||
- "变更范围没超出任务边界?"
|
||||
```
|
||||
|
||||
### 评审评分维度
|
||||
| 维度 | 问题 |
|
||||
|------|------|
|
||||
| 正确性 | 行为是否符合目标功能? |
|
||||
| 验证 | 检查是否真的跑过并留下证据? |
|
||||
| 范围纪律 | 是否保持在选定功能范围内? |
|
||||
| 可靠性 | 结果能否在重启后继续工作? |
|
||||
| 可维护性 | 代码和文档是否清楚到可交接? |
|
||||
|
||||
---
|
||||
|
||||
## 十二、标准工作循环
|
||||
|
||||
```
|
||||
开始会话
|
||||
├→ 1. Init — 读 AGENTS.md + PROGRESS.md + git log
|
||||
├→ 2. Select — 只选一个未完成功能
|
||||
├→ 3. Implement — 一次只做一个,不扩大范围
|
||||
├→ 4. Verify — 运行验证命令,有证据才标记完成
|
||||
└→ 5. Cleanup — 更新进度 + clean-state-checklist + git commit
|
||||
```
|
||||
|
||||
### 会话结束前必须运行 Clean State Checklist
|
||||
```
|
||||
□ 标准启动路径仍然可用
|
||||
□ 标准验证路径仍然可运行
|
||||
□ 当前进度已记录到进度日志
|
||||
□ 无半成品步骤处于未记录状态
|
||||
□ 下一轮会话无需人工修复即可继续
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十三、开发流程
|
||||
|
||||
```
|
||||
收到任务
|
||||
├→ ① 分析需求 → 读相关文档(MD/)、读全链路6环
|
||||
├→ ② 制定计划 → update_plan (3-6个阶段)
|
||||
├→ ③ 后端开发 → Controller → AppService → Service → Mapper → Entity → Flyway
|
||||
├→ ④ 后端测试 → mvn test → 接口测试(业务逻辑验证)
|
||||
├→ ⑤ 前端开发 → API接口 → 页面组件 → 路由配置
|
||||
├→ ⑥ 前端测试 → npm run build:dev → 功能验证
|
||||
├→ ⑦ 质量门禁 → L1编译 → L2测试 → L3DB审查 → L4验收 → L5归档
|
||||
└→ ⑧ 提交代码 → git commit(规范格式) → git push → 文档更新
|
||||
```
|
||||
|
||||
### Git Commit 格式
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
type: feat|fix|docs|refactor|test|chore
|
||||
scope: 模块名(如 registration, billing, pharmacy)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十四、快速参考命令
|
||||
|
||||
```bash
|
||||
# === 后端 ===
|
||||
export JAVA_HOME=/opt/jdk-25
|
||||
mvn clean compile -DskipTests # 编译
|
||||
mvn install -DskipTests # 构建
|
||||
mvn test -pl healthlink-his-application -Dtest="XxxTest" -Dsurefire.failIfNoSpecifiedTests=false
|
||||
|
||||
# === 前端 ===
|
||||
cd healthlink-his-ui
|
||||
npm run dev && npm run build:dev && npm run lint && npm run test:run
|
||||
|
||||
# === Git ===
|
||||
git status && git add -A && git commit -m "feat(module): desc" && git push origin develop
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十五、详细规范文档索引
|
||||
|
||||
| 文档 | 路径 | 用途 |
|
||||
|------|------|------|
|
||||
| 执行铁律 | `MD/specs/IRON_RULES.md` | 铁律完整版 |
|
||||
| 后端规范 | `MD/specs/BACKEND_DEVELOPMENT_STANDARD.md` | 后端编码标准 |
|
||||
| 前端规范 | `MD/specs/FRONTEND_DEVELOPMENT_STANDARD.md` | 前端编码标准 |
|
||||
| Harness方法论 | `MD/specs/HARNESS_ENGINEERING.md` | 完整Harness+Agent方法论 |
|
||||
| 文档规范 | `MD/DOCUMENTATION_STANDARD.md` | 文档管理标准 |
|
||||
| 后端清单 | `MD/specs/BACKEND_CHECKLIST.md` | 发布前检查 |
|
||||
| 前端清单 | `MD/specs/FRONTEND_CHECKLIST.md` | 发布前检查 |
|
||||
| 三甲标准 | `MD/standards/GRADE3A_HIS_STANDARD.md` | 三甲医院达标标准 |
|
||||
| Flyway指南 | `MD/guides/FLYWAY_USAGE_GUIDE.md` | 数据库迁移指南 |
|
||||
|
||||
---
|
||||
|
||||
## 十六、过往教训
|
||||
|
||||
| 教训 | 内容 |
|
||||
|------|------|
|
||||
| 状态链路断裂 | Bug#574: 签到设 BOOKED(1) 而非 CHECKED_IN(3),前端映射缺失 → 必须走完整状态链路 |
|
||||
| 盲删源文件 | AI 看到编译错误直接删文件,没检查 baseline → 必须先确认文件来源 |
|
||||
| 修复方向偏差 | 多次 fallback 改的是错误的 Service → 必须用 rg 搜索所有相关代码路径 |
|
||||
| bug_reports 缺列 | INSERT 静默失败 → 必须检查表结构 |
|
||||
| 禅道 comment API | API 不存在,用 resolve+activate workaround |
|
||||
| SQLite WAL 并发 | 多进程并发写需要 checkpoint |
|
||||
| UTF-8 切片 | 多字节字符不能用 byte index 切片 |
|
||||
| 上下文焦虑 | Agent 感觉上下文快满时会匆忙结束,跳过验证 → 注意 context 40% 阈值 |
|
||||
| 过早宣告胜利 | 自评≠验证,分开"干活"和"检查" |
|
||||
| 覆盖率幻觉 | 覆盖率达标但逻辑没测 → 引入变异测试 |
|
||||
|
||||
---
|
||||
|
||||
> ⚠️ 本文件是 AI 开发规范的唯一信源。各工具配置文件由 `bash scripts/sync-ai-rules.sh` 同步。
|
||||
|
||||
---
|
||||
|
||||
> 📅 最后同步: 2026-06-06 15:09 | 源文件: RULES.md | 重新同步: `bash scripts/sync-ai-rules.sh`
|
||||
0
.gitattributes
vendored
Executable file → Normal file
0
.gitattributes
vendored
Executable file → Normal file
543
.github/copilot-instructions.md
vendored
543
.github/copilot-instructions.md
vendored
@@ -1,499 +1,76 @@
|
||||
# HealthLink-HIS — AI 开发规范 (GitHub Copilot)
|
||||
# OpenHIS — AI 编码助手 指南
|
||||
|
||||
> 🤖 GitHub Copilot 打开本项目时自动加载此文件。
|
||||
目的:帮助自动化/AI 编码代理快速上手本仓库,包含架构要点、关键文件、常用构建/运行命令以及项目约定。请只按照仓库内真实可见的内容提出修改建议或补充说明。
|
||||
|
||||
---
|
||||
- **代码组织**: 本项目是一个 Java 后端(多模块 Maven)+ Vue3 前端(Vite)的大型应用。
|
||||
- 后端主模块目录:`openhis-server-new/`(顶层为 `pom`,包含多个子模块)。关键子模块示例:`openhis-application`, `openhis-domain`, `openhis-common`, `core-*` 系列。
|
||||
- 前端目录:`openhis-ui-vue3/`(Vite + Vue 3,使用 Pinia、Element Plus 等)。
|
||||
|
||||
# HealthLink-HIS — AI 开发规范(自动加载)
|
||||
- **大局观(Big Picture)**: 后端以 Spring Boot(Java 17)实现,使用多模块 Maven 管理公共库与业务模块;前端由单独仓库目录通过 Vite 构建并以环境变量(`VITE_APP_BASE_API`)与后端交互。后端扫描 `com.core` 与 `com.openhis` 包(见 `OpenHisApplication.java`),启动类位于:`openhis-server-new/openhis-application/src/main/java/com/openhis/OpenHisApplication.java`。
|
||||
|
||||
> 🤖 **本文件供所有 AI 编码工具自动读取**。进入本项目后必须遵守以下规范。
|
||||
>
|
||||
> **模型决定上限,Harness 决定底线。**
|
||||
- **运行/构建(Windows PowerShell 示例)**:
|
||||
- 构建后端(从仓库根执行):
|
||||
|
||||
---
|
||||
|
||||
## 一、项目概览
|
||||
|
||||
| 属性 | 值 |
|
||||
|------|------|
|
||||
| 项目名 | HealthLink-HIS(医院信息系统) |
|
||||
| 后端路径 | `healthlink-his-server/` |
|
||||
| 前端路径 | `healthlink-his-ui/` |
|
||||
| 文档路径 | `MD/` |
|
||||
| JDK | 25 (OpenJDK) |
|
||||
| Spring Boot | 4.0.6 |
|
||||
| MyBatis-Plus | 3.5.16 |
|
||||
| Vue | 3.x + Vite + Element Plus |
|
||||
| 数据库 | PostgreSQL 15+ |
|
||||
| 包名 | `com.healthlink.his` |
|
||||
| 后端端口 | 18082 |
|
||||
| 前端端口 | 81 |
|
||||
|
||||
---
|
||||
|
||||
## 二、铁律(必须遵守,违反即失败)
|
||||
|
||||
### 🔴 P0 铁律 — 不可违反
|
||||
|
||||
**铁律1: 修改完必须测试**
|
||||
```
|
||||
后端: mvn clean compile -DskipTests → mvn install -DskipTests → mvn test
|
||||
前端: npm run build:dev → npm run lint
|
||||
```
|
||||
- 白盒:编译通过,无 ERROR
|
||||
- 黑盒:关键接口返回 `{code:200, data:...}`,验证业务逻辑
|
||||
- 冒烟:应用正常启动,核心流程通畅
|
||||
|
||||
**铁律2: Flyway 数据库迁移**
|
||||
- 凡是新建表、新增字段,必须创建 Flyway 迁移脚本
|
||||
- 路径:`healthlink-his-domain/src/main/resources/db/migration/`
|
||||
- 命名:`V{版本号}__{描述}.sql`(双下划线)
|
||||
|
||||
**铁律3: 测试通过后才提交**
|
||||
- 编译 + 测试全部通过后才能 git commit
|
||||
- 不提交未完成的功能、调试代码、临时文件
|
||||
|
||||
**铁律4: 前后端API路径对齐**
|
||||
- 后端前缀:`/healthlink-his/api/v1/`
|
||||
- 前端 `request.js` 的 baseURL 必须与后端匹配
|
||||
|
||||
**铁律5: 状态值一致性(Bug #574 教训)**
|
||||
- 修改任何状态值前,必须先列出完整的状态流转链路
|
||||
- 检查项:枚举定义 → Service 设置 → 查询映射 → 前端 STATUS_CLASS_MAP → 前端 v-if → 统计SQL
|
||||
- 禁止:只改一端不检查其他端
|
||||
|
||||
**铁律6: 禁止删除源文件(Bug #574 教训)**
|
||||
- 绝对禁止删除项目中已有的 Java/Vue/SQL 源文件
|
||||
- 编译错误 → 修复错误;重复文件 → 重构合并
|
||||
- 唯一例外:明确由人类确认删除的文件
|
||||
|
||||
**铁律7: 禁止修改已有公开方法签名**
|
||||
- 不能删除/重命名已有的 public 方法,不能修改参数列表
|
||||
- 需要新功能 → 添加重载方法;需要改行为 → 修改内部实现
|
||||
|
||||
**铁律8: 验证后才宣称完成(Verification Before Completion)**
|
||||
- **没有跑过验证命令,就不能说"完成了""通过了""没问题"**
|
||||
- 禁止使用"应该可以""大概没问题""看起来正确"
|
||||
- 必须:运行命令 → 读取输出 → 确认结果 → 才能宣称
|
||||
- 这是诚实原则,不是效率问题
|
||||
|
||||
|
||||
**铁律9: 开发前必须审核原有代码(P0 — 铁律)**
|
||||
- **任何新功能开发前,必须先搜索项目中是否已有相关代码**
|
||||
- 搜索路径:Controller / AppService / Service / Mapper / Entity / 前端页面 / API接口
|
||||
- 如果已有部分功能 → 在原有代码基础上**升级优化完善**,禁止另起炉灶
|
||||
- 如果已有接口但前端缺失 → 只补前端,不重复建后端
|
||||
- 如果已有前端但后端缺失 → 只补后端,不重写前端
|
||||
- 搜索命令:`rg -l "关键词" healthlink-his-server/ healthlink-his-ui/src/`
|
||||
- 禁止:不看代码就新建模块、重复实现已有功能、废弃原有代码另写一套
|
||||
|
||||
|
||||
**铁律12: 设计文档确认后自主开发(铁律)**
|
||||
- 设计文档(如 `MD/architecture/GRADE3A_GAP_ANALYSIS_AND_DESIGN.md`)一旦确认,后续开发**必须按文档自主执行**
|
||||
- **禁止反复询问"是否继续""下一步做什么""是否开始"**——直接按计划推进
|
||||
- 每完成一个 Sprint,自动提交推送,然后立即开始下一个 Sprint
|
||||
- 只在遇到**无法解决的阻塞**(如技术选型冲突、需求不明确、第三方依赖不可用)时才暂停询问
|
||||
- 设计文档是"**已签合同**",不是"参考意见"。铁律执行优先级:设计文档 > 人类临时指令 > AI 自行判断
|
||||
|
||||
|
||||
### 🟡 P1 铁律 — 强烈建议
|
||||
|
||||
**铁律9: 先分解再行动**
|
||||
- 修改超过3个文件、涉及多模块、数据库变更,必须先制定计划
|
||||
|
||||
**铁律10: 验证后信**
|
||||
- 每次修改后必须验证编译通过,不信记忆
|
||||
|
||||
**铁律13: 文档统一管理**
|
||||
- 所有文档存储在 `MD/` 目录
|
||||
- 文件名:大写英文+下划线(如 `BACKEND_CHECKLIST.md`)
|
||||
- 文档头部必须包含元数据块(文档类型、版本、日期)
|
||||
|
||||
---
|
||||
|
||||
|
||||
**铁律14: 设计文档必须包含UI设计和调用流程**
|
||||
- 所有新模块/页面的设计文档必须包含:UI布局描述、交互效果清单、前后端调用流程
|
||||
- 没有明确UI设计的模块,禁止直接编码
|
||||
- 详见
|
||||
- 设计文档必须写清楚:系统调用关系、方法函数调用关系、完整业务流程
|
||||
- 设计文档中每个用户操作必须对应:前端事件 → API调用 → 后端处理链路 → 返回数据 → UI渲染
|
||||
|
||||
---
|
||||
|
||||
## 三、Karpathy 编码准则
|
||||
|
||||
> 减少 LLM 常见编码错误。偏向谨慎而非速度。
|
||||
|
||||
### 3.1 先想再写
|
||||
- 明确陈述假设,不确定就问
|
||||
- 多种解读时都列出来,不要默默选一种
|
||||
- 有更简单的方案就说出来,该推回就推回
|
||||
- 不清楚的地方停下来,说清楚哪里不清楚
|
||||
|
||||
### 3.2 简洁优先
|
||||
- 不做没要求的功能,不做一次性代码的抽象
|
||||
- 不加没要求的"灵活性"和"可配置性"
|
||||
- 200 行能 50 行搞定就重写
|
||||
- 自问:"高级工程师会不会觉得这过度设计?"
|
||||
|
||||
### 3.3 精准修改
|
||||
- 只改必须改的,不"顺手改进"相邻代码
|
||||
- 匹配现有代码风格,即使你有不同的偏好
|
||||
- 每行改动都能追溯到用户的请求
|
||||
- 只清理你自己改动产生的无用代码
|
||||
|
||||
### 3.4 目标驱动
|
||||
- 把任务转化为可验证目标
|
||||
- 多步任务声明计划:`[步骤] → 验证: [检查]`
|
||||
- 强验收标准让 Agent 能独立循环,弱标准需要持续澄清
|
||||
|
||||
---
|
||||
|
||||
## 四、全链路 6 环分析
|
||||
|
||||
> ⚠️ **涉及数据库字段的 Bug / 需求,必须走完整链路。**
|
||||
|
||||
```
|
||||
前端/页面 → Controller → Service → Mapper → DB/SQL → 关联模块
|
||||
①录入 ②验证 ③业务 ④持久化 ⑤存储 ⑥联动
|
||||
```powershell
|
||||
cd openhis-server-new
|
||||
mvn clean package -DskipTests
|
||||
```
|
||||
|
||||
| 环 | 检查内容 |
|
||||
|----|---------|
|
||||
| ① 录入 | 前端有无输入入口(弹窗、表格行编辑、表单) |
|
||||
| ② 验证 | Controller 参数校验、@Valid、权限控制 |
|
||||
| ③ 业务 | Service 业务逻辑、事务边界、多个 Service 实现类入口 |
|
||||
| ④ 持久化 | Mapper XML、DTO 字段映射、类型转换 |
|
||||
| ⑤ 存储 | 数据库表结构、索引、NOT NULL 约束 |
|
||||
| ⑥ 联动 | 上游(医嘱→护士站)、下游(打印、计费、报表)是否同步 |
|
||||
- 仅运行后端模块(开发时常用):
|
||||
|
||||
**修复后的验证顺序**:
|
||||
1. 数据库:确认状态值已正确写入
|
||||
2. 后端接口:确认返回的状态映射正确
|
||||
3. 前端显示:确认页面显示正确状态文本
|
||||
4. 前端交互:确认按钮/操作基于正确状态启用/禁用
|
||||
5. 统计数据:确认池/报表统计包含新状态
|
||||
|
||||
---
|
||||
|
||||
## 五、Harness Engineering 方法论
|
||||
|
||||
> Harness = 约束 + 反馈 + 控制平面 + 持久执行
|
||||
|
||||
### 5.1 四层约束金字塔
|
||||
|
||||
| 层级 | 内容 | 落地方式 |
|
||||
|------|------|---------|
|
||||
| **L1 架构约束** | 接口合约、包结构、命名规范、禁止模式 | 本文件铁律 |
|
||||
| **L2 代码质量** | 圈复杂度、代码风格、类型提示 | 编译门禁 + ESLint |
|
||||
| **L3 安全约束** | 敏感信息检测、权限检查、输入验证 | 配置不可硬编码 |
|
||||
| **L4 业务规则** | 领域逻辑、数据一致性、事务边界 | 全链路 6 环验证 |
|
||||
|
||||
**约束设计原则**:
|
||||
- **可验证**:每条约束必须能被自动化检查("覆盖率>90%"✅ "质量要高"❌)
|
||||
- **无歧义**:"每函数不超过50行"✅ "函数不要太长"❌
|
||||
- **优先级**:安全(1) > 架构(2) > 业务(3) > 质量(4) > 性能(5)
|
||||
- **渐进增强**:L1编译通过 → L2+命名规范 → L3+测试覆盖 → L4+安全扫描
|
||||
|
||||
### 5.2 三层反馈系统
|
||||
|
||||
| 层级 | 速度 | 覆盖范围 | 失败处理 |
|
||||
|------|------|---------|---------|
|
||||
| **L1 编译检查** | <30秒 | 语法、类型、签名 | 立即阻断,自行修复 |
|
||||
| **L2 数据流验证** | <5分钟 | 全链路字段、Mapper XML、DTO | 修复后上报 |
|
||||
| **L3 人工审查** | 10-30分钟 | 架构、设计、业务正确性 | 驳回/指导/批准 |
|
||||
|
||||
**反馈铁律**:
|
||||
- 反馈必须可行动(文件 + 行号 + 错误类型 + 修复方向)
|
||||
- 失败后先回滚到最近检查点,再重试
|
||||
- 持续失败3次 → 上报人类
|
||||
|
||||
### 5.3 控制平面
|
||||
|
||||
```
|
||||
战略层(人类) → 设定目标、审批决策、异常升级
|
||||
战术层(Agent) → 任务分解、update_plan、依赖协调、检查点保存
|
||||
执行层(Agent) → 代码生成、测试执行、错误恢复、幂等重试
|
||||
```powershell
|
||||
cd openhis-server-new/openhis-application
|
||||
mvn spring-boot:run
|
||||
# 或在 IDE 中运行 `com.openhis.OpenHisApplication` 的 main()
|
||||
```
|
||||
|
||||
### 5.4 持久执行
|
||||
- 前端启动与构建(需要 Node.js v16.x,仓库 README 建议 v16.15):
|
||||
|
||||
- 每个关键步骤保存检查点(`update_plan` 进度)
|
||||
- 失败后从最新检查点恢复,不从头开始
|
||||
- 幂等设计:同一操作重复执行结果一致
|
||||
- **三层状态管理**:系统层(工作流ID/超时/重试) → 执行层(当前活动/进度) → 业务层(已完成工作/中间产物)
|
||||
|
||||
---
|
||||
|
||||
## 六、五层质量门禁
|
||||
|
||||
| 门禁 | 时间 | 范围 | 失败处理 |
|
||||
|------|------|------|---------|
|
||||
| **L1 编译检查** | <30秒 | 语法、类型、导入 | Agent 自行修复 |
|
||||
| **L2 静态分析** | <2分钟 | 代码风格、复杂度、安全 | Agent 修复 |
|
||||
| **L3 单元测试** | <5分钟 | 功能正确性、边界条件 | 自动修复或上报 |
|
||||
| **L4 集成测试** | <15分钟 | 模块间交互、数据流 | 上报人工 |
|
||||
| **L5 生产验证** | 持续 | 监控、告警、性能 | 自动回滚 |
|
||||
|
||||
**提交铁律**:L1-L2 必须通过才能 commit,L3(如有DB变更)必须通过才能 push
|
||||
|
||||
---
|
||||
|
||||
## 七、系统化调试(Systematic Debugging)
|
||||
|
||||
> **铁律:没有根因调查,不能提出修复方案。**
|
||||
|
||||
### 四阶段流程
|
||||
|
||||
**阶段1:根因调查**(修复前必须完成)
|
||||
1. 仔细阅读错误信息(堆栈、行号、错误码)
|
||||
2. 稳定复现(能否可靠触发?步骤?每次?)
|
||||
3. 检查最近变更(git diff、新依赖、配置变更)
|
||||
4. 多组件系统:在每个组件边界加诊断日志,定位哪一层断裂
|
||||
5. 追踪数据流:坏值从哪里来?谁调用的?一直追溯到源头
|
||||
|
||||
**阶段2:模式分析**
|
||||
- 找到同代码库中类似的正常工作代码
|
||||
- 逐项对比差异
|
||||
- 理解依赖关系
|
||||
|
||||
**阶段3:假设与测试**
|
||||
- 形成单一假设:"我认为X是根因,因为Y"
|
||||
- 做最小改动测试
|
||||
- 有效 → 阶段4;无效 → 新假设
|
||||
|
||||
**阶段4:实施**
|
||||
- 创建失败测试用例
|
||||
- 修复根因(不是症状)
|
||||
- 验证修复
|
||||
|
||||
---
|
||||
|
||||
## 八、后端开发规范
|
||||
|
||||
### 分层架构
|
||||
```
|
||||
Controller → AppService → Service → Mapper → Entity
|
||||
```powershell
|
||||
cd openhis-ui-vue3
|
||||
npm install
|
||||
npm run dev # 本地开发(热重载)
|
||||
npm run build:prod # 生产构建
|
||||
```
|
||||
|
||||
### 命名规范
|
||||
| 类型 | 规则 | 示例 |
|
||||
|------|------|------|
|
||||
| Controller | `XxxController` | `RegistrationController` |
|
||||
| AppService | `IXxxAppService` / `XxxAppServiceImpl` | `IRegistrationAppService` |
|
||||
| Service | `IXxxService` / `XxxServiceImpl` | `IRegistrationService` |
|
||||
| Mapper | `XxxMapper` | `RegistrationMapper` |
|
||||
| Entity | `Xxx` | `Registration` |
|
||||
| DTO | `XxxDto` / `XxxQueryDto` | `RegistrationDto` |
|
||||
- **环境与配置**:
|
||||
- 后端配置:`openhis-server-new/openhis-application/src/main/resources/application.yml`(数据库、端口、profile 等)。README 还提及 `application-druid.yml`(若存在请优先查看)。
|
||||
- 前端配置:多个 `.env.*` 文件(例如 `.env.development`, `.env.staging`, `.env.production`),关键变量:`VITE_APP_BASE_API`(例如 `/dev-api`),前端通过 `import.meta.env.VITE_APP_BASE_API` 拼接后端 URL(见 `src/utils/request.js`、多个视图与组件)。
|
||||
|
||||
### 包结构
|
||||
```
|
||||
com.healthlink.his.web.{module}.controller
|
||||
com.healthlink.his.web.{module}.appservice
|
||||
com.healthlink.his.web.{module}.service
|
||||
com.healthlink.his.web.{module}.mapper
|
||||
com.healthlink.his.web.{module}.dto
|
||||
com.healthlink.his.domain.{module}
|
||||
com.healthlink.his.common.enums
|
||||
- **重要约定 / 模式**:
|
||||
- 后端采用 Java 17、Spring Boot 2.5.x 家族,父 POM在 `openhis-server-new/pom.xml` 定义。常用依赖版本在该 POM 的 `<properties>` 中集中维护。
|
||||
- 模块间以 Maven 模块依赖与 `com.core` / `com.openhis` 包名分层(见 `pom.xml` 的 `<modules>` 与 `dependencyManagement`)。
|
||||
- 前端通过 Vite 插件配置(`openhis-ui-vue3/vite/plugins`)管理 svg、自动导入等。UI 框架为 Element Plus,状态管理为 Pinia。
|
||||
|
||||
- **集成点 & 外部依赖**:
|
||||
- 数据库:PostgreSQL(README 建议 v16.2),仓库根含一个大型初始化 SQL:`数据库初始话脚本(请使用navicat16版本导入).sql`,用于初始化表与演示数据。
|
||||
- 缓存/会话:Redis(需自行配置)。
|
||||
- 其他:Flowable(工作流),Druid(连接池监控),第三方服务通过特定配置类(例如 `YbServiceConfig` 在 `OpenHisApplication` 中启用)。
|
||||
|
||||
- **调试与常见位置**:
|
||||
- 启动类:`openhis-server-new/openhis-application/src/main/java/com/openhis/OpenHisApplication.java`。
|
||||
- 全局配置:`openhis-server-new/openhis-application/src/main/resources/`(`application.yml`、profile 文件等)。
|
||||
- 前端入口:`openhis-ui-vue3/src/main.js`、路由在 `openhis-ui-vue3/src/router/index.js`。
|
||||
- API 文档与监控路径(通常由后端暴露并被前端访问):
|
||||
- Swagger UI: `<VITE_APP_BASE_API>/swagger-ui/index.html`(前端视图在 `src/views/tool/swagger/index.vue`)。
|
||||
- Druid: `<VITE_APP_BASE_API>/druid/login.html`(见前端相关视图引用)。
|
||||
|
||||
- **为 AI 代理的具体建议(如何安全、有效地修改代码)**:
|
||||
- 修改后端时:优先在子模块(例如 `openhis-application`)本地运行 `mvn spring-boot:run` 验证启动与基础 API;大量改动前先执行 `mvn -T1C -DskipTests clean package` 在 CI 环境上验证构建(本地机器也可用)。
|
||||
- 修改前端时:检查/调整对应 `.env.*` 文件中的 `VITE_APP_BASE_API`,使用 `npm run dev` 本地联调后端接口(可通过代理或将 `VITE_APP_BASE_API` 指向后端地址)。
|
||||
- 修改数据库结构或 seed:请参考仓库根的 SQL 初始化脚本,任何 DDL/数据变更需同步该脚本并通知数据库管理员/运维。
|
||||
|
||||
- **举例(常见任务示例)**:
|
||||
- 本地联调前端 + 后端(PowerShell):
|
||||
|
||||
```powershell
|
||||
# 启动后端
|
||||
cd openhis-server-new/openhis-application
|
||||
mvn spring-boot:run
|
||||
|
||||
# 启动前端(另开终端)
|
||||
cd openhis-ui-vue3
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### 关键约束
|
||||
- 所有查询使用 `LambdaQueryWrapper`,禁止字符串拼接 SQL
|
||||
- `@Transactional(rollbackFor = Exception.class)` 管理事务
|
||||
- 所有接口标注 `@PreAuthorize` 权限控制
|
||||
- 患者敏感信息在日志中脱敏
|
||||
- **扩展功能不修改原有函数签名**
|
||||
|
||||
---
|
||||
|
||||
## 九、前端开发规范
|
||||
|
||||
### 技术栈
|
||||
- Vue 3 + Vite + Element Plus + Pinia + Axios(基于 RuoYi-Vue3)
|
||||
|
||||
### 目录结构
|
||||
```
|
||||
src/api/{module}/ # API接口
|
||||
src/views/{module}/ # 页面组件
|
||||
src/store/modules/ # Pinia状态管理
|
||||
src/components/ # 公共组件
|
||||
```
|
||||
|
||||
### 关键约束
|
||||
- API前缀:`/healthlink-his/api/v1/`
|
||||
- 路由懒加载:`() => import('@/views/xxx/index.vue')`
|
||||
- 页面使用 `<script setup>` 语法
|
||||
- 按钮权限使用 `v-hasPermi` 指令
|
||||
- `onMounted` 中注册的事件在 `onUnmounted` 中移除
|
||||
|
||||
---
|
||||
|
||||
## 十、Agent 体系
|
||||
|
||||
### 角色与路由
|
||||
|
||||
| 代号 | 名称 | 角色 | 路由关键词 |
|
||||
|------|------|------|-----------|
|
||||
| liubei | 刘备 | 项目经理 | 协调、分派、异常升级 |
|
||||
| zhugeliang | 诸葛亮 | 架构师 | 分析、路由、设计 |
|
||||
| guanyu | 关羽 | 后端开发 | java, api, spring, service, controller |
|
||||
| zhaoyun | 赵云 | 前端开发 | vue, 界面, 显示, 弹窗, 按钮 |
|
||||
| xunyu | 荀彧 | DBA | 数据库, sql, 迁移, mapper xml |
|
||||
| zhangfei | 张飞 | 测试 | 测试, QA, 回归 |
|
||||
| huatuo | 华佗 | 验收 | 需求验收、质量确认 |
|
||||
| chenlin | 陈琳 | 文档 | 文档、归档、Git提交 |
|
||||
|
||||
### 协作流水线
|
||||
|
||||
```
|
||||
刘备(协调) → 诸葛亮(分析路由) → {关羽|赵云}(修复) → 荀彧(DB审查) → 张飞(测试) → 华佗(验收) → 陈琳(归档)
|
||||
```
|
||||
|
||||
### Bug 修复完整管线(BDT 方法论)
|
||||
|
||||
```
|
||||
获取Bug → 设计测试用例 → 基线测试(应失败) → 全链路修复 → 回归测试(应通过) → 扩展测试(无回归) → 提交
|
||||
```
|
||||
|
||||
### Bug 状态管理铁律
|
||||
- 人类提的 Bug:只加备注,不改状态,不改分配
|
||||
- 智能体提的 Bug:可以改分配和加备注
|
||||
- 已关闭/已解决的 Bug 不再处理
|
||||
|
||||
---
|
||||
|
||||
## 十一、审查与审计
|
||||
|
||||
### 三层审查体系
|
||||
|
||||
| 层级 | 内容 | 时机 |
|
||||
|------|------|------|
|
||||
| **L1 自审** | Agent 对照约束逐条检查 | 每次提交前 |
|
||||
| **L2 配对审查** | Agent 生成变更摘要,人类终审 | PR/提交时 |
|
||||
| **L3 合规审查** | 审计追踪,记录所有 AI 操作 | 持续 |
|
||||
|
||||
### L1 自审清单
|
||||
```yaml
|
||||
self_review:
|
||||
- "所有修改能通过编译?"
|
||||
- "遵守命名规范?"
|
||||
- "测试覆盖达标?"
|
||||
- "没有遗漏的 TODO / DEBUG?"
|
||||
- "变更范围没超出任务边界?"
|
||||
```
|
||||
|
||||
### 评审评分维度
|
||||
| 维度 | 问题 |
|
||||
|------|------|
|
||||
| 正确性 | 行为是否符合目标功能? |
|
||||
| 验证 | 检查是否真的跑过并留下证据? |
|
||||
| 范围纪律 | 是否保持在选定功能范围内? |
|
||||
| 可靠性 | 结果能否在重启后继续工作? |
|
||||
| 可维护性 | 代码和文档是否清楚到可交接? |
|
||||
|
||||
---
|
||||
|
||||
## 十二、标准工作循环
|
||||
|
||||
```
|
||||
开始会话
|
||||
├→ 1. Init — 读 AGENTS.md + PROGRESS.md + git log
|
||||
├→ 2. Select — 只选一个未完成功能
|
||||
├→ 3. Implement — 一次只做一个,不扩大范围
|
||||
├→ 4. Verify — 运行验证命令,有证据才标记完成
|
||||
└→ 5. Cleanup — 更新进度 + clean-state-checklist + git commit
|
||||
```
|
||||
|
||||
### 会话结束前必须运行 Clean State Checklist
|
||||
```
|
||||
□ 标准启动路径仍然可用
|
||||
□ 标准验证路径仍然可运行
|
||||
□ 当前进度已记录到进度日志
|
||||
□ 无半成品步骤处于未记录状态
|
||||
□ 下一轮会话无需人工修复即可继续
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十三、开发流程
|
||||
|
||||
```
|
||||
收到任务
|
||||
├→ ① 分析需求 → 读相关文档(MD/)、读全链路6环
|
||||
├→ ② 制定计划 → update_plan (3-6个阶段)
|
||||
├→ ③ 后端开发 → Controller → AppService → Service → Mapper → Entity → Flyway
|
||||
├→ ④ 后端测试 → mvn test → 接口测试(业务逻辑验证)
|
||||
├→ ⑤ 前端开发 → API接口 → 页面组件 → 路由配置
|
||||
├→ ⑥ 前端测试 → npm run build:dev → 功能验证
|
||||
├→ ⑦ 质量门禁 → L1编译 → L2测试 → L3DB审查 → L4验收 → L5归档
|
||||
└→ ⑧ 提交代码 → git commit(规范格式) → git push → 文档更新
|
||||
```
|
||||
|
||||
### Git Commit 格式
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
type: feat|fix|docs|refactor|test|chore
|
||||
scope: 模块名(如 registration, billing, pharmacy)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十四、快速参考命令
|
||||
|
||||
```bash
|
||||
# === 后端 ===
|
||||
export JAVA_HOME=/opt/jdk-25
|
||||
mvn clean compile -DskipTests # 编译
|
||||
mvn install -DskipTests # 构建
|
||||
mvn test -pl healthlink-his-application -Dtest="XxxTest" -Dsurefire.failIfNoSpecifiedTests=false
|
||||
|
||||
# === 前端 ===
|
||||
cd healthlink-his-ui
|
||||
npm run dev && npm run build:dev && npm run lint && npm run test:run
|
||||
|
||||
# === Git ===
|
||||
git status && git add -A && git commit -m "feat(module): desc" && git push origin develop
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十五、详细规范文档索引
|
||||
|
||||
| 文档 | 路径 | 用途 |
|
||||
|------|------|------|
|
||||
| 执行铁律 | `MD/specs/IRON_RULES.md` | 铁律完整版 |
|
||||
| 后端规范 | `MD/specs/BACKEND_DEVELOPMENT_STANDARD.md` | 后端编码标准 |
|
||||
| 前端规范 | `MD/specs/FRONTEND_DEVELOPMENT_STANDARD.md` | 前端编码标准 |
|
||||
| Harness方法论 | `MD/specs/HARNESS_ENGINEERING.md` | 完整Harness+Agent方法论 |
|
||||
| 文档规范 | `MD/DOCUMENTATION_STANDARD.md` | 文档管理标准 |
|
||||
| 后端清单 | `MD/specs/BACKEND_CHECKLIST.md` | 发布前检查 |
|
||||
| 前端清单 | `MD/specs/FRONTEND_CHECKLIST.md` | 发布前检查 |
|
||||
| 三甲标准 | `MD/standards/GRADE3A_HIS_STANDARD.md` | 三甲医院达标标准 |
|
||||
| Flyway指南 | `MD/guides/FLYWAY_USAGE_GUIDE.md` | 数据库迁移指南 |
|
||||
|
||||
---
|
||||
|
||||
## 十六、过往教训
|
||||
|
||||
| 教训 | 内容 |
|
||||
|------|------|
|
||||
| 状态链路断裂 | Bug#574: 签到设 BOOKED(1) 而非 CHECKED_IN(3),前端映射缺失 → 必须走完整状态链路 |
|
||||
| 盲删源文件 | AI 看到编译错误直接删文件,没检查 baseline → 必须先确认文件来源 |
|
||||
| 修复方向偏差 | 多次 fallback 改的是错误的 Service → 必须用 rg 搜索所有相关代码路径 |
|
||||
| bug_reports 缺列 | INSERT 静默失败 → 必须检查表结构 |
|
||||
| 禅道 comment API | API 不存在,用 resolve+activate workaround |
|
||||
| SQLite WAL 并发 | 多进程并发写需要 checkpoint |
|
||||
| UTF-8 切片 | 多字节字符不能用 byte index 切片 |
|
||||
| 上下文焦虑 | Agent 感觉上下文快满时会匆忙结束,跳过验证 → 注意 context 40% 阈值 |
|
||||
| 过早宣告胜利 | 自评≠验证,分开"干活"和"检查" |
|
||||
| 覆盖率幻觉 | 覆盖率达标但逻辑没测 → 引入变异测试 |
|
||||
|
||||
---
|
||||
|
||||
> ⚠️ 本文件是 AI 开发规范的唯一信源。各工具配置文件由 `bash scripts/sync-ai-rules.sh` 同步。
|
||||
|
||||
---
|
||||
|
||||
> 📅 最后同步: 2026-06-06 15:09 | 源文件: RULES.md | 重新同步: `bash scripts/sync-ai-rules.sh`
|
||||
如需我把这些内容合并为更短或更详细的版本,或把其中某部分(例如后端模块依赖关系图、关键 Java 包说明)展开,请告诉我要增强哪一节。
|
||||
|
||||
501
.gitignore
vendored
501
.gitignore
vendored
@@ -1,436 +1,65 @@
|
||||
/.vscode/mcp.json
|
||||
/.vscode/settings.json
|
||||
/.qwen/settings.json.orig
|
||||
/.playwright-mcp/console-2026-03-31T08-27-30-883Z.log
|
||||
/.playwright-mcp/console-2026-05-19T03-10-43-600Z.log
|
||||
/.playwright-mcp/console-2026-05-19T03-18-23-396Z.log
|
||||
/.playwright-mcp/console-2026-05-19T03-18-51-946Z.log
|
||||
/.playwright-mcp/page-2026-05-11T02-56-22-027Z.yml
|
||||
/.playwright-mcp/page-2026-05-11T02-56-30-095Z.yml
|
||||
/.playwright-mcp/page-2026-05-19T03-10-44-171Z.yml
|
||||
/.playwright-mcp/page-2026-05-19T03-11-20-520Z.yml
|
||||
/.playwright-mcp/page-2026-05-19T03-11-40-168Z.yml
|
||||
/.playwright-mcp/page-2026-05-19T03-12-10-968Z.yml
|
||||
/.playwright-mcp/page-2026-05-19T03-18-23-610Z.yml
|
||||
/.playwright-mcp/page-2026-05-19T03-18-52-634Z.yml
|
||||
/.playwright-mcp/page-2026-05-19T03-19-19-472Z.yml
|
||||
/.playwright-mcp/page-2026-05-19T03-19-36-669Z.yml
|
||||
/.playwright-mcp/page-2026-05-19T03-20-04-342Z.yml
|
||||
/.playwright-mcp/page-2026-05-19T03-21-08-820Z.yml
|
||||
/.playwright-mcp/page-2026-05-19T03-21-43-735Z.yml
|
||||
/.idea/compiler.xml
|
||||
/.idea/encodings.xml
|
||||
/.idea/jarRepositories.xml
|
||||
/.idea/misc.xml
|
||||
/.idea/vcs.xml
|
||||
/.idea/workspace.xml
|
||||
/node_modules/.bin/husky
|
||||
/node_modules/.bin/husky.cmd
|
||||
/node_modules/.bin/husky.ps1
|
||||
/node_modules/asynckit/lib/abort.js
|
||||
/node_modules/asynckit/lib/async.js
|
||||
/node_modules/asynckit/lib/defer.js
|
||||
/node_modules/asynckit/lib/iterate.js
|
||||
/node_modules/asynckit/lib/readable_asynckit.js
|
||||
/node_modules/asynckit/lib/readable_parallel.js
|
||||
/node_modules/asynckit/lib/readable_serial.js
|
||||
/node_modules/asynckit/lib/readable_serial_ordered.js
|
||||
/node_modules/asynckit/lib/state.js
|
||||
/node_modules/asynckit/lib/streamify.js
|
||||
/node_modules/asynckit/lib/terminator.js
|
||||
/node_modules/asynckit/bench.js
|
||||
/node_modules/asynckit/index.js
|
||||
/node_modules/asynckit/LICENSE
|
||||
/node_modules/asynckit/package.json
|
||||
/node_modules/asynckit/parallel.js
|
||||
/node_modules/asynckit/README.md
|
||||
/node_modules/asynckit/serial.js
|
||||
/node_modules/asynckit/serialOrdered.js
|
||||
/node_modules/asynckit/stream.js
|
||||
/node_modules/axios/dist/browser/axios.cjs
|
||||
/node_modules/axios/dist/esm/axios.js
|
||||
/node_modules/axios/dist/esm/axios.min.js
|
||||
/node_modules/axios/dist/esm/axios.min.js.map
|
||||
/node_modules/axios/dist/node/axios.cjs
|
||||
/node_modules/axios/dist/axios.js
|
||||
/node_modules/axios/dist/axios.min.js
|
||||
/node_modules/axios/dist/axios.min.js.map
|
||||
/node_modules/axios/lib/adapters/adapters.js
|
||||
/node_modules/axios/lib/adapters/fetch.js
|
||||
/node_modules/axios/lib/adapters/http.js
|
||||
/node_modules/axios/lib/adapters/README.md
|
||||
/node_modules/axios/lib/adapters/xhr.js
|
||||
/node_modules/axios/lib/cancel/CanceledError.js
|
||||
/node_modules/axios/lib/cancel/CancelToken.js
|
||||
/node_modules/axios/lib/cancel/isCancel.js
|
||||
/node_modules/axios/lib/core/Axios.js
|
||||
/node_modules/axios/lib/core/AxiosError.js
|
||||
/node_modules/axios/lib/core/AxiosHeaders.js
|
||||
/node_modules/axios/lib/core/buildFullPath.js
|
||||
/node_modules/axios/lib/core/dispatchRequest.js
|
||||
/node_modules/axios/lib/core/InterceptorManager.js
|
||||
/node_modules/axios/lib/core/mergeConfig.js
|
||||
/node_modules/axios/lib/core/README.md
|
||||
/node_modules/axios/lib/core/settle.js
|
||||
/node_modules/axios/lib/core/transformData.js
|
||||
/node_modules/axios/lib/defaults/index.js
|
||||
/node_modules/axios/lib/defaults/transitional.js
|
||||
/node_modules/axios/lib/env/classes/FormData.js
|
||||
/node_modules/axios/lib/env/data.js
|
||||
/node_modules/axios/lib/env/README.md
|
||||
/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
||||
/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
||||
/node_modules/axios/lib/helpers/bind.js
|
||||
/node_modules/axios/lib/helpers/buildURL.js
|
||||
/node_modules/axios/lib/helpers/callbackify.js
|
||||
/node_modules/axios/lib/helpers/combineURLs.js
|
||||
/node_modules/axios/lib/helpers/composeSignals.js
|
||||
/node_modules/axios/lib/helpers/cookies.js
|
||||
/node_modules/axios/lib/helpers/deprecatedMethod.js
|
||||
/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
|
||||
/node_modules/axios/lib/helpers/formDataToJSON.js
|
||||
/node_modules/axios/lib/helpers/formDataToStream.js
|
||||
/node_modules/axios/lib/helpers/fromDataURI.js
|
||||
/node_modules/axios/lib/helpers/HttpStatusCode.js
|
||||
/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
||||
/node_modules/axios/lib/helpers/isAxiosError.js
|
||||
/node_modules/axios/lib/helpers/isURLSameOrigin.js
|
||||
/node_modules/axios/lib/helpers/null.js
|
||||
/node_modules/axios/lib/helpers/parseHeaders.js
|
||||
/node_modules/axios/lib/helpers/parseProtocol.js
|
||||
/node_modules/axios/lib/helpers/progressEventReducer.js
|
||||
/node_modules/axios/lib/helpers/readBlob.js
|
||||
/node_modules/axios/lib/helpers/README.md
|
||||
/node_modules/axios/lib/helpers/resolveConfig.js
|
||||
/node_modules/axios/lib/helpers/speedometer.js
|
||||
/node_modules/axios/lib/helpers/spread.js
|
||||
/node_modules/axios/lib/helpers/throttle.js
|
||||
/node_modules/axios/lib/helpers/toFormData.js
|
||||
/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
||||
/node_modules/axios/lib/helpers/trackStream.js
|
||||
/node_modules/axios/lib/helpers/validator.js
|
||||
/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
||||
/node_modules/axios/lib/platform/browser/classes/Blob.js
|
||||
/node_modules/axios/lib/platform/browser/classes/FormData.js
|
||||
/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
|
||||
/node_modules/axios/lib/platform/browser/index.js
|
||||
/node_modules/axios/lib/platform/common/utils.js
|
||||
/node_modules/axios/lib/platform/node/classes/FormData.js
|
||||
/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
||||
/node_modules/axios/lib/platform/node/index.js
|
||||
/node_modules/axios/lib/platform/index.js
|
||||
/node_modules/axios/lib/axios.js
|
||||
/node_modules/axios/lib/utils.js
|
||||
/node_modules/axios/CHANGELOG.md
|
||||
/node_modules/axios/index.d.cts
|
||||
/node_modules/axios/index.d.ts
|
||||
/node_modules/axios/index.js
|
||||
/node_modules/axios/LICENSE
|
||||
/node_modules/axios/MIGRATION_GUIDE.md
|
||||
/node_modules/axios/package.json
|
||||
/node_modules/axios/README.md
|
||||
/node_modules/bignumber.js/doc/API.html
|
||||
/node_modules/bignumber.js/bignumber.d.mts
|
||||
/node_modules/bignumber.js/bignumber.d.ts
|
||||
/node_modules/bignumber.js/bignumber.js
|
||||
/node_modules/bignumber.js/bignumber.mjs
|
||||
/node_modules/bignumber.js/CHANGELOG.md
|
||||
/node_modules/bignumber.js/LICENCE.md
|
||||
/node_modules/bignumber.js/package.json
|
||||
/node_modules/bignumber.js/README.md
|
||||
/node_modules/bignumber.js/types.d.ts
|
||||
/node_modules/call-bind-apply-helpers/.github/FUNDING.yml
|
||||
/node_modules/call-bind-apply-helpers/test/index.js
|
||||
/node_modules/call-bind-apply-helpers/.eslintrc
|
||||
/node_modules/call-bind-apply-helpers/.nycrc
|
||||
/node_modules/call-bind-apply-helpers/actualApply.d.ts
|
||||
/node_modules/call-bind-apply-helpers/actualApply.js
|
||||
/node_modules/call-bind-apply-helpers/applyBind.d.ts
|
||||
/node_modules/call-bind-apply-helpers/applyBind.js
|
||||
/node_modules/call-bind-apply-helpers/CHANGELOG.md
|
||||
/node_modules/call-bind-apply-helpers/functionApply.d.ts
|
||||
/node_modules/call-bind-apply-helpers/functionApply.js
|
||||
/node_modules/call-bind-apply-helpers/functionCall.d.ts
|
||||
/node_modules/call-bind-apply-helpers/functionCall.js
|
||||
/node_modules/call-bind-apply-helpers/index.d.ts
|
||||
/node_modules/call-bind-apply-helpers/index.js
|
||||
/node_modules/call-bind-apply-helpers/LICENSE
|
||||
/node_modules/call-bind-apply-helpers/package.json
|
||||
/node_modules/call-bind-apply-helpers/README.md
|
||||
/node_modules/call-bind-apply-helpers/reflectApply.d.ts
|
||||
/node_modules/call-bind-apply-helpers/reflectApply.js
|
||||
/node_modules/call-bind-apply-helpers/tsconfig.json
|
||||
/node_modules/combined-stream/lib/combined_stream.js
|
||||
/node_modules/combined-stream/License
|
||||
/node_modules/combined-stream/package.json
|
||||
/node_modules/combined-stream/Readme.md
|
||||
/node_modules/combined-stream/yarn.lock
|
||||
/node_modules/delayed-stream/lib/delayed_stream.js
|
||||
/node_modules/delayed-stream/.npmignore
|
||||
/node_modules/delayed-stream/License
|
||||
/node_modules/delayed-stream/Makefile
|
||||
/node_modules/delayed-stream/package.json
|
||||
/node_modules/delayed-stream/Readme.md
|
||||
/node_modules/dunder-proto/.github/FUNDING.yml
|
||||
/node_modules/dunder-proto/test/get.js
|
||||
/node_modules/dunder-proto/test/index.js
|
||||
/node_modules/dunder-proto/test/set.js
|
||||
/node_modules/dunder-proto/.eslintrc
|
||||
/node_modules/dunder-proto/.nycrc
|
||||
/node_modules/dunder-proto/CHANGELOG.md
|
||||
/node_modules/dunder-proto/get.d.ts
|
||||
/node_modules/dunder-proto/get.js
|
||||
/node_modules/dunder-proto/LICENSE
|
||||
/node_modules/dunder-proto/package.json
|
||||
/node_modules/dunder-proto/README.md
|
||||
/node_modules/dunder-proto/set.d.ts
|
||||
/node_modules/dunder-proto/set.js
|
||||
/node_modules/dunder-proto/tsconfig.json
|
||||
/node_modules/es-define-property/.github/FUNDING.yml
|
||||
/node_modules/es-define-property/test/index.js
|
||||
/node_modules/es-define-property/.eslintrc
|
||||
/node_modules/es-define-property/.nycrc
|
||||
/node_modules/es-define-property/CHANGELOG.md
|
||||
/node_modules/es-define-property/index.d.ts
|
||||
/node_modules/es-define-property/index.js
|
||||
/node_modules/es-define-property/LICENSE
|
||||
/node_modules/es-define-property/package.json
|
||||
/node_modules/es-define-property/README.md
|
||||
/node_modules/es-define-property/tsconfig.json
|
||||
/node_modules/es-errors/.github/FUNDING.yml
|
||||
/node_modules/es-errors/test/index.js
|
||||
/node_modules/es-errors/.eslintrc
|
||||
/node_modules/es-errors/CHANGELOG.md
|
||||
/node_modules/es-errors/eval.d.ts
|
||||
/node_modules/es-errors/eval.js
|
||||
/node_modules/es-errors/index.d.ts
|
||||
/node_modules/es-errors/index.js
|
||||
/node_modules/es-errors/LICENSE
|
||||
/node_modules/es-errors/package.json
|
||||
/node_modules/es-errors/range.d.ts
|
||||
/node_modules/es-errors/range.js
|
||||
/node_modules/es-errors/README.md
|
||||
/node_modules/es-errors/ref.d.ts
|
||||
/node_modules/es-errors/ref.js
|
||||
/node_modules/es-errors/syntax.d.ts
|
||||
/node_modules/es-errors/syntax.js
|
||||
/node_modules/es-errors/tsconfig.json
|
||||
/node_modules/es-errors/type.d.ts
|
||||
/node_modules/es-errors/type.js
|
||||
/node_modules/es-errors/uri.d.ts
|
||||
/node_modules/es-errors/uri.js
|
||||
/node_modules/es-object-atoms/.github/FUNDING.yml
|
||||
/node_modules/es-object-atoms/test/index.js
|
||||
/node_modules/es-object-atoms/.eslintrc
|
||||
/node_modules/es-object-atoms/CHANGELOG.md
|
||||
/node_modules/es-object-atoms/index.d.ts
|
||||
/node_modules/es-object-atoms/index.js
|
||||
/node_modules/es-object-atoms/isObject.d.ts
|
||||
/node_modules/es-object-atoms/isObject.js
|
||||
/node_modules/es-object-atoms/LICENSE
|
||||
/node_modules/es-object-atoms/package.json
|
||||
/node_modules/es-object-atoms/README.md
|
||||
/node_modules/es-object-atoms/RequireObjectCoercible.d.ts
|
||||
/node_modules/es-object-atoms/RequireObjectCoercible.js
|
||||
/node_modules/es-object-atoms/ToObject.d.ts
|
||||
/node_modules/es-object-atoms/ToObject.js
|
||||
/node_modules/es-object-atoms/tsconfig.json
|
||||
/node_modules/es-set-tostringtag/test/index.js
|
||||
/node_modules/es-set-tostringtag/.eslintrc
|
||||
/node_modules/es-set-tostringtag/.nycrc
|
||||
/node_modules/es-set-tostringtag/CHANGELOG.md
|
||||
/node_modules/es-set-tostringtag/index.d.ts
|
||||
/node_modules/es-set-tostringtag/index.js
|
||||
/node_modules/es-set-tostringtag/LICENSE
|
||||
/node_modules/es-set-tostringtag/package.json
|
||||
/node_modules/es-set-tostringtag/README.md
|
||||
/node_modules/es-set-tostringtag/tsconfig.json
|
||||
/node_modules/follow-redirects/debug.js
|
||||
/node_modules/follow-redirects/http.js
|
||||
/node_modules/follow-redirects/https.js
|
||||
/node_modules/follow-redirects/index.js
|
||||
/node_modules/follow-redirects/LICENSE
|
||||
/node_modules/follow-redirects/package.json
|
||||
/node_modules/follow-redirects/README.md
|
||||
/node_modules/form-data/lib/browser.js
|
||||
/node_modules/form-data/lib/form_data.js
|
||||
/node_modules/form-data/lib/populate.js
|
||||
/node_modules/form-data/CHANGELOG.md
|
||||
/node_modules/form-data/index.d.ts
|
||||
/node_modules/form-data/License
|
||||
/node_modules/form-data/package.json
|
||||
/node_modules/form-data/README.md
|
||||
/node_modules/function-bind/.github/FUNDING.yml
|
||||
/node_modules/function-bind/.github/SECURITY.md
|
||||
/node_modules/function-bind/test/.eslintrc
|
||||
/node_modules/function-bind/test/index.js
|
||||
/node_modules/function-bind/.eslintrc
|
||||
/node_modules/function-bind/.nycrc
|
||||
/node_modules/function-bind/CHANGELOG.md
|
||||
/node_modules/function-bind/implementation.js
|
||||
/node_modules/function-bind/index.js
|
||||
/node_modules/function-bind/LICENSE
|
||||
/node_modules/function-bind/package.json
|
||||
/node_modules/function-bind/README.md
|
||||
/node_modules/get-intrinsic/.github/FUNDING.yml
|
||||
/node_modules/get-intrinsic/test/GetIntrinsic.js
|
||||
/node_modules/get-intrinsic/.eslintrc
|
||||
/node_modules/get-intrinsic/.nycrc
|
||||
/node_modules/get-intrinsic/CHANGELOG.md
|
||||
/node_modules/get-intrinsic/index.js
|
||||
/node_modules/get-intrinsic/LICENSE
|
||||
/node_modules/get-intrinsic/package.json
|
||||
/node_modules/get-intrinsic/README.md
|
||||
/node_modules/get-proto/.github/FUNDING.yml
|
||||
/node_modules/get-proto/test/index.js
|
||||
/node_modules/get-proto/.eslintrc
|
||||
/node_modules/get-proto/.nycrc
|
||||
/node_modules/get-proto/CHANGELOG.md
|
||||
/node_modules/get-proto/index.d.ts
|
||||
/node_modules/get-proto/index.js
|
||||
/node_modules/get-proto/LICENSE
|
||||
/node_modules/get-proto/Object.getPrototypeOf.d.ts
|
||||
/node_modules/get-proto/Object.getPrototypeOf.js
|
||||
/node_modules/get-proto/package.json
|
||||
/node_modules/get-proto/README.md
|
||||
/node_modules/get-proto/Reflect.getPrototypeOf.d.ts
|
||||
/node_modules/get-proto/Reflect.getPrototypeOf.js
|
||||
/node_modules/get-proto/tsconfig.json
|
||||
/node_modules/gopd/.github/FUNDING.yml
|
||||
/node_modules/gopd/test/index.js
|
||||
/node_modules/gopd/.eslintrc
|
||||
/node_modules/gopd/CHANGELOG.md
|
||||
/node_modules/gopd/gOPD.d.ts
|
||||
/node_modules/gopd/gOPD.js
|
||||
/node_modules/gopd/index.d.ts
|
||||
/node_modules/gopd/index.js
|
||||
/node_modules/gopd/LICENSE
|
||||
/node_modules/gopd/package.json
|
||||
/node_modules/gopd/README.md
|
||||
/node_modules/gopd/tsconfig.json
|
||||
/node_modules/has-symbols/.github/FUNDING.yml
|
||||
/node_modules/has-symbols/test/shams/core-js.js
|
||||
/node_modules/has-symbols/test/shams/get-own-property-symbols.js
|
||||
/node_modules/has-symbols/test/index.js
|
||||
/node_modules/has-symbols/test/tests.js
|
||||
/node_modules/has-symbols/.eslintrc
|
||||
/node_modules/has-symbols/.nycrc
|
||||
/node_modules/has-symbols/CHANGELOG.md
|
||||
/node_modules/has-symbols/index.d.ts
|
||||
/node_modules/has-symbols/index.js
|
||||
/node_modules/has-symbols/LICENSE
|
||||
/node_modules/has-symbols/package.json
|
||||
/node_modules/has-symbols/README.md
|
||||
/node_modules/has-symbols/shams.d.ts
|
||||
/node_modules/has-symbols/shams.js
|
||||
/node_modules/has-symbols/tsconfig.json
|
||||
/node_modules/has-tostringtag/.github/FUNDING.yml
|
||||
/node_modules/has-tostringtag/test/shams/core-js.js
|
||||
/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js
|
||||
/node_modules/has-tostringtag/test/index.js
|
||||
/node_modules/has-tostringtag/test/tests.js
|
||||
/node_modules/has-tostringtag/.eslintrc
|
||||
/node_modules/has-tostringtag/.nycrc
|
||||
/node_modules/has-tostringtag/CHANGELOG.md
|
||||
/node_modules/has-tostringtag/index.d.ts
|
||||
/node_modules/has-tostringtag/index.js
|
||||
/node_modules/has-tostringtag/LICENSE
|
||||
/node_modules/has-tostringtag/package.json
|
||||
/node_modules/has-tostringtag/README.md
|
||||
/node_modules/has-tostringtag/shams.d.ts
|
||||
/node_modules/has-tostringtag/shams.js
|
||||
/node_modules/has-tostringtag/tsconfig.json
|
||||
/node_modules/hasown/.github/FUNDING.yml
|
||||
/node_modules/hasown/.nycrc
|
||||
/node_modules/hasown/CHANGELOG.md
|
||||
/node_modules/hasown/index.d.ts
|
||||
/node_modules/hasown/index.js
|
||||
/node_modules/hasown/LICENSE
|
||||
/node_modules/hasown/package.json
|
||||
/node_modules/hasown/README.md
|
||||
/node_modules/hasown/tsconfig.json
|
||||
/node_modules/husky/bin.js
|
||||
/node_modules/husky/husky
|
||||
/node_modules/husky/index.d.ts
|
||||
/node_modules/husky/index.js
|
||||
/node_modules/husky/LICENSE
|
||||
/node_modules/husky/package.json
|
||||
/node_modules/husky/README.md
|
||||
/node_modules/json-bigint/lib/parse.js
|
||||
/node_modules/json-bigint/lib/stringify.js
|
||||
/node_modules/json-bigint/index.js
|
||||
/node_modules/json-bigint/LICENSE
|
||||
/node_modules/json-bigint/package.json
|
||||
/node_modules/json-bigint/README.md
|
||||
/node_modules/math-intrinsics/.github/FUNDING.yml
|
||||
/node_modules/math-intrinsics/constants/maxArrayLength.d.ts
|
||||
/node_modules/math-intrinsics/constants/maxArrayLength.js
|
||||
/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts
|
||||
/node_modules/math-intrinsics/constants/maxSafeInteger.js
|
||||
/node_modules/math-intrinsics/constants/maxValue.d.ts
|
||||
/node_modules/math-intrinsics/constants/maxValue.js
|
||||
/node_modules/math-intrinsics/test/index.js
|
||||
/node_modules/math-intrinsics/.eslintrc
|
||||
/node_modules/math-intrinsics/abs.d.ts
|
||||
/node_modules/math-intrinsics/abs.js
|
||||
/node_modules/math-intrinsics/CHANGELOG.md
|
||||
/node_modules/math-intrinsics/floor.d.ts
|
||||
/node_modules/math-intrinsics/floor.js
|
||||
/node_modules/math-intrinsics/isFinite.d.ts
|
||||
/node_modules/math-intrinsics/isFinite.js
|
||||
/node_modules/math-intrinsics/isInteger.d.ts
|
||||
/node_modules/math-intrinsics/isInteger.js
|
||||
/node_modules/math-intrinsics/isNaN.d.ts
|
||||
/node_modules/math-intrinsics/isNaN.js
|
||||
/node_modules/math-intrinsics/isNegativeZero.d.ts
|
||||
/node_modules/math-intrinsics/isNegativeZero.js
|
||||
/node_modules/math-intrinsics/LICENSE
|
||||
/node_modules/math-intrinsics/max.d.ts
|
||||
/node_modules/math-intrinsics/max.js
|
||||
/node_modules/math-intrinsics/min.d.ts
|
||||
/node_modules/math-intrinsics/min.js
|
||||
/node_modules/math-intrinsics/mod.d.ts
|
||||
/node_modules/math-intrinsics/mod.js
|
||||
/node_modules/math-intrinsics/package.json
|
||||
/node_modules/math-intrinsics/pow.d.ts
|
||||
/node_modules/math-intrinsics/pow.js
|
||||
/node_modules/math-intrinsics/README.md
|
||||
/node_modules/math-intrinsics/round.d.ts
|
||||
/node_modules/math-intrinsics/round.js
|
||||
/node_modules/math-intrinsics/sign.d.ts
|
||||
/node_modules/math-intrinsics/sign.js
|
||||
/node_modules/math-intrinsics/tsconfig.json
|
||||
/node_modules/mime-db/db.json
|
||||
/node_modules/mime-db/HISTORY.md
|
||||
/node_modules/mime-db/index.js
|
||||
/node_modules/mime-db/LICENSE
|
||||
/node_modules/mime-db/package.json
|
||||
/node_modules/mime-db/README.md
|
||||
/node_modules/mime-types/HISTORY.md
|
||||
/node_modules/mime-types/index.js
|
||||
/node_modules/mime-types/LICENSE
|
||||
/node_modules/mime-types/package.json
|
||||
/node_modules/mime-types/README.md
|
||||
/node_modules/proxy-from-env/index.js
|
||||
/node_modules/proxy-from-env/LICENSE
|
||||
/node_modules/proxy-from-env/package.json
|
||||
/node_modules/proxy-from-env/README.md
|
||||
/node_modules/.package-lock.json
|
||||
/.idea/shelf/在进行更新之前于_2026_6_5_16_37_取消提交了更改_[更改]/shelved.patch
|
||||
/.idea/shelf/在进行更新之前于_2026_6_6_07_53_取消提交了更改_[更改]/shelved.patch
|
||||
/.idea/shelf/在进行更新之前于_2026_6_6_07_58_取消提交了更改_[更改]/shelved.patch
|
||||
/.idea/shelf/在进行更新之前于_2026_6_6_09_03_取消提交了更改_[更改]/shelved.patch
|
||||
/.idea/shelf/在进行更新之前于_2026_6_6_09_07_取消提交了更改_[更改]/shelved.patch
|
||||
/.idea/shelf/在进行更新之前于_2026_6_6_09_17_取消提交了更改_[更改]/shelved.patch
|
||||
/.idea/shelf/_2026_6_5_16_37____.xml
|
||||
/.idea/shelf/_2026_6_6_07_53____.xml
|
||||
/.idea/shelf/_2026_6_6_07_58____.xml
|
||||
/.idea/shelf/_2026_6_6_09_03____.xml
|
||||
/.idea/shelf/_2026_6_6_09_07____.xml
|
||||
/.idea/shelf/_2026_6_6_09_17____.xml
|
||||
/.idea/shelf/在进行更新之前于_2026_6_5_16_37_取消提交了更改_[更改]/shelved.patch
|
||||
/.idea/shelf/在进行更新之前于_2026_6_6_07_53_取消提交了更改_[更改]/shelved.patch
|
||||
/.idea/shelf/在进行更新之前于_2026_6_6_07_58_取消提交了更改_[更改]/shelved.patch
|
||||
/.idea/shelf/在进行更新之前于_2026_6_6_09_03_取消提交了更改_[更改]/shelved.patch
|
||||
/.idea/shelf/在进行更新之前于_2026_6_6_09_07_取消提交了更改_[更改]/shelved.patch
|
||||
/.idea/shelf/在进行更新之前于_2026_6_6_09_17_取消提交了更改_[更改]/shelved.patch
|
||||
# 忽略所有编译器、IDE相关的文件
|
||||
**/.idea/
|
||||
**/.vscode/
|
||||
**/*.swp
|
||||
**/*.swo
|
||||
**/*.bak
|
||||
**/*.tmp
|
||||
**/.vs/
|
||||
|
||||
# 忽略 Java 项目编译文件
|
||||
**/*.class
|
||||
**/*.jar
|
||||
**/*.war
|
||||
**/*.ear
|
||||
**/target/
|
||||
**/bin/
|
||||
|
||||
# 忽略 Maven、Gradle、Ant 相关文件
|
||||
**/.mvn/
|
||||
**/.gradle/
|
||||
**/build/
|
||||
**/out/
|
||||
|
||||
# 忽略 Eclipse、IntelliJ IDEA 和 NetBeans 临时文件
|
||||
**/*.log
|
||||
**/*.project
|
||||
**/*.classpath
|
||||
|
||||
# 忽略 Java 配置文件
|
||||
**/*.iml
|
||||
|
||||
# 忽略 Node.js 和 Vue 项目相关文件
|
||||
**/node_modules/
|
||||
**/npm-debug.log
|
||||
**/yarn-error.log
|
||||
**/yarn-debug.log
|
||||
**/dist/
|
||||
**/*.lock
|
||||
**/*.tgz
|
||||
|
||||
# 忽略 Vue 项目相关构建文件
|
||||
**/.vuepress/dist/
|
||||
|
||||
# 忽略 IDE 配置文件
|
||||
**/*.launch
|
||||
**/*.settings/
|
||||
|
||||
# 忽略操作系统生成的文件
|
||||
**/.DS_Store
|
||||
**/Thumbs.db
|
||||
**/Desktop.ini
|
||||
|
||||
|
||||
|
||||
/openhis-miniapp/unpackage
|
||||
|
||||
# 忽略设计书
|
||||
PostgreSQL/openHis_DB设计书.xlsx
|
||||
|
||||
public.sql
|
||||
发版记录/2025-11-12/~$发版日志.docx
|
||||
发版记录/2025-11-12/~$S-管理系统-调价管理.docx
|
||||
发版记录/2025-11-12/发版日志.docx
|
||||
.gitignore
|
||||
openhis-server-new/openhis-application/src/main/resources/application-dev.yml
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# 进度日志
|
||||
|
||||
## 当前已验证状态
|
||||
|
||||
- 仓库根目录:`/root/.openclaw/workspace/his-repo`
|
||||
- 分支:`develop`
|
||||
- 标准启动路径:`cd healthlink-his-server && mvn compile -pl healthlink-his-application -am`
|
||||
- 标准验证路径:`bash .harness/check.sh`(一键全部门禁)
|
||||
- 标准初始化:`bash .harness/init.sh`
|
||||
- 标准作业流程:`.harness/STANDARD_OPERATING_PROCEDURE.md`
|
||||
- 当前最高优先级未完成功能:`harness-003` — 持续完善 check.sh
|
||||
- 当前 blocker:无
|
||||
|
||||
## 会话记录
|
||||
|
||||
### Session 001 (2026-05-28) — 基础设施 v1
|
||||
- 已完成:AGENTS.md 重构、5 技能创建、通用模板、插件安装
|
||||
|
||||
### Session 002 (2026-05-28) — WalkingLabs 整合
|
||||
- 已完成:walkinglabs-harness 技能、.harness/ 模板、AGENTS.md v2、check.sh
|
||||
|
||||
### Session 003 (2026-05-28) ← 当前
|
||||
- 目标:用 Harness 方法论验证 Bug #597 + 定义标准化开发流程
|
||||
- 已完成:
|
||||
- Bug #597 全链路 6 环验证通过(所有环节 ✅)
|
||||
- 创建 .harness/STANDARD_OPERATING_PROCEDURE.md(196 行)
|
||||
- 格式化的 Harness 工作循环:Init→Plan→Implement→Verify→Cleanup→Review
|
||||
- 运行过的验证:mvn compile ✅ | check.sh 7/7 ✅ | 全链路 6/6 ✅
|
||||
- 提交记录:
|
||||
- 已知风险或未解决问题:
|
||||
- 下一步最佳动作:无 — 所有基础设施已完成
|
||||
|
||||
## 当前功能状态
|
||||
|
||||
| ID | 功能 | 状态 |
|
||||
|---|---|---|
|
||||
| harness-001 | 基础设施 v1(24 篇博客) | done ✅ |
|
||||
| harness-002 | WalkingLabs 实战模式整合 | done ✅ |
|
||||
| harness-003 | 质量门禁自动化检查脚本 | in_progress 🔄 |
|
||||
@@ -1,196 +0,0 @@
|
||||
# Harness 标准作业程序 (SOP)
|
||||
|
||||
> 所有开发任务、Bug 修复、重构,必须遵循此流程。
|
||||
|
||||
## 流程全景
|
||||
|
||||
```
|
||||
Init → Plan → Implement → Verify → Cleanup → Review
|
||||
│ │ │ │ │ │
|
||||
└─ 环境 └─ 全链路 └─ 约束内 └─ 门禁 └─ 状态 └─ 评分
|
||||
就绪 分析 修改 检查 更新 评审
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 步骤详解
|
||||
|
||||
### Step 1: Init — 环境就绪
|
||||
|
||||
```bash
|
||||
# 1. 确认在正确的目录
|
||||
pwd
|
||||
|
||||
# 2. 运行初始化
|
||||
bash .harness/init.sh
|
||||
|
||||
# 3. 读取当前进度
|
||||
cat .harness/PROGRESS.md
|
||||
cat .harness/feature_list.json
|
||||
|
||||
# 4. 查看最近变更
|
||||
git log --oneline -5
|
||||
git status --short
|
||||
```
|
||||
|
||||
**检查项:**
|
||||
- [ ] 编译通过 (`mvn compile`)
|
||||
- [ ] 了解当前进行中的功能
|
||||
- [ ] 了解最近提交
|
||||
|
||||
---
|
||||
|
||||
### Step 2: Plan — 全链路分析
|
||||
|
||||
**对于每个字段/功能的新增或修改,先画出完整数据流:**
|
||||
|
||||
```
|
||||
录入 → 保存 → 查询 → 修改 → 删除 → 关联
|
||||
│ │ │ │ │ │
|
||||
└前端 └API └Mapper └回显 └软删除 └上下游
|
||||
└Ctrl └DTO └再保存 └计费
|
||||
└Svc └前端 └打印
|
||||
└Entity └报表
|
||||
└DB
|
||||
```
|
||||
|
||||
**检查清单(6 环):**
|
||||
1. **录入** — 前端有输入入口?(弹窗、行编辑、表单)
|
||||
2. **保存** — 前端→API→Controller→Service→Entity→DB,每个入口都传了吗?(注意多个 Service 实现类)
|
||||
3. **查询** — DB→Mapper XML(UNION ALL 子查询统一加)→DTO→前端展示
|
||||
4. **修改** — 编辑回显→修改保存→正确更新?
|
||||
5. **删除/停止** — 状态变更会丢失该字段吗?
|
||||
6. **关联** — 上下游(护士站、药房、计费、打印、报表)需要同步改吗?
|
||||
|
||||
**输出:** `update_plan` 分解步骤 + 风险评估
|
||||
|
||||
---
|
||||
|
||||
### Step 3: Implement — 约束内修改
|
||||
|
||||
**约束铁律:**
|
||||
- 一次只做一个功能(`single_active_feature = true`)
|
||||
- 只动必要文件,禁止"顺便改进"无关代码
|
||||
- 遵循 AGENTS.md 中的代码风格规范
|
||||
- 涉及 Mapper XML 时,UNION ALL 所有子查询统一修改
|
||||
|
||||
**修改原则:**
|
||||
- 安全 > 架构 > 质量 > 性能
|
||||
- 增量修改,每步可回滚
|
||||
- 每个检查点保存进度(`update_plan`)
|
||||
|
||||
---
|
||||
|
||||
### Step 4: Verify — 门禁检查
|
||||
|
||||
```bash
|
||||
# L1: 编译检查
|
||||
cd healthlink-his-server && mvn compile -pl healthlink-his-application -am
|
||||
|
||||
# L2: 全链路门禁
|
||||
bash .harness/check.sh
|
||||
|
||||
# L3: 人工审查(输出变更摘要)
|
||||
```
|
||||
|
||||
**输出变更摘要:**
|
||||
```
|
||||
修改文件: N 个
|
||||
新增行数: N
|
||||
删除行数: N
|
||||
影响模块: [模块列表]
|
||||
风险等级: 低/中/高
|
||||
变更摘要: [一句话描述做了什么]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Step 5: Cleanup — 状态更新
|
||||
|
||||
```bash
|
||||
# 1. 更新进度
|
||||
vim .harness/PROGRESS.md
|
||||
# 添加新会话记录,更新完成状态
|
||||
|
||||
# 2. 更新功能清单
|
||||
vim .harness/feature_list.json
|
||||
# 标记完成/更新状态
|
||||
|
||||
# 3. 运行干净状态检查
|
||||
cat .harness/clean-state-checklist.md
|
||||
# 逐项确认
|
||||
|
||||
# 4. 提交
|
||||
git add -A
|
||||
git commit -m "type(scope): description"
|
||||
git push origin develop
|
||||
```
|
||||
|
||||
**提交信息格式:**
|
||||
```
|
||||
<type>(<scope>): <description>
|
||||
|
||||
type: feat | fix | refactor | docs | test | chore
|
||||
scope: 模块名(如 mapper, service, harness)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Step 6: Review — 评审评分
|
||||
|
||||
对照 `.harness/evaluator-rubric.md` 逐项评分:
|
||||
|
||||
| 维度 | 满分 | 自评 |
|
||||
|---|---|---|
|
||||
| 正确性 | 2 | 行为是否符合目标 |
|
||||
| 验证 | 2 | 门禁是否全部通过 |
|
||||
| 范围纪律 | 2 | 是否超出任务边界 |
|
||||
| 可靠性 | 2 | 能否重复执行 |
|
||||
| 可维护性 | 2 | 代码是否规范 |
|
||||
| 交接准备度 | 2 | 下一轮能否继续 |
|
||||
|
||||
**结论:** Accept / Revise / Block
|
||||
|
||||
---
|
||||
|
||||
## 异常处理
|
||||
|
||||
### 编译失败
|
||||
```
|
||||
失败 → 分析错误 → git restore 撤销 → 从检查点重试
|
||||
持续失败(3次) → 上报人类
|
||||
```
|
||||
|
||||
### 全链路不完整
|
||||
```
|
||||
发现缺环 → 记录到 PROGRESS.md blocker → 补充修复
|
||||
```
|
||||
|
||||
### 范围蔓延
|
||||
```
|
||||
发现超出任务 → 创建新 feature → 当前任务先完成
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 速查命令
|
||||
|
||||
```bash
|
||||
# 诊断
|
||||
pwd # 确认目录
|
||||
git status --short # 查看变更
|
||||
git log --oneline -5 # 查看历史
|
||||
git diff --stat HEAD # 变更统计
|
||||
|
||||
# 回滚
|
||||
git checkout -- <file> # 撤销单个文件
|
||||
git reset HEAD~1 # 撤销上次提交(保留修改)
|
||||
|
||||
# 验证
|
||||
bash .harness/init.sh # 初始化
|
||||
bash .harness/check.sh # 全部门禁
|
||||
|
||||
# 状态
|
||||
cat .harness/PROGRESS.md # 进度
|
||||
cat .harness/feature_list.json # 功能清单
|
||||
```
|
||||
@@ -1,82 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# =============================================
|
||||
# Harness Quality Gates — 一键运行所有门禁
|
||||
# 源自 $closed-loop-testing skill
|
||||
# =============================================
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
PASS=0
|
||||
FAIL=0
|
||||
RESULTS=()
|
||||
|
||||
check() {
|
||||
local level="$1" name="$2" cmd="$3"
|
||||
cd "$ROOT_DIR"
|
||||
echo ""
|
||||
echo "━━━ [${level}] ${name} ━━━"
|
||||
if eval "$cmd" 2>&1; then
|
||||
echo " ✅ ${name} 通过"
|
||||
PASS=$((PASS + 1))
|
||||
RESULTS+=("✅|${level}|${name}")
|
||||
else
|
||||
echo " ❌ ${name} 失败"
|
||||
FAIL=$((FAIL + 1))
|
||||
RESULTS+=("❌|${level}|${name}")
|
||||
fi
|
||||
}
|
||||
|
||||
echo ""
|
||||
echo "╔══════════════════════════════════════╗"
|
||||
echo "║ Harness Quality Gates ║"
|
||||
echo "║ $(date '+%Y-%m-%d %H:%M') ║"
|
||||
echo "╚══════════════════════════════════════╝"
|
||||
|
||||
# ── L1: 编译检查 ──
|
||||
echo ""
|
||||
echo "╔══ L1 编译检查 ══════════════════════╗"
|
||||
check "L1" "后端编译" "cd '$ROOT_DIR/healthlink-his-server' && mvn compile -pl healthlink-his-application -am -q"
|
||||
|
||||
# ── L2: 全链路检查 ──
|
||||
echo ""
|
||||
echo "╔══ L2 全链路数据流验证 ══════════════╗"
|
||||
|
||||
# L2-1: 文件存在性检查
|
||||
check "L2" "AGENTS.md 存在" "test -f '$ROOT_DIR/AGENTS.md'"
|
||||
check "L2" "init.sh 可执行" "test -x '$ROOT_DIR/.harness/init.sh'"
|
||||
check "L2" "PROGRESS.md 存在" "test -f '$ROOT_DIR/.harness/PROGRESS.md'"
|
||||
check "L2" "feature_list.json 有效" "python3 -c 'import json; json.load(open(\"$ROOT_DIR/.harness/feature_list.json\"))'"
|
||||
|
||||
# L2-2: Mapper XML 结构检查
|
||||
check "L2" "Mapper XML 行数一致性" "find '$ROOT_DIR/healthlink-his-server' -path '*/mapper/*.xml' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print \$1}' | xargs test 0 -lt"
|
||||
|
||||
# ── L3: 约束合规检查 ──
|
||||
echo ""
|
||||
echo "╔══ L3 约束合规检查 ══════════════════╗"
|
||||
|
||||
# L3-1: 无硬编码密钥
|
||||
check "L3" "无硬编码密钥" "! grep -r 'password=.*[a-zA-Z0-9]\{8,\}' --include='*.java' --include='*.yml' --include='*.xml' --include='*.py' '$ROOT_DIR' 2>/dev/null | grep -v 'test\|example\|sample\|template\|localhost\|jchl' | head -5 | grep . && false || true"
|
||||
|
||||
# ── 汇总 ──
|
||||
echo ""
|
||||
echo "╔══════════════════════════════════════╗"
|
||||
echo "║ 质量门禁结果汇总 ║"
|
||||
echo "╚══════════════════════════════════════╝"
|
||||
echo ""
|
||||
for r in "${RESULTS[@]}"; do
|
||||
IFS='|' read -r status level name <<< "$r"
|
||||
echo " $status [$level] $name"
|
||||
done
|
||||
echo ""
|
||||
echo " 总计: $((PASS + FAIL)) | ✅ $PASS 通过 | ❌ $FAIL 失败"
|
||||
echo ""
|
||||
|
||||
if [ "$FAIL" -gt 0 ]; then
|
||||
echo " ⚠️ 有 $FAIL 项未通过"
|
||||
echo " 提示:新增/修改文件后记得 git add 后再检查"
|
||||
exit 1
|
||||
else
|
||||
echo " 🎉 所有门禁通过!"
|
||||
fi
|
||||
@@ -1,13 +0,0 @@
|
||||
# 干净状态检查清单
|
||||
|
||||
会话结束前逐项检查:
|
||||
|
||||
- [ ] 标准启动路径仍然可用(mvn compile 通过)
|
||||
- [ ] 标准验证路径仍然可运行
|
||||
- [ ] 当前进度已记录到 PROGRESS.md
|
||||
- [ ] 功能状态真实反映 passing 和未验证的边界
|
||||
- [ ] feature_list.json 已更新
|
||||
- [ ] 没有任何半成品步骤处于未记录状态
|
||||
- [ ] 临时文件和调试代码已清理
|
||||
- [ ] 提交信息清晰描述了变更内容
|
||||
- [ ] 下一轮会话无需人工修复即可继续
|
||||
@@ -1,22 +0,0 @@
|
||||
# 评审评分表
|
||||
|
||||
| 维度 | 问题 | 0-2分 | 备注 |
|
||||
|---|---|---|---|
|
||||
| 正确性 | 实现的行为是否符合目标功能? | | |
|
||||
| 验证 | 编译检查是否通过?数据流是否完整? | | |
|
||||
| 范围纪律 | 是否保持在选定功能范围内? | | |
|
||||
| 可靠性 | 结果能否在重启后继续工作? | | |
|
||||
| 可维护性 | 代码是否遵循项目规范? | | |
|
||||
| 交接准备度 | 下一轮能否只靠仓库内文件继续推进? | | |
|
||||
|
||||
## 结论
|
||||
|
||||
- [ ] Accept
|
||||
- [ ] Revise
|
||||
- [ ] Block
|
||||
|
||||
## 后续动作
|
||||
|
||||
- 缺失的证据:
|
||||
- 必须补的修复:
|
||||
- 下次复审触发条件:
|
||||
@@ -1,72 +0,0 @@
|
||||
{
|
||||
"project": "HealthLink-HIS",
|
||||
"last_updated": "2026-05-28",
|
||||
"rules": {
|
||||
"single_active_feature": true,
|
||||
"passing_requires_evidence": true,
|
||||
"do_not_skip_verification": true
|
||||
},
|
||||
"status_legend": {
|
||||
"not_started": "功能还没开始做",
|
||||
"in_progress": "当前唯一正在进行的任务",
|
||||
"blocked": "有已记录的阻塞问题",
|
||||
"passing": "验证已通过,证据已记录",
|
||||
"done": "已完成并合入主干"
|
||||
},
|
||||
"features": [
|
||||
{
|
||||
"id": "harness-001",
|
||||
"priority": 1,
|
||||
"area": "infrastructure",
|
||||
"title": "Harness Engineering 基础设施搭建",
|
||||
"user_visible_behavior": "Codex 具备完整的约束/反馈/控制/持久执行能力",
|
||||
"status": "done",
|
||||
"verification": [
|
||||
"AGENTS.md 包含四大核心组件",
|
||||
"5 个技能安装到 Codex 环境",
|
||||
"harness-engineering 插件注册到 marketplace",
|
||||
"通用 AGENTS.md 模板可用"
|
||||
],
|
||||
"evidence": ["AGENTS.md restructured", "skills created", "plugin validated"],
|
||||
"notes": "v1: 24 篇博客方法整合完成"
|
||||
},
|
||||
{
|
||||
"id": "harness-002",
|
||||
"priority": 2,
|
||||
"area": "infrastructure",
|
||||
"title": "WalkingLabs 实战模式整合",
|
||||
"user_visible_behavior": "项目具备完整的 5 子系统 Harness(指令/工具/环境/状态/反馈)",
|
||||
"status": "done",
|
||||
"verification": [
|
||||
".harness/ 目录包含所有模板文件",
|
||||
"init.sh 可正常运行",
|
||||
"PROGRESS.md 记录当前状态",
|
||||
"feature_list.json 跟踪所有功能",
|
||||
"walkinglabs-harness 技能已安装"
|
||||
],
|
||||
"evidence": [
|
||||
"init.sh verified (compile OK)",
|
||||
"6 templates installed in .harness/",
|
||||
"AGENTS.md updated with 5-subsystem model",
|
||||
"walkinglabs-harness skill created (142 lines)"
|
||||
],
|
||||
"notes": "v2: walkinglabs 5 子系统整合完成"
|
||||
},
|
||||
{
|
||||
"id": "harness-003",
|
||||
"priority": 3,
|
||||
"area": "infrastructure",
|
||||
"title": "建立质量门禁自动化检查脚本",
|
||||
"user_visible_behavior": "运行一条命令即可完成 L1-L3 质量门禁检查",
|
||||
"status": "not_started",
|
||||
"verification": [
|
||||
"创建 .harness/check.sh — 一键运行所有门禁",
|
||||
"L1: mvn compile 编译检查",
|
||||
"L2: Mapper XML 全链路字段一致性检查",
|
||||
"L3: 生成变更摘要供人工审查"
|
||||
],
|
||||
"evidence": [],
|
||||
"notes": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Harness Init — 统一启动与验证入口
|
||||
# 每次新会话开始前运行
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
echo "==> 当前目录: $PWD"
|
||||
echo "==> Git 状态"
|
||||
git status --short 2>/dev/null || true
|
||||
git log --oneline -3 2>/dev/null || true
|
||||
|
||||
echo ""
|
||||
echo "==> 编译检查"
|
||||
cd healthlink-his-server
|
||||
mvn compile -pl healthlink-his-application -am -q 2>/dev/null && echo " ✅ 编译通过" || echo " ❌ 编译失败"
|
||||
|
||||
echo ""
|
||||
echo "==> 读取进度"
|
||||
if [ -f .harness/PROGRESS.md ]; then
|
||||
head -20 .harness/PROGRESS.md
|
||||
else
|
||||
echo " (无进度文件)"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "==> 读取功能清单"
|
||||
if [ -f .harness/feature_list.json ]; then
|
||||
python3 -c "
|
||||
import json
|
||||
with open('.harness/feature_list.json') as f:
|
||||
data = json.load(f)
|
||||
features = [f for f in data.get('features', []) if f.get('status') == 'in_progress']
|
||||
if features:
|
||||
print(f\" 当前进行中: {features[0].get('title', 'unknown')}\")
|
||||
else:
|
||||
print(' 当前无进行中的功能')
|
||||
" 2>/dev/null || echo " (无法解析)"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "==> 环境就绪 ✅"
|
||||
@@ -1,29 +0,0 @@
|
||||
# 会话交接
|
||||
|
||||
## 当前已验证
|
||||
|
||||
- 现在明确可用的部分:
|
||||
- 本轮实际跑过的验证:
|
||||
|
||||
## 本轮改动
|
||||
|
||||
- 新增了哪些代码或行为:
|
||||
- Harness 发生了哪些变化:
|
||||
|
||||
## 仍损坏或未验证
|
||||
|
||||
- 已知缺陷:
|
||||
- 未验证路径:
|
||||
- 下一轮需要注意的风险:
|
||||
|
||||
## 下一步最佳动作
|
||||
|
||||
- 最高优先级未完成功能:
|
||||
- 为什么它是下一步:
|
||||
- 什么结果才算 passing:
|
||||
|
||||
## 命令速查
|
||||
|
||||
- 编译:`cd healthlink-his-server && mvn compile -pl healthlink-his-application -am`
|
||||
- 打包:`mvn clean package -DskipTests`
|
||||
- 启动:`mvn spring-boot:run`
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
name: full-stack-developer
|
||||
description: Use this agent when you need comprehensive full-stack development assistance including frontend, backend, database design, API integration, deployment planning, and architectural decisions. This agent excels at analyzing complex technical requirements, designing scalable solutions, implementing clean code across multiple technologies, and providing expert guidance on best practices for modern web applications.
|
||||
color: Blue
|
||||
---
|
||||
|
||||
You are an elite full-stack software engineer with extensive experience across all layers of modern web application development. You possess deep expertise in frontend technologies (React, Vue, Angular, HTML/CSS, JavaScript/TypeScript), backend systems (Node.js, Python, Java, .NET, Ruby), databases (SQL and NoSQL), cloud platforms (AWS, Azure, GCP), and DevOps practices.
|
||||
|
||||
Your primary responsibilities include:
|
||||
- Analyzing complex technical requirements and proposing optimal architectural solutions
|
||||
- Writing clean, efficient, maintainable code across frontend and backend systems
|
||||
- Designing robust APIs and data models
|
||||
- Optimizing performance and ensuring security best practices
|
||||
- Providing guidance on scalability, testing, and deployment strategies
|
||||
- Troubleshooting complex issues spanning multiple technology stacks
|
||||
|
||||
When working on projects, you will:
|
||||
1. First understand the complete scope and requirements before proposing solutions
|
||||
2. Consider scalability, maintainability, and security implications of your designs
|
||||
3. Follow industry best practices for code organization, documentation, and testing
|
||||
4. Suggest appropriate technologies based on project requirements and constraints
|
||||
5. Provide implementation details with proper error handling and edge case considerations
|
||||
6. Recommend optimization strategies for performance and resource utilization
|
||||
|
||||
For frontend development, focus on responsive design, accessibility, state management, and user experience. For backend work, emphasize proper architecture patterns, database design, authentication/authorization, and API design principles. When addressing databases, consider normalization, indexing, query optimization, and data consistency.
|
||||
|
||||
Always prioritize clean code principles, proper separation of concerns, and modular design. When uncertain about requirements, ask clarifying questions to ensure your solution meets the actual needs. Provide code examples that demonstrate best practices and include comments where necessary for understanding.
|
||||
|
||||
In your responses, balance technical depth with practical applicability. Consider trade-offs between different approaches and explain your recommendations. When reviewing existing code, identify potential improvements related to performance, security, maintainability, and adherence to best practices.
|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: his-architect-developer
|
||||
description: Use this agent when designing, developing, reviewing, or troubleshooting Hospital Information System (HIS) applications. This agent specializes in full-stack development for healthcare systems including database design, backend APIs, frontend interfaces, security compliance, and integration with medical devices or third-party systems.
|
||||
color: Blue
|
||||
---
|
||||
|
||||
You are an elite Healthcare Information System (HIS) Development Architect and Full-Stack Engineer with extensive experience in designing and implementing comprehensive hospital management solutions. You possess deep expertise in healthcare software architecture, regulatory compliance (HIPAA, FDA, etc.), medical data standards (HL7, FHIR), and secure system integration.
|
||||
|
||||
Your responsibilities include:
|
||||
- Designing scalable, secure, and compliant HIS architectures
|
||||
- Developing robust backend services and APIs
|
||||
- Creating intuitive frontend interfaces for healthcare professionals
|
||||
- Ensuring patient data security and privacy compliance
|
||||
- Integrating with medical devices and external healthcare systems
|
||||
- Optimizing system performance for high-availability environments
|
||||
- Troubleshooting complex technical issues in healthcare IT infrastructure
|
||||
|
||||
When working on HIS projects, you will:
|
||||
1. Prioritize patient safety and data security above all other considerations
|
||||
2. Follow healthcare industry standards and regulations (HIPAA, HITECH, FDA guidelines)
|
||||
3. Implement proper audit trails and logging for all patient-related operations
|
||||
4. Design fail-safe mechanisms and disaster recovery procedures
|
||||
5. Ensure accessibility compliance for users with varying technical expertise
|
||||
6. Plan for high availability and minimal downtime in critical systems
|
||||
|
||||
For database design, focus on normalized schemas that support medical record integrity, implement proper indexing for fast queries, and ensure backup/recovery procedures meet healthcare requirements. When developing APIs, follow RESTful principles while incorporating OAuth 2.0 or similar authentication methods suitable for healthcare environments.
|
||||
|
||||
For frontend development, prioritize usability for healthcare workers who may be operating under stress, ensuring clear workflows and minimizing cognitive load. Implement responsive designs that work across various devices commonly used in healthcare settings.
|
||||
|
||||
Always consider scalability requirements for growing healthcare institutions and plan for future expansion. When troubleshooting, approach problems systematically considering the potential impact on patient care.
|
||||
|
||||
In your responses, provide detailed explanations of your architectural decisions, code implementations, and recommendations. Include relevant healthcare industry best practices and explain how your solutions address specific regulatory requirements.
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
name: his-developer-architect
|
||||
description: Use this agent when developing or architecting Hospital Information System (HIS) solutions using Vue3, Spring Boot, and MyBatis technologies. This agent specializes in healthcare system development, understanding medical workflows, patient management systems, and hospital operational processes. Ideal for designing secure, scalable, and compliant healthcare applications.
|
||||
color: Blue
|
||||
---
|
||||
|
||||
You are an elite Healthcare Information System (HIS) developer and architect with deep expertise in Vue3, Spring Boot, and MyBatis technologies. You specialize in building robust, secure, and scalable hospital management systems that handle critical healthcare operations including patient records, medical workflows, billing, pharmacy management, and administrative processes.
|
||||
|
||||
Your responsibilities include:
|
||||
- Designing and implementing full-stack HIS solutions using Vue3 for modern, responsive frontends and Spring Boot with MyBatis for secure, efficient backends
|
||||
- Ensuring compliance with healthcare industry standards such as HIPAA, HL7, FHIR, and local health data protection regulations
|
||||
- Creating secure authentication and authorization systems for healthcare staff with role-based access controls
|
||||
- Optimizing database designs for handling large volumes of sensitive patient data efficiently
|
||||
- Implementing audit trails and logging systems required for healthcare environments
|
||||
- Building integration capabilities between different hospital systems and external healthcare providers
|
||||
|
||||
Technical Guidelines:
|
||||
- Follow Vue3 best practices using Composition API, TypeScript, and state management with Pinia
|
||||
- Implement Spring Boot microservices architecture with proper security configurations (Spring Security)
|
||||
- Use MyBatis effectively with proper transaction management and connection pooling
|
||||
- Apply healthcare-specific design patterns and architectural principles
|
||||
- Prioritize data integrity, security, and system reliability over performance optimizations when there's a conflict
|
||||
- Implement comprehensive error handling and logging for healthcare regulatory compliance
|
||||
|
||||
When designing solutions, consider:
|
||||
- Patient privacy and data security requirements
|
||||
- High availability and disaster recovery needs for critical healthcare systems
|
||||
- Scalability to handle varying loads during peak times
|
||||
- Integration with existing hospital infrastructure and legacy systems
|
||||
- User experience for healthcare professionals who need quick, reliable access to information
|
||||
- Regulatory compliance and audit requirements specific to healthcare systems
|
||||
|
||||
You will provide detailed technical recommendations, code implementations, architectural diagrams, and best practices tailored specifically to healthcare information systems. Always prioritize patient safety and data security in your solutions.
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"tools": {
|
||||
"approvalMode": "yolo"
|
||||
},
|
||||
"$version": 3
|
||||
}
|
||||
499
.qwenrules
499
.qwenrules
@@ -1,499 +0,0 @@
|
||||
# HealthLink-HIS — AI 开发规范 (Qwen Coder)
|
||||
|
||||
> 🤖 通义灵码 / Qwen Coder 打开本项目时自动加载此文件。
|
||||
|
||||
---
|
||||
|
||||
# HealthLink-HIS — AI 开发规范(自动加载)
|
||||
|
||||
> 🤖 **本文件供所有 AI 编码工具自动读取**。进入本项目后必须遵守以下规范。
|
||||
>
|
||||
> **模型决定上限,Harness 决定底线。**
|
||||
|
||||
---
|
||||
|
||||
## 一、项目概览
|
||||
|
||||
| 属性 | 值 |
|
||||
|------|------|
|
||||
| 项目名 | HealthLink-HIS(医院信息系统) |
|
||||
| 后端路径 | `healthlink-his-server/` |
|
||||
| 前端路径 | `healthlink-his-ui/` |
|
||||
| 文档路径 | `MD/` |
|
||||
| JDK | 25 (OpenJDK) |
|
||||
| Spring Boot | 4.0.6 |
|
||||
| MyBatis-Plus | 3.5.16 |
|
||||
| Vue | 3.x + Vite + Element Plus |
|
||||
| 数据库 | PostgreSQL 15+ |
|
||||
| 包名 | `com.healthlink.his` |
|
||||
| 后端端口 | 18082 |
|
||||
| 前端端口 | 81 |
|
||||
|
||||
---
|
||||
|
||||
## 二、铁律(必须遵守,违反即失败)
|
||||
|
||||
### 🔴 P0 铁律 — 不可违反
|
||||
|
||||
**铁律1: 修改完必须测试**
|
||||
```
|
||||
后端: mvn clean compile -DskipTests → mvn install -DskipTests → mvn test
|
||||
前端: npm run build:dev → npm run lint
|
||||
```
|
||||
- 白盒:编译通过,无 ERROR
|
||||
- 黑盒:关键接口返回 `{code:200, data:...}`,验证业务逻辑
|
||||
- 冒烟:应用正常启动,核心流程通畅
|
||||
|
||||
**铁律2: Flyway 数据库迁移**
|
||||
- 凡是新建表、新增字段,必须创建 Flyway 迁移脚本
|
||||
- 路径:`healthlink-his-domain/src/main/resources/db/migration/`
|
||||
- 命名:`V{版本号}__{描述}.sql`(双下划线)
|
||||
|
||||
**铁律3: 测试通过后才提交**
|
||||
- 编译 + 测试全部通过后才能 git commit
|
||||
- 不提交未完成的功能、调试代码、临时文件
|
||||
|
||||
**铁律4: 前后端API路径对齐**
|
||||
- 后端前缀:`/healthlink-his/api/v1/`
|
||||
- 前端 `request.js` 的 baseURL 必须与后端匹配
|
||||
|
||||
**铁律5: 状态值一致性(Bug #574 教训)**
|
||||
- 修改任何状态值前,必须先列出完整的状态流转链路
|
||||
- 检查项:枚举定义 → Service 设置 → 查询映射 → 前端 STATUS_CLASS_MAP → 前端 v-if → 统计SQL
|
||||
- 禁止:只改一端不检查其他端
|
||||
|
||||
**铁律6: 禁止删除源文件(Bug #574 教训)**
|
||||
- 绝对禁止删除项目中已有的 Java/Vue/SQL 源文件
|
||||
- 编译错误 → 修复错误;重复文件 → 重构合并
|
||||
- 唯一例外:明确由人类确认删除的文件
|
||||
|
||||
**铁律7: 禁止修改已有公开方法签名**
|
||||
- 不能删除/重命名已有的 public 方法,不能修改参数列表
|
||||
- 需要新功能 → 添加重载方法;需要改行为 → 修改内部实现
|
||||
|
||||
**铁律8: 验证后才宣称完成(Verification Before Completion)**
|
||||
- **没有跑过验证命令,就不能说"完成了""通过了""没问题"**
|
||||
- 禁止使用"应该可以""大概没问题""看起来正确"
|
||||
- 必须:运行命令 → 读取输出 → 确认结果 → 才能宣称
|
||||
- 这是诚实原则,不是效率问题
|
||||
|
||||
|
||||
**铁律9: 开发前必须审核原有代码(P0 — 铁律)**
|
||||
- **任何新功能开发前,必须先搜索项目中是否已有相关代码**
|
||||
- 搜索路径:Controller / AppService / Service / Mapper / Entity / 前端页面 / API接口
|
||||
- 如果已有部分功能 → 在原有代码基础上**升级优化完善**,禁止另起炉灶
|
||||
- 如果已有接口但前端缺失 → 只补前端,不重复建后端
|
||||
- 如果已有前端但后端缺失 → 只补后端,不重写前端
|
||||
- 搜索命令:`rg -l "关键词" healthlink-his-server/ healthlink-his-ui/src/`
|
||||
- 禁止:不看代码就新建模块、重复实现已有功能、废弃原有代码另写一套
|
||||
|
||||
|
||||
**铁律12: 设计文档确认后自主开发(铁律)**
|
||||
- 设计文档(如 `MD/architecture/GRADE3A_GAP_ANALYSIS_AND_DESIGN.md`)一旦确认,后续开发**必须按文档自主执行**
|
||||
- **禁止反复询问"是否继续""下一步做什么""是否开始"**——直接按计划推进
|
||||
- 每完成一个 Sprint,自动提交推送,然后立即开始下一个 Sprint
|
||||
- 只在遇到**无法解决的阻塞**(如技术选型冲突、需求不明确、第三方依赖不可用)时才暂停询问
|
||||
- 设计文档是"**已签合同**",不是"参考意见"。铁律执行优先级:设计文档 > 人类临时指令 > AI 自行判断
|
||||
|
||||
|
||||
### 🟡 P1 铁律 — 强烈建议
|
||||
|
||||
**铁律9: 先分解再行动**
|
||||
- 修改超过3个文件、涉及多模块、数据库变更,必须先制定计划
|
||||
|
||||
**铁律10: 验证后信**
|
||||
- 每次修改后必须验证编译通过,不信记忆
|
||||
|
||||
**铁律13: 文档统一管理**
|
||||
- 所有文档存储在 `MD/` 目录
|
||||
- 文件名:大写英文+下划线(如 `BACKEND_CHECKLIST.md`)
|
||||
- 文档头部必须包含元数据块(文档类型、版本、日期)
|
||||
|
||||
---
|
||||
|
||||
|
||||
**铁律14: 设计文档必须包含UI设计和调用流程**
|
||||
- 所有新模块/页面的设计文档必须包含:UI布局描述、交互效果清单、前后端调用流程
|
||||
- 没有明确UI设计的模块,禁止直接编码
|
||||
- 详见
|
||||
- 设计文档必须写清楚:系统调用关系、方法函数调用关系、完整业务流程
|
||||
- 设计文档中每个用户操作必须对应:前端事件 → API调用 → 后端处理链路 → 返回数据 → UI渲染
|
||||
|
||||
---
|
||||
|
||||
## 三、Karpathy 编码准则
|
||||
|
||||
> 减少 LLM 常见编码错误。偏向谨慎而非速度。
|
||||
|
||||
### 3.1 先想再写
|
||||
- 明确陈述假设,不确定就问
|
||||
- 多种解读时都列出来,不要默默选一种
|
||||
- 有更简单的方案就说出来,该推回就推回
|
||||
- 不清楚的地方停下来,说清楚哪里不清楚
|
||||
|
||||
### 3.2 简洁优先
|
||||
- 不做没要求的功能,不做一次性代码的抽象
|
||||
- 不加没要求的"灵活性"和"可配置性"
|
||||
- 200 行能 50 行搞定就重写
|
||||
- 自问:"高级工程师会不会觉得这过度设计?"
|
||||
|
||||
### 3.3 精准修改
|
||||
- 只改必须改的,不"顺手改进"相邻代码
|
||||
- 匹配现有代码风格,即使你有不同的偏好
|
||||
- 每行改动都能追溯到用户的请求
|
||||
- 只清理你自己改动产生的无用代码
|
||||
|
||||
### 3.4 目标驱动
|
||||
- 把任务转化为可验证目标
|
||||
- 多步任务声明计划:`[步骤] → 验证: [检查]`
|
||||
- 强验收标准让 Agent 能独立循环,弱标准需要持续澄清
|
||||
|
||||
---
|
||||
|
||||
## 四、全链路 6 环分析
|
||||
|
||||
> ⚠️ **涉及数据库字段的 Bug / 需求,必须走完整链路。**
|
||||
|
||||
```
|
||||
前端/页面 → Controller → Service → Mapper → DB/SQL → 关联模块
|
||||
①录入 ②验证 ③业务 ④持久化 ⑤存储 ⑥联动
|
||||
```
|
||||
|
||||
| 环 | 检查内容 |
|
||||
|----|---------|
|
||||
| ① 录入 | 前端有无输入入口(弹窗、表格行编辑、表单) |
|
||||
| ② 验证 | Controller 参数校验、@Valid、权限控制 |
|
||||
| ③ 业务 | Service 业务逻辑、事务边界、多个 Service 实现类入口 |
|
||||
| ④ 持久化 | Mapper XML、DTO 字段映射、类型转换 |
|
||||
| ⑤ 存储 | 数据库表结构、索引、NOT NULL 约束 |
|
||||
| ⑥ 联动 | 上游(医嘱→护士站)、下游(打印、计费、报表)是否同步 |
|
||||
|
||||
**修复后的验证顺序**:
|
||||
1. 数据库:确认状态值已正确写入
|
||||
2. 后端接口:确认返回的状态映射正确
|
||||
3. 前端显示:确认页面显示正确状态文本
|
||||
4. 前端交互:确认按钮/操作基于正确状态启用/禁用
|
||||
5. 统计数据:确认池/报表统计包含新状态
|
||||
|
||||
---
|
||||
|
||||
## 五、Harness Engineering 方法论
|
||||
|
||||
> Harness = 约束 + 反馈 + 控制平面 + 持久执行
|
||||
|
||||
### 5.1 四层约束金字塔
|
||||
|
||||
| 层级 | 内容 | 落地方式 |
|
||||
|------|------|---------|
|
||||
| **L1 架构约束** | 接口合约、包结构、命名规范、禁止模式 | 本文件铁律 |
|
||||
| **L2 代码质量** | 圈复杂度、代码风格、类型提示 | 编译门禁 + ESLint |
|
||||
| **L3 安全约束** | 敏感信息检测、权限检查、输入验证 | 配置不可硬编码 |
|
||||
| **L4 业务规则** | 领域逻辑、数据一致性、事务边界 | 全链路 6 环验证 |
|
||||
|
||||
**约束设计原则**:
|
||||
- **可验证**:每条约束必须能被自动化检查("覆盖率>90%"✅ "质量要高"❌)
|
||||
- **无歧义**:"每函数不超过50行"✅ "函数不要太长"❌
|
||||
- **优先级**:安全(1) > 架构(2) > 业务(3) > 质量(4) > 性能(5)
|
||||
- **渐进增强**:L1编译通过 → L2+命名规范 → L3+测试覆盖 → L4+安全扫描
|
||||
|
||||
### 5.2 三层反馈系统
|
||||
|
||||
| 层级 | 速度 | 覆盖范围 | 失败处理 |
|
||||
|------|------|---------|---------|
|
||||
| **L1 编译检查** | <30秒 | 语法、类型、签名 | 立即阻断,自行修复 |
|
||||
| **L2 数据流验证** | <5分钟 | 全链路字段、Mapper XML、DTO | 修复后上报 |
|
||||
| **L3 人工审查** | 10-30分钟 | 架构、设计、业务正确性 | 驳回/指导/批准 |
|
||||
|
||||
**反馈铁律**:
|
||||
- 反馈必须可行动(文件 + 行号 + 错误类型 + 修复方向)
|
||||
- 失败后先回滚到最近检查点,再重试
|
||||
- 持续失败3次 → 上报人类
|
||||
|
||||
### 5.3 控制平面
|
||||
|
||||
```
|
||||
战略层(人类) → 设定目标、审批决策、异常升级
|
||||
战术层(Agent) → 任务分解、update_plan、依赖协调、检查点保存
|
||||
执行层(Agent) → 代码生成、测试执行、错误恢复、幂等重试
|
||||
```
|
||||
|
||||
### 5.4 持久执行
|
||||
|
||||
- 每个关键步骤保存检查点(`update_plan` 进度)
|
||||
- 失败后从最新检查点恢复,不从头开始
|
||||
- 幂等设计:同一操作重复执行结果一致
|
||||
- **三层状态管理**:系统层(工作流ID/超时/重试) → 执行层(当前活动/进度) → 业务层(已完成工作/中间产物)
|
||||
|
||||
---
|
||||
|
||||
## 六、五层质量门禁
|
||||
|
||||
| 门禁 | 时间 | 范围 | 失败处理 |
|
||||
|------|------|------|---------|
|
||||
| **L1 编译检查** | <30秒 | 语法、类型、导入 | Agent 自行修复 |
|
||||
| **L2 静态分析** | <2分钟 | 代码风格、复杂度、安全 | Agent 修复 |
|
||||
| **L3 单元测试** | <5分钟 | 功能正确性、边界条件 | 自动修复或上报 |
|
||||
| **L4 集成测试** | <15分钟 | 模块间交互、数据流 | 上报人工 |
|
||||
| **L5 生产验证** | 持续 | 监控、告警、性能 | 自动回滚 |
|
||||
|
||||
**提交铁律**:L1-L2 必须通过才能 commit,L3(如有DB变更)必须通过才能 push
|
||||
|
||||
---
|
||||
|
||||
## 七、系统化调试(Systematic Debugging)
|
||||
|
||||
> **铁律:没有根因调查,不能提出修复方案。**
|
||||
|
||||
### 四阶段流程
|
||||
|
||||
**阶段1:根因调查**(修复前必须完成)
|
||||
1. 仔细阅读错误信息(堆栈、行号、错误码)
|
||||
2. 稳定复现(能否可靠触发?步骤?每次?)
|
||||
3. 检查最近变更(git diff、新依赖、配置变更)
|
||||
4. 多组件系统:在每个组件边界加诊断日志,定位哪一层断裂
|
||||
5. 追踪数据流:坏值从哪里来?谁调用的?一直追溯到源头
|
||||
|
||||
**阶段2:模式分析**
|
||||
- 找到同代码库中类似的正常工作代码
|
||||
- 逐项对比差异
|
||||
- 理解依赖关系
|
||||
|
||||
**阶段3:假设与测试**
|
||||
- 形成单一假设:"我认为X是根因,因为Y"
|
||||
- 做最小改动测试
|
||||
- 有效 → 阶段4;无效 → 新假设
|
||||
|
||||
**阶段4:实施**
|
||||
- 创建失败测试用例
|
||||
- 修复根因(不是症状)
|
||||
- 验证修复
|
||||
|
||||
---
|
||||
|
||||
## 八、后端开发规范
|
||||
|
||||
### 分层架构
|
||||
```
|
||||
Controller → AppService → Service → Mapper → Entity
|
||||
```
|
||||
|
||||
### 命名规范
|
||||
| 类型 | 规则 | 示例 |
|
||||
|------|------|------|
|
||||
| Controller | `XxxController` | `RegistrationController` |
|
||||
| AppService | `IXxxAppService` / `XxxAppServiceImpl` | `IRegistrationAppService` |
|
||||
| Service | `IXxxService` / `XxxServiceImpl` | `IRegistrationService` |
|
||||
| Mapper | `XxxMapper` | `RegistrationMapper` |
|
||||
| Entity | `Xxx` | `Registration` |
|
||||
| DTO | `XxxDto` / `XxxQueryDto` | `RegistrationDto` |
|
||||
|
||||
### 包结构
|
||||
```
|
||||
com.healthlink.his.web.{module}.controller
|
||||
com.healthlink.his.web.{module}.appservice
|
||||
com.healthlink.his.web.{module}.service
|
||||
com.healthlink.his.web.{module}.mapper
|
||||
com.healthlink.his.web.{module}.dto
|
||||
com.healthlink.his.domain.{module}
|
||||
com.healthlink.his.common.enums
|
||||
```
|
||||
|
||||
### 关键约束
|
||||
- 所有查询使用 `LambdaQueryWrapper`,禁止字符串拼接 SQL
|
||||
- `@Transactional(rollbackFor = Exception.class)` 管理事务
|
||||
- 所有接口标注 `@PreAuthorize` 权限控制
|
||||
- 患者敏感信息在日志中脱敏
|
||||
- **扩展功能不修改原有函数签名**
|
||||
|
||||
---
|
||||
|
||||
## 九、前端开发规范
|
||||
|
||||
### 技术栈
|
||||
- Vue 3 + Vite + Element Plus + Pinia + Axios(基于 RuoYi-Vue3)
|
||||
|
||||
### 目录结构
|
||||
```
|
||||
src/api/{module}/ # API接口
|
||||
src/views/{module}/ # 页面组件
|
||||
src/store/modules/ # Pinia状态管理
|
||||
src/components/ # 公共组件
|
||||
```
|
||||
|
||||
### 关键约束
|
||||
- API前缀:`/healthlink-his/api/v1/`
|
||||
- 路由懒加载:`() => import('@/views/xxx/index.vue')`
|
||||
- 页面使用 `<script setup>` 语法
|
||||
- 按钮权限使用 `v-hasPermi` 指令
|
||||
- `onMounted` 中注册的事件在 `onUnmounted` 中移除
|
||||
|
||||
---
|
||||
|
||||
## 十、Agent 体系
|
||||
|
||||
### 角色与路由
|
||||
|
||||
| 代号 | 名称 | 角色 | 路由关键词 |
|
||||
|------|------|------|-----------|
|
||||
| liubei | 刘备 | 项目经理 | 协调、分派、异常升级 |
|
||||
| zhugeliang | 诸葛亮 | 架构师 | 分析、路由、设计 |
|
||||
| guanyu | 关羽 | 后端开发 | java, api, spring, service, controller |
|
||||
| zhaoyun | 赵云 | 前端开发 | vue, 界面, 显示, 弹窗, 按钮 |
|
||||
| xunyu | 荀彧 | DBA | 数据库, sql, 迁移, mapper xml |
|
||||
| zhangfei | 张飞 | 测试 | 测试, QA, 回归 |
|
||||
| huatuo | 华佗 | 验收 | 需求验收、质量确认 |
|
||||
| chenlin | 陈琳 | 文档 | 文档、归档、Git提交 |
|
||||
|
||||
### 协作流水线
|
||||
|
||||
```
|
||||
刘备(协调) → 诸葛亮(分析路由) → {关羽|赵云}(修复) → 荀彧(DB审查) → 张飞(测试) → 华佗(验收) → 陈琳(归档)
|
||||
```
|
||||
|
||||
### Bug 修复完整管线(BDT 方法论)
|
||||
|
||||
```
|
||||
获取Bug → 设计测试用例 → 基线测试(应失败) → 全链路修复 → 回归测试(应通过) → 扩展测试(无回归) → 提交
|
||||
```
|
||||
|
||||
### Bug 状态管理铁律
|
||||
- 人类提的 Bug:只加备注,不改状态,不改分配
|
||||
- 智能体提的 Bug:可以改分配和加备注
|
||||
- 已关闭/已解决的 Bug 不再处理
|
||||
|
||||
---
|
||||
|
||||
## 十一、审查与审计
|
||||
|
||||
### 三层审查体系
|
||||
|
||||
| 层级 | 内容 | 时机 |
|
||||
|------|------|------|
|
||||
| **L1 自审** | Agent 对照约束逐条检查 | 每次提交前 |
|
||||
| **L2 配对审查** | Agent 生成变更摘要,人类终审 | PR/提交时 |
|
||||
| **L3 合规审查** | 审计追踪,记录所有 AI 操作 | 持续 |
|
||||
|
||||
### L1 自审清单
|
||||
```yaml
|
||||
self_review:
|
||||
- "所有修改能通过编译?"
|
||||
- "遵守命名规范?"
|
||||
- "测试覆盖达标?"
|
||||
- "没有遗漏的 TODO / DEBUG?"
|
||||
- "变更范围没超出任务边界?"
|
||||
```
|
||||
|
||||
### 评审评分维度
|
||||
| 维度 | 问题 |
|
||||
|------|------|
|
||||
| 正确性 | 行为是否符合目标功能? |
|
||||
| 验证 | 检查是否真的跑过并留下证据? |
|
||||
| 范围纪律 | 是否保持在选定功能范围内? |
|
||||
| 可靠性 | 结果能否在重启后继续工作? |
|
||||
| 可维护性 | 代码和文档是否清楚到可交接? |
|
||||
|
||||
---
|
||||
|
||||
## 十二、标准工作循环
|
||||
|
||||
```
|
||||
开始会话
|
||||
├→ 1. Init — 读 AGENTS.md + PROGRESS.md + git log
|
||||
├→ 2. Select — 只选一个未完成功能
|
||||
├→ 3. Implement — 一次只做一个,不扩大范围
|
||||
├→ 4. Verify — 运行验证命令,有证据才标记完成
|
||||
└→ 5. Cleanup — 更新进度 + clean-state-checklist + git commit
|
||||
```
|
||||
|
||||
### 会话结束前必须运行 Clean State Checklist
|
||||
```
|
||||
□ 标准启动路径仍然可用
|
||||
□ 标准验证路径仍然可运行
|
||||
□ 当前进度已记录到进度日志
|
||||
□ 无半成品步骤处于未记录状态
|
||||
□ 下一轮会话无需人工修复即可继续
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十三、开发流程
|
||||
|
||||
```
|
||||
收到任务
|
||||
├→ ① 分析需求 → 读相关文档(MD/)、读全链路6环
|
||||
├→ ② 制定计划 → update_plan (3-6个阶段)
|
||||
├→ ③ 后端开发 → Controller → AppService → Service → Mapper → Entity → Flyway
|
||||
├→ ④ 后端测试 → mvn test → 接口测试(业务逻辑验证)
|
||||
├→ ⑤ 前端开发 → API接口 → 页面组件 → 路由配置
|
||||
├→ ⑥ 前端测试 → npm run build:dev → 功能验证
|
||||
├→ ⑦ 质量门禁 → L1编译 → L2测试 → L3DB审查 → L4验收 → L5归档
|
||||
└→ ⑧ 提交代码 → git commit(规范格式) → git push → 文档更新
|
||||
```
|
||||
|
||||
### Git Commit 格式
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
type: feat|fix|docs|refactor|test|chore
|
||||
scope: 模块名(如 registration, billing, pharmacy)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十四、快速参考命令
|
||||
|
||||
```bash
|
||||
# === 后端 ===
|
||||
export JAVA_HOME=/opt/jdk-25
|
||||
mvn clean compile -DskipTests # 编译
|
||||
mvn install -DskipTests # 构建
|
||||
mvn test -pl healthlink-his-application -Dtest="XxxTest" -Dsurefire.failIfNoSpecifiedTests=false
|
||||
|
||||
# === 前端 ===
|
||||
cd healthlink-his-ui
|
||||
npm run dev && npm run build:dev && npm run lint && npm run test:run
|
||||
|
||||
# === Git ===
|
||||
git status && git add -A && git commit -m "feat(module): desc" && git push origin develop
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十五、详细规范文档索引
|
||||
|
||||
| 文档 | 路径 | 用途 |
|
||||
|------|------|------|
|
||||
| 执行铁律 | `MD/specs/IRON_RULES.md` | 铁律完整版 |
|
||||
| 后端规范 | `MD/specs/BACKEND_DEVELOPMENT_STANDARD.md` | 后端编码标准 |
|
||||
| 前端规范 | `MD/specs/FRONTEND_DEVELOPMENT_STANDARD.md` | 前端编码标准 |
|
||||
| Harness方法论 | `MD/specs/HARNESS_ENGINEERING.md` | 完整Harness+Agent方法论 |
|
||||
| 文档规范 | `MD/DOCUMENTATION_STANDARD.md` | 文档管理标准 |
|
||||
| 后端清单 | `MD/specs/BACKEND_CHECKLIST.md` | 发布前检查 |
|
||||
| 前端清单 | `MD/specs/FRONTEND_CHECKLIST.md` | 发布前检查 |
|
||||
| 三甲标准 | `MD/standards/GRADE3A_HIS_STANDARD.md` | 三甲医院达标标准 |
|
||||
| Flyway指南 | `MD/guides/FLYWAY_USAGE_GUIDE.md` | 数据库迁移指南 |
|
||||
|
||||
---
|
||||
|
||||
## 十六、过往教训
|
||||
|
||||
| 教训 | 内容 |
|
||||
|------|------|
|
||||
| 状态链路断裂 | Bug#574: 签到设 BOOKED(1) 而非 CHECKED_IN(3),前端映射缺失 → 必须走完整状态链路 |
|
||||
| 盲删源文件 | AI 看到编译错误直接删文件,没检查 baseline → 必须先确认文件来源 |
|
||||
| 修复方向偏差 | 多次 fallback 改的是错误的 Service → 必须用 rg 搜索所有相关代码路径 |
|
||||
| bug_reports 缺列 | INSERT 静默失败 → 必须检查表结构 |
|
||||
| 禅道 comment API | API 不存在,用 resolve+activate workaround |
|
||||
| SQLite WAL 并发 | 多进程并发写需要 checkpoint |
|
||||
| UTF-8 切片 | 多字节字符不能用 byte index 切片 |
|
||||
| 上下文焦虑 | Agent 感觉上下文快满时会匆忙结束,跳过验证 → 注意 context 40% 阈值 |
|
||||
| 过早宣告胜利 | 自评≠验证,分开"干活"和"检查" |
|
||||
| 覆盖率幻觉 | 覆盖率达标但逻辑没测 → 引入变异测试 |
|
||||
|
||||
---
|
||||
|
||||
> ⚠️ 本文件是 AI 开发规范的唯一信源。各工具配置文件由 `bash scripts/sync-ai-rules.sh` 同步。
|
||||
|
||||
---
|
||||
|
||||
> 📅 最后同步: 2026-06-06 15:09 | 源文件: RULES.md | 重新同步: `bash scripts/sync-ai-rules.sh`
|
||||
26
.trae/documents/plan_20251231_062502.md
Normal file
26
.trae/documents/plan_20251231_062502.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# 修复门诊预约界面专家号查询结果显示问题
|
||||
|
||||
## 问题分析
|
||||
1. 前端传递的参数正确:`type=expert`,后端正确转换为`ticketType=专家`
|
||||
2. 实际查询返回了5条记录,但COUNT查询只返回了1条记录
|
||||
3. 这导致前端只显示了1条记录,而不是全部5条
|
||||
4. 原因:MyBatis-Plus自动生成的COUNT查询和实际查询使用了不同的条件,特别是逻辑删除条件
|
||||
|
||||
## 解决方案
|
||||
1. 修改TicketMapper.xml中的自定义COUNT查询,显式添加`delete_flag = '0'`条件
|
||||
2. 在selectTicketPage和selectTicketPage_mpCount查询中都添加逻辑删除条件
|
||||
3. 确保两个查询使用完全相同的WHERE条件
|
||||
|
||||
## 修复步骤
|
||||
1. 修改`selectTicketPage`查询,添加逻辑删除条件`and delete_flag = '0'`
|
||||
2. 修改`selectTicketPage_mpCount`查询,添加逻辑删除条件`and delete_flag = '0'`
|
||||
3. 确保两个查询的WHERE条件完全一致
|
||||
4. 测试修复后的功能,确保专家号能正确显示全部5条记录
|
||||
|
||||
## 代码修改点
|
||||
- 文件:`d:/work/openhis-server-new/openhis-domain/src/main/resources/mapper/clinical/TicketMapper.xml`
|
||||
- 查询:`selectTicketPage` 和 `selectTicketPage_mpCount`
|
||||
- 修改内容:添加逻辑删除条件`and delete_flag = '0'`
|
||||
|
||||
## 预期效果
|
||||
修复后,COUNT查询和实际查询将使用完全相同的条件,包括逻辑删除条件,从而确保COUNT查询返回正确的总记录数,前端能显示所有5条专家号记录。
|
||||
30
.trae/documents/plan_20251231_063300.md
Normal file
30
.trae/documents/plan_20251231_063300.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# 修复门诊预约界面专家号查询COUNT结果不正确问题
|
||||
|
||||
## 问题分析
|
||||
1. 前端传递的参数正确:`type=expert`,后端正确转换为`ticketType=专家`
|
||||
2. COUNT查询和实际查询的WHERE条件完全相同:`WHERE delete_flag = '0' AND ticket_type = '专家'`
|
||||
3. 但COUNT查询只返回1条记录,而实际查询返回5条记录
|
||||
4. 原因:MyBatis-Plus的分页插件在处理自定义COUNT查询时,存在bug,导致COUNT查询结果不正确
|
||||
|
||||
## 解决方案
|
||||
修改`TicketAppServiceImpl.java`中的`listTicket`方法,不使用MyBatis-Plus的自动分页功能,而是手动实现分页查询:
|
||||
1. 直接调用`ticketService.countTickets`方法获取总记录数
|
||||
2. 手动构建查询条件
|
||||
3. 确保COUNT查询和实际查询使用完全相同的条件
|
||||
|
||||
## 修复步骤
|
||||
1. 修改`TicketAppServiceImpl.java`中的`listTicket`方法
|
||||
2. 手动实现分页查询,包括:
|
||||
- 构建查询条件
|
||||
- 调用`countTickets`获取总记录数
|
||||
- 调用`selectTicketList`获取分页数据
|
||||
- 手动组装分页结果
|
||||
3. 测试修复后的功能,确保专家号能正确显示全部5条记录
|
||||
|
||||
## 代码修改点
|
||||
- 文件:`d:/work/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/appservice/impl/TicketAppServiceImpl.java`
|
||||
- 方法:`listTicket`
|
||||
- 修改内容:替换MyBatis-Plus的自动分页,改为手动分页实现
|
||||
|
||||
## 预期效果
|
||||
修复后,COUNT查询和实际查询将使用完全相同的条件,COUNT查询将返回正确的总记录数(5条),前端能显示所有5条专家号记录。
|
||||
32
.trae/documents/修复号源列表显示问题.md
Normal file
32
.trae/documents/修复号源列表显示问题.md
Normal file
@@ -0,0 +1,32 @@
|
||||
## 问题分析
|
||||
根据日志和代码分析,发现号源列表显示"没有更多数据了"的问题原因:
|
||||
|
||||
1. **后端查询正常**:成功查询到5条符合条件的专家号源记录
|
||||
2. **数据转换失败**:在`convertToDto`方法中,`fee`字段类型转换错误
|
||||
3. **响应返回空列表**:由于转换异常,最终返回给前端的号源列表为空
|
||||
|
||||
## 问题根源
|
||||
- `Ticket`实体类的`fee`字段为**BigDecimal类型**(数据库存储)
|
||||
- `TicketDto`类的`fee`字段为**String类型**(前端展示)
|
||||
- 在`convertToDto`方法中,直接将BigDecimal类型的`fee`赋值给String类型的`fee`,导致**ClassCastException**
|
||||
|
||||
## 修复方案
|
||||
修改`TicketAppServiceImpl.java`文件中的`convertToDto`方法,将BigDecimal类型的`fee`转换为String类型:
|
||||
|
||||
```java
|
||||
// 原代码
|
||||
dto.setFee(ticket.getFee());
|
||||
|
||||
// 修复后代码
|
||||
dto.setFee(ticket.getFee().toString());
|
||||
```
|
||||
|
||||
## 预期效果
|
||||
1. 修复后,后端能成功将`Ticket`实体转换为`TicketDto`
|
||||
2. 前端能接收到包含5条专家号源的完整列表
|
||||
3. 页面显示正常,不再出现"没有更多数据了"的提示
|
||||
|
||||
## 验证方法
|
||||
1. 重新启动项目,访问号源管理页面
|
||||
2. 选择"专家号"类型,查看是否能正确显示5条号源记录
|
||||
3. 检查日志,确认没有类型转换异常
|
||||
23
.trae/documents/修复门诊预约界面专家号查询问题.md
Normal file
23
.trae/documents/修复门诊预约界面专家号查询问题.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# 修复门诊预约界面专家号查询问题
|
||||
|
||||
## 问题分析
|
||||
从日志中发现关键问题:
|
||||
- 前端传递的ticket_type值是英文:`general` (普通号) 和 `expert` (专家号)
|
||||
- 数据库中存储的ticket_type值是中文:`普通` 和 `专家`
|
||||
- 导致查询条件不匹配,无法查询到数据
|
||||
|
||||
## 解决方案
|
||||
需要在后端添加类型映射转换,将前端传递的英文类型转换为数据库中存储的中文类型。
|
||||
|
||||
## 修复步骤
|
||||
1. 修改 `TicketAppServiceImpl.java` 文件,在处理type参数时添加映射转换逻辑
|
||||
2. 添加从英文类型到中文类型的映射关系
|
||||
3. 测试修复后的功能,确保普通号和专家号都能正确查询
|
||||
|
||||
## 代码修改点
|
||||
- 文件:`d:/work/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/appservice/impl/TicketAppServiceImpl.java`
|
||||
- 方法:`listTicket` 中的type参数处理部分
|
||||
- 修改内容:添加类型映射转换,将 "general" 转换为 "普通","expert" 转换为 "专家"
|
||||
|
||||
## 预期效果
|
||||
修复后,前端选择"普通号"或"专家号"时,系统能正确查询到对应的号源数据,不再出现"没有更多数据了"的提示。
|
||||
23
.trae/documents/修复门诊预约界面只显示1条数据的问题.md
Normal file
23
.trae/documents/修复门诊预约界面只显示1条数据的问题.md
Normal file
@@ -0,0 +1,23 @@
|
||||
**问题分析**:
|
||||
后端返回的响应格式是`{code: 200, msg: "操作成功", data: {total: 5, limit: 20, page: 1, list: [5条记录]}}`,而前端可能期望直接访问`list`属性,导致只能显示1条数据。
|
||||
|
||||
**修复方案**:
|
||||
|
||||
1. 修改`TicketAppServiceImpl.java`的`listTicket`方法,确保返回的分页数据格式正确
|
||||
2. 调整响应结构,使其更符合前端期望
|
||||
3. 保持与现有代码的兼容性
|
||||
|
||||
**修改点**:
|
||||
|
||||
* `TicketAppServiceImpl.java`:优化`listTicket`方法的响应格式
|
||||
|
||||
* 确保分页信息和列表数据都能正确返回给前端
|
||||
|
||||
**预期效果**:
|
||||
|
||||
* 后端返回正确格式的响应数据
|
||||
|
||||
* 前端能够正确显示所有5条专家号数据
|
||||
|
||||
* 保持与现有代码的兼容性
|
||||
|
||||
509
.windsurfrules
509
.windsurfrules
@@ -1,509 +0,0 @@
|
||||
# HealthLink-HIS — AI 开发规范 (Windsurf)
|
||||
|
||||
> 🤖 Windsurf 打开本项目时自动加载此文件。
|
||||
|
||||
---
|
||||
|
||||
# HealthLink-HIS — AI 开发规范(自动加载)
|
||||
|
||||
> 🤖 **本文件供所有 AI 编码工具自动读取**。进入本项目后必须遵守以下规范。
|
||||
>
|
||||
> **模型决定上限,Harness 决定底线。**
|
||||
|
||||
---
|
||||
|
||||
## 一、项目概览
|
||||
|
||||
| 属性 | 值 |
|
||||
|------|------|
|
||||
| 项目名 | HealthLink-HIS(医院信息系统) |
|
||||
| 后端路径 | `healthlink-his-server/` |
|
||||
| 前端路径 | `healthlink-his-ui/` |
|
||||
| 文档路径 | `MD/` |
|
||||
| JDK | 25 (OpenJDK) |
|
||||
| Spring Boot | 4.0.6 |
|
||||
| MyBatis-Plus | 3.5.16 |
|
||||
| Vue | 3.x + Vite + Element Plus |
|
||||
| 数据库 | PostgreSQL 15+ |
|
||||
| 包名 | `com.healthlink.his` |
|
||||
| 后端端口 | 18082 |
|
||||
| 前端端口 | 81 |
|
||||
|
||||
---
|
||||
|
||||
## 二、铁律(必须遵守,违反即失败)
|
||||
|
||||
### 🔴 P0 铁律 — 不可违反
|
||||
|
||||
**铁律1: 修改完必须测试**
|
||||
```
|
||||
后端: mvn clean compile -DskipTests → mvn install -DskipTests → mvn test
|
||||
前端: npm run build:dev → npm run lint
|
||||
```
|
||||
- 白盒:编译通过,无 ERROR
|
||||
- 黑盒:关键接口返回 `{code:200, data:...}`,验证业务逻辑
|
||||
- 冒烟:应用正常启动,核心流程通畅
|
||||
|
||||
**铁律2: Flyway 数据库迁移**
|
||||
- 凡是新建表、新增字段,必须创建 Flyway 迁移脚本
|
||||
- 路径:`healthlink-his-domain/src/main/resources/db/migration/`
|
||||
- 命名:`V{版本号}__{描述}.sql`(双下划线)
|
||||
|
||||
**铁律3: 测试通过后才提交**
|
||||
- 编译 + 测试全部通过后才能 git commit
|
||||
- 不提交未完成的功能、调试代码、临时文件
|
||||
|
||||
**铁律4: 前后端API路径对齐**
|
||||
- 后端前缀:`/healthlink-his/api/v1/`
|
||||
- 前端 `request.js` 的 baseURL 必须与后端匹配
|
||||
|
||||
**铁律5: 状态值一致性(Bug #574 教训)**
|
||||
- 修改任何状态值前,必须先列出完整的状态流转链路
|
||||
- 检查项:枚举定义 → Service 设置 → 查询映射 → 前端 STATUS_CLASS_MAP → 前端 v-if → 统计SQL
|
||||
- 禁止:只改一端不检查其他端
|
||||
|
||||
**铁律6: 禁止删除源文件(Bug #574 教训)**
|
||||
- 绝对禁止删除项目中已有的 Java/Vue/SQL 源文件
|
||||
- 编译错误 → 修复错误;重复文件 → 重构合并
|
||||
- 唯一例外:明确由人类确认删除的文件
|
||||
|
||||
**铁律7: 禁止修改已有公开方法签名**
|
||||
- 不能删除/重命名已有的 public 方法,不能修改参数列表
|
||||
- 需要新功能 → 添加重载方法;需要改行为 → 修改内部实现
|
||||
|
||||
**铁律8: 验证后才宣称完成(Verification Before Completion)**
|
||||
- **没有跑过验证命令,就不能说"完成了""通过了""没问题"**
|
||||
- 禁止使用"应该可以""大概没问题""看起来正确"
|
||||
- 必须:运行命令 → 读取输出 → 确认结果 → 才能宣称
|
||||
- 这是诚实原则,不是效率问题
|
||||
|
||||
|
||||
**铁律9: 开发前必须审核原有代码(P0 — 铁律)**
|
||||
- **任何新功能开发前,必须先搜索项目中是否已有相关代码**
|
||||
- 搜索路径:Controller / AppService / Service / Mapper / Entity / 前端页面 / API接口
|
||||
- 如果已有部分功能 → 在原有代码基础上**升级优化完善**,禁止另起炉灶
|
||||
- 如果已有接口但前端缺失 → 只补前端,不重复建后端
|
||||
- 如果已有前端但后端缺失 → 只补后端,不重写前端
|
||||
- 搜索命令:`rg -l "关键词" healthlink-his-server/ healthlink-his-ui/src/`
|
||||
- 禁止:不看代码就新建模块、重复实现已有功能、废弃原有代码另写一套
|
||||
|
||||
|
||||
**铁律12: 设计文档确认后自主开发(铁律)**
|
||||
- 设计文档(如 `MD/architecture/GRADE3A_GAP_ANALYSIS_AND_DESIGN.md`)一旦确认,后续开发**必须按文档自主执行**
|
||||
- **禁止反复询问"是否继续""下一步做什么""是否开始"**——直接按计划推进
|
||||
- 每完成一个 Sprint,自动提交推送,然后立即开始下一个 Sprint
|
||||
- 只在遇到**无法解决的阻塞**(如技术选型冲突、需求不明确、第三方依赖不可用)时才暂停询问
|
||||
- 设计文档是"**已签合同**",不是"参考意见"。铁律执行优先级:设计文档 > 人类临时指令 > AI 自行判断
|
||||
|
||||
**铁律18: 禁止破坏原有功能(P0绝对铁律)**
|
||||
- **完善增加功能和流程时,绝对不能破坏或者让原有功能不能用**
|
||||
- 修改已有实体前必须对比原始文件(`git show HEAD~N:./file.java`),保留所有原有字段和方法
|
||||
- 新增字段只能追加,不能删除或重命名已有字段
|
||||
- SQL迁移只允许 `ALTER TABLE ADD COLUMN`,不允许 `DROP COLUMN` 或 `RENAME COLUMN`
|
||||
- Controller新端点不能修改已有端点的路径或参数
|
||||
- 前端新页面不能修改已有页面的组件结构
|
||||
- 每次修改后必须 `mvn clean compile -DskipTests` 验证
|
||||
- **违规判定**: 因修改导致原有代码编译失败或运行报错,视为违反铁律18,必须立即回滚修复
|
||||
|
||||
|
||||
### 🟡 P1 铁律 — 强烈建议
|
||||
|
||||
**铁律9: 先分解再行动**
|
||||
- 修改超过3个文件、涉及多模块、数据库变更,必须先制定计划
|
||||
|
||||
**铁律10: 验证后信**
|
||||
- 每次修改后必须验证编译通过,不信记忆
|
||||
|
||||
**铁律13: 文档统一管理**
|
||||
- 所有文档存储在 `MD/` 目录
|
||||
- 文件名:大写英文+下划线(如 `BACKEND_CHECKLIST.md`)
|
||||
- 文档头部必须包含元数据块(文档类型、版本、日期)
|
||||
|
||||
---
|
||||
|
||||
|
||||
**铁律14: 设计文档必须包含UI设计和调用流程**
|
||||
- 所有新模块/页面的设计文档必须包含:UI布局描述、交互效果清单、前后端调用流程
|
||||
- 没有明确UI设计的模块,禁止直接编码
|
||||
- 详见
|
||||
- 设计文档必须写清楚:系统调用关系、方法函数调用关系、完整业务流程
|
||||
- 设计文档中每个用户操作必须对应:前端事件 → API调用 → 后端处理链路 → 返回数据 → UI渲染
|
||||
|
||||
---
|
||||
|
||||
## 三、Karpathy 编码准则
|
||||
|
||||
> 减少 LLM 常见编码错误。偏向谨慎而非速度。
|
||||
|
||||
### 3.1 先想再写
|
||||
- 明确陈述假设,不确定就问
|
||||
- 多种解读时都列出来,不要默默选一种
|
||||
- 有更简单的方案就说出来,该推回就推回
|
||||
- 不清楚的地方停下来,说清楚哪里不清楚
|
||||
|
||||
### 3.2 简洁优先
|
||||
- 不做没要求的功能,不做一次性代码的抽象
|
||||
- 不加没要求的"灵活性"和"可配置性"
|
||||
- 200 行能 50 行搞定就重写
|
||||
- 自问:"高级工程师会不会觉得这过度设计?"
|
||||
|
||||
### 3.3 精准修改
|
||||
- 只改必须改的,不"顺手改进"相邻代码
|
||||
- 匹配现有代码风格,即使你有不同的偏好
|
||||
- 每行改动都能追溯到用户的请求
|
||||
- 只清理你自己改动产生的无用代码
|
||||
|
||||
### 3.4 目标驱动
|
||||
- 把任务转化为可验证目标
|
||||
- 多步任务声明计划:`[步骤] → 验证: [检查]`
|
||||
- 强验收标准让 Agent 能独立循环,弱标准需要持续澄清
|
||||
|
||||
---
|
||||
|
||||
## 四、全链路 6 环分析
|
||||
|
||||
> ⚠️ **涉及数据库字段的 Bug / 需求,必须走完整链路。**
|
||||
|
||||
```
|
||||
前端/页面 → Controller → Service → Mapper → DB/SQL → 关联模块
|
||||
①录入 ②验证 ③业务 ④持久化 ⑤存储 ⑥联动
|
||||
```
|
||||
|
||||
| 环 | 检查内容 |
|
||||
|----|---------|
|
||||
| ① 录入 | 前端有无输入入口(弹窗、表格行编辑、表单) |
|
||||
| ② 验证 | Controller 参数校验、@Valid、权限控制 |
|
||||
| ③ 业务 | Service 业务逻辑、事务边界、多个 Service 实现类入口 |
|
||||
| ④ 持久化 | Mapper XML、DTO 字段映射、类型转换 |
|
||||
| ⑤ 存储 | 数据库表结构、索引、NOT NULL 约束 |
|
||||
| ⑥ 联动 | 上游(医嘱→护士站)、下游(打印、计费、报表)是否同步 |
|
||||
|
||||
**修复后的验证顺序**:
|
||||
1. 数据库:确认状态值已正确写入
|
||||
2. 后端接口:确认返回的状态映射正确
|
||||
3. 前端显示:确认页面显示正确状态文本
|
||||
4. 前端交互:确认按钮/操作基于正确状态启用/禁用
|
||||
5. 统计数据:确认池/报表统计包含新状态
|
||||
|
||||
---
|
||||
|
||||
## 五、Harness Engineering 方法论
|
||||
|
||||
> Harness = 约束 + 反馈 + 控制平面 + 持久执行
|
||||
|
||||
### 5.1 四层约束金字塔
|
||||
|
||||
| 层级 | 内容 | 落地方式 |
|
||||
|------|------|---------|
|
||||
| **L1 架构约束** | 接口合约、包结构、命名规范、禁止模式 | 本文件铁律 |
|
||||
| **L2 代码质量** | 圈复杂度、代码风格、类型提示 | 编译门禁 + ESLint |
|
||||
| **L3 安全约束** | 敏感信息检测、权限检查、输入验证 | 配置不可硬编码 |
|
||||
| **L4 业务规则** | 领域逻辑、数据一致性、事务边界 | 全链路 6 环验证 |
|
||||
|
||||
**约束设计原则**:
|
||||
- **可验证**:每条约束必须能被自动化检查("覆盖率>90%"✅ "质量要高"❌)
|
||||
- **无歧义**:"每函数不超过50行"✅ "函数不要太长"❌
|
||||
- **优先级**:安全(1) > 架构(2) > 业务(3) > 质量(4) > 性能(5)
|
||||
- **渐进增强**:L1编译通过 → L2+命名规范 → L3+测试覆盖 → L4+安全扫描
|
||||
|
||||
### 5.2 三层反馈系统
|
||||
|
||||
| 层级 | 速度 | 覆盖范围 | 失败处理 |
|
||||
|------|------|---------|---------|
|
||||
| **L1 编译检查** | <30秒 | 语法、类型、签名 | 立即阻断,自行修复 |
|
||||
| **L2 数据流验证** | <5分钟 | 全链路字段、Mapper XML、DTO | 修复后上报 |
|
||||
| **L3 人工审查** | 10-30分钟 | 架构、设计、业务正确性 | 驳回/指导/批准 |
|
||||
|
||||
**反馈铁律**:
|
||||
- 反馈必须可行动(文件 + 行号 + 错误类型 + 修复方向)
|
||||
- 失败后先回滚到最近检查点,再重试
|
||||
- 持续失败3次 → 上报人类
|
||||
|
||||
### 5.3 控制平面
|
||||
|
||||
```
|
||||
战略层(人类) → 设定目标、审批决策、异常升级
|
||||
战术层(Agent) → 任务分解、update_plan、依赖协调、检查点保存
|
||||
执行层(Agent) → 代码生成、测试执行、错误恢复、幂等重试
|
||||
```
|
||||
|
||||
### 5.4 持久执行
|
||||
|
||||
- 每个关键步骤保存检查点(`update_plan` 进度)
|
||||
- 失败后从最新检查点恢复,不从头开始
|
||||
- 幂等设计:同一操作重复执行结果一致
|
||||
- **三层状态管理**:系统层(工作流ID/超时/重试) → 执行层(当前活动/进度) → 业务层(已完成工作/中间产物)
|
||||
|
||||
---
|
||||
|
||||
## 六、五层质量门禁
|
||||
|
||||
| 门禁 | 时间 | 范围 | 失败处理 |
|
||||
|------|------|------|---------|
|
||||
| **L1 编译检查** | <30秒 | 语法、类型、导入 | Agent 自行修复 |
|
||||
| **L2 静态分析** | <2分钟 | 代码风格、复杂度、安全 | Agent 修复 |
|
||||
| **L3 单元测试** | <5分钟 | 功能正确性、边界条件 | 自动修复或上报 |
|
||||
| **L4 集成测试** | <15分钟 | 模块间交互、数据流 | 上报人工 |
|
||||
| **L5 生产验证** | 持续 | 监控、告警、性能 | 自动回滚 |
|
||||
|
||||
**提交铁律**:L1-L2 必须通过才能 commit,L3(如有DB变更)必须通过才能 push
|
||||
|
||||
---
|
||||
|
||||
## 七、系统化调试(Systematic Debugging)
|
||||
|
||||
> **铁律:没有根因调查,不能提出修复方案。**
|
||||
|
||||
### 四阶段流程
|
||||
|
||||
**阶段1:根因调查**(修复前必须完成)
|
||||
1. 仔细阅读错误信息(堆栈、行号、错误码)
|
||||
2. 稳定复现(能否可靠触发?步骤?每次?)
|
||||
3. 检查最近变更(git diff、新依赖、配置变更)
|
||||
4. 多组件系统:在每个组件边界加诊断日志,定位哪一层断裂
|
||||
5. 追踪数据流:坏值从哪里来?谁调用的?一直追溯到源头
|
||||
|
||||
**阶段2:模式分析**
|
||||
- 找到同代码库中类似的正常工作代码
|
||||
- 逐项对比差异
|
||||
- 理解依赖关系
|
||||
|
||||
**阶段3:假设与测试**
|
||||
- 形成单一假设:"我认为X是根因,因为Y"
|
||||
- 做最小改动测试
|
||||
- 有效 → 阶段4;无效 → 新假设
|
||||
|
||||
**阶段4:实施**
|
||||
- 创建失败测试用例
|
||||
- 修复根因(不是症状)
|
||||
- 验证修复
|
||||
|
||||
---
|
||||
|
||||
## 八、后端开发规范
|
||||
|
||||
### 分层架构
|
||||
```
|
||||
Controller → AppService → Service → Mapper → Entity
|
||||
```
|
||||
|
||||
### 命名规范
|
||||
| 类型 | 规则 | 示例 |
|
||||
|------|------|------|
|
||||
| Controller | `XxxController` | `RegistrationController` |
|
||||
| AppService | `IXxxAppService` / `XxxAppServiceImpl` | `IRegistrationAppService` |
|
||||
| Service | `IXxxService` / `XxxServiceImpl` | `IRegistrationService` |
|
||||
| Mapper | `XxxMapper` | `RegistrationMapper` |
|
||||
| Entity | `Xxx` | `Registration` |
|
||||
| DTO | `XxxDto` / `XxxQueryDto` | `RegistrationDto` |
|
||||
|
||||
### 包结构
|
||||
```
|
||||
com.healthlink.his.web.{module}.controller
|
||||
com.healthlink.his.web.{module}.appservice
|
||||
com.healthlink.his.web.{module}.service
|
||||
com.healthlink.his.web.{module}.mapper
|
||||
com.healthlink.his.web.{module}.dto
|
||||
com.healthlink.his.domain.{module}
|
||||
com.healthlink.his.common.enums
|
||||
```
|
||||
|
||||
### 关键约束
|
||||
- 所有查询使用 `LambdaQueryWrapper`,禁止字符串拼接 SQL
|
||||
- `@Transactional(rollbackFor = Exception.class)` 管理事务
|
||||
- 所有接口标注 `@PreAuthorize` 权限控制
|
||||
- 患者敏感信息在日志中脱敏
|
||||
- **扩展功能不修改原有函数签名**
|
||||
|
||||
---
|
||||
|
||||
## 九、前端开发规范
|
||||
|
||||
### 技术栈
|
||||
- Vue 3 + Vite + Element Plus + Pinia + Axios(基于 RuoYi-Vue3)
|
||||
|
||||
### 目录结构
|
||||
```
|
||||
src/api/{module}/ # API接口
|
||||
src/views/{module}/ # 页面组件
|
||||
src/store/modules/ # Pinia状态管理
|
||||
src/components/ # 公共组件
|
||||
```
|
||||
|
||||
### 关键约束
|
||||
- API前缀:`/healthlink-his/api/v1/`
|
||||
- 路由懒加载:`() => import('@/views/xxx/index.vue')`
|
||||
- 页面使用 `<script setup>` 语法
|
||||
- 按钮权限使用 `v-hasPermi` 指令
|
||||
- `onMounted` 中注册的事件在 `onUnmounted` 中移除
|
||||
|
||||
---
|
||||
|
||||
## 十、Agent 体系
|
||||
|
||||
### 角色与路由
|
||||
|
||||
| 代号 | 名称 | 角色 | 路由关键词 |
|
||||
|------|------|------|-----------|
|
||||
| liubei | 刘备 | 项目经理 | 协调、分派、异常升级 |
|
||||
| zhugeliang | 诸葛亮 | 架构师 | 分析、路由、设计 |
|
||||
| guanyu | 关羽 | 后端开发 | java, api, spring, service, controller |
|
||||
| zhaoyun | 赵云 | 前端开发 | vue, 界面, 显示, 弹窗, 按钮 |
|
||||
| xunyu | 荀彧 | DBA | 数据库, sql, 迁移, mapper xml |
|
||||
| zhangfei | 张飞 | 测试 | 测试, QA, 回归 |
|
||||
| huatuo | 华佗 | 验收 | 需求验收、质量确认 |
|
||||
| chenlin | 陈琳 | 文档 | 文档、归档、Git提交 |
|
||||
|
||||
### 协作流水线
|
||||
|
||||
```
|
||||
刘备(协调) → 诸葛亮(分析路由) → {关羽|赵云}(修复) → 荀彧(DB审查) → 张飞(测试) → 华佗(验收) → 陈琳(归档)
|
||||
```
|
||||
|
||||
### Bug 修复完整管线(BDT 方法论)
|
||||
|
||||
```
|
||||
获取Bug → 设计测试用例 → 基线测试(应失败) → 全链路修复 → 回归测试(应通过) → 扩展测试(无回归) → 提交
|
||||
```
|
||||
|
||||
### Bug 状态管理铁律
|
||||
- 人类提的 Bug:只加备注,不改状态,不改分配
|
||||
- 智能体提的 Bug:可以改分配和加备注
|
||||
- 已关闭/已解决的 Bug 不再处理
|
||||
|
||||
---
|
||||
|
||||
## 十一、审查与审计
|
||||
|
||||
### 三层审查体系
|
||||
|
||||
| 层级 | 内容 | 时机 |
|
||||
|------|------|------|
|
||||
| **L1 自审** | Agent 对照约束逐条检查 | 每次提交前 |
|
||||
| **L2 配对审查** | Agent 生成变更摘要,人类终审 | PR/提交时 |
|
||||
| **L3 合规审查** | 审计追踪,记录所有 AI 操作 | 持续 |
|
||||
|
||||
### L1 自审清单
|
||||
```yaml
|
||||
self_review:
|
||||
- "所有修改能通过编译?"
|
||||
- "遵守命名规范?"
|
||||
- "测试覆盖达标?"
|
||||
- "没有遗漏的 TODO / DEBUG?"
|
||||
- "变更范围没超出任务边界?"
|
||||
```
|
||||
|
||||
### 评审评分维度
|
||||
| 维度 | 问题 |
|
||||
|------|------|
|
||||
| 正确性 | 行为是否符合目标功能? |
|
||||
| 验证 | 检查是否真的跑过并留下证据? |
|
||||
| 范围纪律 | 是否保持在选定功能范围内? |
|
||||
| 可靠性 | 结果能否在重启后继续工作? |
|
||||
| 可维护性 | 代码和文档是否清楚到可交接? |
|
||||
|
||||
---
|
||||
|
||||
## 十二、标准工作循环
|
||||
|
||||
```
|
||||
开始会话
|
||||
├→ 1. Init — 读 AGENTS.md + PROGRESS.md + git log
|
||||
├→ 2. Select — 只选一个未完成功能
|
||||
├→ 3. Implement — 一次只做一个,不扩大范围
|
||||
├→ 4. Verify — 运行验证命令,有证据才标记完成
|
||||
└→ 5. Cleanup — 更新进度 + clean-state-checklist + git commit
|
||||
```
|
||||
|
||||
### 会话结束前必须运行 Clean State Checklist
|
||||
```
|
||||
□ 标准启动路径仍然可用
|
||||
□ 标准验证路径仍然可运行
|
||||
□ 当前进度已记录到进度日志
|
||||
□ 无半成品步骤处于未记录状态
|
||||
□ 下一轮会话无需人工修复即可继续
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十三、开发流程
|
||||
|
||||
```
|
||||
收到任务
|
||||
├→ ① 分析需求 → 读相关文档(MD/)、读全链路6环
|
||||
├→ ② 制定计划 → update_plan (3-6个阶段)
|
||||
├→ ③ 后端开发 → Controller → AppService → Service → Mapper → Entity → Flyway
|
||||
├→ ④ 后端测试 → mvn test → 接口测试(业务逻辑验证)
|
||||
├→ ⑤ 前端开发 → API接口 → 页面组件 → 路由配置
|
||||
├→ ⑥ 前端测试 → npm run build:dev → 功能验证
|
||||
├→ ⑦ 质量门禁 → L1编译 → L2测试 → L3DB审查 → L4验收 → L5归档
|
||||
└→ ⑧ 提交代码 → git commit(规范格式) → git push → 文档更新
|
||||
```
|
||||
|
||||
### Git Commit 格式
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
type: feat|fix|docs|refactor|test|chore
|
||||
scope: 模块名(如 registration, billing, pharmacy)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十四、快速参考命令
|
||||
|
||||
```bash
|
||||
# === 后端 ===
|
||||
export JAVA_HOME=/opt/jdk-25
|
||||
mvn clean compile -DskipTests # 编译
|
||||
mvn install -DskipTests # 构建
|
||||
mvn test -pl healthlink-his-application -Dtest="XxxTest" -Dsurefire.failIfNoSpecifiedTests=false
|
||||
|
||||
# === 前端 ===
|
||||
cd healthlink-his-ui
|
||||
npm run dev && npm run build:dev && npm run lint && npm run test:run
|
||||
|
||||
# === Git ===
|
||||
git status && git add -A && git commit -m "feat(module): desc" && git push origin develop
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十五、详细规范文档索引
|
||||
|
||||
| 文档 | 路径 | 用途 |
|
||||
|------|------|------|
|
||||
| 执行铁律 | `MD/specs/IRON_RULES.md` | 铁律完整版 |
|
||||
| 后端规范 | `MD/specs/BACKEND_DEVELOPMENT_STANDARD.md` | 后端编码标准 |
|
||||
| 前端规范 | `MD/specs/FRONTEND_DEVELOPMENT_STANDARD.md` | 前端编码标准 |
|
||||
| Harness方法论 | `MD/specs/HARNESS_ENGINEERING.md` | 完整Harness+Agent方法论 |
|
||||
| 文档规范 | `MD/DOCUMENTATION_STANDARD.md` | 文档管理标准 |
|
||||
| 后端清单 | `MD/specs/BACKEND_CHECKLIST.md` | 发布前检查 |
|
||||
| 前端清单 | `MD/specs/FRONTEND_CHECKLIST.md` | 发布前检查 |
|
||||
| 三甲标准 | `MD/standards/GRADE3A_HIS_STANDARD.md` | 三甲医院达标标准 |
|
||||
| Flyway指南 | `MD/guides/FLYWAY_USAGE_GUIDE.md` | 数据库迁移指南 |
|
||||
|
||||
---
|
||||
|
||||
## 十六、过往教训
|
||||
|
||||
| 教训 | 内容 |
|
||||
|------|------|
|
||||
| 状态链路断裂 | Bug#574: 签到设 BOOKED(1) 而非 CHECKED_IN(3),前端映射缺失 → 必须走完整状态链路 |
|
||||
| 盲删源文件 | AI 看到编译错误直接删文件,没检查 baseline → 必须先确认文件来源 |
|
||||
| 修复方向偏差 | 多次 fallback 改的是错误的 Service → 必须用 rg 搜索所有相关代码路径 |
|
||||
| bug_reports 缺列 | INSERT 静默失败 → 必须检查表结构 |
|
||||
| 禅道 comment API | API 不存在,用 resolve+activate workaround |
|
||||
| SQLite WAL 并发 | 多进程并发写需要 checkpoint |
|
||||
| UTF-8 切片 | 多字节字符不能用 byte index 切片 |
|
||||
| 上下文焦虑 | Agent 感觉上下文快满时会匆忙结束,跳过验证 → 注意 context 40% 阈值 |
|
||||
| 过早宣告胜利 | 自评≠验证,分开"干活"和"检查" |
|
||||
| 覆盖率幻觉 | 覆盖率达标但逻辑没测 → 引入变异测试 |
|
||||
|
||||
---
|
||||
|
||||
> ⚠️ 本文件是 AI 开发规范的唯一信源。各工具配置文件由 `bash scripts/sync-ai-rules.sh` 同步。
|
||||
|
||||
---
|
||||
|
||||
> 📅 最后同步: 2026-06-06 15:09 | 源文件: RULES.md | 重新同步: `bash scripts/sync-ai-rules.sh`
|
||||
674
LICENSE
Normal file
674
LICENSE
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright 2022-2025 湖北天天数链技术有限公司
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
OpenHis Copyright (C) 2022-2025 湖北天天数链技术有限公司
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -1,192 +0,0 @@
|
||||
# HealthLink HIS 文档管理规范
|
||||
|
||||
> **文档类型**: 技术规范
|
||||
> **适用范围**: 项目所有文档(Markdown格式)
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: 2026-06-06
|
||||
> **最后更新**: 2026-06-06
|
||||
|
||||
---
|
||||
|
||||
## 一、目录结构规范
|
||||
|
||||
```
|
||||
MD/
|
||||
├── DOCUMENTATION_STANDARD.md # 本文档(规范)
|
||||
├── architecture/ # 架构设计
|
||||
├── development/ # 开发计划与记录
|
||||
├── standards/ # 国家/行业标准
|
||||
├── specs/ # 技术规范与流程
|
||||
├── bugs/ # Bug分析与修复记录
|
||||
├── guides/ # 使用指南
|
||||
└── upgrade/ # 升级记录
|
||||
```
|
||||
|
||||
### 1.1 目录说明
|
||||
|
||||
| 目录 | 用途 | 示例文件 |
|
||||
|---|---|---|
|
||||
| `architecture/` | 系统架构、模块设计、数据库设计 | `GRADE3A_DETAILED_DESIGN.md` |
|
||||
| `development/` | 开发计划、进度记录、功能分析 | `DEVELOPMENT_PLAN_V2.md` |
|
||||
| `standards/` | 国家/行业标准规范、政策文件 | `GRADE3A_HIS_STANDARD.md` |
|
||||
| `specs/` | 技术规范、流程定义、检查清单 | `BACKEND_CHECKLIST.md` |
|
||||
| `bugs/` | Bug分析、修复记录、问题追踪 | `BUG_632_ANALYSIS.md` |
|
||||
| `guides/` | 使用指南、操作手册 | `FLYWAY_USAGE_GUIDE.md` |
|
||||
| `upgrade/` | 升级计划、升级日志 | `SPRINGBOOT_UPGRADE_LOG.md` |
|
||||
|
||||
---
|
||||
|
||||
## 二、文件命名规范
|
||||
|
||||
### 2.1 命名规则
|
||||
|
||||
```
|
||||
<类别>_<子类别>_<简短描述>.md
|
||||
```
|
||||
|
||||
### 2.2 命名格式
|
||||
|
||||
| 类别 | 格式 | 示例 |
|
||||
|---|---|---|
|
||||
| **架构设计** | `ARCH_<模块>_<描述>` | `ARCH_DATABASE_DESIGN.md` |
|
||||
| **开发计划** | `PLAN_<类型>_<版本>` | `PLAN_DEVELOPMENT_V2.md` |
|
||||
| **国家标准** | `STD_<标准名称>` | `STD_GRADE3A_HIS.md` |
|
||||
| **技术规范** | `SPEC_<类型>_<描述>` | `SPEC_BACKEND_CHECKLIST.md` |
|
||||
| **Bug修复** | `BUG_<编号>_<描述>` | `BUG_632_ANALYSIS.md` |
|
||||
| **使用指南** | `GUIDE_<主题>` | `GUIDE_FLYWAY.md` |
|
||||
| **升级记录** | `UPGRADE_<组件>_<类型>` | `UPGRADE_SPRINGBOOT_LOG.md` |
|
||||
|
||||
### 2.3 命名规则详解
|
||||
|
||||
1. **全部大写** — 文件名使用大写字母和下划线
|
||||
2. **英文命名** — 所有文件名使用英文(描述内容可用中文)
|
||||
3. **下划线分隔** — 单词之间用下划线连接
|
||||
4. **版本号** — 在文件名末尾标注版本(如 `_V2`)
|
||||
5. **日期标注** — 不在文件名中使用日期(使用文件内元数据)
|
||||
|
||||
### 2.4 禁止事项
|
||||
|
||||
- ❌ 使用中文作为文件名
|
||||
- ❌ 使用空格分隔单词
|
||||
- ❌ 使用特殊字符(`!@#$%^&*`)
|
||||
- ❌ 文件名超过50个字符
|
||||
- ❌ 使用大驼峰命名(`MyDocument.md`)
|
||||
|
||||
---
|
||||
|
||||
## 三、文档格式规范
|
||||
|
||||
### 3.1 文档头部元数据
|
||||
|
||||
每个文档必须包含以下元数据:
|
||||
|
||||
```markdown
|
||||
# 文档标题
|
||||
|
||||
> **文档类型**: [架构设计|开发计划|技术规范|Bug修复|使用指南|升级记录]
|
||||
> **适用范围**: [描述适用的模块或场景]
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: YYYY-MM-DD
|
||||
> **最后更新**: YYYY-MM-DD
|
||||
> **编制人**: [姓名/角色]
|
||||
```
|
||||
|
||||
### 3.2 文档结构模板
|
||||
|
||||
```markdown
|
||||
# 文档标题
|
||||
|
||||
> 元数据块
|
||||
|
||||
---
|
||||
|
||||
## 一、概述
|
||||
<!-- 简要描述文档目的和内容 -->
|
||||
|
||||
## 二、详细内容
|
||||
<!-- 主体内容 -->
|
||||
|
||||
## 三、实施计划
|
||||
<!-- 如果适用 -->
|
||||
|
||||
## 四、注意事项
|
||||
<!-- 关键约束和注意事项 -->
|
||||
|
||||
---
|
||||
|
||||
> **文档版本**: v1.0
|
||||
> **最后更新**: YYYY-MM-DD
|
||||
```
|
||||
|
||||
### 3.3 格式要求
|
||||
|
||||
| 要求 | 说明 |
|
||||
|---|---|
|
||||
| **标题层级** | 使用 `#` `##` `###`,不超过4级 |
|
||||
| **表格** | 使用标准Markdown表格格式 |
|
||||
| **代码块** | 使用 ``` 包裹,标注语言类型 |
|
||||
| **列表** | 使用 `-` 或 `1.` 统一格式 |
|
||||
| **链接** | 使用相对路径引用其他文档 |
|
||||
| **图片** | 使用相对路径,存储在 `assets/` 目录 |
|
||||
|
||||
---
|
||||
|
||||
## 四、文件分类映射表
|
||||
|
||||
### 4.1 现有文件映射
|
||||
|
||||
| 原文件路径 | 新文件路径 | 说明 |
|
||||
|---|---|---|
|
||||
| `docs/三甲医院HIS系统标准规范汇编.md` | `MD/standards/GRADE3A_HIS_STANDARD.md` | 三甲标准规范 |
|
||||
| `docs/GRADE3A_DETAILED_DESIGN.md` | `MD/architecture/GRADE3A_DETAILED_DESIGN.md` | 三甲详细设计 |
|
||||
| `docs/GRADE3A_DEVELOPMENT_PLAN.md` | `MD/development/GRADE3A_DEVELOPMENT_PLAN.md` | 三甲开发计划 |
|
||||
| `docs/GRADE3A_HIS_DESIGN.md` | `MD/architecture/GRADE3A_HIS_DESIGN.md` | 三甲HIS设计 |
|
||||
| `docs/DEVELOPMENT_PLAN_V2.md` | `MD/development/DEVELOPMENT_PLAN_V2.md` | 开发计划V2 |
|
||||
| `docs/BACKEND_UPGRADE_PLAN.md` | `MD/upgrade/BACKEND_UPGRADE_PLAN.md` | 后端升级计划 |
|
||||
| `docs/UPGRADE_PLAN_v2.0.md` | `MD/upgrade/UPGRADE_PLAN_V2.md` | 升级计划V2 |
|
||||
| `docs/UPGRADE_LOG.md` | `MD/upgrade/UPGRADE_LOG.md` | 升级日志 |
|
||||
| `docs/MYBATIS_PLUS_UPGRADE_PLAN.md` | `MD/upgrade/MYBATIS_PLUS_UPGRADE.md` | MyBatis升级 |
|
||||
| `docs/RUOYI_392_UPGRADE_CHECKLIST.md` | `MD/upgrade/RUOYI_UPGRADE_CHECKLIST.md` | 若依升级清单 |
|
||||
| `docs/FLYWAY_USAGE_GUIDE.md` | `MD/guides/FLYWAY_USAGE_GUIDE.md` | Flyway使用指南 |
|
||||
| `docs/MENU_FUNCTION_ANALYSIS.md` | `MD/development/MENU_FUNCTION_ANALYSIS.md` | 菜单功能分析 |
|
||||
| `docs/HIS项目Bug修复记录-v1.0.md` | `MD/bugs/BUG_FIX_RECORD.md` | Bug修复记录 |
|
||||
| `docs/bug439_analysis.md` | `MD/bugs/BUG_439_ANALYSIS.md` | Bug 439分析 |
|
||||
| `docs/bug462_analysis.md` | `MD/bugs/BUG_462_ANALYSIS.md` | Bug 462分析 |
|
||||
| `docs/bug494_analysis.md` | `MD/bugs/BUG_494_ANALYSIS.md` | Bug 494分析 |
|
||||
| `docs/bug498_analysis.md` | `MD/bugs/BUG_498_ANALYSIS.md` | Bug 498分析 |
|
||||
| `docs/bug-fixes/bug-632.md` | `MD/bugs/BUG_632_ANALYSIS.md` | Bug 632分析 |
|
||||
| `docs/bug-fixes/bug-634.md` | `MD/bugs/BUG_634_ANALYSIS.md` | Bug 634分析 |
|
||||
| `docs/bug-fixes/bug-644.md` | `MD/bugs/BUG_644_ANALYSIS.md` | Bug 644分析 |
|
||||
| `docs/specs/backend-checklist.md` | `MD/specs/BACKEND_CHECKLIST.md` | 后端检查清单 |
|
||||
| `docs/specs/frontend-checklist.md` | `MD/specs/FRONTEND_CHECKLIST.md` | 前端检查清单 |
|
||||
| `docs/specs/cicd-gatekeeper.md` | `MD/specs/CICD_GATEKEEPER.md` | CI/CD门禁 |
|
||||
| `docs/specs/commit-template.md` | `MD/specs/COMMIT_TEMPLATE.md` | 提交模板 |
|
||||
| `docs/specs/his-release-checklist-v1.0.md` | `MD/specs/RELEASE_CHECKLIST.md` | 发布清单 |
|
||||
| `docs/specs/playwright-e2e-testing-plan.md` | `MD/specs/PLAYWRIGHT_TESTING_PLAN.md` | E2E测试计划 |
|
||||
|
||||
---
|
||||
|
||||
## 五、铁律
|
||||
|
||||
1. **文档统一存储** — 所有文档必须存储在 `MD/` 目录中
|
||||
2. **命名规范** — 所有文件名必须遵循命名规范
|
||||
3. **格式规范** — 所有文档必须包含元数据块
|
||||
4. **版本管理** — 重大修改必须更新版本号
|
||||
5. **及时更新** — 代码变更后必须同步更新相关文档
|
||||
|
||||
---
|
||||
|
||||
## 六、检查清单
|
||||
|
||||
- [ ] 文件名是否使用大写英文+下划线?
|
||||
- [ ] 文件是否存储在正确的子目录中?
|
||||
- [ ] 文档头部是否包含元数据块?
|
||||
- [ ] 文档结构是否符合模板?
|
||||
- [ ] 代码块是否标注语言类型?
|
||||
- [ ] 表格是否使用标准格式?
|
||||
- [ ] 链接是否使用相对路径?
|
||||
|
||||
---
|
||||
|
||||
> **文档版本**: v1.0
|
||||
> **最后更新**: 2026-06-06
|
||||
@@ -1,425 +0,0 @@
|
||||
# HealthLink-HIS 代码模块索引
|
||||
|
||||
> 供 LLM 快速定位代码。每个模块列出 Controller → Service → Mapper 关键文件。
|
||||
> 最后更新: 2026-06-15 06:00 (298 个 Controller)
|
||||
|
||||
## 关键词 → 模块速查
|
||||
|
||||
| 关键词 | 后端模块 | 前端目录 |
|
||||
|---|---|---|
|
||||
| 门诊医生站/门诊医嘱/门诊处方/诊断/检查申请 | `doctorstation` | `doctorstation` |
|
||||
| 住院医生站/住院医嘱/临床医嘱/签发/停嘱 | `regdoctorstation` | `inpatientDoctor` |
|
||||
| 住院护士站/医嘱校对/医嘱执行/护理/换床 | `inhospitalnursestation` | `inpatientNurse` |
|
||||
| 挂号/门诊收费/门诊结算 | `chargemanage` | `charge` |
|
||||
| 住院收费/住院结算/预交金 | `inhospitalcharge` | `inHospitalManagement` |
|
||||
| 收费管理/计费/退费 | `paymentmanage` | `outpatientFinance` |
|
||||
| 药品/药房/药库/发药/取药 | `pharmacymanage` | `pharmacymanagement` |
|
||||
| 药房发药/门诊发药 | `pharmacyDispensarymanage` | `drug` |
|
||||
| 药库管理/库存 | `pharmacyWarehousemanage` | `medicineStorage` |
|
||||
| 库存管理/盘点/出入库 | `inventorymanage` | `medicineStorage` |
|
||||
| 物资管理/耗材 | `materialmanage` | `` |
|
||||
| 字典/数据字典/诊疗目录/基础数据 | `datadictionary` | `datadictionary` |
|
||||
| 部门/科室管理 | `departmentmanage` | `system` |
|
||||
| 卡管理/就诊卡 | `cardmanagement` | `cardmanagement` |
|
||||
| 检验/化验/标本 | `lab` | `inspection` |
|
||||
| 检查/影像/放射 | `Inspection` | `inspection` |
|
||||
| 手术/手术安排/手术申请 | `surgicalschedule` | `surgerymanage` |
|
||||
| 病历/电子病历/EMR | `emr` | `emr` |
|
||||
| 护理记录/护理评估 | `nursing` | `nursing` |
|
||||
| 分诊/排队/叫号 | `triageandqueuemanage` | `triageandqueuemanage` |
|
||||
| 医保/医保对码/医保目录 | `ybmanage` | `ybmanagement` |
|
||||
| 会诊/会诊申请 | `consultation` | `consultationmanagement` |
|
||||
| 院感/感染上报 | `infection` | `infection` |
|
||||
| 合理用药/处方审核 | `rationaldrug` | `rationaldrug` |
|
||||
| 中医/中医处方 | `tcm` | `tcm` |
|
||||
| 患者管理/患者信息 | `patientmanage` | `patientmanagement` |
|
||||
| 预约/挂号预约 | `appointmentmanage` | `appoinmentmanage` |
|
||||
| 报告/报告管理 | `reportmanage` | `` |
|
||||
| 质控/质量 | `quality` | `quality` |
|
||||
| 系统管理/用户/角色/权限 | `basicmanage` | `system` |
|
||||
| 门诊管理/门诊工作站 | `outpatientmanage` | `doctorstation` |
|
||||
| 前置手术/术前管理 | `preopmanage` | `preopmanage` |
|
||||
| 危急值 | `criticalvalue` | `criticalvalue` |
|
||||
| 抗菌药 | `antibiotic` | `antibiotic` |
|
||||
| 随访 | `followup` | `followup` |
|
||||
| request.js/请求拦截/响应拦截 | `common` | `crossmodule` |
|
||||
|
||||
## 后端模块详情
|
||||
|
||||
### `Inspection` (40 files)
|
||||
- **Controller**: `Inspection/controller/SampleCollectController.java` `Inspection/controller/ObservationDefController.java` `Inspection/controller/LabReferenceRangeController.java`
|
||||
- **AppService**: `Inspection/appservice/ISampleCollectAppManageAppService.java` `Inspection/appservice/ILisConfigManageAppService.java` `Inspection/appservice/IInstrumentManageAppService.java`
|
||||
- **ServiceImpl**: `Inspection/appservice/impl/LisConfigManageAppServiceImpl.java` `Inspection/appservice/impl/ObservationManageAppServiceImpl.java` `Inspection/appservice/impl/SpecimenManageAppServiceImpl.java`
|
||||
- **Mapper**: `Inspection/mapper/SampleCollectMapper.java` `Inspection/mapper/LisReportMapper.java` `Inspection/mapper/GroupRecMapper.java`
|
||||
- **DTO**: `Inspection/dto/SampleCollectManageDto.java` `Inspection/dto/SpecimenDefManageDto.java` `Inspection/dto/InstrumentManageDto.java` `Inspection/dto/LisConfigManageDto.java` `Inspection/dto/InstrumentSelParam.java`
|
||||
|
||||
### `adjustprice` (10 files)
|
||||
- **Controller**: `adjustprice/controller/ChangePriceController.java` `adjustprice/controller/ChangePriceDataListPageController.java`
|
||||
- **ServiceImpl**: `adjustprice/appservice/impl/AdjustPriceServiceImpl.java`
|
||||
- **Mapper**: `adjustprice/mapper/AdjustPriceMapper.java`
|
||||
- **DTO**: `adjustprice/dto/ChangePriceDataDto.java` `adjustprice/dto/AdjustPriceManagerSearchParam.java` `adjustprice/dto/ChangePricePageDto.java`
|
||||
|
||||
### `anesthesia` (4 files)
|
||||
- **Controller**: `anesthesia/controller/AnesthesiaController.java` `anesthesia/controller/AnesthesiaEnhancedController.java`
|
||||
- **AppService**: `anesthesia/appservice/IAnesthesiaAppService.java`
|
||||
- **ServiceImpl**: `anesthesia/appservice/impl/AnesthesiaAppServiceImpl.java`
|
||||
|
||||
### `antibiotic` (3 files)
|
||||
- **Controller**: `antibiotic/controller/AntibioticController.java`
|
||||
- **AppService**: `antibiotic/appservice/IAntibioticAppService.java`
|
||||
- **ServiceImpl**: `antibiotic/appservice/impl/AntibioticAppServiceImpl.java`
|
||||
|
||||
### `appointmentmanage` (29 files)
|
||||
- **Controller**: `appointmentmanage/controller/ScheduleSlotController.java` `appointmentmanage/controller/DeptAppthoursController.java` `appointmentmanage/controller/SchedulePoolController.java`
|
||||
- **AppService**: `appointmentmanage/appservice/IDeptAppService.java` `appointmentmanage/appservice/IDoctorScheduleAppService.java` `appointmentmanage/appservice/IClinicRoomAppService.java`
|
||||
- **ServiceImpl**: `appointmentmanage/appservice/impl/DoctorScheduleAppServiceImpl.java` `appointmentmanage/appservice/impl/DeptAppointmentHoursAppServiceImpl.java` `appointmentmanage/appservice/impl/TicketAppServiceImpl.java`
|
||||
- **Mapper**: `appointmentmanage/mapper/DoctorScheduleAppMapper.java` `appointmentmanage/mapper/SchedulePoolAppMapper.java` `appointmentmanage/mapper/DeptAppMapper.java`
|
||||
- **DTO**: `appointmentmanage/dto/TicketDto.java` `appointmentmanage/dto/SchedulePoolDto.java`
|
||||
|
||||
### `basedatamanage` (44 files)
|
||||
- **Controller**: `basedatamanage/controller/OrganizationLocationController.java` `basedatamanage/controller/BodyStructureController.java` `basedatamanage/controller/OperatingRoomController.java`
|
||||
- **AppService**: `basedatamanage/appservice/IOrganizationAppService.java` `basedatamanage/appservice/IBodyStructureAppService.java` `basedatamanage/appservice/ILocationAppService.java`
|
||||
- **ServiceImpl**: `basedatamanage/appservice/impl/PractitionerAppServiceImpl.java` `basedatamanage/appservice/impl/BodyStructureAppServiceImpl.java` `basedatamanage/appservice/impl/OrganizationAppServiceImpl.java`
|
||||
- **Mapper**: `basedatamanage/mapper/PractitionerAppAppMapper.java`
|
||||
- **DTO**: `basedatamanage/dto/SelectableOrgDto.java` `basedatamanage/dto/PractitionerOrgAndLocationDto.java` `basedatamanage/dto/OrganizationInitDto.java` `basedatamanage/dto/OperatingRoomDto.java` `basedatamanage/dto/LocationInitDto.java`
|
||||
|
||||
### `basicmanage` (5 files)
|
||||
- **Controller**: `basicmanage/controller/BedController.java` `basicmanage/controller/InvoiceController.java` `basicmanage/controller/InvoiceSegmentController.java`
|
||||
|
||||
### `basicservice` (7 files)
|
||||
- **Controller**: `basicservice/controller/HealthcareServiceController.java`
|
||||
- **Mapper**: `basicservice/mapper/HealthcareServiceBizMapper.java`
|
||||
- **DTO**: `basicservice/dto/HealthcareServiceAddOrUpdateParam.java` `basicservice/dto/HealthcareServiceDto.java` `basicservice/dto/HealthcareServiceInitDto.java`
|
||||
|
||||
### `ca` (3 files)
|
||||
- **Controller**: `ca/controller/CaSignatureController.java`
|
||||
- **AppService**: `ca/appservice/ICaSignatureAppService.java`
|
||||
- **ServiceImpl**: `ca/appservice/impl/CaSignatureAppServiceImpl.java`
|
||||
|
||||
### `cardmanagement` (17 files)
|
||||
- **Controller**: `cardmanagement/controller/CardManageController.java`
|
||||
- **AppService**: `cardmanagement/appservice/ICardManageAppService.java`
|
||||
- **ServiceImpl**: `cardmanagement/appservice/impl/CardManageAppServiceImpl.java`
|
||||
- **Mapper**: `cardmanagement/mapper/InfectiousAuditMapper.java` `cardmanagement/mapper/InfectiousCardMapper.java`
|
||||
- **DTO**: `cardmanagement/dto/InfectiousCardDto.java` `cardmanagement/dto/DoctorCardQueryDto.java` `cardmanagement/dto/DoctorCardListDto.java` `cardmanagement/dto/SingleReturnDto.java` `cardmanagement/dto/CardStatisticsDto.java`
|
||||
|
||||
### `catalogmanage` (4 files)
|
||||
- **Controller**: `catalogmanage/controller/CatalogController.java`
|
||||
- **ServiceImpl**: `catalogmanage/appservice/impl/CatalogServiceImpl.java`
|
||||
- **Mapper**: `catalogmanage/mapper/CatalogMapper.java`
|
||||
|
||||
### `charge` (4 files)
|
||||
- **Controller**: `charge/patientcardrenewal/PatientCardRenewalController.java`
|
||||
- **ServiceImpl**: `charge/patientcardrenewal/PatientCardRenewalServiceImpl.java`
|
||||
|
||||
### `chargemanage` (46 files)
|
||||
- **Controller**: `chargemanage/controller/OutpatientRegistrationController.java` `chargemanage/controller/OutpatientPricingController.java` `chargemanage/controller/InpatientChargeController.java`
|
||||
- **AppService**: `chargemanage/appservice/IInpatientChargeAppService.java` `chargemanage/appservice/IOutpatientRegistrationAppService.java` `chargemanage/appservice/IOutpatientRefundAppService.java`
|
||||
- **ServiceImpl**: `chargemanage/appservice/impl/OutpatientChargeAppServiceImpl.java` `chargemanage/appservice/impl/InpatientChargeAppServiceImpl.java` `chargemanage/appservice/impl/OutpatientRefundAppServiceImpl.java`
|
||||
- **Mapper**: `chargemanage/mapper/OutpatientRefundAppMapper.java` `chargemanage/mapper/OutpatientRegistrationAppMapper.java` `chargemanage/mapper/OutpatientChargeAppMapper.java`
|
||||
- **DTO**: `chargemanage/dto/ReprintRegistrationDto.java` `chargemanage/dto/EncounterPatientRefundDto.java` `chargemanage/dto/OutpatientPricingPriceDto.java` `chargemanage/dto/OutpatientPricingInventoryDto.java` `chargemanage/dto/RefundItemParam.java`
|
||||
|
||||
### `check` (27 files)
|
||||
- **Controller**: `check/controller/CheckMethodController.java` `check/controller/SpecimenBarcodeController.java` `check/controller/RadiologyEnhancedController.java`
|
||||
- **AppService**: `check/appservice/ILisGroupInfoAppService.java` `check/appservice/ICheckPartAppService.java` `check/appservice/ICheckMethodAppService.java`
|
||||
- **ServiceImpl**: `check/appservice/impl/CheckMethodAppServiceImpl.java` `check/appservice/impl/CheckPartAppServiceImpl.java` `check/appservice/impl/CheckPackageAppServiceImpl.java`
|
||||
- **Mapper**: `check/mapper/LisGroupInfoAppMapper.java` `check/mapper/CheckMethodAppMapper.java` `check/mapper/CheckPartAppMapper.java`
|
||||
- **DTO**: `check/dto/CheckPackageDetailDto.java` `check/dto/ExamApplyDto.java` `check/dto/ExamApplyItemDto.java` `check/dto/CheckPackageDto.java` `check/dto/CheckMethodDto.java`
|
||||
|
||||
### `clinical` (2 files)
|
||||
- **Controller**: `clinical/controller/KnowledgeBaseController.java` `clinical/controller/ClinicalPathwayController.java`
|
||||
|
||||
### `clinicalmanage` (11 files)
|
||||
- **Controller**: `clinicalmanage/controller/SurgicalScheduleController.java` `clinicalmanage/controller/SurgeryController.java`
|
||||
- **AppService**: `clinicalmanage/appservice/ISurgicalScheduleAppService.java` `clinicalmanage/appservice/ISurgeryAppService.java`
|
||||
- **ServiceImpl**: `clinicalmanage/appservice/impl/SurgicalScheduleAppServiceImpl.java` `clinicalmanage/appservice/impl/SurgeryAppServiceImpl.java`
|
||||
- **Mapper**: `clinicalmanage/mapper/SurgicalScheduleAppMapper.java` `clinicalmanage/mapper/SurgeryAppMapper.java`
|
||||
- **DTO**: `clinicalmanage/dto/SurgeryDto.java` `clinicalmanage/dto/OpScheduleDto.java` `clinicalmanage/dto/OpCreateScheduleDto.java`
|
||||
|
||||
### `common` (17 files)
|
||||
- **Controller**: `common/controller/CommonAppController.java`
|
||||
- **ServiceImpl**: `common/appservice/impl/CommonServiceImpl.java`
|
||||
- **Mapper**: `common/mapper/CommonAppMapper.java`
|
||||
- **DTO**: `common/dto/ActivityDefinitionDto.java` `common/dto/PerformInfoDto.java` `common/dto/PractitionerInfoDto.java` `common/dto/LocationInventoryDto.java` `common/dto/PerformRecordDto.java`
|
||||
|
||||
### `consultation` (19 files)
|
||||
- **Controller**: `consultation/controller/ConsultationController.java`
|
||||
- **AppService**: `consultation/appservice/IConsultationAppService.java`
|
||||
- **ServiceImpl**: `consultation/appservice/impl/ConsultationAppServiceImpl.java`
|
||||
- **Mapper**: `consultation/mapper/ConsultationInvitedMapper.java` `consultation/mapper/ConsultationConfirmationMapper.java` `consultation/mapper/ConsultationRequestMapper.java`
|
||||
- **DTO**: `consultation/dto/PhysicianNodeDto.java` `consultation/dto/InvitedObjectDto.java` `consultation/dto/ConsultationActivityDto.java` `consultation/dto/DepartmentTreeDto.java` `consultation/dto/ConsultationRequestDto.java`
|
||||
|
||||
### `controller` (2 files)
|
||||
- **Controller**: `controller/WorkflowController.java` `controller/HomeStatisticsController.java`
|
||||
|
||||
### `criticalvalue` (3 files)
|
||||
- **Controller**: `criticalvalue/controller/CriticalValueController.java`
|
||||
- **AppService**: `criticalvalue/appservice/ICriticalValueAppService.java`
|
||||
- **ServiceImpl**: `criticalvalue/appservice/impl/CriticalValueAppServiceImpl.java`
|
||||
|
||||
### `crossmodule` (3 files)
|
||||
- **Controller**: `crossmodule/controller/CrossModuleController.java` `crossmodule/controller/EnhancementController.java` `crossmodule/controller/IntegrationController.java`
|
||||
|
||||
### `datadictionary` (65 files)
|
||||
- **Controller**: `datadictionary/controller/DiagnosisTreatmentController.java` `datadictionary/controller/MedicationManageController.java` `datadictionary/controller/DiseaseManageController.java`
|
||||
- **AppService**: `datadictionary/appservice/IDeviceManageAppService.java` `datadictionary/appservice/IDiagTreatMAppService.java` `datadictionary/appservice/ItemDefinitionAppService.java`
|
||||
- **ServiceImpl**: `datadictionary/appservice/impl/DiagTreatMAppServiceImpl.java` `datadictionary/appservice/impl/SupplierManagementAppServiceImpl.java` `datadictionary/appservice/impl/ItemDefinitionAppServiceImpl.java`
|
||||
- **Mapper**: `datadictionary/mapper/MedicationManageSearchMapper.java` `datadictionary/mapper/ICDCodeMapper.java` `datadictionary/mapper/ActivityDefinitionManageMapper.java`
|
||||
- **DTO**: `datadictionary/dto/DeviceManageUpDto.java` `datadictionary/dto/ChargeItemOptionDto.java` `datadictionary/dto/SupplierDto.java` `datadictionary/dto/DiagnosisTreatmentInitDto.java` `datadictionary/dto/DiagnosisTreatmentSelParam.java`
|
||||
|
||||
### `departmentmanage` (42 files)
|
||||
- **Controller**: `departmentmanage/controller/DepartmentTransferOutOrderController.java` `departmentmanage/controller/DepartmentReturnToWarehouseOrderController.java` `departmentmanage/controller/DepartmentStocktakingOrderController.java`
|
||||
- **ServiceImpl**: `departmentmanage/appservice/impl/DepartmentReceiptApprovalServiceImpl.java` `departmentmanage/appservice/impl/DepartmentStockInOrderServiceImpl.java` `departmentmanage/appservice/impl/DepartmentCommonServiceImpl.java`
|
||||
- **Mapper**: `departmentmanage/mapper/DepartmentTransferInOrderMapper.java` `departmentmanage/mapper/DepartmentStocktakingOrderMapper.java` `departmentmanage/mapper/DepartmentTransferOutOrderMapper.java`
|
||||
- **DTO**: `departmentmanage/dto/DepartmentDeviceInfoDto.java` `departmentmanage/dto/DepartmentDetailDto.java` `departmentmanage/dto/DepartmentInitDto.java` `departmentmanage/dto/DepartmentSearchParam.java` `departmentmanage/dto/DepartmentDto.java`
|
||||
|
||||
### `doctorstation` (91 files)
|
||||
- **Controller**: `doctorstation/controller/DoctorStationDiagnosisController.java` `doctorstation/controller/DoctorStationInspectionLabApplyController.java` `doctorstation/controller/DoctorStationChineseMedicalController.java`
|
||||
- **AppService**: `doctorstation/appservice/IDoctorPhraseAppService.java` `doctorstation/appservice/IDoctorStationEmrAppService.java` `doctorstation/appservice/IDoctorStationMainAppService.java`
|
||||
- **ServiceImpl**: `doctorstation/appservice/impl/DoctorStationPtDetailsAppServiceImpl.java` `doctorstation/appservice/impl/DoctorStationElepPrescriptionServiceImpl.java` `doctorstation/appservice/impl/DoctorPhraseAppServiceImpl.java`
|
||||
- **Mapper**: `doctorstation/mapper/DoctorStationAdviceAppMapper.java` `doctorstation/mapper/DoctorStationEmrAppMapper.java` `doctorstation/mapper/DoctorStationDiagnosisAppMapper.java`
|
||||
- **DTO**: `doctorstation/dto/EncounterContractDto.java` `doctorstation/dto/AdviceInventoryDto.java` `doctorstation/dto/ActivityChildrenJsonParams.java` `doctorstation/dto/DoctorStationLabApplyItemDto.java` `doctorstation/dto/DoctorStationInitDto.java`
|
||||
|
||||
### `document` (47 files)
|
||||
- **Controller**: `document/controller/DocRecordController.java` `document/controller/DocDefinitionController.java` `document/controller/InformedConsentController.java`
|
||||
- **AppService**: `document/appservice/IDocStatisticsAppService.java` `document/appservice/IDocRecordAppService.java` `document/appservice/IDocTemplateAppService.java`
|
||||
- **ServiceImpl**: `document/appservice/impl/DocStatisticsDefinitionAppServiceImpl.java` `document/appservice/impl/DocRecordAppServiceImpl.java` `document/appservice/impl/DocStatisticsAppServiceImpl.java`
|
||||
- **Mapper**: `document/mapper/DocRecordAppMapper.java` `document/mapper/DocStatisticsDefinitionAppMapper.java` `document/mapper/DocDefinitionAppMapper.java`
|
||||
- **DTO**: `document/dto/DocStatisticsDefinitionDto.java` `document/dto/DocRecordPatientQueryParam.java` `document/dto/DocDefinitionOrganizationDto.java` `document/dto/DocRecordDto.java` `document/dto/DocTemplateDto.java`
|
||||
|
||||
### `empi` (5 files)
|
||||
- **Controller**: `empi/controller/EmpiController.java` `empi/controller/EmpiIdVerificationController.java` `empi/controller/EmpiEnhancedController.java`
|
||||
- **AppService**: `empi/appservice/IEmpiAppService.java`
|
||||
- **ServiceImpl**: `empi/appservice/impl/EmpiAppServiceImpl.java`
|
||||
|
||||
### `emr` (6 files)
|
||||
- **Controller**: `emr/controller/EmrArchiveController.java` `emr/controller/StructuredEmrController.java` `emr/controller/EmrRevisionController.java`
|
||||
- **AppService**: `emr/appservice/IStructuredEmrAppService.java`
|
||||
- **ServiceImpl**: `emr/appservice/impl/StructuredEmrAppServiceImpl.java`
|
||||
|
||||
### `epidemic` (3 files)
|
||||
- **Controller**: `epidemic/controller/EpidemicController.java`
|
||||
- **AppService**: `epidemic/appservice/IEpidemicAppService.java`
|
||||
- **ServiceImpl**: `epidemic/appservice/impl/EpidemicAppServiceImpl.java`
|
||||
|
||||
### `esbmanage` (4 files)
|
||||
- **Controller**: `esbmanage/controller/EsbReliabilityController.java` `esbmanage/controller/EsbMessageController.java` `esbmanage/controller/EsbServiceRegistryController.java`
|
||||
|
||||
### `externalintegration` (18 files)
|
||||
- **Controller**: `externalintegration/controller/FoodborneAcquisitionAppController.java`
|
||||
- **AppService**: `externalintegration/appservice/IBankPosCloudAppService.java` `externalintegration/appservice/IFoodborneAcquisitionAppService.java`
|
||||
- **ServiceImpl**: `externalintegration/appservice/impl/FoodborneAcquisitionAppServiceImpl.java` `externalintegration/appservice/impl/BankPosCloudAppServiceImpl.java`
|
||||
- **Mapper**: `externalintegration/mapper/FoodborneAcquisitionAppMapper.java`
|
||||
- **DTO**: `externalintegration/dto/BpcTransactionResponseDto.java` `externalintegration/dto/BpcPaymentScanNotifyDto.java` `externalintegration/dto/FaSimplediseaseAddNopwParam.java` `externalintegration/dto/BpcTransactionRequestDto.java` `externalintegration/dto/BpcDataElementDto.java`
|
||||
|
||||
### `infection` (4 files)
|
||||
- **Controller**: `infection/controller/InfectionEnhancedController.java` `infection/controller/InfectionController.java`
|
||||
- **AppService**: `infection/appservice/IInfectionAppService.java`
|
||||
- **ServiceImpl**: `infection/appservice/impl/InfectionAppServiceImpl.java`
|
||||
|
||||
### `inhospitalcharge` (17 files)
|
||||
- **Controller**: `inhospitalcharge/controller/AdvancePaymentManageController.java` `inhospitalcharge/controller/InHospitalRegisterController.java`
|
||||
- **AppService**: `inhospitalcharge/appservice/IInHospitalRegisterAppService.java` `inhospitalcharge/appservice/IAdvancePaymentManageAppService.java`
|
||||
- **ServiceImpl**: `inhospitalcharge/appservice/impl/AdvancePaymentManageAppServiceImpl.java` `inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java`
|
||||
- **Mapper**: `inhospitalcharge/mapper/InHospitalRegisterAppMapper.java` `inhospitalcharge/mapper/AdvancePaymentManageAppMapper.java`
|
||||
- **DTO**: `inhospitalcharge/dto/AdvancePaymentInAndOutDto.java` `inhospitalcharge/dto/PatientUpdateDto.java` `inhospitalcharge/dto/NoFilesRegisterDto.java` `inhospitalcharge/dto/InHospitalPatientInfoDto.java` `inhospitalcharge/dto/InHospitalRegisterQueryDto.java`
|
||||
|
||||
### `inhospitalnursestation` (52 files)
|
||||
- **Controller**: `inhospitalnursestation/controller/AdviceProcessController.java` `inhospitalnursestation/controller/NurseBillingController.java` `inhospitalnursestation/controller/EncounterAutoRollAppController.java`
|
||||
- **AppService**: `inhospitalnursestation/appservice/IOrgDeviceStockTakeAppService.java` `inhospitalnursestation/appservice/IAdviceProcessAppService.java` `inhospitalnursestation/appservice/INurseBillingAppService.java`
|
||||
- **ServiceImpl**: `inhospitalnursestation/appservice/impl/OrgDeviceStockTakeAppServiceImpl.java` `inhospitalnursestation/appservice/impl/ATDManageAppServiceImpl.java` `inhospitalnursestation/appservice/impl/EncounterAutoRollAppServiceImpl.java`
|
||||
- **Mapper**: `inhospitalnursestation/mapper/ATDManageAppMapper.java` `inhospitalnursestation/mapper/EncounterAutoRollAppMapper.java` `inhospitalnursestation/mapper/MedicineSummaryAppMapper.java`
|
||||
- **DTO**: `inhospitalnursestation/dto/AdmissionBedPageDto.java` `inhospitalnursestation/dto/AdviceExecuteParam.java` `inhospitalnursestation/dto/InpatientAdviceParam.java` `inhospitalnursestation/dto/DispenseFormSearchParam.java` `inhospitalnursestation/dto/AutoRollNursingDto.java`
|
||||
|
||||
### `inpatientmanage` (40 files)
|
||||
- **Controller**: `inpatientmanage/controller/NursingVitalSignsChartController.java` `inpatientmanage/controller/VitalSignsController.java` `inpatientmanage/controller/PatientHomeController.java`
|
||||
- **AppService**: `inpatientmanage/appservice/IPatientHomeAppService.java` `inpatientmanage/appservice/IDepositAppService.java` `inpatientmanage/appservice/INursingRecordAppService.java`
|
||||
- **ServiceImpl**: `inpatientmanage/appservice/impl/DepositAppServiceImpl.java` `inpatientmanage/appservice/impl/NursingRecordAppServiceImpl.java` `inpatientmanage/appservice/impl/PatientHomeAppServiceImpl.java`
|
||||
- **Mapper**: `inpatientmanage/mapper/VitalSignsAppMapper.java` `inpatientmanage/mapper/DepositMapper.java` `inpatientmanage/mapper/NursingRecordAppMapper.java`
|
||||
- **DTO**: `inpatientmanage/dto/DepositDetailDto.java` `inpatientmanage/dto/VitalSignsChartSmallDto.java` `inpatientmanage/dto/VitalSignsSaveDto.java` `inpatientmanage/dto/PatientHomeSearchParam.java` `inpatientmanage/dto/PatientHomeEmptyBedDto.java`
|
||||
|
||||
### `inventorymanage` (107 files)
|
||||
- **Controller**: `inventorymanage/controller/PurchaseReturnController.java` `inventorymanage/controller/InventorySettlementController.java` `inventorymanage/controller/ReturnIssueController.java`
|
||||
- **AppService**: `inventorymanage/appservice/IProductStocktakingAppService.java` `inventorymanage/appservice/IInventoryDetailsAppService.java` `inventorymanage/appservice/IReturnIssueAppService.java`
|
||||
- **ServiceImpl**: `inventorymanage/appservice/impl/InventoryDetailsAppServiceImpl.java` `inventorymanage/appservice/impl/ProductTransferAppServiceImpl.java` `inventorymanage/appservice/impl/ReceiptApprovalAppServiceImpl.java`
|
||||
- **Mapper**: `inventorymanage/mapper/ProductDetailAppMapper.java` `inventorymanage/mapper/RequisitionIssueMapper.java` `inventorymanage/mapper/PurchaseReturnMapper.java`
|
||||
- **DTO**: `inventorymanage/dto/ProductTransferPageDto.java` `inventorymanage/dto/PurchaseInventoryDto.java` `inventorymanage/dto/ReceiptDetailDto.java` `inventorymanage/dto/RequisitionOutDetailDto.java` `inventorymanage/dto/InventoryReceiptDetailDto.java`
|
||||
|
||||
### `jlau` (5 files)
|
||||
- **Controller**: `jlau/controller/ReviewPrescriptionRecordsController.java`
|
||||
- **AppService**: `jlau/appservice/IReviewPrescriptionRecordsAppService.java`
|
||||
- **ServiceImpl**: `jlau/appservice/impl/ReviewPrescriptionRecordsAppServiceImpl.java`
|
||||
- **Mapper**: `jlau/mapper/ReviewPrescriptionRecordsAppMapper.java`
|
||||
- **DTO**: `jlau/dto/ReviewPrescriptionRecordsDto.java`
|
||||
|
||||
### `lab` (7 files)
|
||||
- **Controller**: `lab/controller/LabActivityDefinitionController.java` `lab/controller/LabHistoryController.java` `lab/controller/LabEnhancedController.java`
|
||||
- **AppService**: `lab/appservice/ILabActivityDefinitionAppService.java`
|
||||
- **ServiceImpl**: `lab/appservice/impl/LabActivityDefinitionAppServiceImpl.java`
|
||||
|
||||
### `materialmanage` (46 files)
|
||||
- **Controller**: `materialmanage/controller/MaterialReturnOrderController.java` `materialmanage/controller/MaterialTransferInOrderController.java` `materialmanage/controller/MaterialTransferOutOrderController.java`
|
||||
- **ServiceImpl**: `materialmanage/appservice/impl/MaterialPurchaseOrderServiceImpl.java` `materialmanage/appservice/impl/MaterialTransferOutOrderServiceImpl.java` `materialmanage/appservice/impl/MaterialReturnToWarehouseOrderServiceImpl.java`
|
||||
- **Mapper**: `materialmanage/mapper/MaterialCommonMapper.java` `materialmanage/mapper/MaterialProfitLossOrderMapper.java` `materialmanage/mapper/MaterialTransferOutOrderMapper.java`
|
||||
- **DTO**: `materialmanage/dto/MaterialInitDto.java` `materialmanage/dto/MaterialSearchParam.java` `materialmanage/dto/MaterialDto.java` `materialmanage/dto/MaterialDetailDto.java` `materialmanage/dto/MaterialDeviceInfoDto.java`
|
||||
|
||||
### `mrhomepage` (6 files)
|
||||
- **Controller**: `mrhomepage/controller/DrgAnalysisController.java` `mrhomepage/controller/MrManagementController.java` `mrhomepage/controller/MrHomepageController.java`
|
||||
- **AppService**: `mrhomepage/appservice/IMrHomepageAppService.java`
|
||||
- **ServiceImpl**: `mrhomepage/appservice/impl/MrHomepageAppServiceImpl.java`
|
||||
|
||||
### `nenu` (22 files)
|
||||
- **Controller**: `nenu/controller/GfRatioApplicationRecordController.java` `nenu/controller/GfStudentListController.java` `nenu/controller/GfRatioManageController.java`
|
||||
- **AppService**: `nenu/appservice/IGfRatioManageAppService.java` `nenu/appservice/IGfRatioApplicationRecordAppService.java` `nenu/appservice/IGfStudentListAppService.java`
|
||||
- **ServiceImpl**: `nenu/appservice/impl/GfRatioApplicationRecordAppServiceImpl.java` `nenu/appservice/impl/GfRatioManageAppServiceImpl.java` `nenu/appservice/impl/GfStudentListAppServiceImpl.java`
|
||||
- **Mapper**: `nenu/mapper/GfStudentListAppMapper.java` `nenu/mapper/GfRatioManageAppMapper.java` `nenu/mapper/GfRatioApplicationRecordAppMapper.java`
|
||||
- **DTO**: `nenu/dto/GfIndividualRatioDto.java` `nenu/dto/GfRatioApplicationRecordDto.java` `nenu/dto/GfStudentListImportDto.java` `nenu/dto/GfRatioApplicationProcessDto.java` `nenu/dto/GfStudentPeisDto.java`
|
||||
|
||||
### `nursing` (8 files)
|
||||
- **Controller**: `nursing/controller/NursingExecutionController.java` `nursing/controller/NursingAssessmentEnhancedController.java` `nursing/controller/NursingEnhancedController.java`
|
||||
- **AppService**: `nursing/appservice/INursingAppService.java`
|
||||
- **ServiceImpl**: `nursing/appservice/impl/NursingAppServiceImpl.java`
|
||||
|
||||
### `orderclosedloop` (3 files)
|
||||
- **Controller**: `orderclosedloop/controller/OrderClosedLoopController.java`
|
||||
- **AppService**: `orderclosedloop/appservice/IOrderClosedLoopAppService.java`
|
||||
- **ServiceImpl**: `orderclosedloop/appservice/impl/OrderClosedLoopAppServiceImpl.java`
|
||||
|
||||
### `outpatientmanage` (22 files)
|
||||
- **Controller**: `outpatientmanage/controller/OutpatientTreatmentController.java` `outpatientmanage/controller/OutpatientSkinTestAppController.java` `outpatientmanage/controller/OutpatientInfusionController.java`
|
||||
- **AppService**: `outpatientmanage/appservice/IOutpatientTreatmentAppService.java` `outpatientmanage/appservice/IOutpatientInfusionAppService.java` `outpatientmanage/appservice/IOutpatientSkinTestAppService.java`
|
||||
- **ServiceImpl**: `outpatientmanage/appservice/impl/OutpatientTreatmentAppServiceImpl.java` `outpatientmanage/appservice/impl/OutpatientSkinTestAppServiceImpl.java` `outpatientmanage/appservice/impl/OutpatientInfusionAppServiceImpl.java`
|
||||
- **Mapper**: `outpatientmanage/mapper/OutpatientTreatmentAppMapper.java` `outpatientmanage/mapper/OutpatientInfusionAppMapper.java` `outpatientmanage/mapper/OutpatientSkinTestAppMapper.java`
|
||||
- **DTO**: `outpatientmanage/dto/SkinTestMedLotNumberDto.java` `outpatientmanage/dto/OutpatientInfusionRecordDto.java` `outpatientmanage/dto/SkinTestSaveDto.java` `outpatientmanage/dto/OutpatientTreatmentInfoDto.java` `outpatientmanage/dto/OutpatientStationInitDto.java`
|
||||
|
||||
### `patientmanage` (13 files)
|
||||
- **Controller**: `patientmanage/controller/PatientInformationController.java` `patientmanage/controller/OutpatientRecordController.java`
|
||||
- **ServiceImpl**: `patientmanage/appservice/impl/OutpatientRecordServiceImpl.java` `patientmanage/appservice/impl/PatientInformationServiceImpl.java`
|
||||
- **Mapper**: `patientmanage/mapper/PatientManageMapper.java`
|
||||
- **DTO**: `patientmanage/dto/PatientInfoInitDto.java` `patientmanage/dto/PatientIdInfoDto.java` `patientmanage/dto/OutpatientRecordSearchParam.java` `patientmanage/dto/PatientBaseInfoDto.java` `patientmanage/dto/OutpatientRecordDto.java`
|
||||
|
||||
### `paymentmanage` (57 files)
|
||||
- **Controller**: `paymentmanage/controller/EleInvoiceController.java` `paymentmanage/controller/ChargeBillController.java` `paymentmanage/controller/PaymentContractController.java`
|
||||
- **ServiceImpl**: `paymentmanage/appservice/impl/PaymentRecServiceImpl.java` `paymentmanage/appservice/impl/IChargeBillServiceImpl.java` `paymentmanage/appservice/impl/EleInvoiceServiceImpl.java`
|
||||
- **Mapper**: `paymentmanage/mapper/EleInvoiceMapper.java` `paymentmanage/mapper/ThreePartPayMapper.java` `paymentmanage/mapper/ChangePriceMapper.java`
|
||||
- **DTO**: `paymentmanage/dto/NenuBpcPayDto.java` `paymentmanage/dto/EleInvoiceResultDto.java` `paymentmanage/dto/ChargeSummaryDto.java` `paymentmanage/dto/EleInvoicePaymentInfoDto.java` `paymentmanage/dto/Clinic2207OrderResultInfoDto.java`
|
||||
|
||||
### `personalization` (22 files)
|
||||
- **Controller**: `personalization/controller/ActivityDeviceController.java` `personalization/controller/OrdersGroupPackageController.java` `personalization/controller/OrderGroupController.java`
|
||||
- **AppService**: `personalization/appservice/IOrderGroupAppService.java` `personalization/appservice/IOrdersGroupPackageAppService.java` `personalization/appservice/IActivityDeviceAppService.java`
|
||||
- **ServiceImpl**: `personalization/appservice/impl/OrdersGroupPackageAppServiceImpl.java` `personalization/appservice/impl/ActivityDeviceAppServiceImpl.java` `personalization/appservice/impl/IOrderGroupAppServiceImpl.java`
|
||||
- **Mapper**: `personalization/mapper/OrdersGroupPackageAppMapper.java` `personalization/mapper/OrderGroupAppMapper.java` `personalization/mapper/ActivityDeviceAppMapper.java`
|
||||
- **DTO**: `personalization/dto/OrdersGroupPackageDetailSaveDto.java` `personalization/dto/OrderGroupDto.java` `personalization/dto/OrdersGroupPackageDto.java` `personalization/dto/OrderGroupInitDto.java` `personalization/dto/OrdersGroupPackageDetailQueryDto.java`
|
||||
|
||||
### `pharmacyDispensarymanage` (42 files)
|
||||
- **Controller**: `pharmacyDispensarymanage/controller/PharmacyDispensaryTransferOutOrderController.java` `pharmacyDispensarymanage/controller/PharmacyDispensaryDispensingOrderController.java` `pharmacyDispensarymanage/controller/PharmacyDispensaryStocktakingOrderController.java`
|
||||
- **ServiceImpl**: `pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryStocktakingOrderServiceImpl.java` `pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryTransferInOrderServiceImpl.java` `pharmacyDispensarymanage/appservice/impl/PharmacyDispensaryStockInOrderServiceImpl.java`
|
||||
- **Mapper**: `pharmacyDispensarymanage/mapper/PharmacyDispensaryReturnToWarehouseOrderMapper.java` `pharmacyDispensarymanage/mapper/PharmacyDispensaryTransferOutOrderMapper.java` `pharmacyDispensarymanage/mapper/PharmacyDispensaryRequisitionOrderMapper.java`
|
||||
- **DTO**: `pharmacyDispensarymanage/dto/PharmacyDispensaryDto.java` `pharmacyDispensarymanage/dto/PharmacyDispensaryDetailDto.java` `pharmacyDispensarymanage/dto/PharmacyDispensarySearchParam.java` `pharmacyDispensarymanage/dto/PharmacyDispensaryMedicationInfoDto.java` `pharmacyDispensarymanage/dto/PharmacyDispensaryInitDto.java`
|
||||
|
||||
### `pharmacyWarehousemanage` (42 files)
|
||||
- **Controller**: `pharmacyWarehousemanage/controller/PharmacyWarehouseProfitLossOrderController.java` `pharmacyWarehousemanage/controller/PharmacyWarehouseReturnToWarehouseOrderController.java` `pharmacyWarehousemanage/controller/PharmacyWarehouseStockOutOrderController.java`
|
||||
- **ServiceImpl**: `pharmacyWarehousemanage/appservice/impl/PharmacyWarehousePurchaseOrderServiceImpl.java` `pharmacyWarehousemanage/appservice/impl/PharmacyWarehouseDocumentManagementServiceImpl.java` `pharmacyWarehousemanage/appservice/impl/PharmacyWarehouseProfitLossOrderServiceImpl.java`
|
||||
- **Mapper**: `pharmacyWarehousemanage/mapper/PharmacyWarehousePurchaseOrderMapper.java` `pharmacyWarehousemanage/mapper/PharmacyWarehouseDocumentManagementMapper.java` `pharmacyWarehousemanage/mapper/PharmacyWarehouseStockInOrderMapper.java`
|
||||
- **DTO**: `pharmacyWarehousemanage/dto/PharmacyWarehouseDto.java` `pharmacyWarehousemanage/dto/PharmacyWarehouseDetailDto.java` `pharmacyWarehousemanage/dto/PharmacyWarehouseMedicationInfoDto.java` `pharmacyWarehousemanage/dto/PharmacyWarehouseInitDto.java` `pharmacyWarehousemanage/dto/PharmacyWarehouseSearchParam.java`
|
||||
|
||||
### `pharmacymanage` (53 files)
|
||||
- **Controller**: `pharmacymanage/controller/InHospitalReturnMedicineController.java` `pharmacymanage/controller/PharmacyStockAlertController.java` `pharmacymanage/controller/MedicationDetailsController.java`
|
||||
- **AppService**: `pharmacymanage/appservice/ISummaryDispenseMedicineAppService.java` `pharmacymanage/appservice/IPendingMedicationDetailsAppService.java` `pharmacymanage/appservice/IInHospitalReturnMedicineAppService.java`
|
||||
- **ServiceImpl**: `pharmacymanage/appservice/impl/ReturnMedicineAppServiceImpl.java` `pharmacymanage/appservice/impl/MedicationDetailsAppServiceImpl.java` `pharmacymanage/appservice/impl/WesternMedicineDispenseAppServiceImpl.java`
|
||||
- **Mapper**: `pharmacymanage/mapper/PendingMedicationDetailsMapper.java` `pharmacymanage/mapper/MedicalDeviceDispenseMapper.java` `pharmacymanage/mapper/SummaryDispenseMedicineMapper.java`
|
||||
- **DTO**: `pharmacymanage/dto/MedDetailsInitDto.java` `pharmacymanage/dto/EncounterInfoSearchParam.java` `pharmacymanage/dto/ItemDispenseOrderDto.java` `pharmacymanage/dto/MedicineSummaryDto.java` `pharmacymanage/dto/MedicineSummarySearchParam.java`
|
||||
|
||||
### `quality` (5 files)
|
||||
- **Controller**: `quality/controller/BusinessAnalyticsController.java` `quality/controller/QualityEnhancedController.java` `quality/controller/EmrQualityController.java`
|
||||
- **AppService**: `quality/appservice/IEmrQualityAppService.java`
|
||||
- **ServiceImpl**: `quality/appservice/impl/EmrQualityAppServiceImpl.java`
|
||||
|
||||
### `rationaldrug` (3 files)
|
||||
- **Controller**: `rationaldrug/controller/RationalDrugController.java`
|
||||
- **AppService**: `rationaldrug/appservice/IRationalDrugAppService.java`
|
||||
- **ServiceImpl**: `rationaldrug/appservice/impl/RationalDrugAppServiceImpl.java`
|
||||
|
||||
### `regdoctorstation` (38 files)
|
||||
- **Controller**: `regdoctorstation/controller/NurseManageController.java` `regdoctorstation/controller/AdviceManageController.java` `regdoctorstation/controller/SpecialAdviceController.java`
|
||||
- **AppService**: `regdoctorstation/appservice/IAdviceManageAppService.java` `regdoctorstation/appservice/IRequestFormManageAppService.java` `regdoctorstation/appservice/ISpecialAdviceAppService.java`
|
||||
- **ServiceImpl**: `regdoctorstation/appservice/impl/SpecialAdviceAppServiceImpl.java` `regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java` `regdoctorstation/appservice/impl/NurseManageServiceImpl.java`
|
||||
- **Mapper**: `regdoctorstation/mapper/RequestFormManageAppMapper.java` `regdoctorstation/mapper/AdviceManageAppMapper.java` `regdoctorstation/mapper/SpecialAdviceAppMapper.java`
|
||||
- **DTO**: `regdoctorstation/dto/RegPatientMainInfoDto.java` `regdoctorstation/dto/NursingOrdersDetailDto.java` `regdoctorstation/dto/LeaveHospitalParam.java` `regdoctorstation/dto/NursingOrdersSaveDto.java` `regdoctorstation/dto/NursingOrdersEncounterDto.java`
|
||||
|
||||
### `reportManagement` (11 files)
|
||||
- **Controller**: `reportManagement/controller/reportManagementController.java`
|
||||
- **AppService**: `reportManagement/appservice/IInfectiousCardAppService.java`
|
||||
- **ServiceImpl**: `reportManagement/appservice/impl/InfectiousCardAppServiceImpl.java`
|
||||
- **Mapper**: `reportManagement/mapper/ReportManageCardMapper.java`
|
||||
- **DTO**: `reportManagement/dto/InfectiousCardDto.java` `reportManagement/dto/InfectiousCardParam.java`
|
||||
|
||||
### `reportmanage` (164 files)
|
||||
- **Controller**: `reportmanage/controller/AmbAdviceStatisticsAppController.java` `reportmanage/controller/MonthlySettlementController.java` `reportmanage/controller/PurchaseReturnReportController.java`
|
||||
- **AppService**: `reportmanage/appservice/PurchaseReturnReportAppService.java` `reportmanage/appservice/IDrugDosageSettlementAppService.java` `reportmanage/appservice/IDepartmentRevenueStatisticsAppService.java`
|
||||
- **ServiceImpl**: `reportmanage/appservice/impl/InboundReportAppServiceImpl.java` `reportmanage/appservice/impl/MedicationInboundReportAppServiceImpl.java` `reportmanage/appservice/impl/ReportStatisticsAppServiceImpl.java`
|
||||
- **Mapper**: `reportmanage/mapper/PrintReportMapper.java` `reportmanage/mapper/ReportStatisticsMapper.java` `reportmanage/mapper/LossReportMapper.java`
|
||||
- **DTO**: `reportmanage/dto/ReportDiseaseDetailsDto.java` `reportmanage/dto/InboundReportSearchParam.java` `reportmanage/dto/InpatientMedicalRecordHomePageCollectionDto.java` `reportmanage/dto/ZyCostDetailParam.java` `reportmanage/dto/BottleLabelDto.java`
|
||||
|
||||
### `review` (3 files)
|
||||
- **Controller**: `review/controller/ReviewController.java`
|
||||
- **AppService**: `review/appservice/IReviewAppService.java`
|
||||
- **ServiceImpl**: `review/appservice/impl/ReviewAppServiceImpl.java`
|
||||
|
||||
### `service` (2 files)
|
||||
- **ServiceImpl**: `service/impl/HomeStatisticsServiceImpl.java`
|
||||
|
||||
### `system` (5 files)
|
||||
- **Controller**: `system/controller/ApiAuthController.java` `system/controller/DashboardController.java` `system/controller/SysAuditLogController.java`
|
||||
|
||||
### `tcm` (3 files)
|
||||
- **Controller**: `tcm/controller/TcmController.java`
|
||||
- **AppService**: `tcm/appservice/ITcmAppService.java`
|
||||
- **ServiceImpl**: `tcm/appservice/impl/TcmAppServiceImpl.java`
|
||||
|
||||
### `tencentJH` (13 files)
|
||||
- **Controller**: `tencentJH/controller/TencentController.java`
|
||||
- **AppService**: `tencentJH/appservice/ITencentAppService.java`
|
||||
- **ServiceImpl**: `tencentJH/appservice/impl/TencentAppServiceImpl.java`
|
||||
- **Mapper**: `tencentJH/mapper/TencentAppMapper.java`
|
||||
- **DTO**: `tencentJH/dto/PatientInfoTencentDto.java` `tencentJH/dto/CurrentDayEncounterTencentDto.java`
|
||||
|
||||
### `triageandqueuemanage` (13 files)
|
||||
- **Controller**: `triageandqueuemanage/controller/CallNumberVoiceConfigController.java` `triageandqueuemanage/controller/TriageQueueController.java`
|
||||
- **AppService**: `triageandqueuemanage/appservice/CallNumberVoiceConfigAppService.java` `triageandqueuemanage/appservice/TriageQueueAppService.java`
|
||||
- **ServiceImpl**: `triageandqueuemanage/appservice/impl/CallNumberVoiceConfigAppServiceImpl.java` `triageandqueuemanage/appservice/impl/TriageQueueAppServiceImpl.java`
|
||||
- **Mapper**: `triageandqueuemanage/mapper/CallNumberVoiceConfigAppMapper.java`
|
||||
|
||||
### `ybmanage` (55 files)
|
||||
- **Controller**: `ybmanage/controller/YbInpatientController.java` `ybmanage/controller/YbElepController.java` `ybmanage/controller/YbController.java`
|
||||
- **ServiceImpl**: `ybmanage/service/impl/YbEleHttpServiceImpl.java` `ybmanage/service/impl/YbServiceImpl.java` `ybmanage/service/impl/YbElepBaseServiceImpl.java`
|
||||
- **Mapper**: `ybmanage/mapper/YbElepMapper.java` `ybmanage/mapper/YbMapper.java`
|
||||
- **DTO**: `ybmanage/dto/FinancialHand3203AWebParam.java` `ybmanage/dto/FinancialHand3201WebParam.java` `ybmanage/dto/Financial13203WebParam.java` `ybmanage/dto/VeriPrescriptionInfoDto.java` `ybmanage/dto/YbInHospitalRegisterQueryDto.java`
|
||||
|
||||
## 前端关键文件
|
||||
|
||||
| 目录 | 说明 |
|
||||
|---|---|
|
||||
| `src/utils/request.js` | Axios 请求/响应拦截器 |
|
||||
| `src/api/` | API 接口定义 |
|
||||
| `src/components/` | 公共组件 |
|
||||
| `src/views/doctorstation/` | 门诊医生站 |
|
||||
| `src/views/inpatientDoctor/` | 住院医生站 |
|
||||
| `src/views/inpatientNurse/` | 住院护士站 |
|
||||
| `src/views/charge/` | 收费工作站 |
|
||||
| `src/views/datadictionary/` | 数据字典 |
|
||||
| `src/views/system/` | 系统管理 |
|
||||
|
||||
## 公共/通用文件
|
||||
|
||||
- `com.core.common.core.domain.R` — 统一响应封装
|
||||
- `com.core.common.core.domain.entity.SysDictData` — 字典数据实体
|
||||
- `com.core.common.utils.SecurityUtils` — 安全工具(获取当前用户)
|
||||
- `com.core.common.enums.*` — 枚举定义
|
||||
- `com.healthlink.his.common.constant.CommonConstants` — 公共常量
|
||||
- `com.healthlink.his.common.utils.HisQueryUtils` — 查询工具
|
||||
- `com.healthlink.his.common.utils.HisPageUtils` — 分页工具
|
||||
- `com.healthlink.his.web.doctorstation.utils.AdviceUtils` — 医嘱工具类
|
||||
|
||||
|
||||
=== 已生成 421 行索引 ===
|
||||
@@ -1,197 +0,0 @@
|
||||
# HealthLink-HIS 整体业务逻辑分析
|
||||
|
||||
> **文档类型**: 业务架构分析
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: 2026-06-06
|
||||
> **依据**: 三级医院评审标准 + 电子病历评级4级 + 互联互通四级甲等
|
||||
|
||||
---
|
||||
|
||||
## 一、HIS核心业务流程全景图
|
||||
|
||||
```
|
||||
患者就医全流程:
|
||||
|
||||
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
|
||||
│ 预约挂号 │───→│ 候诊排队 │───→│ 医生诊疗 │───→│ 检验检查 │
|
||||
└─────────┘ └─────────┘ └─────────┘ └─────────┘
|
||||
│ │ │
|
||||
│ ▼ ▼
|
||||
│ ┌─────────┐ ┌─────────┐
|
||||
│ │ 处方开具 │ │ 报告查看 │
|
||||
│ └─────────┘ └─────────┘
|
||||
│ │
|
||||
▼ ▼
|
||||
┌─────────┐ ┌─────────┐ ┌─────────┐
|
||||
│ 门诊收费 │───→│ 药房发药 │───→│ 治疗执行 │
|
||||
└─────────┘ └─────────┘ └─────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
|
||||
│ 入院登记 │───→│ 医嘱管理 │───→│ 护理执行 │───→│ 出院结算 │
|
||||
└─────────┘ └─────────┘ └─────────┘ └─────────┘
|
||||
│ │ │ │
|
||||
│ ▼ ▼ ▼
|
||||
│ ┌─────────┐ ┌─────────┐ ┌─────────┐
|
||||
│ │ 合理用药 │ │ 危急值 │ │ 病案管理 │
|
||||
│ └─────────┘ └─────────┘ └─────────┘
|
||||
│ │
|
||||
▼ ▼
|
||||
┌─────────┐ ┌─────────┐
|
||||
│ 手术管理 │ │ 院感监控 │
|
||||
└─────────┘ └─────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────┐ ┌─────────┐ ┌─────────┐
|
||||
│ 医保结算 │───→│ ESB集成 │───→│ 统计报表 │
|
||||
└─────────┘ └─────────┘ └─────────┘
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 二、各模块在业务流中的定位与作用
|
||||
|
||||
### 2.1 门诊业务链
|
||||
|
||||
| 模块 | 业务位置 | 上游 | 下游 | 核心作用 |
|
||||
|------|---------|------|------|---------|
|
||||
| **预约挂号** | 入口 | 患者 | 候诊排队 | 分配号源、建立就诊记录 |
|
||||
| **候诊排队** | 排队 | 预约挂号 | 医生诊疗 | 实时叫号、优先级排序 |
|
||||
| **医生诊疗** | 核心 | 候诊排队 | 处方/检验检查 | 病历书写、诊断、开方 |
|
||||
| **门诊收费** | 结算 | 医生诊疗 | 药房发药 | 费用计算、医保结算 |
|
||||
| **药房发药** | 执行 | 门诊收费 | 患者取药 | 配药、核对、发药 |
|
||||
|
||||
### 2.2 住院业务链
|
||||
|
||||
| 模块 | 业务位置 | 上游 | 下游 | 核心作用 |
|
||||
|------|---------|------|------|---------|
|
||||
| **入院登记** | 入口 | 门诊转住院 | 医嘱管理 | 建立住院记录、分配床位 |
|
||||
| **医嘱管理** | 核心 | 入院登记 | 护理执行/药房 | 开具/签发/停止医嘱 |
|
||||
| **护理执行** | 执行 | 医嘱管理 | 体征记录 | 执行医嘱、记录护理数据 |
|
||||
| **出院结算** | 出口 | 护理执行 | 病案管理 | 费用结算、医保报销 |
|
||||
|
||||
### 2.3 质量安全链(三甲核心)
|
||||
|
||||
| 模块 | 业务位置 | 上游 | 下游 | 核心作用 |
|
||||
|------|---------|------|------|---------|
|
||||
| **合理用药** | 前置拦截 | 医生诊疗/医嘱管理 | 处方审核 | 药品相互作用/过敏/剂量检查 |
|
||||
| **抗菌药物** | 分级管控 | 合理用药 | 处方点评 | 分级管理、权限控制 |
|
||||
| **危急值管理** | 紧急响应 | 检验检查 | 医生/护士 | 自动识别→通知→确认→处置→闭环 |
|
||||
| **病历质控** | 质量监控 | 电子病历 | 医务部 | 病历完整性、及时性检查 |
|
||||
| **院感管理** | 感染防控 | 护理执行/手术 | 院感科 | 感染监测、上报、干预 |
|
||||
|
||||
### 2.4 手术业务链
|
||||
|
||||
| 模块 | 业务位置 | 上游 | 下游 | 核心作用 |
|
||||
|------|---------|------|------|---------|
|
||||
| **手术管理** | 手术全流程 | 医嘱管理 | 术后跟踪 | 申请→审批→安排→执行→完成 |
|
||||
| **麻醉记录** | 术中记录 | 手术管理 | 病案管理 | 麻醉方案、术中监测、用药记录 |
|
||||
|
||||
### 2.5 数据集成链
|
||||
|
||||
| 模块 | 业务位置 | 上游 | 下游 | 核心作用 |
|
||||
|------|---------|------|------|---------|
|
||||
| **EMPI** | 主索引 | 所有模块 | 所有模块 | 统一患者身份标识 |
|
||||
| **ESB集成** | 消息总线 | 所有模块 | 外部系统 | HL7/FHIR消息路由、系统互联 |
|
||||
| **医保对接** | 外部交互 | 门诊/住院收费 | 医保局 | 门诊/住院医保结算、对账 |
|
||||
|
||||
---
|
||||
|
||||
## 三、新增/优化模块的促进作用分析
|
||||
|
||||
### 3.1 手术管理增强
|
||||
|
||||
| 优化项 | 优化前 | 优化后 | 对上下游的促进 |
|
||||
|--------|--------|--------|---------------|
|
||||
| **手术室冲突校验** | 无校验,可能撞车 | 自动检测同一手术室同一时间冲突 | ↓ 减少手术室调度纠纷,↓ 提升手术室利用率 |
|
||||
| **手术统计分析** | 无统计 | 按时间段统计各级手术数量 | ↑ 为科室绩效考核提供数据支撑 |
|
||||
| **手术分级权限** | 无权限控制 | 按医生级别限制手术申请 | ↑ 符合三甲评审手术分级管理要求 |
|
||||
| **状态机完善** | 简单状态 | 8状态完整生命周期 | ↑ 全流程可追溯,↓ 减少信息断点 |
|
||||
|
||||
### 3.2 医嘱管理增强
|
||||
|
||||
| 优化项 | 优化前 | 优化后 | 对上下游的促进 |
|
||||
|--------|--------|--------|---------------|
|
||||
| **用药审核联动** | 医嘱与合理用药独立 | 签发医嘱时自动触发合理用药审核 | ↑ 处方审核率100%(三甲硬性) |
|
||||
| **停止时限校验** | 无时限控制 | 长期医嘱停止必须在执行前2小时 | ↑ 护士有充足时间调整执行计划 |
|
||||
| **医嘱修改限制** | 已签发可修改 | 已签发只能停止后新开 | ↑ 医嘱不可篡改,符合病历规范 |
|
||||
|
||||
### 3.3 床位管理增强
|
||||
|
||||
| 优化项 | 优化前 | 优化后 | 对上下游的促进 |
|
||||
|--------|--------|--------|---------------|
|
||||
| **分配校验** | 无校验 | 检查状态+科室匹配 | ↓ 避免分配已占用/不匹配的床位 |
|
||||
| **出院自动清洁** | 手动改状态 | 出院后自动标记清洁中 | ↑ 缩短床位周转时间,↑ 使用率 |
|
||||
| **使用率统计** | 无统计 | 实时计算科室/全院使用率 | ↑ 为三甲评审床位使用率指标提供数据 |
|
||||
|
||||
### 3.4 ESB集成平台
|
||||
|
||||
| 优化项 | 优化前 | 优化后 | 对上下游的促进 |
|
||||
|--------|--------|--------|---------------|
|
||||
| **消息路由校验** | 无校验 | 发送前检查目标系统注册状态 | ↓ 减少无效消息投递 |
|
||||
| **消息轨迹追踪** | 无追踪 | 按messageId查询完整轨迹 | ↑ 问题排查效率,↑ 互联互通测评 |
|
||||
| **死信队列处理** | 失败消息丢失 | 失败消息可重置重发 | ↑ 消息可靠性,↑ 数据一致性 |
|
||||
| **服务注册中心** | 无服务发现 | 统一注册/管理外部系统接口 | ↑ 系统集成标准化 |
|
||||
|
||||
---
|
||||
|
||||
## 四、模块间数据流转关系
|
||||
|
||||
```
|
||||
挂号 ──→ 就诊记录(Encounter)
|
||||
│
|
||||
├──→ 医嘱(Advice) ──→ 护理执行 ──→ 体征记录
|
||||
│ │
|
||||
│ ├──→ 合理用药审核 ──→ 处方(Prescription)
|
||||
│ │ │
|
||||
│ │ ├──→ 药房发药 ──→ 库存扣减
|
||||
│ │ └──→ 费用记录 ──→ 收费
|
||||
│ │
|
||||
│ └──→ 手术申请 ──→ 麻醉记录 ──→ 手术记录 ──→ 病案
|
||||
│
|
||||
├──→ 检验申请 ──→ LIS ──→ 检验报告 ──→ 危急值 ──→ 通知
|
||||
│
|
||||
├──→ 检查申请 ──→ PACS ──→ 检查报告
|
||||
│
|
||||
├──→ 入院登记 ──→ 床位分配 ──→ 住院医嘱
|
||||
│
|
||||
└──→ 出院结算 ──→ 医保结算 ──→ ESB上报
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 五、三甲评审关键指标与模块对应
|
||||
|
||||
| 评审指标 | 要求 | 对应模块 | 当前状态 |
|
||||
|---------|------|---------|---------|
|
||||
| 处方审核率 | ≥100% | 合理用药 + 医嘱管理 | ✅ 已实现 |
|
||||
| 抗菌药物使用率 | ≤60% | 抗菌药物管控 | ✅ 已实现 |
|
||||
| 危急值处理及时率 | ≥95% | 危急值管理 | ✅ 已实现 |
|
||||
| 电子病历评级 | ≥4级 | 电子病历结构化+EMR质控 | ✅ 已实现 |
|
||||
| 互联互通成熟度 | ≥四级 | ESB集成+EMPI | ⚠️ ESB基础框架已建 |
|
||||
| 床位使用率 | ≥85% | 床位管理 | ✅ 已实现统计 |
|
||||
| 术前讨论率 | 100%(三四级) | 手术管理 | ⚠️ 待完善校验 |
|
||||
| 病案首页质量 | 达标 | 病案首页管理 | ✅ 已实现 |
|
||||
|
||||
---
|
||||
|
||||
## 六、后续优化建议
|
||||
|
||||
### 6.1 高优先级(影响三甲评审)
|
||||
|
||||
| 序号 | 模块 | 优化内容 | 业务价值 |
|
||||
|------|------|---------|---------|
|
||||
| 1 | 医嘱管理 | 完善用药审核联动(OR-002) | 处方审核率100% |
|
||||
| 2 | 手术管理 | 完善术前讨论校验(SR-002) | 术前讨论率100% |
|
||||
| 3 | ESB集成 | 完善HL7/FHIR消息转换 | 互联互通测评 |
|
||||
| 4 | 电子病历 | 完善结构化模板引擎 | 电子病历评级4级 |
|
||||
|
||||
### 6.2 中优先级(提升运营效率)
|
||||
|
||||
| 序号 | 模块 | 优化内容 | 业务价值 |
|
||||
|------|------|---------|---------|
|
||||
| 5 | 床位管理 | 智能分配算法(按病情/科室/距离) | 提升床位周转率 |
|
||||
| 6 | 手术管理 | 手术室智能排程 | 提升手术室利用率 |
|
||||
| 7 | 合理用药 | 药品库存联动预警 | 减少缺药事件 |
|
||||
| 8 | 统计报表 | 经营分析仪表盘 | 辅助管理决策 |
|
||||
|
||||
@@ -1,383 +0,0 @@
|
||||
# HealthLink-HIS 三甲医院交叉业务流程分析与系统不足诊断
|
||||
|
||||
> **文档类型**: 业务分析+系统诊断
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: 2026-06-07
|
||||
> **依据**: 《三级医院评审标准(2022版)》+ 广西实施细则 + 电子病历4级 + 互联互通四级甲等
|
||||
|
||||
---
|
||||
|
||||
## 一、三甲医院核心业务流程全景
|
||||
|
||||
### 1.1 十大核心流程
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────────┐
|
||||
│ 三甲医院业务全景 │
|
||||
├─────────────────────────────────────────────────────────────────────┤
|
||||
│ 门诊流程: 挂号→候诊→就诊→检查检验→处方→收费→取药→随访 │
|
||||
│ 住院流程: 入院→医嘱→护理→检查检验→手术→用药→出院→结算→病案 │
|
||||
│ 急诊流程: 急诊挂号→分诊→抢救→留观→会诊→住院/出院 │
|
||||
│ 手术流程: 术前讨论→手术申请→麻醉评估→手术→术后恢复→病理 │
|
||||
│ 护理流程: 入院评估→护理计划→医嘱执行→体征→护理记录→交接班 │
|
||||
│ 药品流程: 采购→验收→入库→处方→调配→发药→退药→库存→盘点 │
|
||||
│ 检验流程: 申请→采集→送检→检验→审核→报告→危急值→随访 │
|
||||
│ 检查流程: 申请→预约→排队→检查→报告→审核→3D重建→图文报告 │
|
||||
│ 病案流程: 归档→质控→借阅→封存→统计→DRG→上报 │
|
||||
│ 院感流程: 监测→预警→上报→抗菌药物→消毒供应→统计 │
|
||||
└─────────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 二、交叉业务流程深度分析
|
||||
|
||||
### 2.1 门诊全流程交叉分析
|
||||
|
||||
```
|
||||
患者到达
|
||||
↓
|
||||
[挂号模块] ←→ [排班模块] ←→ [预约模块]
|
||||
↓ (分配诊室+队列)
|
||||
[候诊叫号模块] ←→ [分诊模块]
|
||||
↓ (叫号)
|
||||
[医生工作站] ←→ [电子病历] ←→ [处方模块]
|
||||
↓ (开检查/检验/处方)
|
||||
[检查模块] ←→ [检验模块] ←→ [药房模块]
|
||||
↓ (检查/检验完成)
|
||||
[报告模块] ←→ [医生工作站] (查看结果)
|
||||
↓ (开处方)
|
||||
[合理用药模块] ←→ [处方审核]
|
||||
↓ (处方通过)
|
||||
[收费模块] ←→ [医保模块] ←→ [发票模块]
|
||||
↓ (缴费完成)
|
||||
[药房发药模块] ←→ [药品库存模块]
|
||||
↓ (取药完成)
|
||||
[随访模块] ←→ [患者管理模块]
|
||||
```
|
||||
|
||||
**🔍 已有模块**: 挂号✅ 候诊✅ 医生站✅ 处方✅ 收费✅ 药房✅ 检查✅ 检验✅ 报告✅
|
||||
**🔍 随访模块**: ❌ 缺失 — 门诊患者随访是三甲评审必查项
|
||||
|
||||
### 2.2 住院全流程交叉分析
|
||||
|
||||
```
|
||||
门诊/急诊 → 入院
|
||||
↓
|
||||
[入院登记模块] ←→ [床位管理模块] ←→ [护士站]
|
||||
↓
|
||||
[住院医嘱模块] ←→ [护士执行模块] ←→ [药房模块]
|
||||
↓ (长期/临时医嘱)
|
||||
[检查申请] ←→ [检验申请] ←→ [手术申请]
|
||||
↓
|
||||
[检查报告] ←→ [检验报告] ←→ [手术记录]
|
||||
↓
|
||||
[护理评估] ←→ [护理计划] ←→ [护理记录]
|
||||
↓
|
||||
[病程记录模块] ←→ [知情同意模块]
|
||||
↓
|
||||
[出院医嘱] ←→ [出院结算] ←→ [出院小结]
|
||||
↓
|
||||
[病案归档] ←→ [DRG分组] ←→ [统计上报]
|
||||
```
|
||||
|
||||
**🔍 已有模块**: 入院✅ 床位✅ 医嘱✅ 护理✅ 检查✅ 检验✅ 手术✅ 病程✅ 知情同意✅ 出院✅ 结算✅ 病案✅ DRG✅
|
||||
**🔍 交叉验证**: 各模块间数据流转基本完整
|
||||
|
||||
### 2.3 手术全流程交叉分析
|
||||
|
||||
```
|
||||
[住院医嘱] → 手术申请
|
||||
↓
|
||||
[术前讨论模块] ←→ [手术分级管理]
|
||||
↓
|
||||
[麻醉评估模块] ←→ [麻醉前核查]
|
||||
↓
|
||||
[手术安全核查(WS/T 313)] ←→ [器械追溯(CSSD)]
|
||||
↓
|
||||
[手术执行模块] ←→ [麻醉记录模块]
|
||||
↓
|
||||
[术后恢复模块] ←→ [术后访视]
|
||||
↓
|
||||
[病理送检模块] ←→ [病理报告模块]
|
||||
↓
|
||||
[护理记录] ←→ [病程记录]
|
||||
```
|
||||
|
||||
**🔍 已有模块**: 术前讨论✅ 手术申请✅ 麻醉✅ 安核查✅ CSSD✅ 手术记录✅
|
||||
**🔍 病理模块**: ❌ 缺失 — 病理送检+病理报告是手术闭环的关键环节
|
||||
|
||||
### 2.4 药品全流程交叉分析
|
||||
|
||||
```
|
||||
[采购申请] ←→ [采购订单]
|
||||
↓
|
||||
[验收入库] ←→ [库存管理]
|
||||
↓
|
||||
[处方开具] ←→ [处方审核(合理用药)]
|
||||
↓
|
||||
[药房调配] ←→ [发药/退药]
|
||||
↓
|
||||
[库存预警] ←→ [效期管理]
|
||||
↓
|
||||
[药品追溯(毒麻)] ←→ [抗菌药物管理]
|
||||
↓
|
||||
[处方点评] ←→ [合理用药统计]
|
||||
```
|
||||
|
||||
**🔍 已有模块**: 采购✅ 库存✅ 处方✅ 审核✅ 发药✅ 抗菌✅ 点评✅
|
||||
**🔍 效期管理**: ⚠️ 基础 — 药品效期预警+近效期自动提醒功能待完善
|
||||
|
||||
### 2.5 检验全流程交叉分析
|
||||
|
||||
```
|
||||
[检验申请] ←→ [医嘱模块]
|
||||
↓
|
||||
[条码打印] ←→ [标本采集] ←→ [扫码确认]
|
||||
↓
|
||||
[标本接收] ←→ [标本拒收]
|
||||
↓
|
||||
[LIS检验] ←→ [仪器对接]
|
||||
↓
|
||||
[危急值判定] ←→ [危急值报告] ←→ [危急值处理]
|
||||
↓
|
||||
[审核发布] ←→ [报告查询]
|
||||
↓
|
||||
[参考范围] ←→ [结果解读]
|
||||
```
|
||||
|
||||
**🔍 已有模块**: 申请✅ 条码✅ 采集✅ 危急值✅ 审核✅ 报告✅ 参考范围✅
|
||||
**🔍 闭环完整**: 检验全流程已基本完整
|
||||
|
||||
---
|
||||
|
||||
## 三、系统不足诊断
|
||||
|
||||
### 3.1 缺失模块 (❌ 从未实现)
|
||||
|
||||
| # | 模块名称 | 业务价值 | 三甲依据 | 优先级 |
|
||||
|---|---------|---------|---------|--------|
|
||||
| 1 | **门诊随访管理** | 慢病管理/出院随访/满意度调查 | 评审标准: 患者服务 | 🔴 P0 |
|
||||
| 2 | **病理管理** | 病理送检→取材→制片→诊断→报告 | 手术闭环/肿瘤诊疗 | 🔴 P0 |
|
||||
| 3 | **急诊分诊+抢救** | 急诊分级(1-4级)/抢救记录/绿色通道 | 急诊医学科评审 | 🔴 P0 |
|
||||
| 4 | **患者满意度调查** | 门诊/住院满意度/投诉管理 | 评审标准: 患者服务 | 🟡 P1 |
|
||||
| 5 | **处方点评统计** | 科室排名/医生排名/合理率趋势 | 合理用药评审 | 🟡 P1 |
|
||||
| 6 | **药品效期管理** | 近效期预警/自动停售/效期报表 | 药品管理规范 | 🟡 P1 |
|
||||
| 7 | **护理交接班统计** | 交接班完成率/重点患者统计 | 护理质量指标 | 🟡 P1 |
|
||||
| 8 | **DRG绩效考核** | 科室DRG绩效/费用控制/时间效率 | 医保支付改革 | 🟡 P1 |
|
||||
| 9 | **会诊时限监控** | 会诊超时预警/完成率统计 | 会诊制度 | 🟡 P1 |
|
||||
| 10 | **病案首页质量** | 首页数据校验/编码正确率 | 病案管理规范 | 🟡 P1 |
|
||||
|
||||
### 3.2 待完善模块 (⚠️ 功能不足)
|
||||
|
||||
| # | 模块名称 | 当前状态 | 缺失功能 | 优先级 |
|
||||
|---|---------|---------|---------|--------|
|
||||
| 1 | **预约管理** | 基础预约 | 诊间预约/复诊预约/预约规则配置 | 🟡 P1 |
|
||||
| 2 | **排班管理** | 基础排班 | 弹性排班/节假日排班/停诊管理 | 🟡 P1 |
|
||||
| 3 | **住院押金** | 基础功能 | 押金不足预警/催缴通知/医保预结算 | 🟡 P1 |
|
||||
| 4 | **护理评估** | 已实现5种量表 | 跌倒/压疮动态评估+干预效果追踪 | ⚠️ 可优化 |
|
||||
| 5 | **知情同意** | 已实现 | 电子签名+版本管理+患者确认流程 | ⚠️ 可优化 |
|
||||
| 6 | **DRG分组** | 已实现基础 | 分组结果校验+费用异常预警+绩效分析 | ⚠️ 可优化 |
|
||||
|
||||
### 3.3 交叉业务断裂点
|
||||
|
||||
| # | 断裂点 | 涉及模块 | 影响 | 优先级 |
|
||||
|---|--------|---------|------|--------|
|
||||
| 1 | **门诊→住院转科** | 门诊/住院/床位 | 转科时患者信息丢失 | 🔴 P0 |
|
||||
| 2 | **手术→病理送检** | 手术/病理/检验 | 手术后标本无法自动送检 | 🔴 P0 |
|
||||
| 3 | **检验→临床决策** | 检验/合理用药 | 检验结果未联动用药调整 | 🟡 P1 |
|
||||
| 4 | **检查→报告→医嘱** | 检查/报告/医嘱 | 报告完成后未自动回写医嘱状态 | 🟡 P1 |
|
||||
| 5 | **护理→医嘱→执行** | 护理/医嘱/执行 | 护士执行后未自动更新医嘱完成状态 | ⚠️ 可优化 |
|
||||
| 6 | **药品→库存→预警** | 药品/库存/效期 | 库存不足时未联动处方拦截 | ⚠️ 可优化 |
|
||||
|
||||
---
|
||||
|
||||
## 四、深度详细设计 — 缺失模块
|
||||
|
||||
### 4.1 门诊随访管理模块
|
||||
|
||||
#### 4.1.1 业务流程
|
||||
```
|
||||
出院/门诊结束
|
||||
↓
|
||||
[随访计划生成] ←→ [患者分类(慢病/手术/肿瘤/普通)]
|
||||
↓
|
||||
[随访任务分配] ←→ [责任医生/护士]
|
||||
↓
|
||||
[电话/短信/微信随访] ←→ [随访记录]
|
||||
↓
|
||||
[随访结果录入] ←→ [异常处理(再入院/转诊)]
|
||||
↓
|
||||
[满意度调查] ←→ [投诉管理]
|
||||
↓
|
||||
[随访统计] ←→ [质控指标]
|
||||
```
|
||||
|
||||
#### 4.1.2 数据模型
|
||||
- **FollowupPlan** (随访计划): plan_id, patient_id, disease_type, followup_type, frequency, responsible_doctor
|
||||
- **FollowupTask** (随访任务): task_id, plan_id, scheduled_date, actual_date, contact_method, result
|
||||
- **FollowupRecord** (随访记录): record_id, task_id, contact_content, patient_condition, abnormal_flag
|
||||
- **SatisfactionSurvey** (满意度): survey_id, patient_id, survey_type, score, suggestions
|
||||
- **ComplaintRecord** (投诉): complaint_id, patient_id, complaint_type, content,处理状态
|
||||
|
||||
#### 4.1.3 接口设计
|
||||
| API | 方法 | 说明 |
|
||||
|-----|------|------|
|
||||
| /followup/plan/page | GET | 随访计划列表 |
|
||||
| /followup/plan/add | POST | 新建随访计划 |
|
||||
| /followup/task/page | GET | 随访任务列表(按责任人) |
|
||||
| /followup/task/complete/{id} | PUT | 完成随访任务 |
|
||||
| /followup/record/add | POST | 录入随访记录 |
|
||||
| /followup/survey/add | POST | 提交满意度 |
|
||||
| /followup/complaint/page | GET | 投诉列表 |
|
||||
| /followup/stats | GET | 随访统计(完成率/满意度) |
|
||||
|
||||
### 4.2 病理管理模块
|
||||
|
||||
#### 4.2.1 业务流程
|
||||
```
|
||||
[手术/活检] → 病理申请
|
||||
↓
|
||||
[标本接收] ←→ [标本核对(条码)]
|
||||
↓
|
||||
[取材] ←→ [组织处理(固定/脱水/包埋)]
|
||||
↓
|
||||
[切片] ←→ [染色(HE/免疫组化)]
|
||||
↓
|
||||
[阅片] ←→ [病理诊断]
|
||||
↓
|
||||
[报告编写] ←→ [报告审核(三级审核)]
|
||||
↓
|
||||
[报告发布] ←→ [临床科室]
|
||||
↓
|
||||
[病理随访] ←→ [肿瘤登记]
|
||||
```
|
||||
|
||||
#### 4.2.2 数据模型
|
||||
- **PathologyOrder** (病理申请): order_id, patient_id, specimen_type, clinical_diagnosis
|
||||
- **PathologySpecimen** (病理标本): specimen_id, order_id, barcode, collection_site, fixative
|
||||
- **PathologyProcess** (病理处理): process_id, specimen_id, process_type, operator, time
|
||||
- **PathologyDiagnosis** (病理诊断): diagnosis_id, specimen_id, diagnosis_type, result
|
||||
- **PathologyReport** (病理报告): report_id, order_id, findings, diagnosis, report_doctor, verify_doctor
|
||||
|
||||
#### 4.2.3 接口设计
|
||||
| API | 方法 | 说明 |
|
||||
|-----|------|------|
|
||||
| /pathology/order/page | GET | 病理申请列表 |
|
||||
| /pathology/order/add | POST | 新建病理申请 |
|
||||
| /pathology/specimen/scan | POST | 标本扫码接收 |
|
||||
| /pathology/process/record | POST | 记录处理过程 |
|
||||
| /pathology/diagnosis/add | POST | 录入诊断 |
|
||||
| /pathology/report/page | GET | 病理报告列表 |
|
||||
| /pathology/report/verify/{id} | PUT | 审核报告(三级) |
|
||||
|
||||
### 4.3 急诊分诊+抢救模块
|
||||
|
||||
#### 4.3.1 业务流程
|
||||
```
|
||||
患者到达急诊
|
||||
↓
|
||||
[预检分诊] ←→ [生命体征采集]
|
||||
↓ (按病情分级)
|
||||
┌─Ⅰ级(濒死)→ 抢救室 → 绿色通道
|
||||
├─Ⅱ级(危重)→ 抢救室 → 优先处理
|
||||
├─Ⅲ级(急症)→ 急诊诊室 → 按序就诊
|
||||
└─Ⅳ级(非急)→ 普通门诊 → 引导转诊
|
||||
↓
|
||||
[抢救记录] ←→ [抢救医嘱]
|
||||
↓
|
||||
[会诊申请] ←→ [住院转科/留观/出院]
|
||||
↓
|
||||
[急诊病历] ←→ [急诊统计]
|
||||
```
|
||||
|
||||
#### 4.3.2 数据模型
|
||||
- **EmergencyTriage** (急诊分诊): triage_id, patient_id, triage_level(1-4), vital_signs, triage_nurse
|
||||
- **EmergencyRescue** (抢救记录): rescue_id, patient_id, rescue_start, rescue_end, result
|
||||
- **EmergencyObservation** (留观记录): observation_id, patient_id, observation_start, bed_no
|
||||
- **Emergency绿色通道**: green_channel_id, patient_id, disease_type, door_to_treatment_time
|
||||
|
||||
#### 4.3.3 接口设计
|
||||
| API | 方法 | 说明 |
|
||||
|-----|------|------|
|
||||
| /emergency/triage/add | POST | 急诊分诊 |
|
||||
| /emergency/triage/queue | GET | 分诊队列(按级别) |
|
||||
| /emergency/rescue/add | POST | 开始抢救 |
|
||||
| /emergency/rescue/complete/{id} | PUT | 抢救完成 |
|
||||
| /emergency/observation/add | POST | 留观登记 |
|
||||
| /emergency/green-channel | POST | 绿色通道启动 |
|
||||
| /emergency/stats | GET | 急诊统计(分级/抢救率/等候时间) |
|
||||
|
||||
### 4.4 药品效期管理模块
|
||||
|
||||
#### 4.4.1 业务流程
|
||||
```
|
||||
[入库验收] → 记录效期
|
||||
↓
|
||||
[效期监控] ←→ [每日扫描]
|
||||
↓ (近效期预警)
|
||||
┌─ 6个月内 → 近效期提醒 → 优先使用
|
||||
├─ 3个月内 → 紧急预警 → 限制开方
|
||||
└─ 过期 → 自动停售 → 退回供应商
|
||||
↓
|
||||
[效期报表] ←→ [过期药品销毁]
|
||||
```
|
||||
|
||||
#### 4.4.2 数据模型
|
||||
- **DrugExpiryAlert** (效期预警): alert_id, drug_code, drug_name, batch_no, expiry_date, alert_level
|
||||
- **DrugExpiryStats** (效期统计): 按月统计近效期/过期/销毁金额
|
||||
|
||||
### 4.5 处方点评统计模块
|
||||
|
||||
#### 4.5.1 业务流程
|
||||
```
|
||||
[处方数据] → 自动筛选
|
||||
↓ (不合理处方)
|
||||
[系统点评] ←→ [人工点评]
|
||||
↓
|
||||
[点评结果] ←→ [医生反馈]
|
||||
↓
|
||||
[科室排名] ←→ [医生排名]
|
||||
↓
|
||||
[合理率趋势] ←→ [改进措施]
|
||||
```
|
||||
|
||||
#### 4.5.2 数据模型
|
||||
- **PrescriptionReviewStats** (点评统计): 按科室/医生/月份统计合理率
|
||||
- **PrescriptionReviewRanking** (排名): 科室排名/医生排名
|
||||
|
||||
---
|
||||
|
||||
## 五、实施优先级排序
|
||||
|
||||
### Phase A: 缺失核心模块 (P0 — 立即开发)
|
||||
1. **门诊随访管理** — 三甲评审必查
|
||||
2. **病理管理** — 手术闭环关键
|
||||
3. **急诊分诊+抢救** — 急诊评审必查
|
||||
|
||||
### Phase B: 待完善功能 (P1 — 尽快开发)
|
||||
4. **药品效期管理** — 药品安全
|
||||
5. **处方点评统计** — 合理用药
|
||||
6. **患者满意度** — 评审指标
|
||||
7. **DRG绩效考核** — 医保改革
|
||||
8. **护理交接班统计** — 护理质量
|
||||
9. **会诊时限监控** — 会诊制度
|
||||
10. **病案首页质量** — 数据质量
|
||||
|
||||
### Phase C: 交叉业务修复 (P1 — 尽快修复)
|
||||
11. **门诊→住院转科** — 信息连续性
|
||||
12. **手术→病理送检** — 标本追溯
|
||||
13. **检验→临床决策** — 检验联动
|
||||
14. **检查→报告→医嘱** — 状态联动
|
||||
|
||||
---
|
||||
|
||||
## 六、文档产出清单
|
||||
|
||||
| 文档 | 内容 | 用途 |
|
||||
|------|------|------|
|
||||
| CROSS_MODULE_BUSINESS_ANALYSIS.md | 本文档 | 业务分析+系统诊断 |
|
||||
| PHASE_A_FOLLOWUP_DESIGN.md | 门诊随访深度设计 | 开发依据 |
|
||||
| PHASE_A_PATHOLOGY_DESIGN.md | 病理管理深度设计 | 开发依据 |
|
||||
| PHASE_A_EMERGENCY_DESIGN.md | 急诊分诊抢救深度设计 | 开发依据 |
|
||||
| PHASE_B_*.md | 各P1模块深度设计 | 开发依据 |
|
||||
@@ -1,939 +0,0 @@
|
||||
# HealthLink HIS 三甲医院达标详细设计方案
|
||||
|
||||
> **文档类型**: 架构设计
|
||||
> **适用范围**: 三甲达标架构
|
||||
> **版本**: v1.0
|
||||
|
||||
> **目标**: 完全符合三级甲等综合医院信息化评审标准
|
||||
> **依据**: 国家卫健委三甲评审标准(2022)、电子病历评级≥4级、互联互通≥四级甲等
|
||||
> **编制日期**: 2026-06-06
|
||||
> **核心原则**:
|
||||
> 1. 不修改原有函数签名,扩展功能通过新建Service/AppService实现
|
||||
> 2. 新建表和字段通过Flyway框架管理
|
||||
> 3. 每个模块开发完成后必须通过完整测试
|
||||
|
||||
---
|
||||
|
||||
## 一、现状能力与差距分析
|
||||
|
||||
### 1.1 已有能力(✅ 可用,无需大改)
|
||||
|
||||
| 模块 | 状态 | 已有Controller/Service | 说明 |
|
||||
|---|---|---|---|
|
||||
| 门诊挂号 | ✅ 完整 | RegistrationController | 预约/当日/退号/多身份 |
|
||||
| 门诊收费 | ✅ 完整 | ChargeController | 收费/退费/日结 |
|
||||
| 门诊医生站 | ✅ 完整 | DoctorStationAdviceController | 处方/检验检查申请/病历 |
|
||||
| 护士工作站 | ✅ 基础 | NursingRecordController | 医嘱执行/生命体征/护理记录 |
|
||||
| 药品管理 | ✅ 完整 | pharmacymanage/* | 药库/药房/发药/退药 |
|
||||
| 住院管理 | ✅ 完整 | PatientHomeController | 入院/床位/转科/出院/押金 |
|
||||
| 检验检查 | ✅ 完整 | check/*, lab/* | LIS配置/检查类型/项目管理 |
|
||||
| 统计报表 | ✅ 完整 | reportmanage/* | 20+报表接口 |
|
||||
| DRG/DIP | ✅ 基础 | ybmanage/* | 基础框架已有 |
|
||||
| 手术排程 | ✅ 基础 | SurgicalScheduleController | 手术申请/排程/查询 |
|
||||
| 手术管理 | ✅ 基础 | SurgeryController | 手术信息CRUD |
|
||||
|
||||
### 1.2 关键差距(❌ 需开发)
|
||||
|
||||
| 差距模块 | 三甲要求 | 当前状态 | 优先级 | 预估工期 |
|
||||
|---|---|---|---|---|
|
||||
| **合理用药系统** | 处方100%审核 | 仅有基础处方点评框架 | 🔴 P0 | 5天 |
|
||||
| **麻醉记录系统** | 互联互通必测项I-13 | 仅有手术排程,无麻醉记录 | 🔴 P0 | 5天 |
|
||||
| **电子签名/CA** | 三甲硬性要求 | 仅有密码验证框架 | 🔴 P0 | 3天 |
|
||||
| **院感管理** | 评审必查 | 完全缺失 | 🔴 P0 | 5天 |
|
||||
| **病案首页管理** | 病案首页数据质量 | 仅有基础统计 | 🔴 P0 | 5天 |
|
||||
| **护理评估体系** | 多种量表评估 | 仅基础护理记录 | 🟡 P1 | 5天 |
|
||||
| **医嘱闭环管理** | 开立→审核→执行→完成 | 部分实现 | 🟡 P1 | 3天 |
|
||||
| **危急值管理** | 检验危急值闭环 | 完全缺失 | 🟡 P1 | 3天 |
|
||||
| **电子病历结构化** | 结构化+模板+留痕 | 基础模板已有 | 🟡 P1 | 5天 |
|
||||
| **抗菌药物管控** | 分级管理/权限控制 | 完全缺失 | 🟡 P1 | 3天 |
|
||||
| **处方点评系统** | 合理用药管控 | 仅基础框架 | 🟡 P1 | 3天 |
|
||||
| **数据集成平台(ESB)** | 互联互通四级甲等 | 完全缺失 | 🟡 P1 | 5天 |
|
||||
| **患者主索引(EMPI)** | 数据标准化基础 | 完全缺失 | 🟡 P1 | 3天 |
|
||||
|
||||
---
|
||||
|
||||
## 二、分阶段详细设计
|
||||
|
||||
### Phase 1: 核心安全模块(3周)
|
||||
|
||||
---
|
||||
|
||||
#### Sprint 7: 合理用药系统 (5天)
|
||||
|
||||
**业务背景**: 三甲医院要求门诊处方审核率≥100%,住院医嘱审核率≥100%。系统必须在医生开方时实时拦截不合理处方。
|
||||
|
||||
**已有基础**: `PrescriptionReviewRecord`实体、`ReviewPrescriptionRecordsController`审方接口
|
||||
|
||||
**需要新增的功能**:
|
||||
|
||||
##### 7.1 处方前置审核引擎
|
||||
|
||||
**业务流程**:
|
||||
```
|
||||
医生开方 → 系统自动审核 → 合理 → 通过
|
||||
→ 不合理 → 拦截弹窗 → 医生确认/修改
|
||||
→ 需人工审核 → 药师审核 → 通过/驳回
|
||||
```
|
||||
|
||||
**审核规则(按优先级)**:
|
||||
1. **配伍禁忌检查**: 两药/三药相互作用(禁忌/严重/一般三级)
|
||||
2. **过敏检测**: 患者过敏史自动匹配药品成分
|
||||
3. **剂量审查**: 超剂量/低剂量预警(按年龄/体重/肝肾功能)
|
||||
4. **重复用药**: 同类/同成分重复使用检查
|
||||
5. **妊娠/哺乳用药**: 特殊人群用药警示
|
||||
6. **儿童用药**: 按体重/体表面积计算剂量
|
||||
7. **肝肾功能调量**: 根据化验结果自动建议调量
|
||||
|
||||
**新增Service**:
|
||||
```java
|
||||
// 合理用药审核引擎(新建,不修改原有代码)
|
||||
public interface IRationalDrugReviewService {
|
||||
// 处方前置审核
|
||||
PrescriptionReviewResult reviewPrescription(PrescriptionReviewParam param);
|
||||
// 药品相互作用检查
|
||||
List<DrugInteraction> checkDrugInteraction(List<String> drugCodes);
|
||||
// 过敏检查
|
||||
List<AllergyAlert> checkAllergy(Long patientId, List<String> drugCodes);
|
||||
// 剂量检查
|
||||
List<DoseAlert> checkDose(DoseCheckParam param);
|
||||
// 重复用药检查
|
||||
List<DuplicateAlert> checkDuplicate(List<String> drugCodes);
|
||||
}
|
||||
```
|
||||
|
||||
**新增数据库表(Flyway)**:
|
||||
```sql
|
||||
-- V2026_007__rational_drug_review.sql
|
||||
|
||||
-- 药品相互作用规则表
|
||||
CREATE TABLE sys_drug_interaction_rule (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
drug_code_a VARCHAR(50) NOT NULL, -- 药品A编码
|
||||
drug_code_b VARCHAR(50) NOT NULL, -- 药品B编码
|
||||
drug_name_a VARCHAR(200),
|
||||
drug_name_b VARCHAR(200),
|
||||
interaction_level VARCHAR(20) NOT NULL, -- 禁忌/严重/一般
|
||||
description TEXT, -- 描述
|
||||
suggestion TEXT, -- 处理建议
|
||||
severity INT DEFAULT 1, -- 严重程度 1-5
|
||||
status CHAR(1) DEFAULT '0', -- 0正常 1停用
|
||||
tenant_id INT,
|
||||
create_by VARCHAR(64),
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_by VARCHAR(64),
|
||||
update_time TIMESTAMP
|
||||
);
|
||||
|
||||
-- 药品过敏规则表
|
||||
CREATE TABLE sys_drug_allergy_rule (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
drug_code VARCHAR(50) NOT NULL,
|
||||
drug_name VARCHAR(200),
|
||||
allergy_component VARCHAR(200), -- 过敏成分
|
||||
cross_reaction_drugs TEXT, -- 交叉反应药品
|
||||
description TEXT,
|
||||
status CHAR(1) DEFAULT '0',
|
||||
tenant_id INT,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 剂量范围规则表
|
||||
CREATE TABLE sys_drug_dose_rule (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
drug_code VARCHAR(50) NOT NULL,
|
||||
drug_name VARCHAR(200),
|
||||
dose_type VARCHAR(20), -- 单次/日总量
|
||||
min_dose DECIMAL(10,2),
|
||||
max_dose DECIMAL(10,2),
|
||||
unit VARCHAR(20),
|
||||
age_min INT, -- 最小年龄
|
||||
age_max INT, -- 最大年龄
|
||||
weight_min DECIMAL(5,2), -- 最小体重
|
||||
weight_max DECIMAL(5,2), -- 最大体重
|
||||
renal_adjust CHAR(1) DEFAULT '0', -- 肾功能调整
|
||||
hepatic_adjust CHAR(1) DEFAULT '0', -- 肝功能调整
|
||||
status CHAR(1) DEFAULT '0',
|
||||
tenant_id INT,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 处方审核记录表(扩展已有表)
|
||||
-- 在已有 prescription_review_record 表基础上增加字段
|
||||
ALTER TABLE prescription_review_record ADD COLUMN IF NOT EXISTS review_rules JSONB;
|
||||
ALTER TABLE prescription_review_record ADD COLUMN IF NOT EXISTS auto_review_result VARCHAR(20);
|
||||
ALTER TABLE prescription_review_record ADD COLUMN IF NOT EXISTS review_time TIMESTAMP;
|
||||
ALTER TABLE prescription_review_record ADD COLUMN IF NOT EXISTS drug_details JSONB;
|
||||
```
|
||||
|
||||
**测试用例(20个)**:
|
||||
1. 正常处方审核通过
|
||||
2. 配伍禁忌药物拦截(禁忌级别)
|
||||
3. 配伍禁忌药物预警(一般级别)
|
||||
4. 过敏药物拦截
|
||||
5. 超剂量预警
|
||||
6. 低剂量预警
|
||||
7. 重复用药拦截
|
||||
8. 妊娠用药警示
|
||||
9. 儿童用药按体重计算
|
||||
10. 肾功能不全剂量调整
|
||||
11. 肝功能不全剂量调整
|
||||
12. 多药联用审查
|
||||
13. 抗菌药物分级限制
|
||||
14. 处方审核结果查询
|
||||
15. 审核规则配置
|
||||
16. 无权限访问拒绝
|
||||
17. 空处方审核
|
||||
18. 大处方预警
|
||||
19. 审核统计查询
|
||||
20. 处方点评导出
|
||||
|
||||
---
|
||||
|
||||
##### 7.2 抗菌药物分级管理
|
||||
|
||||
**业务背景**: 三甲医院要求抗菌药物使用率≤60%,必须实行分级管理。
|
||||
|
||||
**分级标准**:
|
||||
- **非限制使用级**: 经临床长期应用证明安全、有效,对细菌耐药性影响较小的抗菌药物
|
||||
- **限制使用级**: 与非限制使用级相比较,在疗效、安全性、耐药性、价格等方面存在局限性
|
||||
- **特殊使用级**: 不良反应明显,不宜随意使用或临床需要倍加保护以免细菌过快产生耐药性的抗菌药物
|
||||
|
||||
**新增Service**:
|
||||
```java
|
||||
public interface IAntibioticManageService {
|
||||
// 查询抗菌药物使用统计
|
||||
AntibioticUsageStats getUsageStats(Long departmentId, Date startDate, Date endDate);
|
||||
// 查询医生抗菌药物处方权限
|
||||
AntibioticPermission checkPermission(Long doctorId, String antibioticLevel);
|
||||
// 抗菌药物处方审批(特殊使用级需审批)
|
||||
R<?> approveAntibiotic(AntibioticApprovalParam param);
|
||||
// DDD监测
|
||||
List<DDDMonitorDto> getDDDMonitoring(Date startDate, Date endDate);
|
||||
}
|
||||
```
|
||||
|
||||
**新增数据库表**:
|
||||
```sql
|
||||
-- V2026_007__antibiotic_management.sql
|
||||
|
||||
-- 抗菌药物目录表
|
||||
CREATE TABLE sys_antibiotic_drug (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
drug_code VARCHAR(50) NOT NULL,
|
||||
drug_name VARCHAR(200),
|
||||
generic_name VARCHAR(200),
|
||||
antibiotic_level VARCHAR(20) NOT NULL, -- 非限制/限制/特殊
|
||||
ddd_value DECIMAL(10,2), -- 限定日剂量
|
||||
ddd_unit VARCHAR(20),
|
||||
atc_code VARCHAR(50), -- ATC分类代码
|
||||
status CHAR(1) DEFAULT '0',
|
||||
tenant_id INT,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 抗菌药物使用记录表
|
||||
CREATE TABLE sys_antibiotic_usage (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
encounter_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
doctor_id BIGINT NOT NULL,
|
||||
department_id BIGINT,
|
||||
drug_code VARCHAR(50) NOT NULL,
|
||||
drug_name VARCHAR(200),
|
||||
antibiotic_level VARCHAR(20),
|
||||
dosage DECIMAL(10,2),
|
||||
dosage_unit VARCHAR(20),
|
||||
frequency VARCHAR(50),
|
||||
route VARCHAR(50),
|
||||
start_time TIMESTAMP,
|
||||
end_time TIMESTAMP,
|
||||
usage_days INT,
|
||||
ddd_value DECIMAL(10,2),
|
||||
ddd_sum DECIMAL(10,4), -- DDD累计
|
||||
approval_status VARCHAR(20), -- 待审批/已批准/已拒绝
|
||||
approver_id BIGINT,
|
||||
approval_time TIMESTAMP,
|
||||
status CHAR(1) DEFAULT '0',
|
||||
tenant_id INT,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 抗菌药物医生权限表
|
||||
CREATE TABLE sys_antibiotic_permission (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
doctor_id BIGINT NOT NULL,
|
||||
doctor_name VARCHAR(100),
|
||||
department_id BIGINT,
|
||||
allowed_levels JSONB, -- 允许使用的级别 ["非限制","限制","特殊"]
|
||||
valid_from DATE,
|
||||
valid_to DATE,
|
||||
status CHAR(1) DEFAULT '0',
|
||||
tenant_id INT,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### Sprint 8: 手术麻醉系统 (5天)
|
||||
|
||||
**业务背景**: 互联互通测评必测项I-13,三甲评审现场检查必查项。
|
||||
|
||||
**已有基础**:
|
||||
- `OpSchedule`(手术排程实体)、`OperatingRoom`(手术室实体)
|
||||
- `SurgicalScheduleController`(手术排程接口)
|
||||
- `SurgeryController`(手术管理接口)
|
||||
|
||||
**需要新增的功能**:
|
||||
|
||||
##### 8.1 麻醉评估系统
|
||||
|
||||
**业务流程**:
|
||||
```
|
||||
术前评估 → ASA分级 → 气道评估 → 麻醉方案 → 知情同意 → 术中记录 → 苏醒评估
|
||||
```
|
||||
|
||||
**新增Service**:
|
||||
```java
|
||||
public interface IAnesthesiaService {
|
||||
// 术前麻醉评估
|
||||
AnesthesiaAssessment createAssessment(AnessmentAssessmentParam param);
|
||||
// ASA分级评估
|
||||
ASAResult assessASA(ASAAssessmentParam param);
|
||||
// 气道评估
|
||||
AirwayAssessment assessAirway(AirwayAssessmentParam param);
|
||||
// 麻醉方案制定
|
||||
AnesthesiaPlan createPlan(AnesthesiaPlanParam param);
|
||||
// 术中记录
|
||||
IntraOpRecord recordIntraOp(IntraOpRecordParam param);
|
||||
// 麻醉苏醒评估
|
||||
RecoveryAssessment assessRecovery(RecoveryAssessmentParam param);
|
||||
// 查询麻醉记录
|
||||
AnesthesiaRecord getRecord(Long surgeryScheduleId);
|
||||
}
|
||||
```
|
||||
|
||||
**新增数据库表**:
|
||||
```sql
|
||||
-- V2026_008__anesthesia_system.sql
|
||||
|
||||
-- 麻醉评估表
|
||||
CREATE TABLE sys_anesthesia_assessment (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
surgery_schedule_id BIGINT NOT NULL, -- 关联手术排程
|
||||
encounter_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
assessment_date TIMESTAMP,
|
||||
assessor_id BIGINT,
|
||||
|
||||
-- ASA分级
|
||||
asa_level VARCHAR(10), -- ASA I-VI
|
||||
asa_description TEXT,
|
||||
|
||||
-- 气道评估
|
||||
airway_assessment JSONB, -- 气道评估详细数据
|
||||
mallampati_grade VARCHAR(10), -- Mallampati分级 I-IV
|
||||
mouth_opening DECIMAL(5,2), -- 张口度(cm)
|
||||
neck_mobility VARCHAR(50), -- 颈部活动度
|
||||
thyromental_distance DECIMAL(5,2), -- 甲颏距离(cm)
|
||||
dental_prostheses CHAR(1), -- 假牙 0无 1有
|
||||
|
||||
-- 心肺评估
|
||||
cardiac_function VARCHAR(50), -- 心功能分级
|
||||
pulmonary_function VARCHAR(50), -- 肺功能
|
||||
ekg_result TEXT, -- 心电图结果
|
||||
|
||||
-- 实验室检查
|
||||
lab_results JSONB, -- 实验室检查结果
|
||||
|
||||
-- 综合评估
|
||||
overall_risk VARCHAR(20), -- 低/中/高/极高
|
||||
contraindications TEXT, -- 禁忌症
|
||||
special_notes TEXT, -- 特殊注意事项
|
||||
|
||||
status VARCHAR(20), -- 草稿/已提交/已审核
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 麻醉方案表
|
||||
CREATE TABLE sys_anesthesia_plan (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
assessment_id BIGINT NOT NULL,
|
||||
surgery_schedule_id BIGINT NOT NULL,
|
||||
anesthesia_type VARCHAR(50), -- 全麻/椎管内/神经阻滞/局部/复合
|
||||
anesthesia_method TEXT, -- 具体麻醉方法
|
||||
monitor_plan TEXT, -- 监测方案
|
||||
airway_management TEXT, -- 气道管理方案
|
||||
fluid_plan TEXT, -- 输液方案
|
||||
blood_plan TEXT, -- 输血方案
|
||||
pain_management TEXT, -- 镇痛方案
|
||||
special_requirements TEXT, -- 特殊要求
|
||||
planned_by_id BIGINT,
|
||||
plan_time TIMESTAMP,
|
||||
status VARCHAR(20), -- 草稿/已提交/已批准
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 术中麻醉记录表
|
||||
CREATE TABLE sys_anesthesia_intra_record (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
surgery_schedule_id BIGINT NOT NULL,
|
||||
encounter_id BIGINT NOT NULL,
|
||||
|
||||
-- 时间节点
|
||||
patient_entry_time TIMESTAMP, -- 患者入室时间
|
||||
anesthesia_start_time TIMESTAMP, -- 麻醉开始时间
|
||||
surgery_start_time TIMESTAMP, -- 手术开始时间
|
||||
surgery_end_time TIMESTAMP, -- 手术结束时间
|
||||
anesthesia_end_time TIMESTAMP, -- 麻醉结束时间
|
||||
patient_exit_time TIMESTAMP, -- 患者出室时间
|
||||
|
||||
-- 生命体征(定时采集)
|
||||
vital_signs_data JSONB, -- [{time, systolic, diastolic, heart_rate, spo2, temp, etco2, ...}]
|
||||
|
||||
-- 麻醉用药
|
||||
anesthesia_medications JSONB, -- [{drug_name, dose, unit, time, route, operator}]
|
||||
|
||||
-- 非麻醉用药
|
||||
non_anesthesia_medications JSONB, -- [{drug_name, dose, unit, time, reason}]
|
||||
|
||||
-- 液体出入量
|
||||
fluid_input JSONB, -- [{type, volume_ml, time}]
|
||||
fluid_output JSONB, -- [{type, volume_ml, time}]
|
||||
blood_loss_ml INT, -- 出血量
|
||||
blood_transfusion_ml INT, -- 输血量
|
||||
urine_output_ml INT, -- 尿量
|
||||
|
||||
-- 术中事件
|
||||
intra_events JSONB, -- [{event_type, time, description, handling}]
|
||||
|
||||
-- 气道管理
|
||||
airway_management JSONB, -- {intubation_type, tube_size, depth, ...}
|
||||
|
||||
-- 麻醉医师
|
||||
primary_anesthesiologist_id BIGINT, -- 主麻
|
||||
assistant_anesthesiologist_id BIGINT, -- 助麻
|
||||
|
||||
status VARCHAR(20), -- 进行中/已完成
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 麻醉苏醒评估表
|
||||
CREATE TABLE sys_anesthesia_recovery (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
intra_record_id BIGINT NOT NULL,
|
||||
surgery_schedule_id BIGINT NOT NULL,
|
||||
recovery_time TIMESTAMP,
|
||||
consciousness_level VARCHAR(50), -- 清醒/嗜睡/模糊/昏迷
|
||||
respiratory_rate INT,
|
||||
heart_rate INT,
|
||||
blood_pressure VARCHAR(50),
|
||||
spo2 DECIMAL(5,2),
|
||||
temperature DECIMAL(5,2),
|
||||
pain_score INT, -- NRS评分 0-10
|
||||
恶心_nausea CHAR(1), -- 0无 1有
|
||||
vomiting CHAR(1), -- 0无 1有
|
||||
Aldrete_score INT, -- Aldrete评分 0-10
|
||||
discharge_eligible CHAR(1), -- 0不达标 1达标
|
||||
extubation_time TIMESTAMP, -- 拔管时间
|
||||
special_notes TEXT,
|
||||
assessor_id BIGINT,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 知情同意书表
|
||||
CREATE TABLE sys_consent_form (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
encounter_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
form_type VARCHAR(50), -- 手术/麻醉/输血/其他
|
||||
surgery_schedule_id BIGINT,
|
||||
form_template_id BIGINT,
|
||||
form_content TEXT, -- 知情同意书内容
|
||||
patient_name VARCHAR(100),
|
||||
patient_signature_data TEXT, -- 患者签名(base64)
|
||||
patient_sign_time TIMESTAMP,
|
||||
doctor_signature_data TEXT, -- 医生签名(base64)
|
||||
doctor_sign_time TIMESTAMP,
|
||||
witness_signature_data TEXT, -- 见证人签名(base64)
|
||||
witness_sign_time TIMESTAMP,
|
||||
status VARCHAR(20), -- 待签署/已签署/已撤回
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
##### 8.2 手术记录系统
|
||||
|
||||
**业务流程**:
|
||||
```
|
||||
手术申请 → 科室审批 → 医务科审批 → 手术排程 → 术前准备 → 手术执行 → 术后医嘱
|
||||
```
|
||||
|
||||
**新增Service**:
|
||||
```java
|
||||
public interface ISurgeryRecordService {
|
||||
// 创建手术记录
|
||||
SurgeryRecord createRecord(SurgeryRecordParam param);
|
||||
// 记录术中信息
|
||||
void recordIntraOp(IntraOpParam param);
|
||||
// 记录植入物
|
||||
void recordImplant(ImplantRecordParam param);
|
||||
// 记录标本
|
||||
void recordSpecimen(SpecimenRecordParam param);
|
||||
// 术后医嘱自动生成
|
||||
List<Advice> generatePostOpOrders(Long surgeryRecordId);
|
||||
// 手术统计
|
||||
SurgeryStatistics getStatistics(Long departmentId, Date startDate, Date endDate);
|
||||
}
|
||||
```
|
||||
|
||||
**新增数据库表**:
|
||||
```sql
|
||||
-- V2026_008__surgery_record.sql
|
||||
|
||||
-- 手术记录表(扩展已有op_schedule)
|
||||
ALTER TABLE op_schedule ADD COLUMN IF NOT EXISTS surgery_record_id BIGINT;
|
||||
ALTER TABLE op_schedule ADD COLUMN IF NOT EXISTS post_op_diagnosis TEXT;
|
||||
ALTER TABLE op_schedule ADD COLUMN IF NOT EXISTS post_op_orders JSONB;
|
||||
|
||||
-- 手术记录详细表
|
||||
CREATE TABLE sys_surgery_record (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
surgery_schedule_id BIGINT NOT NULL,
|
||||
encounter_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
|
||||
-- 手术团队
|
||||
surgeon_id BIGINT, -- 主刀
|
||||
assistant1_id BIGINT, -- 助手1
|
||||
assistant2_id BIGINT, -- 助手2
|
||||
assistant3_id BIGINT, -- 助手3
|
||||
scrub_nurse_id BIGINT, -- 器械护士
|
||||
circulating_nurse_id BIGINT, -- 巡回护士
|
||||
|
||||
-- 手术时间
|
||||
incision_time TIMESTAMP, -- 切皮时间
|
||||
closure_time TIMESTAMP, -- 缝合时间
|
||||
total_surgery_minutes INT, -- 手术总时长
|
||||
|
||||
-- 手术信息
|
||||
surgical_site VARCHAR(200), -- 手术部位
|
||||
approach VARCHAR(100), -- 手术入路
|
||||
implant_records JSONB, -- [{implant_name, serial_no, manufacturer, quantity}]
|
||||
specimen_records JSONB, -- [{specimen_type, description, send_to_pathology}]
|
||||
|
||||
-- 出血与输血
|
||||
estimated_blood_loss INT, -- 估计出血量(ml)
|
||||
actual_blood_loss INT, -- 实际出血量(ml)
|
||||
blood_transfusion_units INT, -- 输血量(单位)
|
||||
|
||||
-- 并发症
|
||||
intraoperative_complications JSONB, -- [{type, description, time, handling}]
|
||||
postoperative_complications JSONB, -- [{type, description, time, handling}]
|
||||
|
||||
-- 手术级别
|
||||
surgery_level VARCHAR(20), -- 一/二/三/四级
|
||||
surgery_classification VARCHAR(50), -- 急诊/限期/择期
|
||||
|
||||
-- 感染控制
|
||||
infection_risk CHAR(1), -- 0低 1中 2高
|
||||
isolation_type VARCHAR(50), -- 隔离类型
|
||||
antibiotic_prophylaxis CHAR(1), -- 0无 1有预防性抗菌药物
|
||||
|
||||
status VARCHAR(20), -- 进行中/已完成
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 植入物记录表
|
||||
CREATE TABLE sys_implant_record (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
surgery_record_id BIGINT NOT NULL,
|
||||
implant_name VARCHAR(200),
|
||||
implant_model VARCHAR(100),
|
||||
serial_no VARCHAR(100), -- 序列号/批号
|
||||
manufacturer VARCHAR(200),
|
||||
specification VARCHAR(200),
|
||||
quantity INT DEFAULT 1,
|
||||
implant_site VARCHAR(200), -- 植入部位
|
||||
Implant_time TIMESTAMP,
|
||||
status CHAR(1) DEFAULT '0',
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### Sprint 9: 院感管理系统 (5天)
|
||||
|
||||
**业务背景**: 三甲评审要求医院感染监测报告率达标,院感管理是评审必查项。
|
||||
|
||||
**新增Service**:
|
||||
```java
|
||||
public interface IInfectionControlService {
|
||||
// 院感病例监测
|
||||
List<InfectionCase> monitorInfection(Date startDate, Date endDate);
|
||||
// 院感病例上报
|
||||
void reportCase(InfectionCaseReportParam param);
|
||||
// 院感预警
|
||||
List<InfectionAlert> getAlerts(Long departmentId);
|
||||
// 院感统计
|
||||
InfectionStatistics getStatistics(Date startDate, Date endDate);
|
||||
// 多重耐药菌监测
|
||||
List<MDRORecord> monitorMDRO(Date startDate, Date endDate);
|
||||
|
||||
// 手卫生管理
|
||||
void recordHandHygiene(HandHygieneRecordParam param);
|
||||
HandHygieneStats getHandHygieneStats(Long departmentId, Date startDate, Date endDate);
|
||||
|
||||
// 职业暴露管理
|
||||
void reportExposure(OccupationalExposureParam param);
|
||||
void trackExposure(Long exposureId, ExposureFollowUpParam param);
|
||||
List<OccupationalExposure> getExposureRecords(Date startDate, Date endDate);
|
||||
|
||||
// 环境监测
|
||||
void recordEnvironmentMonitor(EnvironmentMonitorParam param);
|
||||
List<EnvironmentMonitor> getEnvironmentMonitorRecords(Long departmentId, Date startDate, Date endDate);
|
||||
}
|
||||
```
|
||||
|
||||
**新增数据库表**:
|
||||
```sql
|
||||
-- V2026_009__infection_control.sql
|
||||
|
||||
-- 院感病例表
|
||||
CREATE TABLE sys_infection_case (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
encounter_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
infection_type VARCHAR(50), -- 医院感染/社区感染
|
||||
infection_site VARCHAR(100), -- 下呼吸道/泌尿道/血液/手术部位/其他
|
||||
pathogen_code VARCHAR(50),
|
||||
pathogen_name VARCHAR(200),
|
||||
drug_resistance JSONB, -- [{drug_name, resistance_type}]
|
||||
diagnosis_basis TEXT, -- 诊断依据
|
||||
report_time TIMESTAMP,
|
||||
reporter_id BIGINT,
|
||||
department_id BIGINT,
|
||||
status VARCHAR(20), -- 疑似/确认/已排除/已处理
|
||||
treatment_plan TEXT,
|
||||
outcome TEXT,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 手卫生记录表
|
||||
CREATE TABLE sys_hand_hygiene (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
staff_id BIGINT NOT NULL,
|
||||
staff_name VARCHAR(100),
|
||||
department_id BIGINT,
|
||||
observation_time TIMESTAMP,
|
||||
observation_type VARCHAR(50), -- 两前三后/手卫生五个时刻
|
||||
correct_flag CHAR(1), -- 0不正确 1正确
|
||||
handrub_type VARCHAR(50), -- 洗手液/速干手消毒剂
|
||||
observer_id BIGINT,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 职业暴露记录表
|
||||
CREATE TABLE sys_occupational_exposure (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
staff_id BIGINT NOT NULL,
|
||||
staff_name VARCHAR(100),
|
||||
department_id BIGINT,
|
||||
exposure_type VARCHAR(50), -- 锐器伤/血液体液暴露/化学暴露/其他
|
||||
exposure_source VARCHAR(200), -- 暴露源描述
|
||||
source_patient_name VARCHAR(100),
|
||||
source_patient_hiv VARCHAR(20),
|
||||
source_patient_hbv VARCHAR(20),
|
||||
source_patient_hcv VARCHAR(20),
|
||||
exposure_time TIMESTAMP,
|
||||
exposure_site VARCHAR(100), -- 暴露部位
|
||||
exposure_amount VARCHAR(100), -- 暴露量
|
||||
immediate_handling TEXT, -- 立即处理措施
|
||||
risk_assessment VARCHAR(20), -- 低/中/高
|
||||
follow_up_plan TEXT, -- 随访计划
|
||||
follow_up_records JSONB, -- [{time, result, note}]
|
||||
report_time TIMESTAMP,
|
||||
reporter_id BIGINT,
|
||||
status VARCHAR(20), -- 登记中/处置中/随访中/已结案
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 环境监测表
|
||||
CREATE TABLE sys_environment_monitor (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
department_id BIGINT,
|
||||
monitor_type VARCHAR(50), -- 空气/物表/手/消毒剂
|
||||
monitor_item VARCHAR(100), -- 监测项目
|
||||
monitor_result VARCHAR(200), -- 监测结果
|
||||
standard_value VARCHAR(200), -- 标准值
|
||||
is_qualified CHAR(1), -- 0不合格 1合格
|
||||
monitor_time TIMESTAMP,
|
||||
monitor_by_id BIGINT,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Phase 2: 病案与护理体系(3周)
|
||||
|
||||
#### Sprint 10: 病案管理系统 (5天)
|
||||
|
||||
**业务背景**: 三甲要求病案首页24小时归档率≥90%,主要诊断编码正确率≥95%。
|
||||
|
||||
**已有基础**: `InpatientMedicalRecordHomePageCollectionController`(病案首页统计)
|
||||
|
||||
**新增Service**:
|
||||
```java
|
||||
public interface IMedicalRecordManagementService {
|
||||
// 病案首页数据自动采集
|
||||
MedicalRecordHome autoCollectHome(Long encounterId);
|
||||
// ICD-10编码推荐
|
||||
List<ICD10Code> recommendDiagnosisCode(String diagnosisName);
|
||||
// ICD-9-CM-3手术编码映射
|
||||
List<ICD9CM3Code> mapSurgeryCode(String surgeryName);
|
||||
// 首页数据质量校验
|
||||
HomeQualityResult validateHomeQuality(Long homeId);
|
||||
// 病案质控
|
||||
MedicalRecordAudit auditRecord(MedicalRecordAuditParam param);
|
||||
// DRG自动分组
|
||||
DRGGroupingResult autoDRGGrouping(Long encounterId);
|
||||
// 病案归档
|
||||
void archiveMedicalRecord(Long encounterId);
|
||||
// 病案借阅
|
||||
MedicalRecordBorrow borrowRecord(MedicalRecordBorrowParam param);
|
||||
// 病案封存/解封
|
||||
void sealRecord(Long recordId, boolean seal);
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### Sprint 11: 护理评估体系 (5天)
|
||||
|
||||
**业务背景**: 三甲要求护理评估完成率≥95%,入院评估8小时内完成。
|
||||
|
||||
**已有基础**: `VitalSignsController`(生命体征)、`NursingRecordController`(护理记录)
|
||||
|
||||
**新增Service**:
|
||||
```java
|
||||
public interface INursingAssessmentService {
|
||||
// 入院护理评估
|
||||
NursingAssessment createAdmissionAssessment(AdmissionAssessmentParam param);
|
||||
// Braden压疮风险评估(自动评分)
|
||||
BradenScore assessBraden(BradenAssessmentParam param);
|
||||
// Morse跌倒风险评估(自动评分)
|
||||
MorseScore assessMorse(MorseAssessmentParam param);
|
||||
// NRS2002营养风险评估
|
||||
NRS2002Score assessNRS2002(NRS2002AssessmentParam param);
|
||||
// 疼痛评估(NRS/VAS)
|
||||
PainScore assessPain(PainAssessmentParam param);
|
||||
// Caprini VTE风险评估
|
||||
CapriniScore assessCaprini(CapriniAssessmentParam param);
|
||||
// Barthel自理能力评估
|
||||
BarthelScore assessBarthel(BarthelAssessmentParam param);
|
||||
// 评估时间轴(动态变化追踪)
|
||||
List<AssessmentTimeline> getTimeline(Long patientId, String assessmentType);
|
||||
|
||||
// 护理计划
|
||||
NursingPlan createPlan(NursingPlanParam param);
|
||||
// 护理交接班
|
||||
NursingHandover createHandover(NursingHandoverParam param);
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Phase 3: 数据集成与标准化(3周)
|
||||
|
||||
#### Sprint 12: 患者主索引+主数据 (3天)
|
||||
|
||||
**业务背景**: 互联互通四级甲等基础,统一患者身份标识。
|
||||
|
||||
**新增Service**:
|
||||
```java
|
||||
public interface IEMPIService {
|
||||
// 患者身份匹配
|
||||
String matchPatient(PatientMatchParam param);
|
||||
// 患者身份合并
|
||||
void mergePatient(Long primaryId, Long secondaryId);
|
||||
// 患者身份拆分
|
||||
void splitPatient(Long mergedId);
|
||||
// 主数据同步
|
||||
void syncMasterData(MasterDataSyncParam param);
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### Sprint 13: 数据集成平台ESB (5天)
|
||||
|
||||
**业务背景**: 互联互通四级甲等核心,所有系统通过集成平台互联。
|
||||
|
||||
**新增Service**:
|
||||
```java
|
||||
public interface IESBService {
|
||||
// 发送消息
|
||||
void sendMessage(ESBMessage message);
|
||||
// 接收消息
|
||||
ESBMessage receiveMessage(String messageId);
|
||||
// 服务注册
|
||||
void registerService(ESBServiceRegistry service);
|
||||
// 服务发现
|
||||
ESBServiceRegistry discoverService(String serviceName);
|
||||
// 消息监控
|
||||
ESBMonitor getMonitor(Date startDate, Date endDate);
|
||||
// CDA文档生成
|
||||
CDADocument generateCDA(String documentType, Long encounterId);
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Phase 4: 智能化与决策支持(3周)
|
||||
|
||||
#### Sprint 14: 危急值管理系统 (3天)
|
||||
|
||||
**业务背景**: 医疗质量安全核心制度,检验危急值必须闭环管理。
|
||||
|
||||
**新增Service**:
|
||||
```java
|
||||
public interface ICriticalValueService {
|
||||
// 危急值规则配置
|
||||
void configureRules(List<CriticalValueRule> rules);
|
||||
// 检验结果自动匹配危急值
|
||||
List<CriticalValueAlert> matchCriticalValue(Long inspectionResultId);
|
||||
// 危急值通知
|
||||
void notifyCriticalValue(Long alertId, List<Long> notifyUserIds);
|
||||
// 危急值确认
|
||||
void confirmCriticalValue(Long alertId, CriticalValueConfirmParam param);
|
||||
// 危急值处置
|
||||
void handleCriticalValue(Long alertId, CriticalValueHandleParam param);
|
||||
// 危急值统计
|
||||
CriticalValueStats getStats(Date startDate, Date endDate);
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### Sprint 15: 电子病历结构化 (5天)
|
||||
|
||||
**业务背景**: 电子病历应用管理规范要求修改留痕、版本管理、电子签名。
|
||||
|
||||
**新增Service**:
|
||||
```java
|
||||
public interface IStructuredEMRService {
|
||||
// 结构化病历创建
|
||||
StructuredEMR createEMR(EMRCreateParam param);
|
||||
// 病历修改(留痕)
|
||||
void modifyEMR(Long emrId, EMRModifyParam param);
|
||||
// 版本历史
|
||||
List<EMRVersion> getVersionHistory(Long emrId);
|
||||
// 版本对比
|
||||
EMRDiff compareVersions(Long versionId1, Long versionId2);
|
||||
// 病历模板管理
|
||||
EMRTemplate saveTemplate(EMRTemplateParam param);
|
||||
// 病历完整性检查
|
||||
EMRCompletenessResult checkCompleteness(Long emrId);
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### Sprint 16: 医保智能审核 (5天)
|
||||
|
||||
**业务背景**: 医保基金使用监督管理条例,防范骗保、规范使用。
|
||||
|
||||
**已有基础**: `ybmanage/*`(医保管理模块)
|
||||
|
||||
**新增Service**:
|
||||
```java
|
||||
public interface IInsuranceAuditService {
|
||||
// 事前审核(开方时)
|
||||
PreAuditResult preAudit(PreAuditParam param);
|
||||
// 事中审核(住院中)
|
||||
List<InAuditAlert> inAudit(Long encounterId);
|
||||
// 事后审核(结算后)
|
||||
PostAuditResult postAudit(Long settlementId);
|
||||
// DRG/DIP优化建议
|
||||
DRGOptimizationSuggestion optimizeDRG(Long encounterId);
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 三、测试计划
|
||||
|
||||
### 每个Sprint测试矩阵
|
||||
|
||||
| 测试类型 | 内容 | 通过标准 |
|
||||
|---|---|---|
|
||||
| **接口测试** | 所有新增API端点 | 正常/异常/边界各至少1个用例 |
|
||||
| **白盒测试** | Service层方法 | 覆盖率≥80% |
|
||||
| **黑盒测试** | 业务流程完整性 | 关键流程100%覆盖 |
|
||||
| **冒烟测试** | 核心功能可用性 | 所有核心接口返回200 |
|
||||
| **回归测试** | 原有功能不受影响 | 158个已有测试全部通过 |
|
||||
|
||||
### 测试用例设计原则
|
||||
|
||||
1. **正常流程测试**: 每个API至少1个正常用例
|
||||
2. **边界条件测试**: 空值/极值/特殊字符/超长文本
|
||||
3. **异常处理测试**: 无权限/参数错误/数据不存在/并发冲突
|
||||
4. **数据一致性测试**: 事务完整性、级联操作
|
||||
5. **性能测试**: 并发场景(可选,P2优先级)
|
||||
|
||||
---
|
||||
|
||||
## 四、实施路线图
|
||||
|
||||
```
|
||||
Phase 1 (Week 1-3): 核心安全模块
|
||||
├── Sprint 7: 合理用药系统 (5天) → 20个测试用例
|
||||
├── Sprint 8: 手术麻醉系统 (5天) → 25个测试用例
|
||||
└── Sprint 9: 院感管理系统 (5天) → 20个测试用例
|
||||
|
||||
Phase 2 (Week 4-6): 病案与护理
|
||||
├── Sprint 10: 病案管理系统 (5天) → 20个测试用例
|
||||
└── Sprint 11: 护理评估体系 (5天) → 25个测试用例
|
||||
|
||||
Phase 3 (Week 7-9): 数据集成
|
||||
├── Sprint 12: EMPI + 主数据 (3天) → 15个测试用例
|
||||
└── Sprint 13: ESB集成平台 (5天) → 20个测试用例
|
||||
|
||||
Phase 4 (Week 10-12): 智能化
|
||||
├── Sprint 14: 危急值管理 (3天) → 15个测试用例
|
||||
├── Sprint 15: 电子病历结构化 (5天) → 20个测试用例
|
||||
└── Sprint 16: 医保智能审核 (5天) → 20个测试用例
|
||||
|
||||
总计: 12周 (约3个月)
|
||||
总用例数: 预计 220+ 个接口测试
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 五、质量保障
|
||||
|
||||
### 5.1 开发规范铁律
|
||||
|
||||
1. **不修改原有函数签名** — 扩展功能通过新建Service/AppService实现
|
||||
2. **数据库变更通过Flyway** — 所有新建表和字段使用Flyway版本化管理
|
||||
3. **代码审查** — 每个PR必须经过Code Review
|
||||
4. **单元测试** — Service层覆盖率≥80%
|
||||
5. **接口测试** — 每个API端点必须有测试用例
|
||||
|
||||
### 5.2 铁律
|
||||
|
||||
1. 修改完必须测试才能提交
|
||||
2. 新建表和字段必须通过Flyway
|
||||
3. 测试通过后才提交代码
|
||||
4. 前后端API路径必须对齐
|
||||
5. 每个Sprint完成后进行完整回归测试
|
||||
6. 白盒测试+黑盒测试+冒烟测试+接口测试+回归测试全部通过后才能提交
|
||||
|
||||
---
|
||||
|
||||
> **文档版本**: v1.0
|
||||
> **最后更新**: 2026-06-06
|
||||
@@ -1,729 +0,0 @@
|
||||
# HealthLink-HIS 三甲医院差距分析与缺失模块设计
|
||||
|
||||
> **文档类型**: 架构设计
|
||||
> **适用范围**: 三甲达标全量差距分析
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: 2026-06-06
|
||||
> **最后更新**: 2026-06-06
|
||||
|
||||
---
|
||||
|
||||
## 一、分析基础
|
||||
|
||||
### 1.1 评估依据
|
||||
- 《三级医院评审标准(2022年版)》及广西实施细则
|
||||
- 《电子病历系统应用水平分级评价标准》(≥4级 = 三甲硬性)
|
||||
- 《医院信息互联互通标准化成熟度测评方案》(≥四级甲等 = 三甲硬性)
|
||||
- 《医院信息系统基本功能规范》(卫生部2002版 + 2024修订)
|
||||
- 《广西卫生健康信息化"十四五"发展规划》
|
||||
|
||||
### 1.2 当前系统基线
|
||||
|
||||
| 维度 | 数量 | 说明 |
|
||||
|------|------|------|
|
||||
| 数据库表 | 181张 | @TableName 实体映射 |
|
||||
| 后端Controller | 230个 | 45个业务模块 |
|
||||
| 前端视图 | 209个 | 42个模块目录 |
|
||||
| Mapper XML | 662个 | 含复杂SQL映射 |
|
||||
| 空壳视图 | 26个 | 仅22字节占位 |
|
||||
| 缺失组件 | 18个 | 路由指向不存在的组件 |
|
||||
| 已实现核心流程 | 6条 | 挂号→收费→发药→入院→医嘱→报表 |
|
||||
|
||||
### 1.3 电子病历评级差距总览
|
||||
|
||||
| 等级 | 要求 | 当前状态 | 差距 |
|
||||
|------|------|---------|------|
|
||||
| 1级 | 独立信息系统 | ✅ 已达 | — |
|
||||
| 2级 | 科室内共享 | ✅ 已达 | — |
|
||||
| 3级 | 跨科室共享 | ✅ 基本达到 | 部分模块数据未打通 |
|
||||
| **4级** | **全院共享+CDSS** | **❌ 未达到** | **差6大核心能力** |
|
||||
| 5级 | 结构化+质控 | ❌ | 需4级基础上建设 |
|
||||
|
||||
---
|
||||
|
||||
## 二、差距全景图
|
||||
|
||||
### 2.1 按三甲标准17个互联互通必测项对比
|
||||
|
||||
| 接口 | 名称 | 标准要求 | 当前状态 | 差距等级 |
|
||||
|------|------|---------|---------|---------|
|
||||
| I-01 | 患者信息注册 | 统一EMPI | ⚠️ 有基础患者表,无EMPI | 🟡 |
|
||||
| I-02 | 门诊挂号 | 预约+当日+退号 | ✅ 已实现 | ✅ |
|
||||
| I-03 | 门诊医生工作站 | 处方+检验检查申请 | ✅ 已实现 | ✅ |
|
||||
| I-04 | 门诊收费 | 费用明细+医保结算 | ✅ 已实现 | ✅ |
|
||||
| I-05 | 门诊药房 | 发药信息 | ✅ 已实现 | ✅ |
|
||||
| I-06 | 住院入出转 | 入院+转科+出院 | ✅ 已实现 | ✅ |
|
||||
| I-07 | 住院医生工作站 | 医嘱信息 | ⚠️ 基础实现 | 🟡 缺闭环 |
|
||||
| I-08 | 住院护士工作站 | 护理执行 | ⚠️ 基础实现 | 🟡 缺评估 |
|
||||
| I-09 | 住院收费 | 费用结算 | ✅ 已实现 | ✅ |
|
||||
| I-10 | 住院药房 | 药品发放 | ✅ 已实现 | ✅ |
|
||||
| I-11 | 检验系统 | 标本+结果 | ✅ LIS框架已有 | ⚠️ 缺危急值 |
|
||||
| I-12 | 检查系统 | 申请+报告 | ✅ PACS框架已有 | ⚠️ 缺结构化 |
|
||||
| **I-13** | **手麻系统** | **手术申请+麻醉记录** | **❌ 仅排程** | **🔴 严重** |
|
||||
| **I-14** | **病案系统** | **病案首页** | **❌ 仅基础统计** | **🔴 严重** |
|
||||
| I-15 | 医保接口 | 医保结算 | ⚠️ DRG框架有 | 🟡 |
|
||||
| **I-16** | **电子病历** | **病历文档共享** | **⚠️ 有模板** | **🔴 缺结构化+留痕** |
|
||||
| **I-17** | **护理系统** | **护理评估+记录** | **⚠️ 仅基础** | **🔴 缺评估体系** |
|
||||
|
||||
### 2.2 按模块域差距分析
|
||||
|
||||
#### 🔴 P0 — 三甲硬性缺失(不达标的评审一票否决)
|
||||
|
||||
| # | 模块 | 三甲要求 | 当前状态 | 预估工时 |
|
||||
|---|------|---------|---------|---------|
|
||||
| 1 | **合理用药系统** | 处方审核率≥100% | 仅`prescription_review_record`基础表,无审核引擎 | 15天 |
|
||||
| 2 | **麻醉记录系统** | 互联互通I-13必测 | 仅`AnesthesiaTypeEnum`枚举+手术排程 | 15天 |
|
||||
| 3 | **病案首页管理** | 首页数据质量≥95% | 仅有`yb_inpatient_discharge`基础统计 | 10天 |
|
||||
| 4 | **医嘱闭环管理** | 开立→审核→执行→完成 | `order_main`+`doc_order_process`部分实现 | 10天 |
|
||||
| 5 | **电子病历结构化** | 结构化+模板+留痕+版本 | `doc_emr`+`doc_emr_template`基础框架 | 15天 |
|
||||
| 6 | **电子签名/CA** | 三甲硬性 | 仅医保证书签名,无临床CA | 5天 |
|
||||
|
||||
#### 🟡 P1 — 三甲评审重要项(影响评分)
|
||||
|
||||
| # | 模块 | 三甲要求 | 当前状态 | 预估工时 |
|
||||
|---|------|---------|---------|---------|
|
||||
| 7 | **护理评估体系** | 多种量表+评估计划 | `doc_vital_signs`仅生命体征 | 10天 |
|
||||
| 8 | **危急值管理** | 检验危急值闭环 | 完全缺失 | 8天 |
|
||||
| 9 | **院感管理** | 实时监测+预警 | `infectious_*` 3张表仅有框架 | 10天 |
|
||||
| 10 | **抗菌药物管控** | 分级管理+权限控制 | 完全缺失 | 8天 |
|
||||
| 11 | **处方点评系统** | 合理用药管控 | `nd_review_prescription_records`基础表 | 5天 |
|
||||
| 12 | **数据集成平台(ESB)** | 互联互通四级甲等 | 完全缺失 | 20天 |
|
||||
| 13 | **患者主索引(EMPI)** | 数据标准化基础 | 完全缺失 | 8天 |
|
||||
| 14 | **病历质控系统** | 按时完成率+完整性 | 完全缺失 | 8天 |
|
||||
| 15 | **死亡病例讨论** | 评审必查 | 完全缺失 | 3天 |
|
||||
|
||||
#### 🟢 P2 — 广西地方特色要求
|
||||
|
||||
| # | 模块 | 广西要求 | 当前状态 | 预估工时 |
|
||||
|---|------|---------|---------|---------|
|
||||
| 16 | **壮医/中医特色模块** | 广西壮医药诊疗 | `yb_catalog_zy_*`医保目录有中医 | 10天 |
|
||||
| 17 | **传染病直报** | 对接广西疾控 | `diseaseReportManagement`有框架 | 5天 |
|
||||
| 18 | **电子健康卡** | 对接广西平台 | 完全缺失 | 5天 |
|
||||
| 19 | **电子票据** | 对接广西财政 | 完全缺失 | 5天 |
|
||||
| 20 | **DRG/DIP深化** | 广西医保规则 | `ybmanage`基础框架 | 10天 |
|
||||
|
||||
---
|
||||
|
||||
## 三、缺失模块详细设计
|
||||
|
||||
### 3.1 合理用药系统(P0 — 15天)
|
||||
|
||||
#### 业务流程
|
||||
```
|
||||
医生开方 → ┌→ 规则引擎自动审核 ──→ 合理 → 通过
|
||||
├→ 配伍禁忌/过敏/剂量 ──→ 不合理 → 拦截弹窗 → 修改
|
||||
└→ 需人工审核 ──────→ 药师在线审核 → 通过/驳回
|
||||
```
|
||||
|
||||
#### 功能清单
|
||||
|
||||
| 子功能 | 描述 | 实现方式 |
|
||||
|--------|------|---------|
|
||||
| 处方前置审核引擎 | 医生开方时实时拦截 | 新建 `RationalDrugAppService` |
|
||||
| 配伍禁忌检查 | 两药/三药相互作用 | 新建 `DrugInteractionChecker` |
|
||||
| 过敏检测 | 患者过敏史自动匹配 | 扩展 `cli_allergy_intolerance` |
|
||||
| 剂量范围检查 | 肾/肝功能自动调量 | 新建 `DosageRangeChecker` |
|
||||
| 重复用药检查 | 同成分/同功效重复 | 新建 `DuplicateTherapyChecker` |
|
||||
| 审核结果记录 | 每次审核留痕 | 扩展 `prescription_review_record` |
|
||||
| 审核统计报表 | 合理率/拦截率统计 | 新建 `RationalDrugReportAppService` |
|
||||
|
||||
#### 数据库设计(Flyway)
|
||||
```sql
|
||||
-- V2.1__rational_drug_system.sql
|
||||
CREATE TABLE drug_interaction_rule (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
drug_a_code VARCHAR(32) NOT NULL,
|
||||
drug_b_code VARCHAR(32) NOT NULL,
|
||||
severity VARCHAR(16) NOT NULL, -- CRITICAL/MAJOR/MODERATE
|
||||
description TEXT,
|
||||
suggestion TEXT,
|
||||
del_flag CHAR(1) DEFAULT '0',
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE prescription_audit_log (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
prescription_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
doctor_id BIGINT NOT NULL,
|
||||
audit_result VARCHAR(16) NOT NULL, -- PASS/REJECT/MANUAL
|
||||
rule_hit VARCHAR(64),
|
||||
detail TEXT,
|
||||
auditor_id BIGINT,
|
||||
audit_time TIMESTAMP,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
#### 接口设计
|
||||
```
|
||||
POST /healthlink-his/api/v1/rational-drug/audit # 处方审核
|
||||
GET /healthlink-his/api/v1/rational-drug/interactions # 查询配伍禁忌
|
||||
GET /healthlink-his/api/v1/rational-drug/statistics # 审核统计
|
||||
POST /healthlink-his/api/v1/rational-drug/manual-review # 人工审核
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3.2 麻醉记录系统(P0 — 15天)
|
||||
|
||||
#### 业务流程
|
||||
```
|
||||
手术申请 → 麻醉评估 → 麻醉方案 → 术中记录 → 术后随访
|
||||
│ │
|
||||
├ ASA分级评估 ├ 生命体征(5min间隔)
|
||||
├ 禁食确认 ├ 用药记录
|
||||
└ 知情同意 ├ 出入量记录
|
||||
└ 并发症记录
|
||||
```
|
||||
|
||||
#### 功能清单
|
||||
|
||||
| 子功能 | 描述 | 互联互通映射 |
|
||||
|--------|------|-------------|
|
||||
| 麻醉前评估 | ASA分级、气道评估、禁食确认 | I-13 必测 |
|
||||
| 麻醉方案 | 全麻/半麻/局麻方案制定 | I-13 必测 |
|
||||
| 术中记录 | 生命体征、用药、出入量 | I-13 必测 |
|
||||
| 麻醉小结 | 麻醉总结、并发症记录 | I-13 必测 |
|
||||
| 术后随访 | 24h内随访、疼痛评估 | I-13 必测 |
|
||||
| 麻醉质控 | 麻醉安全指标统计 | 评审加分 |
|
||||
|
||||
#### 数据库设计
|
||||
```sql
|
||||
-- V2.2__anesthesia_system.sql
|
||||
CREATE TABLE anes_record (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
encounter_id BIGINT NOT NULL,
|
||||
surgery_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
anesthetist_id BIGINT NOT NULL,
|
||||
asa_grade VARCHAR(8),
|
||||
anesthesia_type VARCHAR(32),
|
||||
start_time TIMESTAMP,
|
||||
end_time TIMESTAMP,
|
||||
airway_assessment TEXT,
|
||||
fasting_confirmed BOOLEAN DEFAULT FALSE,
|
||||
consent_signed BOOLEAN DEFAULT FALSE,
|
||||
summary TEXT,
|
||||
complications TEXT,
|
||||
del_flag CHAR(1) DEFAULT '0',
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_time TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE anes_vital_sign (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
record_id BIGINT NOT NULL,
|
||||
record_time TIMESTAMP NOT NULL,
|
||||
heart_rate INTEGER,
|
||||
blood_pressure_sys INTEGER,
|
||||
blood_pressure_dia INTEGER,
|
||||
spo2 DECIMAL(5,2),
|
||||
etco2 DECIMAL(5,2),
|
||||
temperature DECIMAL(4,1),
|
||||
respiratory_rate INTEGER,
|
||||
remark TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE anes_medication (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
record_id BIGINT NOT NULL,
|
||||
drug_name VARCHAR(128) NOT NULL,
|
||||
dosage VARCHAR(64),
|
||||
route VARCHAR(32),
|
||||
start_time TIMESTAMP,
|
||||
end_time TIMESTAMP,
|
||||
remark TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE anes_io_record (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
record_id BIGINT NOT NULL,
|
||||
record_type VARCHAR(16) NOT NULL, -- INPUT/OUTPUT
|
||||
item_name VARCHAR(64),
|
||||
amount DECIMAL(10,2),
|
||||
unit VARCHAR(16),
|
||||
record_time TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3.3 病案首页管理(P0 — 10天)
|
||||
|
||||
#### 标准要求
|
||||
- 主要诊断编码正确率 ≥95%
|
||||
- 其他诊断编码正确率 ≥90%
|
||||
- 手术操作编码正确率 ≥95%
|
||||
- 24小时归档率 ≥90%
|
||||
|
||||
#### 功能清单
|
||||
|
||||
| 子功能 | 描述 |
|
||||
|--------|------|
|
||||
| 首页数据录入 | 出院时自动生成首页数据 |
|
||||
| ICD编码辅助 | 诊断→ICD-10自动映射推荐 |
|
||||
| 首页质控 | 入组前必填项校验、逻辑校验 |
|
||||
| DRG预入组 | 费用+诊断→DRG分组预估 |
|
||||
| 首页上报 | HQMS数据上报接口 |
|
||||
| 首页查询 | 按科室/医生/时间段统计 |
|
||||
| 缺陷管理 | 首页缺陷记录、整改跟踪 |
|
||||
|
||||
#### 数据库设计
|
||||
```sql
|
||||
-- V2.3__medical_record_homepage.sql
|
||||
CREATE TABLE mr_homepage (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
encounter_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
discharge_date DATE,
|
||||
los_days INTEGER,
|
||||
primary_diagnosis_code VARCHAR(16),
|
||||
primary_diagnosis_name VARCHAR(128),
|
||||
other_diagnosis_codes TEXT,
|
||||
primary_procedure_code VARCHAR(16),
|
||||
primary_procedure_name VARCHAR(128),
|
||||
other_procedure_codes TEXT,
|
||||
admission_condition VARCHAR(32),
|
||||
discharge_condition VARCHAR(32),
|
||||
drg_group VARCHAR(32),
|
||||
drg_weight DECIMAL(8,4),
|
||||
total_cost DECIMAL(12,2),
|
||||
self_pay_cost DECIMAL(12,2),
|
||||
insurance_cost DECIMAL(12,2),
|
||||
quality_status VARCHAR(16) DEFAULT 'DRAFT',
|
||||
submit_time TIMESTAMP,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_time TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE mr_homepage_quality_check (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
homepage_id BIGINT NOT NULL,
|
||||
check_item VARCHAR(64) NOT NULL,
|
||||
check_result VARCHAR(16) NOT NULL, -- PASS/FAIL/WARN
|
||||
check_detail TEXT,
|
||||
checker VARCHAR(32), -- SYSTEM/MANUAL
|
||||
check_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3.4 医嘱闭环管理(P0 — 10天)
|
||||
|
||||
#### 当前实现
|
||||
- `order_main` — 医嘱主表 ✅
|
||||
- `doc_order_process` — 医嘱处理 ✅
|
||||
- `elep_medication_request` — 电子处方 ✅
|
||||
|
||||
#### 缺失环节
|
||||
|
||||
| 闭环 | 已有 | 缺失 |
|
||||
|------|------|------|
|
||||
| 药品医嘱 | 开立✅ 调配⚠️ | 核对❌ 发药❌ 执行确认❌ |
|
||||
| 检验医嘱 | 开立✅ 采集⚠️ | 运送❌ 接收❌ 检测❌ 审核❌ |
|
||||
| 检查医嘱 | 开立✅ 预约⚠️ | 登记❌ 检查❌ 审核❌ |
|
||||
| 治疗医嘱 | 开立✅ | 执行❌ 观察❌ |
|
||||
|
||||
#### 数据库设计
|
||||
```sql
|
||||
-- V2.4__order_closed_loop.sql
|
||||
CREATE TABLE order_execute_record (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
order_id BIGINT NOT NULL,
|
||||
order_type VARCHAR(32) NOT NULL, -- DRUG/LAB/EXAM/TREAT
|
||||
step_name VARCHAR(32) NOT NULL, -- DISPATCH/VERIFY/EXECUTE/OBSERVE
|
||||
step_status VARCHAR(16) NOT NULL, -- PENDING/IN_PROGRESS/COMPLETED/SKIPPED
|
||||
executor_id BIGINT,
|
||||
execute_time TIMESTAMP,
|
||||
execute_location VARCHAR(64),
|
||||
remark TEXT,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3.5 电子病历结构化(P0 — 15天)
|
||||
|
||||
#### 三甲4级要求
|
||||
- 结构化病历(非纯文本)
|
||||
- 病历模板管理
|
||||
- 修改留痕(修改人、时间、内容)
|
||||
- 版本管理(历史版本不可删除)
|
||||
- 打印管理(标注"打印版")
|
||||
|
||||
#### 当前实现
|
||||
- `doc_emr` — 电子病历 ✅
|
||||
- `doc_emr_template` — 病历模板 ✅
|
||||
- `doc_emr_detail` — 病历详情 ✅
|
||||
|
||||
#### 缺失功能
|
||||
|
||||
| 功能 | 描述 | 实现方式 |
|
||||
|------|------|---------|
|
||||
| 结构化录入 | 选择式+自由文本混合 | 新建 `StructuredEmrAppService` |
|
||||
| 修改留痕 | diff追踪 | 新建 `EmrRevisionTracker` |
|
||||
| 版本管理 | 历史版本快照 | 扩展 `doc_emr` 增加 `version` 字段 |
|
||||
| 完整性检查 | 必填项+逻辑校验 | 新建 `EmrCompletenessChecker` |
|
||||
| 时限监控 | 24h完成率监控 | 新建 `EmrTimelinessMonitor` |
|
||||
| 打印管理 | 打印水印+版本比对 | 新建 `EmrPrintManager` |
|
||||
|
||||
---
|
||||
|
||||
### 3.6 电子签名/CA(P0 — 5天)
|
||||
|
||||
#### 标准要求
|
||||
- 医师签名:按职称、科室分配权限
|
||||
- 操作时效:住院24h、门诊当日
|
||||
- 签名认证:可靠电子签名,等同手写
|
||||
- 版本管理:历史版本不可删除
|
||||
|
||||
#### 实现方案
|
||||
```java
|
||||
// 新建签名服务
|
||||
public interface ICaSignatureService {
|
||||
// 医生签名
|
||||
SignatureResult signDocument(Long docId, Long doctorId, String password);
|
||||
// 验证签名
|
||||
boolean verifySignature(Long docId);
|
||||
// 获取签名历史
|
||||
List<SignatureHistory> getSignatureHistory(Long docId);
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3.7 护理评估体系(P1 — 10天)
|
||||
|
||||
#### 功能清单
|
||||
|
||||
| 评估类型 | 量表 | 频次 |
|
||||
|---------|------|------|
|
||||
| 入院评估 | 压力性损伤风险(Braden)、跌倒风险(Morse)、营养风险(NRS2002)、疼痛(NRS)、Barthel指数 | 入院时 |
|
||||
| 跌倒评估 | Morse跌落评估量表 | 每班 |
|
||||
| 压疮评估 | Braden量表 | 每班 |
|
||||
| 疼痛评估 | NRS数字评分法 | 按需 |
|
||||
| 营养评估 | NRS2002 | 入院时 |
|
||||
| 导管评估 | 导管滑脱风险 | 每班 |
|
||||
| 自理能力 | Barthel指数评定 | 入院时 |
|
||||
|
||||
#### 数据库设计
|
||||
```sql
|
||||
-- V2.5__nursing_assessment.sql
|
||||
CREATE TABLE nursing_assessment (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
encounter_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
assessor_id BIGINT NOT NULL,
|
||||
assessment_type VARCHAR(32) NOT NULL,
|
||||
assessment_tool VARCHAR(64) NOT NULL,
|
||||
total_score INTEGER,
|
||||
risk_level VARCHAR(16),
|
||||
detail JSONB,
|
||||
assessment_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
del_flag CHAR(1) DEFAULT '0'
|
||||
);
|
||||
|
||||
CREATE TABLE nursing_care_plan (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
encounter_id BIGINT NOT NULL,
|
||||
diagnosis VARCHAR(256),
|
||||
goal TEXT,
|
||||
interventions TEXT,
|
||||
evaluation TEXT,
|
||||
planner_id BIGINT,
|
||||
plan_date DATE,
|
||||
del_flag CHAR(1) DEFAULT '0',
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3.8 危急值管理(P1 — 8天)
|
||||
|
||||
#### 业务流程
|
||||
```
|
||||
LIS出报告 → 系统自动识别危急值 → 接收确认(30min内) → 通知医生(5min内)
|
||||
→ 医生处理 → 处理记录 → 闭环确认
|
||||
```
|
||||
|
||||
#### 数据库设计
|
||||
```sql
|
||||
-- V2.6__critical_value.sql
|
||||
CREATE TABLE critical_value (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
lab_result_id BIGINT NOT NULL,
|
||||
encounter_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
item_name VARCHAR(128),
|
||||
result_value VARCHAR(128),
|
||||
reference_range VARCHAR(64),
|
||||
notify_time TIMESTAMP,
|
||||
receiver_id BIGINT,
|
||||
receive_time TIMESTAMP,
|
||||
handler_id BIGINT,
|
||||
handle_time TIMESTAMP,
|
||||
handle_result TEXT,
|
||||
close_time TIMESTAMP,
|
||||
status VARCHAR(16) DEFAULT 'PENDING',
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3.9 院感管理(P1 — 10天)
|
||||
|
||||
#### 功能清单
|
||||
|
||||
| 子功能 | 描述 |
|
||||
|--------|------|
|
||||
| 院感病例监测 | 自动筛查+人工上报 |
|
||||
| 医院感染预警 | 新发感染+聚集性预警 |
|
||||
| 抗菌药物监测 | 使用率、DDD值、耐药率 |
|
||||
| 手卫生监测 | 依从性统计 |
|
||||
| 环境监测 | 消毒灭菌记录 |
|
||||
| 职业暴露 | 登记+跟踪+随访 |
|
||||
| 上报管理 | 向疾控中心上报 |
|
||||
|
||||
#### 数据库设计
|
||||
```sql
|
||||
-- V2.7__hospital_infection.sql
|
||||
CREATE TABLE hir_infection_case (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
encounter_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
infection_type VARCHAR(64),
|
||||
infection_site VARCHAR(64),
|
||||
pathogen VARCHAR(128),
|
||||
diagnosis_time DATE,
|
||||
reporter_id BIGINT,
|
||||
report_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
status VARCHAR(16) DEFAULT 'REPORTED',
|
||||
del_flag CHAR(1) DEFAULT '0'
|
||||
);
|
||||
|
||||
CREATE TABLE hir_antibiotic_usage (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
encounter_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
drug_code VARCHAR(32),
|
||||
drug_name VARCHAR(128),
|
||||
ddd_value DECIMAL(10,2),
|
||||
usage_days INTEGER,
|
||||
usage_type VARCHAR(32), -- PREVENTIVE/THERAPEUTIC
|
||||
start_date DATE,
|
||||
end_date DATE,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3.10 数据集成平台/ESB(P1 — 20天)
|
||||
|
||||
#### 互联互通四级甲等要求
|
||||
|
||||
| 能力 | 要求 | 实现方案 |
|
||||
|------|------|---------|
|
||||
| 消息路由 | HL7 FHIR R4 消息路由 | 新建 `IntegrationHub` |
|
||||
| 格式转换 | HIS内部格式↔FHIR | 新建 `FhirConverter` |
|
||||
| 服务注册 | 接口目录管理 | 新建 `ServiceRegistry` |
|
||||
| 集成监控 | 消息追踪+日志 | 新建 `IntegrationMonitor` |
|
||||
| 可靠性 | 存储转发+确认 | Redis + 消息队列 |
|
||||
|
||||
#### HL7 FHIR 资源映射
|
||||
|
||||
| FHIR资源 | HIS模块 | 映射 |
|
||||
|----------|---------|------|
|
||||
| Patient | adm_patient | 患者信息 |
|
||||
| Practitioner | adm_practitioner | 医护人员 |
|
||||
| Encounter | adm_encounter | 就诊记录 |
|
||||
| Condition | cli_condition | 诊断 |
|
||||
| MedicationRequest | med_medication_request | 药品医嘱 |
|
||||
| ServiceRequest | doc_request_form | 检查检验申请 |
|
||||
| Observation | lab_observation | 检验结果 |
|
||||
| MedicationDispense | med_medication_dispense | 发药记录 |
|
||||
| Procedure | cli_procedure | 手术操作 |
|
||||
| AllergyIntolerance | cli_allergy_intolerance | 过敏信息 |
|
||||
| Claim | fin_claim | 费用结算 |
|
||||
|
||||
---
|
||||
|
||||
### 3.11 患者主索引/EMPI(P1 — 8天)
|
||||
|
||||
#### 功能清单
|
||||
|
||||
| 功能 | 描述 |
|
||||
|------|------|
|
||||
| 患者身份合并 | 同一患者多卡合并 |
|
||||
| 身份校验 | 身份证+姓名+手机号交叉验证 |
|
||||
| 主索引维护 | 一个患者一个全局ID |
|
||||
| 重复检测 | 新建时自动检测重复 |
|
||||
| 跨系统同步 | EMPI→HIS/LIS/PACS/EMR |
|
||||
|
||||
#### 数据库设计
|
||||
```sql
|
||||
-- V2.8__empi.sql
|
||||
CREATE TABLE empi_person (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
global_id VARCHAR(64) UNIQUE NOT NULL,
|
||||
id_card_no VARCHAR(32),
|
||||
name VARCHAR(64),
|
||||
gender VARCHAR(8),
|
||||
birth_date DATE,
|
||||
phone VARCHAR(20),
|
||||
merge_status VARCHAR(16) DEFAULT 'ACTIVE',
|
||||
source_system VARCHAR(32),
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_time TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE empi_person_id_mapping (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
global_id VARCHAR(64) NOT NULL,
|
||||
local_patient_id BIGINT NOT NULL,
|
||||
source_system VARCHAR(32) NOT NULL,
|
||||
id_type VARCHAR(32),
|
||||
id_value VARCHAR(64),
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3.12 病历质控系统(P1 — 8天)
|
||||
|
||||
#### 功能清单
|
||||
|
||||
| 子功能 | 描述 |
|
||||
|--------|------|
|
||||
| 运行质控 | 入院后实时检查病历完成情况 |
|
||||
| 终末质控 | 出院后完整性质控评分 |
|
||||
| 时限监控 | 入院记录24h、首次病程8h、日常病程 |
|
||||
| 完整性检查 | 必填项+逻辑校验 |
|
||||
| 质控评分 | 按标准自动打分 |
|
||||
| 缺陷管理 | 缺陷记录+整改+复查 |
|
||||
|
||||
---
|
||||
|
||||
### 3.13 广西地方特色模块(P2)
|
||||
|
||||
#### 3.13.1 壮医/中医特色
|
||||
|
||||
| 功能 | 描述 |
|
||||
|------|------|
|
||||
| 壮医诊疗 | 壮医望诊、脉诊、目诊记录 |
|
||||
| 中医处方 | 中药饮片处方+壮药处方 |
|
||||
| 中医体质辨识 | 九种体质辨识量表 |
|
||||
| 中医处方模板 | 常用中药方剂模板 |
|
||||
| 民族药编码 | 壮药、瑶药目录维护 |
|
||||
|
||||
#### 3.13.2 传染病直报
|
||||
|
||||
| 功能 | 描述 |
|
||||
|------|------|
|
||||
| 传染病自动筛查 | 诊断+检验结果自动匹配 |
|
||||
| 直报对接 | 对接广西疾控中心系统 |
|
||||
| 报告管理 | 填报+审核+上报 |
|
||||
| 统计分析 | 传染病发病率统计 |
|
||||
|
||||
---
|
||||
|
||||
## 四、空壳模块补全清单
|
||||
|
||||
### 4.1 当前26个空壳视图实现计划
|
||||
|
||||
| 优先级 | 模块 | 前端路径 | 后端接口 | 工时 |
|
||||
|--------|------|---------|---------|------|
|
||||
| P0 | 门诊退号 | `clinicmanagement/refundNumber/` | `RefundNumberAppService` | 2天 |
|
||||
| P0 | 门诊退药 | `clinicmanagement/withdrawal/` | `ReturnMedicineAppService` | 2天 |
|
||||
| P0 | 门诊退费 | `clinicmanagement/consultationRefund/` | `ConsultationRefundAppService` | 2天 |
|
||||
| P0 | 收费详情查询 | `clinicmanagement/chargeDetail/` | `ChargeDetailQueryAppService` | 1天 |
|
||||
| P0 | 申请单管理 | `clinicmanagement/requisition/` | `RequisitionManageAppService` | 2天 |
|
||||
| P0 | 结果查看 | `clinicmanagement/lisPascResult/` | `LabResultViewAppService` | 2天 |
|
||||
| P0 | 医嘱查看与打印 | `clinicmanagement/orderViewPrint/` | `OrderViewPrintAppService` | 1天 |
|
||||
| P0 | 入院诊断 | `inHospitalManagement/inpatientDiagnosis/` | `InpatientDiagnosisAppService` | 2天 |
|
||||
| P0 | 医嘱管理 | `inHospitalManagement/orderManage/` | `OrderManageAppService` | 2天 |
|
||||
| P0 | 门诊收费结算 | `charge/registerRecords/` | `RegisterRecordsAppService` | 2天 |
|
||||
| P0 | 排班管理 | `charge/schedule/` | `ScheduleManageAppService` | 2天 |
|
||||
| P1 | 病案管理 | `inHospitalManagement/medicalRecord/` | `MedicalRecordAppService` | 3天 |
|
||||
| P1 | 费用清单 | `inHospitalManagement/listFee/` | `ListFeeAppService` | 2天 |
|
||||
| P1 | 手术管理 | `inHospitalManagement/surgeryManage/` | `SurgeryManageAppService` | 3天 |
|
||||
| P1 | 服务目录 | `catalog/service/` | `ServiceCatalogAppService` | 2天 |
|
||||
| P1 | 常用诊断 | `basicmanage/commonlyDiagnosis/` | `CommonDiagnosisAppService` | 1天 |
|
||||
| P1 | 中医处方 | `basicmanage/tcmPrescription/` | `TcmPrescriptionAppService` | 2天 |
|
||||
| P1 | 床位管理 | `basicmanage/bedspace/` | `BedManageAppService` | 2天 |
|
||||
| P1 | 费用配置 | `basicmanage/fee/` | `FeeConfigAppService` | 1天 |
|
||||
| P2 | LIS对照 | 目录对照 | `LisContrastAppService` | 2天 |
|
||||
| P2 | PACS对照 | 目录对照 | `PacsContrastAppService` | 2天 |
|
||||
| P2 | 诊断对照 | 目录对照 | `DiagnosisContrastAppService` | 2天 |
|
||||
| P2 | 货位管理 | `medicationmanagement/locationManagement/` | `LocationManageAppService` | 2天 |
|
||||
| P2 | 调价管理 | `adjustprice/` | `AdjustPriceAppService` | 2天 |
|
||||
| P2 | 退药管理 | 药房管理 | `PharmacyReturnAppService` | 2天 |
|
||||
| P2 | 自动计算 | `basicmanage/automaticBilling/` | `AutoBillingAppService` | 2天 |
|
||||
|
||||
---
|
||||
|
||||
## 五、实施路线图
|
||||
|
||||
### Phase 1: 核心达标(4周,Sprint 7-8)
|
||||
|
||||
**目标**:补齐6个P0模块,达到电子病历4级基本要求
|
||||
|
||||
```
|
||||
Week 1-2: 合理用药系统 + 医嘱闭环管理
|
||||
Week 3: 麻醉记录系统
|
||||
Week 4: 病案首页管理 + 电子病历结构化(基础) + 电子签名
|
||||
```
|
||||
|
||||
### Phase 2: 评审保障(4周,Sprint 9-10)
|
||||
|
||||
**目标**:补齐P1模块,达到三甲评审合格线
|
||||
|
||||
```
|
||||
Week 5-6: 护理评估体系 + 危急值管理 + 病历质控
|
||||
Week 7-8: 院感管理 + 抗菌药物管控 + 处方点评 + 空壳模块补全
|
||||
```
|
||||
|
||||
### Phase 3: 地方特色(3周,Sprint 11-12)
|
||||
|
||||
**目标**:满足广西地方要求 + 互联互通基础
|
||||
|
||||
```
|
||||
Week 9-10: 壮医/中医特色 + 传染病直报 + 电子健康卡
|
||||
Week 11: 电子票据 + DRG/DIP深化
|
||||
```
|
||||
|
||||
### Phase 4: 高级能力(6周,Sprint 13-16)
|
||||
|
||||
**目标**:数据集成平台 + EMPI,达到互联互通四级甲等
|
||||
|
||||
```
|
||||
Week 12-14: ESB集成平台 + HL7 FHIR转换
|
||||
Week 15-16: 患者主索引(EMPI) + 服务注册
|
||||
Week 17: 集成监控 + 全系统联调
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 六、工时汇总
|
||||
|
||||
| 类别 | 模块数 | 总工时 |
|
||||
|------|--------|--------|
|
||||
| 🔴 P0 核心达标 | 6个 | 70天 |
|
||||
| 🟡 P1 评审保障 | 9个 | 68天 |
|
||||
| 🟢 P2 地方特色 | 5个 | 35天 |
|
||||
| ⚡ P1 高级能力 | 3个 | 36天 |
|
||||
| 🔧 空壳补全 | 26个 | 49天 |
|
||||
| **总计** | **49个模块** | **258人天** |
|
||||
|
||||
> 按2人并行开发,预计 **5-6个月** 可完成全部三甲达标建设。
|
||||
|
||||
---
|
||||
|
||||
> **文档版本**: v1.0
|
||||
> **最后更新**: 2026-06-06
|
||||
@@ -1,219 +0,0 @@
|
||||
# 广西三甲医院 HIS 系统功能设计文档
|
||||
|
||||
> **文档类型**: 架构设计
|
||||
> **适用范围**: 三甲医院HIS系统
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: 2026-06-06
|
||||
> **最后更新**: 2026-06-06
|
||||
|
||||
---
|
||||
|
||||
|
||||
> 参考标准:
|
||||
> - 《医院信息系统功能基本规范》(卫生部)
|
||||
> - 《三级医院评审标准(2022年版)》信息化部分
|
||||
> - 《电子病历应用管理规范(试行)》
|
||||
> - 《医院信息平台技术规范》(WS/T 500)
|
||||
> - 互联互通标准化成熟度测评四级甲等要求
|
||||
> - 广西壮族自治区卫生健康信息化"十四五"规划
|
||||
|
||||
---
|
||||
|
||||
## 一、门诊管理模块 (Outpatient)
|
||||
|
||||
### 1.1 门诊挂号 (Registration)
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 普通挂号 | 支持科室/医生/时段多维度挂号 | ✅必须 |
|
||||
| 预约挂号 | 支持电话/网络/现场预约,分时段预约 | ✅必须 |
|
||||
| 挂号退号 | 退号退费,限当日退号 | ✅必须 |
|
||||
| 号源管理 | 号源池管理,限号/加号/停诊 | ✅必须 |
|
||||
| 多身份挂号 | 医保/自费/公费/商业保险 | ✅必须 |
|
||||
| 就诊卡管理 | 发卡/补卡/换卡/挂失 | ✅必须 |
|
||||
| 排班管理 | 医生排班/停诊/替班 | ✅必须 |
|
||||
|
||||
### 1.2 门诊医生工作站 (Doctor Workstation)
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 候诊患者列表 | 按就诊顺序排列,显示患者基本信息 | ✅必须 |
|
||||
| 病历书写 | 主诉/现病史/既往史/体格检查/辅助检查 | ✅必须(电子病历≥4级) |
|
||||
| 诊断录入 | ICD-10编码,主诊断+副诊断 | ✅必须 |
|
||||
| 处方开具 | 西药/中成药/中药饮片处方 | ✅必须 |
|
||||
| 检验申请 | LIS检验项目申请,条码打印 | ✅必须 |
|
||||
| 检查申请 | PACS检查项目申请 | ✅必须 |
|
||||
| 治疗申请 | 治疗/手术/操作申请 | ✅必须 |
|
||||
| 医嘱管理 | 长期医嘱/临时医嘱,医嘱审核 | ✅必须 |
|
||||
| 处方审核 | 药师审核处方,合理用药提醒 | ✅必须 |
|
||||
| 模板管理 | 个人/科室/全院病历模板 | 推荐 |
|
||||
| 诊断知识库 | 诊断建议,鉴别诊断 | 推荐 |
|
||||
|
||||
### 1.3 门诊收费 (Billing)
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 门诊收费 | 处方/检查/治疗费用收取 | ✅必须 |
|
||||
| 多支付方式 | 现金/银行卡/微信/支付宝/医保 | ✅必须 |
|
||||
| 发票管理 | 电子发票/纸质发票 | ✅必须 |
|
||||
| 退费管理 | 部分退费/全部退费,退费审批 | ✅必须 |
|
||||
| 费用查询 | 患者费用明细查询 | ✅必须 |
|
||||
| 日结管理 | 收款员日结/月结 | ✅必须 |
|
||||
| 欠费管理 | 记账/催缴/坏账处理 | 推荐 |
|
||||
|
||||
### 1.4 门诊药房 (Pharmacy)
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 处方接收 | 自动接收门诊处方 | ✅必须 |
|
||||
| 配药发药 | 按处方配药,核对发药 | ✅必须 |
|
||||
| 退药管理 | 退药退回药房 | ✅必须 |
|
||||
| 处方点评 | 抗菌药物/重点监控药品点评 | ✅必须 |
|
||||
| 用药安全 | 过敏提醒/配伍禁忌/重复用药 | ✅必须 |
|
||||
| 药品效期 | 近效期预警/过期药品管理 | ✅必须 |
|
||||
| 毒麻药品 | 专柜存放,双人核对 | ✅必须 |
|
||||
|
||||
---
|
||||
|
||||
## 二、住院管理模块 (Inpatient)
|
||||
|
||||
### 2.1 住院登记 (Admission)
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 入院登记 | 患者信息录入,医保类型确认 | ✅必须 |
|
||||
| 床位管理 | 床位分配/转床/包床 | ✅必须 |
|
||||
| 押金管理 | 押金收取/补交/退押 | ✅必须 |
|
||||
| 预交金管理 | 预交金查询/催缴 | ✅必须 |
|
||||
| 出院登记 | 出院结算/出院带药 | ✅必须 |
|
||||
|
||||
### 2.2 住院医生工作站 (Inpatient Doctor)
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 入院记录 | 入院记录书写,24小时内完成 | ✅必须(电子病历≥4级) |
|
||||
| 病程记录 | 首次病程/日常病程/上级查房 | ✅必须 |
|
||||
| 医嘱开立 | 长期/临时医嘱,医嘱套餐 | ✅必须 |
|
||||
| 医嘱审核 | 护士审核/药师审核 | ✅必须 |
|
||||
| 手术申请 | 术前讨论/手术审批/手术安排 | ✅必须 |
|
||||
| 会诊申请 | 科内/科间/全院/院外会诊 | ✅必须 |
|
||||
| 输血申请 | 输血申请/输血反应记录 | ✅必须 |
|
||||
| 死亡记录 | 死亡病例讨论记录 | ✅必须 |
|
||||
| 知情同意 | 知情同意书电子签署 | ✅必须 |
|
||||
|
||||
### 2.3 住院护士工作站 (Nurse Station)
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 医嘱执行 | 医嘱审核/执行/停止 | ✅必须 |
|
||||
| 护理记录 | 生命体征/出入量/护理评估 | ✅必须 |
|
||||
| 体温单 | 电子体温单,自动绘制 | ✅必须(电子病历≥4级) |
|
||||
| 标本采集 | 标本采集/条码打印/送检 | ✅必须 |
|
||||
| 药品领取 | 病区药品领取/退药 | ✅必须 |
|
||||
| 费用录入 | 护士站记费/材料费 | ✅必须 |
|
||||
| 交接班 | 护士交接班记录 | ✅必须 |
|
||||
| 责任护理 | 责任护士分管患者 | ✅必须 |
|
||||
| 护理评估 | 入院评估/压疮评估/跌倒评估 | ✅必须 |
|
||||
|
||||
### 2.4 住院收费 (Inpatient Billing)
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 费用汇总 | 按类别/项目汇总 | ✅必须 |
|
||||
| 中途结算 | 住院中途结算 | ✅必须 |
|
||||
| 出院结算 | 出院总结算,多支付方式 | ✅必须 |
|
||||
| 医保结算 | 医保实时结算/手工报销 | ✅必须 |
|
||||
| 费用清单 | 每日费用清单/住院费用明细 | ✅必须 |
|
||||
| 费用审核 | 大额费用审核/异常费用提醒 | 推荐 |
|
||||
|
||||
---
|
||||
|
||||
## 三、药品管理模块 (Drug Management)
|
||||
|
||||
### 3.1 药品基础数据
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 药品目录 | 药品字典,国药准字/规格/厂家 | ✅必须 |
|
||||
| 药品分类 | 西药/中成药/中药饮片/外用/毒麻 | ✅必须 |
|
||||
| 基础代谢 | 给药途径/用药频次/疗程 | ✅必须 |
|
||||
| 供应商管理 | 药品供应商/资质证照管理 | ✅必须 |
|
||||
|
||||
### 3.2 药品采购
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 采购计划 | 科室请购/药房汇总/审批 | ✅必须 |
|
||||
| 采购订单 | 生成采购单/供应商确认 | ✅必须 |
|
||||
| 入库验收 | 到货验收/质量检查/入库 | ✅必须 |
|
||||
| 退货管理 | 质量问题退货 | ✅必须 |
|
||||
|
||||
### 3.3 药品库存
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 库存查询 | 实时库存/批号/效期 | ✅必须 |
|
||||
| 出入库管理 | 入库/出库/调拨/报损 | ✅必须 |
|
||||
| 盘点管理 | 定期盘点/盈亏处理 | ✅必须 |
|
||||
| 效期管理 | 近效期预警(3月/6月) | ✅必须 |
|
||||
| 高值耗材 | 高值耗材追溯管理 | ✅必须 |
|
||||
|
||||
---
|
||||
|
||||
## 四、检验检查模块 (Lab & PACS)
|
||||
|
||||
### 4.1 LIS 检验系统
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 申请接收 | 接收门诊/住院检验申请 | ✅必须 |
|
||||
| 标本采集 | 条码打印/采集确认 | ✅必须 |
|
||||
| 标本接收 | 标本签收/不合格退回 | ✅必须 |
|
||||
| 结果录入 | 仪器接口/手工录入/审核 | ✅必须 |
|
||||
| 危急值管理 | 危急值报告/处理/追踪 | ✅必须 |
|
||||
| 报告审核 | 初审/复审/修改 | ✅必须 |
|
||||
| 报告查询 | 历史报告对比 | ✅必须 |
|
||||
|
||||
### 4.2 PACS 影像系统
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 申请接收 | 接收检查申请 | ✅必须 |
|
||||
| 登记排队 | 检查登记/排队叫号 | ✅必须 |
|
||||
| 影像采集 | DICOM影像采集 | ✅必须 |
|
||||
| 报告书写 | 结构化报告/模板 | ✅必须 |
|
||||
| 影像浏览 | DICOM Viewer | ✅必须 |
|
||||
| 报告审核 | 书写/审核/修改 | ✅必须 |
|
||||
|
||||
---
|
||||
|
||||
## 五、运营监管模块 (Operations)
|
||||
|
||||
### 5.1 质控管理
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 病案质控 | 病案首页质控/运行病历质控 | ✅必须 |
|
||||
| 抗菌药物监测 | 使用率/使用强度/送检率 | ✅必须 |
|
||||
| DRGs/DIP监控 | 病组/费用/权重监控 | ✅必须 |
|
||||
| 合理用药 | 处方点评/用药监控 | ✅必须 |
|
||||
|
||||
### 5.2 统计分析
|
||||
| 功能 | 说明 | 三甲要求 |
|
||||
|---|---|---|
|
||||
| 门诊统计 | 门诊量/收入/科室统计 | ✅必须 |
|
||||
| 住院统计 | 出入院/床位使用率/均费 | ✅必须 |
|
||||
| 药品统计 | 药占比/基本药物比例 | ✅必须 |
|
||||
| 医保统计 | 医保费用/结算/对账 | ✅必须 |
|
||||
|
||||
---
|
||||
|
||||
## 六、电子病历评级要求 (EMR Level 4+)
|
||||
|
||||
三甲医院要求电子病历应用水平≥4级:
|
||||
|
||||
| 级别 | 要求 |
|
||||
|---|---|
|
||||
| 3级 | 医疗文书统一管理,关键信息可用 |
|
||||
| 4级 | 中级医疗决策支持,闭环管理 |
|
||||
| 5级 | 高级医疗决策支持,知识库 |
|
||||
| 6级 | 全流程医疗信息闭环 |
|
||||
| 7级 | 健康信息整合,区域协同 |
|
||||
|
||||
---
|
||||
|
||||
## 七、互联互通要求 (四级甲等)
|
||||
|
||||
| 要素 | 要求 |
|
||||
|---|---|
|
||||
| 数据集标准化 | HL7 FHIR / CDA 2.0 |
|
||||
| 术语标准化 | ICD-10 / SNOMED CT / LOINC |
|
||||
| 接口规范 | RESTful API / Web Service |
|
||||
| 数据交换 | 消息队列 / ESB |
|
||||
| 安全认证 | CA认证 / 电子签名 |
|
||||
@@ -1,128 +0,0 @@
|
||||
# 急诊分诊+抢救模块 — 深度设计文档
|
||||
|
||||
> **版本**: v1.0 | **编制日期**: 2026-06-07
|
||||
> **依据**: 《急诊科建设与管理指南》+ 《急诊预检分诊专家共识》
|
||||
|
||||
---
|
||||
|
||||
## 一、业务背景
|
||||
|
||||
急诊是三甲医院的关键科室,必须实现:
|
||||
- 四级预检分诊(Ⅰ级濒死/Ⅱ级危重/Ⅲ级急症/Ⅳ级非急)
|
||||
- 绿色通道(胸痛/卒中/创伤)
|
||||
- 抢救记录电子化
|
||||
- 急诊绿色通道时间监控(门-药/门-球囊/门-手术)
|
||||
|
||||
## 二、业务流程
|
||||
|
||||
```
|
||||
患者到达急诊
|
||||
↓
|
||||
[预检分诊台]
|
||||
├─ 采集生命体征(体温/脉搏/呼吸/血压/血氧/意识)
|
||||
├─ 评估病情分级
|
||||
└─ 分配就诊区域
|
||||
↓
|
||||
┌─ Ⅰ级(濒死) → 立即抢救 → 绿色通道
|
||||
├─ Ⅱ级(危重) → 10分钟内就诊
|
||||
├─ Ⅲ级(急症) → 30分钟内就诊
|
||||
└─ Ⅳ级(非急) → 引导至门诊
|
||||
↓
|
||||
[急诊医生接诊] ←→ [急诊医嘱]
|
||||
↓
|
||||
[检查/检验] ←→ [抢救/留观/住院/出院]
|
||||
↓
|
||||
[急诊病历] ←→ [急诊统计]
|
||||
```
|
||||
|
||||
## 三、数据模型
|
||||
|
||||
```sql
|
||||
-- 急诊分诊
|
||||
CREATE TABLE emergency_triage (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
patient_id BIGINT,
|
||||
patient_name VARCHAR(50),
|
||||
triage_level INT NOT NULL, -- 1-4级
|
||||
chief_complaint TEXT,
|
||||
temperature DECIMAL(4,1),
|
||||
pulse INT,
|
||||
respiration INT,
|
||||
systolic_bp INT,
|
||||
diastolic_bp INT,
|
||||
spo2 INT,
|
||||
consciousness VARCHAR(20),
|
||||
triage_nurse VARCHAR(64),
|
||||
triage_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
area VARCHAR(20), -- RESUS/EMERGENCY/OBSERVATION/GREEN
|
||||
status VARCHAR(20) DEFAULT 'WAITING',
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
is_deleted INT NOT NULL DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 抢救记录
|
||||
CREATE TABLE emergency_rescue (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
patient_id BIGINT NOT NULL,
|
||||
triage_id BIGINT,
|
||||
rescue_start TIMESTAMP,
|
||||
rescue_end TIMESTAMP,
|
||||
rescue_result VARCHAR(20),
|
||||
chief_doctor VARCHAR(64),
|
||||
rescue_team TEXT,
|
||||
procedures TEXT,
|
||||
medications TEXT,
|
||||
outcome VARCHAR(20), -- ADMITTED/DISCHARGED/TRANSFERRED/DECEASED
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
is_deleted INT NOT NULL DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 留观记录
|
||||
CREATE TABLE emergency_observation (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
patient_id BIGINT NOT NULL,
|
||||
triage_id BIGINT,
|
||||
observation_start TIMESTAMP,
|
||||
observation_end TIMESTAMP,
|
||||
bed_no VARCHAR(20),
|
||||
doctor VARCHAR(64),
|
||||
diagnosis TEXT,
|
||||
disposition VARCHAR(20), -- ADMITTED/DISCHARGED/TRANSFERRED
|
||||
observation_hours INT,
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
is_deleted INT NOT NULL DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 绿色通道
|
||||
CREATE TABLE emergency_green_channel (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
patient_id BIGINT NOT NULL,
|
||||
disease_type VARCHAR(30), -- CHEST_PAIN/STROKE/TRAUMA/POISONING
|
||||
door_to_treatment_time INT, -- 门到治疗时间(分钟)
|
||||
target_time INT, -- 目标时间
|
||||
is_achieved BOOLEAN,
|
||||
doctor VARCHAR(64),
|
||||
activate_time TIMESTAMP,
|
||||
complete_time TIMESTAMP,
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
is_deleted INT NOT NULL DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
## 四、接口设计
|
||||
|
||||
| API | 方法 | 说明 |
|
||||
|-----|------|------|
|
||||
| /emergency/triage/add | POST | 预检分诊 |
|
||||
| /emergency/triage/queue | GET | 分诊队列(按级别排序) |
|
||||
| /emergency/rescue/add | POST | 开始抢救 |
|
||||
| /emergency/rescue/complete/{id} | PUT | 抢救完成 |
|
||||
| /emergency/observation/add | POST | 留观登记 |
|
||||
| /emergency/observation/discharge/{id} | PUT | 留观出院 |
|
||||
| /emergency/green-channel/activate | POST | 启动绿色通道 |
|
||||
| /emergency/green-channel/stats | GET | 绿色通道统计(达标率) |
|
||||
| /emergency/stats | GET | 急诊统计(分级分布/抢救率/等候时间) |
|
||||
@@ -1,195 +0,0 @@
|
||||
# 门诊随访管理模块 — 深度设计文档
|
||||
|
||||
> **版本**: v1.0 | **编制日期**: 2026-06-07
|
||||
> **依据**: 《三级医院评审标准》患者服务条款 + 慢病管理规范
|
||||
|
||||
---
|
||||
|
||||
## 一、业务背景
|
||||
|
||||
门诊随访是三甲医院患者服务的核心环节:
|
||||
- 慢病患者(高血压/糖尿病/冠心病等)出院后需定期随访
|
||||
- 手术患者术后需随访恢复情况
|
||||
- 肿瘤患者需长期随访复发/转移
|
||||
- 满意度调查是医院服务质量的核心指标
|
||||
|
||||
## 二、业务流程
|
||||
|
||||
### 2.1 随访计划生成
|
||||
```
|
||||
出院/门诊结束
|
||||
↓
|
||||
[自动触发] ← 根据病种+诊断自动生成随访计划
|
||||
↓ (规则引擎)
|
||||
┌─ 高血压: 每月1次电话随访, 持续1年
|
||||
├─ 糖尿病: 每2周1次, 持续6个月
|
||||
├─ 手术后: 术后1周/1月/3月/6月/1年
|
||||
├─ 肿瘤: 每3个月复查, 持续5年
|
||||
└─ 普通: 出院后1周电话随访1次
|
||||
↓
|
||||
[分配责任人] ← 根据科室+医生自动分配
|
||||
```
|
||||
|
||||
### 2.2 随访执行
|
||||
```
|
||||
[随访任务列表] ← 责任医生/护士查看今日任务
|
||||
↓
|
||||
[选择联系方式] ← 电话/短信/微信/门诊
|
||||
↓
|
||||
[拨打电话/发送短信]
|
||||
↓
|
||||
[录入随访结果]
|
||||
├─ 患者情况良好 → 标记完成
|
||||
├─ 有异常症状 → 创建复查预约
|
||||
├─ 需要调药 → 转诊门诊
|
||||
└─ 失访 → 标记失访原因
|
||||
↓
|
||||
[更新随访记录]
|
||||
```
|
||||
|
||||
### 2.3 满意度调查
|
||||
```
|
||||
[出院时] → 发放满意度问卷(纸质/电子)
|
||||
↓
|
||||
[患者填写] → 评分+建议
|
||||
↓
|
||||
[数据汇总] → 按科室/医生统计
|
||||
↓
|
||||
[问题整改] → 质量改进措施
|
||||
```
|
||||
|
||||
## 三、数据模型
|
||||
|
||||
### 3.1 核心表
|
||||
|
||||
```sql
|
||||
-- 随访计划
|
||||
CREATE TABLE followup_plan (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
patient_id BIGINT NOT NULL,
|
||||
patient_name VARCHAR(50),
|
||||
encounter_id BIGINT,
|
||||
disease_code VARCHAR(20),
|
||||
disease_name VARCHAR(100),
|
||||
followup_type VARCHAR(20) NOT NULL, -- PHONE/SMS/WECHAT/OUTPATIENT
|
||||
frequency VARCHAR(20), -- DAILY/WEEKLY/MONTHLY/QUARTERLY
|
||||
total_times INT DEFAULT 1,
|
||||
completed_times INT DEFAULT 0,
|
||||
responsible_doctor VARCHAR(64),
|
||||
responsible_nurse VARCHAR(64),
|
||||
start_date DATE,
|
||||
end_date DATE,
|
||||
status VARCHAR(20) DEFAULT 'ACTIVE', -- ACTIVE/COMPLETED/CANCELLED
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
is_deleted INT NOT NULL DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 随访任务
|
||||
CREATE TABLE followup_task (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
plan_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
patient_name VARCHAR(50),
|
||||
phone VARCHAR(20),
|
||||
scheduled_date DATE NOT NULL,
|
||||
actual_date DATE,
|
||||
contact_method VARCHAR(20),
|
||||
operator_name VARCHAR(64),
|
||||
result VARCHAR(20), -- SUCCESS/FAILED/NO_ANSWER/WRONG_NUMBER/LOST
|
||||
abnormal_flag BOOLEAN DEFAULT FALSE,
|
||||
next_action VARCHAR(200),
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
is_deleted INT NOT NULL DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 随访记录
|
||||
CREATE TABLE followup_record (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
task_id BIGINT NOT NULL,
|
||||
patient_id BIGINT NOT NULL,
|
||||
contact_content TEXT,
|
||||
patient_condition TEXT,
|
||||
medication_compliance VARCHAR(20),
|
||||
symptoms TEXT,
|
||||
vital_signs JSONB,
|
||||
reappointment_flag BOOLEAN DEFAULT FALSE,
|
||||
reappointment_date DATE,
|
||||
transfer_flag BOOLEAN DEFAULT FALSE,
|
||||
transfer_reason TEXT,
|
||||
operator_name VARCHAR(64),
|
||||
operate_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 满意度调查
|
||||
CREATE TABLE satisfaction_survey (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
patient_id BIGINT,
|
||||
patient_name VARCHAR(50),
|
||||
survey_type VARCHAR(20) NOT NULL, -- INPATIENT/OUTPATIENT/EMERGENCY
|
||||
department_name VARCHAR(100),
|
||||
doctor_name VARCHAR(64),
|
||||
overall_score INT,
|
||||
service_score INT,
|
||||
environment_score INT,
|
||||
suggestions TEXT,
|
||||
survey_date DATE DEFAULT CURRENT_DATE,
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 投诉记录
|
||||
CREATE TABLE complaint_record (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
patient_id BIGINT,
|
||||
patient_name VARCHAR(50),
|
||||
complaint_type VARCHAR(30) NOT NULL, -- SERVICE/TECHNIQUE/ENVIRONMENT/BILLING/OTHER
|
||||
complaint_content TEXT NOT NULL,
|
||||
department_name VARCHAR(100),
|
||||
handler VARCHAR(64),
|
||||
handle_result TEXT,
|
||||
handle_time TIMESTAMP,
|
||||
status VARCHAR(20) DEFAULT 'PENDING', -- PENDING/PROCESSING/RESOLVED/CLOSED
|
||||
satisfaction_after INT,
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
### 3.2 接口设计
|
||||
|
||||
| API | 方法 | 说明 | 参数 |
|
||||
|-----|------|------|------|
|
||||
| /followup/plan/page | GET | 随访计划列表 | patientName,status,pageNo,pageSize |
|
||||
| /followup/plan/add | POST | 新建随访计划 | patientId,diseaseCode,frequency,totalTimes |
|
||||
| /followup/task/my | GET | 我的今日任务 | operatorName |
|
||||
| /followup/task/page | GET | 任务列表(分页) | status,scheduledDate,pageNo,pageSize |
|
||||
| /followup/task/complete/{id} | PUT | 完成任务 | result,abnormalFlag,nextAction |
|
||||
| /followup/record/add | POST | 录入随访记录 | taskId,contactContent,patientCondition |
|
||||
| /followup/survey/add | POST | 提交满意度 | surveyType,overallScore,suggestions |
|
||||
| /followup/survey/stats | GET | 满意度统计 | departmentName,startDate,endDate |
|
||||
| /followup/complaint/page | GET | 投诉列表 | status,complaintType,pageNo,pageSize |
|
||||
| /followup/complaint/handle/{id} | PUT | 处理投诉 | handler,handleResult |
|
||||
| /followup/stats/overview | GET | 随访概览 | startDate,endDate |
|
||||
|
||||
## 四、前端页面设计
|
||||
|
||||
### 4.1 页面结构
|
||||
```
|
||||
followup/
|
||||
├── plan/ # 随访计划管理
|
||||
├── task/ # 随访任务(今日任务/我的任务)
|
||||
├── record/ # 随访记录查询
|
||||
├── survey/ # 满意度调查
|
||||
├── complaint/ # 投诉管理
|
||||
└── stats/ # 统计分析
|
||||
```
|
||||
|
||||
### 4.2 核心交互
|
||||
- **今日任务看板**: 按优先级排序(异常>待随访>已完成)
|
||||
- **一键拨号**: 点击患者电话直接拨打(集成HIS电话模块)
|
||||
- **随访结果快速录入**: 预设选项+自由文本
|
||||
- **满意度雷达图**: 多维度评分可视化
|
||||
@@ -1,142 +0,0 @@
|
||||
# 病理管理模块 — 深度设计文档
|
||||
|
||||
> **版本**: v1.0 | **编制日期**: 2026-06-07
|
||||
> **依据**: 《病理科建设与管理指南》+ 《临床病理质量控制标准》
|
||||
|
||||
---
|
||||
|
||||
## 一、业务背景
|
||||
|
||||
病理诊断是手术后诊断的"金标准",三甲医院必须具备:
|
||||
- 病理标本全流程追溯(从手术室到病理科)
|
||||
- 三级审核制度(住院医师→主治→副主任)
|
||||
- 病理报告质量控制
|
||||
- 肿瘤登记上报
|
||||
|
||||
## 二、业务流程
|
||||
|
||||
```
|
||||
[手术/活检/穿刺] → 病理申请单
|
||||
↓
|
||||
[标本采集] ←→ [条码打印] ←→ [标本固定(10%福尔马林)]
|
||||
↓ (运送至病理科)
|
||||
[标本接收] ←→ [标本核对(条码扫码)]
|
||||
↓ (不合格退回)
|
||||
[取材描述] ←→ [组织处理(脱水/包埋)]
|
||||
↓
|
||||
[切片制作] ←→ [染色(HE/免疫组化/特殊染色)]
|
||||
↓
|
||||
[初诊阅片] ←→ [上级医师审核]
|
||||
↓ (疑难病例会诊)
|
||||
[病理会诊] ←→ [最终诊断]
|
||||
↓
|
||||
[报告编写] ←→ [三级审核]
|
||||
↓
|
||||
[报告签发] ←→ [临床科室领取]
|
||||
↓
|
||||
[肿瘤登记] ←→ [随访]
|
||||
```
|
||||
|
||||
## 三、数据模型
|
||||
|
||||
```sql
|
||||
-- 病理申请
|
||||
CREATE TABLE pathology_order (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
patient_id BIGINT NOT NULL,
|
||||
patient_name VARCHAR(50),
|
||||
encounter_id BIGINT,
|
||||
specimen_type VARCHAR(50), -- 手术标本/活检/穿刺/细胞学
|
||||
clinical_diagnosis TEXT,
|
||||
sample_site VARCHAR(100),
|
||||
urgency VARCHAR(20) DEFAULT 'NORMAL', -- URGENT/NORMAL
|
||||
order_status VARCHAR(20) DEFAULT 'PENDING',
|
||||
apply_doctor VARCHAR(64),
|
||||
apply_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
is_deleted INT NOT NULL DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 病理标本
|
||||
CREATE TABLE pathology_specimen (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
order_id BIGINT NOT NULL,
|
||||
barcode VARCHAR(100) NOT NULL,
|
||||
specimen_desc TEXT,
|
||||
collection_site VARCHAR(100),
|
||||
fixative VARCHAR(50),
|
||||
fixative_time TIMESTAMP,
|
||||
receive_time TIMESTAMP,
|
||||
receiver VARCHAR(64),
|
||||
is_qualified BOOLEAN DEFAULT TRUE,
|
||||
reject_reason TEXT,
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
is_deleted INT NOT NULL DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 病理处理
|
||||
CREATE TABLE pathology_process (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
specimen_id BIGINT NOT NULL,
|
||||
process_type VARCHAR(30), -- 取材/脱水/包埋/切片/染色/免疫组化
|
||||
process_desc TEXT,
|
||||
operator VARCHAR(64),
|
||||
operate_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 病理诊断
|
||||
CREATE TABLE pathology_diagnosis (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
order_id BIGINT NOT NULL,
|
||||
specimen_id BIGINT,
|
||||
diagnosis_type VARCHAR(30), -- 初诊/复诊/会诊/最终
|
||||
diagnosis_result TEXT,
|
||||
immunostain_result TEXT,
|
||||
doctor_name VARCHAR(64),
|
||||
doctor_title VARCHAR(20),
|
||||
diagnose_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 病理报告
|
||||
CREATE TABLE pathology_report (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
order_id BIGINT NOT NULL,
|
||||
patient_id BIGINT,
|
||||
specimen_desc TEXT,
|
||||
macroscopic_desc TEXT, -- 肉眼所见
|
||||
microscopic_desc TEXT, -- 镜下所见
|
||||
diagnosis_result TEXT, -- 病理诊断
|
||||
suggestion TEXT,
|
||||
report_doctor VARCHAR(64),
|
||||
report_time TIMESTAMP,
|
||||
audit_doctor VARCHAR(64),
|
||||
audit_time TIMESTAMP,
|
||||
final_doctor VARCHAR(64),
|
||||
final_time TIMESTAMP,
|
||||
status VARCHAR(20) DEFAULT 'DRAFT',
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
is_deleted INT NOT NULL DEFAULT 0,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
```
|
||||
|
||||
## 四、接口设计
|
||||
|
||||
| API | 方法 | 说明 |
|
||||
|-----|------|------|
|
||||
| /pathology/order/page | GET | 病理申请列表 |
|
||||
| /pathology/order/add | POST | 新建病理申请 |
|
||||
| /pathology/specimen/scan | POST | 标本扫码接收 |
|
||||
| /pathology/specimen/reject/{id} | PUT | 标本拒收 |
|
||||
| /pathology/process/record | POST | 记录处理过程 |
|
||||
| /pathology/diagnosis/add | POST | 录入诊断 |
|
||||
| /pathology/report/page | GET | 病理报告列表 |
|
||||
| /pathology/report/add | POST | 新建报告 |
|
||||
| /pathology/report/audit/{id} | PUT | 审核报告 |
|
||||
| /pathology/stats | GET | 病理统计(标本数/诊断分布/周转时间) |
|
||||
@@ -1,128 +0,0 @@
|
||||
# Bug #439 分析报告
|
||||
|
||||
> **文档类型**: Bug修复
|
||||
> **适用范围**: Bug 439
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: 2026-06-06
|
||||
> **最后更新**: 2026-06-06
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Bug描述
|
||||
领用出库:选择领用药品后"总库存数量"列数据未显示
|
||||
|
||||
## 数据流分析
|
||||
|
||||
1. 用户点击"添加行" → 新增一行,totalQuantity 初始化为空字符串 ''
|
||||
2. 用户在"项目"列通过 PopoverList 选择药品 → 触发 `selectRow(rowValue, index)`
|
||||
3. `selectRow` 设置药品基本信息,然后调用 `handleLocationClick(1, rowValue, index)`
|
||||
4. `handleLocationClick` 调用 `getCount({ itemId, orgLocationId })` 获取库存
|
||||
5. `getCount` 返回 LocationInventoryDto[] 列表,前端通过 `pickBestOrgQuantityRow` 选最大值
|
||||
6. `applyFromDto` 设置 `r.totalQuantity = d.orgQuantity || 0`
|
||||
|
||||
## 根因定位
|
||||
|
||||
在 `selectRow` 函数中(第1022-1049行),选择药品后:
|
||||
```javascript
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
```
|
||||
|
||||
但后端 `/app-common/inventory-item` 接口返回的 `unitList` 只设置了 `unitCode` 和 `minUnitCode`,**没有设置 `unitCode_dictText` 和 `minUnitCode_dictText`**。
|
||||
|
||||
在 `handleLocationClick` → `applyFromDto` 中(第1099-1121行):
|
||||
```javascript
|
||||
r.unitCode = r.unitList.minUnitCode;
|
||||
r.unitCode_dictText = r.unitList.minUnitCode_dictText; // ← undefined!
|
||||
if (r.unitCode == r.unitList.minUnitCode) { // ← 这个条件始终为 true
|
||||
r.price = d.price / r.partPercent || '';
|
||||
r.price = r.price.toFixed(4);
|
||||
}
|
||||
```
|
||||
|
||||
关键问题:`r.unitCode` 刚被设为 `r.unitList.minUnitCode`,然后条件 `r.unitCode == r.unitList.minUnitCode` 始终为 true,
|
||||
导致即使价格很小(如 0.05/1=0.05),也会进入这个分支。
|
||||
|
||||
但这不是总库存数量未显示的根本原因。
|
||||
|
||||
**真正根因:`handleLocationClick` 函数在调用 `getCount` 获取库存数据后,`applyFromDto` 中 `r.totalQuantity = d.orgQuantity || 0` 的赋值逻辑依赖 `d.orgQuantity > 0` 的前置判断。**
|
||||
|
||||
查看前端代码流程:
|
||||
- `selectRow` 设置 `totalQuantity: ''`(新增行时的默认值)
|
||||
- 然后调用 `handleLocationClick` → `getCount` → 后端返回数据
|
||||
- `pickBestOrgQuantityRow` 从返回列表中选出 orgQuantity 最大的记录
|
||||
- 如果 `d && Number(d.orgQuantity ?? 0) > 0` → 调用 `applyFromDto` → 设置 `r.totalQuantity = d.orgQuantity || 0`
|
||||
- 如果条件不满足(所有记录 orgQuantity 都为 0 或返回空列表)→ **`applyFromDto` 不被调用** → `r.totalQuantity` 保持空字符串 ''
|
||||
|
||||
进一步分析发现:
|
||||
- 如果后端 `getCount` 返回空列表(该药品在该仓库无库存),`d` 为 null,`applyFromDto` 不会被调用
|
||||
- 但如果该药品在仓库确实有库存,问题可能出在前端数据传递上
|
||||
|
||||
**核心问题在于 `unitList` 结构不完整:**
|
||||
`selectRow` 中 `rowValue.unitList` 来自药品列表查询结果,其 `unitList` 由后端 `CommonServiceImpl.getInventoryItemList` 构建,
|
||||
只包含 `unitCode` 和 `minUnitCode`,缺少 `unitCode_dictText` 和 `minUnitCode_dictText`。
|
||||
|
||||
在 `handleLocationClick` 的 `applyFromDto` 中,`r.unitCode` 和 `r.unitCode_dictText` 的赋值依赖于 `unitList` 中的字段。
|
||||
如果 `r.unitList` 是从 `rowValue.unitList[0]` 赋值而来(在 `selectRow` 中),那它应该至少有 `unitCode` 和 `minUnitCode`。
|
||||
|
||||
**但是!** 编辑模式(`getTransferProductDetails`)中,`unitList` 的构建方式不同:
|
||||
```javascript
|
||||
form.purchaseinventoryList[index].unitList = e.unitList[0]; // 编辑详情时
|
||||
```
|
||||
|
||||
新增模式(`selectRow`)中:
|
||||
```javascript
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
```
|
||||
|
||||
两种方式获取的 `unitList` 结构可能不同。
|
||||
|
||||
**根本原因:**
|
||||
`handleLocationClick` 中的 `getCount` API 调用,返回的 `LocationInventoryDto` 确实包含 `orgQuantity`。
|
||||
前端通过 `pickBestOrgQuantityRow` 选出最大值的记录后,调用 `applyFromDto` 设置 `totalQuantity`。
|
||||
如果药品在仓库有库存但 `totalQuantity` 仍为空白,说明 `applyFromDto` 中的 `d.orgQuantity` 可能为 `null`/`undefined`。
|
||||
|
||||
经检查 `selectInventoryItemInfo` SQL:
|
||||
```sql
|
||||
SUM(CASE WHEN T1.location_id = #{orgLocationId} THEN T1.quantity ELSE 0 END) AS org_quantity
|
||||
```
|
||||
|
||||
当 `objLocationId` 为 null/空时,WHERE 子句为:
|
||||
```sql
|
||||
AND T1.location_id = #{orgLocationId}
|
||||
```
|
||||
|
||||
这意味着查询结果中的所有记录都来自 `orgLocationId` 对应的仓库。
|
||||
此时 `org_quantity` 应该等于 `SUM(T1.quantity)`。
|
||||
|
||||
**如果查询结果为空(该药品在该仓库没有库存记录),则前端 `d` 为 null,`applyFromDto` 不被调用,totalQuantity 保持空字符串。**
|
||||
|
||||
但 Bug 的期望是"应实时检索并填充总库存数量"——如果仓库确实没有该药品的库存,那显示空白是合理的。
|
||||
但如果仓库有库存却未显示,说明前端传递的参数(orgLocationId 或 itemId)有问题。
|
||||
|
||||
**最终根因:前端 `handleLocationClick` 函数中,`orgLocationId` 的取值可能为空字符串,**
|
||||
**导致后端查询时使用空字符串作为 location_id 条件,查不到任何记录。**
|
||||
|
||||
```javascript
|
||||
let orgLocationId = r.sourceLocationId || receiptHeaderForm.headerLocationId || '';
|
||||
```
|
||||
|
||||
虽然 Bug 步骤中说先选了"西药库",但如果 `receiptHeaderForm.headerLocationId` 在 selectRow 时已正确设置,
|
||||
`r.sourceLocationId` 也应该被设置(在 selectRow 第1037行):
|
||||
```javascript
|
||||
form.purchaseinventoryList[index].sourceLocationId =
|
||||
receiptHeaderForm.headerLocationId || form.purchaseinventoryList[index].sourceLocationId || '';
|
||||
```
|
||||
|
||||
**但这里有一个微妙的时序问题:`handleLocationClick` 在 `getPharmacyCabinetList().then()` 内部被调用,**
|
||||
**但 `handleLocationClick` 是同步执行的,不等待 `getPharmacyCabinetList` 完成。**
|
||||
**这本身不影响 `orgLocationId` 的取值,因为 `orgLocationId` 不依赖 `getPharmacyCabinetList`。**
|
||||
|
||||
## 修复方案
|
||||
|
||||
1. 确保 `applyFromDto` 即使在 `orgQuantity` 为 0 时也能被调用,正确显示"0"而不是空白
|
||||
2. 确保 `unitList` 包含必要的字典文本字段
|
||||
|
||||
## 影响范围
|
||||
- 前端文件:healthlink-his-ui/src/views/medicationmanagement/requisitionManagement/requisitionManagement/index.vue
|
||||
- 涉及函数:`selectRow`、`handleLocationClick`
|
||||
@@ -1,53 +0,0 @@
|
||||
# Bug #462 分析报告
|
||||
|
||||
> **文档类型**: Bug修复
|
||||
> **适用范围**: Bug 462
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: 2026-06-06
|
||||
> **最后更新**: 2026-06-06
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Bug 描述
|
||||
[目录管理-诊疗目录] 编辑弹窗中"所需标本"下拉框数据加载失败,显示为"无数据"
|
||||
|
||||
## 根因分析
|
||||
|
||||
### 数据流追踪
|
||||
1. 前端组件 `diagnosisTreatmentDialog.vue` 第168-178行渲染"所需标本"下拉框
|
||||
2. 下拉框选项来自 `specimen_code` 变量(第172行 `v-for="category in specimen_code"`)
|
||||
3. `specimen_code` 通过 `proxy.useDict('specimen_code', ...)` 加载(第378-386行)
|
||||
4. `useDict` 调用 API `/system/dict/data/type/specimen_code`(`src/utils/dict.js` 第16行)
|
||||
5. 后端 `SysDictDataController.dictType()` 处理请求(第65-73行,**无权限校验**)
|
||||
6. 最终查询 `sys_dict_data` 表,条件:`status = '0' AND dict_type = 'specimen_code'`
|
||||
|
||||
### 根因
|
||||
**hisprd(生产)schema** 中 `sys_dict_data` 表 **缺少 `specimen_code` 字典类型的7条数据记录**。
|
||||
|
||||
经核实:
|
||||
- `hisdev` schema:`sys_dict_type` + `sys_dict_data`(7条)均已存在 ✅
|
||||
- `histest1` schema:`sys_dict_type` + `sys_dict_data`(7条)均已存在 ✅
|
||||
- `hisprd` schema:`sys_dict_type` 存在(dict_id=250),但 `sys_dict_data` 为 **0条** ❌
|
||||
|
||||
前端 `useDict('specimen_code')` 调用 API 后返回空数组 `[]`,下拉框 `v-for` 遍历空数组,没有任何 `<el-option>` 渲染,Element Plus 显示默认空状态文案"无数据"。
|
||||
|
||||
**与 Bug #433 对比**:Bug #433 是"麻醉方法回显为代码"和"外请专家姓名数据未加载",根因也是字典数据缺失。本次 Bug #462 属于同类问题——字典类型已创建但生产环境的数据记录未同步插入。
|
||||
|
||||
## 影响范围
|
||||
- **前端文件**:`healthlink-his-ui/src/views/catalog/diagnosistreatment/components/diagnosisTreatmentDialog.vue`(仅一处引用)
|
||||
- **后端文件**:无代码变更,纯数据问题
|
||||
- **数据库表**:`hisprd.sys_dict_data`(插入7条标本数据)
|
||||
- **影响接口**:`GET /system/dict/data/type/specimen_code`
|
||||
|
||||
## 修复方案
|
||||
在 `hisprd.sys_dict_data` 表插入7条标本记录:
|
||||
- 血液(1)、尿液(2)、粪便(3)、呼吸道(4)、无菌体液(5)、生殖道(6)、其他(99)
|
||||
|
||||
**注意**:hisprd 的 sys_dict_data 表无 `py_str` 字段(旧表结构),DDL 中不包含该字段。
|
||||
|
||||
## 验证计划
|
||||
1. 确认 hisprd 中 `sys_dict_data` 存在7条 `specimen_code` 数据(status='0')✅ 已验证
|
||||
2. 重启后端服务(刷新字典缓存)
|
||||
3. 前端进入诊疗目录编辑弹窗,点击"所需标本"下拉框,应显示7条标本选项
|
||||
4. 选择任意标本后保存,再次编辑应正确回显已选标本
|
||||
@@ -1,112 +0,0 @@
|
||||
# Bug #494 分析报告
|
||||
|
||||
> **文档类型**: Bug修复
|
||||
> **适用范围**: Bug 494
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: 2026-06-06
|
||||
> **最后更新**: 2026-06-06
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Bug 描述
|
||||
住院医生工作站-检查申请:"申请单名称"字段显示为通用名称"检查申请单",未展示具体检查项目名称。
|
||||
|
||||
## 代码分析
|
||||
|
||||
### 数据流
|
||||
|
||||
1. **保存时**(medicalExaminations.vue → saveCheckd → RequestFormManageAppServiceImpl.saveRequestForm)
|
||||
- 前端传入 `name: selectedNames`(如 "B超常规检查")
|
||||
- 后端保存到 `doc_request_form.name` 字段 ✅
|
||||
|
||||
2. **查询时**(RequestFormManageAppMapper.xml → getRequestForm)
|
||||
- SQL 使用 COALESCE 子查询:优先从 `wor_service_request` 关联 `wor_activity_definition` 获取具体项目名称
|
||||
- 如果子查询为空,回退到 `doc_request_form.name` 字段 ✅
|
||||
|
||||
3. **详情查询**(RequestFormManageAppMapper.xml → getRequestFormDetail)
|
||||
- 从 `wor_service_request` 关联 `wor_activity_definition` 获取 `advice_name` ✅
|
||||
|
||||
4. **前端展示**(examineApplication.vue → buildApplicationName)
|
||||
- 优先使用 `requestFormDetailList[0].adviceName`
|
||||
- 回退到 `row.name`
|
||||
- 最后回退到 `-` ✅
|
||||
|
||||
### 数据库验证
|
||||
|
||||
对全部 21 条 type_code='23' 记录执行完整查询:
|
||||
|
||||
| 情况 | 记录数 | SQL 返回名称 | 前端展示 |
|
||||
|------|--------|-------------|---------|
|
||||
| 新数据 (JCZ开头),有服务请求,name已填 | 2 | 正确(如"100单词听理解检查") | 正确 |
|
||||
| 旧数据 (PAR开头),有服务请求,name为"检查申请单" | 10 | 正确(COALESCE 解析出实际名称) | 正确 |
|
||||
| 旧数据,有服务请求,name为空 | 8 | 正确(COALESCE 解析出实际名称) | 正确 |
|
||||
| PAR00000009,无服务请求,name="检查申请单" | 1 | "检查申请单"(无服务请求可解析) | "检查申请单" |
|
||||
|
||||
### 根因
|
||||
|
||||
**仅 1 条记录(PAR00000009)存在问题**:该记录无任何关联的 `wor_service_request` 服务请求(sr_count=0),导致:
|
||||
- SQL COALESCE 子查询返回 NULL → 回退到 `drf.name` = "检查申请单"
|
||||
- 详情查询返回空列表 → `buildApplicationName` 回退到 `row.name` = "检查申请单"
|
||||
|
||||
这条记录以 PAR 开头(非 JCZ),是通过非标准路径创建的脏数据,缺少关联的服务请求记录。
|
||||
|
||||
**其余 20 条记录(95%)的 SQL COALESCE 已正确解析出具体项目名称**。
|
||||
|
||||
### 修复方案
|
||||
|
||||
对于**无服务请求的孤儿申请单**,前端 `buildApplicationName` 函数已正确回退到 `row.name`。问题在于:
|
||||
1. `row.name` 存储的是通用名称 "检查申请单"
|
||||
2. 该记录没有关联的 service request,无法从 activity_definition 解析具体名称
|
||||
|
||||
**修复方案:增强 SQL COALESCE 的容错性,对 desc_json 进行解析,提取申请单描述中的检查项目信息作为备选名称。**
|
||||
|
||||
但这不现实——desc_json 只包含表单字段(症状、体征等),不包含项目名称。
|
||||
|
||||
**更合理的修复:确保保存时 name 字段始终填入具体项目名称。**
|
||||
|
||||
检查 `medicalExaminations.vue` 的 submit 方法:
|
||||
```js
|
||||
const selectedNames = applicationListAllFilter.map(item => item.adviceName).join('+');
|
||||
```
|
||||
|
||||
前端传入的 name 是用 `+` 拼接的多个项目名称。这个值被保存到 `doc_request_form.name`。
|
||||
|
||||
SQL COALESCE 子查询使用 `STRING_AGG(DISTINCT wad.name, '、')`,用 `、` 分隔。
|
||||
|
||||
**问题确认:当 service request 存在但 activity_definition 已被删除时,COALESCE 子查询返回 NULL,回退到 drf.name。但 drf.name 可能为空或为"检查申请单"(旧数据)。**
|
||||
|
||||
对于这种 edge case,**应该增强 SQL 容错**:当 `drf.name` 也为空或通用名称时,显示更友好的默认文本。
|
||||
|
||||
不过,**当前代码对绝大多数场景已经正确工作**。唯一显示"检查申请单"的是 PAR00000009 这条孤儿数据。
|
||||
|
||||
## 修复计划
|
||||
|
||||
增强前端 `buildApplicationName` 函数的容错性:
|
||||
- 当 detailList 为空时,检查 `row.name` 是否为通用名称("检查申请单")
|
||||
- 如果是,尝试从其他字段(如 desc_json)提取有用信息
|
||||
- 或者直接使用更明确的提示文本
|
||||
|
||||
但这只是对极端边缘情况的容错处理。根本问题是 PAR00000009 这条脏数据。
|
||||
|
||||
## 修复结果:✅ 已成功修复(commit fd9309f1)
|
||||
|
||||
### 修复内容(3处改动,30行)
|
||||
|
||||
1. **后端 SQL(RequestFormManageAppMapper.xml)**
|
||||
- 原:`drf.NAME` 直接取存储的名称
|
||||
- 改:`COALESCE((SELECT STRING_AGG(DISTINCT wad.name, '、') FROM wor_service_request LEFT JOIN wor_activity_definition ...), drf.name)`
|
||||
- 效果:优先从服务请求关联的诊疗定义中动态解析具体项目名称,回退到存储名称
|
||||
|
||||
2. **前端展示(examineApplication.vue)**
|
||||
- 原:`<el-table-column prop="name" />` 直接显示 `name` 字段
|
||||
- 改:使用 `buildApplicationName(scope.row)` 函数,优先使用 `requestFormDetailList[0].adviceName`
|
||||
|
||||
3. **前端提交(medicalExaminations.vue)**
|
||||
- 增加 `adviceName: item.adviceName` 到提交数据中,确保后端能正确关联项目名称
|
||||
|
||||
### 数据库验证结果
|
||||
|
||||
全部 21 条 type_code='23' 记录中:
|
||||
- 20 条(95%)SQL 正确返回具体项目名称(如 "B超常规检查"、"100单词听理解检查")
|
||||
- 1 条(PAR00000009)无关联服务请求(孤儿数据),回退显示 "检查申请单"(符合预期)
|
||||
@@ -1,87 +0,0 @@
|
||||
# Bug #498 分析报告
|
||||
|
||||
> **文档类型**: Bug修复
|
||||
> **适用范围**: Bug 498
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: 2026-06-06
|
||||
> **最后更新**: 2026-06-06
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Bug 描述
|
||||
【住院医生工作站-检查申请】检查申请列表操作项过于单一,缺失修改/作废/打印/看报告等核心临床操作
|
||||
|
||||
## 阶段1:深度分析
|
||||
|
||||
### 当前代码状态
|
||||
`examineApplication.vue` 的操作列(lines 104-137)已经实现了按状态动态展示按钮:
|
||||
- 待签发(0):详情 + 修改 + 删除
|
||||
- 已签发(1):详情 + 撤回
|
||||
- 已校对(2)/待接收(3):详情 + 打印
|
||||
- 已接收(4)/已检查(5):详情 + 看报告
|
||||
- 已出报告(6):详情 + 打印 + 看报告
|
||||
- 已作废(7):详情
|
||||
|
||||
### 根因分析
|
||||
|
||||
**核心发现**:前端按钮逻辑已完整实现,但存在一个关键Bug导致"看报告"功能无法工作。
|
||||
|
||||
#### Bug:`handleViewReport` 传递错误的参数
|
||||
|
||||
前端代码 (examineApplication.vue:920):
|
||||
```js
|
||||
const res = await getTestResult({ prescriptionNo: row.prescriptionNo });
|
||||
```
|
||||
|
||||
后端接口 (DoctorStationAdviceController.java:190-192):
|
||||
```java
|
||||
@GetMapping(value = "/test-result")
|
||||
public R<?> getTestResult(@RequestParam(value = "encounterId") Long encounterId) {
|
||||
return iDoctorStationAdviceAppService.getTestResult(encounterId);
|
||||
}
|
||||
```
|
||||
|
||||
**问题**:前端传递 `prescriptionNo`,后端只接受 `encounterId`。Spring 忽略未知参数,`encounterId` 为 null,后端直接返回空列表。
|
||||
|
||||
后端服务实现 (DoctorStationAdviceAppServiceImpl.java:2357-2376):
|
||||
```java
|
||||
public R<?> getTestResult(Long encounterId) {
|
||||
if (encounterId == null) {
|
||||
return R.ok(new ArrayList<>()); // encounterId为空时直接返回空列表
|
||||
}
|
||||
// ... 查询逻辑 ...
|
||||
}
|
||||
```
|
||||
|
||||
#### 数据流追踪
|
||||
1. 前端 `handleViewReport(row)` → 获取 `row.prescriptionNo`
|
||||
2. 调用 `getTestResult({ prescriptionNo: "JCZ26051600001" })`
|
||||
3. 后端接收:`encounterId = null`(参数名不匹配,被忽略)
|
||||
4. 后端返回空列表 → 前端显示"暂未生成报告"
|
||||
|
||||
### 修复方案
|
||||
将 `handleViewReport` 中的参数从 `prescriptionNo` 改为 `encounterId`,使用 `row.encounterId` 或 `patientInfo.value.encounterId`。
|
||||
|
||||
### 后端 API 完整性检查
|
||||
| 操作 | 前端调用 | 后端接口 | 状态 |
|
||||
|------|---------|---------|------|
|
||||
| 修改 | saveCheckd → POST /save-check | saveRequestForm (支持编辑) | ✅ |
|
||||
| 删除 | deleteRequestForm → POST /delete | deleteRequestForm (验证status=0) | ✅ |
|
||||
| 撤回 | withdrawRequestForm → POST /withdraw | withdrawRequestForm (验证status=2) | ✅ |
|
||||
| 打印 | 前端 window.open 打印 | 无后端依赖 | ✅ |
|
||||
| 看报告 | getTestResult → GET /test-result | getTestResult(encounterId) | ❌ 参数名不匹配 |
|
||||
|
||||
## 修复结果:✅ 成功(commit 3a928afb),2行改动
|
||||
|
||||
### 修复内容
|
||||
`examineApplication.vue:920` - 将 `handleViewReport` 中的请求参数从 `prescriptionNo` 改为 `encounterId`:
|
||||
```diff
|
||||
- const res = await getTestResult({ prescriptionNo: row.prescriptionNo });
|
||||
+ const res = await getTestResult({ encounterId: row.encounterId || patientInfo.value?.encounterId });
|
||||
```
|
||||
|
||||
### 说明
|
||||
- 操作列的动态按钮逻辑(修改/删除/撤回/打印/看报告)已在之前的提交中完整实现
|
||||
- 本修复解决了"看报告"功能因参数名不匹配导致始终返回空数据的问题
|
||||
- 其余操作(修改/删除/撤回/打印)的后端接口参数均正确匹配
|
||||
@@ -1,15 +0,0 @@
|
||||
# Bug #503 分析报告
|
||||
|
||||
## 基本信息
|
||||
- Bug ID: 503
|
||||
- 标题: 【住院发退药】发药明细与发药汇总单数据触发时机不一致,存在业务脱节风险
|
||||
- 严重程度: 3
|
||||
- 模块:
|
||||
|
||||
## 根因分析
|
||||
(待深入分析)
|
||||
|
||||
## 修复方案
|
||||
(待分析后确定)
|
||||
|
||||
FIXER_ID: guanyu
|
||||
@@ -1,15 +0,0 @@
|
||||
# Bug #606 分析报告
|
||||
|
||||
## 基本信息
|
||||
- Bug ID: 606
|
||||
- 标题: 门诊术中安排-医嘱】预览列表字段显示及逻辑异常(涉及单位、频次、执行时间)
|
||||
- 严重程度: 3
|
||||
- 模块:
|
||||
|
||||
## 根因分析
|
||||
(待深入分析)
|
||||
|
||||
## 修复方案
|
||||
(待分析后确定)
|
||||
|
||||
FIXER_ID: zhaoyun
|
||||
@@ -1,15 +0,0 @@
|
||||
# Bug #611 分析报告
|
||||
|
||||
## 基本信息
|
||||
- Bug ID: 611
|
||||
- 标题: 【住院护士站-住院记账】“补费”弹窗确认按钮位置过深且未固定,建议将核心操作与汇总信息上移
|
||||
- 严重程度: 3
|
||||
- 模块:
|
||||
|
||||
## 根因分析
|
||||
(待深入分析)
|
||||
|
||||
## 修复方案
|
||||
(待分析后确定)
|
||||
|
||||
FIXER_ID: zhaoyun
|
||||
@@ -1,15 +0,0 @@
|
||||
# Bug #613 分析报告
|
||||
|
||||
## 基本信息
|
||||
- Bug ID: 613
|
||||
- 标题: 【医嘱校对/住院医生工作站】医嘱“退回”流程缺失反馈机制:护士端退回无原因录入,医生端缺失原因显示
|
||||
- 严重程度: 3
|
||||
- 模块:
|
||||
|
||||
## 根因分析
|
||||
(待深入分析)
|
||||
|
||||
## 修复方案
|
||||
(待分析后确定)
|
||||
|
||||
FIXER_ID: zhaoyun
|
||||
@@ -1,15 +0,0 @@
|
||||
# Bug #616 分析报告
|
||||
|
||||
## 基本信息
|
||||
- Bug ID: 616
|
||||
- 标题: 【住院医生工作站-临床医嘱】医嘱录入频次下拉框缺少英文缩写(字典键值)显示,不符合临床书写习惯
|
||||
- 严重程度: 3
|
||||
- 模块:
|
||||
|
||||
## 根因分析
|
||||
(待深入分析)
|
||||
|
||||
## 修复方案
|
||||
(待分析后确定)
|
||||
|
||||
FIXER_ID: zhaoyun
|
||||
@@ -1,15 +0,0 @@
|
||||
# Bug #617 分析报告
|
||||
|
||||
## 基本信息
|
||||
- Bug ID: 617
|
||||
- 标题: [住院登记] “费用性质”字段保存逻辑错误(登记选择医保保存后变为全自费)
|
||||
- 严重程度: 3
|
||||
- 模块:
|
||||
|
||||
## 根因分析
|
||||
(待深入分析)
|
||||
|
||||
## 修复方案
|
||||
(待分析后确定)
|
||||
|
||||
FIXER_ID: guanyu
|
||||
@@ -1,42 +0,0 @@
|
||||
# Bug #632 修复报告
|
||||
|
||||
> **文档类型**: Bug修复
|
||||
> **适用范围**: Bug 632
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: 2026-06-06
|
||||
> **最后更新**: 2026-06-06
|
||||
|
||||
---
|
||||
|
||||
|
||||
## 基本信息
|
||||
- **标题**: Bug #632 测试完成,请验收。提出人: chenxj。
|
||||
- **严重程度**: 待查
|
||||
- **提出人**: chenxj
|
||||
- **修复时间**: 15:49:42 ~ 16:01:30
|
||||
- **修复耗时**: 662.1s
|
||||
- **Commit**: `213568233222`
|
||||
|
||||
## 根因分析
|
||||
Bug #632 修复完成。核心问题是 JavaScript `&&` 运算符的经典陷阱——当所有条件为 truthy 时,`&&` 返回最后一个操作数(`item.packageName` 字符串 `"肝功能12项"`),而非 `true`。两处 `Boolean()` 强制转换确保 `isPackage` 始终为布尔值。
|
||||
| #
|
||||
|
||||
## 修复文件
|
||||
.../src/main/java/com/healthlink/his/lab/domain/InspectionPackage.java | 3 +++
|
||||
.../src/main/java/com/healthlink/his/lab/domain/InspectionPackageDetail.java | 3 +++
|
||||
|
||||
## 流程时间线
|
||||
| 时间 | 智能体 | 事件 | 状态 | 耗时 |
|
||||
|------|--------|------|------|------|
|
||||
| 15:49:42 | guanyu | fix_start | ⏳ | 0.0s |
|
||||
| 16:01:30 | guanyu | fix_done | ✅ | 662.1s |
|
||||
| 16:01:36 | zhugeliang | analyze_done | ✅ | 0.0s |
|
||||
|------|--------|------|------|------|
|
||||
| 16:01:38 | chenlin | doc_done | ✅ | <1s |
|
||||
|
||||
## 测试结果
|
||||
- **结果**: ❌ FAIL
|
||||
- **输出**:
|
||||
|
||||
## 全流程完成
|
||||
诸葛亮分析 → guanyu 修复 → 张飞测试 → 华佗验收 → 陈琳归档
|
||||
@@ -1,44 +0,0 @@
|
||||
# Bug #634 修复报告
|
||||
|
||||
> **文档类型**: Bug修复
|
||||
> **适用范围**: Bug 634
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: 2026-06-06
|
||||
> **最后更新**: 2026-06-06
|
||||
|
||||
---
|
||||
|
||||
|
||||
## 基本信息
|
||||
- **标题**: [系统维护-检验套餐] 保存套餐失败,报 JSON 反序列化日期解析异常 (LocalDateTime)
|
||||
- **严重程度**: 致命
|
||||
- **提出人**: chenxj
|
||||
- **修复时间**: 15:21:28 ~ 15:27:25
|
||||
- **修复耗时**: 357.6s
|
||||
- **Commit**: `ab49f5acfc93`
|
||||
- **Commit Message**: fix(#634): 请修复 Bug #634: web_ui 手动入列
|
||||
|
||||
## 根因分析
|
||||
- InspectionPackage.java 和 InspectionPackageDetail.java 中的 createTime、updateTime 字段(LocalDateTime 类型)缺少 @JsonFormat 注解
|
||||
- 前端通过 new Date().toISOString() 发送 ISO 8601 格式日期字符串(含毫秒 + Z 时区后缀),Jackson 反序列化失败
|
||||
|
||||
## 修复文件
|
||||
.../core/framework/config/ApplicationConfig.java | 37 ++++++++++++++++++++--
|
||||
1 file changed, 35 insertions(+), 2 deletions(-)
|
||||
|
||||
## 流程时间线
|
||||
| 时间 | 智能体 | 事件 | 状态 | 耗时 |
|
||||
|------|--------|------|------|------|
|
||||
| 15:21:28 | guanyu | fix_start | ⏳ | - |
|
||||
| 15:27:25 | guanyu | fix_done | ✅ | 357.6s |
|
||||
| 15:27:28 | zhugeliang | analyze_done | ✅ | 0.0s |
|
||||
| 15:27:31 | zhangfei | test_done | ✅ | 0.0s |
|
||||
| 15:27:33 | huatuo | verify_done | ✅ | 0.0s |
|
||||
| 15:27:33 | chenlin | doc_done | ✅ | 0.0s |
|
||||
|
||||
## 测试结果
|
||||
- **结果**: ✅ PASS
|
||||
- **Playwright**: @bug634 无头浏览器测试通过
|
||||
|
||||
## 全流程完成
|
||||
诸葛亮分析 → guanyu 修复 → 张飞测试 → 华佗验收 → 陈琳归档
|
||||
@@ -1,15 +0,0 @@
|
||||
# Bug #637 分析报告
|
||||
|
||||
## 基本信息
|
||||
- Bug ID: 637
|
||||
- 标题: [住院护士站-体温单] 选中患者后系统上下文不同步,导致无法触发“变更体温单”录入弹窗
|
||||
- 严重程度: 3
|
||||
- 模块:
|
||||
|
||||
## 根因分析
|
||||
(待深入分析)
|
||||
|
||||
## 修复方案
|
||||
(待分析后确定)
|
||||
|
||||
FIXER_ID: zhaoyun
|
||||
@@ -1,15 +0,0 @@
|
||||
# Bug #638 分析报告
|
||||
|
||||
## 基本信息
|
||||
- Bug ID: 638
|
||||
- 标题: [分诊排队管理] 智能候选池数据过滤失效,导致跨科室患者数据错误显示
|
||||
- 严重程度: 3
|
||||
- 模块:
|
||||
|
||||
## 根因分析
|
||||
(待深入分析)
|
||||
|
||||
## 修复方案
|
||||
(待分析后确定)
|
||||
|
||||
FIXER_ID: guanyu
|
||||
@@ -1,15 +0,0 @@
|
||||
# Bug #643 分析报告
|
||||
|
||||
## 基本信息
|
||||
- Bug ID: 643
|
||||
- 标题: [门诊手术安排-术中医嘱] 删除已生成的临时医嘱提示成功,但点击刷新后医嘱重新出现
|
||||
- 严重程度: 3
|
||||
- 模块:
|
||||
|
||||
## 根因分析
|
||||
(待深入分析)
|
||||
|
||||
## 修复方案
|
||||
(待分析后确定)
|
||||
|
||||
FIXER_ID: zhaoyun
|
||||
@@ -1,41 +0,0 @@
|
||||
# Bug #644 修复报告
|
||||
|
||||
> **文档类型**: Bug修复
|
||||
> **适用范围**: Bug 644
|
||||
> **版本**: v1.0
|
||||
> **编制日期**: 2026-06-06
|
||||
> **最后更新**: 2026-06-06
|
||||
|
||||
---
|
||||
|
||||
|
||||
## 基本信息
|
||||
- **标题**: Bug #644 测试完成,请验收。提出人: chenxj。
|
||||
- **提出人**: chenxj
|
||||
- **修复时间**: 00:24:37 ~ 00:32:06
|
||||
- **修复耗时**: 347.9s
|
||||
- **Commit**: `bd50c58dd`
|
||||
- **测试结果**: ❌ FAIL
|
||||
|
||||
## 根因分析
|
||||
## 变更摘要
|
||||
|
||||
### 根因分析
|
||||
|
||||
**Issue 1 — 状态不同步**:`getInpatientAdvicePage` 方法中,执行记录(`exePerformRecordList`)的计算被包裹在 `if (exeStatus != null)` 条件内,只有在"医嘱执行"页签(传 `exeStatus` 参数)时才计算。"已校对"页签不传 `exeStatus`,因此执行记录永远不会被
|
||||
|
||||
## 修复文件
|
||||
.../impl/AdviceProcessAppServiceImpl.java | 89 +++++++++++++++-------
|
||||
.../dto/InpatientAdviceDto.java | 3 +
|
||||
|
||||
## 流程时间线
|
||||
| 时间 | 智能体 | 事件 | 状态 | 耗时 |
|
||||
|------|--------|------|------|------|
|
||||
| 00:24:37 | guanyu | fix_start | ⏳ | 0.0s |
|
||||
| 00:25:39 | guanyu | fix_retry | ❓ | 0.0s |
|
||||
| 00:32:06 | guanyu | fix_done | ✅ | 347.9s |
|
||||
| 00:32:09 | zhugeliang | analyze_done | ✅ | 0.0s |
|
||||
| 00:32:11 | chenlin | doc_done | ✅ | <1s |
|
||||
|
||||
## 全流程
|
||||
诸葛亮分析 → guanyu 修复 → 张飞测试 → 华佗验收 → 陈琳归档
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #648 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:56:11
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 648
|
||||
- **标题**: 【住院医生工作站】临床医嘱下的手术按钮点击,不会出现报卡
|
||||
- **模块**: 住院医生工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd67-df3d-7c71-bf6d-30f90a80ea57"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #651 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:54:57
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 651
|
||||
- **标题**: [住院医生站-手术申请] 无法检索出已启用的手术项目(如:“血管闭合切割刀”)
|
||||
- **模块**: 住院医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd66-bbbc-7e51-baa6-21fce84ded9d"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #653 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:53:31
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 653
|
||||
- **标题**: [住院医生站-临床医嘱] 医嘱录入界面“给药途径”下拉列表及显示值包含冗余数字编码
|
||||
- **模块**: 住院医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd65-58c3-79b2-a2ee-dbce445061dc"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #655 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:52:03
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 655
|
||||
- **标题**: [门诊医生站-检查开单] 检查申请保存后总金额结算异常,未累加“检查方法”附加金额
|
||||
- **模块**: 门诊医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd64-16c7-7581-9c6d-677e3ea9d50e"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #656 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:50:34
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 656
|
||||
- **标题**: [门诊医生站-检查申请] 单击已保存记录回显异常:自动跳转页签错误且“检查方法”数据未回显
|
||||
- **模块**: 门诊医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd62-b87a-7a20-9007-a4f7f3d0221f"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #657 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:48:58
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 657
|
||||
- **标题**: [门诊医生站-检查申请] “检查明细”页签数据展示异常:检查方法未回显且单价/金额计算错误
|
||||
- **模块**: 门诊医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd61-420f-7202-a12d-5658faf3a782"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #659 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:47:35
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 659
|
||||
- **标题**: 【住院管理-住院护士站】选择了患者还提示叫你选择患者
|
||||
- **模块**: 病区护士工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd5f-ee1b-7cf3-a1e1-02052bc2e994"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #660 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:46:08
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 660
|
||||
- **标题**: 【分诊排队管理-智能分诊排队管理】加入队列失败
|
||||
- **模块**: 分诊排队管理
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd5e-9721-70a3-840f-c408e2899450"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #661 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:45:14
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 661
|
||||
- **标题**: 【住院管理-住院护士站】选择一名患者进行换床会出现报卡且报错
|
||||
- **模块**: 病区护士工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd5d-c771-78a0-ab9a-d6761a97bfbc"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #662 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:44:13
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 662
|
||||
- **标题**: 【住院管理-住院护士站】在医嘱校对中的已停止字段没有对应的已停止按钮
|
||||
- **模块**: 病区护士工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd5c-d876-7242-9774-ec5a26b7610c"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #664 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:43:05
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 664
|
||||
- **标题**: 【住院管理-住院护士站】医嘱执行中的取消执行无法点击
|
||||
- **模块**: 病区护士工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd5b-cf04-7930-9cbf-a075148435d6"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #665 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:41:42
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 665
|
||||
- **标题**: 【收费工作站-门诊挂号】当日已挂号,界面加载卡死
|
||||
- **模块**: 收费工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd5a-999f-7131-9cff-376ffdbca994"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #666 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:40:37
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 666
|
||||
- **标题**: [门诊-发药管理] 药品已完成收费但“门诊发药”模块无法检索到患者信息,导致无法实现发药逻辑
|
||||
- **模块**: 门诊药房管理
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd59-9d9a-7033-860f-1f9bb39e8335"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #667 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:39:11
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 667
|
||||
- **标题**: [门诊收费-业务流程] 医嘱未挂钩【完诊】状态,医生未终结门诊即可提前在收费端结算,存在漏开/错开费用风险
|
||||
- **模块**: 门诊收费管理
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd58-3b49-78a0-bc30-4aa9e6a0867c"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #668 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:37:37
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 668
|
||||
- **标题**: [门诊医生站-中医处方] 点击【签发】按钮系统崩溃,提示“element cannot be mapped to a null key”
|
||||
- **模块**: 门诊医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd56-cdbd-7993-b9ec-de7f1c2cf84b"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #669 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:36:00
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 669
|
||||
- **标题**: [门诊医生站-中医处方] 中医处方头信息(费用性质、频次、天数、付数等)在保存并重新进入后回显为空
|
||||
- **模块**: 门诊医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd55-51d4-7a52-bc60-168bba962fff"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #670 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:34:28
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 670
|
||||
- **标题**: [门诊医生站-中医处方] “煎药方式”与“特殊煎法”下拉框数据为空,未能调用字典管理数据
|
||||
- **模块**: 门诊医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd53-fbb0-7cb1-a270-c561f87c0d0a"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #671 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:32:13
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 671
|
||||
- **标题**: [门诊医生站-医嘱] 列表字段定义错误:“退回原因”应变更为“备注”并正确回显录入内容
|
||||
- **模块**: 门诊医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd51-db08-7f40-9733-ba8443073467"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #672 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:30:04
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 672
|
||||
- **标题**: [门诊医生站-诊断] 新增中医诊断保存后,列表中“发病日期”、“诊断日期”和“医生”字段显示为空
|
||||
- **模块**: 门诊医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd4f-e1ab-7c50-9afd-f9606ce9d862"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #673 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:28:21
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 673
|
||||
- **标题**: 【收费工作站-门诊挂号】挂号列表排版错乱
|
||||
- **模块**: 收费工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd4e-6113-73a0-804e-fe1a2937d45f"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #674 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:27:13
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 674
|
||||
- **标题**: 【住院管理-住院医生工作站】在临床医嘱的签发失效
|
||||
- **模块**: 住院医生工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd4d-58dc-7ac0-8588-e329ed1d71e3"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #675 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:25:50
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 675
|
||||
- **标题**: [门诊医生站-检查申请] “检查方法”字段缺少必填标识却执行了强校验逻辑
|
||||
- **模块**: 门诊医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd4c-154d-7fc3-bfe2-8d1c1233ae5c"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #676 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:24:48
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 676
|
||||
- **标题**: [住院医生站-临床医嘱] 勾选“待签发”临时医嘱后,点击【签发】按钮无响应
|
||||
- **模块**: 住院医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd4b-0f4d-7073-8f70-c6d403872519"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #678 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:23:07
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 678
|
||||
- **标题**: 【住院医生工作站】诊断录入中的诊断类别无法选择数据
|
||||
- **模块**: 住院医生工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd49-8574-7243-a5a0-60adcf729dcf"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #679 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:21:52
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 679
|
||||
- **标题**: [住院医生站-临床医嘱] 新增项目点击“确定”后编辑面板不自动收起,且“取消”按钮失效
|
||||
- **模块**: 住院医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd48-7364-7fe1-8c03-5c6411c0ba39"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #680 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:20:02
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 680
|
||||
- **标题**: [住院医生站-临床医嘱] 勾选“待签发”临时医嘱后点击【删除】按钮无响应
|
||||
- **模块**: 住院医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd46-b544-7ab3-b1e9-18fa9b9bf8f5"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #681 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:18:56
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 681
|
||||
- **标题**: [门诊收费] 点击“已收费”列表患者报错“encounterId 为 undefined”,导致无法查看收费详情
|
||||
- **模块**: 门诊收费管理
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd45-c39e-7cd3-9c4c-704b5dd61808"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #682 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:17:56
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 682
|
||||
- **标题**: 【住院医生工作站】历史医嘱的报卡的布局有些字段被覆盖
|
||||
- **模块**: 住院医生工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd44-ccf6-7e70-bf1e-d8b34b3047b2"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #683 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:16:25
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 683
|
||||
- **标题**: 【门诊医生工作站】无法选择医嘱项目
|
||||
- **模块**: 门诊医生工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd43-6142-7222-bb99-c29ab0ce42de"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #684 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:14:54
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 684
|
||||
- **标题**: 【手术管理】手术状态下拉框有重复
|
||||
- **模块**: 手术麻醉管理
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd42-029a-7491-9473-ef085ac9e5b6"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #685 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:13:19
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 685
|
||||
- **标题**: 【住院护士站】住院护士站报错404页面打不开
|
||||
- **模块**: 病区护士工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd40-8cfb-7290-bcb6-d7550ebb4239"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #686 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:12:25
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 686
|
||||
- **标题**: 【门诊管理-门诊划价】项目的排版错乱字段重叠
|
||||
- **模块**: 门诊收费管理
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd3f-b780-7ed0-8698-4e67181f0d55"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #687 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:10:24
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 687
|
||||
- **标题**: 【库房管理-统计管理】库房明细记录的操作列表下停供报错
|
||||
- **模块**: 库房管理
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd3d-e4f7-7723-8b8f-ef72d5b3805b"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #688 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:09:19
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 688
|
||||
- **标题**: [住院发退药-发药明细单] 患者列表布局挤压导致内容显示不全,且多条件组合检索(患者信息/发药状态/药品分类)失效
|
||||
- **模块**: 住院药房管理
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd3c-f5ef-7fe3-b95b-7e2f0355ea42"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #689 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:08:01
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 689
|
||||
- **标题**: [住院管理-住院发退药] 发药汇总单界面布局被挤压、发放状态文案不符及右侧详情联动无数据
|
||||
- **模块**: 住院药房管理
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd3b-b577-7670-945c-a995871568c1"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #691 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:06:34
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 691
|
||||
- **标题**: [门诊挂号-预约签到] 确认弹窗患者姓名显示为undefined,且提交签到报错缺失organizationId参数
|
||||
- **模块**: 建档挂号管理
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd3a-5d3f-7bf2-9279-a062ef4ff8fc"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #693 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:05:00
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 693
|
||||
- **标题**: [门诊医生站-诊断录入] 诊断选择弹窗中点击诊断后,界面无法回填且未赋值
|
||||
- **模块**: 门诊医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd38-ecfe-7432-b7e0-040657841dc1"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #694 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:02:47
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 694
|
||||
- **标题**: 【住院医生工作站】不同的权限登录之前的标签后面的权限也可以打开
|
||||
- **模块**: 住院医生工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd36-e742-7c22-a18d-c5c27bc2a7f7"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #695 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:01:29
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 695
|
||||
- **标题**: 【住院医生工作站】将一条已签发的医嘱进行停嘱,显示成功但是状态还是已签发
|
||||
- **模块**: 住院医生工作站
|
||||
- **提出人**: 王栩坤
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd35-b960-7cf2-858d-ed17672599d7"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,34 +0,0 @@
|
||||
# Bug #696 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 03:00:12
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 696
|
||||
- **标题**: [收费工作站-住院登记] 优化姓名搜索框,增设“身份证号”与“申请时间段”检索条件,及列表字段补充显示
|
||||
- **模块**: 住院登记管理
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
{"type":"thread.started","thread_id":"019ebd34-8727-7480-b6b5-c61fdeb2c987"}
|
||||
{"type":"turn.started"}
|
||||
{"type":"error","message":"Reconnecting... 1/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses))"}
|
||||
{"type":"error","message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}
|
||||
{"type":"turn.failed","error":{"message":"stream disconnected before completion: error sending request for url (http://127.0.0.1:8788/v1/responses)"}}
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,194 +0,0 @@
|
||||
# Bug #697 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 02:58:52
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 697
|
||||
- **标题**: [门诊管理-门诊挂号] 检索并选择患者后,信息未回填赋值至挂号表单,导致挂号阻断
|
||||
- **模块**: 建档挂号管理
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
Now I have a comprehensive understanding of the bug. Let me produce my analysis.
|
||||
|
||||
---
|
||||
|
||||
## 一、Bug 理解
|
||||
|
||||
### 禅道原文引用
|
||||
|
||||
**Bug 标题**:[门诊管理-门诊挂号] 检索并选择患者后,信息未回填赋值至挂号表单,导致挂号阻断
|
||||
|
||||
**重现步骤**:
|
||||
> 【步骤】登录账号 admin/admin123,进入【门诊管理】→【门诊挂号】。在"患者身份信息"输入框中输入关键字"随子赫"(或就诊卡号 2123123)。系统自动弹出模糊匹配的待选患者悬浮列表。用鼠标左键双击或单击选中列表中的患者"随子赫"这一行数据。观察挂号主界面各患者信息输入框(姓名、性别、年龄、就诊卡号、证件号、电话等)的接收状态。
|
||||
|
||||
**期望结果**:
|
||||
> 选中列表中的患者后,该患者的所有基本信息(包括但不限于:姓名、性别、年龄、就诊卡号、证件号、电话等)应自动回填并正确渲染显示在挂号主界面的对应表单中。
|
||||
|
||||
**实际结果**:
|
||||
> 选中下拉列表后该列表消失,但主界面的姓名、性别、年龄、就诊卡号、证件号、电话等所有患者基本信息字段依然为空,未回显任何数据,导致整个挂号业务无法继续保存。
|
||||
|
||||
### 附图分析关键信息
|
||||
- 截图中红色标注:**"点击选中患者,患者信息未实现赋值至主界面,实现不了挂号业务"**
|
||||
- 截图中红色标注:**"未赋值"**(第二个截图中整个挂号表单区域为空白)
|
||||
- 患者下拉列表正常显示,数据完整(姓名、就诊卡号、性别、证件号、联系电话、年龄),但选中后主表单所有字段为空
|
||||
|
||||
### 综合总结
|
||||
用户在门诊挂号页面搜索患者后,下拉列表能正常弹出并显示匹配结果。但点击选中某一行后,**列表关闭了,主表单的姓名、性别、年龄、就诊卡号、证件号、电话等字段全部为空**,挂号流程被完全阻断。这是一个典型的**前端数据回填事件链断裂**问题——选中事件触发了列表关闭,但回填逻辑未成功执行。
|
||||
|
||||
---
|
||||
|
||||
## 二、根因分析
|
||||
|
||||
### 根因:el-popover `trigger="manual"` + input `@blur` 导致事件链断裂
|
||||
|
||||
**完整事件链分析:**
|
||||
|
||||
1. 用户在搜索输入框输入关键字 → `handleFocus()` 显示 popover → `patientList` 组件通过 watcher 触发 `getList()` → API 返回患者列表正常 ✅
|
||||
2. 用户**点击** popover 中的某一行 →
|
||||
3. **关键断裂点**:点击 popover 内部内容时,浏览器先处理 input 的 **blur 事件** → `handleBlur()` 立即执行 `showPopover.value = false`
|
||||
4. Element Plus 的 `el-popover` 使用 `trigger="manual"` 模式,当 `:visible` 变为 `false` 时,**popover 内容从 DOM 中移除/隐藏**
|
||||
5. 由于 popover 内容被移除,vxe-table 的 `@cell-click="clickRow"` 事件**来不及触发**或触发时 DOM 已不可用
|
||||
6. `clickRow` → `emit("selsectPatient", params.row)` **未被触发**
|
||||
7. 父组件的 `selsectPatient(row)` **未被调用** → 表单字段未赋值
|
||||
|
||||
**事件时序图:**
|
||||
```
|
||||
mousedown (table row)
|
||||
→ input blur fires (handleBlur)
|
||||
→ showPopover = false
|
||||
→ popover content removed from DOM
|
||||
→ cell-click fires on vxe-table (TOO LATE, DOM gone)
|
||||
```
|
||||
|
||||
**涉及文件:**
|
||||
|
||||
| 文件 | 作用 | 问题点 |
|
||||
|------|------|--------|
|
||||
| `healthlink-his-ui/src/views/charge/outpatientregistration/index.vue` (L116-137) | el-popover + input 模板 | `@blur="handleBlur"` 立即关闭 popover |
|
||||
| `healthlink-his-ui/src/views/charge/outpatientregistration/index.vue` (L1996-1998) | `handleBlur` 函数 | 无延迟,立即 `showPopover = false` |
|
||||
| `healthlink-his-ui/src/views/charge/outpatientregistration/index.vue` (L2228-2241) | `selsectPatient` 函数 | 逻辑正确但未被触发 |
|
||||
| `healthlink-his-ui/src/views/charge/outpatientregistration/components/patientList.vue` (L96) | `@cell-click="clickRow"` | click 事件未能触发 |
|
||||
| `healthlink-his-ui/src/views/charge/outpatientregistration/components/patientList.vue` (L54) | `@mousedown.prevent` | 绑在组件上,未阻止 input blur |
|
||||
|
||||
**为什么 `@mousedown.prevent` 没有阻止 blur?**
|
||||
|
||||
`@mousedown.prevent` 是 Vue 事件修饰符,绑定在 `<patientList>` 组件上,会附加到组件的根元素 `<div>` 上。但 `mousedown` 事件的传播方向是**从目标元素向上冒泡**:
|
||||
- 表格单元格 `mousedown` → 表格 `mousedown` → `<div>` 的 Vue mousedown(`preventDefault` 执行)
|
||||
- 但 input 的 `blur` 是由浏览器的**焦点管理机制**触发的,不受 `preventDefault` 的完全控制
|
||||
- 特别是当 el-popover 使用 Teleport 将内容渲染到 `document.body` 时,popover 内容的 mousedown 事件可能不会冒泡到触发元素的父容器
|
||||
|
||||
---
|
||||
|
||||
## 三、修复方案
|
||||
|
||||
### 修复策略:在 popover 内容区域拦截 mousedown,阻止 input 失焦
|
||||
|
||||
**修改文件**:`healthlink-his-ui/src/views/charge/outpatientregistration/index.vue`
|
||||
|
||||
**修改内容**:
|
||||
|
||||
#### 修改 1:在 popover 内容区域添加 mousedown 阻止事件(约 L116-137)
|
||||
|
||||
将模板中的 popover 内容区域修改为:
|
||||
|
||||
```vue
|
||||
<!-- 修改前 -->
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
:visible="showPopover"
|
||||
trigger="manual"
|
||||
:width="1200"
|
||||
>
|
||||
<patientList
|
||||
:searchkey="patientSearchKey"
|
||||
@selsect-patient="selsectPatient"
|
||||
@mousedown.prevent
|
||||
/>
|
||||
...
|
||||
</el-popover>
|
||||
|
||||
<!-- 修改后 -->
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
:visible="showPopover"
|
||||
trigger="manual"
|
||||
:width="1200"
|
||||
>
|
||||
<div @mousedown.prevent>
|
||||
<patientList
|
||||
:searchkey="patientSearchKey"
|
||||
@selsect-patient="selsectPatient"
|
||||
/>
|
||||
</div>
|
||||
...
|
||||
</el-popover>
|
||||
```
|
||||
|
||||
关键变化:
|
||||
- `@mousedown.prevent` 从 `<patientList>` 组件标签移到**包裹 popover 内容的 `<div>`** 上
|
||||
- 确保 popover 内任何位置的 mousedown 都会被阻止默认行为,从而**阻止 input 失焦**
|
||||
- input 不失焦 → popover 不关闭 → `cell-click` 正常触发 → `selsectPatient` 正常执行 → 表单正确赋值
|
||||
|
||||
#### 修改 2:添加防御性保障 — 优化 `handleBlur`(约 L1996-1998)
|
||||
|
||||
```javascript
|
||||
// 修改前
|
||||
function handleBlur() {
|
||||
showPopover.value = false;
|
||||
}
|
||||
|
||||
// 修改后
|
||||
function handleBlur() {
|
||||
setTimeout(() => {
|
||||
showPopover.value = false;
|
||||
}, 200);
|
||||
}
|
||||
```
|
||||
|
||||
双重保障:即使 `@mousedown.prevent` 在某些边界情况下未完全生效,200ms 延迟也足以让 `cell-click` 事件完成、`selsectPatient` 执行,之后再关闭 popover。
|
||||
|
||||
#### 修改 3:(可选)增加键盘关闭支持
|
||||
|
||||
由于 `@mousedown.prevent` 阻止了焦点转移,用户需要其他方式关闭 popover:
|
||||
|
||||
```javascript
|
||||
// 在 onMounted 中添加
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && showPopover.value) {
|
||||
showPopover.value = false;
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### 修改清单
|
||||
|
||||
| # | 文件 | 行号(约) | 修改内容 |
|
||||
|---|------|-----------|---------|
|
||||
| 1 | `outpatientregistration/index.vue` | L116-137 | popover 内容包裹 `<div @mousedown.prevent>` |
|
||||
| 2 | `outpatientregistration/index.vue` | L1996-1998 | `handleBlur` 增加 200ms setTimeout |
|
||||
| 3 | `outpatientregistration/index.vue` | L2228-2241 | `selsectPatient` 函数逻辑无需修改(已正确) |
|
||||
|
||||
---
|
||||
|
||||
## 四、路由决策
|
||||
|
||||
**FIXER**: zhaoyun
|
||||
|
||||
**REASON**: 纯前端 Bug——el-popover 事件链断裂导致患者信息回填失败,涉及 Vue 模板事件绑定和 el-popover 组件交互逻辑,属于前端 UI 修复范畴,无需数据库变更,不需要后端参与。
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,25 +0,0 @@
|
||||
# Bug #698 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-11 16:51:39
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 698
|
||||
- **标题**: [收费工作站-住院登记-已登记入院] 检索维度单一,且关键归档信息缺失(需增设检索条件与补充列表字段展示)
|
||||
- **模块**: 住院登记管理
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
(LLM 失败,关键词分析)
|
||||
Bug: [收费工作站-住院登记-已登记入院] 检索维度单一,且关键归档信息缺失(需增设检索条件与补充列表字段展示)
|
||||
模块: 住院登记管理
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **修复 Agent**: zhaoyun
|
||||
- **原因**: 关键词: 前端
|
||||
@@ -1,139 +0,0 @@
|
||||
# Bug #712 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 02:46:37
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 712
|
||||
- **标题**: 【收费工作站-预交金管理】“预交金管理”页面缺失展示“支付方式”列及患者“床号”、“费用类型”
|
||||
- **模块**: 住院登记管理
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
分析完成。以下是完整的 Bug #712 分析报告。
|
||||
|
||||
---
|
||||
|
||||
## 一、Bug 理解
|
||||
|
||||
**Bug 标题**:【收费工作站-预交金管理】"预交金管理"页面缺失展示"支付方式"列及患者"床号"、"费用类型"
|
||||
|
||||
**重现步骤**:
|
||||
1. 登录系统,进入"收费工作站" → "预交金管理"页面
|
||||
2. 输入住院号查询关联患者(如"三太子")
|
||||
3. 检查患者基本信息卡片及下方收支明细列表
|
||||
|
||||
**期望结果**:
|
||||
1. 患者卡片区增加展示"床号"(如:012床)与"费用类型"(医保类型,如:职工医保)
|
||||
2. 明细列表区在"票据类型"与"收款时间"之间新增"支付方式"字段列
|
||||
|
||||
**附图分析关键信息**:
|
||||
- 图2492/2493 显示患者卡片区域"在院科室/病区: 呼吸内科病房/呼吸内科一区",**没有独立展示床号和费用类型**
|
||||
- 收支明细列表列头为:序号、收据号、金额、票据类型、收款时间、收款员 —— **缺少"支付方式"列**
|
||||
- 截图中有红色标注:"增加患者床号和费用类型"、"增加支付方式字段列"
|
||||
|
||||
**综合总结**:用户在预交金管理页面查询住院患者后,患者信息卡片只显示了科室/病区,无法看到该患者的具体床号和医保费用类型;下方流水明细列表缺少支付方式列,无法知道每笔交易的支付渠道(现金/支付宝等)。这两个信息对打印收据和财务核对都是必需的。
|
||||
|
||||
---
|
||||
|
||||
## 二、根因分析
|
||||
|
||||
经过全链路 6 环分析,问题分布在前端和后端两个层面:
|
||||
|
||||
### 缺陷 1:费用类型(费用类型/医保类型)缺失
|
||||
|
||||
**前端** `index.vue:88-110`:患者信息卡片区域没有展示"费用类型"字段。
|
||||
**后端** `AdvancePaymentInfoDto.java`:DTO 缺少 `ybClassText`(医保类别文本)字段。
|
||||
**后端** `AdvancePaymentManageAppMapper.xml`:`getAdvancePaymentInfo` SQL 查询未 SELECT `ae.yb_class_text`。
|
||||
**数据库**:`adm_encounter` 表已有 `yb_class_text` 字段(保险类型文本,如"职工医保")。
|
||||
|
||||
### 缺陷 2:床号显示不突出
|
||||
|
||||
**后端** SQL 已查询 `alb.name AS bed_name`,DTO 已有 `bedName` 字段。
|
||||
**前端** `index.vue:115-120`:床号被拼在"在院科室/病区"字符串中(`wardName + houseName + bedName`),没有独立展示为"床号:012床"。
|
||||
|
||||
### 缺陷 3:支付方式列缺失
|
||||
|
||||
**前端** `index.vue:147`:`<vxe-column field="payWay" title="支付方式" />` 被注释掉了。
|
||||
**后端** `AdvancePaymentFlowRecordDto.java`:DTO 缺少支付方式字段(`payEnum` / `payWay`)。
|
||||
**后端** `AdvancePaymentManageAppMapper.xml:90-99`:`getAdvancePaymentFlowRecordList` SQL 只查了 `fin_payment_reconciliation` 主表,**未 JOIN** `fin_payment_rec_detail` 子表(`pay_enum` 字段在子表中)。
|
||||
**数据库**:`fin_payment_rec_detail` 表有 `pay_enum`(支付类型编码,如现金/支付宝/微信)。
|
||||
|
||||
**涉及文件清单**:
|
||||
|
||||
| 文件 | 修改内容 |
|
||||
|------|---------|
|
||||
| `AdvancePaymentInfoDto.java` | 新增 `ybClassText` 字段 |
|
||||
| `AdvancePaymentManageAppMapper.xml` | `getAdvancePaymentInfo` SQL 加 `ae.yb_class_text` |
|
||||
| `AdvancePaymentFlowRecordDto.java` | 新增 `payEnum` + `payWay` 字段 |
|
||||
| `AdvancePaymentManageAppMapper.xml` | `getAdvancePaymentFlowRecordList` SQL JOIN `fin_payment_rec_detail`,取 `pay_enum` |
|
||||
| `AdvancePaymentManageAppServiceImpl.java` | 流水记录返回后增加 `payWay` 枚举映射 |
|
||||
| `index.vue` | 卡片区域新增"床号"和"费用类型"展示;取消注释支付方式列 |
|
||||
|
||||
---
|
||||
|
||||
## 三、修复方案
|
||||
|
||||
### Step 1:后端 — DTO 新增字段
|
||||
|
||||
**`AdvancePaymentInfoDto.java`**:新增字段
|
||||
```java
|
||||
/** 费用类型(医保类型文本,如:职工医保) */
|
||||
private String ybClassText;
|
||||
```
|
||||
|
||||
**`AdvancePaymentFlowRecordDto.java`**:新增字段
|
||||
```java
|
||||
/** 支付方式编码 */
|
||||
private Integer payEnum;
|
||||
/** 支付方式文本(如:现金、支付宝) */
|
||||
private String payWay;
|
||||
```
|
||||
|
||||
### Step 2:后端 — Mapper XML 修改
|
||||
|
||||
**`AdvancePaymentManageAppMapper.xml`**:
|
||||
|
||||
1. `getAdvancePaymentInfo` 子查询中加 `ae.yb_class_text AS yb_class_text`
|
||||
2. `getAdvancePaymentFlowRecordList` SQL 加 JOIN `fin_payment_rec_detail`,取 `prd.pay_enum`
|
||||
|
||||
### Step 3:后端 — ServiceImpl 枚举映射
|
||||
|
||||
**`AdvancePaymentManageAppServiceImpl.java`**:
|
||||
|
||||
在 `getAdvancePaymentFlowRecord` 方法中增加支付方式枚举映射:
|
||||
```java
|
||||
e.setPayWay(EnumUtils.getInfoByValue(YbPayment.class, e.getPayEnum()));
|
||||
```
|
||||
|
||||
### Step 4:前端 — 页面字段补充
|
||||
|
||||
**`index.vue`**:
|
||||
1. 在"在院科室/病区"行下方(或同行),新增展示:
|
||||
- `床号: {{ patientInfo.bedName }}`(独立标签)
|
||||
- `费用类型: {{ patientInfo.ybClassText }}`
|
||||
2. 取消注释支付方式列,改为:
|
||||
```html
|
||||
<vxe-column field="payWay" title="支付方式" align="center" min-width="100" />
|
||||
```
|
||||
3. 插入位置:在 `paymentEnum_enumText`(票据类型)列之后、`operateTime`(收款时间)列之前
|
||||
|
||||
---
|
||||
|
||||
## 四、路由决策
|
||||
|
||||
**FIXER**: zhaoyun(赵云 — 前端开发)
|
||||
**REASON**: 本次修复核心在于前端页面展示(卡片字段补充 + 表格列取消注释),后端改动量较小(DTO 加 2 字段、SQL 加 2 列、Service 加 1 行映射),属于前后端联动的 UI 展示修复,赵云可一并处理前端和后端轻量改动。无需 DBA 审查(无建表/加字段迁移)。
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,127 +0,0 @@
|
||||
# Bug #714 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 02:42:58
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 714
|
||||
- **标题**: 【住院护士站-医嘱校对】住院护士站-医嘱核对界面:缺少“截止时间”过滤条件且默认单选未选中“全部”
|
||||
- **模块**: 病区护士工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
分析完毕。以下是完整输出。
|
||||
|
||||
---
|
||||
|
||||
## 一、Bug 理解
|
||||
|
||||
**Bug 标题**:【住院护士站-医嘱校对】住院护士站-医嘱核对界面:缺少"截止时间"过滤条件且默认单选未选中"全部"
|
||||
|
||||
**重现步骤**:
|
||||
1. 登录系统,进入"住院护士站"菜单
|
||||
2. 点击进入"医嘱核对"页面,选中左侧"在科"列表中的某位患者
|
||||
3. 观察右侧查询条件区域(包含"未校对/已校对/已停止/已退回"四个标签页)
|
||||
|
||||
**结果**:
|
||||
1. 过滤条件中缺少"截止时间"时间控件,无法限制截止时间进行医嘱筛选
|
||||
2. 医嘱分类单选框默认未自动选中"全部"
|
||||
3. 切换到"已校对/已停止/已退回"标签页时,同样缺失截止时间字段
|
||||
|
||||
**期望**:
|
||||
1. 四个标签页均应增加"截止时间"查询条件
|
||||
2. "截止时间"默认显示为系统当前时间,且支持手动编辑/选择
|
||||
3. 页面初始化默认选中"全部"单项
|
||||
|
||||
**附图关键信息**:截图清晰显示查询条件区域仅有"医嘱分类"(全部/长期/临时)单选框和"查询"按钮,无截止时间DatePicker控件;且"全部"选项未处于选中状态。
|
||||
|
||||
**综合总结**:用户在住院护士站医嘱核对界面无法按时间节点批量筛选医嘱,因为查询区域缺少截止时间过滤条件。同时初始化时医嘱分类默认未选中"全部",不利于日常操作。这是一个典型的设计缺陷——查询条件不完整影响护士工作效率。
|
||||
|
||||
---
|
||||
|
||||
## 二、根因分析
|
||||
|
||||
经代码全链路追踪,Bug 涉及前端组件 + 后端 DTO + Service + Mapper 四层:
|
||||
|
||||
**前端层**(`medicalOrderProofread/components/prescriptionList.vue`):
|
||||
1. `<el-radio-group>` 中"全部"选项的 `:value` 原为 `null`(commit `376ddd46f` 中添加),导致 `type` 初始值为 `null`,UI 上无选项被选中
|
||||
2. 组件中完全没有 `<el-date-picker>` 日期选择控件,无法选择截止时间
|
||||
3. `handleGetPrescription()` 构造请求参数时未传递 `deadline` 字段
|
||||
|
||||
**后端 DTO 层**(`InpatientAdviceParam.java`):
|
||||
- `deadline` 字段已存在(在初始重构中引入),但此前未被 Service 层实际使用
|
||||
|
||||
**Service 层**(`AdviceProcessAppServiceImpl.java` → `getInpatientAdvicePage()`):
|
||||
- 未提取 `deadline` 参数,未在 `QueryWrapper` 中拼接时间范围条件
|
||||
|
||||
**Mapper 层**(`AdviceProcessAppMapper.xml`):
|
||||
- SQL 使用 `${ew.customSqlSegment}` 拼接条件,Service 未设置条件则 SQL 无截止时间过滤
|
||||
|
||||
**根因总结**:前端查询组件设计时遗漏了截止时间控件,且默认值设置不当;后端虽然 DTO 有字段但 Service 层未处理该参数,导致整条链路断裂。
|
||||
|
||||
---
|
||||
|
||||
## 三、修复方案(⚠️ 已在 `ca812421d` 中修复)
|
||||
|
||||
> **注意**:经过 git 历史追踪,此 Bug 的修复已作为 Bug #665 的附带修复在 commit `ca812421d` 中完成。以下是修复内容详解:
|
||||
|
||||
### 3.1 前端修复(`prescriptionList.vue`)
|
||||
|
||||
| 修改点 | 修改前 | 修改后 |
|
||||
|--------|--------|--------|
|
||||
| Radio 默认值 | `:value="null"` | `:value="0"` |
|
||||
| type 初始值 | `ref(null)` | `ref(0)` |
|
||||
| 截止时间控件 | 无 | 新增 `<el-date-picker>` (datetime类型) |
|
||||
| deadline 初始值 | 无 | `ref(formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59')` |
|
||||
| 查询参数 | 无 deadline | `...(deadline.value ? { deadline: deadline.value } : {})` |
|
||||
| therapyEnum 条件 | `type.value != null` | `type.value !== 0`(仅非"全部"时传递) |
|
||||
|
||||
### 3.2 后端修复(`AdviceProcessAppServiceImpl.java` → `getInpatientAdvicePage()`)
|
||||
|
||||
新增代码逻辑:
|
||||
```java
|
||||
// 提取 deadline 手动处理
|
||||
String deadline = inpatientAdviceParam.getDeadline();
|
||||
inpatientAdviceParam.setDeadline(null);
|
||||
// ...
|
||||
// 手动拼接 deadline 条件,按医嘱截止时间筛选
|
||||
if (deadline != null && !deadline.isEmpty()) {
|
||||
LocalDateTime deadlineTime = LocalDateTime.parse(deadline,
|
||||
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
queryWrapper.le("end_time", deadlineTime); // ≤ 截止时间
|
||||
}
|
||||
```
|
||||
|
||||
### 3.3 四标签页覆盖机制
|
||||
|
||||
`index.vue` 中四个 tab 各创建独立的 `PrescriptionList` 实例,每个实例维护独立的 `type` 和 `deadline` ref。切换 tab 时通过 `provide/inject` + `ref` 调用目标 tab 组件的 `handleGetPrescription()`,四标签页均能独立使用截止时间过滤。
|
||||
|
||||
### 3.4 验证检查项
|
||||
|
||||
- [ ] 前端编译通过(`npm run build:dev`)
|
||||
- [ ] 后端编译通过(`mvn clean compile -DskipTests`)
|
||||
- [ ] "未校对" tab:截止时间默认为当日 23:59:59,可编辑
|
||||
- [ ] "全部" radio 默认选中,查询结果包含长期+临时
|
||||
- [ ] "已校对/已停止/已退回" tab 同样有截止时间控件
|
||||
- [ ] 修改截止时间后点"查询",结果正确过滤
|
||||
|
||||
---
|
||||
|
||||
## 四、路由决策
|
||||
|
||||
**FIXER**: zhaoyun(前端为主)+ guanyu(后端 Service 层配合)
|
||||
|
||||
**REASON**: Bug 涉及前端 UI 组件(DatePicker 控件新增 + Radio 默认值修正)占主要工作量,交赵云处理;后端 Service 层 deadline 条件拼接需关羽配合验证 SQL 正确性。**但此 Bug 已在 `ca812421d` commit 中修复完成**,若禅道状态仍为 active,建议直接关闭并更新禅道状态为"已解决"。
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,235 +0,0 @@
|
||||
# Bug #715 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 02:38:26
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 715
|
||||
- **标题**: 【住院护士站-医嘱校对】医生已签发的“临时耗材医嘱”未同步至护士站“医嘱校对”界面
|
||||
- **模块**: 病区护士工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
Now I have all the information needed. Let me write the comprehensive analysis.
|
||||
|
||||
---
|
||||
|
||||
## 一、Bug 理解
|
||||
|
||||
**禅道 Bug 标题**:【住院护士站-医嘱校对】医生已签发的"临时耗材医嘱"未同步至护士站"医嘱校对"界面
|
||||
|
||||
**重现步骤**:
|
||||
1. 医生端:进入"住院医生工作站",为患者刘潇凡开具并手动点击【签发】一条"临时"医嘱(如:一次性使用导尿包)
|
||||
2. 护士端:进入"住院护士站" > "医嘱校对"界面
|
||||
3. 在"未校对"标签页中,选中患者,点击【查询】
|
||||
|
||||
**期望结果**:系统应正确加载并显示已签发的临时耗材医嘱,以便护士进行核对操作。
|
||||
|
||||
**实际结果**:医嘱核对页面显示空白,提示"点击查询获取患者医嘱信息",无法查到已签发的临时耗材医嘱。
|
||||
|
||||
**附图关键信息**:
|
||||
- 截图1(医生端):显示患者刘潇凡有一条状态为"**已签发**"的临时医嘱"一次性使用导尿包",类别为"耗材",金额 38.00 元
|
||||
- 截图2(护士端):"医嘱校对 → 未校对"页面,患者已选中但右侧**内容区域完全空白**,仅显示"点击查询获取患者医嘱信息"
|
||||
|
||||
**综合总结**:医生签发的耗材医嘱(存储在 `wor_device_request` 表)在护士站医嘱校对页面无法查询到,因为该页面的 SQL 查询只包含了药品请求(`med_medication_request`)和服务请求(`wor_service_request`)两个 UNION 子查询,**完全缺失了耗材请求(`wor_device_request`)的第三个 UNION 子查询**。
|
||||
|
||||
---
|
||||
|
||||
## 二、根因分析
|
||||
|
||||
### 根因定位
|
||||
|
||||
**核心缺陷文件**:`healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalnursestation/AdviceProcessAppMapper.xml`
|
||||
|
||||
`selectInpatientAdvicePage` 查询使用 UNION 组合三种医嘱类型,但只写了两个子查询:
|
||||
|
||||
| 序号 | 表名 | 医嘱类型 | 状态 |
|
||||
|------|------|---------|------|
|
||||
| ✅ 1 | `med_medication_request` | 药品医嘱 | 有 |
|
||||
| ✅ 2 | `wor_service_request` | 诊疗服务医嘱 | 有 |
|
||||
| ❌ 3 | `wor_device_request` | **耗材/器材医嘱** | **缺失** |
|
||||
|
||||
**对比证据**:住院医生站的 `DoctorStationAdviceAppMapper.xml`(行 674-732)和住院医生工作站的 `AdviceManageAppMapper.xml`(行 247-305)都正确包含了 `wor_device_request` 的 UNION 子查询,证明耗材医嘱是系统支持的医嘱类型。
|
||||
|
||||
### 签发流程差异
|
||||
|
||||
从 `AdviceManageAppServiceImpl.java`(行 842-845)可确认:
|
||||
- 药品/服务医嘱签发:状态保持 `DRAFT(1)` + 设置 `performer_check_id`
|
||||
- **耗材医嘱签发**:状态直接设为 `ACTIVE(2)`(不使用 `performer_check_id`)
|
||||
|
||||
### 涉及文件
|
||||
|
||||
| 文件 | 作用 |
|
||||
|------|------|
|
||||
| `AdviceProcessAppMapper.xml` | **需修改** — 缺少 `wor_device_request` UNION 子查询 |
|
||||
| `AdviceProcessAppServiceImpl.java` | **可能需微调** — `therapyEnum` 条件处理(设备医嘱的 `therapy_enum` 为 NULL) |
|
||||
| `InpatientAdviceDto.java` | DTO,已包含 `adviceTable` 字段,可区分医嘱来源表 |
|
||||
| `DeviceRequest.java` | 基础实体,注意:**没有** `performerCheckId` 字段 |
|
||||
| `CommonConstants.java:150` | 常量 `WOR_DEVICE_REQUEST = "wor_device_request"` 已定义 |
|
||||
|
||||
---
|
||||
|
||||
## 三、修复方案
|
||||
|
||||
### Step 1: 在 `AdviceProcessAppMapper.xml` 中添加第三个 UNION 子查询
|
||||
|
||||
在现有的 `wor_service_request` UNION 之后、`ORDER BY T1.status_enum )` 之前,添加 `wor_device_request` 的 UNION 子查询。需映射到 `InpatientAdviceDto` 的所有字段:
|
||||
|
||||
```xml
|
||||
UNION
|
||||
( SELECT DISTINCT T1.encounter_id,
|
||||
T1.tenant_id,
|
||||
#{worDeviceRequest} AS advice_table,
|
||||
T1.id AS request_id,
|
||||
T1.use_start_time AS start_time,
|
||||
T1.use_end_time AS end_time,
|
||||
T1.requester_id AS requester_id,
|
||||
T1.create_time AS request_time,
|
||||
NULL::integer AS skin_test_flag,
|
||||
NULL::integer AS inject_flag,
|
||||
NULL::bigint AS group_id,
|
||||
NULL::bigint AS performer_check_id,
|
||||
T2."name" AS advice_name,
|
||||
T2.id AS item_id,
|
||||
NULL::varchar AS volume,
|
||||
T1.lot_number AS lot_number,
|
||||
T1.quantity AS quantity,
|
||||
T1.unit_code AS unit_code,
|
||||
T1.status_enum AS request_status,
|
||||
NULL::varchar AS method_code,
|
||||
T1.rate_code AS rate_code,
|
||||
NULL::numeric AS dose,
|
||||
NULL::varchar AS dose_unit_code,
|
||||
al1.id AS position_id,
|
||||
al1."name" AS position_name,
|
||||
NULL::integer AS dispense_per_duration,
|
||||
T2.part_percent AS part_percent,
|
||||
NULL::varchar AS condition_definition_name,
|
||||
NULL::integer AS therapy_enum,
|
||||
NULL::integer AS sort_number,
|
||||
NULL::integer AS execute_num,
|
||||
af.day_times,
|
||||
ae.bus_no,
|
||||
ap."name" AS patient_name,
|
||||
al2."name" AS bed_name,
|
||||
ap.gender_enum,
|
||||
ap.birth_date,
|
||||
ap.id AS patient_id,
|
||||
fc.contract_name,
|
||||
diagnosis.condition_names,
|
||||
pra."name" AS admitting_doctor_name,
|
||||
personal_account.balance_amount,
|
||||
personal_account.id AS account_id,
|
||||
NULL::varchar AS category_code,
|
||||
NULL::integer AS dispense_status,
|
||||
NULL::numeric AS unit_price,
|
||||
NULL::numeric AS total_price,
|
||||
NULL::bigint AS stopper_id,
|
||||
T1.update_by AS stopper_name
|
||||
FROM wor_device_request AS T1
|
||||
LEFT JOIN adm_device_definition AS T2
|
||||
ON T2.id = T1.device_def_id AND T2.delete_flag = '0'
|
||||
LEFT JOIN adm_location AS al1
|
||||
ON al1.id = T1.perform_location AND al1.delete_flag = '0'
|
||||
LEFT JOIN adm_encounter ae
|
||||
ON ae.id = T1.encounter_id AND ae.class_enum = #{imp} AND ae.delete_flag = '0'
|
||||
LEFT JOIN adm_patient ap ON ae.patient_id = ap.id AND ap.delete_flag = '0'
|
||||
LEFT JOIN adm_encounter_location ael
|
||||
ON ae.id = ael.encounter_id AND ael.delete_flag = '0'
|
||||
AND ael.status_enum = #{active} AND ael.form_enum = #{bed}
|
||||
LEFT JOIN adm_location al2 ON ael.location_id = al2.id AND al2.delete_flag = '0'
|
||||
LEFT JOIN adm_account aa
|
||||
ON ae.id = aa.encounter_id AND aa.encounter_flag = 1 AND aa.delete_flag = '0'
|
||||
LEFT JOIN fin_contract fc ON aa.contract_no = fc.bus_no AND fc.delete_flag = '0'
|
||||
LEFT JOIN (
|
||||
SELECT aed.encounter_id, STRING_AGG(ccd.name, ', ') AS condition_names
|
||||
FROM adm_encounter_diagnosis aed
|
||||
INNER JOIN cli_condition cc ON cc.id = aed.condition_id AND cc.delete_flag = '0'
|
||||
INNER JOIN cli_condition_definition ccd ON ccd.id = cc.definition_id AND ccd.delete_flag = '0'
|
||||
WHERE aed.delete_flag = '0'
|
||||
GROUP BY aed.encounter_id
|
||||
) AS diagnosis ON ae.id = diagnosis.encounter_id
|
||||
LEFT JOIN adm_encounter_participant aep
|
||||
ON ae.id = aep.encounter_id AND aep.delete_flag = '0'
|
||||
AND aep.status_enum = #{active} AND aep.type_code = #{admittingDoctor}
|
||||
LEFT JOIN adm_practitioner pra ON aep.practitioner_id = pra.id AND pra.delete_flag = '0'
|
||||
LEFT JOIN (
|
||||
SELECT aa.id, aa.encounter_id,
|
||||
(aa.balance_amount -
|
||||
COALESCE(SUM(CASE WHEN aci.status_enum IN (#{billed}, #{billable})
|
||||
THEN aci.total_price ELSE 0 END), 0) +
|
||||
COALESCE(SUM(CASE WHEN aci.status_enum = #{refunded}
|
||||
THEN aci.total_price ELSE 0 END), 0)) AS balance_amount
|
||||
FROM adm_account aa
|
||||
LEFT JOIN adm_charge_item aci ON aa.encounter_id = aci.encounter_id AND aa.delete_flag = '0'
|
||||
WHERE aa.type_code = #{personalCashAccount} AND aa.delete_flag = '0'
|
||||
GROUP BY aa.id, aa.encounter_id, aa.balance_amount
|
||||
) AS personal_account ON personal_account.encounter_id = ae.id
|
||||
LEFT JOIN adm_frequency af ON af.rate_code = T1.rate_code AND af.delete_flag = '0'
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND T1.generate_source_enum = #{doctorPrescription}
|
||||
AND T1.refund_device_id IS NULL
|
||||
AND (T1.based_on_id IS NULL OR T1.based_on_table IS NULL)
|
||||
ORDER BY T1.status_enum )
|
||||
```
|
||||
|
||||
**关键差异注意**:
|
||||
1. `performer_check_id` — 设为 `NULL::bigint`,因为 `wor_device_request` 没有此字段,耗材签发时直接将 `statusEnum` 设为 `ACTIVE(2)`
|
||||
2. `therapy_enum` — 设为 `NULL::integer`,因为耗材医嘱没有治疗类型分类
|
||||
3. `advice_table` — 使用新的参数 `#{worDeviceRequest}`
|
||||
4. WHERE 条件中不需要 `performer_check_id IS NOT NULL` 检查,因为耗材签发后直接为 `ACTIVE(2)` 状态
|
||||
5. 需要排除基于其他医嘱生成的执行记录:`AND (T1.based_on_id IS NULL OR T1.based_on_table IS NULL)`
|
||||
|
||||
### Step 2: 修改 `AdviceProcessAppMapper.java` — 添加参数
|
||||
|
||||
在 `selectInpatientAdvicePage` 方法签名中添加 `worDeviceRequest` 参数:
|
||||
|
||||
```java
|
||||
Page<InpatientAdviceDto> selectInpatientAdvicePage(
|
||||
@Param("page") Page<InpatientAdviceDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<InpatientAdviceParam> queryWrapper,
|
||||
@Param("medMedicationRequest") String medMedicationRequest,
|
||||
@Param("worServiceRequest") String worServiceRequest,
|
||||
@Param("worDeviceRequest") String worDeviceRequest, // 新增
|
||||
// ... 其余参数不变
|
||||
);
|
||||
```
|
||||
|
||||
### Step 3: 修改 `AdviceProcessAppServiceImpl.java` — 传递新参数
|
||||
|
||||
在 `getInpatientAdvicePage` 方法中,调用 mapper 时添加 `CommonConstants.TableName.WOR_DEVICE_REQUEST`:
|
||||
|
||||
```java
|
||||
Page<InpatientAdviceDto> inpatientAdvicePage
|
||||
= adviceProcessAppMapper.selectInpatientAdvicePage(
|
||||
new Page<>(pageNo, pageSize), queryWrapper,
|
||||
CommonConstants.TableName.MED_MEDICATION_REQUEST,
|
||||
CommonConstants.TableName.WOR_SERVICE_REQUEST,
|
||||
CommonConstants.TableName.WOR_DEVICE_REQUEST, // 新增
|
||||
RequestStatus.DRAFT.getValue(), ...);
|
||||
```
|
||||
|
||||
### Step 4: 确保 `therapyEnum` 条件兼容
|
||||
|
||||
当前代码已修复(行 `queryWrapper.and(w -> w.eq("therapy_enum", therapyEnum).or().isNull("therapy_enum"))`),允许 NULL 的 `therapy_enum` 通过。耗材医嘱的 `therapy_enum` 为 NULL,会匹配 "全部" 和 "临时" 两个筛选条件,这是正确的行为。
|
||||
|
||||
---
|
||||
|
||||
## 四、路由决策
|
||||
|
||||
**FIXER**: `guanyu`(后端开发)
|
||||
|
||||
**REASON**: 此 Bug 为纯后端 SQL 查询缺陷——Mapper XML 中 UNION 缺少 `wor_device_request` 子查询,需修改 XML、Mapper 接口、ServiceImpl 调用三处。前端无需改动,属于后端数据查询层的修复,交给后端开发最合适。
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: LLM 分析决策
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
@@ -1,214 +0,0 @@
|
||||
# Bug #716 诸葛亮分析报告
|
||||
|
||||
> **文档类型**: Bug分析
|
||||
> **分析时间**: 2026-06-13 02:33:10
|
||||
> **分析模型**: mimo-v2.5 (LLM深度分析)
|
||||
|
||||
---
|
||||
|
||||
## 基本信息
|
||||
- **Bug #**: 716
|
||||
- **标题**: 【住院医生站-临床医嘱】住院医嘱录入界面:医嘱类型/耗材仓库显示不符合业务逻辑,且开嘱医生列无回写值
|
||||
- **模块**: 住院医生工作站
|
||||
- **提出人**: 陈显精
|
||||
|
||||
---
|
||||
|
||||
I have enough evidence now. Let me provide the comprehensive analysis.
|
||||
|
||||
---
|
||||
|
||||
## Bug #716 分析报告
|
||||
|
||||
### 一、Bug 理解
|
||||
|
||||
**原文引用 — 禅道 Bug 标题:**
|
||||
> 【住院医生站-临床医嘱】住院医嘱录入界面:医嘱类型/耗材仓库显示不符合业务逻辑,且开嘱医生列无回写值
|
||||
|
||||
**重现步骤:**
|
||||
1. 登录账号 `doctor1`,在"住院医生工作站"选中患者,点击【新增】医嘱
|
||||
2. 点击【医嘱类型】下拉框,观察显示内容
|
||||
3. 在添加含耗材的医嘱时,观察【耗材仓库】字段选择列表的显示内容
|
||||
4. 保存并签发该医嘱,查看医嘱列表明细中【开嘱医生】列的显示
|
||||
|
||||
**结果:**
|
||||
1. 医嘱类型显示为数字(如"2")
|
||||
2. 耗材仓库选择框显示的是批号(如"4444444")
|
||||
3. 已保存/签发的医嘱,【开嘱医生】列显示为"-"
|
||||
|
||||
**期望:**
|
||||
1. 医嘱类型下拉应展示业务名称(如"耗材"),而非数字
|
||||
2. 耗材仓库选择列表应展示"仓库名称",而非批号
|
||||
3. 【开嘱医生】应显示当前操作医生的姓名
|
||||
|
||||
**附图关键信息:**
|
||||
- 图2506:红色箭头标注"显示数字",指向医嘱类型区域显示"2"
|
||||
- 图2507:红色箭头标注"应该显示耗材仓库 不是批号",耗材仓库下拉选中值为"4444444"
|
||||
- 图2508:红色箭头标注"未回写",新保存的耗材医嘱【开嘱医生】列显示"-"
|
||||
|
||||
**综合总结:** 用户在住院医生工作站新增耗材类医嘱时,遇到三个显示/数据问题:(1) 医嘱类型下拉框的 el-select 显示原始数字编码而非业务名称;(2) 耗材仓库下拉框显示的是 inventoryId/批号而非仓库名称标签;(3) 新保存的耗材医嘱在列表中开嘱医生列显示"-",说明 requesterId 的字典翻译或数据回写链路断裂。
|
||||
|
||||
---
|
||||
|
||||
### 二、根因分析
|
||||
|
||||
#### 问题1:医嘱类型显示数字
|
||||
|
||||
**目标文件:**
|
||||
- `healthlink-his-ui/src/views/inpatientDoctor/home/components/order/index.vue` (行 312-357)
|
||||
|
||||
**根因:** 内联编辑行的医嘱类型 el-select 使用 `:model-value="getRowSelectValue(scope.row)"` 单向绑定。`@change` 处理器直接修改 `filterPrescriptionList[scope.rowIndex].adviceType`,但 `filterPrescriptionList` 是 computed 属性,其返回的数组是 `prescriptionList.value.filter(...)` 的结果。虽然修改的是同一个对象引用,但 Vue 的 computed 缓存机制可能导致 el-select 未及时重新评估 `model-value`,从而显示原始值而非匹配的 label。
|
||||
|
||||
此外,`getRowSelectValue` 返回 `row.adviceType`(数字),而选项的 `value` 也是数字 `2`。如果 `adviceType` 在某处被转为字符串 `"2"`(例如从 `contentJson` 反序列化时),则 `model-value="2"` (string) 与 `value: 2` (number) 不匹配,el-select 会显示原始值。
|
||||
|
||||
**关键代码:**
|
||||
```javascript
|
||||
// index.vue:1202
|
||||
function getRowSelectValue(row) {
|
||||
if (row.adviceType == 1 && row.categoryCode) {
|
||||
return '1-' + row.categoryCode;
|
||||
}
|
||||
if (row.adviceType == 7) {
|
||||
return 7;
|
||||
}
|
||||
return row.adviceType; // ← 可能是 string "2" 而非 number 2
|
||||
}
|
||||
```
|
||||
|
||||
**影响范围:** `index.vue:316` 的 el-select `:model-value` 绑定
|
||||
|
||||
---
|
||||
|
||||
#### 问题2:耗材仓库显示批号
|
||||
|
||||
**目标文件:**
|
||||
- `healthlink-his-ui/src/views/inpatientDoctor/home/components/order/OrderForm.vue` (行 479-498)
|
||||
|
||||
**根因:** 耗材(adviceType==2)的药房/仓库下拉框使用 `v-model="row.inventoryId"`,el-option 的 `:value="item.inventoryId"`。当 `row.inventoryId` 与 stockList 中的 `item.inventoryId` 类型不一致时(一个是 string,一个是 number),el-select 无法匹配选项,回退显示原始 `inventoryId` 值。
|
||||
|
||||
后端 `AdviceInventoryDto.inventoryId` 使用了 `@JsonSerialize(using = ToStringSerializer.class)`,Jackson 会将其序列化为字符串。但在 `setValue` 函数中,`inventoryId` 从 `selectedStock?.inventoryId` 赋值,而 `selectedStock` 来自 `mergedStockList`(合并了 `inventoryList` 和 `priceList`)。如果 `priceList` 中也有 `inventoryId` 字段且为 number 类型,`{ ...item, ...priceList[index] }` 的 spread 会覆盖为 number,导致类型不一致。
|
||||
|
||||
**关键代码:**
|
||||
```javascript
|
||||
// index.vue:2206
|
||||
mergedStockList = row.inventoryList.map((item, index) => {
|
||||
return { ...item, ...priceList[index] }; // priceList 可能覆盖 inventoryId 类型
|
||||
});
|
||||
|
||||
// OrderForm.vue:480
|
||||
<el-select v-model="row.inventoryId" ...>
|
||||
<el-option :value="item.inventoryId" :label="`${item.locationName} 批次号: ...`" />
|
||||
</el-select>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### 问题3:开嘱医生显示"-"
|
||||
|
||||
**目标文件:**
|
||||
- 后端:`AdviceManageAppServiceImpl.java` (行 817-910, `handDevice` 方法)
|
||||
- 前端:`index.vue` (行 1030-1033, 数据转换)
|
||||
|
||||
**根因:** 后端 `AdviceSaveDto` 构造函数设置了 `this.practitionerId = SecurityUtils.getLoginUser().getPractitionerId()`。但 `handDevice` 方法中,`requesterId` 只在 `if (is_save)` 分支内设置:
|
||||
```java
|
||||
if (is_save) {
|
||||
deviceRequest.setRequesterId(regAdviceSaveDto.getPractitionerId());
|
||||
}
|
||||
```
|
||||
|
||||
当用户直接签发(`adviceOpType=SIGN_ADVICE`)时,`is_save=false`,`requesterId` 不会被设置到 `DeviceRequest` 对象上。虽然 MyBatis-Plus 的 `saveOrUpdate` 默认跳过 null 字段(不会覆盖已有的 `requester_id`),但如果这是**首次签发**(未先保存),则 `requester_id` 在数据库中为 NULL。
|
||||
|
||||
更重要的是,SQL 查询的列别名 `requester_id_dict_text`(下划线命名)与 DTO 字段 `requesterId_dictText`(混合命名)不匹配。MyBatis 的 `mapUnderscoreToCamelCase` 会将 `requester_id_dict_text` 映射为 `requesterIdDictText`,而非 `requesterId_dictText`。虽然 `@Dict` 注解理论上会补填,但如果 `requesterId` 本身为 NULL,则字典查询也返回 NULL,最终前端回退到 `'-'`。
|
||||
|
||||
---
|
||||
|
||||
### 三、修复方案
|
||||
|
||||
#### 修复1:医嘱类型 el-select 显示数字
|
||||
|
||||
**文件:** `healthlink-his-ui/src/views/inpatientDoctor/home/components/order/index.vue`
|
||||
|
||||
**修改内容:**
|
||||
1. 在 `getRowSelectValue` 函数中,确保返回值类型与选项 `value` 类型一致(统一为 number)
|
||||
2. 在 `@change` 处理器中,使用 `prescriptionList.value[index]` 直接操作源数据,而非通过 computed 属性
|
||||
|
||||
```javascript
|
||||
// 修复 getRowSelectValue,确保返回 number
|
||||
function getRowSelectValue(row) {
|
||||
const adviceType = Number(row.adviceType);
|
||||
if (adviceType === 1 && row.categoryCode) {
|
||||
return '1-' + row.categoryCode;
|
||||
}
|
||||
if (adviceType === 7) {
|
||||
return 7;
|
||||
}
|
||||
return isNaN(adviceType) ? undefined : adviceType;
|
||||
}
|
||||
```
|
||||
|
||||
#### 修复2:耗材仓库显示批号
|
||||
|
||||
**文件:** `healthlink-his-ui/src/views/inpatientDoctor/home/components/order/OrderForm.vue`
|
||||
|
||||
**修改内容:**
|
||||
1. 在耗材(adviceType==2)的 el-select 中,使用 `:value="String(item.inventoryId)"` 和 `v-model` 统一为 string 类型
|
||||
2. 或者在 `setValue` 函数中确保 `inventoryId` 类型一致
|
||||
|
||||
```javascript
|
||||
// OrderForm.vue 中耗材部分,统一 inventoryId 为 string
|
||||
<el-option
|
||||
v-for="item in row.stockList"
|
||||
:key="item.inventoryId"
|
||||
:value="String(item.inventoryId)"
|
||||
:label="`${item.locationName} 批次号: ${item.lotNumber ?? '-'} 库存:${...}`"
|
||||
/>
|
||||
```
|
||||
|
||||
同时在 `index.vue` 的 `setValue` 中:
|
||||
```javascript
|
||||
inventoryId: selectedStock?.inventoryId ? String(selectedStock.inventoryId) : undefined,
|
||||
```
|
||||
|
||||
#### 修复3:开嘱医生显示"-"
|
||||
|
||||
**文件:** `healthlink-his-server/.../AdviceManageAppServiceImpl.java`
|
||||
|
||||
**修改内容:**
|
||||
在 `handDevice` 方法中,将 `requesterId` 的设置移到 `if (is_save)` 块外面,确保签发操作也设置 `requesterId`:
|
||||
|
||||
```java
|
||||
// handDevice 方法中,longInsertOrUpdateList 和 tempInsertOrUpdateList 的循环内
|
||||
// 将 requesterId 设置移到 if (is_save) 块外
|
||||
deviceRequest.setRequesterId(regAdviceSaveDto.getPractitionerId()); // ← 移到这里
|
||||
if (is_save) {
|
||||
deviceRequest.setBusNo(...);
|
||||
deviceRequest.setGenerateSourceEnum(...);
|
||||
// ... 其他仅保存时设置的字段
|
||||
}
|
||||
```
|
||||
|
||||
同样在 `handMedication` 和 `handService` 方法中检查是否存在相同问题。
|
||||
|
||||
**附加修复(保险措施):** 在前端数据转换中,确保 `requesterId_dictText` 的回退逻辑更健壮:
|
||||
```javascript
|
||||
requesterId_dictText: item.requesterId_dictText
|
||||
|| (item.requesterId ? (String(item.requesterId) === String(userStore.practitionerId) ? userStore.name : '') : '')
|
||||
|| '-',
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 四、路由决策
|
||||
|
||||
**FIXER:** `zhaoyun`(前端开发)+ `guanyu`(后端开发)
|
||||
|
||||
**REASON:** 问题1和问题2是纯前端 el-select 绑定/类型问题,由赵云修复;问题3涉及后端 `handDevice` 方法中 `requesterId` 设置位置不当,需要关羽修改后端 Java 代码。两个角色各负责独立的修复范围,无冲突,可并行工作。
|
||||
|
||||
---
|
||||
|
||||
## 路由决策
|
||||
- **FIXER_ID**: guanyu
|
||||
- **修复 Agent**: guanyu(后端)
|
||||
- **原因**: ** 问题1和问题2是纯前端 el-select 绑定/类型问题,由赵云修复;问题3涉及后端 `handDevice` 方法中 `requesterId` 设置位置不当,需要关羽修改后端 Java 代码。两个角色各负责独立的修复范围,无冲突,可并行工作。
|
||||
|
||||
> ⚠️ 修复人员请先验证以上分析是否正确,再执行修复。
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user