c2-clinical 1.0.5 → 1.0.7
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.
|
@@ -16,7 +16,9 @@ export declare enum TypeFormUnitEnum {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare enum TypeAnswerEnum {
|
|
18
18
|
CHOICE_SINGLE = "CHOICE_SINGLE",
|
|
19
|
+
CHOICE_SINGLE_WITH_OTHER = "CHOICE_SINGLE_WITH_OTHER",
|
|
19
20
|
CHOICE_MULTIPLE = "CHOICE_MULTIPLE",
|
|
21
|
+
CHOICE_MULTIPLE_WITH_OTHER = "CHOICE_MULTIPLE_WITH_OTHER",
|
|
20
22
|
OPEN_TEXT = "OPEN_TEXT",
|
|
21
23
|
OPEN_TEXT_AREA = "OPEN_TEXT_AREA",
|
|
22
24
|
OPEN_TEXT_AREA_ADVANCED = "OPEN_TEXT_AREA_ADVANCED",// modelo WORD
|
|
@@ -34,7 +36,6 @@ export declare enum TypeAnswerEnum {
|
|
|
34
36
|
export declare enum TypeValidationEnum {
|
|
35
37
|
TIP = "TIP",
|
|
36
38
|
WARNING = "WARNING",
|
|
37
|
-
REQUIRED = "REQUIRED",
|
|
38
39
|
VALIDATION = "VALIDATION"
|
|
39
40
|
}
|
|
40
41
|
export declare enum TypeOutputValidationEnum {
|
|
@@ -96,7 +97,11 @@ export interface IQuestionOption {
|
|
|
96
97
|
formulaToEnable: string;
|
|
97
98
|
code: string;
|
|
98
99
|
description: string;
|
|
100
|
+
defaultSelection: boolean;
|
|
99
101
|
active: boolean;
|
|
102
|
+
thumb: string;
|
|
103
|
+
image: string;
|
|
104
|
+
color: string;
|
|
100
105
|
}
|
|
101
106
|
export interface IRequestGraphicData {
|
|
102
107
|
method: string;
|
|
@@ -132,20 +137,51 @@ export declare const QuestionOptionSchema: Schema<any, import("mongoose").Model<
|
|
|
132
137
|
description: string;
|
|
133
138
|
sequence: number;
|
|
134
139
|
code: string;
|
|
140
|
+
defaultSelection: any;
|
|
135
141
|
active: any;
|
|
136
142
|
formulaToEnable?: string | null | undefined;
|
|
143
|
+
thumb?: string | null | undefined;
|
|
144
|
+
image?: string | null | undefined;
|
|
145
|
+
color?: string | null | undefined;
|
|
137
146
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
138
147
|
description: string;
|
|
139
148
|
sequence: number;
|
|
140
149
|
code: string;
|
|
150
|
+
defaultSelection: any;
|
|
141
151
|
active: any;
|
|
142
152
|
formulaToEnable?: string | null | undefined;
|
|
153
|
+
thumb?: string | null | undefined;
|
|
154
|
+
image?: string | null | undefined;
|
|
155
|
+
color?: string | null | undefined;
|
|
143
156
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
144
157
|
description: string;
|
|
145
158
|
sequence: number;
|
|
146
159
|
code: string;
|
|
160
|
+
defaultSelection: any;
|
|
147
161
|
active: any;
|
|
148
162
|
formulaToEnable?: string | null | undefined;
|
|
163
|
+
thumb?: string | null | undefined;
|
|
164
|
+
image?: string | null | undefined;
|
|
165
|
+
color?: string | null | undefined;
|
|
166
|
+
}> & {
|
|
167
|
+
_id: Types.ObjectId;
|
|
168
|
+
} & {
|
|
169
|
+
__v: number;
|
|
170
|
+
}>;
|
|
171
|
+
export declare const ValidationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
172
|
+
_id: false;
|
|
173
|
+
}, {
|
|
174
|
+
type: string;
|
|
175
|
+
typeOutput: string;
|
|
176
|
+
formulaToMessage: string;
|
|
177
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
178
|
+
type: string;
|
|
179
|
+
typeOutput: string;
|
|
180
|
+
formulaToMessage: string;
|
|
181
|
+
}>, {}> & import("mongoose").FlatRecord<{
|
|
182
|
+
type: string;
|
|
183
|
+
typeOutput: string;
|
|
184
|
+
formulaToMessage: string;
|
|
149
185
|
}> & {
|
|
150
186
|
_id: Types.ObjectId;
|
|
151
187
|
} & {
|
|
@@ -161,6 +197,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
161
197
|
required: any;
|
|
162
198
|
category: string;
|
|
163
199
|
sequence: number;
|
|
200
|
+
formulaToEnable: string;
|
|
164
201
|
code: string;
|
|
165
202
|
active: any;
|
|
166
203
|
form: any;
|
|
@@ -168,20 +205,32 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
168
205
|
description: string;
|
|
169
206
|
sequence: number;
|
|
170
207
|
code: string;
|
|
208
|
+
defaultSelection: any;
|
|
171
209
|
active: any;
|
|
172
210
|
formulaToEnable?: string | null | undefined;
|
|
211
|
+
thumb?: string | null | undefined;
|
|
212
|
+
image?: string | null | undefined;
|
|
213
|
+
color?: string | null | undefined;
|
|
173
214
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
174
215
|
description: string;
|
|
175
216
|
sequence: number;
|
|
176
217
|
code: string;
|
|
218
|
+
defaultSelection: any;
|
|
177
219
|
active: any;
|
|
178
220
|
formulaToEnable?: string | null | undefined;
|
|
221
|
+
thumb?: string | null | undefined;
|
|
222
|
+
image?: string | null | undefined;
|
|
223
|
+
color?: string | null | undefined;
|
|
179
224
|
}> & {
|
|
180
225
|
description: string;
|
|
181
226
|
sequence: number;
|
|
182
227
|
code: string;
|
|
228
|
+
defaultSelection: any;
|
|
183
229
|
active: any;
|
|
184
230
|
formulaToEnable?: string | null | undefined;
|
|
231
|
+
thumb?: string | null | undefined;
|
|
232
|
+
image?: string | null | undefined;
|
|
233
|
+
color?: string | null | undefined;
|
|
185
234
|
}>;
|
|
186
235
|
validations: Types.DocumentArray<{
|
|
187
236
|
type: string;
|
|
@@ -216,7 +265,6 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
216
265
|
}>;
|
|
217
266
|
description?: string | null | undefined;
|
|
218
267
|
account?: any;
|
|
219
|
-
formulaToEnable?: string | null | undefined;
|
|
220
268
|
reference?: any;
|
|
221
269
|
parent?: any;
|
|
222
270
|
line?: number | null | undefined;
|
|
@@ -230,6 +278,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
230
278
|
required: any;
|
|
231
279
|
category: string;
|
|
232
280
|
sequence: number;
|
|
281
|
+
formulaToEnable: string;
|
|
233
282
|
code: string;
|
|
234
283
|
active: any;
|
|
235
284
|
form: any;
|
|
@@ -237,20 +286,32 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
237
286
|
description: string;
|
|
238
287
|
sequence: number;
|
|
239
288
|
code: string;
|
|
289
|
+
defaultSelection: any;
|
|
240
290
|
active: any;
|
|
241
291
|
formulaToEnable?: string | null | undefined;
|
|
292
|
+
thumb?: string | null | undefined;
|
|
293
|
+
image?: string | null | undefined;
|
|
294
|
+
color?: string | null | undefined;
|
|
242
295
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
243
296
|
description: string;
|
|
244
297
|
sequence: number;
|
|
245
298
|
code: string;
|
|
299
|
+
defaultSelection: any;
|
|
246
300
|
active: any;
|
|
247
301
|
formulaToEnable?: string | null | undefined;
|
|
302
|
+
thumb?: string | null | undefined;
|
|
303
|
+
image?: string | null | undefined;
|
|
304
|
+
color?: string | null | undefined;
|
|
248
305
|
}> & {
|
|
249
306
|
description: string;
|
|
250
307
|
sequence: number;
|
|
251
308
|
code: string;
|
|
309
|
+
defaultSelection: any;
|
|
252
310
|
active: any;
|
|
253
311
|
formulaToEnable?: string | null | undefined;
|
|
312
|
+
thumb?: string | null | undefined;
|
|
313
|
+
image?: string | null | undefined;
|
|
314
|
+
color?: string | null | undefined;
|
|
254
315
|
}>;
|
|
255
316
|
validations: Types.DocumentArray<{
|
|
256
317
|
type: string;
|
|
@@ -285,7 +346,6 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
285
346
|
}>;
|
|
286
347
|
description?: string | null | undefined;
|
|
287
348
|
account?: any;
|
|
288
|
-
formulaToEnable?: string | null | undefined;
|
|
289
349
|
reference?: any;
|
|
290
350
|
parent?: any;
|
|
291
351
|
line?: number | null | undefined;
|
|
@@ -299,6 +359,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
299
359
|
required: any;
|
|
300
360
|
category: string;
|
|
301
361
|
sequence: number;
|
|
362
|
+
formulaToEnable: string;
|
|
302
363
|
code: string;
|
|
303
364
|
active: any;
|
|
304
365
|
form: any;
|
|
@@ -306,20 +367,32 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
306
367
|
description: string;
|
|
307
368
|
sequence: number;
|
|
308
369
|
code: string;
|
|
370
|
+
defaultSelection: any;
|
|
309
371
|
active: any;
|
|
310
372
|
formulaToEnable?: string | null | undefined;
|
|
373
|
+
thumb?: string | null | undefined;
|
|
374
|
+
image?: string | null | undefined;
|
|
375
|
+
color?: string | null | undefined;
|
|
311
376
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
312
377
|
description: string;
|
|
313
378
|
sequence: number;
|
|
314
379
|
code: string;
|
|
380
|
+
defaultSelection: any;
|
|
315
381
|
active: any;
|
|
316
382
|
formulaToEnable?: string | null | undefined;
|
|
383
|
+
thumb?: string | null | undefined;
|
|
384
|
+
image?: string | null | undefined;
|
|
385
|
+
color?: string | null | undefined;
|
|
317
386
|
}> & {
|
|
318
387
|
description: string;
|
|
319
388
|
sequence: number;
|
|
320
389
|
code: string;
|
|
390
|
+
defaultSelection: any;
|
|
321
391
|
active: any;
|
|
322
392
|
formulaToEnable?: string | null | undefined;
|
|
393
|
+
thumb?: string | null | undefined;
|
|
394
|
+
image?: string | null | undefined;
|
|
395
|
+
color?: string | null | undefined;
|
|
323
396
|
}>;
|
|
324
397
|
validations: Types.DocumentArray<{
|
|
325
398
|
type: string;
|
|
@@ -354,7 +427,6 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
354
427
|
}>;
|
|
355
428
|
description?: string | null | undefined;
|
|
356
429
|
account?: any;
|
|
357
|
-
formulaToEnable?: string | null | undefined;
|
|
358
430
|
reference?: any;
|
|
359
431
|
parent?: any;
|
|
360
432
|
line?: number | null | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FormUnitSchema = exports.QuestionOptionSchema = exports.RequestGraphicDataSchema = exports.TypeMessageEnum = exports.TypeOutputValidationEnum = exports.TypeValidationEnum = exports.TypeAnswerEnum = exports.TypeFormUnitEnum = void 0;
|
|
3
|
+
exports.FormUnitSchema = exports.ValidationSchema = exports.QuestionOptionSchema = exports.RequestGraphicDataSchema = exports.TypeMessageEnum = exports.TypeOutputValidationEnum = exports.TypeValidationEnum = exports.TypeAnswerEnum = exports.TypeFormUnitEnum = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const Form_1 = require("./Form");
|
|
6
6
|
/**
|
|
@@ -20,7 +20,9 @@ var TypeFormUnitEnum;
|
|
|
20
20
|
var TypeAnswerEnum;
|
|
21
21
|
(function (TypeAnswerEnum) {
|
|
22
22
|
TypeAnswerEnum["CHOICE_SINGLE"] = "CHOICE_SINGLE";
|
|
23
|
+
TypeAnswerEnum["CHOICE_SINGLE_WITH_OTHER"] = "CHOICE_SINGLE_WITH_OTHER";
|
|
23
24
|
TypeAnswerEnum["CHOICE_MULTIPLE"] = "CHOICE_MULTIPLE";
|
|
25
|
+
TypeAnswerEnum["CHOICE_MULTIPLE_WITH_OTHER"] = "CHOICE_MULTIPLE_WITH_OTHER";
|
|
24
26
|
TypeAnswerEnum["OPEN_TEXT"] = "OPEN_TEXT";
|
|
25
27
|
TypeAnswerEnum["OPEN_TEXT_AREA"] = "OPEN_TEXT_AREA";
|
|
26
28
|
TypeAnswerEnum["OPEN_TEXT_AREA_ADVANCED"] = "OPEN_TEXT_AREA_ADVANCED";
|
|
@@ -39,7 +41,6 @@ var TypeValidationEnum;
|
|
|
39
41
|
(function (TypeValidationEnum) {
|
|
40
42
|
TypeValidationEnum["TIP"] = "TIP";
|
|
41
43
|
TypeValidationEnum["WARNING"] = "WARNING";
|
|
42
|
-
TypeValidationEnum["REQUIRED"] = "REQUIRED";
|
|
43
44
|
TypeValidationEnum["VALIDATION"] = "VALIDATION";
|
|
44
45
|
})(TypeValidationEnum || (exports.TypeValidationEnum = TypeValidationEnum = {}));
|
|
45
46
|
var TypeOutputValidationEnum;
|
|
@@ -71,8 +72,21 @@ exports.QuestionOptionSchema = new mongoose_1.Schema({
|
|
|
71
72
|
formulaToEnable: { type: String },
|
|
72
73
|
code: { type: String, required: true },
|
|
73
74
|
description: { type: String, required: true },
|
|
75
|
+
defaultSelection: { type: Boolean, required: true, default: false },
|
|
76
|
+
thumb: { type: String },
|
|
77
|
+
image: { type: String },
|
|
78
|
+
color: { type: String },
|
|
74
79
|
active: { type: Boolean, required: true, default: true }
|
|
75
80
|
}, { _id: false });
|
|
81
|
+
exports.ValidationSchema = new mongoose_1.Schema({
|
|
82
|
+
type: { type: String, enum: TypeValidationEnum, required: true },
|
|
83
|
+
typeOutput: {
|
|
84
|
+
type: String,
|
|
85
|
+
enum: TypeOutputValidationEnum,
|
|
86
|
+
default: TypeOutputValidationEnum.TEXT
|
|
87
|
+
},
|
|
88
|
+
formulaToMessage: { type: String, required: true }
|
|
89
|
+
}, { _id: false });
|
|
76
90
|
exports.FormUnitSchema = new mongoose_1.Schema({
|
|
77
91
|
//account só é usado quando for montado por uma conta, quando for modelo disponível a todos ele deve estar sem preenchimento
|
|
78
92
|
account: { type: mongoose_1.Schema.Types.ObjectId, ref: "account" },
|
|
@@ -94,20 +108,8 @@ exports.FormUnitSchema = new mongoose_1.Schema({
|
|
|
94
108
|
measurementUnit: { type: String },
|
|
95
109
|
options: { type: [exports.QuestionOptionSchema] },
|
|
96
110
|
formulaToAnswer: { type: String },
|
|
97
|
-
formulaToEnable: { type: String },
|
|
98
|
-
validations: {
|
|
99
|
-
type: [
|
|
100
|
-
{
|
|
101
|
-
type: { type: String, enum: TypeValidationEnum, required: true },
|
|
102
|
-
typeOutput: {
|
|
103
|
-
type: String,
|
|
104
|
-
enum: TypeOutputValidationEnum,
|
|
105
|
-
default: TypeOutputValidationEnum.TEXT
|
|
106
|
-
},
|
|
107
|
-
formulaToMessage: { type: String, required: true }
|
|
108
|
-
}
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
+
formulaToEnable: { type: String, default: "true" },
|
|
112
|
+
validations: { type: [exports.ValidationSchema] },
|
|
111
113
|
active: { type: Boolean, required: true, default: true }, //perguntas que nao serão consideradas ao realizar qualquer operacao
|
|
112
114
|
show: { type: Boolean, required: true, default: true }, //determina se a pergunta é exibida nos formulario (IDADE EM DIAS POR EXEMPLO, perguntas necessárias para alguns calculos mas q nao fazem sentido exibi-las)
|
|
113
115
|
readOnly: { type: Boolean, default: false },
|
package/package.json
CHANGED