import request from '@/utils/request'

// 查询医生处方药品列表
export function listDoctorPrescribeDrug(query) {
  return request({
    url: '/his/doctorPrescribeDrug/list',
    method: 'get',
    params: query
  })
}

// 查询医生处方药品详细
export function getDoctorPrescribeDrug(drugId) {
  return request({
    url: '/his/doctorPrescribeDrug/' + drugId,
    method: 'get'
  })
}

// 新增医生处方药品
export function addDoctorPrescribeDrug(data) {
  return request({
    url: '/his/doctorPrescribeDrug',
    method: 'post',
    data: data
  })
}

// 修改医生处方药品
export function updateDoctorPrescribeDrug(data) {
  return request({
    url: '/his/doctorPrescribeDrug',
    method: 'put',
    data: data
  })
}

// 删除医生处方药品
export function delDoctorPrescribeDrug(drugId) {
  return request({
    url: '/his/doctorPrescribeDrug/' + drugId,
    method: 'delete'
  })
}

// 导出医生处方药品
export function exportDoctorPrescribeDrug(query) {
  return request({
    url: '/his/doctorPrescribeDrug/export',
    method: 'get',
    params: query
  })
}