健康报告查询 API

按开放平台报告 ID 拉取健康报告完整快照,含解读结果与文件路径等字段。

概述

接口路径前缀:/open/v1/health-reports

方法路径说明
GET/open/v1/health-reports/{openReportId}根据报告 ID 获取完整快照

鉴权说明

AppKey + 签名(父级中间件组)。完整算法见鉴权说明

Header类型必填说明
X-App-Idstring控制台「凭证管理」中的 App ID
X-TimestampintegerUnix 秒级时间戳,有效窗口 ±5 分钟
X-Signaturestring请求签名,见鉴权说明

健康报告快照

openReportId 为开放平台报告主键(health_reports.id)。

GET/open/v1/health-reports/{openReportId}

路径参数

参数类型说明
openReportIdinteger开放平台报告 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 字段说明

字段类型说明
idinteger报告 ID
app_idinteger应用 ID
open_user_idinteger开放平台用户 ID
open_member_idinteger | null家庭成员 ID
request_report_idstring | null请求侧报告 ID
report_typestring | null报告类型
file_pathstring | null报告文件路径 / URL
interpretation_resultstring | null解读结果摘要
interpretation_detailobject | null解读详情
interpretation_methodstring | null解读方式
is_viewedboolean是否已查看
uploaded_atstring | null上传时间(ISO 8601)
examined_atstring | null检查时间(ISO 8601)
interpreted_atstring | null解读时间(ISO 8601)

错误码

codeHTTP 状态说明处理建议
HTTP_404404报告不存在(findOrFail确认 openReportId 是否正确
HTTP_401401签名校验失败或应用不存在检查签名算法与时间戳
HTTP_429429请求频率超限降速并指数退避重试