c2-clinical 1.0.94 → 1.0.96

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.
@@ -30,6 +30,15 @@ class ProcessAnswerFlow {
30
30
  if (relationed.reference?.formulaToClassificationColor) {
31
31
  relationed.classificationColor = ExecFormulaFlow_1.default.execute(relationed.reference.formulaToClassificationColor, allQuestionsAnswereds, attendanceMetActivities);
32
32
  }
33
+ // check options is enables
34
+ if (relationed.reference?.options?.length) {
35
+ relationed.reference.options
36
+ .filter((option) => option.formulaToEnable?.length > 0)
37
+ ?.forEach((option) => {
38
+ option.enable =
39
+ ExecFormulaFlow_1.default.execute(option.formulaToEnable, allQuestionsAnswereds, attendanceMetActivities) ?? false;
40
+ });
41
+ }
33
42
  });
34
43
  let questionsRelacionedsAnsweredsRet = [...autoAnswereds];
35
44
  for (const questionRelacionedAnswered of autoAnswereds) {
@@ -85,6 +85,7 @@ export interface IFormUnit extends IDefault {
85
85
  export interface IQuestionOption {
86
86
  sequence: number;
87
87
  formulaToEnable: string;
88
+ enable: boolean;
88
89
  code: string;
89
90
  description: string;
90
91
  defaultSelection: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-clinical",
3
- "version": "1.0.94",
3
+ "version": "1.0.96",
4
4
  "description": "Biblioteca Typescript para API NodeJS",
5
5
  "repository": "https://github.com/cabralsilva/c2-clinical.git",
6
6
  "author": "Daniel Cabral <cabralconsultoriaemsoftware@gmail.com>",