evo360-types 1.3.91 → 1.3.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apps/evo-med/appointment/zod-schemas.d.ts +586 -43
- package/dist/apps/evo-med/appointment/zod-schemas.js +65 -14
- package/dist/apps/evo-med/appointment/zod-schemas.ts +69 -14
- package/dist/types/evo-med/appointment/index.d.ts +56 -11
- package/dist/types/evo-med/appointment/index.ts +64 -19
- package/dist/types/evo-med/insurance/index.d.ts +1 -0
- package/dist/types/evo-med/insurance/index.ts +1 -0
- package/dist/types/evo-med/procedure/index.d.ts +1 -0
- package/dist/types/evo-med/procedure/index.ts +1 -0
- package/package.json +1 -1
|
@@ -68,15 +68,12 @@ export declare const zAppointmentProfessionalSchema: z.ZodObject<{
|
|
|
68
68
|
}, z.ZodTypeAny, "passthrough">>;
|
|
69
69
|
export declare const zAppointmentInsuranceSchema: z.ZodObject<{
|
|
70
70
|
name: z.ZodString;
|
|
71
|
-
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
72
71
|
insuranceRef: z.ZodOptional<z.ZodAny>;
|
|
73
72
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
74
73
|
name: z.ZodString;
|
|
75
|
-
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
76
74
|
insuranceRef: z.ZodOptional<z.ZodAny>;
|
|
77
75
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
78
76
|
name: z.ZodString;
|
|
79
|
-
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
80
77
|
insuranceRef: z.ZodOptional<z.ZodAny>;
|
|
81
78
|
}, z.ZodTypeAny, "passthrough">>;
|
|
82
79
|
export declare const zAppointmentPaymentSchema: z.ZodObject<{
|
|
@@ -101,7 +98,148 @@ export declare const zAppointmentPaymentSchema: z.ZodObject<{
|
|
|
101
98
|
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
102
99
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
103
100
|
}, z.ZodTypeAny, "passthrough">>;
|
|
104
|
-
export declare const zAppointmentProcedureSchema: z.
|
|
101
|
+
export declare const zAppointmentProcedureSchema: z.ZodObject<{
|
|
102
|
+
code: z.ZodString;
|
|
103
|
+
name: z.ZodString;
|
|
104
|
+
technical_name: z.ZodString;
|
|
105
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
106
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
107
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
108
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
color: z.ZodOptional<z.ZodString>;
|
|
110
|
+
acronym: z.ZodOptional<z.ZodString>;
|
|
111
|
+
description: z.ZodOptional<z.ZodString>;
|
|
112
|
+
tuss: z.ZodOptional<z.ZodString>;
|
|
113
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
|
+
procedureRef: z.ZodOptional<z.ZodAny>;
|
|
116
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
117
|
+
code: z.ZodString;
|
|
118
|
+
name: z.ZodString;
|
|
119
|
+
technical_name: z.ZodString;
|
|
120
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
121
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
122
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
123
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
color: z.ZodOptional<z.ZodString>;
|
|
125
|
+
acronym: z.ZodOptional<z.ZodString>;
|
|
126
|
+
description: z.ZodOptional<z.ZodString>;
|
|
127
|
+
tuss: z.ZodOptional<z.ZodString>;
|
|
128
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
130
|
+
procedureRef: z.ZodOptional<z.ZodAny>;
|
|
131
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
132
|
+
code: z.ZodString;
|
|
133
|
+
name: z.ZodString;
|
|
134
|
+
technical_name: z.ZodString;
|
|
135
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
136
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
137
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
138
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
color: z.ZodOptional<z.ZodString>;
|
|
140
|
+
acronym: z.ZodOptional<z.ZodString>;
|
|
141
|
+
description: z.ZodOptional<z.ZodString>;
|
|
142
|
+
tuss: z.ZodOptional<z.ZodString>;
|
|
143
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
144
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
145
|
+
procedureRef: z.ZodOptional<z.ZodAny>;
|
|
146
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
147
|
+
export declare const zAppointmentAppointmentRequestTypeSchema: z.ZodObject<{
|
|
148
|
+
code: z.ZodString;
|
|
149
|
+
name: z.ZodString;
|
|
150
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
code: string;
|
|
153
|
+
name: string;
|
|
154
|
+
external_id?: string | null | undefined;
|
|
155
|
+
}, {
|
|
156
|
+
code: string;
|
|
157
|
+
name: string;
|
|
158
|
+
external_id?: string | null | undefined;
|
|
159
|
+
}>;
|
|
160
|
+
export declare const zAppointmentAppointmentSourceSchema: z.ZodObject<{
|
|
161
|
+
code: z.ZodString;
|
|
162
|
+
name: z.ZodString;
|
|
163
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
|
+
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
code: string;
|
|
166
|
+
name: string;
|
|
167
|
+
external_id?: string | null | undefined;
|
|
168
|
+
}, {
|
|
169
|
+
code: string;
|
|
170
|
+
name: string;
|
|
171
|
+
external_id?: string | null | undefined;
|
|
172
|
+
}>;
|
|
173
|
+
export declare const zAppointmentRescheduleSchema: z.ZodObject<{
|
|
174
|
+
appointmentSource: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
code: z.ZodString;
|
|
176
|
+
name: z.ZodString;
|
|
177
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
178
|
+
}, "strip", z.ZodTypeAny, {
|
|
179
|
+
code: string;
|
|
180
|
+
name: string;
|
|
181
|
+
external_id?: string | null | undefined;
|
|
182
|
+
}, {
|
|
183
|
+
code: string;
|
|
184
|
+
name: string;
|
|
185
|
+
external_id?: string | null | undefined;
|
|
186
|
+
}>>;
|
|
187
|
+
user_name: z.ZodOptional<z.ZodString>;
|
|
188
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
189
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
190
|
+
userRef: z.ZodOptional<z.ZodAny>;
|
|
191
|
+
created_at: z.ZodDate;
|
|
192
|
+
}, "strip", z.ZodTypeAny, {
|
|
193
|
+
created_at: Date;
|
|
194
|
+
userRef?: any;
|
|
195
|
+
external_id?: string | null | undefined;
|
|
196
|
+
user_name?: string | undefined;
|
|
197
|
+
appointmentSource?: {
|
|
198
|
+
code: string;
|
|
199
|
+
name: string;
|
|
200
|
+
external_id?: string | null | undefined;
|
|
201
|
+
} | undefined;
|
|
202
|
+
reason?: string | undefined;
|
|
203
|
+
}, {
|
|
204
|
+
created_at: Date;
|
|
205
|
+
userRef?: any;
|
|
206
|
+
external_id?: string | null | undefined;
|
|
207
|
+
user_name?: string | undefined;
|
|
208
|
+
appointmentSource?: {
|
|
209
|
+
code: string;
|
|
210
|
+
name: string;
|
|
211
|
+
external_id?: string | null | undefined;
|
|
212
|
+
} | undefined;
|
|
213
|
+
reason?: string | undefined;
|
|
214
|
+
}>;
|
|
215
|
+
export declare const zAppointmentSpecialtySchema: z.ZodObject<{
|
|
216
|
+
code: z.ZodString;
|
|
217
|
+
name: z.ZodString;
|
|
218
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
219
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
220
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
221
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
222
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
223
|
+
specialtyRef: z.ZodOptional<z.ZodAny>;
|
|
224
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
225
|
+
code: z.ZodString;
|
|
226
|
+
name: z.ZodString;
|
|
227
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
228
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
229
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
230
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
231
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
|
+
specialtyRef: z.ZodOptional<z.ZodAny>;
|
|
233
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
234
|
+
code: z.ZodString;
|
|
235
|
+
name: z.ZodString;
|
|
236
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
237
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
238
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
239
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
240
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
241
|
+
specialtyRef: z.ZodOptional<z.ZodAny>;
|
|
242
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
105
243
|
export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
106
244
|
id: z.ZodString;
|
|
107
245
|
ref: z.ZodAny;
|
|
@@ -116,10 +254,63 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
116
254
|
status: z.ZodString;
|
|
117
255
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
118
256
|
notes: z.ZodOptional<z.ZodString>;
|
|
119
|
-
appointmentMode: z.ZodEnum<["telemedicine", "in_person"]
|
|
120
|
-
appointmentType: z.ZodString
|
|
121
|
-
appointmentBaseType: z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]
|
|
122
|
-
|
|
257
|
+
appointmentMode: z.ZodOptional<z.ZodEnum<["telemedicine", "in_person"]>>;
|
|
258
|
+
appointmentType: z.ZodOptional<z.ZodString>;
|
|
259
|
+
appointmentBaseType: z.ZodOptional<z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]>>;
|
|
260
|
+
appointmentSource: z.ZodOptional<z.ZodObject<{
|
|
261
|
+
code: z.ZodString;
|
|
262
|
+
name: z.ZodString;
|
|
263
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
264
|
+
}, "strip", z.ZodTypeAny, {
|
|
265
|
+
code: string;
|
|
266
|
+
name: string;
|
|
267
|
+
external_id?: string | null | undefined;
|
|
268
|
+
}, {
|
|
269
|
+
code: string;
|
|
270
|
+
name: string;
|
|
271
|
+
external_id?: string | null | undefined;
|
|
272
|
+
}>>;
|
|
273
|
+
appointmentRequestType: z.ZodOptional<z.ZodObject<{
|
|
274
|
+
code: z.ZodString;
|
|
275
|
+
name: z.ZodString;
|
|
276
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
277
|
+
}, "strip", z.ZodTypeAny, {
|
|
278
|
+
code: string;
|
|
279
|
+
name: string;
|
|
280
|
+
external_id?: string | null | undefined;
|
|
281
|
+
}, {
|
|
282
|
+
code: string;
|
|
283
|
+
name: string;
|
|
284
|
+
external_id?: string | null | undefined;
|
|
285
|
+
}>>;
|
|
286
|
+
specialty: z.ZodOptional<z.ZodObject<{
|
|
287
|
+
code: z.ZodString;
|
|
288
|
+
name: z.ZodString;
|
|
289
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
290
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
291
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
292
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
293
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
294
|
+
specialtyRef: z.ZodOptional<z.ZodAny>;
|
|
295
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
296
|
+
code: z.ZodString;
|
|
297
|
+
name: z.ZodString;
|
|
298
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
299
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
300
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
301
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
302
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
303
|
+
specialtyRef: z.ZodOptional<z.ZodAny>;
|
|
304
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
305
|
+
code: z.ZodString;
|
|
306
|
+
name: z.ZodString;
|
|
307
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
308
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
309
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
310
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
311
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
312
|
+
specialtyRef: z.ZodOptional<z.ZodAny>;
|
|
313
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
123
314
|
address: z.ZodOptional<z.ZodObject<{
|
|
124
315
|
address_name: z.ZodOptional<z.ZodString>;
|
|
125
316
|
address_line1: z.ZodOptional<z.ZodString>;
|
|
@@ -157,8 +348,53 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
157
348
|
address_geo?: any;
|
|
158
349
|
address_name?: string | undefined;
|
|
159
350
|
}>>;
|
|
160
|
-
procedures: z.ZodOptional<z.ZodArray<z.
|
|
161
|
-
|
|
351
|
+
procedures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
352
|
+
code: z.ZodString;
|
|
353
|
+
name: z.ZodString;
|
|
354
|
+
technical_name: z.ZodString;
|
|
355
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
356
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
357
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
358
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
359
|
+
color: z.ZodOptional<z.ZodString>;
|
|
360
|
+
acronym: z.ZodOptional<z.ZodString>;
|
|
361
|
+
description: z.ZodOptional<z.ZodString>;
|
|
362
|
+
tuss: z.ZodOptional<z.ZodString>;
|
|
363
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
364
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
365
|
+
procedureRef: z.ZodOptional<z.ZodAny>;
|
|
366
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
367
|
+
code: z.ZodString;
|
|
368
|
+
name: z.ZodString;
|
|
369
|
+
technical_name: z.ZodString;
|
|
370
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
371
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
372
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
373
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
374
|
+
color: z.ZodOptional<z.ZodString>;
|
|
375
|
+
acronym: z.ZodOptional<z.ZodString>;
|
|
376
|
+
description: z.ZodOptional<z.ZodString>;
|
|
377
|
+
tuss: z.ZodOptional<z.ZodString>;
|
|
378
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
379
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
380
|
+
procedureRef: z.ZodOptional<z.ZodAny>;
|
|
381
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
382
|
+
code: z.ZodString;
|
|
383
|
+
name: z.ZodString;
|
|
384
|
+
technical_name: z.ZodString;
|
|
385
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
386
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
387
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
388
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
389
|
+
color: z.ZodOptional<z.ZodString>;
|
|
390
|
+
acronym: z.ZodOptional<z.ZodString>;
|
|
391
|
+
description: z.ZodOptional<z.ZodString>;
|
|
392
|
+
tuss: z.ZodOptional<z.ZodString>;
|
|
393
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
394
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
395
|
+
procedureRef: z.ZodOptional<z.ZodAny>;
|
|
396
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
397
|
+
patient: z.ZodOptional<z.ZodObject<{
|
|
162
398
|
display_name: z.ZodString;
|
|
163
399
|
gender: z.ZodOptional<z.ZodString>;
|
|
164
400
|
patientRef: z.ZodOptional<z.ZodAny>;
|
|
@@ -170,7 +406,7 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
170
406
|
display_name: z.ZodString;
|
|
171
407
|
gender: z.ZodOptional<z.ZodString>;
|
|
172
408
|
patientRef: z.ZodOptional<z.ZodAny>;
|
|
173
|
-
}, z.ZodTypeAny, "passthrough"
|
|
409
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
174
410
|
professional: z.ZodOptional<z.ZodObject<{
|
|
175
411
|
display_name: z.ZodString;
|
|
176
412
|
gender: z.ZodOptional<z.ZodString>;
|
|
@@ -186,15 +422,12 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
186
422
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
187
423
|
insurance: z.ZodOptional<z.ZodObject<{
|
|
188
424
|
name: z.ZodString;
|
|
189
|
-
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
190
425
|
insuranceRef: z.ZodOptional<z.ZodAny>;
|
|
191
426
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
192
427
|
name: z.ZodString;
|
|
193
|
-
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
194
428
|
insuranceRef: z.ZodOptional<z.ZodAny>;
|
|
195
429
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
196
430
|
name: z.ZodString;
|
|
197
|
-
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
198
431
|
insuranceRef: z.ZodOptional<z.ZodAny>;
|
|
199
432
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
200
433
|
payment: z.ZodOptional<z.ZodObject<{
|
|
@@ -219,11 +452,51 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
219
452
|
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
220
453
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
221
454
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
455
|
+
reschedules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
456
|
+
appointmentSource: z.ZodOptional<z.ZodObject<{
|
|
457
|
+
code: z.ZodString;
|
|
458
|
+
name: z.ZodString;
|
|
459
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
460
|
+
}, "strip", z.ZodTypeAny, {
|
|
461
|
+
code: string;
|
|
462
|
+
name: string;
|
|
463
|
+
external_id?: string | null | undefined;
|
|
464
|
+
}, {
|
|
465
|
+
code: string;
|
|
466
|
+
name: string;
|
|
467
|
+
external_id?: string | null | undefined;
|
|
468
|
+
}>>;
|
|
469
|
+
user_name: z.ZodOptional<z.ZodString>;
|
|
470
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
471
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
472
|
+
userRef: z.ZodOptional<z.ZodAny>;
|
|
473
|
+
created_at: z.ZodDate;
|
|
474
|
+
}, "strip", z.ZodTypeAny, {
|
|
475
|
+
created_at: Date;
|
|
476
|
+
userRef?: any;
|
|
477
|
+
external_id?: string | null | undefined;
|
|
478
|
+
user_name?: string | undefined;
|
|
479
|
+
appointmentSource?: {
|
|
480
|
+
code: string;
|
|
481
|
+
name: string;
|
|
482
|
+
external_id?: string | null | undefined;
|
|
483
|
+
} | undefined;
|
|
484
|
+
reason?: string | undefined;
|
|
485
|
+
}, {
|
|
486
|
+
created_at: Date;
|
|
487
|
+
userRef?: any;
|
|
488
|
+
external_id?: string | null | undefined;
|
|
489
|
+
user_name?: string | undefined;
|
|
490
|
+
appointmentSource?: {
|
|
491
|
+
code: string;
|
|
492
|
+
name: string;
|
|
493
|
+
external_id?: string | null | undefined;
|
|
494
|
+
} | undefined;
|
|
495
|
+
reason?: string | undefined;
|
|
496
|
+
}>, "many">>;
|
|
222
497
|
isDraft: z.ZodBoolean;
|
|
223
498
|
draftExpirationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
224
|
-
|
|
225
|
-
appointmentSource: z.ZodOptional<z.ZodAny>;
|
|
226
|
-
appointmentRequestType: z.ZodOptional<z.ZodAny>;
|
|
499
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
227
500
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
228
501
|
name: z.ZodString;
|
|
229
502
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -257,10 +530,63 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
257
530
|
status: z.ZodString;
|
|
258
531
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
259
532
|
notes: z.ZodOptional<z.ZodString>;
|
|
260
|
-
appointmentMode: z.ZodEnum<["telemedicine", "in_person"]
|
|
261
|
-
appointmentType: z.ZodString
|
|
262
|
-
appointmentBaseType: z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]
|
|
263
|
-
|
|
533
|
+
appointmentMode: z.ZodOptional<z.ZodEnum<["telemedicine", "in_person"]>>;
|
|
534
|
+
appointmentType: z.ZodOptional<z.ZodString>;
|
|
535
|
+
appointmentBaseType: z.ZodOptional<z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]>>;
|
|
536
|
+
appointmentSource: z.ZodOptional<z.ZodObject<{
|
|
537
|
+
code: z.ZodString;
|
|
538
|
+
name: z.ZodString;
|
|
539
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
540
|
+
}, "strip", z.ZodTypeAny, {
|
|
541
|
+
code: string;
|
|
542
|
+
name: string;
|
|
543
|
+
external_id?: string | null | undefined;
|
|
544
|
+
}, {
|
|
545
|
+
code: string;
|
|
546
|
+
name: string;
|
|
547
|
+
external_id?: string | null | undefined;
|
|
548
|
+
}>>;
|
|
549
|
+
appointmentRequestType: z.ZodOptional<z.ZodObject<{
|
|
550
|
+
code: z.ZodString;
|
|
551
|
+
name: z.ZodString;
|
|
552
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
553
|
+
}, "strip", z.ZodTypeAny, {
|
|
554
|
+
code: string;
|
|
555
|
+
name: string;
|
|
556
|
+
external_id?: string | null | undefined;
|
|
557
|
+
}, {
|
|
558
|
+
code: string;
|
|
559
|
+
name: string;
|
|
560
|
+
external_id?: string | null | undefined;
|
|
561
|
+
}>>;
|
|
562
|
+
specialty: z.ZodOptional<z.ZodObject<{
|
|
563
|
+
code: z.ZodString;
|
|
564
|
+
name: z.ZodString;
|
|
565
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
566
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
567
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
568
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
569
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
570
|
+
specialtyRef: z.ZodOptional<z.ZodAny>;
|
|
571
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
572
|
+
code: z.ZodString;
|
|
573
|
+
name: z.ZodString;
|
|
574
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
575
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
576
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
577
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
578
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
579
|
+
specialtyRef: z.ZodOptional<z.ZodAny>;
|
|
580
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
581
|
+
code: z.ZodString;
|
|
582
|
+
name: z.ZodString;
|
|
583
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
584
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
585
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
586
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
587
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
588
|
+
specialtyRef: z.ZodOptional<z.ZodAny>;
|
|
589
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
264
590
|
address: z.ZodOptional<z.ZodObject<{
|
|
265
591
|
address_name: z.ZodOptional<z.ZodString>;
|
|
266
592
|
address_line1: z.ZodOptional<z.ZodString>;
|
|
@@ -298,8 +624,53 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
298
624
|
address_geo?: any;
|
|
299
625
|
address_name?: string | undefined;
|
|
300
626
|
}>>;
|
|
301
|
-
procedures: z.ZodOptional<z.ZodArray<z.
|
|
302
|
-
|
|
627
|
+
procedures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
628
|
+
code: z.ZodString;
|
|
629
|
+
name: z.ZodString;
|
|
630
|
+
technical_name: z.ZodString;
|
|
631
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
632
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
633
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
634
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
635
|
+
color: z.ZodOptional<z.ZodString>;
|
|
636
|
+
acronym: z.ZodOptional<z.ZodString>;
|
|
637
|
+
description: z.ZodOptional<z.ZodString>;
|
|
638
|
+
tuss: z.ZodOptional<z.ZodString>;
|
|
639
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
640
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
641
|
+
procedureRef: z.ZodOptional<z.ZodAny>;
|
|
642
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
643
|
+
code: z.ZodString;
|
|
644
|
+
name: z.ZodString;
|
|
645
|
+
technical_name: z.ZodString;
|
|
646
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
647
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
648
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
649
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
650
|
+
color: z.ZodOptional<z.ZodString>;
|
|
651
|
+
acronym: z.ZodOptional<z.ZodString>;
|
|
652
|
+
description: z.ZodOptional<z.ZodString>;
|
|
653
|
+
tuss: z.ZodOptional<z.ZodString>;
|
|
654
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
655
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
656
|
+
procedureRef: z.ZodOptional<z.ZodAny>;
|
|
657
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
658
|
+
code: z.ZodString;
|
|
659
|
+
name: z.ZodString;
|
|
660
|
+
technical_name: z.ZodString;
|
|
661
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
662
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
663
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
664
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
665
|
+
color: z.ZodOptional<z.ZodString>;
|
|
666
|
+
acronym: z.ZodOptional<z.ZodString>;
|
|
667
|
+
description: z.ZodOptional<z.ZodString>;
|
|
668
|
+
tuss: z.ZodOptional<z.ZodString>;
|
|
669
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
670
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
671
|
+
procedureRef: z.ZodOptional<z.ZodAny>;
|
|
672
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
673
|
+
patient: z.ZodOptional<z.ZodObject<{
|
|
303
674
|
display_name: z.ZodString;
|
|
304
675
|
gender: z.ZodOptional<z.ZodString>;
|
|
305
676
|
patientRef: z.ZodOptional<z.ZodAny>;
|
|
@@ -311,7 +682,7 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
311
682
|
display_name: z.ZodString;
|
|
312
683
|
gender: z.ZodOptional<z.ZodString>;
|
|
313
684
|
patientRef: z.ZodOptional<z.ZodAny>;
|
|
314
|
-
}, z.ZodTypeAny, "passthrough"
|
|
685
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
315
686
|
professional: z.ZodOptional<z.ZodObject<{
|
|
316
687
|
display_name: z.ZodString;
|
|
317
688
|
gender: z.ZodOptional<z.ZodString>;
|
|
@@ -327,15 +698,12 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
327
698
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
328
699
|
insurance: z.ZodOptional<z.ZodObject<{
|
|
329
700
|
name: z.ZodString;
|
|
330
|
-
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
331
701
|
insuranceRef: z.ZodOptional<z.ZodAny>;
|
|
332
702
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
333
703
|
name: z.ZodString;
|
|
334
|
-
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
335
704
|
insuranceRef: z.ZodOptional<z.ZodAny>;
|
|
336
705
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
337
706
|
name: z.ZodString;
|
|
338
|
-
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
339
707
|
insuranceRef: z.ZodOptional<z.ZodAny>;
|
|
340
708
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
341
709
|
payment: z.ZodOptional<z.ZodObject<{
|
|
@@ -360,11 +728,51 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
360
728
|
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
361
729
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
362
730
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
731
|
+
reschedules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
732
|
+
appointmentSource: z.ZodOptional<z.ZodObject<{
|
|
733
|
+
code: z.ZodString;
|
|
734
|
+
name: z.ZodString;
|
|
735
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
736
|
+
}, "strip", z.ZodTypeAny, {
|
|
737
|
+
code: string;
|
|
738
|
+
name: string;
|
|
739
|
+
external_id?: string | null | undefined;
|
|
740
|
+
}, {
|
|
741
|
+
code: string;
|
|
742
|
+
name: string;
|
|
743
|
+
external_id?: string | null | undefined;
|
|
744
|
+
}>>;
|
|
745
|
+
user_name: z.ZodOptional<z.ZodString>;
|
|
746
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
747
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
748
|
+
userRef: z.ZodOptional<z.ZodAny>;
|
|
749
|
+
created_at: z.ZodDate;
|
|
750
|
+
}, "strip", z.ZodTypeAny, {
|
|
751
|
+
created_at: Date;
|
|
752
|
+
userRef?: any;
|
|
753
|
+
external_id?: string | null | undefined;
|
|
754
|
+
user_name?: string | undefined;
|
|
755
|
+
appointmentSource?: {
|
|
756
|
+
code: string;
|
|
757
|
+
name: string;
|
|
758
|
+
external_id?: string | null | undefined;
|
|
759
|
+
} | undefined;
|
|
760
|
+
reason?: string | undefined;
|
|
761
|
+
}, {
|
|
762
|
+
created_at: Date;
|
|
763
|
+
userRef?: any;
|
|
764
|
+
external_id?: string | null | undefined;
|
|
765
|
+
user_name?: string | undefined;
|
|
766
|
+
appointmentSource?: {
|
|
767
|
+
code: string;
|
|
768
|
+
name: string;
|
|
769
|
+
external_id?: string | null | undefined;
|
|
770
|
+
} | undefined;
|
|
771
|
+
reason?: string | undefined;
|
|
772
|
+
}>, "many">>;
|
|
363
773
|
isDraft: z.ZodBoolean;
|
|
364
774
|
draftExpirationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
365
|
-
|
|
366
|
-
appointmentSource: z.ZodOptional<z.ZodAny>;
|
|
367
|
-
appointmentRequestType: z.ZodOptional<z.ZodAny>;
|
|
775
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
368
776
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
369
777
|
name: z.ZodString;
|
|
370
778
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -398,10 +806,63 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
398
806
|
status: z.ZodString;
|
|
399
807
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
400
808
|
notes: z.ZodOptional<z.ZodString>;
|
|
401
|
-
appointmentMode: z.ZodEnum<["telemedicine", "in_person"]
|
|
402
|
-
appointmentType: z.ZodString
|
|
403
|
-
appointmentBaseType: z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]
|
|
404
|
-
|
|
809
|
+
appointmentMode: z.ZodOptional<z.ZodEnum<["telemedicine", "in_person"]>>;
|
|
810
|
+
appointmentType: z.ZodOptional<z.ZodString>;
|
|
811
|
+
appointmentBaseType: z.ZodOptional<z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]>>;
|
|
812
|
+
appointmentSource: z.ZodOptional<z.ZodObject<{
|
|
813
|
+
code: z.ZodString;
|
|
814
|
+
name: z.ZodString;
|
|
815
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
816
|
+
}, "strip", z.ZodTypeAny, {
|
|
817
|
+
code: string;
|
|
818
|
+
name: string;
|
|
819
|
+
external_id?: string | null | undefined;
|
|
820
|
+
}, {
|
|
821
|
+
code: string;
|
|
822
|
+
name: string;
|
|
823
|
+
external_id?: string | null | undefined;
|
|
824
|
+
}>>;
|
|
825
|
+
appointmentRequestType: z.ZodOptional<z.ZodObject<{
|
|
826
|
+
code: z.ZodString;
|
|
827
|
+
name: z.ZodString;
|
|
828
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
829
|
+
}, "strip", z.ZodTypeAny, {
|
|
830
|
+
code: string;
|
|
831
|
+
name: string;
|
|
832
|
+
external_id?: string | null | undefined;
|
|
833
|
+
}, {
|
|
834
|
+
code: string;
|
|
835
|
+
name: string;
|
|
836
|
+
external_id?: string | null | undefined;
|
|
837
|
+
}>>;
|
|
838
|
+
specialty: z.ZodOptional<z.ZodObject<{
|
|
839
|
+
code: z.ZodString;
|
|
840
|
+
name: z.ZodString;
|
|
841
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
842
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
843
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
844
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
845
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
846
|
+
specialtyRef: z.ZodOptional<z.ZodAny>;
|
|
847
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
848
|
+
code: z.ZodString;
|
|
849
|
+
name: z.ZodString;
|
|
850
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
851
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
852
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
853
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
854
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
855
|
+
specialtyRef: z.ZodOptional<z.ZodAny>;
|
|
856
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
857
|
+
code: z.ZodString;
|
|
858
|
+
name: z.ZodString;
|
|
859
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
860
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
861
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
862
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
863
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
864
|
+
specialtyRef: z.ZodOptional<z.ZodAny>;
|
|
865
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
405
866
|
address: z.ZodOptional<z.ZodObject<{
|
|
406
867
|
address_name: z.ZodOptional<z.ZodString>;
|
|
407
868
|
address_line1: z.ZodOptional<z.ZodString>;
|
|
@@ -439,8 +900,53 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
439
900
|
address_geo?: any;
|
|
440
901
|
address_name?: string | undefined;
|
|
441
902
|
}>>;
|
|
442
|
-
procedures: z.ZodOptional<z.ZodArray<z.
|
|
443
|
-
|
|
903
|
+
procedures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
904
|
+
code: z.ZodString;
|
|
905
|
+
name: z.ZodString;
|
|
906
|
+
technical_name: z.ZodString;
|
|
907
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
908
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
909
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
910
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
911
|
+
color: z.ZodOptional<z.ZodString>;
|
|
912
|
+
acronym: z.ZodOptional<z.ZodString>;
|
|
913
|
+
description: z.ZodOptional<z.ZodString>;
|
|
914
|
+
tuss: z.ZodOptional<z.ZodString>;
|
|
915
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
916
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
917
|
+
procedureRef: z.ZodOptional<z.ZodAny>;
|
|
918
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
919
|
+
code: z.ZodString;
|
|
920
|
+
name: z.ZodString;
|
|
921
|
+
technical_name: z.ZodString;
|
|
922
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
923
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
924
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
925
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
926
|
+
color: z.ZodOptional<z.ZodString>;
|
|
927
|
+
acronym: z.ZodOptional<z.ZodString>;
|
|
928
|
+
description: z.ZodOptional<z.ZodString>;
|
|
929
|
+
tuss: z.ZodOptional<z.ZodString>;
|
|
930
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
931
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
932
|
+
procedureRef: z.ZodOptional<z.ZodAny>;
|
|
933
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
934
|
+
code: z.ZodString;
|
|
935
|
+
name: z.ZodString;
|
|
936
|
+
technical_name: z.ZodString;
|
|
937
|
+
type_code: z.ZodOptional<z.ZodString>;
|
|
938
|
+
type_name: z.ZodOptional<z.ZodString>;
|
|
939
|
+
typeRef: z.ZodOptional<z.ZodAny>;
|
|
940
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
941
|
+
color: z.ZodOptional<z.ZodString>;
|
|
942
|
+
acronym: z.ZodOptional<z.ZodString>;
|
|
943
|
+
description: z.ZodOptional<z.ZodString>;
|
|
944
|
+
tuss: z.ZodOptional<z.ZodString>;
|
|
945
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
946
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
947
|
+
procedureRef: z.ZodOptional<z.ZodAny>;
|
|
948
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
949
|
+
patient: z.ZodOptional<z.ZodObject<{
|
|
444
950
|
display_name: z.ZodString;
|
|
445
951
|
gender: z.ZodOptional<z.ZodString>;
|
|
446
952
|
patientRef: z.ZodOptional<z.ZodAny>;
|
|
@@ -452,7 +958,7 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
452
958
|
display_name: z.ZodString;
|
|
453
959
|
gender: z.ZodOptional<z.ZodString>;
|
|
454
960
|
patientRef: z.ZodOptional<z.ZodAny>;
|
|
455
|
-
}, z.ZodTypeAny, "passthrough"
|
|
961
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
456
962
|
professional: z.ZodOptional<z.ZodObject<{
|
|
457
963
|
display_name: z.ZodString;
|
|
458
964
|
gender: z.ZodOptional<z.ZodString>;
|
|
@@ -468,15 +974,12 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
468
974
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
469
975
|
insurance: z.ZodOptional<z.ZodObject<{
|
|
470
976
|
name: z.ZodString;
|
|
471
|
-
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
472
977
|
insuranceRef: z.ZodOptional<z.ZodAny>;
|
|
473
978
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
474
979
|
name: z.ZodString;
|
|
475
|
-
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
476
980
|
insuranceRef: z.ZodOptional<z.ZodAny>;
|
|
477
981
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
478
982
|
name: z.ZodString;
|
|
479
|
-
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
480
983
|
insuranceRef: z.ZodOptional<z.ZodAny>;
|
|
481
984
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
482
985
|
payment: z.ZodOptional<z.ZodObject<{
|
|
@@ -501,11 +1004,51 @@ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
501
1004
|
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
502
1005
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
503
1006
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
1007
|
+
reschedules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1008
|
+
appointmentSource: z.ZodOptional<z.ZodObject<{
|
|
1009
|
+
code: z.ZodString;
|
|
1010
|
+
name: z.ZodString;
|
|
1011
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1012
|
+
}, "strip", z.ZodTypeAny, {
|
|
1013
|
+
code: string;
|
|
1014
|
+
name: string;
|
|
1015
|
+
external_id?: string | null | undefined;
|
|
1016
|
+
}, {
|
|
1017
|
+
code: string;
|
|
1018
|
+
name: string;
|
|
1019
|
+
external_id?: string | null | undefined;
|
|
1020
|
+
}>>;
|
|
1021
|
+
user_name: z.ZodOptional<z.ZodString>;
|
|
1022
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1023
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1024
|
+
userRef: z.ZodOptional<z.ZodAny>;
|
|
1025
|
+
created_at: z.ZodDate;
|
|
1026
|
+
}, "strip", z.ZodTypeAny, {
|
|
1027
|
+
created_at: Date;
|
|
1028
|
+
userRef?: any;
|
|
1029
|
+
external_id?: string | null | undefined;
|
|
1030
|
+
user_name?: string | undefined;
|
|
1031
|
+
appointmentSource?: {
|
|
1032
|
+
code: string;
|
|
1033
|
+
name: string;
|
|
1034
|
+
external_id?: string | null | undefined;
|
|
1035
|
+
} | undefined;
|
|
1036
|
+
reason?: string | undefined;
|
|
1037
|
+
}, {
|
|
1038
|
+
created_at: Date;
|
|
1039
|
+
userRef?: any;
|
|
1040
|
+
external_id?: string | null | undefined;
|
|
1041
|
+
user_name?: string | undefined;
|
|
1042
|
+
appointmentSource?: {
|
|
1043
|
+
code: string;
|
|
1044
|
+
name: string;
|
|
1045
|
+
external_id?: string | null | undefined;
|
|
1046
|
+
} | undefined;
|
|
1047
|
+
reason?: string | undefined;
|
|
1048
|
+
}>, "many">>;
|
|
504
1049
|
isDraft: z.ZodBoolean;
|
|
505
1050
|
draftExpirationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
506
|
-
|
|
507
|
-
appointmentSource: z.ZodOptional<z.ZodAny>;
|
|
508
|
-
appointmentRequestType: z.ZodOptional<z.ZodAny>;
|
|
1051
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
509
1052
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
510
1053
|
name: z.ZodString;
|
|
511
1054
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zAppointmentSchema = exports.zAppointmentProcedureSchema = exports.zAppointmentPaymentSchema = exports.zAppointmentInsuranceSchema = exports.zAppointmentProfessionalSchema = exports.zAppointmentPatientSchema = exports.zAppointmentAddressSchema = exports.zAppointmentTypeBaseSchema = exports.zAppointmentModeSchema = exports.zAppointmentStatusTypeSchema = exports.zAppointmentPaymentStatusSchema = void 0;
|
|
3
|
+
exports.zAppointmentSchema = exports.zAppointmentSpecialtySchema = exports.zAppointmentRescheduleSchema = exports.zAppointmentAppointmentSourceSchema = exports.zAppointmentAppointmentRequestTypeSchema = exports.zAppointmentProcedureSchema = exports.zAppointmentPaymentSchema = exports.zAppointmentInsuranceSchema = exports.zAppointmentProfessionalSchema = exports.zAppointmentPatientSchema = exports.zAppointmentAddressSchema = exports.zAppointmentTypeBaseSchema = exports.zAppointmentModeSchema = exports.zAppointmentStatusTypeSchema = exports.zAppointmentPaymentStatusSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../../shared/zod-schemas");
|
|
6
6
|
// Enums para validação
|
|
@@ -82,7 +82,6 @@ exports.zAppointmentProfessionalSchema = zod_1.z
|
|
|
82
82
|
exports.zAppointmentInsuranceSchema = zod_1.z
|
|
83
83
|
.object({
|
|
84
84
|
name: zod_1.z.string().min(1),
|
|
85
|
-
payment_type: zod_1.z.enum(["patient", "insurance"]),
|
|
86
85
|
insuranceRef: zod_1.z.any().optional(), // FirestoreDocumentReference
|
|
87
86
|
})
|
|
88
87
|
.passthrough();
|
|
@@ -97,8 +96,59 @@ exports.zAppointmentPaymentSchema = zod_1.z
|
|
|
97
96
|
metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
98
97
|
})
|
|
99
98
|
.passthrough();
|
|
100
|
-
// Schema para procedimento
|
|
101
|
-
exports.zAppointmentProcedureSchema = zod_1.z
|
|
99
|
+
// Schema para procedimento no contexto de agendamento
|
|
100
|
+
exports.zAppointmentProcedureSchema = zod_1.z
|
|
101
|
+
.object({
|
|
102
|
+
code: zod_1.z.string().min(1),
|
|
103
|
+
name: zod_1.z.string().min(1),
|
|
104
|
+
technical_name: zod_1.z.string().min(1),
|
|
105
|
+
type_code: zod_1.z.string().optional(),
|
|
106
|
+
type_name: zod_1.z.string().optional(),
|
|
107
|
+
typeRef: zod_1.z.any().optional(), // FirestoreDocumentReference
|
|
108
|
+
duration: zod_1.z.number().optional(), // Duração em minutos
|
|
109
|
+
color: zod_1.z.string().optional(), // Cor para exibição
|
|
110
|
+
acronym: zod_1.z.string().optional(), // Sigla
|
|
111
|
+
description: zod_1.z.string().optional(),
|
|
112
|
+
tuss: zod_1.z.string().optional(),
|
|
113
|
+
price: zod_1.z.number().optional(),
|
|
114
|
+
external_id: zod_1.z.string().nullable().optional(), // ID externo do procedimento
|
|
115
|
+
procedureRef: zod_1.z.any().optional(), // FirestoreDocumentReference
|
|
116
|
+
})
|
|
117
|
+
.passthrough();
|
|
118
|
+
// Schema para tipo de solicitação de agendamento
|
|
119
|
+
exports.zAppointmentAppointmentRequestTypeSchema = zod_1.z.object({
|
|
120
|
+
code: zod_1.z.string().min(1),
|
|
121
|
+
name: zod_1.z.string().min(1),
|
|
122
|
+
external_id: zod_1.z.string().nullable().optional(), // ID externo do tipo de agendamento
|
|
123
|
+
});
|
|
124
|
+
// Schema para fonte de agendamento
|
|
125
|
+
exports.zAppointmentAppointmentSourceSchema = zod_1.z.object({
|
|
126
|
+
code: zod_1.z.string().min(1),
|
|
127
|
+
name: zod_1.z.string().min(1),
|
|
128
|
+
external_id: zod_1.z.string().nullable().optional(), // ID externo da fonte de agendamentos
|
|
129
|
+
});
|
|
130
|
+
// Schema para remarcação
|
|
131
|
+
exports.zAppointmentRescheduleSchema = zod_1.z.object({
|
|
132
|
+
appointmentSource: exports.zAppointmentAppointmentSourceSchema.optional(), // Fonte/origem do reagendamento
|
|
133
|
+
user_name: zod_1.z.string().optional(), // Nome do usuário/responsável que realizou o reagendamento
|
|
134
|
+
reason: zod_1.z.string().optional(), // Motivo do reagendamento (livre)
|
|
135
|
+
external_id: zod_1.z.string().nullable().optional(), // ID externo do reagendamento
|
|
136
|
+
userRef: zod_1.z.any().optional(), // Referência ao documento do usuário no Firestore
|
|
137
|
+
created_at: zod_1.z.coerce.date(), // Data e hora em que o reagendamento foi realizado
|
|
138
|
+
});
|
|
139
|
+
// Schema para especialidade no contexto de agendamento
|
|
140
|
+
exports.zAppointmentSpecialtySchema = zod_1.z
|
|
141
|
+
.object({
|
|
142
|
+
code: zod_1.z.string().min(1),
|
|
143
|
+
name: zod_1.z.string().min(1),
|
|
144
|
+
tiss: zod_1.z.string().optional(),
|
|
145
|
+
type_code: zod_1.z.string().optional(),
|
|
146
|
+
type_name: zod_1.z.string().optional(),
|
|
147
|
+
typeRef: zod_1.z.any().optional(), // FirestoreDocumentReference
|
|
148
|
+
external_id: zod_1.z.string().nullable().optional(), // ID externo da especialidade
|
|
149
|
+
specialtyRef: zod_1.z.any().optional(), // FirestoreDocumentReference
|
|
150
|
+
})
|
|
151
|
+
.passthrough();
|
|
102
152
|
// Schema principal do Appointment
|
|
103
153
|
exports.zAppointmentSchema = zod_schemas_1.zFireDocSchema
|
|
104
154
|
.extend({
|
|
@@ -107,24 +157,25 @@ exports.zAppointmentSchema = zod_schemas_1.zFireDocSchema
|
|
|
107
157
|
status: zod_1.z.string(), // Status customizado do dicionário
|
|
108
158
|
statusBase: exports.zAppointmentStatusTypeSchema, // Tipo base para lógica
|
|
109
159
|
notes: zod_1.z.string().optional(),
|
|
110
|
-
appointmentMode: exports.zAppointmentModeSchema,
|
|
111
|
-
appointmentType: zod_1.z.string(), // Tipo customizado do dicionário
|
|
112
|
-
appointmentBaseType: exports.zAppointmentTypeBaseSchema, // Tipo base para lógica
|
|
113
|
-
|
|
160
|
+
appointmentMode: exports.zAppointmentModeSchema.optional(),
|
|
161
|
+
appointmentType: zod_1.z.string().optional(), // Tipo customizado do dicionário
|
|
162
|
+
appointmentBaseType: exports.zAppointmentTypeBaseSchema.optional(), // Tipo base para lógica
|
|
163
|
+
appointmentSource: exports.zAppointmentAppointmentSourceSchema.optional(),
|
|
164
|
+
appointmentRequestType: exports.zAppointmentAppointmentRequestTypeSchema.optional(),
|
|
165
|
+
specialty: exports.zAppointmentSpecialtySchema.optional(),
|
|
114
166
|
address: exports.zAppointmentAddressSchema.optional(),
|
|
115
167
|
procedures: zod_1.z.array(exports.zAppointmentProcedureSchema).optional(),
|
|
116
|
-
patient: exports.zAppointmentPatientSchema,
|
|
168
|
+
patient: exports.zAppointmentPatientSchema.optional(),
|
|
117
169
|
professional: exports.zAppointmentProfessionalSchema.optional(),
|
|
118
170
|
insurance: exports.zAppointmentInsuranceSchema.optional(),
|
|
119
171
|
payment: exports.zAppointmentPaymentSchema.optional(),
|
|
172
|
+
// Controle de remarcações
|
|
173
|
+
reschedules: zod_1.z.array(exports.zAppointmentRescheduleSchema).optional(),
|
|
120
174
|
// Propriedades para controle de rascunho
|
|
121
175
|
isDraft: zod_1.z.boolean(),
|
|
122
176
|
draftExpirationMinutes: zod_1.z.number().optional(), // tempo em minutos para expiração do rascunho
|
|
123
|
-
//
|
|
124
|
-
|
|
125
|
-
// Campos de dicionários
|
|
126
|
-
appointmentSource: zod_1.z.any().optional(), // IAppointmentSource será validado pelo seu próprio schema
|
|
127
|
-
appointmentRequestType: zod_1.z.any().optional(), // IAppointmentRequestType será validado pelo seu próprio schema
|
|
177
|
+
// ID externo da consulta
|
|
178
|
+
external_id: zod_1.z.string().nullable().optional(),
|
|
128
179
|
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
129
180
|
})
|
|
130
181
|
.passthrough();
|
|
@@ -87,7 +87,6 @@ export const zAppointmentProfessionalSchema = z
|
|
|
87
87
|
export const zAppointmentInsuranceSchema = z
|
|
88
88
|
.object({
|
|
89
89
|
name: z.string().min(1),
|
|
90
|
-
payment_type: z.enum(["patient", "insurance"]),
|
|
91
90
|
insuranceRef: z.any().optional(), // FirestoreDocumentReference
|
|
92
91
|
})
|
|
93
92
|
.passthrough();
|
|
@@ -104,8 +103,63 @@ export const zAppointmentPaymentSchema = z
|
|
|
104
103
|
})
|
|
105
104
|
.passthrough();
|
|
106
105
|
|
|
107
|
-
// Schema para procedimento
|
|
108
|
-
export const zAppointmentProcedureSchema = z
|
|
106
|
+
// Schema para procedimento no contexto de agendamento
|
|
107
|
+
export const zAppointmentProcedureSchema = z
|
|
108
|
+
.object({
|
|
109
|
+
code: z.string().min(1),
|
|
110
|
+
name: z.string().min(1),
|
|
111
|
+
technical_name: z.string().min(1),
|
|
112
|
+
type_code: z.string().optional(),
|
|
113
|
+
type_name: z.string().optional(),
|
|
114
|
+
typeRef: z.any().optional(), // FirestoreDocumentReference
|
|
115
|
+
duration: z.number().optional(), // Duração em minutos
|
|
116
|
+
color: z.string().optional(), // Cor para exibição
|
|
117
|
+
acronym: z.string().optional(), // Sigla
|
|
118
|
+
description: z.string().optional(),
|
|
119
|
+
tuss: z.string().optional(),
|
|
120
|
+
price: z.number().optional(),
|
|
121
|
+
external_id: z.string().nullable().optional(), // ID externo do procedimento
|
|
122
|
+
procedureRef: z.any().optional(), // FirestoreDocumentReference
|
|
123
|
+
})
|
|
124
|
+
.passthrough();
|
|
125
|
+
|
|
126
|
+
// Schema para tipo de solicitação de agendamento
|
|
127
|
+
export const zAppointmentAppointmentRequestTypeSchema = z.object({
|
|
128
|
+
code: z.string().min(1),
|
|
129
|
+
name: z.string().min(1),
|
|
130
|
+
external_id: z.string().nullable().optional(), // ID externo do tipo de agendamento
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
// Schema para fonte de agendamento
|
|
134
|
+
export const zAppointmentAppointmentSourceSchema = z.object({
|
|
135
|
+
code: z.string().min(1),
|
|
136
|
+
name: z.string().min(1),
|
|
137
|
+
external_id: z.string().nullable().optional(), // ID externo da fonte de agendamentos
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// Schema para remarcação
|
|
141
|
+
export const zAppointmentRescheduleSchema = z.object({
|
|
142
|
+
appointmentSource: zAppointmentAppointmentSourceSchema.optional(), // Fonte/origem do reagendamento
|
|
143
|
+
user_name: z.string().optional(), // Nome do usuário/responsável que realizou o reagendamento
|
|
144
|
+
reason: z.string().optional(), // Motivo do reagendamento (livre)
|
|
145
|
+
external_id: z.string().nullable().optional(), // ID externo do reagendamento
|
|
146
|
+
userRef: z.any().optional(), // Referência ao documento do usuário no Firestore
|
|
147
|
+
created_at: z.coerce.date(), // Data e hora em que o reagendamento foi realizado
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
// Schema para especialidade no contexto de agendamento
|
|
151
|
+
export const zAppointmentSpecialtySchema = z
|
|
152
|
+
.object({
|
|
153
|
+
code: z.string().min(1),
|
|
154
|
+
name: z.string().min(1),
|
|
155
|
+
tiss: z.string().optional(),
|
|
156
|
+
type_code: z.string().optional(),
|
|
157
|
+
type_name: z.string().optional(),
|
|
158
|
+
typeRef: z.any().optional(), // FirestoreDocumentReference
|
|
159
|
+
external_id: z.string().nullable().optional(), // ID externo da especialidade
|
|
160
|
+
specialtyRef: z.any().optional(), // FirestoreDocumentReference
|
|
161
|
+
})
|
|
162
|
+
.passthrough();
|
|
109
163
|
|
|
110
164
|
// Schema principal do Appointment
|
|
111
165
|
export const zAppointmentSchema = zFireDocSchema
|
|
@@ -115,27 +169,28 @@ export const zAppointmentSchema = zFireDocSchema
|
|
|
115
169
|
status: z.string(), // Status customizado do dicionário
|
|
116
170
|
statusBase: zAppointmentStatusTypeSchema, // Tipo base para lógica
|
|
117
171
|
notes: z.string().optional(),
|
|
118
|
-
appointmentMode: zAppointmentModeSchema,
|
|
119
|
-
appointmentType: z.string(), // Tipo customizado do dicionário
|
|
120
|
-
appointmentBaseType: zAppointmentTypeBaseSchema, // Tipo base para lógica
|
|
121
|
-
|
|
172
|
+
appointmentMode: zAppointmentModeSchema.optional(),
|
|
173
|
+
appointmentType: z.string().optional(), // Tipo customizado do dicionário
|
|
174
|
+
appointmentBaseType: zAppointmentTypeBaseSchema.optional(), // Tipo base para lógica
|
|
175
|
+
appointmentSource: zAppointmentAppointmentSourceSchema.optional(),
|
|
176
|
+
appointmentRequestType: zAppointmentAppointmentRequestTypeSchema.optional(),
|
|
177
|
+
specialty: zAppointmentSpecialtySchema.optional(),
|
|
122
178
|
address: zAppointmentAddressSchema.optional(),
|
|
123
179
|
procedures: z.array(zAppointmentProcedureSchema).optional(),
|
|
124
|
-
patient: zAppointmentPatientSchema,
|
|
180
|
+
patient: zAppointmentPatientSchema.optional(),
|
|
125
181
|
professional: zAppointmentProfessionalSchema.optional(),
|
|
126
182
|
insurance: zAppointmentInsuranceSchema.optional(),
|
|
127
183
|
payment: zAppointmentPaymentSchema.optional(),
|
|
128
184
|
|
|
185
|
+
// Controle de remarcações
|
|
186
|
+
reschedules: z.array(zAppointmentRescheduleSchema).optional(),
|
|
187
|
+
|
|
129
188
|
// Propriedades para controle de rascunho
|
|
130
189
|
isDraft: z.boolean(),
|
|
131
190
|
draftExpirationMinutes: z.number().optional(), // tempo em minutos para expiração do rascunho
|
|
132
191
|
|
|
133
|
-
//
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
// Campos de dicionários
|
|
137
|
-
appointmentSource: z.any().optional(), // IAppointmentSource será validado pelo seu próprio schema
|
|
138
|
-
appointmentRequestType: z.any().optional(), // IAppointmentRequestType será validado pelo seu próprio schema
|
|
192
|
+
// ID externo da consulta
|
|
193
|
+
external_id: z.string().nullable().optional(),
|
|
139
194
|
|
|
140
195
|
tags: z.array(zTagSchema).nullable().optional(),
|
|
141
196
|
})
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { FirestoreDocumentReference, IFireDoc, IGeoPoint, ITag } from "../../shared";
|
|
2
|
-
import { AppointmentStatusType, AppointmentType
|
|
3
|
-
import { IProcedure } from "../procedure";
|
|
2
|
+
import { AppointmentStatusType, AppointmentType } from "../dic";
|
|
4
3
|
export declare const AppointmentPaymentStatusEnum: {
|
|
5
4
|
readonly Paid: "paid";
|
|
6
5
|
readonly Partial: "partial";
|
|
@@ -36,6 +35,22 @@ export interface IAppointmentProfessional {
|
|
|
36
35
|
gender?: string;
|
|
37
36
|
professionalRef?: FirestoreDocumentReference;
|
|
38
37
|
}
|
|
38
|
+
export interface IAppointmentProcedure {
|
|
39
|
+
code: string;
|
|
40
|
+
name: string;
|
|
41
|
+
technical_name: string;
|
|
42
|
+
type_code?: string;
|
|
43
|
+
type_name?: string;
|
|
44
|
+
typeRef?: FirestoreDocumentReference;
|
|
45
|
+
duration?: number;
|
|
46
|
+
color?: string;
|
|
47
|
+
acronym?: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
tuss?: string;
|
|
50
|
+
price?: number;
|
|
51
|
+
external_id?: string | null;
|
|
52
|
+
procedureRef?: FirestoreDocumentReference;
|
|
53
|
+
}
|
|
39
54
|
export interface IAppointmentInsurance {
|
|
40
55
|
name: string;
|
|
41
56
|
insuranceRef?: FirestoreDocumentReference;
|
|
@@ -54,27 +69,57 @@ export interface IAppointmentPayment {
|
|
|
54
69
|
metadata?: Record<string, unknown>;
|
|
55
70
|
[key: string]: unknown;
|
|
56
71
|
}
|
|
72
|
+
export interface IAppointmentAppointmentRequestType {
|
|
73
|
+
code: string;
|
|
74
|
+
name: string;
|
|
75
|
+
external_id?: string | null;
|
|
76
|
+
}
|
|
77
|
+
export interface IAppointmentAppointmentSource {
|
|
78
|
+
code: string;
|
|
79
|
+
name: string;
|
|
80
|
+
external_id?: string | null;
|
|
81
|
+
}
|
|
82
|
+
export interface IAppointmentReschedule {
|
|
83
|
+
appointmentSource?: IAppointmentAppointmentSource;
|
|
84
|
+
user_name?: string;
|
|
85
|
+
reason?: string;
|
|
86
|
+
external_id?: string | null;
|
|
87
|
+
userRef?: FirestoreDocumentReference;
|
|
88
|
+
created_at: Date;
|
|
89
|
+
}
|
|
90
|
+
export interface IAppointmentSpecialty {
|
|
91
|
+
code: string;
|
|
92
|
+
name: string;
|
|
93
|
+
tiss?: string;
|
|
94
|
+
type_code?: string;
|
|
95
|
+
type_name?: string;
|
|
96
|
+
typeRef?: FirestoreDocumentReference;
|
|
97
|
+
external_id?: string | null;
|
|
98
|
+
specialtyRef?: FirestoreDocumentReference;
|
|
99
|
+
[key: string]: unknown;
|
|
100
|
+
}
|
|
57
101
|
export interface IAppointment extends IFireDoc {
|
|
58
102
|
startDate: Date;
|
|
59
103
|
endDate: Date;
|
|
60
104
|
status: string;
|
|
61
105
|
statusBase: AppointmentStatusType;
|
|
62
106
|
notes?: string;
|
|
63
|
-
appointmentMode
|
|
64
|
-
appointmentType
|
|
65
|
-
appointmentBaseType
|
|
66
|
-
appointmentSource?:
|
|
67
|
-
appointmentRequestType?:
|
|
68
|
-
specialty?:
|
|
107
|
+
appointmentMode?: AppointmentMode;
|
|
108
|
+
appointmentType?: string;
|
|
109
|
+
appointmentBaseType?: AppointmentType;
|
|
110
|
+
appointmentSource?: IAppointmentAppointmentSource;
|
|
111
|
+
appointmentRequestType?: IAppointmentAppointmentRequestType;
|
|
112
|
+
specialty?: IAppointmentSpecialty;
|
|
69
113
|
address?: IAppointmentAddress;
|
|
70
|
-
procedures?:
|
|
71
|
-
patient
|
|
114
|
+
procedures?: IAppointmentProcedure[];
|
|
115
|
+
patient?: IAppointmentPatient;
|
|
72
116
|
professional?: IAppointmentProfessional;
|
|
73
117
|
insurance?: IAppointmentInsurance;
|
|
74
118
|
payment?: IAppointmentPayment;
|
|
119
|
+
reschedules?: IAppointmentReschedule[];
|
|
120
|
+
external_id?: string | null;
|
|
75
121
|
isDraft: boolean;
|
|
76
122
|
draftExpirationMinutes?: number;
|
|
77
|
-
rescheduleCount: number;
|
|
78
123
|
tags?: ITag[] | null;
|
|
79
124
|
[key: string]: unknown;
|
|
80
125
|
}
|
|
@@ -4,13 +4,7 @@ import type {
|
|
|
4
4
|
IGeoPoint,
|
|
5
5
|
ITag,
|
|
6
6
|
} from "../../shared";
|
|
7
|
-
import {
|
|
8
|
-
AppointmentStatusType,
|
|
9
|
-
AppointmentType,
|
|
10
|
-
IAppointmentRequestType,
|
|
11
|
-
IAppointmentSource,
|
|
12
|
-
} from "../dic";
|
|
13
|
-
import { IProcedure } from "../procedure";
|
|
7
|
+
import { AppointmentStatusType, AppointmentType } from "../dic";
|
|
14
8
|
// Enums para status de pagamento
|
|
15
9
|
export const AppointmentPaymentStatusEnum = {
|
|
16
10
|
Paid: "paid",
|
|
@@ -60,6 +54,24 @@ export interface IAppointmentProfessional {
|
|
|
60
54
|
professionalRef?: FirestoreDocumentReference;
|
|
61
55
|
}
|
|
62
56
|
|
|
57
|
+
// Interface para procedimento
|
|
58
|
+
export interface IAppointmentProcedure {
|
|
59
|
+
code: string;
|
|
60
|
+
name: string;
|
|
61
|
+
technical_name: string;
|
|
62
|
+
type_code?: string;
|
|
63
|
+
type_name?: string;
|
|
64
|
+
typeRef?: FirestoreDocumentReference;
|
|
65
|
+
duration?: number; // Duração em minutos
|
|
66
|
+
color?: string; // Cor para exibição
|
|
67
|
+
acronym?: string; // Sigla
|
|
68
|
+
description?: string;
|
|
69
|
+
tuss?: string;
|
|
70
|
+
price?: number;
|
|
71
|
+
external_id?: string | null; // ID externo do procedimento
|
|
72
|
+
procedureRef?: FirestoreDocumentReference;
|
|
73
|
+
}
|
|
74
|
+
|
|
63
75
|
// Interface para seguro
|
|
64
76
|
export interface IAppointmentInsurance {
|
|
65
77
|
name: string;
|
|
@@ -85,6 +97,40 @@ export interface IAppointmentPayment {
|
|
|
85
97
|
[key: string]: unknown;
|
|
86
98
|
}
|
|
87
99
|
|
|
100
|
+
export interface IAppointmentAppointmentRequestType {
|
|
101
|
+
code: string;
|
|
102
|
+
name: string;
|
|
103
|
+
external_id?: string | null; // ID externo do tipo de agendamento
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface IAppointmentAppointmentSource {
|
|
107
|
+
code: string;
|
|
108
|
+
name: string;
|
|
109
|
+
external_id?: string | null; // ID externo da fonte de agendamentos
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface IAppointmentReschedule {
|
|
113
|
+
appointmentSource?: IAppointmentAppointmentSource; // Fonte/origem do reagendamento (por exemplo, canal do atendimento)
|
|
114
|
+
user_name?: string; // Nome do usuário/responsável que realizou o reagendamento
|
|
115
|
+
reason?: string; // Motivo do reagendamento (livre)
|
|
116
|
+
external_id?: string | null; // ID externo do reagendamento (caso haja integração com outros sistemas)
|
|
117
|
+
userRef?: FirestoreDocumentReference; // Referência ao documento do usuário no Firestore
|
|
118
|
+
created_at: Date; // Data e hora em que o reagendamento foi realizado (ISO ou Date)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Interface para specialty
|
|
122
|
+
export interface IAppointmentSpecialty {
|
|
123
|
+
code: string;
|
|
124
|
+
name: string;
|
|
125
|
+
tiss?: string;
|
|
126
|
+
type_code?: string;
|
|
127
|
+
type_name?: string;
|
|
128
|
+
typeRef?: FirestoreDocumentReference;
|
|
129
|
+
external_id?: string | null; // ID externo da especialidade
|
|
130
|
+
specialtyRef?: FirestoreDocumentReference;
|
|
131
|
+
[key: string]: unknown; // index signature
|
|
132
|
+
}
|
|
133
|
+
|
|
88
134
|
// Interface principal do Appointment
|
|
89
135
|
export interface IAppointment extends IFireDoc {
|
|
90
136
|
startDate: Date;
|
|
@@ -92,26 +138,25 @@ export interface IAppointment extends IFireDoc {
|
|
|
92
138
|
status: string;
|
|
93
139
|
statusBase: AppointmentStatusType;
|
|
94
140
|
notes?: string;
|
|
95
|
-
appointmentMode
|
|
96
|
-
appointmentType
|
|
97
|
-
appointmentBaseType
|
|
98
|
-
appointmentSource?:
|
|
99
|
-
appointmentRequestType?:
|
|
100
|
-
specialty?:
|
|
141
|
+
appointmentMode?: AppointmentMode;
|
|
142
|
+
appointmentType?: string;
|
|
143
|
+
appointmentBaseType?: AppointmentType;
|
|
144
|
+
appointmentSource?: IAppointmentAppointmentSource;
|
|
145
|
+
appointmentRequestType?: IAppointmentAppointmentRequestType;
|
|
146
|
+
specialty?: IAppointmentSpecialty;
|
|
101
147
|
address?: IAppointmentAddress;
|
|
102
|
-
procedures?:
|
|
103
|
-
patient
|
|
148
|
+
procedures?: IAppointmentProcedure[];
|
|
149
|
+
patient?: IAppointmentPatient;
|
|
104
150
|
professional?: IAppointmentProfessional;
|
|
105
151
|
insurance?: IAppointmentInsurance;
|
|
106
152
|
payment?: IAppointmentPayment;
|
|
107
|
-
|
|
153
|
+
// Controle de remarcações
|
|
154
|
+
reschedules?: IAppointmentReschedule[];
|
|
155
|
+
external_id?: string | null; // ID externo da consulta
|
|
108
156
|
// Propriedades para controle de rascunho
|
|
109
157
|
isDraft: boolean;
|
|
110
158
|
draftExpirationMinutes?: number; // tempo em minutos para expiração do rascunho
|
|
111
159
|
|
|
112
|
-
// Controle de remarcações
|
|
113
|
-
rescheduleCount: number; // quantidade de vezes que o agendamento foi remarcado
|
|
114
|
-
|
|
115
160
|
tags?: ITag[] | null;
|
|
116
161
|
[key: string]: unknown; // index signature
|
|
117
162
|
}
|