import request from '../utils/request'

export function getDirectBookableItems() {
  return request({
    url: '/bookable/getDirectBookableItems',
    method: 'get',
  })
}

export function applyDirectBookableItem(data) {
  return request({
    url: '/bookable/applyDirectBookableItem',
    method: 'post',
    data
  })
}

export function getBookableData(tableName) {
  return request({
    url: '/bookable/getBookableData',
    method: 'get',
    params: { tableName },
  })
}

export function getFullScheduleOfMedicalForPlatform(execUnit) {
  return request({
    url: '/bookable/getFullScheduleOfMedicalForPlatform',
    method: 'get',
    params: { execUnit },
  })
}

export function getBookTip(tableName, code) {
  return request({
    url: '/bookable/getBookTip',
    method: 'get',
    params: { tableName, code },
  })
}

export function saveBookPrescription(data) {
  return request({
    url: '/bookable/saveBookPrescription',
    method: 'post',
    data,
  })
}

export function getRejectedYjReq(reqNo) {
  return request({
    url: '/bookable/getRejectedYjReq',
    method: 'get',
    params: { reqNo },
  })
}

export function getOtherTimeForRejectedReq(execUnit) {
  return request({
    url: '/bookable/getOtherTimeForRejectedReq',
    method: 'get',
    params: { execUnit },
  })
}

export function changeYjReqTime(data) {
  return request({
    url: '/bookable/changeYjReqTime',
    method: 'post',
    data,
  })
}

export function applyRefund(reqNo) {
  return request({
    url: '/bookable/applyRefund',
    method: 'get',
    params: { reqNo },
  })
}
