import request from '@/utils/request'

/** 药物名称列表（模糊检索，去重最多 50 条） */
export function listDrugNames(params) {
  return request({
    url: '/app/medication/drug/names',
    method: 'GET',
    params
  })
}

/** 查询药物详情 */
export function queryDrug(params) {
  return request({
    url: '/app/medication/drug/query',
    method: 'GET',
    params
  })
}

/** 计算休药期 */
export function calculateWithdrawal(params) {
  return request({
    url: '/app/medication/withdrawal/calculate',
    method: 'GET',
    params
  })
}

/** 两药配伍检查 */
export function checkCompatibility(params) {
  return request({
    url: '/app/medication/compatibility/check',
    method: 'GET',
    params
  })
}
