import request from '@/utils/request'

/**
 * 获取任务列表
 */
export const getTasks = (params) => {
    return request({
      url: `/SfPlanPatient/sfplanpatient`,
      params,
      method: 'get',
    })
}

/**
 * 获取任务详情
 */
export const getTaskInfo = (id) => {
    return request({
      url: `/SfPlanPatient/sfplanpatient/${id}`,
      method: 'get',
    })
}

/**
 * 提交任务结果
 */
export const submitTaskResult = (data) => {
  return request({
    url: `/SfPlanPatient/sfplanpatient/submit`,
    data,
    method: 'post',
  })
}


/**
 * 获取报告结果
 */
export const getSelfTaskReport = () => {
  return request({
    url: `/SfPlanReport/getTaskSituation`,
    method: 'get',
  })
}

/**
 * 随访日志
 */
export const getVisitResults = (params) => {
  return request({
    url: `/SfTaskOperate/sftaskoperate`,
    params,
    method: 'get',
  })
}