c2-clinical 1.0.155 → 1.0.162

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.
@@ -4,13 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const BuildTreeFlowItem_1 = __importDefault(require("./item/BuildTreeFlowItem"));
7
+ const GetEnablesFormUnitsFlowItem_1 = __importDefault(require("./item/GetEnablesFormUnitsFlowItem"));
7
8
  class GroupFormUnitsFlow {
8
9
  execute(formUnits, allQuestions) {
9
- // const questionsEnableds = GetEnablesFormUnitsFlowItem.execute(
10
- // formUnits,
11
- // allQuestions ?? formUnits
12
- // );
13
- const questionsWithOrganizedChilds = BuildTreeFlowItem_1.default.execute(formUnits);
10
+ const questionsEnableds = GetEnablesFormUnitsFlowItem_1.default.execute(formUnits, allQuestions ?? formUnits);
11
+ const questionsWithOrganizedChilds = BuildTreeFlowItem_1.default.execute(questionsEnableds);
14
12
  return questionsWithOrganizedChilds;
15
13
  }
16
14
  }
@@ -31,8 +31,8 @@ class ProcessAnswerFlowTester {
31
31
  relationed.description = ExecFormulaFlowTester_1.default.execute(relationed.formulaToDescription, allQuestionsAnswereds, attendanceMetActivities);
32
32
  }
33
33
  // formulaToEnable
34
- if (relationed.formulaToEnable) {
35
- relationed.enable = ExecFormulaFlowTester_1.default.execute(relationed.formulaToEnable, allQuestionsAnswereds, attendanceMetActivities);
34
+ if (relationed.formulaToShow) {
35
+ relationed.show = ExecFormulaFlowTester_1.default.execute(relationed.formulaToShow, allQuestionsAnswereds, attendanceMetActivities);
36
36
  }
37
37
  // formulaToReferenceValue
38
38
  if (relationed?.formulaToReferenceValue) {
@@ -77,6 +77,7 @@ export interface IFormUnit extends IDefault {
77
77
  formulaToEnable: string;
78
78
  enable: boolean;
79
79
  validations: IValidationQuestion[];
80
+ formulaToShow: string;
80
81
  active: boolean;
81
82
  show: boolean;
82
83
  readOnly: boolean;
@@ -247,6 +248,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
247
248
  image?: string | null | undefined;
248
249
  color?: string | null | undefined;
249
250
  }>;
251
+ formulaToShow: string;
250
252
  validations: Types.DocumentArray<{
251
253
  type: string;
252
254
  typeOutput: string;
@@ -404,6 +406,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
404
406
  image?: string | null | undefined;
405
407
  color?: string | null | undefined;
406
408
  }>;
409
+ formulaToShow: string;
407
410
  validations: Types.DocumentArray<{
408
411
  type: string;
409
412
  typeOutput: string;
@@ -561,6 +564,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
561
564
  image?: string | null | undefined;
562
565
  color?: string | null | undefined;
563
566
  }>;
567
+ formulaToShow: string;
564
568
  validations: Types.DocumentArray<{
565
569
  type: string;
566
570
  typeOutput: string;
@@ -60,6 +60,7 @@ exports.FormUnitSchema = new mongoose_1.Schema({
60
60
  formulaToClassificationLabel: { type: String },
61
61
  formulaToClassificationColor: { type: String },
62
62
  formulaToEnable: { type: String, default: "true" },
63
+ formulaToShow: { type: String, default: "true" },
63
64
  validations: { type: [exports.ValidationSchema] },
64
65
  active: { type: Boolean, required: true, default: true }, //perguntas que nao serão consideradas ao realizar qualquer operacao
65
66
  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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-clinical",
3
- "version": "1.0.155",
3
+ "version": "1.0.162",
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>",