import request from '@/utils/request'

// 查询慢性疾病档案列表
export function listChronicDisease(query) {
  return request({
    url: '/health/chronicDisease/list',
    method: 'get',
    params: query
  })
}

// 根据成员ID查询慢性疾病档案列表
export function listChronicDiseaseByMember(personId) {
  return request({
    url: '/health/chronicDisease/listByPerson/' + personId,
    method: 'get'
  })
}

// 查询慢性疾病档案详细
export function getChronicDisease(id) {
  return request({
    url: '/health/chronicDisease/' + id,
    method: 'get'
  })
}

// 新增慢性疾病档案
export function addChronicDisease(data) {
  return request({
    url: '/health/chronicDisease',
    method: 'post',
    data
  })
}

// 修改慢性疾病档案
export function updateChronicDisease(data) {
  return request({
    url: '/health/chronicDisease',
    method: 'put',
    data
  })
}

// 删除慢性疾病档案
export function delChronicDisease(id) {
  return request({
    url: '/health/chronicDisease/' + id,
    method: 'delete'
  })
}