import request from '@/utils/request'

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

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

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

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

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

// 查询医院列表
export function listAllHospital(query) {
  return request({
    url: '/care/hospital/listAll',
    method: 'get',
    params: query
  })
}
