import request from '@/utils/request'

// 查询医生管理列表
export function listDoctor(query) {
  return request({
    url: '/his/doctor/list',
    method: 'get',
    params: query
  })
}

export function getUserList(name) {
  return request({
    url: '/his/doctor/user/list',
    method: 'get',
    params: name
  })
}
export function getFollowDoctorList(query) {
  return request({
    url: '/his/doctor/followDoctorList',
    method: 'get',
    params: query
  })
}
export function getAllFollowDoctorList(query) {
  return request({
    url: '/his/doctor/allFollowDoctorList',
    method: 'get',
    params: query
  })
}
export function docList() {
  return request({
    url: '/his/doctor/doc/list',
    method: 'get',

  })
}
// 查询医生名称列表
export function listdocuser(query) {
  return request({
    url: '/his/doctor/userdoc/list',
    method: 'get',
    params: query
  })
}

// 获取处方医生下拉列表
export function getPrescribeDoctorSelect() {
  return request({
    url: '/his/doctor/getCompanyDoctorSelect',
    method: 'get'
  })
}

export function getDoctorPrice(doctorId) {
  return request({
    url: '/his/price/getDoctorPrice/' + doctorId,
    method: 'get'
  })
}


export function editPassWord(data) {
  return request({
    url: '/his/doctor/editPassWord',
    method: 'put',
    data: data
  })
}

export function editDoctorPrice(data) {
  return request({
    url: '/his/price/editDoctorPrice',
    method: 'post',
    data: data
  })
}
// 查询医生管理详细
export function getDoctor(doctorId) {
  return request({
    url: '/his/doctor/' + doctorId,
    method: 'get'
  })
}
// 新增医生管理
export function addDoctor(data) {
  return request({
    url: '/his/doctor',
    method: 'post',
    data: data
  })
}
export function editFollow(data) {
  return request({
    url: '/his/doctor/editFollow',
    method: 'put',
    data: data
  })
}
// 修改医生管理
export function updateDoctor(data) {
  return request({
    url: '/his/doctor',
    method: 'put',
    data: data
  })
}

// 修改医生管理
export function editPrice(data) {
  return request({
    url: '/his/doctor/editDoctorPrice',
    method: 'put',
    data: data
  })
}

// 修改医生管理
export function updateAuditDoctor(data) {
  return request({
    url: '/his/doctor/editDoctor',
    method: 'put',
    data: data
  })
}


// 删除医生管理
export function delDoctor(doctorId) {
  return request({
    url: '/his/doctor/' + doctorId,
    method: 'delete'
  })
}

// 导出医生管理
export function getWxaCodeUnLimit() {
  return request({
    url: '/his/doctor/getWxaCodeUnLimit',
    method: 'get',
  })
}
// 导出医生管理
export function exportDoctor(query) {
  return request({
    url: '/his/doctor/export',
    method: 'get',
    params: query
  })
}

// 医生选择列表
export function getChooseDoctorList(query) {
  return request({
    url: '/his/doctor/getChooseDoctorList',
    method: 'get',
    params: query
  })
}
