import {request} from '../utils/request.js'
function family(data){ //获取家庭成员列表
  return request('/patient/family','GET',data,true)
};
function addfamily(data){ //新增家庭成员
  return request('/patient/family','POST',data,true)
};
function delfamily(id){ //删除家庭成员
  return request('/patient/family/'+id,'DELETE',data,true)
};
function familyDetail(id){ //获取家庭成员详情
  return request('/patient/family/'+id,'GET',{},true)
};
function editfamilyDetail(id,data){ //修改家庭成员
  return request('/patient/family/'+id,'PUT',data,true)
};
function getpersonal(id,data){ //获取家庭成员详情-个人情况
  return request('/patient/family/personal/'+id,'GET',data,true)
};
function addPersonal(data){ //新增家庭成员详情-个人情况
  return request('/patient/family/personal','POST',data,true)
};
function editPersonal(id,data){ //修改家庭成员详情-个人情况
  return request('/patient/family/personal/'+id,'PUT',data,true)
};
function getHealthy(id,data){ //获取家庭成员详情-个人情况
  return request('/patient/family/health/'+id,'GET',data,true)
};
function addHealthy(data){ //新增家庭成员-健康情况
  return request('/patient/family/health','POST',data,true)
};
function editHealthy(id,data){ //修改家庭成员详情-个人情况
  return request('/patient/family/health/'+id,'PUT',data,true)
};
function  myDoctor(data){ //我的医生
  return request('/patient/doctor/my','GET',data,true)
};
function  delDoctor(id){ //删除医生
  return request('/patient/doctor/history/'+id,'DELETE',{},true)
};
function  medinceRecord(data){ //获取家庭成员用药记录列表
  return request('/patient/family/product/record','GET',data,true)
};


module.exports={
  family,
  addfamily,
  delfamily,
  familyDetail,
  editfamilyDetail,
  getpersonal,
  addPersonal,
  editPersonal,
  getHealthy,
  addHealthy,
  editHealthy,
  myDoctor,
  delDoctor,
  medinceRecord
}
