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

enum Api {
  archivesMedicalDocumentsQueryPage = '/archives/medicalDocuments/query/page',
  archivesMedicalDocumentsQueryList = '/archives/medicalDocuments/query/list',
  archivesMedicalDocumentsDetail = '/archives/medicalDocuments/detail',
  archivesMedicalDocumentsAdd = '/archives/medicalDocuments/add',
  archivesMedicalDocumentsEdit = '/archives/medicalDocuments/edit',
  archivesMedicalDocumentsRemove = '/archives/medicalDocuments/removeByIds',
}

/**
 *
 * @author fan
 * @date  2023/07/17 16:06
 * @description: 根据条件查询排床备忘录列表,权限 - archives:medicalDocuments:query
 * @method: POST
 */

export const archivesMedicalDocumentsQueryPage = (params?: object) => {
  return defHttp.post({ url: Api.archivesMedicalDocumentsQueryPage, params: setParams(params) });
};

/**
 *
 * @author fan
 * @date  2023/07/17 16:06
 * @description: 根据条件查询排床备忘录列表,权限 - archives:medicalDocuments:query
 * @method: POST
 */

export const archivesMedicalDocumentsQueryList = (patientBasicId: string) => {
  return defHttp.post({ url: Api.archivesMedicalDocumentsQueryList + '/' + patientBasicId });
};
/**
 *
 * @author fan
 * @date  2023/07/17 16:06
 * @description: 根据id查询排床备忘录详细信息,权限 - archives:medicalDocuments:query
 * @method: GET
 * @param:  id 主键id
 */
export const archivesMedicalDocumentsDetail = (id: string) => {
  return defHttp.get({ url: Api.archivesMedicalDocumentsDetail + '/' + id });
};

/**
 *
 * @author fan
 * @date  2023/07/17 16:06
 * @description: 添加排床备忘录,权限 - archives:medicalDocuments:add
 * @method: POST
 */
export const archivesMedicalDocumentsAdd = (params?: object) => {
  return defHttp.post({ url: Api.archivesMedicalDocumentsAdd, params: params });
};

/**
 *
 * @author fan
 * @date  2023/07/17 16:06
 * @description: 通过主键id编辑排床备忘录,权限 - archives:medicalDocuments:edit
 * @method: POST
 */
export const archivesMedicalDocumentsEdit = (params?: object) => {
  return defHttp.post({ url: Api.archivesMedicalDocumentsEdit, params: params });
};

/**
 * @description: 删除,权限 - archives:medicalDocuments:remove
 * @method: POST
 */
export const archivesMedicalDocumentsRemove = (params: Array<string | number>) => {
  return defHttp.post({ url: Api.archivesMedicalDocumentsRemove, params: params });
};
