健康报告查询 API
按开放平台报告 ID 拉取健康报告完整快照,含解读结果与文件路径等字段。
概述
接口路径前缀:/open/v1/health-reports
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /open/v1/health-reports/{openReportId} | 根据报告 ID 获取完整快照 |
鉴权说明
AppKey + 签名(父级中间件组)。完整算法见鉴权说明。
| Header | 类型 | 必填 | 说明 |
|---|---|---|---|
X-App-Id | string | 是 | 控制台「凭证管理」中的 App ID |
X-Timestamp | integer | 是 | Unix 秒级时间戳,有效窗口 ±5 分钟 |
X-Signature | string | 是 | 请求签名,见鉴权说明 |
健康报告快照
openReportId 为开放平台报告主键(health_reports.id)。
GET/open/v1/health-reports/{openReportId}
路径参数:
| 参数 | 类型 | 说明 |
|---|---|---|
openReportId | integer | 开放平台报告 ID(health_reports.id) |
请求示例:
GET /open/v1/health-reports/1001
X-App-Id: 100023
X-Timestamp: 1743494400
X-Signature: ...成功响应(200 OK):
{
"success": true,
"code": 0,
"message": "获取成功",
"data": {
"id": 1001,
"app_id": 100023,
"open_user_id": 8801,
"open_member_id": 1313,
"request_report_id": "partner-rpt-001",
"report_type": "ECG",
"file_path": "https://example.com/reports/1001.pdf",
"interpretation_result": "窦性心律,大致正常心电图",
"interpretation_detail": {},
"interpretation_method": "AI",
"is_viewed": false,
"uploaded_at": "2026-07-20T10:30:00+08:00",
"examined_at": "2026-07-20T10:28:00+08:00",
"interpreted_at": "2026-07-20T10:32:00+08:00"
},
"timestamp": "2026-07-20T10:33:00+08:00"
}data 字段说明:
| 字段 | 类型 | 说明 |
|---|---|---|
id | integer | 报告 ID |
app_id | integer | 应用 ID |
open_user_id | integer | 开放平台用户 ID |
open_member_id | integer | null | 家庭成员 ID |
request_report_id | string | null | 请求侧报告 ID |
report_type | string | null | 报告类型 |
file_path | string | null | 报告文件路径 / URL |
interpretation_result | string | null | 解读结果摘要 |
interpretation_detail | object | null | 解读详情 |
interpretation_method | string | null | 解读方式 |
is_viewed | boolean | 是否已查看 |
uploaded_at | string | null | 上传时间(ISO 8601) |
examined_at | string | null | 检查时间(ISO 8601) |
interpreted_at | string | null | 解读时间(ISO 8601) |
错误码
| code | HTTP 状态 | 说明 | 处理建议 |
|---|---|---|---|
HTTP_404 | 404 | 报告不存在(findOrFail) | 确认 openReportId 是否正确 |
HTTP_401 | 401 | 签名校验失败或应用不存在 | 检查签名算法与时间戳 |
HTTP_429 | 429 | 请求频率超限 | 降速并指数退避重试 |