c2-clinical 1.0.149 → 1.0.150

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.
@@ -36,6 +36,9 @@ class BuildTreeFlowItem {
36
36
  return lines;
37
37
  }
38
38
  const rootFormUnit = questions.filter((q) => !q.parent);
39
+ if (!rootFormUnit?.length) {
40
+ return buildRows({ parent: undefined, children: questions });
41
+ }
39
42
  return buildRows({ parent: undefined, children: rootFormUnit });
40
43
  }
41
44
  }
@@ -8,12 +8,15 @@ const GetAnswerRelationedsFlowItemTester_1 = __importDefault(require("./item/Get
8
8
  class ProcessAnswerFlowTester {
9
9
  execute(questionAnswered, bankAnswer, attendanceMetActivities) {
10
10
  if (questionAnswered.code === "CURRENT_IMC_TABLE_RESULT") {
11
- console.log("debug");
11
+ // console.log("debug");
12
12
  }
13
13
  const answerRelacioneds = GetAnswerRelationedsFlowItemTester_1.default.execute(questionAnswered, bankAnswer);
14
14
  const autoAnswereds = [];
15
15
  const allQuestionsAnswereds = bankAnswer?.filter((q) => q.answer !== "" && q.answer !== undefined);
16
16
  answerRelacioneds.forEach((relationed) => {
17
+ if (questionAnswered.code === "IMC") {
18
+ // console.log("debug");
19
+ }
17
20
  //executa fórmula para answer
18
21
  if (relationed.code !== questionAnswered.code && relationed.formulaToAnswer) {
19
22
  const answerCalculated = ExecFormulaFlowTester_1.default.execute(relationed.formulaToAnswer, allQuestionsAnswereds, attendanceMetActivities);
@@ -5,7 +5,7 @@ class GetAnswerRelationedsFlowItemTester {
5
5
  const regex = new RegExp(`\\$\{${questionAnswered.code}\}`, "i");
6
6
  const questionsRelationeds = bankAnswer?.filter((fu) => {
7
7
  if (fu.code === "CURRENT_HEIGHT_TABLE_RESULT") {
8
- console.log("debug");
8
+ // console.log("debug");
9
9
  }
10
10
  return (regex.test(fu.formulaToAnswer) ||
11
11
  regex.test(fu.formulaToReferenceValue) ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-clinical",
3
- "version": "1.0.149",
3
+ "version": "1.0.150",
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>",