Skip to content

Create a consultation report task ​

POST/ai-doc/report

Detailed Report Fields & UI Mapping

For complete field definitions and UI block mapping (reviews, body map highlights, 3-stage treatments, vet orders), please refer to Report Fields & UI Mapping.

Request URL ​

text
POST https://open-api.habitaxx.com/v1/ms-ai-fast/ai-doc/report

Request headers ​

http
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/json

Request body ​

json
{
  "session_id": "<SESSION_ID>",
  "report_type": 1
}

Request fields ​

FieldTypeRequiredDescription
session_idstringYesSmart Consultation session ID.
report_typeintegerNoDefaults to 1; allowed values are 1, 2, 3, 4, and 7. Submit once for a normal session flow.

report_type values (report fragments):

report_typeFragment
1Review / chief-complaint recap
2Diagnosis
3Treatment advice
4Veterinary instructions
7Supplements

The platform generates all of these fragments; report_type only affects the context of this task (1 includes the image-recognition result). Submit the report task once per session and read the fragments through report_contents[].report_index.

Response example ​

json
{
  "code": 200,
  "message": "success",
  "data": {
    "session_id": "<SESSION_ID>",
    "report_id": 10001,
    "task": {
      "task_id": "<TASK_ID>",
      "task_type": "ai_doc_report_generate",
      "status": "pending",
      "progress": 0,
      "result_payload_json": null,
      "error_code": null,
      "started_at": null,
      "finished_at": null,
      "created_at": "2026-09-14T10:10:00+08:00",
      "updated_at": "2026-09-14T10:10:00+08:00"
    },
    "analysis": null
  }
}

Response fields ​

FieldTypeDescription
session_idstringSmart Consultation session ID.
report_idinteger/nullReport ID.
taskobject/nullAsynchronous report task. Use its task_id for status queries.
task.task_idstringTask ID.
task.task_typestringTask type; always ai_doc_report_generate for report tasks.
task.statusstringpending, processing, retrying, succeeded, failed, or canceled.
task.progressintegerUsually from 0 to 100.
task.result_payload_jsonobject/nullPublic result summary; contains only report_type and gateway_request_id.
task.error_codeinteger/nullTask error code.
task.started_atstring/nullTask start time (UTC, no timezone offset).
task.finished_atstring/nullTask finish time (UTC, no timezone offset).
task.created_atstringTask creation time (UTC+8, no timezone offset).
task.updated_atstringTask update time (UTC+8, no timezone offset).
analysisobject/nullSynchronous analysis result; normally null for a report task.

Next step and polling ​

  • When task.task_id is present: poll with Query an asynchronous task every 4 seconds, with a 5-minute ceiling; once status is succeeded, read the report with Retrieve a complete report.
  • When task is null (the report was generated synchronously): do not poll; read report_id from the same response, or call GET /medical-record?session_id=<SESSION_ID>.
  • On failed or canceled: resubmit with Retry a failed task instead of creating another report task for the same session.

Submit the report task once per session; do not submit one task per report_type.

最近更新

Qijie Open Platform · API Documentation