patient.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import request from '@/utils/request'
  2. // 查询病人列表
  3. export function listPatient(query) {
  4. return request({
  5. url: '/store/patient/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询病人详细
  11. export function getPatient(patientId) {
  12. return request({
  13. url: '/store/patient/' + patientId,
  14. method: 'get'
  15. })
  16. }
  17. // 查询病人详细
  18. export function getPatientByUserId(userId) {
  19. return request({
  20. url: '/store/patient/getPatient/' + userId,
  21. method: 'get'
  22. })
  23. }
  24. // 新增病人
  25. export function addPatient(data) {
  26. return request({
  27. url: '/store/patient',
  28. method: 'post',
  29. data: data
  30. })
  31. }
  32. // 修改病人
  33. export function updatePatient(data) {
  34. return request({
  35. url: '/store/patient',
  36. method: 'put',
  37. data: data
  38. })
  39. }
  40. // 删除病人
  41. export function delPatient(patientId) {
  42. return request({
  43. url: '/store/patient/' + patientId,
  44. method: 'delete'
  45. })
  46. }
  47. // 导出病人
  48. export function exportPatient(query) {
  49. return request({
  50. url: '/store/patient/export',
  51. method: 'get',
  52. params: query
  53. })
  54. }