/** * Mock 数据专用类型 * * 这些类型仅用于模拟数据和 UI 组件内部的临时状态, * 与后端 API 的类型(api/index.ts)是独立的体系。 */ // ===== 基础类型 ===== /** 动物种类 */ export type Species = '犬' | '猫' | '其他' /** 性别 */ export type Gender = '公' | '母' | '未知' /** 处理步骤 */ export type ProcessStep = 'transcribing' | 'extracting' | 'generating' // ===== 动物基本信息 ===== export interface PatientInfo { species: Species breed: string age: string gender: Gender weight: string ownerName: string } // ===== 对话行 ===== export type SpeakerRole = '兽医' | '宠主' export interface DialogueLine { id: string speaker: SpeakerRole text: string timestamp: string // 格式: HH:MM:SS } // ===== SOAP 病历(模拟数据结构) ===== export interface ObjectiveData { temperature: string // 体温 °C heartRate: string // 心率 次/分 respiration: string // 呼吸 次/分 weight: string // 体重 kg crt: string // 毛细血管再充盈时间 秒 mucousMembrane: string // 黏膜颜色 hydration: string // 水合状态 } export interface PlanData { examinations: string[] // 检查项目 medication: string // 用药方案 notes: string // 备注 } export interface SOAPData { subjective: string // S - 主观资料 objective: ObjectiveData // O - 客观资料 assessment: string // A - 评估 plan: PlanData // P - 计划 } // ===== 置信度标记 ===== export interface ConfidenceMark { text: string confidence: 'high' | 'medium' | 'low' } // ===== 完整病历 ===== export interface MedicalRecord { id: string patientInfo: PatientInfo dialogue: DialogueLine[] soap: SOAPData confidenceMarks: ConfidenceMark[] // 低置信度标记 status: string // 使用 string 兼容 mock 数据 diagnosisSummary: string // 诊断摘要 createdAt: string // ISO date updatedAt: string recordingDuration: number // 秒 } // ===== 仪表盘统计 ===== export interface DashboardStats { todayRecords: number todayRecordingDuration: number // 秒 } // ===== 问诊录音页内部状态 ===== export interface ConsultationState { phase: string // ConsultationPhase patientInfo: PatientInfo dialogue: DialogueLine[] elapsedSeconds: number isPaused: boolean processStep: ProcessStep | null processProgress: number // 0-100 }