c2-clinical 1.0.132 → 1.0.134
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__/OnAnswerQuestionsFlowTester.test.js +577 -503
- package/dist/flow/on-answer/ProcessAnswerFlowTester.js +3 -0
- package/dist/models/anthropometry/Anthropometry.d.ts +4 -4
- package/dist/models/anthropometry/Anthropometry.js +1 -1
- package/dist/models/form/FormUnit.d.ts +10 -0
- package/dist/models/form/FormUnit.js +2 -1
- package/package.json +1 -1
|
@@ -7,6 +7,9 @@ const ExecFormulaFlowTester_1 = __importDefault(require("./ExecFormulaFlowTester
|
|
|
7
7
|
const GetAnswerRelationedsFlowItemTester_1 = __importDefault(require("./item/GetAnswerRelationedsFlowItemTester"));
|
|
8
8
|
class ProcessAnswerFlowTester {
|
|
9
9
|
execute(questionAnswered, bankAnswer, attendanceMetActivities) {
|
|
10
|
+
if (questionAnswered.code === "CURRENT_IMC_TABLE_RESULT") {
|
|
11
|
+
console.log("debug");
|
|
12
|
+
}
|
|
10
13
|
const answerRelacioneds = GetAnswerRelationedsFlowItemTester_1.default.execute(questionAnswered, bankAnswer);
|
|
11
14
|
const autoAnswereds = [];
|
|
12
15
|
const allQuestionsAnswereds = bankAnswer?.filter((q) => q.answer !== "" && q.answer !== undefined);
|
|
@@ -6,7 +6,7 @@ export interface IAnthropometry extends IDefault {
|
|
|
6
6
|
patient: Types.ObjectId | IPatient;
|
|
7
7
|
form: Types.ObjectId | IForm;
|
|
8
8
|
showingToPatient: boolean;
|
|
9
|
-
|
|
9
|
+
anthropometryDateTime: Date;
|
|
10
10
|
code: string;
|
|
11
11
|
}
|
|
12
12
|
export declare const AnthropometrySchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
@@ -44,7 +44,7 @@ export declare const AnthropometrySchema: Schema<any, import("mongoose").Model<a
|
|
|
44
44
|
};
|
|
45
45
|
showingToPatient: boolean;
|
|
46
46
|
code?: string | null | undefined;
|
|
47
|
-
|
|
47
|
+
anthropometryDateTime?: NativeDate | null | undefined;
|
|
48
48
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
49
49
|
account: {
|
|
50
50
|
prototype?: Types.ObjectId | null | undefined;
|
|
@@ -75,7 +75,7 @@ export declare const AnthropometrySchema: Schema<any, import("mongoose").Model<a
|
|
|
75
75
|
};
|
|
76
76
|
showingToPatient: boolean;
|
|
77
77
|
code?: string | null | undefined;
|
|
78
|
-
|
|
78
|
+
anthropometryDateTime?: NativeDate | null | undefined;
|
|
79
79
|
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
80
80
|
account: {
|
|
81
81
|
prototype?: Types.ObjectId | null | undefined;
|
|
@@ -106,7 +106,7 @@ export declare const AnthropometrySchema: Schema<any, import("mongoose").Model<a
|
|
|
106
106
|
};
|
|
107
107
|
showingToPatient: boolean;
|
|
108
108
|
code?: string | null | undefined;
|
|
109
|
-
|
|
109
|
+
anthropometryDateTime?: NativeDate | null | undefined;
|
|
110
110
|
}> & {
|
|
111
111
|
_id: Types.ObjectId;
|
|
112
112
|
} & {
|
|
@@ -7,7 +7,7 @@ exports.AnthropometrySchema = new mongoose_1.Schema({
|
|
|
7
7
|
patient: { type: mongoose_1.Types.ObjectId, ref: "patient", required: true },
|
|
8
8
|
form: { type: mongoose_1.Types.ObjectId, ref: "form", required: true },
|
|
9
9
|
showingToPatient: { type: Boolean, default: false },
|
|
10
|
-
|
|
10
|
+
anthropometryDateTime: { type: Date },
|
|
11
11
|
code: { type: String }
|
|
12
12
|
}, {
|
|
13
13
|
timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
|
|
@@ -96,6 +96,7 @@ export interface IFormUnit extends IDefault {
|
|
|
96
96
|
headerData: {
|
|
97
97
|
headerText: string;
|
|
98
98
|
fieldName: string;
|
|
99
|
+
fieldColor: string;
|
|
99
100
|
_id: Types.ObjectId;
|
|
100
101
|
}[];
|
|
101
102
|
};
|
|
@@ -341,16 +342,19 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
341
342
|
type?: {
|
|
342
343
|
headerText: string;
|
|
343
344
|
fieldName: string;
|
|
345
|
+
fieldColor?: string | null | undefined;
|
|
344
346
|
} | null | undefined;
|
|
345
347
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
346
348
|
type?: {
|
|
347
349
|
headerText: string;
|
|
348
350
|
fieldName: string;
|
|
351
|
+
fieldColor?: string | null | undefined;
|
|
349
352
|
} | null | undefined;
|
|
350
353
|
}> & {
|
|
351
354
|
type?: {
|
|
352
355
|
headerText: string;
|
|
353
356
|
fieldName: string;
|
|
357
|
+
fieldColor?: string | null | undefined;
|
|
354
358
|
} | null | undefined;
|
|
355
359
|
}>;
|
|
356
360
|
} | null | undefined;
|
|
@@ -495,16 +499,19 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
495
499
|
type?: {
|
|
496
500
|
headerText: string;
|
|
497
501
|
fieldName: string;
|
|
502
|
+
fieldColor?: string | null | undefined;
|
|
498
503
|
} | null | undefined;
|
|
499
504
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
500
505
|
type?: {
|
|
501
506
|
headerText: string;
|
|
502
507
|
fieldName: string;
|
|
508
|
+
fieldColor?: string | null | undefined;
|
|
503
509
|
} | null | undefined;
|
|
504
510
|
}> & {
|
|
505
511
|
type?: {
|
|
506
512
|
headerText: string;
|
|
507
513
|
fieldName: string;
|
|
514
|
+
fieldColor?: string | null | undefined;
|
|
508
515
|
} | null | undefined;
|
|
509
516
|
}>;
|
|
510
517
|
} | null | undefined;
|
|
@@ -649,16 +656,19 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
649
656
|
type?: {
|
|
650
657
|
headerText: string;
|
|
651
658
|
fieldName: string;
|
|
659
|
+
fieldColor?: string | null | undefined;
|
|
652
660
|
} | null | undefined;
|
|
653
661
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
654
662
|
type?: {
|
|
655
663
|
headerText: string;
|
|
656
664
|
fieldName: string;
|
|
665
|
+
fieldColor?: string | null | undefined;
|
|
657
666
|
} | null | undefined;
|
|
658
667
|
}> & {
|
|
659
668
|
type?: {
|
|
660
669
|
headerText: string;
|
|
661
670
|
fieldName: string;
|
|
671
|
+
fieldColor?: string | null | undefined;
|
|
662
672
|
} | null | undefined;
|
|
663
673
|
}>;
|
|
664
674
|
} | null | undefined;
|
|
@@ -103,7 +103,8 @@ exports.FormUnitSchema = new mongoose_1.Schema({
|
|
|
103
103
|
{
|
|
104
104
|
type: {
|
|
105
105
|
headerText: { type: String, required: true },
|
|
106
|
-
fieldName: { type: String, required: true }
|
|
106
|
+
fieldName: { type: String, required: true },
|
|
107
|
+
fieldColor: { type: String }
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
]
|
package/package.json
CHANGED