import request from '../utils/request'

export function getAllDepartments() {
  return request({
    url: '/appointment/getAllDepartments',
    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, openId) {
  return request({
    url: '/appointment/getDoctorInfo',
    method: 'get',
    params: { doctorCode, openId },
  })
}

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

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

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 },
  })
}
