import request from '@/utils/request'

// 查询报告指标检查结果列表
export function listResult(query) {
  return request({
    url: '/admin/medical/result/page',
    method: 'get',
    params: query
  })
}

// 查询报告指标检查结果详细
export function getResult(resultId) {
  return request({
    url: '/admin/medical/result/' + resultId,
    method: 'get'
  })
}

// 根据报告ID查询所有指标结果
export function listByReportId(reportId) {
  return request({
    url: '/admin/medical/result/listByReport/' + reportId,
    method: 'get'
  })
}

// 根据指标ID查询所有结果
export function listByIndicatorId(indicatorId) {
  return request({
    url: '/admin/medical/result/listByIndicator/' + indicatorId,
    method: 'get'
  })
}

// 新增报告指标检查结果
export function addResult(data) {
  return request({
    url: '/admin/medical/result/add',
    method: 'post',
    data: data
  })
}

// 批量新增报告指标检查结果
export function batchAddResult(data) {
  return request({
    url: '/admin/medical/result/batchAdd',
    method: 'post',
    data: data
  })
}

// 修改报告指标检查结果
export function updateResult(data) {
  return request({
    url: '/admin/medical/result/update',
    method: 'put',
    data: data
  })
}

// 删除报告指标检查结果
export function delResult(resultId) {
  return request({
    url: '/admin/medical/result/' + resultId,
    method: 'delete'
  })
}
