import request from '@/utils/request'

// 创建医院信息
export function createHospital(data) {
  return request({
    url: '/system/hospital/create',
    method: 'post',
    data: data
  })
}

// 更新医院信息
export function updateHospital(data) {
  return request({
    url: '/system/hospital/update',
    method: 'put',
    data: data
  })
}

// 删除医院信息
export function deleteHospital(id) {
  return request({
    url: '/system/hospital/delete?id=' + id,
    method: 'delete'
  })
}

// 获得医院信息
export function getHospital(id) {
  return request({
    url: '/system/hospital/get?id=' + id,
    method: 'get'
  })
}

// 获得医院信息分页
export function getHospitalPage(query) {
  return request({
    url: '/system/hospital/page',
    method: 'get',
    params: query
  })
}

// 导出医院信息 Excel
export function exportHospitalExcel(query) {
  return request({
    url: '/system/hospital/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
