c2-clinical 1.0.187 → 1.0.190
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/__tests__/flow/on-answer/OnAnswerQuestionsFlowTester.test.js +622 -2049
- package/dist/models/anamnese/AnamneseAnswer.d.ts +18 -18
- package/dist/models/form/FormUnit.d.ts +36 -24
- package/dist/models/form/FormUnit.js +7 -4
- package/dist/models/qa/QAAnswer.d.ts +18 -18
- package/dist/models/qpc/QPCAnswer.d.ts +18 -18
- package/package.json +1 -1
|
@@ -40,19 +40,19 @@ export declare const AnamneseAnswerSchema: Schema<any, import("mongoose").Model<
|
|
|
40
40
|
isValid?: {} | null | undefined;
|
|
41
41
|
};
|
|
42
42
|
validations: Types.DocumentArray<{
|
|
43
|
-
type: string;
|
|
44
43
|
typeOutput: string;
|
|
45
|
-
|
|
44
|
+
type?: string | null | undefined;
|
|
45
|
+
formulaToMessage?: string | null | undefined;
|
|
46
46
|
message?: string | null | undefined;
|
|
47
47
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
48
|
-
type: string;
|
|
49
48
|
typeOutput: string;
|
|
50
|
-
|
|
49
|
+
type?: string | null | undefined;
|
|
50
|
+
formulaToMessage?: string | null | undefined;
|
|
51
51
|
message?: string | null | undefined;
|
|
52
52
|
}> & {
|
|
53
|
-
type: string;
|
|
54
53
|
typeOutput: string;
|
|
55
|
-
|
|
54
|
+
type?: string | null | undefined;
|
|
55
|
+
formulaToMessage?: string | null | undefined;
|
|
56
56
|
message?: string | null | undefined;
|
|
57
57
|
}>;
|
|
58
58
|
anamnese: {
|
|
@@ -116,19 +116,19 @@ export declare const AnamneseAnswerSchema: Schema<any, import("mongoose").Model<
|
|
|
116
116
|
isValid?: {} | null | undefined;
|
|
117
117
|
};
|
|
118
118
|
validations: Types.DocumentArray<{
|
|
119
|
-
type: string;
|
|
120
119
|
typeOutput: string;
|
|
121
|
-
|
|
120
|
+
type?: string | null | undefined;
|
|
121
|
+
formulaToMessage?: string | null | undefined;
|
|
122
122
|
message?: string | null | undefined;
|
|
123
123
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
124
|
-
type: string;
|
|
125
124
|
typeOutput: string;
|
|
126
|
-
|
|
125
|
+
type?: string | null | undefined;
|
|
126
|
+
formulaToMessage?: string | null | undefined;
|
|
127
127
|
message?: string | null | undefined;
|
|
128
128
|
}> & {
|
|
129
|
-
type: string;
|
|
130
129
|
typeOutput: string;
|
|
131
|
-
|
|
130
|
+
type?: string | null | undefined;
|
|
131
|
+
formulaToMessage?: string | null | undefined;
|
|
132
132
|
message?: string | null | undefined;
|
|
133
133
|
}>;
|
|
134
134
|
anamnese: {
|
|
@@ -192,19 +192,19 @@ export declare const AnamneseAnswerSchema: Schema<any, import("mongoose").Model<
|
|
|
192
192
|
isValid?: {} | null | undefined;
|
|
193
193
|
};
|
|
194
194
|
validations: Types.DocumentArray<{
|
|
195
|
-
type: string;
|
|
196
195
|
typeOutput: string;
|
|
197
|
-
|
|
196
|
+
type?: string | null | undefined;
|
|
197
|
+
formulaToMessage?: string | null | undefined;
|
|
198
198
|
message?: string | null | undefined;
|
|
199
199
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
200
|
-
type: string;
|
|
201
200
|
typeOutput: string;
|
|
202
|
-
|
|
201
|
+
type?: string | null | undefined;
|
|
202
|
+
formulaToMessage?: string | null | undefined;
|
|
203
203
|
message?: string | null | undefined;
|
|
204
204
|
}> & {
|
|
205
|
-
type: string;
|
|
206
205
|
typeOutput: string;
|
|
207
|
-
|
|
206
|
+
type?: string | null | undefined;
|
|
207
|
+
formulaToMessage?: string | null | undefined;
|
|
208
208
|
message?: string | null | undefined;
|
|
209
209
|
}>;
|
|
210
210
|
anamnese: {
|
|
@@ -18,6 +18,8 @@ export interface IGroupConfig {
|
|
|
18
18
|
show: boolean;
|
|
19
19
|
description: string;
|
|
20
20
|
};
|
|
21
|
+
collapsible: boolean;
|
|
22
|
+
readOnly: boolean;
|
|
21
23
|
}
|
|
22
24
|
export interface ITip {
|
|
23
25
|
type: TypeTipEnum;
|
|
@@ -103,6 +105,7 @@ export interface IFormUnit extends IDefault {
|
|
|
103
105
|
};
|
|
104
106
|
screenPlacement: number;
|
|
105
107
|
lineId?: string;
|
|
108
|
+
helper?: string;
|
|
106
109
|
}
|
|
107
110
|
export interface IQuestionOption {
|
|
108
111
|
sequence: number;
|
|
@@ -210,19 +213,19 @@ export declare const QuestionOptionSchema: Schema<any, import("mongoose").Model<
|
|
|
210
213
|
export declare const ValidationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
211
214
|
_id: false;
|
|
212
215
|
}, {
|
|
213
|
-
type: string;
|
|
214
216
|
typeOutput: string;
|
|
215
|
-
|
|
217
|
+
type?: string | null | undefined;
|
|
218
|
+
formulaToMessage?: string | null | undefined;
|
|
216
219
|
message?: string | null | undefined;
|
|
217
220
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
218
|
-
type: string;
|
|
219
221
|
typeOutput: string;
|
|
220
|
-
|
|
222
|
+
type?: string | null | undefined;
|
|
223
|
+
formulaToMessage?: string | null | undefined;
|
|
221
224
|
message?: string | null | undefined;
|
|
222
225
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
223
|
-
type: string;
|
|
224
226
|
typeOutput: string;
|
|
225
|
-
|
|
227
|
+
type?: string | null | undefined;
|
|
228
|
+
formulaToMessage?: string | null | undefined;
|
|
226
229
|
message?: string | null | undefined;
|
|
227
230
|
}> & {
|
|
228
231
|
_id: Types.ObjectId;
|
|
@@ -277,19 +280,19 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
277
280
|
}>;
|
|
278
281
|
formulaToShow: string;
|
|
279
282
|
validations: Types.DocumentArray<{
|
|
280
|
-
type: string;
|
|
281
283
|
typeOutput: string;
|
|
282
|
-
|
|
284
|
+
type?: string | null | undefined;
|
|
285
|
+
formulaToMessage?: string | null | undefined;
|
|
283
286
|
message?: string | null | undefined;
|
|
284
287
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
285
|
-
type: string;
|
|
286
288
|
typeOutput: string;
|
|
287
|
-
|
|
289
|
+
type?: string | null | undefined;
|
|
290
|
+
formulaToMessage?: string | null | undefined;
|
|
288
291
|
message?: string | null | undefined;
|
|
289
292
|
}> & {
|
|
290
|
-
type: string;
|
|
291
293
|
typeOutput: string;
|
|
292
|
-
|
|
294
|
+
type?: string | null | undefined;
|
|
295
|
+
formulaToMessage?: string | null | undefined;
|
|
293
296
|
message?: string | null | undefined;
|
|
294
297
|
}>;
|
|
295
298
|
show: boolean;
|
|
@@ -345,6 +348,8 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
345
348
|
labelButtonConfirm?: string | null | undefined;
|
|
346
349
|
} | null | undefined;
|
|
347
350
|
groupConfig?: {
|
|
351
|
+
readOnly: boolean;
|
|
352
|
+
collapsible: boolean;
|
|
348
353
|
tips?: {
|
|
349
354
|
description: string;
|
|
350
355
|
show: boolean;
|
|
@@ -377,6 +382,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
377
382
|
maxSizeInBytes: number;
|
|
378
383
|
thumbExample?: string | null | undefined;
|
|
379
384
|
} | null | undefined;
|
|
385
|
+
helper?: string | null | undefined;
|
|
380
386
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
381
387
|
type: string;
|
|
382
388
|
required: boolean;
|
|
@@ -420,19 +426,19 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
420
426
|
}>;
|
|
421
427
|
formulaToShow: string;
|
|
422
428
|
validations: Types.DocumentArray<{
|
|
423
|
-
type: string;
|
|
424
429
|
typeOutput: string;
|
|
425
|
-
|
|
430
|
+
type?: string | null | undefined;
|
|
431
|
+
formulaToMessage?: string | null | undefined;
|
|
426
432
|
message?: string | null | undefined;
|
|
427
433
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
428
|
-
type: string;
|
|
429
434
|
typeOutput: string;
|
|
430
|
-
|
|
435
|
+
type?: string | null | undefined;
|
|
436
|
+
formulaToMessage?: string | null | undefined;
|
|
431
437
|
message?: string | null | undefined;
|
|
432
438
|
}> & {
|
|
433
|
-
type: string;
|
|
434
439
|
typeOutput: string;
|
|
435
|
-
|
|
440
|
+
type?: string | null | undefined;
|
|
441
|
+
formulaToMessage?: string | null | undefined;
|
|
436
442
|
message?: string | null | undefined;
|
|
437
443
|
}>;
|
|
438
444
|
show: boolean;
|
|
@@ -488,6 +494,8 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
488
494
|
labelButtonConfirm?: string | null | undefined;
|
|
489
495
|
} | null | undefined;
|
|
490
496
|
groupConfig?: {
|
|
497
|
+
readOnly: boolean;
|
|
498
|
+
collapsible: boolean;
|
|
491
499
|
tips?: {
|
|
492
500
|
description: string;
|
|
493
501
|
show: boolean;
|
|
@@ -520,6 +528,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
520
528
|
maxSizeInBytes: number;
|
|
521
529
|
thumbExample?: string | null | undefined;
|
|
522
530
|
} | null | undefined;
|
|
531
|
+
helper?: string | null | undefined;
|
|
523
532
|
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
524
533
|
type: string;
|
|
525
534
|
required: boolean;
|
|
@@ -563,19 +572,19 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
563
572
|
}>;
|
|
564
573
|
formulaToShow: string;
|
|
565
574
|
validations: Types.DocumentArray<{
|
|
566
|
-
type: string;
|
|
567
575
|
typeOutput: string;
|
|
568
|
-
|
|
576
|
+
type?: string | null | undefined;
|
|
577
|
+
formulaToMessage?: string | null | undefined;
|
|
569
578
|
message?: string | null | undefined;
|
|
570
579
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
571
|
-
type: string;
|
|
572
580
|
typeOutput: string;
|
|
573
|
-
|
|
581
|
+
type?: string | null | undefined;
|
|
582
|
+
formulaToMessage?: string | null | undefined;
|
|
574
583
|
message?: string | null | undefined;
|
|
575
584
|
}> & {
|
|
576
|
-
type: string;
|
|
577
585
|
typeOutput: string;
|
|
578
|
-
|
|
586
|
+
type?: string | null | undefined;
|
|
587
|
+
formulaToMessage?: string | null | undefined;
|
|
579
588
|
message?: string | null | undefined;
|
|
580
589
|
}>;
|
|
581
590
|
show: boolean;
|
|
@@ -631,6 +640,8 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
631
640
|
labelButtonConfirm?: string | null | undefined;
|
|
632
641
|
} | null | undefined;
|
|
633
642
|
groupConfig?: {
|
|
643
|
+
readOnly: boolean;
|
|
644
|
+
collapsible: boolean;
|
|
634
645
|
tips?: {
|
|
635
646
|
description: string;
|
|
636
647
|
show: boolean;
|
|
@@ -663,6 +674,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
663
674
|
maxSizeInBytes: number;
|
|
664
675
|
thumbExample?: string | null | undefined;
|
|
665
676
|
} | null | undefined;
|
|
677
|
+
helper?: string | null | undefined;
|
|
666
678
|
}> & {
|
|
667
679
|
_id: Types.ObjectId;
|
|
668
680
|
} & {
|
|
@@ -23,13 +23,13 @@ exports.QuestionOptionSchema = new mongoose_1.Schema({
|
|
|
23
23
|
active: { type: Boolean, required: true, default: true }
|
|
24
24
|
}, { _id: false });
|
|
25
25
|
exports.ValidationSchema = new mongoose_1.Schema({
|
|
26
|
-
type: { type: String, enum: enum_1.TypeValidationEnum
|
|
26
|
+
type: { type: String, enum: enum_1.TypeValidationEnum },
|
|
27
27
|
typeOutput: {
|
|
28
28
|
type: String,
|
|
29
29
|
enum: enum_1.TypeOutputValidationEnum,
|
|
30
30
|
default: enum_1.TypeOutputValidationEnum.TEXT
|
|
31
31
|
},
|
|
32
|
-
formulaToMessage: { type: String
|
|
32
|
+
formulaToMessage: { type: String },
|
|
33
33
|
message: { type: String }
|
|
34
34
|
}, { _id: false });
|
|
35
35
|
exports.FormUnitSchema = new mongoose_1.Schema({
|
|
@@ -96,7 +96,9 @@ exports.FormUnitSchema = new mongoose_1.Schema({
|
|
|
96
96
|
show: { type: Boolean, default: true },
|
|
97
97
|
description: { type: String, default: "Habilitar dicas" }
|
|
98
98
|
}
|
|
99
|
-
}
|
|
99
|
+
},
|
|
100
|
+
collapsible: { type: Boolean, default: false },
|
|
101
|
+
readOnly: { type: Boolean, default: false }
|
|
100
102
|
},
|
|
101
103
|
_id: false
|
|
102
104
|
},
|
|
@@ -138,7 +140,8 @@ exports.FormUnitSchema = new mongoose_1.Schema({
|
|
|
138
140
|
}
|
|
139
141
|
],
|
|
140
142
|
_id: false
|
|
141
|
-
}
|
|
143
|
+
},
|
|
144
|
+
helper: { type: String }
|
|
142
145
|
}, {
|
|
143
146
|
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
144
147
|
});
|
|
@@ -40,19 +40,19 @@ export declare const QAAnswerSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
40
40
|
isValid?: {} | null | undefined;
|
|
41
41
|
};
|
|
42
42
|
validations: Types.DocumentArray<{
|
|
43
|
-
type: string;
|
|
44
43
|
typeOutput: string;
|
|
45
|
-
|
|
44
|
+
type?: string | null | undefined;
|
|
45
|
+
formulaToMessage?: string | null | undefined;
|
|
46
46
|
message?: string | null | undefined;
|
|
47
47
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
48
|
-
type: string;
|
|
49
48
|
typeOutput: string;
|
|
50
|
-
|
|
49
|
+
type?: string | null | undefined;
|
|
50
|
+
formulaToMessage?: string | null | undefined;
|
|
51
51
|
message?: string | null | undefined;
|
|
52
52
|
}> & {
|
|
53
|
-
type: string;
|
|
54
53
|
typeOutput: string;
|
|
55
|
-
|
|
54
|
+
type?: string | null | undefined;
|
|
55
|
+
formulaToMessage?: string | null | undefined;
|
|
56
56
|
message?: string | null | undefined;
|
|
57
57
|
}>;
|
|
58
58
|
requestGraphicData: Types.DocumentArray<{
|
|
@@ -116,19 +116,19 @@ export declare const QAAnswerSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
116
116
|
isValid?: {} | null | undefined;
|
|
117
117
|
};
|
|
118
118
|
validations: Types.DocumentArray<{
|
|
119
|
-
type: string;
|
|
120
119
|
typeOutput: string;
|
|
121
|
-
|
|
120
|
+
type?: string | null | undefined;
|
|
121
|
+
formulaToMessage?: string | null | undefined;
|
|
122
122
|
message?: string | null | undefined;
|
|
123
123
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
124
|
-
type: string;
|
|
125
124
|
typeOutput: string;
|
|
126
|
-
|
|
125
|
+
type?: string | null | undefined;
|
|
126
|
+
formulaToMessage?: string | null | undefined;
|
|
127
127
|
message?: string | null | undefined;
|
|
128
128
|
}> & {
|
|
129
|
-
type: string;
|
|
130
129
|
typeOutput: string;
|
|
131
|
-
|
|
130
|
+
type?: string | null | undefined;
|
|
131
|
+
formulaToMessage?: string | null | undefined;
|
|
132
132
|
message?: string | null | undefined;
|
|
133
133
|
}>;
|
|
134
134
|
requestGraphicData: Types.DocumentArray<{
|
|
@@ -192,19 +192,19 @@ export declare const QAAnswerSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
192
192
|
isValid?: {} | null | undefined;
|
|
193
193
|
};
|
|
194
194
|
validations: Types.DocumentArray<{
|
|
195
|
-
type: string;
|
|
196
195
|
typeOutput: string;
|
|
197
|
-
|
|
196
|
+
type?: string | null | undefined;
|
|
197
|
+
formulaToMessage?: string | null | undefined;
|
|
198
198
|
message?: string | null | undefined;
|
|
199
199
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
200
|
-
type: string;
|
|
201
200
|
typeOutput: string;
|
|
202
|
-
|
|
201
|
+
type?: string | null | undefined;
|
|
202
|
+
formulaToMessage?: string | null | undefined;
|
|
203
203
|
message?: string | null | undefined;
|
|
204
204
|
}> & {
|
|
205
|
-
type: string;
|
|
206
205
|
typeOutput: string;
|
|
207
|
-
|
|
206
|
+
type?: string | null | undefined;
|
|
207
|
+
formulaToMessage?: string | null | undefined;
|
|
208
208
|
message?: string | null | undefined;
|
|
209
209
|
}>;
|
|
210
210
|
requestGraphicData: Types.DocumentArray<{
|
|
@@ -29,19 +29,19 @@ export declare const QPCAnswerSchema: Schema<any, import("mongoose").Model<any,
|
|
|
29
29
|
isValid?: {} | null | undefined;
|
|
30
30
|
};
|
|
31
31
|
validations: Types.DocumentArray<{
|
|
32
|
-
type: string;
|
|
33
32
|
typeOutput: string;
|
|
34
|
-
|
|
33
|
+
type?: string | null | undefined;
|
|
34
|
+
formulaToMessage?: string | null | undefined;
|
|
35
35
|
message?: string | null | undefined;
|
|
36
36
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
37
|
-
type: string;
|
|
38
37
|
typeOutput: string;
|
|
39
|
-
|
|
38
|
+
type?: string | null | undefined;
|
|
39
|
+
formulaToMessage?: string | null | undefined;
|
|
40
40
|
message?: string | null | undefined;
|
|
41
41
|
}> & {
|
|
42
|
-
type: string;
|
|
43
42
|
typeOutput: string;
|
|
44
|
-
|
|
43
|
+
type?: string | null | undefined;
|
|
44
|
+
formulaToMessage?: string | null | undefined;
|
|
45
45
|
message?: string | null | undefined;
|
|
46
46
|
}>;
|
|
47
47
|
requestGraphicData: Types.DocumentArray<{
|
|
@@ -96,19 +96,19 @@ export declare const QPCAnswerSchema: Schema<any, import("mongoose").Model<any,
|
|
|
96
96
|
isValid?: {} | null | undefined;
|
|
97
97
|
};
|
|
98
98
|
validations: Types.DocumentArray<{
|
|
99
|
-
type: string;
|
|
100
99
|
typeOutput: string;
|
|
101
|
-
|
|
100
|
+
type?: string | null | undefined;
|
|
101
|
+
formulaToMessage?: string | null | undefined;
|
|
102
102
|
message?: string | null | undefined;
|
|
103
103
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
104
|
-
type: string;
|
|
105
104
|
typeOutput: string;
|
|
106
|
-
|
|
105
|
+
type?: string | null | undefined;
|
|
106
|
+
formulaToMessage?: string | null | undefined;
|
|
107
107
|
message?: string | null | undefined;
|
|
108
108
|
}> & {
|
|
109
|
-
type: string;
|
|
110
109
|
typeOutput: string;
|
|
111
|
-
|
|
110
|
+
type?: string | null | undefined;
|
|
111
|
+
formulaToMessage?: string | null | undefined;
|
|
112
112
|
message?: string | null | undefined;
|
|
113
113
|
}>;
|
|
114
114
|
requestGraphicData: Types.DocumentArray<{
|
|
@@ -163,19 +163,19 @@ export declare const QPCAnswerSchema: Schema<any, import("mongoose").Model<any,
|
|
|
163
163
|
isValid?: {} | null | undefined;
|
|
164
164
|
};
|
|
165
165
|
validations: Types.DocumentArray<{
|
|
166
|
-
type: string;
|
|
167
166
|
typeOutput: string;
|
|
168
|
-
|
|
167
|
+
type?: string | null | undefined;
|
|
168
|
+
formulaToMessage?: string | null | undefined;
|
|
169
169
|
message?: string | null | undefined;
|
|
170
170
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
171
|
-
type: string;
|
|
172
171
|
typeOutput: string;
|
|
173
|
-
|
|
172
|
+
type?: string | null | undefined;
|
|
173
|
+
formulaToMessage?: string | null | undefined;
|
|
174
174
|
message?: string | null | undefined;
|
|
175
175
|
}> & {
|
|
176
|
-
type: string;
|
|
177
176
|
typeOutput: string;
|
|
178
|
-
|
|
177
|
+
type?: string | null | undefined;
|
|
178
|
+
formulaToMessage?: string | null | undefined;
|
|
179
179
|
message?: string | null | undefined;
|
|
180
180
|
}>;
|
|
181
181
|
requestGraphicData: Types.DocumentArray<{
|