evo360-types 1.3.80 → 1.3.82
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-chat/contact/zod-schemas.d.ts +8 -8
- package/dist/apps/evo-med/appointment/zod-schemas.d.ts +127 -247
- package/dist/apps/evo-med/appointment/zod-schemas.js +14 -24
- package/dist/apps/evo-med/appointment/zod-schemas.ts +14 -24
- package/dist/apps/evo-med/dic/zod-schemas.d.ts +109 -6
- package/dist/apps/evo-med/dic/zod-schemas.js +27 -3
- package/dist/apps/evo-med/dic/zod-schemas.ts +28 -2
- package/dist/apps/evo-med/people/zod-schemas.d.ts +22 -7
- package/dist/apps/evo-med/people/zod-schemas.js +13 -3
- package/dist/apps/evo-med/people/zod-schemas.ts +13 -3
- package/dist/types/evo-med/appointment/index.d.ts +17 -26
- package/dist/types/evo-med/appointment/index.js +5 -1
- package/dist/types/evo-med/appointment/index.ts +25 -28
- package/dist/types/evo-med/dic/index.d.ts +9 -0
- package/dist/types/evo-med/dic/index.ts +9 -0
- package/dist/types/evo-med/people/index.d.ts +2 -0
- package/dist/types/evo-med/people/index.ts +2 -0
- package/package.json +1 -1
|
@@ -65,31 +65,25 @@ exports.zAppointmentAddressSchema = zod_1.z.object({
|
|
|
65
65
|
// Schema para paciente
|
|
66
66
|
exports.zAppointmentPatientSchema = zod_1.z
|
|
67
67
|
.object({
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
gender: zod_1.z.string().optional().default(""),
|
|
72
|
-
birthDate: zod_1.z.string().optional().default(""),
|
|
73
|
-
phone: zod_1.z.string().optional().default(""),
|
|
74
|
-
wabaPhone: zod_1.z.string().optional().default(""),
|
|
75
|
-
external_id: zod_1.z.string().optional(),
|
|
68
|
+
display_name: zod_1.z.string().min(1),
|
|
69
|
+
gender: zod_1.z.string().optional(),
|
|
70
|
+
patientRef: zod_1.z.any().optional(), // FirestoreDocumentReference
|
|
76
71
|
})
|
|
77
72
|
.passthrough();
|
|
78
73
|
// Schema para profissional
|
|
79
74
|
exports.zAppointmentProfessionalSchema = zod_1.z
|
|
80
75
|
.object({
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
gender: zod_1.z.string().optional().default(""),
|
|
85
|
-
external_id: zod_1.z.string().optional(),
|
|
76
|
+
display_name: zod_1.z.string().min(1),
|
|
77
|
+
gender: zod_1.z.string().optional(),
|
|
78
|
+
professionalRef: zod_1.z.any().optional(), // FirestoreDocumentReference
|
|
86
79
|
})
|
|
87
80
|
.passthrough();
|
|
88
81
|
// Schema para seguro
|
|
89
82
|
exports.zAppointmentInsuranceSchema = zod_1.z
|
|
90
83
|
.object({
|
|
91
|
-
name: zod_1.z.string(),
|
|
92
|
-
|
|
84
|
+
name: zod_1.z.string().min(1),
|
|
85
|
+
payment_type: zod_1.z.enum(["patient", "insurance"]),
|
|
86
|
+
insuranceRef: zod_1.z.any().optional(), // FirestoreDocumentReference
|
|
93
87
|
})
|
|
94
88
|
.passthrough();
|
|
95
89
|
// Schema para pagamento
|
|
@@ -99,16 +93,12 @@ exports.zAppointmentPaymentSchema = zod_1.z
|
|
|
99
93
|
paid: zod_1.z.number().nullable().optional(),
|
|
100
94
|
due: zod_1.z.number().nullable().optional(),
|
|
101
95
|
status: exports.zAppointmentPaymentStatusSchema.optional(),
|
|
96
|
+
payment_type: zod_1.z.enum(["patient", "insurance"]),
|
|
97
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
102
98
|
})
|
|
103
99
|
.passthrough();
|
|
104
|
-
// Schema para procedimento
|
|
105
|
-
exports.zAppointmentProcedureSchema = zod_1.z.
|
|
106
|
-
id: zod_1.z.number().optional(),
|
|
107
|
-
name: zod_1.z.string(),
|
|
108
|
-
description: zod_1.z.string().optional(),
|
|
109
|
-
duration: zod_1.z.number().optional(), // em minutos
|
|
110
|
-
price: zod_1.z.number().optional(),
|
|
111
|
-
});
|
|
100
|
+
// Schema para procedimento (importado de IProcedure)
|
|
101
|
+
exports.zAppointmentProcedureSchema = zod_1.z.any(); // IProcedure será validado pelo seu próprio schema
|
|
112
102
|
// Schema principal do Appointment
|
|
113
103
|
exports.zAppointmentSchema = zod_schemas_1.zFireDocSchema
|
|
114
104
|
.extend({
|
|
@@ -131,7 +121,7 @@ exports.zAppointmentSchema = zod_schemas_1.zFireDocSchema
|
|
|
131
121
|
isDraft: zod_1.z.boolean(),
|
|
132
122
|
draftExpirationMinutes: zod_1.z.number().optional(), // tempo em minutos para expiração do rascunho
|
|
133
123
|
// Controle de remarcações
|
|
134
|
-
rescheduleCount: zod_1.z.number()
|
|
124
|
+
rescheduleCount: zod_1.z.number(), // quantidade de vezes que o agendamento foi remarcado
|
|
135
125
|
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
136
126
|
})
|
|
137
127
|
.passthrough();
|
|
@@ -68,33 +68,27 @@ export const zAppointmentAddressSchema = z.object({
|
|
|
68
68
|
// Schema para paciente
|
|
69
69
|
export const zAppointmentPatientSchema = z
|
|
70
70
|
.object({
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
gender: z.string().optional().default(""),
|
|
75
|
-
birthDate: z.string().optional().default(""),
|
|
76
|
-
phone: z.string().optional().default(""),
|
|
77
|
-
wabaPhone: z.string().optional().default(""),
|
|
78
|
-
external_id: z.string().optional(),
|
|
71
|
+
display_name: z.string().min(1),
|
|
72
|
+
gender: z.string().optional(),
|
|
73
|
+
patientRef: z.any().optional(), // FirestoreDocumentReference
|
|
79
74
|
})
|
|
80
75
|
.passthrough();
|
|
81
76
|
|
|
82
77
|
// Schema para profissional
|
|
83
78
|
export const zAppointmentProfessionalSchema = z
|
|
84
79
|
.object({
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
gender: z.string().optional().default(""),
|
|
89
|
-
external_id: z.string().optional(),
|
|
80
|
+
display_name: z.string().min(1),
|
|
81
|
+
gender: z.string().optional(),
|
|
82
|
+
professionalRef: z.any().optional(), // FirestoreDocumentReference
|
|
90
83
|
})
|
|
91
84
|
.passthrough();
|
|
92
85
|
|
|
93
86
|
// Schema para seguro
|
|
94
87
|
export const zAppointmentInsuranceSchema = z
|
|
95
88
|
.object({
|
|
96
|
-
name: z.string(),
|
|
97
|
-
|
|
89
|
+
name: z.string().min(1),
|
|
90
|
+
payment_type: z.enum(["patient", "insurance"]),
|
|
91
|
+
insuranceRef: z.any().optional(), // FirestoreDocumentReference
|
|
98
92
|
})
|
|
99
93
|
.passthrough();
|
|
100
94
|
|
|
@@ -105,17 +99,13 @@ export const zAppointmentPaymentSchema = z
|
|
|
105
99
|
paid: z.number().nullable().optional(),
|
|
106
100
|
due: z.number().nullable().optional(),
|
|
107
101
|
status: zAppointmentPaymentStatusSchema.optional(),
|
|
102
|
+
payment_type: z.enum(["patient", "insurance"]),
|
|
103
|
+
metadata: z.record(z.unknown()).optional(),
|
|
108
104
|
})
|
|
109
105
|
.passthrough();
|
|
110
106
|
|
|
111
|
-
// Schema para procedimento
|
|
112
|
-
export const zAppointmentProcedureSchema = z.
|
|
113
|
-
id: z.number().optional(),
|
|
114
|
-
name: z.string(),
|
|
115
|
-
description: z.string().optional(),
|
|
116
|
-
duration: z.number().optional(), // em minutos
|
|
117
|
-
price: z.number().optional(),
|
|
118
|
-
});
|
|
107
|
+
// Schema para procedimento (importado de IProcedure)
|
|
108
|
+
export const zAppointmentProcedureSchema = z.any(); // IProcedure será validado pelo seu próprio schema
|
|
119
109
|
|
|
120
110
|
// Schema principal do Appointment
|
|
121
111
|
export const zAppointmentSchema = zFireDocSchema
|
|
@@ -141,7 +131,7 @@ export const zAppointmentSchema = zFireDocSchema
|
|
|
141
131
|
draftExpirationMinutes: z.number().optional(), // tempo em minutos para expiração do rascunho
|
|
142
132
|
|
|
143
133
|
// Controle de remarcações
|
|
144
|
-
rescheduleCount: z.number()
|
|
134
|
+
rescheduleCount: z.number(), // quantidade de vezes que o agendamento foi remarcado
|
|
145
135
|
|
|
146
136
|
tags: z.array(zTagSchema).nullable().optional(),
|
|
147
137
|
})
|
|
@@ -44,7 +44,9 @@ export declare const zSpecialtySchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
44
44
|
}, {
|
|
45
45
|
code: z.ZodString;
|
|
46
46
|
name: z.ZodString;
|
|
47
|
-
|
|
47
|
+
order: z.ZodNumber;
|
|
48
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
48
50
|
type_code: z.ZodString;
|
|
49
51
|
type_name: z.ZodString;
|
|
50
52
|
typeRef: z.ZodAny;
|
|
@@ -78,7 +80,9 @@ export declare const zSpecialtySchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
78
80
|
}, {
|
|
79
81
|
code: z.ZodString;
|
|
80
82
|
name: z.ZodString;
|
|
81
|
-
|
|
83
|
+
order: z.ZodNumber;
|
|
84
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
85
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
82
86
|
type_code: z.ZodString;
|
|
83
87
|
type_name: z.ZodString;
|
|
84
88
|
typeRef: z.ZodAny;
|
|
@@ -112,7 +116,9 @@ export declare const zSpecialtySchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
112
116
|
}, {
|
|
113
117
|
code: z.ZodString;
|
|
114
118
|
name: z.ZodString;
|
|
115
|
-
|
|
119
|
+
order: z.ZodNumber;
|
|
120
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
+
tiss: z.ZodOptional<z.ZodString>;
|
|
116
122
|
type_code: z.ZodString;
|
|
117
123
|
type_name: z.ZodString;
|
|
118
124
|
typeRef: z.ZodAny;
|
|
@@ -147,6 +153,7 @@ export declare const zPatientSourceSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
147
153
|
}, {
|
|
148
154
|
code: z.ZodString;
|
|
149
155
|
name: z.ZodString;
|
|
156
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
150
157
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
151
158
|
name: z.ZodString;
|
|
152
159
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -177,6 +184,7 @@ export declare const zPatientSourceSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
177
184
|
}, {
|
|
178
185
|
code: z.ZodString;
|
|
179
186
|
name: z.ZodString;
|
|
187
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
180
188
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
181
189
|
name: z.ZodString;
|
|
182
190
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -207,6 +215,7 @@ export declare const zPatientSourceSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
207
215
|
}, {
|
|
208
216
|
code: z.ZodString;
|
|
209
217
|
name: z.ZodString;
|
|
218
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
210
219
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
211
220
|
name: z.ZodString;
|
|
212
221
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -238,6 +247,7 @@ export declare const zAppointmentSourceSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
238
247
|
}, {
|
|
239
248
|
code: z.ZodString;
|
|
240
249
|
name: z.ZodString;
|
|
250
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
241
251
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
242
252
|
name: z.ZodString;
|
|
243
253
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -268,6 +278,7 @@ export declare const zAppointmentSourceSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
268
278
|
}, {
|
|
269
279
|
code: z.ZodString;
|
|
270
280
|
name: z.ZodString;
|
|
281
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
271
282
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
272
283
|
name: z.ZodString;
|
|
273
284
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -298,6 +309,7 @@ export declare const zAppointmentSourceSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
298
309
|
}, {
|
|
299
310
|
code: z.ZodString;
|
|
300
311
|
name: z.ZodString;
|
|
312
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
313
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
302
314
|
name: z.ZodString;
|
|
303
315
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -329,6 +341,7 @@ export declare const zAppointmentRequestTypeSchema: z.ZodObject<z.objectUtil.ext
|
|
|
329
341
|
}, {
|
|
330
342
|
code: z.ZodString;
|
|
331
343
|
name: z.ZodString;
|
|
344
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
332
345
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
333
346
|
name: z.ZodString;
|
|
334
347
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -359,6 +372,7 @@ export declare const zAppointmentRequestTypeSchema: z.ZodObject<z.objectUtil.ext
|
|
|
359
372
|
}, {
|
|
360
373
|
code: z.ZodString;
|
|
361
374
|
name: z.ZodString;
|
|
375
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
362
376
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
363
377
|
name: z.ZodString;
|
|
364
378
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -389,6 +403,7 @@ export declare const zAppointmentRequestTypeSchema: z.ZodObject<z.objectUtil.ext
|
|
|
389
403
|
}, {
|
|
390
404
|
code: z.ZodString;
|
|
391
405
|
name: z.ZodString;
|
|
406
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
392
407
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
393
408
|
name: z.ZodString;
|
|
394
409
|
color: z.ZodOptional<z.ZodString>;
|
|
@@ -422,6 +437,7 @@ export declare const zAppointmentStatusSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
422
437
|
}, {
|
|
423
438
|
name: z.ZodString;
|
|
424
439
|
order: z.ZodNumber;
|
|
440
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
425
441
|
base_type: 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"]>;
|
|
426
442
|
}>, "strip", z.ZodTypeAny, {
|
|
427
443
|
name: string;
|
|
@@ -434,6 +450,7 @@ export declare const zAppointmentStatusSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
434
450
|
created_at?: Date | null | undefined;
|
|
435
451
|
updated_at?: Date | null | undefined;
|
|
436
452
|
deleted_at?: Date | null | undefined;
|
|
453
|
+
external_id?: string | null | undefined;
|
|
437
454
|
}, {
|
|
438
455
|
name: string;
|
|
439
456
|
id: string;
|
|
@@ -445,6 +462,7 @@ export declare const zAppointmentStatusSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
445
462
|
created_at?: Date | null | undefined;
|
|
446
463
|
updated_at?: Date | null | undefined;
|
|
447
464
|
deleted_at?: Date | null | undefined;
|
|
465
|
+
external_id?: string | null | undefined;
|
|
448
466
|
}>;
|
|
449
467
|
export declare const zAppointmentTypeSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
450
468
|
id: z.ZodString;
|
|
@@ -457,6 +475,7 @@ export declare const zAppointmentTypeSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
457
475
|
}, {
|
|
458
476
|
name: z.ZodString;
|
|
459
477
|
order: z.ZodNumber;
|
|
478
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
460
479
|
base_type: z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]>;
|
|
461
480
|
}>, "strip", z.ZodTypeAny, {
|
|
462
481
|
name: string;
|
|
@@ -469,6 +488,7 @@ export declare const zAppointmentTypeSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
469
488
|
created_at?: Date | null | undefined;
|
|
470
489
|
updated_at?: Date | null | undefined;
|
|
471
490
|
deleted_at?: Date | null | undefined;
|
|
491
|
+
external_id?: string | null | undefined;
|
|
472
492
|
}, {
|
|
473
493
|
name: string;
|
|
474
494
|
id: string;
|
|
@@ -480,6 +500,7 @@ export declare const zAppointmentTypeSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
480
500
|
created_at?: Date | null | undefined;
|
|
481
501
|
updated_at?: Date | null | undefined;
|
|
482
502
|
deleted_at?: Date | null | undefined;
|
|
503
|
+
external_id?: string | null | undefined;
|
|
483
504
|
}>;
|
|
484
505
|
export declare const zMedicationSchema: z.ZodObject<{
|
|
485
506
|
name: z.ZodString;
|
|
@@ -506,6 +527,24 @@ export declare const zChronicConditionSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
506
527
|
}, {
|
|
507
528
|
code: z.ZodString;
|
|
508
529
|
name: z.ZodString;
|
|
530
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
531
|
+
diagnosis_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
532
|
+
severity: z.ZodOptional<z.ZodNullable<z.ZodEnum<["Mild", "Moderate", "Severe", "Unknown"]>>>;
|
|
533
|
+
controlled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
534
|
+
medications: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
535
|
+
name: z.ZodString;
|
|
536
|
+
dosage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
537
|
+
frequency: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
538
|
+
}, "strip", z.ZodTypeAny, {
|
|
539
|
+
name: string;
|
|
540
|
+
dosage: string | null;
|
|
541
|
+
frequency: string | null;
|
|
542
|
+
}, {
|
|
543
|
+
name: string;
|
|
544
|
+
dosage?: string | null | undefined;
|
|
545
|
+
frequency?: string | null | undefined;
|
|
546
|
+
}>, "many">>>;
|
|
547
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
509
548
|
}>, "strip", z.ZodTypeAny, {
|
|
510
549
|
code: string;
|
|
511
550
|
name: string;
|
|
@@ -516,6 +555,16 @@ export declare const zChronicConditionSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
516
555
|
created_at?: Date | null | undefined;
|
|
517
556
|
updated_at?: Date | null | undefined;
|
|
518
557
|
deleted_at?: Date | null | undefined;
|
|
558
|
+
external_id?: string | null | undefined;
|
|
559
|
+
diagnosis_date?: string | null | undefined;
|
|
560
|
+
severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null | undefined;
|
|
561
|
+
controlled?: boolean | null | undefined;
|
|
562
|
+
medications?: {
|
|
563
|
+
name: string;
|
|
564
|
+
dosage: string | null;
|
|
565
|
+
frequency: string | null;
|
|
566
|
+
}[] | null | undefined;
|
|
567
|
+
notes?: string | null | undefined;
|
|
519
568
|
}, {
|
|
520
569
|
code: string;
|
|
521
570
|
name: string;
|
|
@@ -526,6 +575,16 @@ export declare const zChronicConditionSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
526
575
|
created_at?: Date | null | undefined;
|
|
527
576
|
updated_at?: Date | null | undefined;
|
|
528
577
|
deleted_at?: Date | null | undefined;
|
|
578
|
+
external_id?: string | null | undefined;
|
|
579
|
+
diagnosis_date?: string | null | undefined;
|
|
580
|
+
severity?: "Mild" | "Moderate" | "Severe" | "Unknown" | null | undefined;
|
|
581
|
+
controlled?: boolean | null | undefined;
|
|
582
|
+
medications?: {
|
|
583
|
+
name: string;
|
|
584
|
+
dosage?: string | null | undefined;
|
|
585
|
+
frequency?: string | null | undefined;
|
|
586
|
+
}[] | null | undefined;
|
|
587
|
+
notes?: string | null | undefined;
|
|
529
588
|
}>;
|
|
530
589
|
export declare const zAllergyKindSchema: z.ZodEnum<["Food", "Drug", "Insect", "Other"]>;
|
|
531
590
|
export declare const zAllergySchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
@@ -537,12 +596,10 @@ export declare const zAllergySchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
537
596
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
538
597
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
539
598
|
}, {
|
|
540
|
-
code: z.ZodString;
|
|
541
599
|
name: z.ZodString;
|
|
542
600
|
kind: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Food", "Drug", "Insect", "Other"]>>>>;
|
|
543
601
|
severity: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["Mild", "Moderate", "Severe", "Unknown"]>>>>;
|
|
544
602
|
}>, "strip", z.ZodTypeAny, {
|
|
545
|
-
code: string;
|
|
546
603
|
name: string;
|
|
547
604
|
id: string;
|
|
548
605
|
tenant: string;
|
|
@@ -554,7 +611,6 @@ export declare const zAllergySchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
554
611
|
updated_at?: Date | null | undefined;
|
|
555
612
|
deleted_at?: Date | null | undefined;
|
|
556
613
|
}, {
|
|
557
|
-
code: string;
|
|
558
614
|
name: string;
|
|
559
615
|
id: string;
|
|
560
616
|
tenant: string;
|
|
@@ -607,3 +663,50 @@ export declare const zMedicalCouncilSchema: z.ZodObject<z.objectUtil.extendShape
|
|
|
607
663
|
uf: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["AC", "AL", "AP", "AM", "BA", "CE", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO", "DF", "BR"]>>>>;
|
|
608
664
|
country: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
609
665
|
}>, z.ZodTypeAny, "passthrough">>;
|
|
666
|
+
export declare const zInsurancePaymentTypeSchema: z.ZodEnum<["patient", "insurance"]>;
|
|
667
|
+
export declare const zInsuranceSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
668
|
+
id: z.ZodString;
|
|
669
|
+
ref: z.ZodAny;
|
|
670
|
+
tenant: z.ZodString;
|
|
671
|
+
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
672
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
673
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
674
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
675
|
+
}, {
|
|
676
|
+
code: z.ZodString;
|
|
677
|
+
name: z.ZodString;
|
|
678
|
+
color: z.ZodOptional<z.ZodString>;
|
|
679
|
+
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
680
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
681
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
682
|
+
}>, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<{
|
|
683
|
+
id: z.ZodString;
|
|
684
|
+
ref: z.ZodAny;
|
|
685
|
+
tenant: z.ZodString;
|
|
686
|
+
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
687
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
688
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
689
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
690
|
+
}, {
|
|
691
|
+
code: z.ZodString;
|
|
692
|
+
name: z.ZodString;
|
|
693
|
+
color: z.ZodOptional<z.ZodString>;
|
|
694
|
+
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
695
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
696
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
697
|
+
}>, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<{
|
|
698
|
+
id: z.ZodString;
|
|
699
|
+
ref: z.ZodAny;
|
|
700
|
+
tenant: z.ZodString;
|
|
701
|
+
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
702
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
703
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
704
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
705
|
+
}, {
|
|
706
|
+
code: z.ZodString;
|
|
707
|
+
name: z.ZodString;
|
|
708
|
+
color: z.ZodOptional<z.ZodString>;
|
|
709
|
+
payment_type: z.ZodEnum<["patient", "insurance"]>;
|
|
710
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
711
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
712
|
+
}>, z.ZodTypeAny, "passthrough">>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zMedicalCouncilSchema = exports.zMedicalCouncilUFSchema = exports.zAllergySchema = exports.zAllergyKindSchema = exports.zChronicConditionSchema = exports.zSeveritySchema = exports.zMedicationSchema = exports.zAppointmentTypeSchema = exports.zAppointmentStatusSchema = exports.zDicAppointmentTypeBaseSchema = exports.zDicAppointmentStatusTypeSchema = exports.zAppointmentRequestTypeSchema = exports.zAppointmentSourceSchema = exports.zPatientSourceSchema = exports.zSpecialtySchema = exports.zSpecialtyTypeSchema = void 0;
|
|
3
|
+
exports.zInsuranceSchema = exports.zInsurancePaymentTypeSchema = exports.zMedicalCouncilSchema = exports.zMedicalCouncilUFSchema = exports.zAllergySchema = exports.zAllergyKindSchema = exports.zChronicConditionSchema = exports.zSeveritySchema = exports.zMedicationSchema = exports.zAppointmentTypeSchema = exports.zAppointmentStatusSchema = exports.zDicAppointmentTypeBaseSchema = exports.zDicAppointmentStatusTypeSchema = exports.zAppointmentRequestTypeSchema = exports.zAppointmentSourceSchema = exports.zPatientSourceSchema = exports.zSpecialtySchema = exports.zSpecialtyTypeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../../shared/zod-schemas");
|
|
6
6
|
exports.zSpecialtyTypeSchema = zod_schemas_1.zFireDocSchema
|
|
@@ -13,7 +13,9 @@ exports.zSpecialtySchema = zod_schemas_1.zFireDocSchema
|
|
|
13
13
|
.extend({
|
|
14
14
|
code: zod_1.z.string().min(1).max(20),
|
|
15
15
|
name: zod_1.z.string().min(1).max(255),
|
|
16
|
-
|
|
16
|
+
order: zod_1.z.number().min(0).max(100),
|
|
17
|
+
external_id: zod_1.z.string().nullable().optional(),
|
|
18
|
+
tiss: zod_1.z.string().max(255).optional(),
|
|
17
19
|
type_code: zod_1.z.string().min(1).max(20),
|
|
18
20
|
type_name: zod_1.z.string().min(1).max(255),
|
|
19
21
|
typeRef: zod_1.z.any(),
|
|
@@ -24,6 +26,7 @@ exports.zPatientSourceSchema = zod_schemas_1.zFireDocSchema
|
|
|
24
26
|
.extend({
|
|
25
27
|
code: zod_1.z.string().min(1).max(20),
|
|
26
28
|
name: zod_1.z.string().min(1).max(255),
|
|
29
|
+
external_id: zod_1.z.string().nullable().optional(),
|
|
27
30
|
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
28
31
|
})
|
|
29
32
|
.passthrough();
|
|
@@ -31,6 +34,7 @@ exports.zAppointmentSourceSchema = zod_schemas_1.zFireDocSchema
|
|
|
31
34
|
.extend({
|
|
32
35
|
code: zod_1.z.string().min(1).max(20),
|
|
33
36
|
name: zod_1.z.string().min(1).max(255),
|
|
37
|
+
external_id: zod_1.z.string().nullable().optional(),
|
|
34
38
|
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
35
39
|
})
|
|
36
40
|
.passthrough();
|
|
@@ -38,6 +42,7 @@ exports.zAppointmentRequestTypeSchema = zod_schemas_1.zFireDocSchema
|
|
|
38
42
|
.extend({
|
|
39
43
|
code: zod_1.z.string().min(1).max(20),
|
|
40
44
|
name: zod_1.z.string().min(1).max(255),
|
|
45
|
+
external_id: zod_1.z.string().nullable().optional(),
|
|
41
46
|
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
42
47
|
})
|
|
43
48
|
.passthrough();
|
|
@@ -82,12 +87,14 @@ exports.zDicAppointmentTypeBaseSchema = zod_1.z.enum([
|
|
|
82
87
|
exports.zAppointmentStatusSchema = zod_schemas_1.zFireDocSchema.extend({
|
|
83
88
|
name: zod_1.z.string().min(1).max(255),
|
|
84
89
|
order: zod_1.z.number(),
|
|
90
|
+
external_id: zod_1.z.string().nullable().optional(),
|
|
85
91
|
base_type: exports.zDicAppointmentStatusTypeSchema,
|
|
86
92
|
});
|
|
87
93
|
// Schema para IAppointmentType (tipos customizados do usuário)
|
|
88
94
|
exports.zAppointmentTypeSchema = zod_schemas_1.zFireDocSchema.extend({
|
|
89
95
|
name: zod_1.z.string().min(1).max(255),
|
|
90
96
|
order: zod_1.z.number(),
|
|
97
|
+
external_id: zod_1.z.string().nullable().optional(),
|
|
91
98
|
base_type: exports.zDicAppointmentTypeBaseSchema,
|
|
92
99
|
});
|
|
93
100
|
exports.zMedicationSchema = zod_1.z.object({
|
|
@@ -104,10 +111,15 @@ exports.zSeveritySchema = zod_1.z.enum([
|
|
|
104
111
|
exports.zChronicConditionSchema = zod_schemas_1.zFireDocSchema.extend({
|
|
105
112
|
code: zod_1.z.string().min(1).max(20),
|
|
106
113
|
name: zod_1.z.string().min(1).max(255),
|
|
114
|
+
external_id: zod_1.z.string().nullable().optional(),
|
|
115
|
+
diagnosis_date: zod_1.z.string().nullable().optional(),
|
|
116
|
+
severity: exports.zSeveritySchema.nullable().optional(),
|
|
117
|
+
controlled: zod_1.z.boolean().nullable().optional(),
|
|
118
|
+
medications: zod_1.z.array(exports.zMedicationSchema).nullable().optional(),
|
|
119
|
+
notes: zod_1.z.string().nullable().optional(),
|
|
107
120
|
});
|
|
108
121
|
exports.zAllergyKindSchema = zod_1.z.enum(["Food", "Drug", "Insect", "Other"]);
|
|
109
122
|
exports.zAllergySchema = zod_schemas_1.zFireDocSchema.extend({
|
|
110
|
-
code: zod_1.z.string().min(1).max(20),
|
|
111
123
|
name: zod_1.z.string().min(1).max(255),
|
|
112
124
|
kind: exports.zAllergyKindSchema.nullable().optional().default("Other"),
|
|
113
125
|
severity: exports.zSeveritySchema.nullable().optional().default("Unknown"),
|
|
@@ -150,3 +162,15 @@ exports.zMedicalCouncilSchema = zod_schemas_1.zFireDocSchema
|
|
|
150
162
|
country: zod_1.z.string().min(1).max(255).nullable().optional().default("Brasil"),
|
|
151
163
|
})
|
|
152
164
|
.passthrough();
|
|
165
|
+
// Schema para InsurancePaymentType
|
|
166
|
+
exports.zInsurancePaymentTypeSchema = zod_1.z.enum(["patient", "insurance"]);
|
|
167
|
+
exports.zInsuranceSchema = zod_schemas_1.zFireDocSchema
|
|
168
|
+
.extend({
|
|
169
|
+
code: zod_1.z.string().min(1).max(20),
|
|
170
|
+
name: zod_1.z.string().min(1).max(255),
|
|
171
|
+
color: zod_1.z.string().max(20).optional(),
|
|
172
|
+
payment_type: exports.zInsurancePaymentTypeSchema,
|
|
173
|
+
order: zod_1.z.number().optional(),
|
|
174
|
+
external_id: zod_1.z.string().nullable().optional(),
|
|
175
|
+
})
|
|
176
|
+
.passthrough();
|
|
@@ -12,7 +12,9 @@ export const zSpecialtySchema = zFireDocSchema
|
|
|
12
12
|
.extend({
|
|
13
13
|
code: z.string().min(1).max(20),
|
|
14
14
|
name: z.string().min(1).max(255),
|
|
15
|
-
|
|
15
|
+
order: z.number().min(0).max(100),
|
|
16
|
+
external_id: z.string().nullable().optional(),
|
|
17
|
+
tiss: z.string().max(255).optional(),
|
|
16
18
|
type_code: z.string().min(1).max(20),
|
|
17
19
|
type_name: z.string().min(1).max(255),
|
|
18
20
|
typeRef: z.any(),
|
|
@@ -24,6 +26,7 @@ export const zPatientSourceSchema = zFireDocSchema
|
|
|
24
26
|
.extend({
|
|
25
27
|
code: z.string().min(1).max(20),
|
|
26
28
|
name: z.string().min(1).max(255),
|
|
29
|
+
external_id: z.string().nullable().optional(),
|
|
27
30
|
tags: z.array(zTagSchema).nullable().optional(),
|
|
28
31
|
})
|
|
29
32
|
.passthrough();
|
|
@@ -32,6 +35,7 @@ export const zAppointmentSourceSchema = zFireDocSchema
|
|
|
32
35
|
.extend({
|
|
33
36
|
code: z.string().min(1).max(20),
|
|
34
37
|
name: z.string().min(1).max(255),
|
|
38
|
+
external_id: z.string().nullable().optional(),
|
|
35
39
|
tags: z.array(zTagSchema).nullable().optional(),
|
|
36
40
|
})
|
|
37
41
|
.passthrough();
|
|
@@ -40,6 +44,7 @@ export const zAppointmentRequestTypeSchema = zFireDocSchema
|
|
|
40
44
|
.extend({
|
|
41
45
|
code: z.string().min(1).max(20),
|
|
42
46
|
name: z.string().min(1).max(255),
|
|
47
|
+
external_id: z.string().nullable().optional(),
|
|
43
48
|
tags: z.array(zTagSchema).nullable().optional(),
|
|
44
49
|
})
|
|
45
50
|
.passthrough();
|
|
@@ -87,6 +92,7 @@ export const zDicAppointmentTypeBaseSchema = z.enum([
|
|
|
87
92
|
export const zAppointmentStatusSchema = zFireDocSchema.extend({
|
|
88
93
|
name: z.string().min(1).max(255),
|
|
89
94
|
order: z.number(),
|
|
95
|
+
external_id: z.string().nullable().optional(),
|
|
90
96
|
base_type: zDicAppointmentStatusTypeSchema,
|
|
91
97
|
});
|
|
92
98
|
|
|
@@ -94,6 +100,7 @@ export const zAppointmentStatusSchema = zFireDocSchema.extend({
|
|
|
94
100
|
export const zAppointmentTypeSchema = zFireDocSchema.extend({
|
|
95
101
|
name: z.string().min(1).max(255),
|
|
96
102
|
order: z.number(),
|
|
103
|
+
external_id: z.string().nullable().optional(),
|
|
97
104
|
base_type: zDicAppointmentTypeBaseSchema,
|
|
98
105
|
});
|
|
99
106
|
|
|
@@ -113,12 +120,17 @@ export const zSeveritySchema = z.enum([
|
|
|
113
120
|
export const zChronicConditionSchema = zFireDocSchema.extend({
|
|
114
121
|
code: z.string().min(1).max(20),
|
|
115
122
|
name: z.string().min(1).max(255),
|
|
123
|
+
external_id: z.string().nullable().optional(),
|
|
124
|
+
diagnosis_date: z.string().nullable().optional(),
|
|
125
|
+
severity: zSeveritySchema.nullable().optional(),
|
|
126
|
+
controlled: z.boolean().nullable().optional(),
|
|
127
|
+
medications: z.array(zMedicationSchema).nullable().optional(),
|
|
128
|
+
notes: z.string().nullable().optional(),
|
|
116
129
|
});
|
|
117
130
|
|
|
118
131
|
export const zAllergyKindSchema = z.enum(["Food", "Drug", "Insect", "Other"]);
|
|
119
132
|
|
|
120
133
|
export const zAllergySchema = zFireDocSchema.extend({
|
|
121
|
-
code: z.string().min(1).max(20),
|
|
122
134
|
name: z.string().min(1).max(255),
|
|
123
135
|
kind: zAllergyKindSchema.nullable().optional().default("Other"),
|
|
124
136
|
severity: zSeveritySchema.nullable().optional().default("Unknown"),
|
|
@@ -163,3 +175,17 @@ export const zMedicalCouncilSchema = zFireDocSchema
|
|
|
163
175
|
country: z.string().min(1).max(255).nullable().optional().default("Brasil"),
|
|
164
176
|
})
|
|
165
177
|
.passthrough();
|
|
178
|
+
|
|
179
|
+
// Schema para InsurancePaymentType
|
|
180
|
+
export const zInsurancePaymentTypeSchema = z.enum(["patient", "insurance"]);
|
|
181
|
+
|
|
182
|
+
export const zInsuranceSchema = zFireDocSchema
|
|
183
|
+
.extend({
|
|
184
|
+
code: z.string().min(1).max(20),
|
|
185
|
+
name: z.string().min(1).max(255),
|
|
186
|
+
color: z.string().max(20).optional(),
|
|
187
|
+
payment_type: zInsurancePaymentTypeSchema,
|
|
188
|
+
order: z.number().optional(),
|
|
189
|
+
external_id: z.string().nullable().optional(),
|
|
190
|
+
})
|
|
191
|
+
.passthrough();
|