From 09dc74e264b6262cbe41c9c8476e24705871d4a6 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 08 十一月 2026 23:31:17 +0800
Subject: [PATCH] yxh
---
src/api/ecg/appointment/index.ts | 89 ++++++++++++++++++++++++++++++++++++++++----
1 files changed, 81 insertions(+), 8 deletions(-)
diff --git a/src/api/ecg/appointment/index.ts b/src/api/ecg/appointment/index.ts
index 45283ba..798a472 100644
--- a/src/api/ecg/appointment/index.ts
+++ b/src/api/ecg/appointment/index.ts
@@ -3,6 +3,10 @@
// 棰勭害 VO
export interface AppointmentVO {
id: number,
+ applyNo: string // 棰勭害鐢宠缂栧彿
+ episodeId: string //灏辫瘖娴佹按鍙�
+ patSrc: number
+ tolerance:number// 鏄惁鑰愯嵂
patId: string // 鎮h�呯紪鍙�
patName: string // 鎮h�呭鍚�
patGender: number // 鎮h�呮�у埆
@@ -16,19 +20,55 @@
patWardCode: string // 鎮h�呮墍鍦ㄧ梾鍖轰唬鐮�
patWardDesc: string // 鎮h�呮墍鍦ㄧ梾鍖哄悕绉�
patBedNo: string // 搴婂彿
- bookId: string // 棰勭害缂栧彿
bookDate: Date // 棰勭害鏃ユ湡
bookTimeslot: number // 棰勭害鏃堕棿娈�
bookTime: Date // 棰勭害鍙戠敓鏃堕棿, 鐐瑰嚮棰勭害鐨勬椂闂�
- bookCheckType: number // 棰勭害妫�鏌ョ被鍨�
+ bookCheckType: number // 棰勭害妫�鏌ラ」鐩�
paid: number //宸蹭粯娆�
+ bookSeqNum: number
+ /**
+ * 銆愭湰闇�姹傘�戦潪褰撳ぉ棰勭害绛惧埌鐨�"宸茬‘璁�"鏍囪銆�
+ * 鍓嶇寮圭獥纭鍚庣疆 true 浼犵粰鍚庣锛氬悗绔嵁姝ゆ斁琛岄潪褰撳ぉ棰勭害锛屽苟鎸�**棰勭暀鍙�**鍙栧彿銆�
+ */
+ forceCheckIn?: boolean
+ // ========== 浠ヤ笅瀛楁鍚庣 AppointmentRespVO 涓�鐩存湁杩斿洖锛屾鍓� TS 鏈0鏄� ==========
+ // 闇�姹�1 浣跨敤锛氱姸鎬� / 寮�鍗曞尰甯� / 寮�鍗曟棩鏈� / 璺濅粖澶╂暟锛堢敱 doctorTime 璁$畻锛�/ 灏辫瘖鍗″彿
+ status?: string // 鐘舵�侊紙瀛楀吀 ecg_status锛�
+ doctor?: string // 寮�鍗曞尰甯�
+ doctorCode?: string // 寮�鍗曞尰甯堜唬鐮�
+ doctorTime?: Date | number | string // 寮�鍗曟棩鏈燂紙寮�鍗曟椂闂达級
+ registerDate?: Date | number | string // 鐧昏鏃堕棿
+ hospitalNo?: string // 浣忛櫌鍙�
+ medicalCard?: string // 灏辫瘖鍗″彿锛堝簱涓涓虹┖锛岄〉闈㈠洖閫�鍒� outpatientNo锛�
+ doctorAdviceNo?: string // 鍖诲槺鍙凤紙HIS root 2.16.156.10011.1.28锛涘簱涓巻鍙叉暟鎹负绌猴級
+ outpatientNo?: string // 闂ㄨ瘖鍙凤紙瀹炴祴閮ㄥ垎鏁版嵁瀛樼殑鏄韩浠借瘉鍙凤級
+ bookSrc?: number // 棰勭害鏉ユ簮锛�0浜哄伐 10骞冲彴
+ roomName?: string // 璇婂鍚嶇О
+ remark?: string // 澶囨敞
+ jjbz?: string // 鍔犳�ユ爣璁�
+ createTime?: Date | number | string // 鍒涘缓鏃堕棿
+}
+
+/**
+ * 銆愭湰闇�姹傘�戦绾﹁褰曢〉鐨勩�岄绾︽棩鏈熴�嶇敤鏃ユ湡鑼冨洿閫夋嫨鍣紝鍓嶇瀛楁鏄� `bookDateRange`锛圼'2026-11-01','2026-11-30']锛夛紝
+ * 鑰屽悗绔帴鏀剁殑鏄� `bookDateStart` / `bookDateEnd`锛堝惈棣栧熬涓ゅぉ锛夈��
+ * 杩欓噷缁熶竴杞崲锛岄伩鍏嶆瘡涓皟鐢ㄧ偣鍚勫啓涓�閬嶏細鍒嗛〉銆佸鍑洪兘璧板畠銆�
+ */
+const withBookDateRange = (params: any) => {
+ if (!params) return params
+ const { bookDateRange, ...rest } = params
+ if (Array.isArray(bookDateRange) && bookDateRange.length === 2 && bookDateRange[0] && bookDateRange[1]) {
+ rest.bookDateStart = `${bookDateRange[0]} 00:00:00`
+ rest.bookDateEnd = `${bookDateRange[1]} 23:59:59`
+ }
+ return rest
}
// 棰勭害 API
export const AppointmentApi = {
// 鏌ヨ棰勭害鍒嗛〉
getAppointmentPage: async (params: any) => {
- return await request.get({ url: `/ecg/appointment/page`, params })
+ return await request.get({ url: `/ecg/appointment/page`, params: withBookDateRange(params) })
},
// 鏌ヨ棰勭害璇︽儏
@@ -36,14 +76,42 @@
return await request.get({ url: `/ecg/appointment/get?id=` + id })
},
- // 鏌ヨ棰勭害璇︽儏
- getAppointmentByPatId: async (patId: string) => {
- return await request.get({ url: `/ecg/appointment/get-by-patient?patId=` + patId })
+ //
+ getCurAppointmentByPatIdAndCheckType: async (patId: string, checkType: number) => {
+ return await request.get({ url: `/ecg/appointment/get-current-by-patient?patId=` + patId + '&checkType=' + checkType })
+ },
+
+ // 浠嶩IS鎴栬�匘B鏌ヨ棰勭害璇︽儏
+ queryAndCreateAppointmentByPatId: async (patId: string) => {
+ return await request.get({ url: `/ecg/appointment/query-and-create-by-patient?patId=` + patId })
+ },
+
+ // 浠嶩IS鏌ヨ棰勭害鎴栧紑鍗曚俊鎭�
+ queryAppointmentFromHis: async (patId: string) => {
+ return await request.get({ url: `/ecg/appointment/query-his-by-patient?patId=` + patId })
+ },
+
+ /**
+ * 銆愭湰闇�姹傦細绱ф�ユ偅鑰呬笉鎺掗槦鐩存帴妫�鏌ャ�戞寜銆岀敵璇峰崟鍙� / 灏辫瘖鍙� / 鎮h�呯紪鍙枫�嶆煡杩戜竴涓湀锛埪�30 澶╋級鐨勯绾﹁褰曘��
+ * 缁撴灉鎸夐绾︽椂闂村�掑簭锛沗checkTypes` 涓烘湰绐楀彛寮�灞曠殑妫�鏌ラ」鐩紙閫楀彿鍒嗛殧锛岀┖鍒欎笉闄愶級銆�
+ */
+ getEmergencyCandidates: async (code: string, checkTypes?: number[]) => {
+ const types = Array.isArray(checkTypes) && checkTypes.length > 0 ? checkTypes.join(',') : ''
+ return await request.get({
+ url:
+ `/ecg/appointment/emergency-candidates?code=` +
+ encodeURIComponent(code) +
+ (types ? `&checkTypes=${types}` : '')
+ })
},
// 鏂板棰勭害
createAppointment: async (data: AppointmentVO) => {
return await request.post({ url: `/ecg/appointment/create`, data })
+ },
+ // 鐘舵�佹洿鏂�
+ alterAppointment: async (data: AppointmentVO) => {
+ return await request.post({ url: `/ecg/appointment/updateStatus`, data })
},
// 淇敼棰勭害
@@ -58,12 +126,17 @@
// 瀵煎嚭棰勭害 Excel
exportAppointment: async (params) => {
- return await request.download({ url: `/ecg/appointment/export-excel`, params })
+ return await request.download({ url: `/ecg/appointment/export-excel`, params: withBookDateRange(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 })
}
}
--
Gitblit v1.9.3