import request from '@/utils/request'

// 查询诊所列表
export function listHospital(query) {
  return request({
    url: '/hospital/hospital/list',
    method: 'get',
    params: query
  })
}

// 查询诊所详细
export function getHospital(hospitalId) {
  return request({
    url: '/hospital/hospital/' + hospitalId,
    method: 'get'
  })
}

// 新增诊所
export function addHospital(data) {
  return request({
    url: '/hospital/hospital',
    method: 'post',
    data: data
  })
}

// 修改诊所
export function updateHospital(data) {
  return request({
    url: '/hospital/hospital',
    method: 'put',
    data: data
  })
}

// 删除诊所
export function delHospital(hospitalId) {
  return request({
    url: '/hospital/hospital/' + hospitalId,
    method: 'delete'
  })
}

// 导出诊所
export function exportHospital(query) {
  return request({
    url: '/hospital/hospital/export',
    method: 'get',
    params: query
  })
}

