import request from '@/utils/request'
export function getDoctorSearchList(param) {
  return request({
    url: '/doctorList/getDoctorSearchList',
    method: 'post',
    data: param
  })
}

export function downloadOfficialCV(param, language) {
  return request({
    url: `/file/downloadOfficialCV/${language}`,
    method: 'post',
    data: param
  })
}

export function getBasicInfo(id) {
  return request({
    url: `/doctor/getBasicInfo/${id}`,
    method: 'get'
  })
}

export function addOrUpdateDoctorBasicInfo(param) {
  return request({
    url: '/doctor/addOrUpdateDoctorBasicInfo',
    method: 'post',
    data: param
  })
}

export function getEmploymentInfo(id) {
  return request({
    url: `/doctor/getEmploymentInfo/${id}`,
    method: 'get'
  })
}

export function updateEmploymentInfo(param) {
  return request({
    url: `/doctor/updateEmploymentInfo`,
    method: 'post',
    data: param
  })
}

export function getSpecialtyInfo(id) {
  return request({
    url: `/doctor/getSpecialtyInfo/${id}`,
    method: 'get'
  })
}

export function updateSpecialtyInfo(param) {
  return request({
    url: `/doctor/updateSpecialtyInfo`,
    method: 'post',
    data: param
  })
}

export function getEducation(doctorId) {
  return request({
    url: `/education/getEducation/${doctorId}`,
    method: 'get'
  })
}

export function addOrUpdateEducationInfo(param) {
  return request({
    url: `/education/addOrUpdateEducationInfo`,
    method: 'post',
    data: param
  })
}

export function deleteEducationInfo(doctorId) {
  return request({
    url: `/education/deleteEducationInfo/${doctorId}`,
    method: 'delete'
  })
}

export function addOrUpdatePostgraduateInfo(param) {
  return request({
    url: `/education/addOrUpdatePostgraduateInfo`,
    method: 'post',
    data: param
  })
}

export function deletePostgraduateInfo(doctorId) {
  return request({
    url: `/education/deletePostgraduateInfo/${doctorId}`,
    method: 'delete'
  })
}

export function getResearchPublication(doctorId) {
  return request({
    url: `/researchPublication/getResearchPublication/${doctorId}`,
    method: 'get'
  })
}

export function addOrUpdateResearchPublication(param) {
  return request({
    url: `/researchPublication/addOrUpdateResearchPublication`,
    method: 'post',
    data: param
  })
}

export function getTrialExperience(doctorId) {
  return request({
    url: `/trialExperience/getTrialExperience/${doctorId}`,
    method: 'get'
  })
}

export function addOrUpdateTrialExperience(param) {
  return request({
    url: `/trialExperience/addOrUpdateTrialExperience`,
    method: 'post',
    data: param
  })
}

export function deleteTrialExperience(doctorId) {
  return request({
    url: `/trialExperience/deleteTrialExperience/${doctorId}`,
    method: 'delete'
  })
}

export function updateOtherExperience(param) {
  return request({
    url: `/trialExperience/updateOtherExperience`,
    method: 'post',
    data: param
  })
}

export function updateGcpExperience(param) {
  return request({
    url: `/trialExperience/updateGcpExperience`,
    method: 'post',
    data: param
  })
}

export function getDoctorSowList(doctorId) {
  return request({
    url: `/doctor/getDoctorSowList/${doctorId}`,
    method: 'get'
  })
}

export function getDoctorAckSowList(doctorId) {
  return request({
    url: `/doctor/getDoctorAckSowList/${doctorId}`,
    method: 'get'
  })
}

export function getAuditState(doctorId) {
  return request({
    url: `/doctor/getAuditState/${doctorId}`,
    method: 'get'
  })
}

export function updateAuditResume(param) {
  return request({
    url: '/doctor/updateAuditResume',
    method: 'post',
    data: param
  })
}

export function getVacationList(doctorId, pageIndex, pageSize) {
  return request({
    url: `/vacation/getVacationList/${doctorId}/${pageIndex}/${pageSize}`,
    method: 'get'
  })
}

export function addOrUpdateVacation(param) {
  return request({
    url: `/vacation/addOrUpdateVacation`,
    method: 'post',
    data: param
  })
}

export function deleteVacation(holidayId) {
  return request({
    url: `/vacation/deleteVacation/${holidayId}`,
    method: 'delete'
  })
}

export function downloadByAttachmentId(doctorId, attachmentIds) {
  const param = { attachmentIds: attachmentIds }
  return request({
    url: `/file/downloadByAttachmentId/${doctorId}`,
    method: 'post',
    data: param
  })
}

export function getDetail(doctorId) {
  return request({
    url: `/doctor/getDetail/${doctorId}`,
    method: 'get'
  })
}

export function getDoctorTrialListByStatus(param) {
  return request({
    url: `/trial/getReviewerTrialListByEnrollmentStatus`,
    method: 'post',
    data: param
  })
}

export function addDoctorCriterionFile(param) {
  return request({
    url: `/Doctor/addDoctorCriterionFile`,
    method: 'post',
    data: param
  })
}

export function deleteDoctorCriterionFile(param) {
  return request({
    url: `/Doctor/deleteDoctorCriterionFile`,
    method: 'post',
    data: param
  })
}

export function getDoctorCriterionFile(param) {
  return request({
    url: `/Doctor/getDoctorCriterionFile`,
    method: 'post',
    data: param
  })
}

export function sendEmialVerifyCode(param) {
  return request({
    url: `/TrialSiteSurvey/sendEmialVerifyCode`,
    method: 'post',
    data: param
  })
}

export function verifyEmialGetDoctorInfo(param) {
  return request({
    url: `/TrialSiteSurvey/verifyEmialGetDoctorInfo`,
    method: 'post',
    data: param
  })
}
