import request from '@/utils/request'

export function getDialysisRecordInitData() {
  return request({
    url: '/api/dialysis/initdata',
    method: 'get'
  })
}

export function getDialysisSchedules(ymd) {
  var params = {
    date: ymd
  }
  return request({
    url: '/api/dialysis/schedules',
    method: 'get',
    params: params
  })
}

export function getDialysisScheduleDetail(patient_id, ymd) {
  var params = {
    patient_id: patient_id,
    date: ymd
  }
  return request({
    url: '/api/dislysis/schedule',
    method: 'get',
    params: params
  })
}

export function editMonitor(patient_id, schedule_date, data,mode) {
  var params = {
    patient_id: patient_id,
    schedule_date: schedule_date,
    mode:mode
  }
  return request({
    url: '/api/dislysis/monitor/edit',
    method: 'post',
    params: params,
    data: data,
    headers:{"Permission":2},

  })
}

export function startDialysis(patient_id, schedule_date, nurse_id, bed_id, lood_drawing, puncture_nurse_id, start_time,schedual_type,mode) {
  var params = {
    patient_id: patient_id,
    date: schedule_date,
    nurse: nurse_id,
    bed: bed_id,
    puncture_nurse: puncture_nurse_id,
    start_time: start_time,
    lood_drawing: lood_drawing,
    schedual_type:schedual_type,
    mode:mode,
  }
  return request({
    url: '/api/dialysis/start_record',
    method: 'post',
    params: params,
    headers:{"Permission":2},

  })
}

export function finishDialysis(patient_id, schedule_date,end_time, nurse_id,mode) {
  var params = {
    patient_id: patient_id,
    date: schedule_date,
    nurse: nurse_id,
    end_time:end_time,
    mode:mode,
  }
  return request({
    url: '/api/dialysis/finish',
    method: 'post',
    params: params,
    headers:{"Permission":2},

  })
}

export function postDelMonitorInfo(params) {
  return request({
    url: '/api/dialysis/monitor/del',
    method: 'post',
    params: params,
    headers:{"Permission":2},

  })
}





export function getLongAdvice(params) {
  return request({
    url:'/api/dialysis/advice_remind',
    method:'Get',
    params:params,
  })
}


export function GetSchedualNumber(params) {
  return request({
    url:'/api/schedule/get',
    method:'Get',
    params:params,
  })
}



export function PostModifyStartDialysis(params) {
  return request({
    url:'/api/start_dialysis/modify',
    method:'Post',
    params:params,
    headers:{"Permission":2},

  })
}







export function PostModifyFinishDialysis(params) {
  return request({
    url:'/api/finish_dialysis/modify',
    method:'Post',
    params:params,
    headers:{"Permission":2},

  })
}



export function getTodayMonitor(params) {
  return request({
    url:'/api/today_monitor/get',
    method:'Get',
    params:params,
  })
}







