chore: record session journal - 握力环训练趣味化
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"file":".trellis/tasks/05-07-dosage-bag-count/research/current-code.md","reason":"Use the documented field semantics during review to ensure the new dosage bag count does not collide with the decoction-only bags_per_dose field."}
|
||||
@@ -0,0 +1 @@
|
||||
{"file":".trellis/tasks/05-07-dosage-bag-count/research/current-code.md","reason":"Summarizes the affected code paths, current field semantics, and why a new field is required instead of reusing bags_per_dose."}
|
||||
@@ -0,0 +1,69 @@
|
||||
# 开方用量增加袋数选项
|
||||
|
||||
## Goal
|
||||
|
||||
在开方流程中为“用量”补充“袋数”信息,并在处方业务订单详情里同步展示,解决当前只能记录每袋克数/毫升数、不能表达一次服用几袋的问题。
|
||||
|
||||
## What I already know
|
||||
|
||||
* 诊间开方共用组件是 `admin/src/components/tcm-prescription/index.vue`
|
||||
* 患者列表-开方页面是 `admin/src/views/consumer/prescription/index.vue`
|
||||
* 处方业务订单详情展示位于 `admin/src/views/consumer/prescription/order_list.vue`
|
||||
* H5 对应详情页是 `admin/src/views/consumer/prescription/order_list_h5.vue`
|
||||
* 当前 `bags_per_dose` 字段已存在,但语义是“饮片每贴出包数”,不适合复用为浓缩水丸/开方用量袋数
|
||||
* 当前多个浓缩水丸展示逻辑错误地把 `bags_per_dose` 当作“一次几包”使用,本次应与新字段区分
|
||||
|
||||
## Assumptions (temporary)
|
||||
|
||||
* 新增字段命名为 `dosage_bag_count`
|
||||
* 新字段主要用于“浓缩水丸”开方场景;饮片继续使用原有 `bags_per_dose`
|
||||
* “用量袋数”控件放在“用量”右侧,不单独增加标题,仅提供 `1~5袋` 选项
|
||||
* 业务订单详情中的“用量”展示为“每袋数值 + 单位 + 袋数”;无袋数时回退为原展示
|
||||
* 处方查看/H5 详情/处方笺相关依赖同一处方数据的地方,同步使用新字段,避免展示串义
|
||||
|
||||
## Open Questions
|
||||
|
||||
* 无。按上述假设先实现,如用户补充再调整。
|
||||
|
||||
## Requirements
|
||||
|
||||
* 在诊间开方共用组件中新增 `dosage_bag_count` 表单字段、默认值、回填、保存参数
|
||||
* 在患者列表-开方页面中新增 `dosage_bag_count` 表单字段、默认值、回填、保存参数
|
||||
* 后端处方模型/校验/逻辑支持 `dosage_bag_count` 的新增与编辑保存
|
||||
* 补充数据库变更脚本,为处方表新增 `dosage_bag_count`
|
||||
* 处方业务订单详情“用量”展示袋数
|
||||
* 同步修正当前误把 `bags_per_dose` 当成浓缩水丸袋数的相关前端展示/文案逻辑
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
* [ ] 诊间“问诊列表-开方”中,用量旁可选择 `1袋` 到 `5袋`
|
||||
* [ ] “患者列表-开方”中,用量旁可选择 `1袋` 到 `5袋`
|
||||
* [ ] 保存后重新打开处方,袋数可正确回填
|
||||
* [ ] 处方业务订单详情“用量”可显示袋数
|
||||
* [ ] 饮片“每贴出包数”行为不受影响
|
||||
* [ ] 不再使用饮片字段 `bags_per_dose` 充当浓缩水丸袋数
|
||||
|
||||
## Definition of Done
|
||||
|
||||
* 代码修改完成
|
||||
* 相关 lint / type-check 可通过
|
||||
* 关键展示链路已自检
|
||||
|
||||
## Out of Scope
|
||||
|
||||
* 非处方详情页之外的历史报表/统计口径调整
|
||||
* 对既有数据做批量迁移或回填
|
||||
|
||||
## Technical Notes
|
||||
|
||||
* 诊间开方共用组件:`admin/src/components/tcm-prescription/index.vue`
|
||||
* 患者列表开方:`admin/src/views/consumer/prescription/index.vue`
|
||||
* 业务订单详情:`admin/src/views/consumer/prescription/order_list.vue`
|
||||
* H5 业务订单详情:`admin/src/views/consumer/prescription/order_list_h5.vue`
|
||||
* 后端处方逻辑:`server/app/adminapi/logic/tcm/PrescriptionLogic.php`
|
||||
* 后端校验:`server/app/adminapi/validate/tcm/PrescriptionValidate.php`
|
||||
* 处方模型:`server/app/common/model/tcm/Prescription.php`
|
||||
|
||||
## Research References
|
||||
|
||||
* [`research/current-code.md`](research/current-code.md) — 当前字段语义与受影响文件梳理
|
||||
@@ -0,0 +1,27 @@
|
||||
# 当前代码梳理
|
||||
|
||||
## 目标范围
|
||||
|
||||
* 诊间开方:`admin/src/components/tcm-prescription/index.vue`
|
||||
* 患者列表开方:`admin/src/views/consumer/prescription/index.vue`
|
||||
* 处方业务订单详情:`admin/src/views/consumer/prescription/order_list.vue`
|
||||
* H5 处方业务订单详情:`admin/src/views/consumer/prescription/order_list_h5.vue`
|
||||
* 后端处方保存:`server/app/adminapi/logic/tcm/PrescriptionLogic.php`
|
||||
* 后端处方校验:`server/app/adminapi/validate/tcm/PrescriptionValidate.php`
|
||||
|
||||
## 已有字段
|
||||
|
||||
* `dosage_amount`:当前用于记录用量数值;浓缩水丸场景下表示每袋克数
|
||||
* `dosage_unit`:用量单位,当前主要是 `g`/`ml`
|
||||
* `bags_per_dose`:已有字段,仅适用于饮片“每贴出包数(1-9包)`
|
||||
|
||||
## 当前问题
|
||||
|
||||
* 需求要新增“用量袋数”,但现有 `bags_per_dose` 不能直接复用,否则会与饮片语义冲突
|
||||
* 部分浓缩水丸展示逻辑把 `bags_per_dose` 当“一次几包”使用,存在语义串用
|
||||
|
||||
## 结论
|
||||
|
||||
* 需要新增独立字段,例如 `dosage_bag_count`
|
||||
* 前端开方入口、后端保存链路、详情展示链路都要接通该字段
|
||||
* 饮片原有 `bags_per_dose` 不应改语义
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"id": "dosage-bag-count",
|
||||
"name": "dosage-bag-count",
|
||||
"title": "开方用量增加袋数选项",
|
||||
"description": "",
|
||||
"status": "completed",
|
||||
"dev_type": null,
|
||||
"scope": null,
|
||||
"package": null,
|
||||
"priority": "P2",
|
||||
"creator": "codex-agent",
|
||||
"assignee": "codex-agent",
|
||||
"createdAt": "2026-05-07",
|
||||
"completedAt": "2026-05-11",
|
||||
"branch": null,
|
||||
"base_branch": "long-0507",
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": null,
|
||||
"relatedFiles": [],
|
||||
"notes": "",
|
||||
"meta": {}
|
||||
}
|
||||
Reference in New Issue
Block a user