import axiosInstance from './interceptor'; export interface PatientTypeParams { is_enabled?: string; } export interface PatientType { id: string; patient_type_id: string; patient_type_name: string; patient_type_local: string; patient_type_description: string; sort: number; is_enabled: boolean; product: string; is_pre_install: boolean; } export interface PatientTypeResponse { code: string; description: string; solution: string; data: { patient_type_list: PatientType[]; }; } export async function fetchPatientTypes(): Promise { const response = await axiosInstance.get('/auth/protocol/patient_type'); // 兼容接口返回结构 if ( response.data && response.data.code === '0x000000' && response.data.data && Array.isArray(response.data.data.patient_type_list) ) { return response.data.data.patient_type_list; } return []; }