import { Get, Post } from "../../lib/request/method";


export function healthReportListMethod() {
  const transform = ({ data }: AnyObject) => {
    return Array.isArray(data) ? data.map(item => {
      return {
        id: item.healthAnalysisReportId,
        reportTime: item.time3,
        description: [item.willillStateName, item.willillDegreeName, item.willillSocialName, item.willillFunctionName].filter(Boolean).join('，')
      }
    }) : []
  }
  return Get(`/analysisManage/getHarsTid`, { transform })
}
// 线下非药物治疗
export function getOfflineTreatmentListMethod(progress: string) {
  return Post(`/patientCrManage/pagePofflineCp?pageNum=1&pageSize=1000000000`, { progress }, {
    transform({ data }: AnyObject) {
      return data;
    }
  })
}