c2-clinical 1.0.207 → 1.0.209
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.
|
@@ -68,6 +68,13 @@ class ProcessAnswerFlowTester {
|
|
|
68
68
|
if (relationed?.graphicData?.formulaToDatasetsBackground) {
|
|
69
69
|
relationed.graphicData.datasetsBackground = ExecFormulaFlowTester_1.default.execute(relationed.graphicData.formulaToDatasetsBackground, allQuestionsAnswereds, attendanceMetActivities);
|
|
70
70
|
}
|
|
71
|
+
// formulaToLastsPoints para graphicData
|
|
72
|
+
if (relationed?.graphicData?.datasetPersonal?.length) {
|
|
73
|
+
relationed.graphicData.datasetPersonal.forEach((datasetPersonal) => {
|
|
74
|
+
datasetPersonal.lastsPoints =
|
|
75
|
+
ExecFormulaFlowTester_1.default.execute(datasetPersonal.formulaToLastsPoints, allQuestionsAnswereds, attendanceMetActivities) ?? [];
|
|
76
|
+
});
|
|
77
|
+
}
|
|
71
78
|
});
|
|
72
79
|
let questionsRelacionedsAnsweredsRet = [...autoAnswereds];
|
|
73
80
|
for (const questionRelacionedAnswered of autoAnswereds) {
|
|
@@ -15,6 +15,7 @@ class GetAnswerRelationedsFlowItemTester {
|
|
|
15
15
|
regex.test(fu.formulaToShow) ||
|
|
16
16
|
regex.test(fu.formulaToDescription) ||
|
|
17
17
|
regex.test(fu.graphicData?.formulaToDatasetsBackground) ||
|
|
18
|
+
fu.graphicData?.datasetPersonal?.some((datasetPersonal) => regex.test(datasetPersonal.formulaToLastsPoints)) ||
|
|
18
19
|
fu.validations?.some((v) => regex.test(v.formulaToMessage)) ||
|
|
19
20
|
fu.options?.some((v) => regex.test(v.formulaToEnable)));
|
|
20
21
|
});
|
|
@@ -63,7 +63,7 @@ export interface IFormUnit extends IDefault {
|
|
|
63
63
|
column: number;
|
|
64
64
|
type: TypeFormUnitEnum;
|
|
65
65
|
typeAnswer: TypeAnswerEnum;
|
|
66
|
-
defaultAnswer:
|
|
66
|
+
defaultAnswer: any;
|
|
67
67
|
category: CategoryFormEnum;
|
|
68
68
|
typeButtonAction: TypeButtonAction;
|
|
69
69
|
variantView: VariantViewEnum;
|
|
@@ -133,6 +133,9 @@ export interface IDatasetsPersonal {
|
|
|
133
133
|
[key: string]: any;
|
|
134
134
|
};
|
|
135
135
|
formulaToLastsPoints: string;
|
|
136
|
+
lastsPoints: {
|
|
137
|
+
[key: string]: any;
|
|
138
|
+
}[];
|
|
136
139
|
}
|
|
137
140
|
export interface IGraphicData {
|
|
138
141
|
config: any;
|
|
@@ -333,7 +336,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
333
336
|
line?: number | null | undefined;
|
|
334
337
|
column?: number | null | undefined;
|
|
335
338
|
typeAnswer?: string | null | undefined;
|
|
336
|
-
defaultAnswer?:
|
|
339
|
+
defaultAnswer?: any;
|
|
337
340
|
variantView?: string | null | undefined;
|
|
338
341
|
typeButtonAction?: string | null | undefined;
|
|
339
342
|
externalFlowCode?: string | null | undefined;
|
|
@@ -481,7 +484,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
481
484
|
line?: number | null | undefined;
|
|
482
485
|
column?: number | null | undefined;
|
|
483
486
|
typeAnswer?: string | null | undefined;
|
|
484
|
-
defaultAnswer?:
|
|
487
|
+
defaultAnswer?: any;
|
|
485
488
|
variantView?: string | null | undefined;
|
|
486
489
|
typeButtonAction?: string | null | undefined;
|
|
487
490
|
externalFlowCode?: string | null | undefined;
|
|
@@ -629,7 +632,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
629
632
|
line?: number | null | undefined;
|
|
630
633
|
column?: number | null | undefined;
|
|
631
634
|
typeAnswer?: string | null | undefined;
|
|
632
|
-
defaultAnswer?:
|
|
635
|
+
defaultAnswer?: any;
|
|
633
636
|
variantView?: string | null | undefined;
|
|
634
637
|
typeButtonAction?: string | null | undefined;
|
|
635
638
|
externalFlowCode?: string | null | undefined;
|
|
@@ -51,7 +51,7 @@ exports.FormUnitSchema = new mongoose_1.Schema({
|
|
|
51
51
|
required: true
|
|
52
52
|
},
|
|
53
53
|
typeAnswer: { type: String, enum: enum_1.TypeAnswerEnum },
|
|
54
|
-
defaultAnswer: { type:
|
|
54
|
+
defaultAnswer: { type: mongoose_1.Schema.Types.Mixed },
|
|
55
55
|
// PERGUNTAS DEFAULT SAO AS CALCULADAS COM BASE NO PERFIL DO PACIENTE E CALCULADAS AO CARREGAR O FORMULARIO
|
|
56
56
|
isDefault: { type: Boolean, default: false },
|
|
57
57
|
category: { type: String, enum: enum_1.CategoryFormEnum, required: true },
|