import request from '@/utils/request'

// 查询健康档案列表
export function listHealthRecord(query) {
  return request({
    url: '/store/healthRecord/list',
    method: 'get',
    params: query
  })
}
export function listMyHealthRecord(query) {
  return request({
    url: '/store/healthRecord/myList',
    method: 'get',
    params: query
  })
}
// 查询健康档案详细
export function getHealthRecord(id) {
  return request({
    url: '/store/healthRecord/' + id,
    method: 'get'
  })
}

// 新增健康档案
export function addHealthRecord(data) {
  return request({
    url: '/store/healthRecord',
    method: 'post',
    data: data
  })
}

// 修改健康档案
export function updateHealthRecord(data) {
  return request({
    url: '/store/healthRecord',
    method: 'put',
    data: data
  })
}

// 删除健康档案
export function delHealthRecord(id) {
  return request({
    url: '/store/healthRecord/' + id,
    method: 'delete'
  })
}

// 导出健康档案
export function exportHealthRecord(query) {
  return request({
    url: '/store/healthRecord/export',
    method: 'get',
    params: query
  })
}
