c2-clinical 1.0.140 → 1.0.142
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/chart/ConvertChartDataFlow.d.ts +6 -0
- package/dist/flow/chart/ConvertChartDataFlow.js +14 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/models/anthropometry/AnthropometryAnswer.d.ts +12 -0
- package/dist/models/anthropometry/AnthropometryAnswer.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class ConvertChartDataFlow {
|
|
4
|
+
execute(formUnitChart) {
|
|
5
|
+
const reviver = (key, value) => {
|
|
6
|
+
if (typeof value === "string" && value.startsWith("function"))
|
|
7
|
+
return new Function(`return ${value}`)();
|
|
8
|
+
return value;
|
|
9
|
+
};
|
|
10
|
+
const graphicData = JSON.parse(JSON.stringify(formUnitChart.graphicData?.staticGraphicData), reviver);
|
|
11
|
+
return graphicData;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.default = new ConvertChartDataFlow();
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IAccount } from "c2-account";
|
|
2
|
+
import ConvertChartDataFlow from "./flow/chart/ConvertChartDataFlow";
|
|
2
3
|
import GroupFormUnitsFlow from "./flow/group/GroupFormUnitsFlow";
|
|
3
4
|
import ExecFormulaFlow from "./flow/on-answer/ExecFormulaFlow";
|
|
4
5
|
import OnAnswerQuestionsFlow from "./flow/on-answer/OnAnswerQuestionsFlow";
|
|
@@ -25,4 +26,4 @@ export * from "./models/qa/QAAnswer";
|
|
|
25
26
|
export * from "./models/qa/QAProgramming";
|
|
26
27
|
export * from "./models/qpc/QPC";
|
|
27
28
|
export * from "./models/qpc/QPCAnswer";
|
|
28
|
-
export { ConvertRowToAnswerFlowItem, ExecFormulaFlow, GroupFormUnitsFlow, IAccount, OnAnswerQuestionsFlow, OnAnswerQuestionsFlowTester };
|
|
29
|
+
export { ConvertChartDataFlow, ConvertRowToAnswerFlowItem, ExecFormulaFlow, GroupFormUnitsFlow, IAccount, OnAnswerQuestionsFlow, OnAnswerQuestionsFlowTester };
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.OnAnswerQuestionsFlowTester = exports.OnAnswerQuestionsFlow = exports.GroupFormUnitsFlow = exports.ExecFormulaFlow = exports.ConvertRowToAnswerFlowItem = void 0;
|
|
20
|
+
exports.OnAnswerQuestionsFlowTester = exports.OnAnswerQuestionsFlow = exports.GroupFormUnitsFlow = exports.ExecFormulaFlow = exports.ConvertRowToAnswerFlowItem = exports.ConvertChartDataFlow = void 0;
|
|
21
|
+
const ConvertChartDataFlow_1 = __importDefault(require("./flow/chart/ConvertChartDataFlow"));
|
|
22
|
+
exports.ConvertChartDataFlow = ConvertChartDataFlow_1.default;
|
|
21
23
|
const GroupFormUnitsFlow_1 = __importDefault(require("./flow/group/GroupFormUnitsFlow"));
|
|
22
24
|
exports.GroupFormUnitsFlow = GroupFormUnitsFlow_1.default;
|
|
23
25
|
const ExecFormulaFlow_1 = __importDefault(require("./flow/on-answer/ExecFormulaFlow"));
|
|
@@ -7,6 +7,9 @@ export interface IAnthropometryAnswer extends IAnswer {
|
|
|
7
7
|
form: Types.ObjectId | IForm;
|
|
8
8
|
anthropometry: Types.ObjectId | IAnthropometry;
|
|
9
9
|
patient: Types.ObjectId | IPatient;
|
|
10
|
+
referenceValue: any;
|
|
11
|
+
classificationLabel: any;
|
|
12
|
+
classificationColor: any;
|
|
10
13
|
}
|
|
11
14
|
export declare const AnthropometryAnswerSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
12
15
|
timestamps: {
|
|
@@ -95,6 +98,9 @@ export declare const AnthropometryAnswerSchema: Schema<any, import("mongoose").M
|
|
|
95
98
|
isValid?: {} | null | undefined;
|
|
96
99
|
};
|
|
97
100
|
answer?: any;
|
|
101
|
+
referenceValue?: any;
|
|
102
|
+
classificationLabel?: any;
|
|
103
|
+
classificationColor?: any;
|
|
98
104
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
99
105
|
account: {
|
|
100
106
|
prototype?: Types.ObjectId | null | undefined;
|
|
@@ -177,6 +183,9 @@ export declare const AnthropometryAnswerSchema: Schema<any, import("mongoose").M
|
|
|
177
183
|
isValid?: {} | null | undefined;
|
|
178
184
|
};
|
|
179
185
|
answer?: any;
|
|
186
|
+
referenceValue?: any;
|
|
187
|
+
classificationLabel?: any;
|
|
188
|
+
classificationColor?: any;
|
|
180
189
|
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
181
190
|
account: {
|
|
182
191
|
prototype?: Types.ObjectId | null | undefined;
|
|
@@ -259,6 +268,9 @@ export declare const AnthropometryAnswerSchema: Schema<any, import("mongoose").M
|
|
|
259
268
|
isValid?: {} | null | undefined;
|
|
260
269
|
};
|
|
261
270
|
answer?: any;
|
|
271
|
+
referenceValue?: any;
|
|
272
|
+
classificationLabel?: any;
|
|
273
|
+
classificationColor?: any;
|
|
262
274
|
}> & {
|
|
263
275
|
_id: Types.ObjectId;
|
|
264
276
|
} & {
|
|
@@ -11,6 +11,9 @@ exports.AnthropometryAnswerSchema = new mongoose_1.Schema({
|
|
|
11
11
|
form: { type: mongoose_1.Types.ObjectId, ref: "form", required: true },
|
|
12
12
|
reference: { type: mongoose_1.Types.ObjectId, ref: "form-unit", required: true },
|
|
13
13
|
answer: { type: mongoose_1.Schema.Types.Mixed },
|
|
14
|
+
referenceValue: { type: mongoose_1.Schema.Types.Mixed },
|
|
15
|
+
classificationLabel: { type: mongoose_1.Schema.Types.Mixed },
|
|
16
|
+
classificationColor: { type: mongoose_1.Schema.Types.Mixed },
|
|
14
17
|
validations: {
|
|
15
18
|
type: [
|
|
16
19
|
{
|
package/package.json
CHANGED