import request from '@/utils/request'

// 创建就诊卡
export function createCard(data) {
  return request({
    url: '/system/card/create',
    method: 'post',
    data: data
  })
}

// 更新就诊卡
export function updateCard(data) {
  return request({
    url: '/system/card/update',
    method: 'put',
    data: data
  })
}

// 删除就诊卡
export function deleteCard(id) {
  return request({
    url: '/system/card/delete?id=' + id,
    method: 'delete'
  })
}

// 获得就诊卡
export function getCard(id) {
  return request({
    url: '/system/card/get?id=' + id,
    method: 'get'
  })
}

// 获得就诊卡分页
export function getCardPage(query) {
  return request({
    url: '/system/card/page',
    method: 'get',
    params: query
  })
}

// 导出就诊卡 Excel
export function exportCardExcel(query) {
  return request({
    url: '/system/card/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
