c2-clinical 1.0.4 → 1.0.6
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Schema, Types } from "mongoose";
|
|
2
|
-
import { CategoryFormEnum, IForm } from "./Form";
|
|
3
2
|
import { IDefault } from "../IDefault";
|
|
3
|
+
import { CategoryFormEnum, IForm } from "./Form";
|
|
4
4
|
/**
|
|
5
5
|
* Define o tipo da unidade de formulário
|
|
6
6
|
*/
|
|
@@ -31,11 +31,12 @@ export declare enum TypeAnswerEnum {
|
|
|
31
31
|
BOOLEAN = "BOOLEAN",
|
|
32
32
|
DATE = "DATE"
|
|
33
33
|
}
|
|
34
|
-
export declare enum
|
|
34
|
+
export declare enum TypeValidationEnum {
|
|
35
35
|
TIP = "TIP",
|
|
36
|
-
WARNING = "WARNING"
|
|
36
|
+
WARNING = "WARNING",
|
|
37
|
+
VALIDATION = "VALIDATION"
|
|
37
38
|
}
|
|
38
|
-
export declare enum
|
|
39
|
+
export declare enum TypeOutputValidationEnum {
|
|
39
40
|
TEXT = "TEXT",
|
|
40
41
|
LINK = "LINK",
|
|
41
42
|
VIDEO_LINK = "VIDEO_LINK"
|
|
@@ -60,11 +61,10 @@ export interface IGraphicRequestHttp {
|
|
|
60
61
|
body: any;
|
|
61
62
|
dataset: any;
|
|
62
63
|
}
|
|
63
|
-
export interface
|
|
64
|
-
type:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
content: string;
|
|
64
|
+
export interface IValidationQuestion {
|
|
65
|
+
type: TypeValidationEnum;
|
|
66
|
+
typeOutput: TypeOutputValidationEnum;
|
|
67
|
+
formulaToMessage: string;
|
|
68
68
|
}
|
|
69
69
|
export interface IFormUnit extends IDefault {
|
|
70
70
|
reference: Types.ObjectId | IFormUnit;
|
|
@@ -82,7 +82,7 @@ export interface IFormUnit extends IDefault {
|
|
|
82
82
|
options: IQuestionOption[];
|
|
83
83
|
formulaToAnswer: string;
|
|
84
84
|
formulaToEnable: string;
|
|
85
|
-
|
|
85
|
+
validations: IValidationQuestion[];
|
|
86
86
|
active: boolean;
|
|
87
87
|
show: boolean;
|
|
88
88
|
readOnly: boolean;
|
|
@@ -95,7 +95,11 @@ export interface IQuestionOption {
|
|
|
95
95
|
formulaToEnable: string;
|
|
96
96
|
code: string;
|
|
97
97
|
description: string;
|
|
98
|
+
defaultSelection: boolean;
|
|
98
99
|
active: boolean;
|
|
100
|
+
thumb: string;
|
|
101
|
+
image: string;
|
|
102
|
+
color: string;
|
|
99
103
|
}
|
|
100
104
|
export interface IRequestGraphicData {
|
|
101
105
|
method: string;
|
|
@@ -131,20 +135,32 @@ export declare const QuestionOptionSchema: Schema<any, import("mongoose").Model<
|
|
|
131
135
|
description: string;
|
|
132
136
|
sequence: number;
|
|
133
137
|
code: string;
|
|
138
|
+
defaultSelection: any;
|
|
134
139
|
active: any;
|
|
135
140
|
formulaToEnable?: string | null | undefined;
|
|
141
|
+
thumb?: string | null | undefined;
|
|
142
|
+
image?: string | null | undefined;
|
|
143
|
+
color?: string | null | undefined;
|
|
136
144
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
137
145
|
description: string;
|
|
138
146
|
sequence: number;
|
|
139
147
|
code: string;
|
|
148
|
+
defaultSelection: any;
|
|
140
149
|
active: any;
|
|
141
150
|
formulaToEnable?: string | null | undefined;
|
|
151
|
+
thumb?: string | null | undefined;
|
|
152
|
+
image?: string | null | undefined;
|
|
153
|
+
color?: string | null | undefined;
|
|
142
154
|
}>, {}> & import("mongoose").FlatRecord<{
|
|
143
155
|
description: string;
|
|
144
156
|
sequence: number;
|
|
145
157
|
code: string;
|
|
158
|
+
defaultSelection: any;
|
|
146
159
|
active: any;
|
|
147
160
|
formulaToEnable?: string | null | undefined;
|
|
161
|
+
thumb?: string | null | undefined;
|
|
162
|
+
image?: string | null | undefined;
|
|
163
|
+
color?: string | null | undefined;
|
|
148
164
|
}> & {
|
|
149
165
|
_id: Types.ObjectId;
|
|
150
166
|
} & {
|
|
@@ -167,36 +183,45 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
167
183
|
description: string;
|
|
168
184
|
sequence: number;
|
|
169
185
|
code: string;
|
|
186
|
+
defaultSelection: any;
|
|
170
187
|
active: any;
|
|
171
188
|
formulaToEnable?: string | null | undefined;
|
|
189
|
+
thumb?: string | null | undefined;
|
|
190
|
+
image?: string | null | undefined;
|
|
191
|
+
color?: string | null | undefined;
|
|
172
192
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
173
193
|
description: string;
|
|
174
194
|
sequence: number;
|
|
175
195
|
code: string;
|
|
196
|
+
defaultSelection: any;
|
|
176
197
|
active: any;
|
|
177
198
|
formulaToEnable?: string | null | undefined;
|
|
199
|
+
thumb?: string | null | undefined;
|
|
200
|
+
image?: string | null | undefined;
|
|
201
|
+
color?: string | null | undefined;
|
|
178
202
|
}> & {
|
|
179
203
|
description: string;
|
|
180
204
|
sequence: number;
|
|
181
205
|
code: string;
|
|
206
|
+
defaultSelection: any;
|
|
182
207
|
active: any;
|
|
183
208
|
formulaToEnable?: string | null | undefined;
|
|
209
|
+
thumb?: string | null | undefined;
|
|
210
|
+
image?: string | null | undefined;
|
|
211
|
+
color?: string | null | undefined;
|
|
184
212
|
}>;
|
|
185
|
-
|
|
186
|
-
type
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
typeContent?: string | null | undefined;
|
|
213
|
+
validations: Types.DocumentArray<{
|
|
214
|
+
type: string;
|
|
215
|
+
typeOutput: string;
|
|
216
|
+
formulaToMessage: string;
|
|
190
217
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
191
|
-
type
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
typeContent?: string | null | undefined;
|
|
218
|
+
type: string;
|
|
219
|
+
typeOutput: string;
|
|
220
|
+
formulaToMessage: string;
|
|
195
221
|
}> & {
|
|
196
|
-
type
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
typeContent?: string | null | undefined;
|
|
222
|
+
type: string;
|
|
223
|
+
typeOutput: string;
|
|
224
|
+
formulaToMessage: string;
|
|
200
225
|
}>;
|
|
201
226
|
show: any;
|
|
202
227
|
readOnly: any;
|
|
@@ -239,36 +264,45 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
239
264
|
description: string;
|
|
240
265
|
sequence: number;
|
|
241
266
|
code: string;
|
|
267
|
+
defaultSelection: any;
|
|
242
268
|
active: any;
|
|
243
269
|
formulaToEnable?: string | null | undefined;
|
|
270
|
+
thumb?: string | null | undefined;
|
|
271
|
+
image?: string | null | undefined;
|
|
272
|
+
color?: string | null | undefined;
|
|
244
273
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
245
274
|
description: string;
|
|
246
275
|
sequence: number;
|
|
247
276
|
code: string;
|
|
277
|
+
defaultSelection: any;
|
|
248
278
|
active: any;
|
|
249
279
|
formulaToEnable?: string | null | undefined;
|
|
280
|
+
thumb?: string | null | undefined;
|
|
281
|
+
image?: string | null | undefined;
|
|
282
|
+
color?: string | null | undefined;
|
|
250
283
|
}> & {
|
|
251
284
|
description: string;
|
|
252
285
|
sequence: number;
|
|
253
286
|
code: string;
|
|
287
|
+
defaultSelection: any;
|
|
254
288
|
active: any;
|
|
255
289
|
formulaToEnable?: string | null | undefined;
|
|
290
|
+
thumb?: string | null | undefined;
|
|
291
|
+
image?: string | null | undefined;
|
|
292
|
+
color?: string | null | undefined;
|
|
256
293
|
}>;
|
|
257
|
-
|
|
258
|
-
type
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
typeContent?: string | null | undefined;
|
|
294
|
+
validations: Types.DocumentArray<{
|
|
295
|
+
type: string;
|
|
296
|
+
typeOutput: string;
|
|
297
|
+
formulaToMessage: string;
|
|
262
298
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
263
|
-
type
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
typeContent?: string | null | undefined;
|
|
299
|
+
type: string;
|
|
300
|
+
typeOutput: string;
|
|
301
|
+
formulaToMessage: string;
|
|
267
302
|
}> & {
|
|
268
|
-
type
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
typeContent?: string | null | undefined;
|
|
303
|
+
type: string;
|
|
304
|
+
typeOutput: string;
|
|
305
|
+
formulaToMessage: string;
|
|
272
306
|
}>;
|
|
273
307
|
show: any;
|
|
274
308
|
readOnly: any;
|
|
@@ -311,36 +345,45 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
311
345
|
description: string;
|
|
312
346
|
sequence: number;
|
|
313
347
|
code: string;
|
|
348
|
+
defaultSelection: any;
|
|
314
349
|
active: any;
|
|
315
350
|
formulaToEnable?: string | null | undefined;
|
|
351
|
+
thumb?: string | null | undefined;
|
|
352
|
+
image?: string | null | undefined;
|
|
353
|
+
color?: string | null | undefined;
|
|
316
354
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
317
355
|
description: string;
|
|
318
356
|
sequence: number;
|
|
319
357
|
code: string;
|
|
358
|
+
defaultSelection: any;
|
|
320
359
|
active: any;
|
|
321
360
|
formulaToEnable?: string | null | undefined;
|
|
361
|
+
thumb?: string | null | undefined;
|
|
362
|
+
image?: string | null | undefined;
|
|
363
|
+
color?: string | null | undefined;
|
|
322
364
|
}> & {
|
|
323
365
|
description: string;
|
|
324
366
|
sequence: number;
|
|
325
367
|
code: string;
|
|
368
|
+
defaultSelection: any;
|
|
326
369
|
active: any;
|
|
327
370
|
formulaToEnable?: string | null | undefined;
|
|
371
|
+
thumb?: string | null | undefined;
|
|
372
|
+
image?: string | null | undefined;
|
|
373
|
+
color?: string | null | undefined;
|
|
328
374
|
}>;
|
|
329
|
-
|
|
330
|
-
type
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
typeContent?: string | null | undefined;
|
|
375
|
+
validations: Types.DocumentArray<{
|
|
376
|
+
type: string;
|
|
377
|
+
typeOutput: string;
|
|
378
|
+
formulaToMessage: string;
|
|
334
379
|
}, Types.Subdocument<Types.ObjectId, any, {
|
|
335
|
-
type
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
typeContent?: string | null | undefined;
|
|
380
|
+
type: string;
|
|
381
|
+
typeOutput: string;
|
|
382
|
+
formulaToMessage: string;
|
|
339
383
|
}> & {
|
|
340
|
-
type
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
typeContent?: string | null | undefined;
|
|
384
|
+
type: string;
|
|
385
|
+
typeOutput: string;
|
|
386
|
+
formulaToMessage: string;
|
|
344
387
|
}>;
|
|
345
388
|
show: any;
|
|
346
389
|
readOnly: any;
|
|
@@ -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.
|
|
3
|
+
exports.FormUnitSchema = 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
|
/**
|
|
@@ -35,17 +35,18 @@ var TypeAnswerEnum;
|
|
|
35
35
|
TypeAnswerEnum["BOOLEAN"] = "BOOLEAN";
|
|
36
36
|
TypeAnswerEnum["DATE"] = "DATE";
|
|
37
37
|
})(TypeAnswerEnum || (exports.TypeAnswerEnum = TypeAnswerEnum = {}));
|
|
38
|
-
var
|
|
39
|
-
(function (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
38
|
+
var TypeValidationEnum;
|
|
39
|
+
(function (TypeValidationEnum) {
|
|
40
|
+
TypeValidationEnum["TIP"] = "TIP";
|
|
41
|
+
TypeValidationEnum["WARNING"] = "WARNING";
|
|
42
|
+
TypeValidationEnum["VALIDATION"] = "VALIDATION";
|
|
43
|
+
})(TypeValidationEnum || (exports.TypeValidationEnum = TypeValidationEnum = {}));
|
|
44
|
+
var TypeOutputValidationEnum;
|
|
45
|
+
(function (TypeOutputValidationEnum) {
|
|
46
|
+
TypeOutputValidationEnum["TEXT"] = "TEXT";
|
|
47
|
+
TypeOutputValidationEnum["LINK"] = "LINK";
|
|
48
|
+
TypeOutputValidationEnum["VIDEO_LINK"] = "VIDEO_LINK";
|
|
49
|
+
})(TypeOutputValidationEnum || (exports.TypeOutputValidationEnum = TypeOutputValidationEnum = {}));
|
|
49
50
|
/**
|
|
50
51
|
* Utilizado para FormUnitTypeEnum = MESSAGE
|
|
51
52
|
*/
|
|
@@ -69,6 +70,10 @@ exports.QuestionOptionSchema = new mongoose_1.Schema({
|
|
|
69
70
|
formulaToEnable: { type: String },
|
|
70
71
|
code: { type: String, required: true },
|
|
71
72
|
description: { type: String, required: true },
|
|
73
|
+
defaultSelection: { type: Boolean, required: true, default: false },
|
|
74
|
+
thumb: { type: String },
|
|
75
|
+
image: { type: String },
|
|
76
|
+
color: { type: String },
|
|
72
77
|
active: { type: Boolean, required: true, default: true }
|
|
73
78
|
}, { _id: false });
|
|
74
79
|
exports.FormUnitSchema = new mongoose_1.Schema({
|
|
@@ -93,13 +98,16 @@ exports.FormUnitSchema = new mongoose_1.Schema({
|
|
|
93
98
|
options: { type: [exports.QuestionOptionSchema] },
|
|
94
99
|
formulaToAnswer: { type: String },
|
|
95
100
|
formulaToEnable: { type: String },
|
|
96
|
-
|
|
101
|
+
validations: {
|
|
97
102
|
type: [
|
|
98
103
|
{
|
|
99
|
-
type: { type: String, enum:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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 }
|
|
103
111
|
}
|
|
104
112
|
]
|
|
105
113
|
},
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Schema, Types } from "mongoose";
|
|
2
|
-
import { IFormUnit,
|
|
2
|
+
import { IFormUnit, IValidationQuestion, IRequestGraphicData } from "../form/FormUnit";
|
|
3
3
|
import { IDefault } from "../IDefault";
|
|
4
4
|
import { IQPC } from "./QPC";
|
|
5
5
|
export interface IQPCAnswer extends IDefault {
|
|
6
6
|
qpc: Types.ObjectId | IQPC;
|
|
7
7
|
reference: Types.ObjectId | IFormUnit;
|
|
8
8
|
answer: any;
|
|
9
|
-
messages:
|
|
9
|
+
messages: IValidationQuestion[];
|
|
10
10
|
requestGraphicData: IRequestGraphicData[];
|
|
11
11
|
}
|
|
12
12
|
export declare const QPCAnswerSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
@@ -17,22 +17,6 @@ export declare const QPCAnswerSchema: Schema<any, import("mongoose").Model<any,
|
|
|
17
17
|
}, {} & {
|
|
18
18
|
account: any;
|
|
19
19
|
reference: any;
|
|
20
|
-
messages: Types.DocumentArray<{
|
|
21
|
-
type?: string | null | undefined;
|
|
22
|
-
content?: string | null | undefined;
|
|
23
|
-
formula?: string | null | undefined;
|
|
24
|
-
typeContent?: string | null | undefined;
|
|
25
|
-
}, Types.Subdocument<Types.ObjectId, any, {
|
|
26
|
-
type?: string | null | undefined;
|
|
27
|
-
content?: string | null | undefined;
|
|
28
|
-
formula?: string | null | undefined;
|
|
29
|
-
typeContent?: string | null | undefined;
|
|
30
|
-
}> & {
|
|
31
|
-
type?: string | null | undefined;
|
|
32
|
-
content?: string | null | undefined;
|
|
33
|
-
formula?: string | null | undefined;
|
|
34
|
-
typeContent?: string | null | undefined;
|
|
35
|
-
}>;
|
|
36
20
|
requestGraphicData: Types.DocumentArray<{
|
|
37
21
|
url: string;
|
|
38
22
|
method: string;
|
|
@@ -50,10 +34,6 @@ export declare const QPCAnswerSchema: Schema<any, import("mongoose").Model<any,
|
|
|
50
34
|
dataset?: any;
|
|
51
35
|
}>;
|
|
52
36
|
qpc: any;
|
|
53
|
-
answer?: any;
|
|
54
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
55
|
-
account: any;
|
|
56
|
-
reference: any;
|
|
57
37
|
messages: Types.DocumentArray<{
|
|
58
38
|
type?: string | null | undefined;
|
|
59
39
|
content?: string | null | undefined;
|
|
@@ -70,6 +50,10 @@ export declare const QPCAnswerSchema: Schema<any, import("mongoose").Model<any,
|
|
|
70
50
|
formula?: string | null | undefined;
|
|
71
51
|
typeContent?: string | null | undefined;
|
|
72
52
|
}>;
|
|
53
|
+
answer?: any;
|
|
54
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
|
|
55
|
+
account: any;
|
|
56
|
+
reference: any;
|
|
73
57
|
requestGraphicData: Types.DocumentArray<{
|
|
74
58
|
url: string;
|
|
75
59
|
method: string;
|
|
@@ -87,10 +71,6 @@ export declare const QPCAnswerSchema: Schema<any, import("mongoose").Model<any,
|
|
|
87
71
|
dataset?: any;
|
|
88
72
|
}>;
|
|
89
73
|
qpc: any;
|
|
90
|
-
answer?: any;
|
|
91
|
-
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
92
|
-
account: any;
|
|
93
|
-
reference: any;
|
|
94
74
|
messages: Types.DocumentArray<{
|
|
95
75
|
type?: string | null | undefined;
|
|
96
76
|
content?: string | null | undefined;
|
|
@@ -107,6 +87,10 @@ export declare const QPCAnswerSchema: Schema<any, import("mongoose").Model<any,
|
|
|
107
87
|
formula?: string | null | undefined;
|
|
108
88
|
typeContent?: string | null | undefined;
|
|
109
89
|
}>;
|
|
90
|
+
answer?: any;
|
|
91
|
+
}>, {}> & import("mongoose").FlatRecord<{} & {
|
|
92
|
+
account: any;
|
|
93
|
+
reference: any;
|
|
110
94
|
requestGraphicData: Types.DocumentArray<{
|
|
111
95
|
url: string;
|
|
112
96
|
method: string;
|
|
@@ -124,6 +108,22 @@ export declare const QPCAnswerSchema: Schema<any, import("mongoose").Model<any,
|
|
|
124
108
|
dataset?: any;
|
|
125
109
|
}>;
|
|
126
110
|
qpc: any;
|
|
111
|
+
messages: Types.DocumentArray<{
|
|
112
|
+
type?: string | null | undefined;
|
|
113
|
+
content?: string | null | undefined;
|
|
114
|
+
formula?: string | null | undefined;
|
|
115
|
+
typeContent?: string | null | undefined;
|
|
116
|
+
}, Types.Subdocument<Types.ObjectId, any, {
|
|
117
|
+
type?: string | null | undefined;
|
|
118
|
+
content?: string | null | undefined;
|
|
119
|
+
formula?: string | null | undefined;
|
|
120
|
+
typeContent?: string | null | undefined;
|
|
121
|
+
}> & {
|
|
122
|
+
type?: string | null | undefined;
|
|
123
|
+
content?: string | null | undefined;
|
|
124
|
+
formula?: string | null | undefined;
|
|
125
|
+
typeContent?: string | null | undefined;
|
|
126
|
+
}>;
|
|
127
127
|
answer?: any;
|
|
128
128
|
}> & {
|
|
129
129
|
_id: Types.ObjectId;
|
|
@@ -11,9 +11,9 @@ exports.QPCAnswerSchema = new mongoose_1.Schema({
|
|
|
11
11
|
messages: {
|
|
12
12
|
type: [
|
|
13
13
|
{
|
|
14
|
-
type: { type: String, enum: FormUnit_1.
|
|
14
|
+
type: { type: String, enum: FormUnit_1.TypeValidationEnum },
|
|
15
15
|
formula: { type: String },
|
|
16
|
-
typeContent: { type: String, enum: FormUnit_1.
|
|
16
|
+
typeContent: { type: String, enum: FormUnit_1.TypeOutputValidationEnum },
|
|
17
17
|
content: { type: String }
|
|
18
18
|
}
|
|
19
19
|
]
|
package/package.json
CHANGED