/**
 * 公共医嘱字典 API（xk_doctor_order）
 */
import { requestClient } from '#/api/request';

const prefix = 'doctor-order/';

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

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

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

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

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