export type ScenarioRecommendation = { id: string title: string desc: string tags: string[] defaults: ScenarioForm } export type ScenarioOption = { value: string label: string } export type ScenarioForm = { environment: string ageGroup: string education: string personality: string } export type ScenarioOptions = { environments: ScenarioOption[] ageGroups: ScenarioOption[] educations: ScenarioOption[] personalities: ScenarioOption[] } export type ScenarioConfigPayload = ScenarioForm & { caseId: string caseNo: string recommendationId?: string } export function fetchScenarioOptions() { return Promise.resolve({ recommendations: [ { id: 'typical-outpatient', title: '典型门诊病例', desc: '门诊常规病例:针对初学者设计的标准化沟通流程。', tags: ['中年', '配合'], defaults: { environment: 'outpatient', ageGroup: 'middle', education: 'higher', personality: 'calm' } }, { id: 'emergency-crisis', title: '急诊重症危机', desc: '急诊危重:急性心梗紧急入院。', tags: ['老年', '急躁'], defaults: { environment: 'emergency', ageGroup: 'elderly', education: 'secondary', personality: 'irritable' } } ] as ScenarioRecommendation[], options: { environments: [ { value: 'outpatient', label: '门诊' }, { value: 'emergency', label: '急诊' }, { value: 'ward', label: '病房' } ], ageGroups: [ { value: 'child', label: '儿童' }, { value: 'young', label: '青年' }, { value: 'middle', label: '中年' }, { value: 'elderly', label: '老年' } ], educations: [ { value: 'primary', label: '小学及以下' }, { value: 'secondary', label: '中等教育' }, { value: 'higher', label: '高等教育' } ], personalities: [ { value: 'calm', label: '平和' }, { value: 'anxious', label: '焦虑' }, { value: 'irritable', label: '急躁' }, { value: 'cooperative', label: '配合' }, { value: 'suspicious', label: '多疑' } ] } as ScenarioOptions }) } export function createScenarioConfig(payload: ScenarioConfigPayload) { return Promise.resolve({ id: `mock-scenario-${Date.now()}`, ...payload, createdAt: new Date().toISOString() }) }