import { defHttp } from '/@/utils/http/axios';

enum Api {
  archivesDiagnosisHistoryQueryListSingle = '/archives/diagnosisHistory/query/list/single',
  archivesDiagnosisHistoryQueryListMulti = '/archives/diagnosisHistory/query/list/multi',
  archivesDiagnosisHistorySingleAddOrEdit = '/archives/diagnosisHistory/single/addOrEdit',
  archivesDiagnosisHistoryMultiAddOrEdit = '/archives/diagnosisHistory/multi/addOrEdit',
  archivesDiagnosisHistoryMultiRemoveByIds = '/archives/diagnosisHistory/multi/removeByIds',
}

/**
 *
 * @author fan
 * @date  2023/06/17 10:40
 * @description: 首次透析、手术史、过敏史、传染病史诊断查询,权限 - archives:diagnosisHistory:query
 * @method: POST
 */

export const archivesDiagnosisHistoryQueryListSingle = (patientBasicId?: string) => {
  return defHttp.get({ url: Api.archivesDiagnosisHistoryQueryListSingle + '/' + patientBasicId });
};

/**
 *
 * @author fan
 * @date  2023/06/17 10:40
 * @description: 过敏原,合并症类型、临床诊断类型、病理类型、CKD类型、其他 病史查询,权限 - archives:diagnosisHistory:query
 * @method: POST
 */

export const archivesDiagnosisHistoryQueryListMulti = (patientBasicId?: string) => {
  return defHttp.get({ url: Api.archivesDiagnosisHistoryQueryListMulti + '/' + patientBasicId });
};
/**
 *
 * @author fan
 * @date  2023/06/17 10:40
 * @description: 编辑（添加）首次透析、手术史、过敏史、传染病史诊断编辑（添加） 病史诊断,权限 - archives:diagnosisHistory:edit
 * @method: POST
 */
export const archivesDiagnosisHistorySingleAddOrEdit = (params?: object) => {
  return defHttp.post({ url: Api.archivesDiagnosisHistorySingleAddOrEdit, params: params });
};

/**
 *
 * @author fan
 * @date  2023/06/17 10:40
 * @description: 编辑（添加）过敏原,合并症类型、临床诊断类型、病理类型、CKD类型、其他编辑（添加） 病史诊断,权限 - archives:diagnosisHistory:edit
 * @method: POST
 */
export const archivesDiagnosisHistoryMultiAddOrEdit = (params?: object) => {
  return defHttp.post({ url: Api.archivesDiagnosisHistoryMultiAddOrEdit, params: params });
};

/**
 *
 * @author fan
 * @date  2023/06/17 10:40
 * @description: 删除 过敏原,合并症类型、临床诊断类型、病理类型、CKD类型、其他编辑（添加） 病史诊断,权限 - archives:diagnosisHistory:edit
 * @method: POST
 */
export const archivesDiagnosisHistoryMultiRemoveByIds = (params?: object) => {
  return defHttp.post({ url: Api.archivesDiagnosisHistoryMultiRemoveByIds, params: params });
};
