import request from '@/utils/request'

// 查询药膳食疗列表
export function listMedicatedFood(query) {
  return request({
    url: '/his/medicatedFood/list',
    method: 'get',
    params: query
  })
}

// 下载导入模板
export function importTemplate() {
  return request({
    url: '/his/medicatedFood/importTemplate',
    method: 'get'
  })
}
// 查询药膳食疗详细
export function getMedicatedFood(id) {
  return request({
    url: '/his/medicatedFood/' + id,
    method: 'get'
  })
}

// 新增药膳食疗
export function addMedicatedFood(data) {
  return request({
    url: '/his/medicatedFood',
    method: 'post',
    data: data
  })
}

// 修改药膳食疗
export function updateMedicatedFood(data) {
  return request({
    url: '/his/medicatedFood',
    method: 'put',
    data: data
  })
}

// 删除药膳食疗
export function delMedicatedFood(id) {
  return request({
    url: '/his/medicatedFood/' + id,
    method: 'delete'
  })
}

// 导出药膳食疗
export function exportMedicatedFood(query) {
  return request({
    url: '/his/medicatedFood/export',
    method: 'get',
    params: query
  })
}