c2-clinical 1.0.6 → 1.0.7
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.
|
@@ -16,7 +16,9 @@ export declare enum TypeFormUnitEnum {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare enum TypeAnswerEnum {
|
|
18
18
|
CHOICE_SINGLE = "CHOICE_SINGLE",
|
|
19
|
+
CHOICE_SINGLE_WITH_OTHER = "CHOICE_SINGLE_WITH_OTHER",
|
|
19
20
|
CHOICE_MULTIPLE = "CHOICE_MULTIPLE",
|
|
21
|
+
CHOICE_MULTIPLE_WITH_OTHER = "CHOICE_MULTIPLE_WITH_OTHER",
|
|
20
22
|
OPEN_TEXT = "OPEN_TEXT",
|
|
21
23
|
OPEN_TEXT_AREA = "OPEN_TEXT_AREA",
|
|
22
24
|
OPEN_TEXT_AREA_ADVANCED = "OPEN_TEXT_AREA_ADVANCED",// modelo WORD
|
|
@@ -166,6 +168,25 @@ export declare const QuestionOptionSchema: Schema<any, import("mongoose").Model<
|
|
|
166
168
|
} & {
|
|
167
169
|
__v: number;
|
|
168
170
|
}>;
|
|
171
|
+
export declare const ValidationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
172
|
+
_id: false;
|
|
173
|
+
}, {
|
|
174
|
+
type: string;
|
|
175
|
+
typeOutput: string;
|
|
176
|
+
formulaToMessage: string;
|
|
177
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
178
|
+
type: string;
|
|
179
|
+
typeOutput: string;
|
|
180
|
+
formulaToMessage: string;
|
|
181
|
+
}>, {}> & import("mongoose").FlatRecord<{
|
|
182
|
+
type: string;
|
|
183
|
+
typeOutput: string;
|
|
184
|
+
formulaToMessage: string;
|
|
185
|
+
}> & {
|
|
186
|
+
_id: Types.ObjectId;
|
|
187
|
+
} & {
|
|
188
|
+
__v: number;
|
|
189
|
+
}>;
|
|
169
190
|
export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
170
191
|
timestamps: {
|
|
171
192
|
createdAt: string;
|
|
@@ -176,6 +197,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
176
197
|
required: any;
|
|
177
198
|
category: string;
|
|
178
199
|
sequence: number;
|
|
200
|
+
formulaToEnable: string;
|
|
179
201
|
code: string;
|
|
180
202
|
active: any;
|
|
181
203
|
form: any;
|
|
@@ -243,7 +265,6 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
243
265
|
}>;
|
|
244
266
|
description?: string | null | undefined;
|
|
245
267
|
account?: any;
|
|
246
|
-
formulaToEnable?: string | null | undefined;
|
|
247
268
|
reference?: any;
|
|
248
269
|
parent?: any;
|
|
249
270
|
line?: number | null | undefined;
|
|
@@ -257,6 +278,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
257
278
|
required: any;
|
|
258
279
|
category: string;
|
|
259
280
|
sequence: number;
|
|
281
|
+
formulaToEnable: string;
|
|
260
282
|
code: string;
|
|
261
283
|
active: any;
|
|
262
284
|
form: any;
|
|
@@ -324,7 +346,6 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
324
346
|
}>;
|
|
325
347
|
description?: string | null | undefined;
|
|
326
348
|
account?: any;
|
|
327
|
-
formulaToEnable?: string | null | undefined;
|
|
328
349
|
reference?: any;
|
|
329
350
|
parent?: any;
|
|
330
351
|
line?: number | null | undefined;
|
|
@@ -338,6 +359,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
338
359
|
required: any;
|
|
339
360
|
category: string;
|
|
340
361
|
sequence: number;
|
|
362
|
+
formulaToEnable: string;
|
|
341
363
|
code: string;
|
|
342
364
|
active: any;
|
|
343
365
|
form: any;
|
|
@@ -405,7 +427,6 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
405
427
|
}>;
|
|
406
428
|
description?: string | null | undefined;
|
|
407
429
|
account?: any;
|
|
408
|
-
formulaToEnable?: string | null | undefined;
|
|
409
430
|
reference?: any;
|
|
410
431
|
parent?: any;
|
|
411
432
|
line?: number | null | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FormUnitSchema = exports.QuestionOptionSchema = exports.RequestGraphicDataSchema = exports.TypeMessageEnum = exports.TypeOutputValidationEnum = exports.TypeValidationEnum = exports.TypeAnswerEnum = exports.TypeFormUnitEnum = void 0;
|
|
3
|
+
exports.FormUnitSchema = exports.ValidationSchema = exports.QuestionOptionSchema = exports.RequestGraphicDataSchema = exports.TypeMessageEnum = exports.TypeOutputValidationEnum = exports.TypeValidationEnum = exports.TypeAnswerEnum = exports.TypeFormUnitEnum = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const Form_1 = require("./Form");
|
|
6
6
|
/**
|
|
@@ -20,7 +20,9 @@ var TypeFormUnitEnum;
|
|
|
20
20
|
var TypeAnswerEnum;
|
|
21
21
|
(function (TypeAnswerEnum) {
|
|
22
22
|
TypeAnswerEnum["CHOICE_SINGLE"] = "CHOICE_SINGLE";
|
|
23
|
+
TypeAnswerEnum["CHOICE_SINGLE_WITH_OTHER"] = "CHOICE_SINGLE_WITH_OTHER";
|
|
23
24
|
TypeAnswerEnum["CHOICE_MULTIPLE"] = "CHOICE_MULTIPLE";
|
|
25
|
+
TypeAnswerEnum["CHOICE_MULTIPLE_WITH_OTHER"] = "CHOICE_MULTIPLE_WITH_OTHER";
|
|
24
26
|
TypeAnswerEnum["OPEN_TEXT"] = "OPEN_TEXT";
|
|
25
27
|
TypeAnswerEnum["OPEN_TEXT_AREA"] = "OPEN_TEXT_AREA";
|
|
26
28
|
TypeAnswerEnum["OPEN_TEXT_AREA_ADVANCED"] = "OPEN_TEXT_AREA_ADVANCED";
|
|
@@ -76,6 +78,15 @@ exports.QuestionOptionSchema = new mongoose_1.Schema({
|
|
|
76
78
|
color: { type: String },
|
|
77
79
|
active: { type: Boolean, required: true, default: true }
|
|
78
80
|
}, { _id: false });
|
|
81
|
+
exports.ValidationSchema = new mongoose_1.Schema({
|
|
82
|
+
type: { type: String, enum: TypeValidationEnum, required: true },
|
|
83
|
+
typeOutput: {
|
|
84
|
+
type: String,
|
|
85
|
+
enum: TypeOutputValidationEnum,
|
|
86
|
+
default: TypeOutputValidationEnum.TEXT
|
|
87
|
+
},
|
|
88
|
+
formulaToMessage: { type: String, required: true }
|
|
89
|
+
}, { _id: false });
|
|
79
90
|
exports.FormUnitSchema = new mongoose_1.Schema({
|
|
80
91
|
//account só é usado quando for montado por uma conta, quando for modelo disponível a todos ele deve estar sem preenchimento
|
|
81
92
|
account: { type: mongoose_1.Schema.Types.ObjectId, ref: "account" },
|
|
@@ -97,20 +108,8 @@ exports.FormUnitSchema = new mongoose_1.Schema({
|
|
|
97
108
|
measurementUnit: { type: String },
|
|
98
109
|
options: { type: [exports.QuestionOptionSchema] },
|
|
99
110
|
formulaToAnswer: { type: String },
|
|
100
|
-
formulaToEnable: { type: String },
|
|
101
|
-
validations: {
|
|
102
|
-
type: [
|
|
103
|
-
{
|
|
104
|
-
type: { type: String, enum: TypeValidationEnum, required: true },
|
|
105
|
-
typeOutput: {
|
|
106
|
-
type: String,
|
|
107
|
-
enum: TypeOutputValidationEnum,
|
|
108
|
-
default: TypeOutputValidationEnum.TEXT
|
|
109
|
-
},
|
|
110
|
-
formulaToMessage: { type: String, required: true }
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
},
|
|
111
|
+
formulaToEnable: { type: String, default: "true" },
|
|
112
|
+
validations: { type: [exports.ValidationSchema] },
|
|
114
113
|
active: { type: Boolean, required: true, default: true }, //perguntas que nao serão consideradas ao realizar qualquer operacao
|
|
115
114
|
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)
|
|
116
115
|
readOnly: { type: Boolean, default: false },
|
package/package.json
CHANGED