liuyun 19876fdadd chore(openspec): 归档 C1/C2/C3 change,spec 合并进主 specs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-15 01:13:08 +08:00

28 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# backend/abnormal Specification
## Purpose
定义服务机构端异常上报域的后端行为——异常上报(9 宫格)与扑空(未遇)专门形态。
## Requirements
### Requirement: 异常上报
`POST /abnormal/report` MUST 仅 abnormal_type 必选,其余(desc/voice/photo/关联)可选;关联 record 或 order(扑空)。
#### Scenario: 分类必选其余可选
- **WHEN** 上报异常只选分类、其余留空
- **THEN** 允许提交(宁要一条没人名的异常也不要漏报)
### Requirement: 扑空专门形态
扑空(未遇)MUST:工单转 not_met(not_met_reason/not_met_at)+ 写 record_abnormal(到访时间/定位/原因必留);不产生 record、不计费。与「逾期未做」(到点无记录)严格区分。
#### Scenario: 扑空留证据
- **WHEN** 护理员登记未遇(老人不在/拒绝/改期)
- **THEN** 到访时间+定位+原因必留,工单转 not_met,不产生服务记录
### Requirement: 异常列表
`GET /abnormal/list` MUST 返回异常列表(后台 B4),按 abnormal_type/notify_status/handle_status/老人 筛选。
#### Scenario: 质控查看异常
- **WHEN** 质控员打开异常列表
- **THEN** 看到异常分类、状态、关联老人