import request from '@/utils/request'

// 查询经典名方列表
export function listFamousPrescribe(query) {
  return request({
    url: '/his/famousPrescribe/list',
    method: 'get',
    params: query
  })
}

// 查询经典名方详细
export function getFamousPrescribe(id) {
  return request({
    url: '/his/famousPrescribe/' + id,
    method: 'get'
  })
}
// 下载导入模板
export function importTemplate() {
  return request({
    url: '/his/chineseMedicine/importTemplate',
    method: 'get'
  })
}
// 新增经典名方
export function addFamousPrescribe(data) {
  return request({
    url: '/his/famousPrescribe',
    method: 'post',
    data: data
  })
}

// 修改经典名方
export function updateFamousPrescribe(data) {
  return request({
    url: '/his/famousPrescribe',
    method: 'put',
    data: data
  })
}

// 删除经典名方
export function delFamousPrescribe(id) {
  return request({
    url: '/his/famousPrescribe/' + id,
    method: 'delete'
  })
}

// 导出经典名方
export function exportFamousPrescribe(query) {
  return request({
    url: '/his/famousPrescribe/export',
    method: 'get',
    params: query
  })
}
