c2-clinical 1.0.20 → 1.0.22
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/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/models/Patient.js +1 -1
- package/dist/models/patient/Address.d.ts +46 -0
- package/dist/models/patient/Address.js +16 -0
- package/dist/models/patient/City.d.ts +34 -0
- package/dist/models/patient/City.js +13 -0
- package/dist/models/patient/Patient.d.ts +238 -0
- package/dist/models/patient/Patient.js +36 -0
- package/dist/models/patient/Phone.d.ts +37 -0
- package/dist/models/patient/Phone.js +47 -0
- package/dist/models/patient/State.d.ts +42 -0
- package/dist/models/patient/State.js +15 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import GroupFormUnitsFlow from "./flow/group/GroupFormUnitsFlow";
|
|
|
2
2
|
import ExecFormulaFlow from "./flow/on-answer/ExecFormulaFlow";
|
|
3
3
|
import OnAnswerQuestionsFlow from "./flow/on-answer/OnAnswerQuestionsFlow";
|
|
4
4
|
export * from "./models/enum";
|
|
5
|
-
export * from "./models/Patient";
|
|
6
|
-
export * from "./models/Phone";
|
|
5
|
+
export * from "./models/patient/Patient";
|
|
6
|
+
export * from "./models/patient/Phone";
|
|
7
7
|
export * from "./models/File";
|
|
8
8
|
export * from "./models/Account";
|
|
9
9
|
export * from "./models/Default";
|
package/dist/index.js
CHANGED
|
@@ -25,8 +25,8 @@ exports.ExecFormulaFlow = ExecFormulaFlow_1.default;
|
|
|
25
25
|
const OnAnswerQuestionsFlow_1 = __importDefault(require("./flow/on-answer/OnAnswerQuestionsFlow"));
|
|
26
26
|
exports.OnAnswerQuestionsFlow = OnAnswerQuestionsFlow_1.default;
|
|
27
27
|
__exportStar(require("./models/enum"), exports);
|
|
28
|
-
__exportStar(require("./models/Patient"), exports);
|
|
29
|
-
__exportStar(require("./models/Phone"), exports);
|
|
28
|
+
__exportStar(require("./models/patient/Patient"), exports);
|
|
29
|
+
__exportStar(require("./models/patient/Phone"), exports);
|
|
30
30
|
__exportStar(require("./models/File"), exports);
|
|
31
31
|
__exportStar(require("./models/Account"), exports);
|
|
32
32
|
__exportStar(require("./models/Default"), exports);
|
package/dist/models/Patient.js
CHANGED
|
@@ -31,4 +31,4 @@ exports.PatientSchema = new mongoose_1.Schema({
|
|
|
31
31
|
});
|
|
32
32
|
exports.PatientSchema.index({ fullName: 1 }, { unique: false });
|
|
33
33
|
exports.PatientSchema.index({ account: 1 }, { unique: false });
|
|
34
|
-
exports.PatientSchema.index({ socialId: 1 }, { unique: true });
|
|
34
|
+
exports.PatientSchema.index({ account: 1, socialId: 1 }, { unique: true });
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { ICity } from "./City";
|
|
3
|
+
export interface IAddress {
|
|
4
|
+
zipCode: string;
|
|
5
|
+
street: string;
|
|
6
|
+
number: string;
|
|
7
|
+
complement: string;
|
|
8
|
+
neighborhood: string;
|
|
9
|
+
typeNeighborhood: string;
|
|
10
|
+
typeStreet: string;
|
|
11
|
+
city: Types.ObjectId | ICity;
|
|
12
|
+
}
|
|
13
|
+
export declare const AddressSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
14
|
+
_id: false;
|
|
15
|
+
}, {
|
|
16
|
+
number?: string | null | undefined;
|
|
17
|
+
zipCode?: string | null | undefined;
|
|
18
|
+
street?: string | null | undefined;
|
|
19
|
+
complement?: string | null | undefined;
|
|
20
|
+
neighborhood?: string | null | undefined;
|
|
21
|
+
typeNeighborhood?: string | null | undefined;
|
|
22
|
+
typeStreet?: string | null | undefined;
|
|
23
|
+
city?: any;
|
|
24
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
25
|
+
number?: string | null | undefined;
|
|
26
|
+
zipCode?: string | null | undefined;
|
|
27
|
+
street?: string | null | undefined;
|
|
28
|
+
complement?: string | null | undefined;
|
|
29
|
+
neighborhood?: string | null | undefined;
|
|
30
|
+
typeNeighborhood?: string | null | undefined;
|
|
31
|
+
typeStreet?: string | null | undefined;
|
|
32
|
+
city?: any;
|
|
33
|
+
}>, {}> & import("mongoose").FlatRecord<{
|
|
34
|
+
number?: string | null | undefined;
|
|
35
|
+
zipCode?: string | null | undefined;
|
|
36
|
+
street?: string | null | undefined;
|
|
37
|
+
complement?: string | null | undefined;
|
|
38
|
+
neighborhood?: string | null | undefined;
|
|
39
|
+
typeNeighborhood?: string | null | undefined;
|
|
40
|
+
typeStreet?: string | null | undefined;
|
|
41
|
+
city?: any;
|
|
42
|
+
}> & {
|
|
43
|
+
_id: Types.ObjectId;
|
|
44
|
+
} & {
|
|
45
|
+
__v: number;
|
|
46
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddressSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
exports.AddressSchema = new mongoose_1.Schema({
|
|
6
|
+
zipCode: { type: String },
|
|
7
|
+
street: { type: String },
|
|
8
|
+
number: { type: String },
|
|
9
|
+
complement: { type: String },
|
|
10
|
+
neighborhood: { type: String },
|
|
11
|
+
typeNeighborhood: { type: String },
|
|
12
|
+
typeStreet: { type: String },
|
|
13
|
+
city: { type: mongoose_1.Schema.Types.ObjectId, ref: "city" }
|
|
14
|
+
}, {
|
|
15
|
+
_id: false
|
|
16
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
import { IState } from "./State";
|
|
3
|
+
import { IDefaultAdmin } from "../Default";
|
|
4
|
+
export interface ICity extends IDefaultAdmin {
|
|
5
|
+
name: string;
|
|
6
|
+
abbreviation: string;
|
|
7
|
+
code: string;
|
|
8
|
+
state: Types.ObjectId | IState;
|
|
9
|
+
}
|
|
10
|
+
export declare const AdminCityModel: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
11
|
+
timestamps: {
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
};
|
|
15
|
+
}, {} & {
|
|
16
|
+
name: string;
|
|
17
|
+
code: string;
|
|
18
|
+
state: any;
|
|
19
|
+
abbreviation?: string | null | undefined;
|
|
20
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
21
|
+
name: string;
|
|
22
|
+
code: string;
|
|
23
|
+
state: any;
|
|
24
|
+
abbreviation?: string | null | undefined;
|
|
25
|
+
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
26
|
+
name: string;
|
|
27
|
+
code: string;
|
|
28
|
+
state: any;
|
|
29
|
+
abbreviation?: string | null | undefined;
|
|
30
|
+
}> & {
|
|
31
|
+
_id: Types.ObjectId;
|
|
32
|
+
} & {
|
|
33
|
+
__v: number;
|
|
34
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminCityModel = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
exports.AdminCityModel = new mongoose_1.Schema({
|
|
6
|
+
name: { type: String, required: true },
|
|
7
|
+
abbreviation: { type: String },
|
|
8
|
+
code: { type: String, required: true },
|
|
9
|
+
state: { type: mongoose_1.Schema.Types.ObjectId, ref: "state", required: true }
|
|
10
|
+
}, {
|
|
11
|
+
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
12
|
+
});
|
|
13
|
+
exports.AdminCityModel.index({ name: 1, state: 1 }, { unique: true });
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { Schema } from "mongoose";
|
|
2
|
+
import { IDefault } from "../Default";
|
|
3
|
+
import { IPhone } from "./Phone";
|
|
4
|
+
import { GenreEnum } from "../enum";
|
|
5
|
+
import { IAddress } from "./Address";
|
|
6
|
+
export interface IPatientAppConfig {
|
|
7
|
+
accessEnable: boolean;
|
|
8
|
+
accessCode: string;
|
|
9
|
+
accessExpireDate: Date;
|
|
10
|
+
}
|
|
11
|
+
export interface IPatient extends IDefault {
|
|
12
|
+
fullName: string;
|
|
13
|
+
genre: GenreEnum;
|
|
14
|
+
bornDate: Date;
|
|
15
|
+
phones: IPhone[];
|
|
16
|
+
socialId: string;
|
|
17
|
+
email: string;
|
|
18
|
+
tags: string[];
|
|
19
|
+
active: boolean;
|
|
20
|
+
sendEmailAsWelcome: boolean;
|
|
21
|
+
appConfig: IPatientAppConfig;
|
|
22
|
+
addresses: IAddress[];
|
|
23
|
+
}
|
|
24
|
+
export declare const PatientAppConfigSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
25
|
+
_id: false;
|
|
26
|
+
}, {
|
|
27
|
+
accessEnable?: any;
|
|
28
|
+
accessCode?: string | null | undefined;
|
|
29
|
+
accessExpireDate?: NativeDate | null | undefined;
|
|
30
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
31
|
+
accessEnable?: any;
|
|
32
|
+
accessCode?: string | null | undefined;
|
|
33
|
+
accessExpireDate?: NativeDate | null | undefined;
|
|
34
|
+
}>, {}> & import("mongoose").FlatRecord<{
|
|
35
|
+
accessEnable?: any;
|
|
36
|
+
accessCode?: string | null | undefined;
|
|
37
|
+
accessExpireDate?: NativeDate | null | undefined;
|
|
38
|
+
}> & {
|
|
39
|
+
_id: import("mongoose").Types.ObjectId;
|
|
40
|
+
} & {
|
|
41
|
+
__v: number;
|
|
42
|
+
}>;
|
|
43
|
+
export declare const PatientSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
44
|
+
timestamps: {
|
|
45
|
+
createdAt: string;
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
};
|
|
48
|
+
}, {} & {
|
|
49
|
+
account: any;
|
|
50
|
+
active: any;
|
|
51
|
+
fullName: string;
|
|
52
|
+
bornDate: NativeDate;
|
|
53
|
+
phones: import("mongoose").Types.DocumentArray<{} & {
|
|
54
|
+
active: any;
|
|
55
|
+
countryCode: string;
|
|
56
|
+
isWhatsapp: any;
|
|
57
|
+
number?: string | null | undefined;
|
|
58
|
+
description?: string | null | undefined;
|
|
59
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {} & {
|
|
60
|
+
active: any;
|
|
61
|
+
countryCode: string;
|
|
62
|
+
isWhatsapp: any;
|
|
63
|
+
number?: string | null | undefined;
|
|
64
|
+
description?: string | null | undefined;
|
|
65
|
+
}> & {} & {
|
|
66
|
+
active: any;
|
|
67
|
+
countryCode: string;
|
|
68
|
+
isWhatsapp: any;
|
|
69
|
+
number?: string | null | undefined;
|
|
70
|
+
description?: string | null | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
socialId: string;
|
|
73
|
+
tags: string[];
|
|
74
|
+
sendEmailAsWelcome: any;
|
|
75
|
+
addresses: import("mongoose").Types.DocumentArray<{
|
|
76
|
+
number?: string | null | undefined;
|
|
77
|
+
zipCode?: string | null | undefined;
|
|
78
|
+
street?: string | null | undefined;
|
|
79
|
+
complement?: string | null | undefined;
|
|
80
|
+
neighborhood?: string | null | undefined;
|
|
81
|
+
typeNeighborhood?: string | null | undefined;
|
|
82
|
+
typeStreet?: string | null | undefined;
|
|
83
|
+
city?: any;
|
|
84
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
85
|
+
number?: string | null | undefined;
|
|
86
|
+
zipCode?: string | null | undefined;
|
|
87
|
+
street?: string | null | undefined;
|
|
88
|
+
complement?: string | null | undefined;
|
|
89
|
+
neighborhood?: string | null | undefined;
|
|
90
|
+
typeNeighborhood?: string | null | undefined;
|
|
91
|
+
typeStreet?: string | null | undefined;
|
|
92
|
+
city?: any;
|
|
93
|
+
}> & {
|
|
94
|
+
number?: string | null | undefined;
|
|
95
|
+
zipCode?: string | null | undefined;
|
|
96
|
+
street?: string | null | undefined;
|
|
97
|
+
complement?: string | null | undefined;
|
|
98
|
+
neighborhood?: string | null | undefined;
|
|
99
|
+
typeNeighborhood?: string | null | undefined;
|
|
100
|
+
typeStreet?: string | null | undefined;
|
|
101
|
+
city?: any;
|
|
102
|
+
}>;
|
|
103
|
+
email?: string | null | undefined;
|
|
104
|
+
genre?: string | null | undefined;
|
|
105
|
+
appConfig?: {
|
|
106
|
+
accessEnable?: any;
|
|
107
|
+
accessCode?: string | null | undefined;
|
|
108
|
+
accessExpireDate?: NativeDate | null | undefined;
|
|
109
|
+
} | null | undefined;
|
|
110
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
111
|
+
account: any;
|
|
112
|
+
active: any;
|
|
113
|
+
fullName: string;
|
|
114
|
+
bornDate: NativeDate;
|
|
115
|
+
phones: import("mongoose").Types.DocumentArray<{} & {
|
|
116
|
+
active: any;
|
|
117
|
+
countryCode: string;
|
|
118
|
+
isWhatsapp: any;
|
|
119
|
+
number?: string | null | undefined;
|
|
120
|
+
description?: string | null | undefined;
|
|
121
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {} & {
|
|
122
|
+
active: any;
|
|
123
|
+
countryCode: string;
|
|
124
|
+
isWhatsapp: any;
|
|
125
|
+
number?: string | null | undefined;
|
|
126
|
+
description?: string | null | undefined;
|
|
127
|
+
}> & {} & {
|
|
128
|
+
active: any;
|
|
129
|
+
countryCode: string;
|
|
130
|
+
isWhatsapp: any;
|
|
131
|
+
number?: string | null | undefined;
|
|
132
|
+
description?: string | null | undefined;
|
|
133
|
+
}>;
|
|
134
|
+
socialId: string;
|
|
135
|
+
tags: string[];
|
|
136
|
+
sendEmailAsWelcome: any;
|
|
137
|
+
addresses: import("mongoose").Types.DocumentArray<{
|
|
138
|
+
number?: string | null | undefined;
|
|
139
|
+
zipCode?: string | null | undefined;
|
|
140
|
+
street?: string | null | undefined;
|
|
141
|
+
complement?: string | null | undefined;
|
|
142
|
+
neighborhood?: string | null | undefined;
|
|
143
|
+
typeNeighborhood?: string | null | undefined;
|
|
144
|
+
typeStreet?: string | null | undefined;
|
|
145
|
+
city?: any;
|
|
146
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
147
|
+
number?: string | null | undefined;
|
|
148
|
+
zipCode?: string | null | undefined;
|
|
149
|
+
street?: string | null | undefined;
|
|
150
|
+
complement?: string | null | undefined;
|
|
151
|
+
neighborhood?: string | null | undefined;
|
|
152
|
+
typeNeighborhood?: string | null | undefined;
|
|
153
|
+
typeStreet?: string | null | undefined;
|
|
154
|
+
city?: any;
|
|
155
|
+
}> & {
|
|
156
|
+
number?: string | null | undefined;
|
|
157
|
+
zipCode?: string | null | undefined;
|
|
158
|
+
street?: string | null | undefined;
|
|
159
|
+
complement?: string | null | undefined;
|
|
160
|
+
neighborhood?: string | null | undefined;
|
|
161
|
+
typeNeighborhood?: string | null | undefined;
|
|
162
|
+
typeStreet?: string | null | undefined;
|
|
163
|
+
city?: any;
|
|
164
|
+
}>;
|
|
165
|
+
email?: string | null | undefined;
|
|
166
|
+
genre?: string | null | undefined;
|
|
167
|
+
appConfig?: {
|
|
168
|
+
accessEnable?: any;
|
|
169
|
+
accessCode?: string | null | undefined;
|
|
170
|
+
accessExpireDate?: NativeDate | null | undefined;
|
|
171
|
+
} | null | undefined;
|
|
172
|
+
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
173
|
+
account: any;
|
|
174
|
+
active: any;
|
|
175
|
+
fullName: string;
|
|
176
|
+
bornDate: NativeDate;
|
|
177
|
+
phones: import("mongoose").Types.DocumentArray<{} & {
|
|
178
|
+
active: any;
|
|
179
|
+
countryCode: string;
|
|
180
|
+
isWhatsapp: any;
|
|
181
|
+
number?: string | null | undefined;
|
|
182
|
+
description?: string | null | undefined;
|
|
183
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {} & {
|
|
184
|
+
active: any;
|
|
185
|
+
countryCode: string;
|
|
186
|
+
isWhatsapp: any;
|
|
187
|
+
number?: string | null | undefined;
|
|
188
|
+
description?: string | null | undefined;
|
|
189
|
+
}> & {} & {
|
|
190
|
+
active: any;
|
|
191
|
+
countryCode: string;
|
|
192
|
+
isWhatsapp: any;
|
|
193
|
+
number?: string | null | undefined;
|
|
194
|
+
description?: string | null | undefined;
|
|
195
|
+
}>;
|
|
196
|
+
socialId: string;
|
|
197
|
+
tags: string[];
|
|
198
|
+
sendEmailAsWelcome: any;
|
|
199
|
+
addresses: import("mongoose").Types.DocumentArray<{
|
|
200
|
+
number?: string | null | undefined;
|
|
201
|
+
zipCode?: string | null | undefined;
|
|
202
|
+
street?: string | null | undefined;
|
|
203
|
+
complement?: string | null | undefined;
|
|
204
|
+
neighborhood?: string | null | undefined;
|
|
205
|
+
typeNeighborhood?: string | null | undefined;
|
|
206
|
+
typeStreet?: string | null | undefined;
|
|
207
|
+
city?: any;
|
|
208
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
209
|
+
number?: string | null | undefined;
|
|
210
|
+
zipCode?: string | null | undefined;
|
|
211
|
+
street?: string | null | undefined;
|
|
212
|
+
complement?: string | null | undefined;
|
|
213
|
+
neighborhood?: string | null | undefined;
|
|
214
|
+
typeNeighborhood?: string | null | undefined;
|
|
215
|
+
typeStreet?: string | null | undefined;
|
|
216
|
+
city?: any;
|
|
217
|
+
}> & {
|
|
218
|
+
number?: string | null | undefined;
|
|
219
|
+
zipCode?: string | null | undefined;
|
|
220
|
+
street?: string | null | undefined;
|
|
221
|
+
complement?: string | null | undefined;
|
|
222
|
+
neighborhood?: string | null | undefined;
|
|
223
|
+
typeNeighborhood?: string | null | undefined;
|
|
224
|
+
typeStreet?: string | null | undefined;
|
|
225
|
+
city?: any;
|
|
226
|
+
}>;
|
|
227
|
+
email?: string | null | undefined;
|
|
228
|
+
genre?: string | null | undefined;
|
|
229
|
+
appConfig?: {
|
|
230
|
+
accessEnable?: any;
|
|
231
|
+
accessCode?: string | null | undefined;
|
|
232
|
+
accessExpireDate?: NativeDate | null | undefined;
|
|
233
|
+
} | null | undefined;
|
|
234
|
+
}> & {
|
|
235
|
+
_id: import("mongoose").Types.ObjectId;
|
|
236
|
+
} & {
|
|
237
|
+
__v: number;
|
|
238
|
+
}>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PatientSchema = exports.PatientAppConfigSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const Phone_1 = require("./Phone");
|
|
6
|
+
const enum_1 = require("../enum");
|
|
7
|
+
const Address_1 = require("./Address");
|
|
8
|
+
exports.PatientAppConfigSchema = new mongoose_1.Schema({
|
|
9
|
+
accessEnable: { type: Boolean },
|
|
10
|
+
accessCode: { type: String },
|
|
11
|
+
accessExpireDate: { type: Date }
|
|
12
|
+
}, {
|
|
13
|
+
_id: false
|
|
14
|
+
});
|
|
15
|
+
exports.PatientSchema = new mongoose_1.Schema({
|
|
16
|
+
account: { type: mongoose_1.Schema.Types.ObjectId, ref: "account", required: true },
|
|
17
|
+
genre: { type: String, enum: enum_1.GenreEnum },
|
|
18
|
+
fullName: { type: String, required: true },
|
|
19
|
+
bornDate: { type: Date, required: true },
|
|
20
|
+
phones: { type: [Phone_1.PhoneSchema] },
|
|
21
|
+
socialId: { type: String, required: true },
|
|
22
|
+
email: { type: String },
|
|
23
|
+
tags: { type: [String] },
|
|
24
|
+
active: { type: Boolean, default: true },
|
|
25
|
+
sendEmailAsWelcome: { type: Boolean, default: false },
|
|
26
|
+
appConfig: { type: exports.PatientAppConfigSchema },
|
|
27
|
+
addresses: { type: [Address_1.AddressSchema] }
|
|
28
|
+
}, {
|
|
29
|
+
timestamps: {
|
|
30
|
+
createdAt: "createdAtDateTime",
|
|
31
|
+
updatedAt: "updatedAtDateTime"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
exports.PatientSchema.index({ fullName: 1 }, { unique: false });
|
|
35
|
+
exports.PatientSchema.index({ account: 1 }, { unique: false });
|
|
36
|
+
exports.PatientSchema.index({ account: 1, socialId: 1 }, { unique: true });
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as mongoose from "mongoose";
|
|
2
|
+
export interface IPhone {
|
|
3
|
+
description: string;
|
|
4
|
+
countryCode: string;
|
|
5
|
+
number: string;
|
|
6
|
+
active: boolean;
|
|
7
|
+
isWhatsapp: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const PhoneSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
10
|
+
timestamps: {
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
};
|
|
14
|
+
_id: false;
|
|
15
|
+
}, {} & {
|
|
16
|
+
active: any;
|
|
17
|
+
countryCode: string;
|
|
18
|
+
isWhatsapp: any;
|
|
19
|
+
number?: string | null | undefined;
|
|
20
|
+
description?: string | null | undefined;
|
|
21
|
+
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{} & {
|
|
22
|
+
active: any;
|
|
23
|
+
countryCode: string;
|
|
24
|
+
isWhatsapp: any;
|
|
25
|
+
number?: string | null | undefined;
|
|
26
|
+
description?: string | null | undefined;
|
|
27
|
+
}>, {}> & mongoose.FlatRecord<{} & {
|
|
28
|
+
active: any;
|
|
29
|
+
countryCode: string;
|
|
30
|
+
isWhatsapp: any;
|
|
31
|
+
number?: string | null | undefined;
|
|
32
|
+
description?: string | null | undefined;
|
|
33
|
+
}> & {
|
|
34
|
+
_id: mongoose.Types.ObjectId;
|
|
35
|
+
} & {
|
|
36
|
+
__v: number;
|
|
37
|
+
}>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.PhoneSchema = void 0;
|
|
37
|
+
const mongoose = __importStar(require("mongoose"));
|
|
38
|
+
exports.PhoneSchema = new mongoose.Schema({
|
|
39
|
+
description: { type: String },
|
|
40
|
+
countryCode: { type: String, default: "+55" },
|
|
41
|
+
number: { type: String },
|
|
42
|
+
isWhatsapp: { type: Boolean, default: true },
|
|
43
|
+
active: { type: Boolean, default: true }
|
|
44
|
+
}, {
|
|
45
|
+
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" },
|
|
46
|
+
_id: false
|
|
47
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Schema } from "mongoose";
|
|
2
|
+
import { IDefaultAdmin } from "../Default";
|
|
3
|
+
export interface IState extends IDefaultAdmin {
|
|
4
|
+
sbaumId: string;
|
|
5
|
+
name: string;
|
|
6
|
+
abbreviation: string;
|
|
7
|
+
code: string;
|
|
8
|
+
countryName: string;
|
|
9
|
+
countryCode: string;
|
|
10
|
+
countryAbbreviation: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const StateSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
13
|
+
timestamps: {
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
};
|
|
17
|
+
}, {} & {
|
|
18
|
+
name: string;
|
|
19
|
+
code: string;
|
|
20
|
+
countryCode: string;
|
|
21
|
+
abbreviation: string;
|
|
22
|
+
countryName: string;
|
|
23
|
+
countryAbbreviation: string;
|
|
24
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
25
|
+
name: string;
|
|
26
|
+
code: string;
|
|
27
|
+
countryCode: string;
|
|
28
|
+
abbreviation: string;
|
|
29
|
+
countryName: string;
|
|
30
|
+
countryAbbreviation: string;
|
|
31
|
+
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
32
|
+
name: string;
|
|
33
|
+
code: string;
|
|
34
|
+
countryCode: string;
|
|
35
|
+
abbreviation: string;
|
|
36
|
+
countryName: string;
|
|
37
|
+
countryAbbreviation: string;
|
|
38
|
+
}> & {
|
|
39
|
+
_id: import("mongoose").Types.ObjectId;
|
|
40
|
+
} & {
|
|
41
|
+
__v: number;
|
|
42
|
+
}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StateSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
exports.StateSchema = new mongoose_1.Schema({
|
|
6
|
+
name: { type: String, required: true },
|
|
7
|
+
abbreviation: { type: String, required: true },
|
|
8
|
+
code: { type: String, required: true },
|
|
9
|
+
countryName: { type: String, required: true },
|
|
10
|
+
countryCode: { type: String, required: true },
|
|
11
|
+
countryAbbreviation: { type: String, required: true }
|
|
12
|
+
}, {
|
|
13
|
+
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
14
|
+
});
|
|
15
|
+
exports.StateSchema.index({ name: 1, countryCode: 1 }, { unique: true });
|
package/package.json
CHANGED