docs: 登记 T-302 体检 HTTP 端点并同步快照

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ila
2026-07-08 21:17:02 +08:00
co-authored by Claude Opus 4.8
parent e67664da45
commit f293aaef00
3 changed files with 17 additions and 6 deletions
+8 -5
View File
@@ -41,6 +41,7 @@
| `mapping/health_record.go` `mapping/checkid.go` | 已有 | 健康档案映射草稿、字典快照注入、主数据反查、创建请求组装(含 createUser/createUnit 派生)、必填/码表校验、确定性 checkId |
| `mapping/health_record_baseline_test.go` | 已有 | docx 风格、联调风格、脏数据映射回归样本 |
| `handler/health_record.go` | 已有 | `GET /api/health-record/find` 查询端点,回写平台完整响应 |
| `handler/health_check.go` | 已有 | 体检端点 `GET /api/health-check/last`(最近一次)+ `/list`(年度名单)|
| `server.go` `osi_client.go` | 已有 | server 模式起 HTTP 服务、注册路由;`buildOSIClient` 共用构造(verify 与 server 复用) |
| `pipeline/` 等 | 待建 | 后续任务 |
@@ -76,9 +77,11 @@ go run . -mode deliver -config config.yaml.example
# config.yaml 已迁为 Go 嵌套 osi: 结构并从中读凭据;仅身份证走环境变量,不落文件/命令行历史
OSI_VERIFY_ID_CARD=<idCard> go run . -verify-jkda -config config.yaml
# server 模式 HTTP 查询端点(已实测;用真实 config.yaml,默认仅绑 127.0.0.1:8080)
# server 模式 HTTP 查询端点(用真实 config.yaml,默认仅绑 127.0.0.1:8080)
go run . -mode server # 起服务(阻塞)
curl "http://127.0.0.1:8080/api/health-record/find?idCard=<idCard>" # 返回平台完整档案 JSON
curl "http://127.0.0.1:8080/api/health-record/find?idCard=<idCard>" # 档案(完整 JSON)
curl "http://127.0.0.1:8080/api/health-check/last?idCard=<idCard>" # 最近一次体检
curl "http://127.0.0.1:8080/api/health-check/list?checkYear=2025&idCard=<idCard>" # 年度已检/未检名单
# 本地 Python 联调查询(脚本硬编码凭据,勿提交)
python3 scripts/query_health_record.py
@@ -88,9 +91,9 @@ python3 scripts/query_health_record.py
> 读先行调整(2026-07-08):写入(T-206/T-204)被厂家授权锁死,先推其余业务线查询。
1. ✅ T-301 体检查询打通(`osi.LastHealthCheck` JKTJLSJL00002;字段清单 docs/04 §11)——待 `go test ./...` 复验。
2. **T-302 体检 HTTP 查询端点**(复用 T-208 handler 模式)——当前可领。
3. 并行催厂家(docs/06 ★ 优先催办):写入授权+测试档案、缺失列表/单查 serviceId、checkId/完整度规则。
1. ✅ T-301/T-305 体检查询(最近一次 + 名单)、T-302 体检 HTTP 端点 —— 均已完成。
2. **T-303 老年人查询**(自理/体质,serviceId 部分待 B4)——起 Python 探针试探。
3. 并行催厂家(docs/06 ★ 优先催办):写入授权+测试档案、缺失单查/老年人 serviceId、checkId/完整度规则。
4. 授权到位后回到 T-206 真实 create 验收 → T-204。
## 维护规则