Smart Consultation Report Fields & UI Mapping
This document provides a comprehensive breakdown of all response fields, a full-tree JSON example, UI component mapping, and chunk assembly logic for the Smart Consultation Report (module_type = 1).
How to Obtain Reports
- Method 1 (Recommended): Call
GET /medical-record?session_id=<SESSION_ID>or?report_id=<REPORT_ID>to retrieve the aggregatedreportobject directly. - Method 2: Read the
report_contentschunk array via task polling or detail endpoints, and perform Deep Merge on the frontend (see reference code at the bottom).
Complete Annotated Report JSON Tree (100% Full Structure)
Below is the fully expanded JSON schema showing all levels and leaf properties. Frontend developers can directly map this structure to TypeScript interfaces and component props:
{
/* ================= 1. Top-Level Metadata (medical_record Table) ================= */
"id": 10086, // [int] Primary record ID
"session_id": "session_6407c5cc22f84c5a", // [string] Associated consultation session ID
"pet_profile_id": 44, // [int] Associated pet profile ID
"module_type": 1, // [int] Module ID (1: Smart Consultation, 5: Image Recognition)
"report_type": "v1", // [int] Report type (1: Routine Chief Complaint Report)
"status": 2, // [int] Status (0: Not started, 1: Generating, 2: Completed, 3: Failed)
"summary": "The pet presented with frequent sneezing and watery nasal discharge...", // [string] Overall consultation dialogue summary
"report_time": "2026-09-16 14:30:00", // [string] Completion timestamp (YYYY-MM-DD HH:mm:ss)
"lang": "en-US", // [string] Report language (zh-CN, en-US)
/* ================= 2. Pet Card & Basic Profile (pet_info Object) ================= */
"pet_info": {
"id": 44, // [int] Pet profile ID
"name": "Mochi", // [string] Pet name
"avatar": "https://oss.example.com/pet.jpg", // [string] Avatar image URL
"pet_type": 1, // [int] Species enum (1: Cat, 2: Dog, 3: Other exotic)
"pet_variety": "British Shorthair", // [string] Breed name
"gender": 1, // [int] Gender (1: Male, 2: Female, null: Unknown)
"birthday": "2024-05-01", // [string] Birthdate (YYYY-MM-DD)
"age": "1 yr 4 mos", // [string] Computed display age
"weight": "4.5", // [string] Registered weight in kg
"is_neutered": 1 // [int] Neutered status (0: Unneutered, 1: Neutered, null: Unknown)
},
/* ================= 3. Core Report Contents (report Object / Merged Chunks) ================= */
"report": {
/* --- Chunk 1: Case Review (review · report_index = 1) --- */
"review": {
"chiefComplaint": "Frequent sneezing with clear nasal discharge, slight appetite drop for 2 days", // [string] Chief complaint (Primary issue)
"symptoms": "Normal temp 38.6°C, occasional dry cough, fair spirits, no conjunctivitis, no vomiting/diarrhea" // [string] Detailed symptom progression
},
/* --- Chunk 2: Diagnosis & Recommended Checks (result · report_index = 2) --- */
"result": {
"diagnosis": {
"suspected": "Feline Upper Respiratory Infection (Suspected FHV-1 or Mycoplasma)", // [string] Primary suspected disease title
"severity_of_the_illness": "Medium", // [string] 4-level severity: Slight / Medium / Medium_high / Severe
"probability_level": "high", // [string] Confidence: high / medium / low
"description": "Feline Upper Respiratory Infection is a common contagious illness...", // [string] General medical explanation
"basis": "Given the incomplete vaccination history and sudden onset of paroxysmal sneezing with catarrhal discharge..." // [string] AI clinical reasoning basis
},
"externalImage": ["五官", "皮肤"], // [string[]] Body-surface areas to highlight (Chinese values from a fixed list)
"internalImage": ["气管", "肺部"], // [string[]] Internal organs to highlight (Chinese values from a fixed list)
"skeletalImage": [], // [string[]] Skeletal areas to highlight (empty array if normal)
"EssentialCheckItems": "1. **Feline Respiratory 5-plex PCR**: Differentiate FHV, FCV, Chlamydia\n2. **Complete Blood Count (CBC)**: Assess inflammatory response", // [string] Essential clinic tests (Markdown supported)
"RecommendCheckItems": "1. **Serum Amyloid A (SAA)**: Acute phase inflammatory marker\n2. **Thoracic X-ray (DR)**: Rule out secondary pneumonia", // [string] Recommended secondary tests (Markdown supported)
"other_suspected_diagnosis": [ // [object[]] Differential diagnosis list
{
"suspected": "Allergic Rhinitis", // [string] Secondary disease name
"severity_of_the_illness": "Slight", // [string] Same 4-value enum as above
"description": "Nasal mucosa hypersensitivity triggered by dust, pollen, or fumes.", // [string] Description
"basis": "Consider if recent bentonite cat litter change or air freshener usage occurred." // [string] Differential basis
}
]
},
/* --- Chunk 3: Multi-Stage Treatment Advice (advice · report_index = 3) --- */
"advice": {
"is_urgent": "0", // [string] Emergency hospital alert flag ("1": Emergency alert banner, "0": Regular home care)
/* [Tab 1] Initial Treatment Stage (Home Care / Early Phase) */
"Initial_Treatment": {
"KeyPoint": "Maintain warm ambient temperature and humidity, keep nostrils clear, prevent secondary bacterial infection", // [string] Stage key action
"CheckPoint": "Watch closely for fever above 39.5°C, transition to yellow purulent discharge, or complete anorexia", // [string] Owner warning signs
"medications": [ // [object[]] Recommended medication/care measures
{
"type": "Medication", // [string] Category ("Medication" / "Diet" / "Care" / "Injection" / "Surgery")
"cause": "Broad-spectrum coverage against Mycoplasma and secondary bacterial invaders", // [string] Clinical rationale
"Info": {
"name": "Doxycycline Tablets (Veterinary)", // [string] Item/drug generic name
"form": "Oral tablet", // [string|null] Dosage form
"dosage": "5~10mg/kg, half tablet", // [string|null] Weight-adjusted dosage
"frequency": "Once daily", // [string|null] Frequency
"duration": "5~7 consecutive days", // [string|null] Treatment duration
"detail": null, // [string|null] Practical procedure details
"additional_info": "Administer after meal; follow with 3~5ml warm water to prevent esophageal adhesion" // [string|null] Precautions
}
},
{
"type": "Care",
"cause": "Humidify upper respiratory mucosa, loosen dry secretions, relieve nasal blockage",
"Info": {
"name": "Saline Nebulization",
"form": null,
"dosage": "Medical sterile saline 5ml",
"frequency": "Twice daily",
"duration": "15 minutes per session",
"detail": "Use an ultrasonic medical nebulizer inside a well-ventilated enclosure box",
"additional_info": "Stop immediately if the cat exhibits extreme panic or distress"
}
}
]
},
/* [Tab 2] Persistent Aggravation Stage (Unresolved Progression) */
"Persistent_Aggravation": {
"KeyPoint": "If fever rises or lethargy worsens after 48h home care, seek veterinary intervention promptly",
"CheckPoint": "Severe lethargy, copious purulent ocular discharge preventing eye opening, tachypnea",
"medications": [
{
"type": "Injection",
"cause": "Boost host antiviral immune response and mitigate systemic inflammation",
"Info": {
"name": "Recombinant Feline Interferon Subcutaneous",
"form": "Injectable solution",
"dosage": "300,000~500,000 IU/dose",
"frequency": "Every other day",
"duration": "3 consecutive doses",
"detail": "Must be administered subcutaneously by a licensed veterinary professional",
"additional_info": "Do not attempt home self-injection"
}
}
]
},
/* [Tab 3] Intensive Treatment Stage (Critical Crisis Rescue) */
"Intensive_Treatment": {
"KeyPoint": "Critical medical crisis; transport immediately to emergency hospital for stabilization",
"CheckPoint": "Open-mouth breathing, severe abdominal pumping, cyanotic/pale gums, total anorexia >24h",
"medications": [
{
"type": "Care",
"cause": "Rapidly relieve acute hypoxia and stabilize vital signs",
"Info": {
"name": "ICU Oxygen Therapy & Intensive Stabilization",
"form": null,
"dosage": null,
"frequency": "Continuous monitoring",
"duration": "Hospitalized ICU stay until spontaneous breathing normalizes",
"detail": "Admit to thermo-regulated oxygen cage with FiO2 35%~40%",
"additional_info": "Keep head extended during transport; minimize agitation and noise"
}
}
]
}
},
/* --- Chunk 4: Veterinary Orders (vet_order · report_index = 4) --- */
"vet_order": {
"vet_advise": "1. **Environment**: Keep room temperature at 23~26°C with 50%~60% relative humidity. Avoid cold drafts.\n2. **Isolation**: Highly contagious among cats. Isolate from other household pets; disinfect food and water bowls with boiling water daily.\n3. **Diet**: Anorexia may occur due to loss of smell. Gently warm canned food to enhance aroma and stimulate feeding.", // [string] Nursing guidance (Markdown format)
"follow_up": "If sneezing decreases and appetite improves after 48 hours, complete the 7-day course. If fever >39.5°C or dyspnea occurs within 2 days, return to clinic immediately." // [string] Follow-up timeframe
},
/* --- Chunk 7: Dietary Supplements (supplements · report_index = 7) --- */
"supplements": [
{
"cause": "Essential amino acid supplementation competing with arginine to suppress viral replication",
"Info": {
"name": "Feline High-Purity L-Lysine Gel",
"form": "Nutritional paste",
"dosage": "2~3cm strip",
"frequency": "1~2 times daily",
"duration": "2~3 weeks through recovery",
"detail": "Apply directly on paw for self-licking or mix into wet food",
"additional_info": "Supplements serve supportive purposes and do not replace prescribed antivirals"
}
}
]
}
}Detailed Leaf-Level Field Dictionary
1. Top-Level Metadata & Pet Profile
| Field Path | Type | Values / Enums | Description | UI Location |
|---|---|---|---|---|
id | integer | Positive int | Unique report ID | Header subtitle (e.g. Report #10086) |
session_id | string | String | Consultation session ID | Header meta or debug bar |
pet_profile_id | integer | Positive int | Associated pet-profile ID | Profile link and analytics |
module_type | integer | 1: Smart Consultation5: Image Recognition | Business module ID | Selects the report template and render branch |
report_type | string | Always "v1" | Record-level report version; not the numeric report_type sent when creating a report task | Version compatibility |
lang | string | BCP 47, e.g. zh-CN | Report language | UI copy language |
status | integer | 0: Not started1: In progress2: Completed3: Failed | Generation status | Controls skeleton / loading / error retry states |
report_time | string | YYYY-MM-DD HH:mm:ss | Completion timestamp | Report timestamp |
summary | string | Text | Dialogue summary | Top summary callout banner |
pet_info.id | integer | Positive int | Pet-profile ID | Card link and analytics |
pet_info.avatar | string/null | URL | Pet avatar URL | Rounded avatar in the hero card |
pet_info.birthday | string/null | YYYY-MM-DD | Date of birth | Used to compute the displayed age |
pet_info.name | string | Text | Pet name | Hero card bold title |
pet_info.pet_type | integer | 1: Cat2: Dog3: Other | Species enum | Controls pet avatar / icon (🐱 / 🐶 / 🐰) |
pet_info.pet_variety | string | Text | Breed name | Breed pill tag |
pet_info.gender | integer | 1: Male2: Femalenull: Unknown | Gender enum | Gender badge (♂ / ♀) |
pet_info.age | string | Text (e.g. "1 yr 4 mos") | Formatted age | Age pill tag |
pet_info.weight | string | Text (e.g. "4.5") | Body weight (kg) | Weight pill tag |
pet_info.is_neutered | integer | 0: Unneutered1: Neuterednull: Unknown | Spay/Neuter status | Neutered badge |
2. Case Review (review · Chunk 1)
| Field Path | Type | Description | UI Location |
|---|---|---|---|
review.chiefComplaint | string | Chief Complaint: The primary concern reported by the owner. | Review card top prominent quote box |
review.symptoms | string | Symptom Progression: Detailed symptoms, duration, and observations. | Body paragraph beneath chief complaint |
3. Diagnosis & Testing (result · Chunk 2)
Core Diagnosis (result.diagnosis)
| Field Path | Type | Values / Enums | Description | UI Location |
|---|---|---|---|---|
result.diagnosis.suspected | string | Disease name | Primary Suspected Disease | Card main title |
result.diagnosis.severity_of_the_illness | string | SlightMediumMedium_highSevere | Severity Level (the Prompt allows only these 4 values) | 4-level colored badge: • Slight: Green • Medium: Yellow • Medium_high: Orange • Severe: Red |
result.diagnosis.probability_level | string | highmediumlow | Diagnostic Confidence | Top right confidence tag |
result.diagnosis.description | string | Markdown / Text | Pathology Overview | Main description paragraph |
result.diagnosis.basis | string | Markdown / Text | Diagnostic Rationale: AI reasoning steps. | "Clinical Rationale" shaded callout |
Surface/Organ Highlighting & Testing
| Field Path | Type | Description | UI Behavior |
|---|---|---|---|
result.externalImage | string[] | Only these 7 values are possible: ["五官", "颈部", "背部", "尾部", "四肢", "腹部", "皮肤"] (empty array or multiple selections allowed). Values are always Chinese strings. | Lights up the matching body-surface hot-spot layer |
result.internalImage | string[] | Only these 12 values are possible: ["肺部", "大脑", "气管", "心脏", "肝脏", "胃", "脾", "肾", "肠道", "生殖系统", "膀胱", "胰腺"]. Values are always Chinese strings. | Lights up the matching internal-organ layer |
result.skeletalImage | string[] | Only these 6 values are possible: ["颅骨", "肋骨", "关节", "脊椎", "骨盆", "肢体骨"] (empty array hides the skeleton diagram). Values are always Chinese strings. | Lights up the matching skeleton layer |
result.EssentialCheckItems | string | Essential diagnostic tests (Markdown) | "Essential Hospital Tests" with red star badges |
result.RecommendCheckItems | string | Recommended secondary tests (Markdown) | "Recommended Testing" list |
Differential Diagnoses (result.other_suspected_diagnosis[])
The array holds 1-2 items (the Prompt allows at most 2 and requires each to differ from the primary result.diagnosis.suspected); only one may be returned when information is limited.
| Field Path | Type | Description | UI Behavior |
|---|---|---|---|
[].suspected | string | Secondary condition name | Accordion header |
[].severity_of_the_illness | string | Secondary severity enum | Severity badge on accordion |
[].description | string | Disease brief summary | Expanded content paragraph |
[].basis | string | Differential reasoning | Expanded rationale notes |
4. Treatment Advice (advice · Chunk 3)
| Field Path | Type | Values / Enums | Description & UI Behavior |
|---|---|---|---|
advice.is_urgent | string | "1": Urgent"0": Non-urgent | Emergency Alert Flag: If "1", render a prominent red banner warning to seek immediate emergency care. |
advice.Initial_Treatment | object | Stage Object | Corresponds to [Tab 1: Initial / Home Care]. |
advice.Persistent_Aggravation | object | Stage Object | Corresponds to [Tab 2: Unresolved Progression]. |
advice.Intensive_Treatment | object | Stage Object | Corresponds to [Tab 3: Emergency Crisis]. |
Stage Object Properties (Identical across all 3 tabs):
Initial_Treatment is restricted by the Prompt to veterinary OTC drugs and must not contain "打针" (injection) items.
| Property | Type | Description | UI Behavior |
|---|---|---|---|
KeyPoint | string | Key Action Principles | Blue/Green callout highlighting key medical goals. |
CheckPoint | string | Owner Warning Signs | Yellow/Red callout listing danger indicators. |
medications | object[] | Action Measures List | Rendered as a list of item cards. |
Action Measures Detail (medications[]):
| Field Path | Type | Values / Enums | Description |
|---|---|---|---|
type | string | Prompt-defined values are "药品" / "手术" / "饮食" / "打针" (Chinese); other Chinese labels such as "护理" may also appear | Category Tag: rendered as a category badge; fall back to a default style for unknown values instead of hard-coding branches. |
cause | string | Text | Clinical Rationale: Underlying mechanism. |
Info.name | string | Text | Item / Drug Generic Name: Bold item title. |
Info.form | string | null | Prompt examples: 口服 / 注射 / 外用 / 滴眼 / 滴耳 / 吸入 (free text) | Dosage Form: capsule tag next to the title. |
Info.dosage | string | null | e.g. "half tablet" | Single Dosage (adjusted for weight). |
Info.frequency | string | null | e.g. "Once daily" | Dosing Frequency. |
Info.duration | string | null | e.g. "5~7 days"; the Prompt limits it to 8 Chinese characters | Recommended Duration. |
Info.detail | string | null | Text | Procedure Steps: Specific instructions for care/surgery. |
Info.additional_info | string | null | Text; for drugs it must include the classification tag 【兽用处方药】 (veterinary prescription) or 【兽用非处方药】 (veterinary OTC) | Precautions & Warnings: muted note (e.g. "Give after food"); the classification tag can be rendered as a separate badge. |
5. Veterinary Orders (vet_order · Chunk 4)
| Field Path | Type | Description | UI Component |
|---|---|---|---|
vet_order.vet_advise | string | Veterinary Nursing Guidelines: Ambient temp, isolation, feeding tips (Markdown). | "Veterinarian Instructions" section |
vet_order.follow_up | string | Follow-up Timeline: Criteria for clinic re-examination. | "Follow-up & Recheck" card |
6. Dietary Supplements (supplements · Chunk 7)
If no supplements are suggested, this array is empty [] and the section is hidden.
| Field Path | Type | Description |
|---|---|---|
[].cause | string | Supplement benefits and mechanism. |
[].Info.name | string | Supplement product / nutrient name. |
[].Info.form | string | null | Form (paste, powder, liquid). |
[].Info.dosage | string | null | Feeding amount per serving. |
[].Info.frequency | string | null | Daily feeding frequency. |
[].Info.duration | string | null | Duration cycle. |
[].Info.detail | string | null | Administration method. |
[].Info.additional_info | string | null | Disclaimer that supplements do not replace prescription drugs; same shape as medications[].Info, but without the prescription/OTC classification tag. |
Frontend Assembly Standard Logic (JavaScript Reference)
/**
* Format and assemble the complete consultation report
* @param {Object} responseData - data payload from API
* @returns {Object} Normalized complete report data tree
*/
export function formatConsultationReport(responseData) {
if (!responseData) return null;
let report = responseData.report ? JSON.parse(JSON.stringify(responseData.report)) : {};
if (Array.isArray(responseData.report_contents)) {
const sortedContents = responseData.report_contents
.slice()
.sort((a, b) => (a.report_index || 0) - (b.report_index || 0));
for (const part of sortedContents) {
try {
const parsed = typeof part.content === 'string' ? JSON.parse(part.content) : part.content;
if (parsed && typeof parsed === 'object') {
report = { ...report, ...parsed };
}
} catch (err) {
console.warn(`[Report] Failed to parse chunk index=${part.report_index}:`, err);
}
}
}
return {
meta: {
id: responseData.id || responseData.report_id,
sessionId: responseData.session_id,
status: responseData.status,
reportTime: responseData.report_time || responseData.created_at,
summary: responseData.summary,
lang: responseData.lang || 'en-US'
},
petInfo: responseData.pet_info || {},
report: report
};
}