export type ConfigOption = { value: string label: string desc?: string } export type ConfigOptions = { departments: ConfigOption[] titles: ConfigOption[] experiences: ConfigOption[] } export type ClinicalConfigPayload = { userId: string phone: string institutionId: string department: string title: string experience: string departmentName: string titleName: string experienceName: string } export type ClinicalConfigResult = ClinicalConfigPayload & { id: string updatedAt: string } export const MOCK_CONFIG_OPTIONS: ConfigOptions = { departments: [ { value: 'im', label: '内科', desc: '心内、呼吸、消化、肾内等临床场景' }, { value: 'sur', label: '外科', desc: '普外、骨科、神外、胸外等临床场景' }, { value: 'ped', label: '儿科', desc: '儿童常见病、急重症与沟通训练' }, { value: 'obg', label: '妇产科', desc: '围产、妇科、产科急症训练' }, { value: 'er', label: '急诊科', desc: '分诊、抢救、危急值处置训练' }, { value: 'icu', label: '重症医学科', desc: '危重症评估与多学科决策训练' } ], titles: [ { value: 'resident', label: '住院医师', desc: '强化基础诊疗路径与病历思维' }, { value: 'attending', label: '主治医师', desc: '提升独立诊疗和带教表达' }, { value: 'associate_chief', label: '副主任医师', desc: '复杂病例决策与团队协作' }, { value: 'chief', label: '主任医师', desc: '疑难病例、质控和教学管理' } ], experiences: [ { value: '1-3', label: '1-3年', desc: '基础病例训练优先' }, { value: '3-5', label: '3-5年', desc: '进阶诊疗路径优先' }, { value: '5-10', label: '5-10年', desc: '复杂病例推演优先' }, { value: '10+', label: '10年以上', desc: '疑难病例与带教模拟优先' } ] } export function fetchConfigOptions() { return Promise.resolve({ options: MOCK_CONFIG_OPTIONS, defaults: { department: 'im', title: 'resident', experience: '1-3' }, mentor: { name: '王主任', message: '欢迎回来!请配置执业信息,开始精准带教模拟。' } }) } export function saveClinicalConfig(payload: ClinicalConfigPayload): Promise { return Promise.resolve({ id: `mock-config-${Date.now()}`, ...payload, updatedAt: new Date().toISOString() }) }