evo360-types 1.3.80 → 1.3.81
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 +106 -3
- package/dist/apps/evo-med/dic/zod-schemas.js +26 -2
- package/dist/apps/evo-med/dic/zod-schemas.ts +27 -1
- 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
|
@@ -62,6 +62,7 @@ export declare const zProfessionalSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
62
62
|
photo_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
63
|
photo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
64
64
|
}>, {
|
|
65
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
66
|
status: z.ZodDefault<z.ZodEnum<["active", "inactive", "draft"]>>;
|
|
66
67
|
professionalId: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
67
68
|
title: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -200,6 +201,7 @@ export declare const zProfessionalSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
200
201
|
photo_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
201
202
|
photo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
202
203
|
}>, {
|
|
204
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
203
205
|
status: z.ZodDefault<z.ZodEnum<["active", "inactive", "draft"]>>;
|
|
204
206
|
professionalId: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
205
207
|
title: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -338,6 +340,7 @@ export declare const zProfessionalSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
338
340
|
photo_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
339
341
|
photo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
340
342
|
}>, {
|
|
343
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
341
344
|
status: z.ZodDefault<z.ZodEnum<["active", "inactive", "draft"]>>;
|
|
342
345
|
professionalId: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
343
346
|
title: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -460,7 +463,7 @@ export declare const zProfessionalSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
460
463
|
}>, "many">>>;
|
|
461
464
|
userRef: z.ZodAny;
|
|
462
465
|
}>, z.ZodTypeAny, "passthrough">>;
|
|
463
|
-
export declare const zPatientStatusSchema: z.ZodEnum<["active", "inactive", "draft"]>;
|
|
466
|
+
export declare const zPatientStatusSchema: z.ZodEnum<["active", "inactive", "draft", "anonymized"]>;
|
|
464
467
|
export declare const zBloodTypeSchema: z.ZodUnion<[z.ZodEnum<["A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-", "Unknown"]>, z.ZodEffects<z.ZodLiteral<"unknown">, string, "unknown">]>;
|
|
465
468
|
export declare const zPatientAllergySchema: z.ZodObject<{
|
|
466
469
|
code: z.ZodString;
|
|
@@ -546,8 +549,12 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
|
|
|
546
549
|
photo_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
547
550
|
photo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
548
551
|
}>, {
|
|
552
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
549
553
|
social_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
550
|
-
status: z.
|
|
554
|
+
status: z.ZodOptional<z.ZodEnum<["active", "inactive", "draft", "anonymized"]>>;
|
|
555
|
+
source_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
556
|
+
source_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
557
|
+
sourceRef: z.ZodOptional<z.ZodAny>;
|
|
551
558
|
address: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
552
559
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
553
560
|
kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -594,7 +601,7 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
|
|
|
594
601
|
}>>>;
|
|
595
602
|
height_cm: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
596
603
|
weight_kg: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
597
|
-
blood_type: z.
|
|
604
|
+
blood_type: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodEnum<["A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-", "Unknown"]>, z.ZodEffects<z.ZodLiteral<"unknown">, string, "unknown">]>>>;
|
|
598
605
|
allergies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
599
606
|
code: z.ZodString;
|
|
600
607
|
name: z.ZodString;
|
|
@@ -699,8 +706,12 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
|
|
|
699
706
|
photo_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
700
707
|
photo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
701
708
|
}>, {
|
|
709
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
702
710
|
social_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
703
|
-
status: z.
|
|
711
|
+
status: z.ZodOptional<z.ZodEnum<["active", "inactive", "draft", "anonymized"]>>;
|
|
712
|
+
source_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
713
|
+
source_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
714
|
+
sourceRef: z.ZodOptional<z.ZodAny>;
|
|
704
715
|
address: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
705
716
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
706
717
|
kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -747,7 +758,7 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
|
|
|
747
758
|
}>>>;
|
|
748
759
|
height_cm: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
749
760
|
weight_kg: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
750
|
-
blood_type: z.
|
|
761
|
+
blood_type: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodEnum<["A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-", "Unknown"]>, z.ZodEffects<z.ZodLiteral<"unknown">, string, "unknown">]>>>;
|
|
751
762
|
allergies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
752
763
|
code: z.ZodString;
|
|
753
764
|
name: z.ZodString;
|
|
@@ -852,8 +863,12 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
|
|
|
852
863
|
photo_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
853
864
|
photo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
854
865
|
}>, {
|
|
866
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
855
867
|
social_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
856
|
-
status: z.
|
|
868
|
+
status: z.ZodOptional<z.ZodEnum<["active", "inactive", "draft", "anonymized"]>>;
|
|
869
|
+
source_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
870
|
+
source_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
871
|
+
sourceRef: z.ZodOptional<z.ZodAny>;
|
|
857
872
|
address: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
858
873
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
859
874
|
kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -900,7 +915,7 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
|
|
|
900
915
|
}>>>;
|
|
901
916
|
height_cm: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
902
917
|
weight_kg: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
903
|
-
blood_type: z.
|
|
918
|
+
blood_type: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodEnum<["A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-", "Unknown"]>, z.ZodEffects<z.ZodLiteral<"unknown">, string, "unknown">]>>>;
|
|
904
919
|
allergies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
905
920
|
code: z.ZodString;
|
|
906
921
|
name: z.ZodString;
|
|
@@ -30,6 +30,7 @@ exports.zProfessionalOfficeSchema = zod_1.z.object({
|
|
|
30
30
|
});
|
|
31
31
|
exports.zProfessionalSchema = zod_schemas_3.zProfileSchema // Extend from ProfileSchema
|
|
32
32
|
.extend({
|
|
33
|
+
external_id: zod_1.z.string().nullable().optional(),
|
|
33
34
|
status: exports.zProfessionalStatusSchema.default("draft"),
|
|
34
35
|
professionalId: zod_1.z.string().max(255).nullable().optional().default(""),
|
|
35
36
|
title: zod_1.z.string().max(255).nullable().optional().default(""),
|
|
@@ -51,7 +52,12 @@ exports.zProfessionalSchema = zod_schemas_3.zProfileSchema // Extend from Profil
|
|
|
51
52
|
userRef: zod_1.z.any(),
|
|
52
53
|
})
|
|
53
54
|
.passthrough();
|
|
54
|
-
exports.zPatientStatusSchema = zod_1.z.enum([
|
|
55
|
+
exports.zPatientStatusSchema = zod_1.z.enum([
|
|
56
|
+
"active",
|
|
57
|
+
"inactive",
|
|
58
|
+
"draft",
|
|
59
|
+
"anonymized",
|
|
60
|
+
]);
|
|
55
61
|
exports.zBloodTypeSchema = zod_1.z
|
|
56
62
|
.enum(["A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-", "Unknown"])
|
|
57
63
|
.or(zod_1.z.literal("unknown").transform(() => "Unknown"));
|
|
@@ -74,13 +80,17 @@ exports.zPatientChronicConditionSchema = zod_1.z.object({
|
|
|
74
80
|
});
|
|
75
81
|
exports.zPatientSchema = zod_schemas_3.zProfileSchema // Extend from ProfileSchema
|
|
76
82
|
.extend({
|
|
83
|
+
external_id: zod_1.z.string().nullable().optional(),
|
|
77
84
|
social_id: zod_1.z.string().nullable().optional(),
|
|
78
|
-
status: exports.zPatientStatusSchema.
|
|
85
|
+
status: exports.zPatientStatusSchema.optional(),
|
|
86
|
+
source_code: zod_1.z.string().nullable().optional(),
|
|
87
|
+
source_name: zod_1.z.string().nullable().optional(),
|
|
88
|
+
sourceRef: zod_1.z.any().optional(),
|
|
79
89
|
address: zod_schemas_2.zAddressSchema.nullable().optional(),
|
|
80
90
|
contact: zod_schemas_2.zContactSchema.nullable().optional(),
|
|
81
91
|
height_cm: zod_1.z.number().nullable().optional(),
|
|
82
92
|
weight_kg: zod_1.z.number().nullable().optional(),
|
|
83
|
-
blood_type: exports.zBloodTypeSchema.nullable().optional()
|
|
93
|
+
blood_type: exports.zBloodTypeSchema.nullable().optional(),
|
|
84
94
|
allergies: zod_1.z.array(exports.zPatientAllergySchema).nullable().optional(),
|
|
85
95
|
chronic_conditions: zod_1.z
|
|
86
96
|
.array(exports.zPatientChronicConditionSchema)
|
|
@@ -42,6 +42,7 @@ export const zProfessionalOfficeSchema = z.object({
|
|
|
42
42
|
|
|
43
43
|
export const zProfessionalSchema = zProfileSchema // Extend from ProfileSchema
|
|
44
44
|
.extend({
|
|
45
|
+
external_id: z.string().nullable().optional(),
|
|
45
46
|
status: zProfessionalStatusSchema.default("draft"),
|
|
46
47
|
professionalId: z.string().max(255).nullable().optional().default(""),
|
|
47
48
|
title: z.string().max(255).nullable().optional().default(""),
|
|
@@ -64,7 +65,12 @@ export const zProfessionalSchema = zProfileSchema // Extend from ProfileSchema
|
|
|
64
65
|
})
|
|
65
66
|
.passthrough();
|
|
66
67
|
|
|
67
|
-
export const zPatientStatusSchema = z.enum([
|
|
68
|
+
export const zPatientStatusSchema = z.enum([
|
|
69
|
+
"active",
|
|
70
|
+
"inactive",
|
|
71
|
+
"draft",
|
|
72
|
+
"anonymized",
|
|
73
|
+
]);
|
|
68
74
|
|
|
69
75
|
export const zBloodTypeSchema = z
|
|
70
76
|
.enum(["A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-", "Unknown"])
|
|
@@ -91,13 +97,17 @@ export const zPatientChronicConditionSchema = z.object({
|
|
|
91
97
|
|
|
92
98
|
export const zPatientSchema = zProfileSchema // Extend from ProfileSchema
|
|
93
99
|
.extend({
|
|
100
|
+
external_id: z.string().nullable().optional(),
|
|
94
101
|
social_id: z.string().nullable().optional(),
|
|
95
|
-
status: zPatientStatusSchema.
|
|
102
|
+
status: zPatientStatusSchema.optional(),
|
|
103
|
+
source_code: z.string().nullable().optional(),
|
|
104
|
+
source_name: z.string().nullable().optional(),
|
|
105
|
+
sourceRef: z.any().optional(),
|
|
96
106
|
address: zAddressSchema.nullable().optional(),
|
|
97
107
|
contact: zContactSchema.nullable().optional(),
|
|
98
108
|
height_cm: z.number().nullable().optional(),
|
|
99
109
|
weight_kg: z.number().nullable().optional(),
|
|
100
|
-
blood_type: zBloodTypeSchema.nullable().optional()
|
|
110
|
+
blood_type: zBloodTypeSchema.nullable().optional(),
|
|
101
111
|
allergies: z.array(zPatientAllergySchema).nullable().optional(),
|
|
102
112
|
chronic_conditions: z
|
|
103
113
|
.array(zPatientChronicConditionSchema)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { IFireDoc, IGeoPoint, ITag } from "../../shared";
|
|
1
|
+
import type { FirestoreDocumentReference, IFireDoc, IGeoPoint, ITag } from "../../shared";
|
|
2
2
|
import { AppointmentStatusType, AppointmentType } from "../dic";
|
|
3
|
+
import { IProcedure } from "../procedure";
|
|
3
4
|
export declare const AppointmentPaymentStatusEnum: {
|
|
4
5
|
readonly Paid: "paid";
|
|
5
6
|
readonly Partial: "partial";
|
|
@@ -26,43 +27,33 @@ export interface IAppointmentAddress {
|
|
|
26
27
|
address_geo?: IGeoPoint;
|
|
27
28
|
}
|
|
28
29
|
export interface IAppointmentPatient {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
gender: string;
|
|
33
|
-
birthDate: string;
|
|
34
|
-
phone: string;
|
|
35
|
-
wabaPhone: string;
|
|
36
|
-
external_id?: string;
|
|
37
|
-
[key: string]: unknown;
|
|
30
|
+
display_name: string;
|
|
31
|
+
gender?: string;
|
|
32
|
+
patientRef?: FirestoreDocumentReference;
|
|
38
33
|
}
|
|
39
34
|
export interface IAppointmentProfessional {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
gender: string;
|
|
44
|
-
external_id?: string;
|
|
45
|
-
[key: string]: unknown;
|
|
35
|
+
display_name: string;
|
|
36
|
+
gender?: string;
|
|
37
|
+
professionalRef?: FirestoreDocumentReference;
|
|
46
38
|
}
|
|
47
39
|
export interface IAppointmentInsurance {
|
|
48
40
|
name: string;
|
|
49
|
-
|
|
50
|
-
[key: string]: unknown;
|
|
41
|
+
insuranceRef?: FirestoreDocumentReference;
|
|
51
42
|
}
|
|
43
|
+
export declare const InsurancePaymentTypeEnum: {
|
|
44
|
+
readonly Patient: "patient";
|
|
45
|
+
readonly Insurance: "insurance";
|
|
46
|
+
};
|
|
47
|
+
export type InsurancePaymentType = (typeof InsurancePaymentTypeEnum)[keyof typeof InsurancePaymentTypeEnum];
|
|
52
48
|
export interface IAppointmentPayment {
|
|
53
49
|
total?: number | null;
|
|
54
50
|
paid?: number | null;
|
|
55
51
|
due?: number | null;
|
|
56
52
|
status?: AppointmentPaymentStatus;
|
|
53
|
+
payment_type: InsurancePaymentType;
|
|
54
|
+
metadata?: Record<string, unknown>;
|
|
57
55
|
[key: string]: unknown;
|
|
58
56
|
}
|
|
59
|
-
export interface IAppointmentProcedure {
|
|
60
|
-
id?: number;
|
|
61
|
-
name: string;
|
|
62
|
-
description?: string;
|
|
63
|
-
duration?: number;
|
|
64
|
-
price?: number;
|
|
65
|
-
}
|
|
66
57
|
export interface IAppointment extends IFireDoc {
|
|
67
58
|
startDate: Date;
|
|
68
59
|
endDate: Date;
|
|
@@ -74,7 +65,7 @@ export interface IAppointment extends IFireDoc {
|
|
|
74
65
|
appointmentBaseType: AppointmentType;
|
|
75
66
|
specialty?: string;
|
|
76
67
|
address?: IAppointmentAddress;
|
|
77
|
-
procedures?:
|
|
68
|
+
procedures?: IProcedure[];
|
|
78
69
|
patient: IAppointmentPatient;
|
|
79
70
|
professional?: IAppointmentProfessional;
|
|
80
71
|
insurance?: IAppointmentInsurance;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppointmentModeEnum = exports.AppointmentPaymentStatusEnum = void 0;
|
|
3
|
+
exports.InsurancePaymentTypeEnum = exports.AppointmentModeEnum = exports.AppointmentPaymentStatusEnum = void 0;
|
|
4
4
|
// Enums para status de pagamento
|
|
5
5
|
exports.AppointmentPaymentStatusEnum = {
|
|
6
6
|
Paid: "paid",
|
|
@@ -13,3 +13,7 @@ exports.AppointmentModeEnum = {
|
|
|
13
13
|
Telemedicine: "telemedicine",
|
|
14
14
|
InPerson: "in_person",
|
|
15
15
|
};
|
|
16
|
+
exports.InsurancePaymentTypeEnum = {
|
|
17
|
+
Patient: "patient",
|
|
18
|
+
Insurance: "insurance",
|
|
19
|
+
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
FirestoreDocumentReference,
|
|
3
|
+
IFireDoc,
|
|
4
|
+
IGeoPoint,
|
|
5
|
+
ITag,
|
|
6
|
+
} from "../../shared";
|
|
2
7
|
import { AppointmentStatusType, AppointmentType } from "../dic";
|
|
8
|
+
import { IProcedure } from "../procedure";
|
|
3
9
|
// Enums para status de pagamento
|
|
4
10
|
export const AppointmentPaymentStatusEnum = {
|
|
5
11
|
Paid: "paid",
|
|
@@ -37,52 +43,43 @@ export interface IAppointmentAddress {
|
|
|
37
43
|
|
|
38
44
|
// Interface para paciente
|
|
39
45
|
export interface IAppointmentPatient {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
gender: string;
|
|
44
|
-
birthDate: string;
|
|
45
|
-
phone: string;
|
|
46
|
-
wabaPhone: string;
|
|
47
|
-
external_id?: string;
|
|
48
|
-
[key: string]: unknown; // index signature
|
|
46
|
+
display_name: string;
|
|
47
|
+
gender?: string;
|
|
48
|
+
patientRef?: FirestoreDocumentReference;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
// Interface para profissional
|
|
52
52
|
export interface IAppointmentProfessional {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
gender: string;
|
|
57
|
-
external_id?: string;
|
|
58
|
-
[key: string]: unknown; // index signature
|
|
53
|
+
display_name: string;
|
|
54
|
+
gender?: string;
|
|
55
|
+
professionalRef?: FirestoreDocumentReference;
|
|
59
56
|
}
|
|
60
57
|
|
|
61
58
|
// Interface para seguro
|
|
62
59
|
export interface IAppointmentInsurance {
|
|
63
60
|
name: string;
|
|
64
|
-
|
|
65
|
-
[key: string]: unknown; // index signature
|
|
61
|
+
insuranceRef?: FirestoreDocumentReference;
|
|
66
62
|
}
|
|
67
63
|
|
|
64
|
+
export const InsurancePaymentTypeEnum = {
|
|
65
|
+
Patient: "patient",
|
|
66
|
+
Insurance: "insurance",
|
|
67
|
+
} as const;
|
|
68
|
+
|
|
69
|
+
export type InsurancePaymentType =
|
|
70
|
+
(typeof InsurancePaymentTypeEnum)[keyof typeof InsurancePaymentTypeEnum];
|
|
71
|
+
|
|
68
72
|
// Interface para pagamento
|
|
69
73
|
export interface IAppointmentPayment {
|
|
70
74
|
total?: number | null;
|
|
71
75
|
paid?: number | null;
|
|
72
76
|
due?: number | null;
|
|
73
77
|
status?: AppointmentPaymentStatus;
|
|
78
|
+
payment_type: InsurancePaymentType;
|
|
79
|
+
metadata?: Record<string, unknown>;
|
|
74
80
|
[key: string]: unknown;
|
|
75
81
|
}
|
|
76
82
|
|
|
77
|
-
// Interface para procedimento
|
|
78
|
-
export interface IAppointmentProcedure {
|
|
79
|
-
id?: number;
|
|
80
|
-
name: string;
|
|
81
|
-
description?: string;
|
|
82
|
-
duration?: number; // em minutos
|
|
83
|
-
price?: number;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
83
|
// Interface principal do Appointment
|
|
87
84
|
export interface IAppointment extends IFireDoc {
|
|
88
85
|
startDate: Date;
|
|
@@ -95,7 +92,7 @@ export interface IAppointment extends IFireDoc {
|
|
|
95
92
|
appointmentBaseType: AppointmentType;
|
|
96
93
|
specialty?: string;
|
|
97
94
|
address?: IAppointmentAddress;
|
|
98
|
-
procedures?:
|
|
95
|
+
procedures?: IProcedure[];
|
|
99
96
|
patient: IAppointmentPatient;
|
|
100
97
|
professional?: IAppointmentProfessional;
|
|
101
98
|
insurance?: IAppointmentInsurance;
|
|
@@ -25,7 +25,9 @@ export interface ISpecialtyType extends IFireDoc {
|
|
|
25
25
|
export interface ISpecialty extends IFireDoc {
|
|
26
26
|
code: string;
|
|
27
27
|
name: string;
|
|
28
|
+
order: number;
|
|
28
29
|
tiss?: string;
|
|
30
|
+
external_id?: string | null;
|
|
29
31
|
type_code?: string;
|
|
30
32
|
type_name?: string;
|
|
31
33
|
typeRef?: FirestoreDocumentReference;
|
|
@@ -35,18 +37,21 @@ export interface ISpecialty extends IFireDoc {
|
|
|
35
37
|
export interface IPatientSource extends IFireDoc {
|
|
36
38
|
code: string;
|
|
37
39
|
name: string;
|
|
40
|
+
external_id?: string | null;
|
|
38
41
|
tags?: ITag[] | null;
|
|
39
42
|
[key: string]: unknown;
|
|
40
43
|
}
|
|
41
44
|
export interface IAppointmentSource extends IFireDoc {
|
|
42
45
|
code: string;
|
|
43
46
|
name: string;
|
|
47
|
+
external_id?: string | null;
|
|
44
48
|
tags?: ITag[] | null;
|
|
45
49
|
[key: string]: unknown;
|
|
46
50
|
}
|
|
47
51
|
export interface IAppointmentRequestType extends IFireDoc {
|
|
48
52
|
code: string;
|
|
49
53
|
name: string;
|
|
54
|
+
external_id?: string | null;
|
|
50
55
|
tags?: ITag[] | null;
|
|
51
56
|
[key: string]: unknown;
|
|
52
57
|
}
|
|
@@ -90,21 +95,25 @@ export type AppointmentType = (typeof AppointmentTypeEnum)[keyof typeof Appointm
|
|
|
90
95
|
export interface IAppointmentStatus extends IFireDoc {
|
|
91
96
|
name: string;
|
|
92
97
|
order: number;
|
|
98
|
+
external_id?: string | null;
|
|
93
99
|
base_type: AppointmentStatusType;
|
|
94
100
|
}
|
|
95
101
|
export interface IAppointmentType extends IFireDoc {
|
|
96
102
|
name: string;
|
|
97
103
|
order: number;
|
|
104
|
+
external_id?: string | null;
|
|
98
105
|
base_type: AppointmentType;
|
|
99
106
|
}
|
|
100
107
|
export interface IMedication {
|
|
101
108
|
name: string;
|
|
102
109
|
dosage?: string | null;
|
|
103
110
|
frequency?: string | null;
|
|
111
|
+
external_id?: string | null;
|
|
104
112
|
}
|
|
105
113
|
export interface IChronicCondition extends IFireDoc {
|
|
106
114
|
code: string;
|
|
107
115
|
name: string;
|
|
116
|
+
external_id?: string | null;
|
|
108
117
|
diagnosis_date?: string | null;
|
|
109
118
|
severity?: "Mild" | "Moderate" | "Severe";
|
|
110
119
|
controlled?: boolean;
|
|
@@ -47,7 +47,9 @@ export interface ISpecialtyType extends IFireDoc {
|
|
|
47
47
|
export interface ISpecialty extends IFireDoc {
|
|
48
48
|
code: string;
|
|
49
49
|
name: string;
|
|
50
|
+
order: number;
|
|
50
51
|
tiss?: string;
|
|
52
|
+
external_id?: string | null; // ID externo da especialidade
|
|
51
53
|
type_code?: string;
|
|
52
54
|
type_name?: string;
|
|
53
55
|
typeRef?: FirestoreDocumentReference;
|
|
@@ -58,6 +60,7 @@ export interface ISpecialty extends IFireDoc {
|
|
|
58
60
|
export interface IPatientSource extends IFireDoc {
|
|
59
61
|
code: string;
|
|
60
62
|
name: string;
|
|
63
|
+
external_id?: string | null; // ID externo da fonte de pacientes
|
|
61
64
|
tags?: ITag[] | null;
|
|
62
65
|
[key: string]: unknown; // index signature
|
|
63
66
|
}
|
|
@@ -65,6 +68,7 @@ export interface IPatientSource extends IFireDoc {
|
|
|
65
68
|
export interface IAppointmentSource extends IFireDoc {
|
|
66
69
|
code: string;
|
|
67
70
|
name: string;
|
|
71
|
+
external_id?: string | null; // ID externo da fonte de agendamentos
|
|
68
72
|
tags?: ITag[] | null;
|
|
69
73
|
[key: string]: unknown; // index signature
|
|
70
74
|
}
|
|
@@ -72,6 +76,7 @@ export interface IAppointmentSource extends IFireDoc {
|
|
|
72
76
|
export interface IAppointmentRequestType extends IFireDoc {
|
|
73
77
|
code: string;
|
|
74
78
|
name: string;
|
|
79
|
+
external_id?: string | null; // ID externo do tipo de agendamento
|
|
75
80
|
tags?: ITag[] | null;
|
|
76
81
|
[key: string]: unknown; // index signature
|
|
77
82
|
}
|
|
@@ -133,12 +138,14 @@ export type AppointmentType =
|
|
|
133
138
|
export interface IAppointmentStatus extends IFireDoc {
|
|
134
139
|
name: string;
|
|
135
140
|
order: number;
|
|
141
|
+
external_id?: string | null; // ID externo do status de agendamento
|
|
136
142
|
base_type: AppointmentStatusType;
|
|
137
143
|
}
|
|
138
144
|
|
|
139
145
|
export interface IAppointmentType extends IFireDoc {
|
|
140
146
|
name: string;
|
|
141
147
|
order: number;
|
|
148
|
+
external_id?: string | null; // ID externo do tipo de agendamento
|
|
142
149
|
base_type: AppointmentType;
|
|
143
150
|
}
|
|
144
151
|
|
|
@@ -146,11 +153,13 @@ export interface IMedication {
|
|
|
146
153
|
name: string;
|
|
147
154
|
dosage?: string | null;
|
|
148
155
|
frequency?: string | null;
|
|
156
|
+
external_id?: string | null; // ID externo do medicamento
|
|
149
157
|
}
|
|
150
158
|
|
|
151
159
|
export interface IChronicCondition extends IFireDoc {
|
|
152
160
|
code: string; // Identificador único da condição
|
|
153
161
|
name: string; // Nome da doença crônica, ex: "Diabetes Tipo 2"
|
|
162
|
+
external_id?: string | null; // ID externo da condição crônica
|
|
154
163
|
diagnosis_date?: string | null; // Data do diagnóstico (ISO 8601)
|
|
155
164
|
severity?: "Mild" | "Moderate" | "Severe"; // Nível de gravidade
|
|
156
165
|
controlled?: boolean; // Indica se a condição está sob controle
|
|
@@ -42,6 +42,7 @@ export interface IProfessionalOffice {
|
|
|
42
42
|
ref?: FirestoreDocumentReference;
|
|
43
43
|
}
|
|
44
44
|
export interface IProfessional extends IProfile {
|
|
45
|
+
external_id?: string | null;
|
|
45
46
|
status?: ProfessionalStatus;
|
|
46
47
|
professionalId?: string | null;
|
|
47
48
|
title?: string | null;
|
|
@@ -107,6 +108,7 @@ export interface IPatientAllergy {
|
|
|
107
108
|
severity?: Severity | null;
|
|
108
109
|
}
|
|
109
110
|
export interface IPatient extends IProfile {
|
|
111
|
+
external_id?: string | null;
|
|
110
112
|
social_id?: string | null;
|
|
111
113
|
status?: PatientStatus;
|
|
112
114
|
source_code?: string | null;
|
|
@@ -79,6 +79,7 @@ export interface IProfessionalOffice {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
export interface IProfessional extends IProfile {
|
|
82
|
+
external_id?: string | null; // ID externo do médico
|
|
82
83
|
status?: ProfessionalStatus;
|
|
83
84
|
professionalId?: string | null;
|
|
84
85
|
title?: string | null;
|
|
@@ -169,6 +170,7 @@ export interface IPatientAllergy {
|
|
|
169
170
|
}
|
|
170
171
|
|
|
171
172
|
export interface IPatient extends IProfile {
|
|
173
|
+
external_id?: string | null; // ID externo do paciente
|
|
172
174
|
social_id?: string | null; //CPF
|
|
173
175
|
status?: PatientStatus;
|
|
174
176
|
source_code?: string | null;
|