eight
2024-11-29 d9020ea85395682af5621a6de6bf073d9ee5d086
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import request from '@/config/axios'
 
// 预约 VO
export interface AppointmentVO {
  id: number,
  applyNo: string  // 预约申请编号
  episodeId: number //就诊流水号
  patSrc: number
  patId: string // 患者编号
  patName: string // 患者姓名
  patGender: number // 患者性别
  patBirthday: Date // 患者生日
  patMobile: string // 患者手机
  patPhone: string // 患者电话
  patIdentityId: string // 身份证号
  patAddr: string // 患者地址
  patDeptCode: string // 患者所在科室代码
  patDeptDesc: string // 患者所在科室名称
  patWardCode: string // 患者所在病区代码
  patWardDesc: string // 患者所在病区名称
  patBedNo: string // 床号
  bookDate: Date // 预约日期
  bookTimeslot: number // 预约时间段
  bookTime: Date // 预约发生时间, 点击预约的时间
  bookCheckType: number // 预约检查类型
  paid: number //已付款
  bookSeqNum: number
}
 
// 预约 API
export const AppointmentApi = {
  // 查询预约分页
  getAppointmentPage: async (params: any) => {
    return await request.get({ url: `/ecg/appointment/page`, params })
  },
 
  // 查询预约详情
  getAppointment: async (id: number) => {
    return await request.get({ url: `/ecg/appointment/get?id=` + id })
  },
 
  //
  getCurAppointmentByPatIdAndCheckType: async (patId: string, checkType: number) => {
    return await request.get({ url: `/ecg/appointment/get-current-by-patient?patId=` + patId + '&checkType=' + checkType })
  },
 
  // 从HIS或者DB查询预约详情
  queryAndCreateAppointmentByPatId: async (patId: string) => {
    return await request.get({ url: `/ecg/appointment/query-and-create-by-patient?patId=` + patId })
  },
 
  // 从HIS查询预约或开单信息
  queryAppointmentFromHis: async (patId: string) => {
    return await request.get({ url: `/ecg/appointment/query-his-by-patient?patId=` + patId })
  },
 
  // 新增预约
  createAppointment: async (data: AppointmentVO) => {
    return await request.post({ url: `/ecg/appointment/create`, data })
  },
 
  // 修改预约
  updateAppointment: async (data: AppointmentVO) => {
    return await request.put({ url: `/ecg/appointment/update`, data })
  },
 
  // 删除预约
  deleteAppointment: async (id: number) => {
    return await request.delete({ url: `/ecg/appointment/delete?id=` + id })
  },
 
  // 导出预约 Excel
  exportAppointment: async (params) => {
    return await request.download({ url: `/ecg/appointment/export-excel`, params })
  },
 
  // 预约确认
  confirmAppointment: async (data: AppointmentVO) => {
      return await request.post({ url: `/ecg/appointment/confirm`, data })
  },
 
  // VIP预约确认
  confirmAppointmentVip: async (data: AppointmentVO) => {
      return await request.post({ url: `/ecg/appointment/confirm-vip`, data })
  }
 
}