import request from '@/utils/request'

// 查询医院列表
export function listHospital(query) {
  return request({
    url: '/his/hospital/list',
    method: 'get',
    params: query
  })
}
// 查询医院列表
export function listAllHospital(query) {
  return request({
    url: '/his/hospital/allList',
    method: 'get',
    params: query
  })
}
// 下载导入模板
export function importTemplate() {
  return request({
    url: '/his/hospital/importTemplate',
    method: 'get'
  })
}
// 查询医院详细
export function getHospital(hospitalId) {
  return request({
    url: '/his/hospital/' + hospitalId,
    method: 'get'
  })
}

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

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

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

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