import request_blob from '@/utils/request_blob'
// 医院普通检索下载
export function zz(data) {
  return request_blob({
    url: `/api/exportData`,
    method: 'post',
    responseType: 'blob',
    data
  })
}



// 医院普通检索下载
export function bassNormalSearchDownload(data) {
  return request_blob({
    url: `/bass/normalSearchExport`,
    method: 'get',
    responseType: 'blob',
    params: data
  })
}

// 医院高级检索下载
export function bassHighSearchDownload(data) {
  return request_blob({
    url: `/bass/search_result_export`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 科室病历导出
export function depBlExport(data) {
  return request_blob({
    url: `/bazb/dep_bl_export`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 科室病历导出
export function depBlNewExport(data) {
  return request_blob({
    url: `/bazb/dep_bl_export_new`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 门诊病历导出
export function outHospitalExport(data) {
  return request_blob({
    url: `/api/omr_zk/error_list_export`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 门诊病历导出
export function outHospitalShouldExport(data) {
  return request_blob({
    url: `/api/omr_zk/get_should_be_bl_export`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 病按首页导出
export function medicalRecordExport(data) {
  return request_blob({
    url: `/api/qualityList`,
    method: 'post',
    responseType: 'blob',
    data
  })
}
// 病按首页导出
export function doctorAdviceExport(data) {
  return request_blob({
    url: `/bass/yz/serachExport`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 住院病历查询-导出
export function professionSearchExport(data) {
  return request_blob({
    url: `/bass/bl/serachExport`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 缺陷问题导出
export function errorDataExport(data) {
  return request_blob({
    url: `/api/home_quality/errorDataExport`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 预警信息导出
export function foreWarningExport(data) {
  return request_blob({
    url: `/bazb/warning_msg`,
    method: 'get',
    responseType: 'blob',
    params: data
  })
}

export function errorDataLCExport(data) {
  return request_blob({
    url: `/api/home_sz_quality/errorData`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 缺陷问题详情导出
export function errorDetailsListExport(data) {
  return request_blob({
    url: `/api/home_quality/errorDetailsListExport`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

export function errorDetailsLCListExport(data) {
  return request_blob({
    url: `/api/home_sz_quality/errorDetailsList`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 其他统计数据详情导出
export function otherStatisticsDataExport(data) {
  return request_blob({
    url: `/api/ssbfz/getBfzList`,
    method: 'post',
    responseType: 'blob',
    data
  })
}


// 其他统计数据详情导出
export function otherStatisticsMenuExport(data) {
  return request_blob({
    url: `/api/ssbfz/exportAll`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 编码员缺陷导出
export function encoderErrorExport(data) {
  return request_blob({
    url: `/api/bmy/bmyQualityList`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 医师排名导出
export function medicalRecordDoctorExport(data) {
  return request_blob({
    url: `/bazb/case-quality/medical_record_doctor`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 首页质控（编码员）--医师排名导出
export function bmyDoctorRanking(data) {
  return request_blob({
    url: `/api/bmy/doctorRanking`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 首页质控（编码员）--医师排病历总数
export function bmyDoctorRankingBlExport(data) {
  return request_blob({
    url: `/bazb/case-quality/doctor_ranking_list`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 首页质控（编码员）--医师排病历扣分
export function bmyDoctorRankingBlKfExport(data) {
  return request_blob({
    url: `/api/bmy/doctorErrorRanking`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 编码员缺陷问题导出
export function encoderProblemExport(data) {
  return request_blob({
    url: `/api/bmy/qualityExport`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 重点指标导出
export function majorIndexExport(data) {
  const { year, category } = data
  return request_blob({
    url: `/bazb/quality_index_list?type=1&year=${year}&is_export=1&category=${category}`,
    method: 'get',
    responseType: 'blob'
  })
}

// 重点指标详情导出
export function majorIndexDetailExport(data) {
  const { year, category, month, zhuangtai, chuyuankesi, zyh } = data
  return request_blob({
    url: `/bazb/quality_index_list?type=0&year=${year}&is_export=1&category=${category}&month=${month}&zhuangtai=${zhuangtai}&chuyuankesi=${chuyuankesi}&zyh=${zyh}`,
    method: 'get',
    responseType: 'blob'
  })
}

//
export function getDepartmentRankExport(data) {
  return request_blob({
    url: `api/CaseHistory/Terminal/getDepartmentRankExport`,
    method: 'post',
    responseType: 'blob',
    data
  })
}
