/**
 * 疾病诊断字典 API（yii_disease）
 */
import { requestClient } from '#/api/request';

const prefix = 'disease-dict/';

export async function getDiseaseDictList(data: any) {
  return requestClient.get<any>(`${prefix}list`, { params: data });
}

export async function createDiseaseDict(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}create`, data);
}

export async function updateDiseaseDict(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}update`, data);
}

export async function deleteDiseaseDict(data: { ids: number[] }) {
  return requestClient.post<any>(`${prefix}delete`, data);
}

/** 同步空拼音首拼/全拼 */
export async function syncDiseaseDictPinyin() {
  return requestClient.post<any>(`${prefix}sync-pinyin`, {});
}
