import request from '@/utils/request'

// 查询医疗机构列表
export function listMechanism(query) {
  return request({
    url: '/medical/mechanism/list',
    method: 'get',
    params: query
  })
}

// 查询医疗机构详细
export function getMechanism(id) {
  return request({
    url: '/medical/mechanism/' + id,
    method: 'get'
  })
}

// 新增医疗机构
export function addMechanism(data) {
  return request({
    url: '/medical/mechanism',
    method: 'post',
    data: data
  })
}

// 修改医疗机构
export function updateMechanism(data) {
  return request({
    url: '/medical/mechanism',
    method: 'put',
    data: data
  })
}

// 删除医疗机构
export function delMechanism(id) {
  return request({
    url: '/medical/mechanism/' + id,
    method: 'delete'
  })
}

// 导出医疗机构
export function exportMechanism(query) {
  return request({
    url: '/medical/mechanism/export',
    method: 'get',
    params: query
  })
}