request.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { Get, Post } from "../../lib/request/method";
  2. export function healthReportListMethod() {
  3. const transform = ({ data }: AnyObject) => {
  4. return Array.isArray(data) ? data.map(item => {
  5. return {
  6. id: item.healthAnalysisReportId,
  7. reportTime: item.time3,
  8. description: [item.willillStateName, item.willillDegreeName, item.willillSocialName, item.willillFunctionName].filter(Boolean).join(',')
  9. }
  10. }) : []
  11. }
  12. return Get(`/analysisManage/getHarsTid`, { transform })
  13. }
  14. // 线下非药物治疗
  15. export function getOfflineTreatmentListMethod(progress: string) {
  16. return Post(`/patientCrManage/pagePofflineCp?pageNum=1&pageSize=1000000000`, { progress }, {
  17. transform({ data }: AnyObject) {
  18. return data;
  19. }
  20. })
  21. }
  22. //患者线下调理方案修改预约时间 offlineId线下任务id time预约时间
  23. export function updateAppointmentMethod(offlineId: string, time: string) {
  24. return Post(`/patientCrManage/pofflineCpUpdateApply/${offlineId}`, {}, {
  25. params: {
  26. time,
  27. },
  28. transform({ data }: AnyObject) {
  29. return data;
  30. },
  31. })
  32. }
  33. //患者线下调理方案预约取消
  34. export function cancelAppointmentMethod(offlineId: number) {
  35. return Post(`/patientCrManage/pofflineCpCancleApply/${offlineId}`, {}, {
  36. transform({ data }: AnyObject) {
  37. return data;
  38. }
  39. })
  40. }
  41. //患者线下调理方案预约
  42. export function appointmentMethod(offlineId: string, time: string) {
  43. return Post(`/patientCrManage/pofflineCpApply/${offlineId}`, {}, {
  44. params: {
  45. time,
  46. },
  47. transform({ data }: AnyObject) {
  48. return data;
  49. }
  50. })
  51. }