import axios from 'axios';
import config from '@api/config.js';
const urls = config.urls;
function request(config) {
  const instance = axios.create({
    // baseURL: "http://192.168.2.236:6060",
    timeout: 500000,
    headers: {
      'Content-Type': "application/json;charset=utf-8"
    }
  })
  return instance(config)
}

export default {
  getTremList(param) {
    return axios.post(urls.getConceptKnowledge, param);
  },
  getAllConcept(param) {
    //医学术语--获取所有概念（标准术语）
    return axios.post(urls.getAllConcept, param);
  },
  saveTermPrompts(param) {
    return axios.post(urls.saveConceptInfo, param);
  },

  delLisMappingById(param) {
    //医学数据-化验大小项与公表项维护-单个删除
    return axios.post(urls.delLisMappingById, param);
  },
  getConceptInfoAssay(param) {
    return axios.post(urls.getConceptInfoAssay, param); //化验子项-搜索术语
  },
  getAllLisConcept(param) {
    //医学数据-化验大小项与公表项维护-获取所有化验公表项
    return axios.post(urls.getAllLisConcept, param);
  },
  saveLisMapping(param) {
    //医学数据-化验大小项与公表项维护-新增
    return axios.post(urls.saveLisMapping, param);
  },
  hasLisMapping(param) {
    //医学数据-化验大小项与公表项维护-化验公表项映射是否已存在
    return axios.post(urls.hasLisMapping, param);
  },
  delConceptInfo(param) {
    return axios.post(urls.delConceptInfo, param);
  },
  getConceptKnowledgeList(param) {
    return axios.post(urls.getConceptKnowledgeList, param);
  },
  retrievalSearch(param) {
    // 术语搜索
    return axios.post(urls.retrievalSearch, param);
  },
  getLisMappingPage(param) {
    //诊断列表-列表
    return axios.post(urls.getLisMappingPage, param);
  },
  diseaseIsExistRecord(param) {
    return axios.post(urls.diseaseIsExistRecord, param);
  },
  saveOrUpdateDiseaseRecord(param) {
    return axios.post(urls.saveOrUpdateDiseaseRecord, param);
  },
  deleteDiseaseRecord(param) {
    return axios.post(urls.deleteDiseaseRecord, param);
  },
  exportDiseaseRecord(param) {
    return axios.post(urls.exportDiseaseRecord, param, {
      responseType: 'blob',
    });
  },
  importDiseaseRecord(param) {
    return axios.post(urls.importDiseaseRecord, param, {
      responseType: 'blob',
    });
  },
  getLisPage(param) {
    //检验列表-列表
    return axios.post(urls.getLisPage, param);
  },
  lisIsExistRecord(param) {
    return axios.post(urls.lisIsExistRecord, param);
  },
  saveOrUpdateLisRecord(param) {
    return axios.post(urls.saveOrUpdateLisRecord, param);
  },
  deleteLisRecord(param) {
    return axios.post(urls.deleteLisRecord, param);
  },
  exportLisRecord(param) {
    return axios.post(urls.exportLisRecord, param, {
      responseType: 'blob',
    });
  },
  importLisRecord(param) {
    return axios.post(urls.importLisRecord, param, {
      responseType: 'blob',
    });
  },
  getpacsPage(param) {
    //检查列表-列表
    return axios.post(urls.getpacsPage, param);
  },
  pacsIsExistRecord(param) {
    return axios.post(urls.pacsIsExistRecord, param);
  },
  saveOrUpdatePacsRecord(param) {
    return axios.post(urls.saveOrUpdatePacsRecord, param);
  },
  deletePacsRecord(param) {
    return axios.post(urls.deletePacsRecord, param);
  },
  exportPacsRecord(param) {
    return axios.post(urls.exportPacsRecord, param, {
      responseType: 'blob',
    });
  },
  importPacsRecord(param) {
    return axios.post(urls.importPacsRecord, param, {
      responseType: 'blob',
    });
  },
  getDrugPage(param) {
    //药品列表-列表
    return axios.post(urls.getDrugPage, param);
  },
  drugIsExistRecord(param) {
    return axios.post(urls.drugIsExistRecord, param);
  },
  saveOrUpdateDrugRecord(param) {
    return axios.post(urls.saveOrUpdateDrugRecord, param);
  },
  deleteDrugRecord(param) {
    return axios.post(urls.deleteDrugRecord, param);
  },
  exportDrugRecord(param) {
    return axios.post(urls.exportDrugRecord, param, {
      responseType: 'blob',
    });
  },
  importDrugRecord(param) {
    return axios.post(urls.importDrugRecord, param, {
      responseType: 'blob',
    });
  },


  getScalePage(param) {
    //量表列表-列表
    return axios.post(urls.getScalePageCDSS, param);
  },
  scaleIsExistRecord(param) {
    return axios.post(urls.scaleIsExistRecordCDSS, param);
  },
  saveOrUpdateScaleRecord(param) {
    return axios.post(urls.saveOrUpdateScaleRecordCDSS, param);
  },
  deleteScaleRecord(param) {
    return axios.post(urls.deleteScaleRecordCDSS, param);
  },
  exportScaleRecord(param) {
    return axios.post(urls.exportScaleRecordCDSS, param, {
      responseType: 'blob',
    });
  },
  importScaleRecord(param) {
    return axios.post(urls.importScaleRecordCDSS, param, {
      responseType: 'blob',
    });
  },
  exportScaleModule(param) {
    return axios.post(urls.exportScaleModuleCDSS, param, {
      responseType: 'blob',
    });
  },

  getOperationPage(param) {
    //手术/操作列表-列表
    return axios.post(urls.getOperationPage, param);
  },
  operationIsExistRecord(param) {
    return axios.post(urls.operationIsExistRecord, param);
  },
  saveOrUpdateOperationRecord(param) {
    return axios.post(urls.saveOrUpdateOperationRecord, param);
  },
  deleteOperationRecord(param) {
    return axios.post(urls.deleteOperationRecord, param);
  },
  exportOperationRecord(param) {
    return axios.post(urls.exportOperationRecord, param, {
      responseType: 'blob',
    });
  },
  importOperationRecord(param) {
    return axios.post(urls.importOperationRecord, param, {
      responseType: 'blob',
    });
  },
  getFusionPage(param) {
    //输血列表-列表
    return axios.post(urls.getFusionPage, param);
  },
  fusionIsExistRecord(param) {
    return axios.post(urls.fusionIsExistRecord, param);
  },
  saveOrUpdateFusionRecord(param) {
    return axios.post(urls.saveOrUpdateFusionRecord, param);
  },
  deleteFusionRecord(param) {
    return axios.post(urls.deleteFusionRecord, param);
  },
  exportFusionRecord(param) {
    return axios.post(urls.exportFusionRecord, param, {
      responseType: 'blob',
    });
  },
  importFusionRecord(param) {
    return axios.post(urls.importFusionRecord, param, {
      responseType: 'blob',
    });
  },
  getDeptPage(param) {
    //科室列表-列表
    return axios.post(urls.getDeptPage, param);
  },
  deptIsExistRecord(param) {
    return axios.post(urls.deptIsExistRecord, param);
  },
  saveOrUpdateDeptRecord(param) {
    return axios.post(urls.saveOrUpdateDeptRecord, param);
  },
  deleteDeptRecord(param) {
    return axios.post(urls.deleteDeptRecord, param);
  },
  exportDeptRecord(param) {
    return axios.post(urls.exportDeptRecord, param, {
      responseType: 'blob',
    });
  },
  importDeptRecord(param) {
    return axios.post(urls.importDeptRecord, param, {
      responseType: 'blob',
    });
  },
  exportDeptModule(param) {
    return axios.post(urls.exportDeptModule, param, {
      responseType: 'blob',
    });
  },

  exportDiseaseModule(param) {
    return axios.post(urls.exportDiseaseModule, param, {
      responseType: 'blob',
    });
  },
  exportLisModule(param) {
    return axios.post(urls.exportLisModule, param, {
      responseType: 'blob',
    });
  },
  exportPacsModule(param) {
    return axios.post(urls.exportPacsModule, param, {
      responseType: 'blob',
    });
  },
  exportDrugModule(param) {
    return axios.post(urls.exportDrugModule, param, {
      responseType: 'blob',
    });
  },
  exportOperationModule(param) {
    return axios.post(urls.exportOperationModule, param, {
      responseType: 'blob',
    });
  },
  exportFusionModule(param) {
    return axios.post(urls.exportFusionModule, param, {
      responseType: 'blob',
    });
  },


  getNursePage(param) {
    //护理列表-列表
    return axios.post(urls.getNursePage, param);
  },
  saveOrUpdateRecord(param) {
    //护理列表添加
    return axios.post(urls.saveOrUpdateRecord, param);
  },
  nurseIsExistRecord(param) {
    //护理-映射关系是否已存在
    return axios.post(urls.nurseIsExistRecord, param);
  },
  deleteNurseRecord(param) {
    //护理-删除

    return axios.post(urls.deleteNurseRecord, param);
  },
  exportNurseRecord(param) {
    //护理-数据导出
    return axios.post(urls.exportNurseRecord, param, {
      responseType: 'blob',
    });
  },
  importNurseRecord(param) {
    //护理-数据导入
    return axios.post(urls.importNurseRecord, param, {
      responseType: 'blob',
    });
  },
  exportNurseModule(param) {
    //护理-数据导入模板导出
    return axios.post(urls.exportNurseModule, param, {
      responseType: 'blob',
    });
  },
  
  
  getRoutePage(param) {
    //给药途径列表-列表
    return axios.post(urls.getRoutePage, param);
  },
  saveOrUpdateRecordRT(param) {
    //给药途径列表添加
    return axios.post(urls.saveOrUpdateRecordRT, param);
  },
  RouteIsExistRecord(param) {
    //给药途径-映射关系是否已存在
    return axios.post(urls.RouteIsExistRecord, param);
  },
  deleteRouteRecord(param) {
    //给药途径-删除
  
    return axios.post(urls.deleteRouteRecord, param);
  },
  exportRouteRecord(param) {
    //给药途径-数据导出
    return axios.post(urls.exportRouteRecord, param, {
      responseType: 'blob',
    });
  },
  importRouteRecord(param) {
    //给药途径-数据导入
    return axios.post(urls.importRouteRecord, param, {
      responseType: 'blob',
    });
  },
  exportRouteModule(param) {
    //给药途径-数据导入模板导出
    return axios.post(urls.exportRouteModule, param, {
      responseType: 'blob',
    });
  },
  
  
  
  getTcmdiseasePage(param) {
    //中医疾病列表-列表
    return axios.post(urls.getTcmdiseasePage, param);
  },
  tcmIsExistRecord(param) {
    //中医疾病-映射关系是否已存在
    return axios.post(urls.tcmIsExistRecord, param);
  },
  saveOrUpdateRecordTcm(param) {
    //中医疾病-保存
    return axios.post(urls.saveOrUpdateRecordTcm, param);
  },
  deleteTcmRecord(param) {
    //中医疾病-删除
    return axios.post(urls.deleteTcmRecord, param);
  },
  exportTcmRecord(param) {
    //中医疾病-数据导出
    return axios.post(urls.exportTcmRecord, param, {
      responseType: 'blob',
    });
  },
  importTcmRecord(param) {
    //中医疾病-数据导入
    return axios.post(urls.importTcmRecord, param, {
      responseType: 'blob',
    });
  },
  exportTcmModule(param) {
    //中医疾病-数据导入模板导出
    return axios.post(urls.exportTcmModule, param, {
      responseType: 'blob',
    });
  },


  getTcmsyndromePage(param) {
    //中医症候列表-列表
    return axios.post(urls.getTcmsyndromePage, param);
  },

  tcmdromeIsExistRecord(param) {
    //中医症候-映射关系是否已存在
    return axios.post(urls.tcmdromeIsExistRecord, param);
  },
  saveOrUpdateRecordTcmdrome(param) {
    //中医症候-保存
    return axios.post(urls.saveOrUpdateRecordTcmdrome, param);
  },
  deleteTcmdromeRecord(param) {
    //中医症候-删除
    return axios.post(urls.deleteTcmdromeRecord, param);
  },
  exportTcmdromeRecord(param) {
    //中医症候-数据导出
    return axios.post(urls.exportTcmdromeRecord, param, {
      responseType: 'blob',
    });
  },
  importTcmdromeRecord(param) {
    //中医疾病-数据导入
    return axios.post(urls.importTcmdromeRecord, param, {
      responseType: 'blob',
    });
  },
  exportTcmdromeModule(param) {
    //中医疾病-数据导入模板导出
    return axios.post(urls.exportTcmdromeModule, param, {
      responseType: 'blob',
    });
  },






  getHospitalInfo(param) {
    return axios.post(urls.getHospitalInfo, param);
  },
  saveHospitalInfoRecord(param) {
    return axios.post(urls.saveHospitalInfoRecord, param);
  },


  getPlanInfoPages(param) {
    //分页获取方案配置信息
    return axios.post(urls.getPlanInfoPages, param);
  },
  getDefaultPlans(param) {
    return axios.post(urls.getDefaultPlans, param);
  },
  savePlanInfoDatas(param) {
    return axios.post(urls.savePlanInfoDatas, param);
  },
  cancelPlanDatas(param) {
    return axios.post(urls.cancelPlanDatas, param);
  },
  getPlanInfoIds(param) {
    return axios.post(urls.getPlanInfoIds, param);
  },
  revStopPlans(param) {
    return axios.post(urls.revStopPlans, param);
  },
  getDicList(param) {
    return axios.post(urls.getDicList, param);
  },

  getBillmanPage(param) {
    return request({ method: 'post', url: urls.getBillmanPage, data: param });
  },
  conceptBillmanIndex(param) {
    return request({ method: 'post', url: urls.conceptBillmanIndex, data: param });
  },
  conditionBillmanIndex(param) {
    return request({ method: 'post', url: urls.conditionBillmanIndex, data: param });
  },
  getRecordByRelationId(param) {
    return request({ method: 'post', url: urls.getRecordByRelationId, data: param });
  },
  saveBillmanRecord(param) {
    return request({ method: 'post', url: urls.saveBillmanRecord, data: param });
  },
  updateBillmanStatus(param) {
    return request({ method: 'post', url: urls.updateBillmanStatus, data: param });
  },


  getRelatedMapping(param) {
    //查询已映射关系
    return axios.post(urls.getRelatedMapping, param);
  },
  getTermMatching(param) {
    //推荐匹配
    return axios.post(urls.getTermMatching, param);
  },

  dataDiseaseVerify(param) {
    return axios.post(urls.dataDiseaseVerify, param);
  },
  precDiseaseDataMatch(param) {
    return axios.post(urls.precDiseaseDataMatch, param, {
      responseType: 'blob',
    });
  },

  importExcelDataVerify(param) {
    //数据导入校验
    return axios.post(urls.importExcelDataVerify, param);
  },
  saveHospitalRelation(param) {
    //编辑子医院
    return axios.post(urls.saveHospitalRelation, param);
  },
  getHospitalRelation(param) {
    //获取子医院信息
    return axios.post(urls.getHospitalRelation, param);
  },

  
};
