import request from '../utils/request'

export function getAllDepartments() {
  return request({
    url: '/appointment/getAllDepartments',
    method: 'get',
  })
}

export function getAllNightDepartments() {
  return request({
    url: '/appointment/getAllNightDepartments',
    method: 'get',
  })
}

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

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

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

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

export function getDoctorInfo(doctorCode) {
  return request({
    url: '/appointment/getDoctorInfo',
    method: 'get',
    params: { doctorCode },
  })
}

export function checkAppointmentRequirements(patientId, deptCode) {
  return request({
    url: '/appointment/checkAppointmentRequirements',
    method: 'get',
    params: { patientId, deptCode },
  })
}

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

export function getDoctorQrCode(doctorCode) {
  return request({
    url: '/appointment/getDoctorQrCode',
    method: 'get',
    params: { doctorCode },
  })
}

export function getPaidMzGhList(patientId) {
  return request({
    url: '/appointment/getPaidMzGhList',
    method: 'get',
    params: { patientId },
  })
}

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

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

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

export function getDeptPos(deptCode) {
  return request({
    url: '/appointment/getDeptPos',
    method: 'get',
    params: { deptCode },
  })
}