c2-clinical 1.0.111 → 1.0.113
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/flow/on-answer/OnAnswerQuestionsFlowTester.d.ts +5 -1
- package/dist/flow/on-answer/OnAnswerQuestionsFlowTester.js +10 -0
- package/dist/flow/on-answer/ProcessAnswerFlowTester.d.ts +1 -2
- package/dist/flow/on-answer/ProcessAnswerFlowTester.js +0 -5
- package/dist/models/form/FormUnit.d.ts +1 -0
- package/dist/models/form/FormUnit.js +1 -2
- package/package.json +1 -1
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { IFormUnit } from "../../models/form/FormUnit";
|
|
1
|
+
import { IFormUnit, IRow } from "../../models/form/FormUnit";
|
|
2
2
|
import { IMetActivityPatient } from "../../models/met-activity/MetActivityPatient";
|
|
3
3
|
declare class OnAnswerQuestionsFlowTester {
|
|
4
4
|
execute(answered: IFormUnit, answersBank: IFormUnit[], metActivitiesPatient?: IMetActivityPatient[]): {
|
|
5
5
|
bank: IFormUnit[];
|
|
6
6
|
autoAnswereds: IFormUnit[];
|
|
7
7
|
};
|
|
8
|
+
executeByRows(answered: IFormUnit, lines: IRow[], metActivitiesPatient: IMetActivityPatient[]): {
|
|
9
|
+
bank: IFormUnit[];
|
|
10
|
+
lines: IRow[];
|
|
11
|
+
};
|
|
8
12
|
}
|
|
9
13
|
declare const _default: OnAnswerQuestionsFlowTester;
|
|
10
14
|
export default _default;
|
|
@@ -3,6 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const GroupFormUnitsFlow_1 = __importDefault(require("../group/GroupFormUnitsFlow"));
|
|
7
|
+
const ConvertRowToFormUnitsFlowItem_1 = __importDefault(require("./item/ConvertRowToFormUnitsFlowItem"));
|
|
6
8
|
const ProcessAnswerFlowTester_1 = __importDefault(require("./ProcessAnswerFlowTester"));
|
|
7
9
|
class OnAnswerQuestionsFlowTester {
|
|
8
10
|
execute(answered, answersBank, metActivitiesPatient = []) {
|
|
@@ -14,5 +16,13 @@ class OnAnswerQuestionsFlowTester {
|
|
|
14
16
|
const questionsRelacionedsAnswereds = ProcessAnswerFlowTester_1.default.execute(questionAnswered, answersBank, metActivitiesPatient);
|
|
15
17
|
return { bank: answersBank, autoAnswereds: questionsRelacionedsAnswereds };
|
|
16
18
|
}
|
|
19
|
+
executeByRows(answered, lines, metActivitiesPatient) {
|
|
20
|
+
const bankAnswer = ConvertRowToFormUnitsFlowItem_1.default.execute(lines);
|
|
21
|
+
const { bank } = this.execute(answered, bankAnswer, metActivitiesPatient);
|
|
22
|
+
return {
|
|
23
|
+
bank,
|
|
24
|
+
lines: GroupFormUnitsFlow_1.default.execute(bank, [])
|
|
25
|
+
};
|
|
26
|
+
}
|
|
17
27
|
}
|
|
18
28
|
exports.default = new OnAnswerQuestionsFlowTester();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { IFormUnit
|
|
1
|
+
import { IFormUnit } from "../../models/form/FormUnit";
|
|
2
2
|
import { IMetActivityPatient } from "../../models/met-activity/MetActivityPatient";
|
|
3
3
|
declare class ProcessAnswerFlowTester {
|
|
4
|
-
executeByRows(questionAnswered: IFormUnit, rows: IRow[], attendanceMetActivities: IMetActivityPatient[]): IFormUnit[];
|
|
5
4
|
execute(questionAnswered: IFormUnit, bankAnswer: IFormUnit[], attendanceMetActivities: IMetActivityPatient[]): IFormUnit[];
|
|
6
5
|
}
|
|
7
6
|
declare const _default: ProcessAnswerFlowTester;
|
|
@@ -4,13 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const ExecFormulaFlowTester_1 = __importDefault(require("./ExecFormulaFlowTester"));
|
|
7
|
-
const ConvertRowToFormUnitsFlowItem_1 = __importDefault(require("./item/ConvertRowToFormUnitsFlowItem"));
|
|
8
7
|
const GetAnswerRelationedsFlowItemTester_1 = __importDefault(require("./item/GetAnswerRelationedsFlowItemTester"));
|
|
9
8
|
class ProcessAnswerFlowTester {
|
|
10
|
-
executeByRows(questionAnswered, rows, attendanceMetActivities) {
|
|
11
|
-
const bankAnswer = ConvertRowToFormUnitsFlowItem_1.default.execute(rows);
|
|
12
|
-
return this.execute(questionAnswered, bankAnswer, attendanceMetActivities);
|
|
13
|
-
}
|
|
14
9
|
execute(questionAnswered, bankAnswer, attendanceMetActivities) {
|
|
15
10
|
const answerRelacioneds = GetAnswerRelationedsFlowItemTester_1.default.execute(questionAnswered, bankAnswer);
|
|
16
11
|
const autoAnswereds = [];
|
package/package.json
CHANGED