c2-clinical 1.0.16 → 1.0.18

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.
Files changed (37) hide show
  1. package/dist/flow/group/GroupFormUnitsFlow.d.ts +1 -1
  2. package/dist/flow/group/item/GetEnablesFormUnitsFlowItem.d.ts +1 -1
  3. package/dist/flow/item/BuildFormulaFlowItem.d.ts +2 -2
  4. package/dist/flow/item/BuildFormulaMetsFlowItem.d.ts +2 -2
  5. package/dist/flow/on-answer/ExecFormulaFlow.d.ts +2 -2
  6. package/dist/flow/on-answer/OnAnswerQuestionsFlow.d.ts +2 -2
  7. package/dist/flow/on-answer/ProcessAnswerFlow.d.ts +2 -2
  8. package/dist/flow/on-answer/item/GetAnswerRelationedsFlowItem.d.ts +1 -1
  9. package/dist/index.d.ts +5 -2
  10. package/dist/index.js +5 -2
  11. package/dist/models/Account.d.ts +6 -0
  12. package/dist/models/Account.js +2 -0
  13. package/dist/models/Answer.d.ts +8 -0
  14. package/dist/models/Answer.js +2 -0
  15. package/dist/models/Default.d.ts +10 -0
  16. package/dist/models/Default.js +2 -0
  17. package/dist/models/File.d.ts +1 -1
  18. package/dist/models/Group.d.ts +18 -0
  19. package/dist/models/Group.js +2 -0
  20. package/dist/models/Patient.d.ts +152 -0
  21. package/dist/models/Patient.js +34 -0
  22. package/dist/models/Phone.d.ts +37 -0
  23. package/dist/models/Phone.js +47 -0
  24. package/dist/models/enum.d.ts +84 -0
  25. package/dist/models/enum.js +98 -0
  26. package/dist/models/form/Form.d.ts +2 -22
  27. package/dist/models/form/Form.js +5 -29
  28. package/dist/models/form/FormUnit.d.ts +3 -55
  29. package/dist/models/form/FormUnit.js +8 -66
  30. package/dist/models/met-activity/MetActivity.d.ts +9 -0
  31. package/dist/models/met-activity/MetActivity.js +2 -0
  32. package/dist/models/met-activity/MetActivityPatient.d.ts +20 -0
  33. package/dist/models/met-activity/MetActivityPatient.js +2 -0
  34. package/dist/models/qpc/QPC.d.ts +2 -33
  35. package/dist/models/qpc/QPC.js +3 -11
  36. package/dist/models/qpc/QPCAnswer.d.ts +1 -1
  37. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { IFormUnit } from "../../models/form/FormUnit";
2
- import { IAnswer } from "../../models/IAnswer";
2
+ import { IAnswer } from "../../models/Answer";
3
3
  declare class GroupFormUnitsFlow {
4
4
  execute(formUnits: IFormUnit[], answers: IAnswer[]): IFormUnit[];
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { IFormUnit } from "../../../models/form/FormUnit";
2
- import { IAnswer } from "../../../models/IAnswer";
2
+ import { IAnswer } from "../../../models/Answer";
3
3
  declare class GetEnablesFormUnitsFlowItem {
4
4
  execute(formUnits: IFormUnit[], answers: IAnswer[]): IFormUnit[];
5
5
  }
@@ -1,5 +1,5 @@
1
- import { IAnswer } from "../../models/IAnswer";
2
- import { IMetActivityPatient } from "../../models/met-activity/IMetActivityPatient";
1
+ import { IAnswer } from "../../models/Answer";
2
+ import { IMetActivityPatient } from "../../models/met-activity/MetActivityPatient";
3
3
  declare class BuildFormulaFlowItem {
4
4
  execute(answers: IAnswer[], formula: string, metsActivities?: IMetActivityPatient[], replaceDefault?: string): string;
5
5
  }
@@ -1,5 +1,5 @@
1
- import { IAnswer } from "../../models/IAnswer";
2
- import { IMetActivityPatient } from "../../models/met-activity/IMetActivityPatient";
1
+ import { IAnswer } from "../../models/Answer";
2
+ import { IMetActivityPatient } from "../../models/met-activity/MetActivityPatient";
3
3
  declare class BuildFormulaMetsFlowItem {
4
4
  exec(answers: IAnswer[], formula: string, metsActivities: IMetActivityPatient[]): string;
5
5
  }
@@ -1,5 +1,5 @@
1
- import { IAnswer } from "../../models/IAnswer";
2
- import { IMetActivityPatient } from "../../models/met-activity/IMetActivityPatient";
1
+ import { IAnswer } from "../../models/Answer";
2
+ import { IMetActivityPatient } from "../../models/met-activity/MetActivityPatient";
3
3
  declare class ExecFormulaFlow {
4
4
  execute(formula: string, questionsAnswereds: IAnswer[], mets: IMetActivityPatient[]): any;
5
5
  }
@@ -1,5 +1,5 @@
1
- import { IAnswer } from "../../models/IAnswer";
2
- import { IMetActivityPatient } from "../../models/met-activity/IMetActivityPatient";
1
+ import { IAnswer } from "../../models/Answer";
2
+ import { IMetActivityPatient } from "../../models/met-activity/MetActivityPatient";
3
3
  declare class OnAnswerQuestionsFlow {
4
4
  execute(answered: IAnswer, answersBank: IAnswer[], metActivitiesPatient: IMetActivityPatient[]): {
5
5
  bank: IAnswer[];
@@ -1,5 +1,5 @@
1
- import { IAnswer } from "../../models/IAnswer";
2
- import { IMetActivityPatient } from "../../models/met-activity/IMetActivityPatient";
1
+ import { IAnswer } from "../../models/Answer";
2
+ import { IMetActivityPatient } from "../../models/met-activity/MetActivityPatient";
3
3
  declare class ProcessAnswerFlow {
4
4
  execute(questionAnswered: IAnswer, bankAnswer: IAnswer[], attendanceMetActivities: IMetActivityPatient[]): IAnswer[];
5
5
  }
@@ -1,4 +1,4 @@
1
- import { IAnswer } from "../../../models/IAnswer";
1
+ import { IAnswer } from "../../../models/Answer";
2
2
  declare class GetAnswerRelationedsFlowItem {
3
3
  execute(questionAnswered: IAnswer, bankAnswer: IAnswer[]): IAnswer[];
4
4
  }
package/dist/index.d.ts CHANGED
@@ -1,9 +1,12 @@
1
1
  import GroupFormUnitsFlow from "./flow/group/GroupFormUnitsFlow";
2
2
  import ExecFormulaFlow from "./flow/on-answer/ExecFormulaFlow";
3
3
  import OnAnswerQuestionsFlow from "./flow/on-answer/OnAnswerQuestionsFlow";
4
+ export * from "./models/enum";
5
+ export * from "./models/Patient";
6
+ export * from "./models/Phone";
4
7
  export * from "./models/File";
5
- export * from "./models/IAccount";
6
- export * from "./models/IDefault";
8
+ export * from "./models/Account";
9
+ export * from "./models/Default";
7
10
  export * from "./models/form/Form";
8
11
  export * from "./models/form/FormUnit";
9
12
  export * from "./models/qpc/QPC";
package/dist/index.js CHANGED
@@ -24,9 +24,12 @@ const ExecFormulaFlow_1 = __importDefault(require("./flow/on-answer/ExecFormulaF
24
24
  exports.ExecFormulaFlow = ExecFormulaFlow_1.default;
25
25
  const OnAnswerQuestionsFlow_1 = __importDefault(require("./flow/on-answer/OnAnswerQuestionsFlow"));
26
26
  exports.OnAnswerQuestionsFlow = OnAnswerQuestionsFlow_1.default;
27
+ __exportStar(require("./models/enum"), exports);
28
+ __exportStar(require("./models/Patient"), exports);
29
+ __exportStar(require("./models/Phone"), exports);
27
30
  __exportStar(require("./models/File"), exports);
28
- __exportStar(require("./models/IAccount"), exports);
29
- __exportStar(require("./models/IDefault"), exports);
31
+ __exportStar(require("./models/Account"), exports);
32
+ __exportStar(require("./models/Default"), exports);
30
33
  __exportStar(require("./models/form/Form"), exports);
31
34
  __exportStar(require("./models/form/FormUnit"), exports);
32
35
  __exportStar(require("./models/qpc/QPC"), exports);
@@ -0,0 +1,6 @@
1
+ import { IDefaultAdmin } from "./Default";
2
+ export interface IAccount extends IDefaultAdmin {
3
+ [key: string]: any;
4
+ name: string;
5
+ email: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { IFormUnit, IRequestGraphicData, IValidationQuestion } from "./form/FormUnit";
2
+ import { IDefault } from "./Default";
3
+ export interface IAnswer extends IDefault {
4
+ reference: IFormUnit;
5
+ validations: IValidationQuestion[];
6
+ requestGraphicData: IRequestGraphicData[];
7
+ answer: any;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { Types } from "mongoose";
2
+ import { IAccount } from "./Account";
3
+ export interface IDefault extends IDefaultAdmin {
4
+ account: Types.ObjectId | IAccount;
5
+ }
6
+ export interface IDefaultAdmin {
7
+ _id: Types.ObjectId;
8
+ createdAtDateTime: Date;
9
+ updatedAtDateTime: Date;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "mongoose";
2
- import { IDefault } from "./IDefault";
2
+ import { IDefault } from "./Default";
3
3
  export interface IFile extends IDefault {
4
4
  contentType: string;
5
5
  format: string;
@@ -0,0 +1,18 @@
1
+ import { Types } from "mongoose";
2
+ import { IFormUnit } from "./form/FormUnit";
3
+ export interface IGroup {
4
+ _id: undefined | string | Types.ObjectId;
5
+ line: number;
6
+ description: undefined | string;
7
+ lines: ILineQuestionsOrGroup[];
8
+ type: "GROUP";
9
+ groupOrigin?: IFormUnit;
10
+ }
11
+ export interface ILineQuestionsOrGroup {
12
+ line: number;
13
+ type: "GROUP" | "QUESTIONS";
14
+ questions?: (IFormUnit & {
15
+ childs: IGroup[];
16
+ })[];
17
+ group?: IGroup;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,152 @@
1
+ import { Schema } from "mongoose";
2
+ import { IDefault } from "./Default";
3
+ import { IPhone } from "./Phone";
4
+ import { GenreEnum } from "./enum";
5
+ export interface IPatientAppConfig {
6
+ accessEnable: boolean;
7
+ accessCode: string;
8
+ accessExpireDate: Date;
9
+ }
10
+ export interface IPatient extends IDefault {
11
+ fullName: string;
12
+ genre: GenreEnum;
13
+ bornDate: Date;
14
+ phones: IPhone[];
15
+ socialId: string;
16
+ email: string;
17
+ tags: string[];
18
+ active: boolean;
19
+ sendEmailAsWelcome: boolean;
20
+ appConfig: IPatientAppConfig;
21
+ }
22
+ export declare const PatientAppConfigSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
23
+ _id: false;
24
+ }, {
25
+ accessEnable?: any;
26
+ accessCode?: string | null | undefined;
27
+ accessExpireDate?: NativeDate | null | undefined;
28
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
29
+ accessEnable?: any;
30
+ accessCode?: string | null | undefined;
31
+ accessExpireDate?: NativeDate | null | undefined;
32
+ }>, {}> & import("mongoose").FlatRecord<{
33
+ accessEnable?: any;
34
+ accessCode?: string | null | undefined;
35
+ accessExpireDate?: NativeDate | null | undefined;
36
+ }> & {
37
+ _id: import("mongoose").Types.ObjectId;
38
+ } & {
39
+ __v: number;
40
+ }>;
41
+ export declare const PatientSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
42
+ timestamps: {
43
+ createdAt: string;
44
+ updatedAt: string;
45
+ };
46
+ }, {} & {
47
+ email: string;
48
+ account: any;
49
+ active: any;
50
+ fullName: string;
51
+ bornDate: NativeDate;
52
+ phones: import("mongoose").Types.DocumentArray<{} & {
53
+ active: any;
54
+ countryCode: string;
55
+ isWhatsapp: any;
56
+ number?: string | null | undefined;
57
+ description?: string | null | undefined;
58
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {} & {
59
+ active: any;
60
+ countryCode: string;
61
+ isWhatsapp: any;
62
+ number?: string | null | undefined;
63
+ description?: string | null | undefined;
64
+ }> & {} & {
65
+ active: any;
66
+ countryCode: string;
67
+ isWhatsapp: any;
68
+ number?: string | null | undefined;
69
+ description?: string | null | undefined;
70
+ }>;
71
+ tags: string[];
72
+ sendEmailAsWelcome: any;
73
+ genre?: string | null | undefined;
74
+ socialId?: string | null | undefined;
75
+ appConfig?: {
76
+ accessEnable?: any;
77
+ accessCode?: string | null | undefined;
78
+ accessExpireDate?: NativeDate | null | undefined;
79
+ } | null | undefined;
80
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
81
+ email: string;
82
+ account: any;
83
+ active: any;
84
+ fullName: string;
85
+ bornDate: NativeDate;
86
+ phones: import("mongoose").Types.DocumentArray<{} & {
87
+ active: any;
88
+ countryCode: string;
89
+ isWhatsapp: any;
90
+ number?: string | null | undefined;
91
+ description?: string | null | undefined;
92
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {} & {
93
+ active: any;
94
+ countryCode: string;
95
+ isWhatsapp: any;
96
+ number?: string | null | undefined;
97
+ description?: string | null | undefined;
98
+ }> & {} & {
99
+ active: any;
100
+ countryCode: string;
101
+ isWhatsapp: any;
102
+ number?: string | null | undefined;
103
+ description?: string | null | undefined;
104
+ }>;
105
+ tags: string[];
106
+ sendEmailAsWelcome: any;
107
+ genre?: string | null | undefined;
108
+ socialId?: string | null | undefined;
109
+ appConfig?: {
110
+ accessEnable?: any;
111
+ accessCode?: string | null | undefined;
112
+ accessExpireDate?: NativeDate | null | undefined;
113
+ } | null | undefined;
114
+ }>, {}> & import("mongoose").FlatRecord<{} & {
115
+ email: string;
116
+ account: any;
117
+ active: any;
118
+ fullName: string;
119
+ bornDate: NativeDate;
120
+ phones: import("mongoose").Types.DocumentArray<{} & {
121
+ active: any;
122
+ countryCode: string;
123
+ isWhatsapp: any;
124
+ number?: string | null | undefined;
125
+ description?: string | null | undefined;
126
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {} & {
127
+ active: any;
128
+ countryCode: string;
129
+ isWhatsapp: any;
130
+ number?: string | null | undefined;
131
+ description?: string | null | undefined;
132
+ }> & {} & {
133
+ active: any;
134
+ countryCode: string;
135
+ isWhatsapp: any;
136
+ number?: string | null | undefined;
137
+ description?: string | null | undefined;
138
+ }>;
139
+ tags: string[];
140
+ sendEmailAsWelcome: any;
141
+ genre?: string | null | undefined;
142
+ socialId?: string | null | undefined;
143
+ appConfig?: {
144
+ accessEnable?: any;
145
+ accessCode?: string | null | undefined;
146
+ accessExpireDate?: NativeDate | null | undefined;
147
+ } | null | undefined;
148
+ }> & {
149
+ _id: import("mongoose").Types.ObjectId;
150
+ } & {
151
+ __v: number;
152
+ }>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PatientSchema = exports.PatientAppConfigSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const Phone_1 = require("./Phone");
6
+ const enum_1 = require("./enum");
7
+ exports.PatientAppConfigSchema = new mongoose_1.Schema({
8
+ accessEnable: { type: Boolean },
9
+ accessCode: { type: String },
10
+ accessExpireDate: { type: Date }
11
+ }, {
12
+ _id: false
13
+ });
14
+ exports.PatientSchema = new mongoose_1.Schema({
15
+ account: { type: mongoose_1.Schema.Types.ObjectId, ref: "account", required: true },
16
+ genre: { type: String, enum: enum_1.GenreEnum, require: true },
17
+ fullName: { type: String, required: true },
18
+ bornDate: { type: Date, required: true },
19
+ phones: { type: [Phone_1.PhoneSchema], required: true },
20
+ socialId: { type: String },
21
+ email: { type: String, required: true },
22
+ tags: { type: [String] },
23
+ active: { type: Boolean, default: true },
24
+ sendEmailAsWelcome: { type: Boolean, required: true, default: false },
25
+ appConfig: { type: exports.PatientAppConfigSchema }
26
+ }, {
27
+ timestamps: {
28
+ createdAt: "createdAtDateTime",
29
+ updatedAt: "updatedAtDateTime"
30
+ }
31
+ });
32
+ exports.PatientSchema.index({ fullName: 1 }, { unique: false });
33
+ exports.PatientSchema.index({ account: 1 }, { unique: false });
34
+ exports.PatientSchema.index({ socialId: 1 }, { unique: true });
@@ -0,0 +1,37 @@
1
+ import * as mongoose from "mongoose";
2
+ export interface IPhone {
3
+ description: string;
4
+ countryCode: string;
5
+ number: string;
6
+ active: boolean;
7
+ isWhatsapp: boolean;
8
+ }
9
+ export declare const PhoneSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
10
+ timestamps: {
11
+ createdAt: string;
12
+ updatedAt: string;
13
+ };
14
+ _id: false;
15
+ }, {} & {
16
+ active: any;
17
+ countryCode: string;
18
+ isWhatsapp: any;
19
+ number?: string | null | undefined;
20
+ description?: string | null | undefined;
21
+ }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{} & {
22
+ active: any;
23
+ countryCode: string;
24
+ isWhatsapp: any;
25
+ number?: string | null | undefined;
26
+ description?: string | null | undefined;
27
+ }>, {}> & mongoose.FlatRecord<{} & {
28
+ active: any;
29
+ countryCode: string;
30
+ isWhatsapp: any;
31
+ number?: string | null | undefined;
32
+ description?: string | null | undefined;
33
+ }> & {
34
+ _id: mongoose.Types.ObjectId;
35
+ } & {
36
+ __v: number;
37
+ }>;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.PhoneSchema = void 0;
37
+ const mongoose = __importStar(require("mongoose"));
38
+ exports.PhoneSchema = new mongoose.Schema({
39
+ description: { type: String },
40
+ countryCode: { type: String, default: "+55" },
41
+ number: { type: String },
42
+ isWhatsapp: { type: Boolean, default: true },
43
+ active: { type: Boolean, default: true }
44
+ }, {
45
+ timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" },
46
+ _id: false
47
+ });
@@ -0,0 +1,84 @@
1
+ export declare enum GenreEnum {
2
+ "MALE" = "MALE",
3
+ "FEMALE" = "FEMALE"
4
+ }
5
+ export declare enum StatusQPCEnum {
6
+ AWAITING_IMPORT = "AWAITING_IMPORT",
7
+ IMPORTED = "IMPORTED"
8
+ }
9
+ export declare enum MetTargetConditionEnum {
10
+ ADULT = "ADULT",
11
+ OLD_ADULT = "OLD_ADULT",
12
+ WHEELCHAIR = "WHEELCHAIR"
13
+ }
14
+ export declare enum CategoryFormEnum {
15
+ PROFILE = "PROFILE",//criadas ao cadastrar o paciente (idade, sexo, etc), toda alteracao no cadastro deve atualizar essas respostas
16
+ QPC = "QPC",
17
+ QA = "QA",
18
+ ANAMNESE = "ANAMNESE",
19
+ ANTROPHOMETRIC = "ANTROPHOMETRIC",
20
+ ENERGY_EXPENDITURE = "ENERGY_EXPENDITURE",
21
+ EXAM_RESULT = "EXAM_RESULT"
22
+ }
23
+ export declare enum TypeFormEnum {
24
+ STRUCTURED = "STRUCTURED",
25
+ FREE_TEXT = "FREE_TEXT"
26
+ }
27
+ export declare enum OwnerEnum {
28
+ SYSTEM = "SYSTEM",
29
+ NUTRITIONIST_REFERENCE = "NUTRITIONIST_REFERENCE",
30
+ ACCOUNT = "ACCOUNT"
31
+ }
32
+ /**
33
+ * Define o tipo da unidade de formulário
34
+ */
35
+ export declare enum TypeFormUnitEnum {
36
+ GROUP = "GROUP",
37
+ QUESTION = "QUESTION",
38
+ GRAPHIC = "GRAPHIC",
39
+ SEPARATOR = "SEPARATOR",
40
+ MESSAGE = "MESSAGE"
41
+ }
42
+ /**
43
+ * Utilizado para FormUnitTypeEnum = QUESTION
44
+ */
45
+ export declare enum TypeAnswerEnum {
46
+ CHOICE_SINGLE = "CHOICE_SINGLE",
47
+ CHOICE_SINGLE_WITH_OTHER = "CHOICE_SINGLE_WITH_OTHER",
48
+ CHOICE_MULTIPLE = "CHOICE_MULTIPLE",
49
+ CHOICE_MULTIPLE_WITH_OTHER = "CHOICE_MULTIPLE_WITH_OTHER",
50
+ OPEN_TEXT = "OPEN_TEXT",
51
+ OPEN_TEXT_AREA = "OPEN_TEXT_AREA",
52
+ OPEN_TEXT_AREA_ADVANCED = "OPEN_TEXT_AREA_ADVANCED",// modelo WORD
53
+ OPEN_NUMBER = "OPEN_NUMBER",
54
+ OPEN_NUMBER_PERCENT = "OPEN_NUMBER_PERCENT",
55
+ RANGE_TEXT = "RANGE_TEXT",
56
+ RANGE_NUMBER = "RANGE_NUMBER",
57
+ RANGE_NUMBER_PERCENT = "RANGE_NUMBER_PERCENT",
58
+ RANGE_DATETIME = "RANGE_DATETIME",
59
+ RANGE_DATE = "RANGE_DATE",
60
+ RANGE_TIME = "RANGE_TIME",
61
+ BOOLEAN = "BOOLEAN",
62
+ DATE = "DATE"
63
+ }
64
+ export declare enum TypeValidationEnum {
65
+ TIP = "TIP",
66
+ WARNING = "WARNING",
67
+ VALIDATION = "VALIDATION"
68
+ }
69
+ export declare enum TypeOutputValidationEnum {
70
+ TEXT = "TEXT",
71
+ LINK = "LINK",
72
+ VIDEO_LINK = "VIDEO_LINK"
73
+ }
74
+ /**
75
+ * Utilizado para FormUnitTypeEnum = MESSAGE
76
+ */
77
+ export declare enum TypeMessageEnum {
78
+ MESSAGE_INFO_1 = "MESSAGE_INFO_1",
79
+ MESSAGE_INFO_2 = "MESSAGE_INFO_2",
80
+ MESSAGE_WARNING_1 = "MESSAGE_WARNING_1",
81
+ MESSAGE_WARNING_2 = "MESSAGE_WARNING_2",
82
+ MESSAGE_DANGER_1 = "MESSAGE_DANGER_1",
83
+ MESSAGE_DANGER_2 = "MESSAGE_DANGER_2"
84
+ }
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TypeMessageEnum = exports.TypeOutputValidationEnum = exports.TypeValidationEnum = exports.TypeAnswerEnum = exports.TypeFormUnitEnum = exports.OwnerEnum = exports.TypeFormEnum = exports.CategoryFormEnum = exports.MetTargetConditionEnum = exports.StatusQPCEnum = exports.GenreEnum = void 0;
4
+ var GenreEnum;
5
+ (function (GenreEnum) {
6
+ GenreEnum["MALE"] = "MALE";
7
+ GenreEnum["FEMALE"] = "FEMALE";
8
+ })(GenreEnum || (exports.GenreEnum = GenreEnum = {}));
9
+ var StatusQPCEnum;
10
+ (function (StatusQPCEnum) {
11
+ StatusQPCEnum["AWAITING_IMPORT"] = "AWAITING_IMPORT";
12
+ StatusQPCEnum["IMPORTED"] = "IMPORTED";
13
+ })(StatusQPCEnum || (exports.StatusQPCEnum = StatusQPCEnum = {}));
14
+ var MetTargetConditionEnum;
15
+ (function (MetTargetConditionEnum) {
16
+ MetTargetConditionEnum["ADULT"] = "ADULT";
17
+ MetTargetConditionEnum["OLD_ADULT"] = "OLD_ADULT";
18
+ MetTargetConditionEnum["WHEELCHAIR"] = "WHEELCHAIR";
19
+ })(MetTargetConditionEnum || (exports.MetTargetConditionEnum = MetTargetConditionEnum = {}));
20
+ var CategoryFormEnum;
21
+ (function (CategoryFormEnum) {
22
+ CategoryFormEnum["PROFILE"] = "PROFILE";
23
+ CategoryFormEnum["QPC"] = "QPC";
24
+ CategoryFormEnum["QA"] = "QA";
25
+ CategoryFormEnum["ANAMNESE"] = "ANAMNESE";
26
+ CategoryFormEnum["ANTROPHOMETRIC"] = "ANTROPHOMETRIC";
27
+ CategoryFormEnum["ENERGY_EXPENDITURE"] = "ENERGY_EXPENDITURE";
28
+ CategoryFormEnum["EXAM_RESULT"] = "EXAM_RESULT";
29
+ })(CategoryFormEnum || (exports.CategoryFormEnum = CategoryFormEnum = {}));
30
+ var TypeFormEnum;
31
+ (function (TypeFormEnum) {
32
+ TypeFormEnum["STRUCTURED"] = "STRUCTURED";
33
+ TypeFormEnum["FREE_TEXT"] = "FREE_TEXT";
34
+ })(TypeFormEnum || (exports.TypeFormEnum = TypeFormEnum = {}));
35
+ var OwnerEnum;
36
+ (function (OwnerEnum) {
37
+ OwnerEnum["SYSTEM"] = "SYSTEM";
38
+ OwnerEnum["NUTRITIONIST_REFERENCE"] = "NUTRITIONIST_REFERENCE";
39
+ OwnerEnum["ACCOUNT"] = "ACCOUNT";
40
+ })(OwnerEnum || (exports.OwnerEnum = OwnerEnum = {}));
41
+ /**
42
+ * Define o tipo da unidade de formulário
43
+ */
44
+ var TypeFormUnitEnum;
45
+ (function (TypeFormUnitEnum) {
46
+ TypeFormUnitEnum["GROUP"] = "GROUP";
47
+ TypeFormUnitEnum["QUESTION"] = "QUESTION";
48
+ TypeFormUnitEnum["GRAPHIC"] = "GRAPHIC";
49
+ TypeFormUnitEnum["SEPARATOR"] = "SEPARATOR";
50
+ TypeFormUnitEnum["MESSAGE"] = "MESSAGE";
51
+ })(TypeFormUnitEnum || (exports.TypeFormUnitEnum = TypeFormUnitEnum = {}));
52
+ /**
53
+ * Utilizado para FormUnitTypeEnum = QUESTION
54
+ */
55
+ var TypeAnswerEnum;
56
+ (function (TypeAnswerEnum) {
57
+ TypeAnswerEnum["CHOICE_SINGLE"] = "CHOICE_SINGLE";
58
+ TypeAnswerEnum["CHOICE_SINGLE_WITH_OTHER"] = "CHOICE_SINGLE_WITH_OTHER";
59
+ TypeAnswerEnum["CHOICE_MULTIPLE"] = "CHOICE_MULTIPLE";
60
+ TypeAnswerEnum["CHOICE_MULTIPLE_WITH_OTHER"] = "CHOICE_MULTIPLE_WITH_OTHER";
61
+ TypeAnswerEnum["OPEN_TEXT"] = "OPEN_TEXT";
62
+ TypeAnswerEnum["OPEN_TEXT_AREA"] = "OPEN_TEXT_AREA";
63
+ TypeAnswerEnum["OPEN_TEXT_AREA_ADVANCED"] = "OPEN_TEXT_AREA_ADVANCED";
64
+ TypeAnswerEnum["OPEN_NUMBER"] = "OPEN_NUMBER";
65
+ TypeAnswerEnum["OPEN_NUMBER_PERCENT"] = "OPEN_NUMBER_PERCENT";
66
+ TypeAnswerEnum["RANGE_TEXT"] = "RANGE_TEXT";
67
+ TypeAnswerEnum["RANGE_NUMBER"] = "RANGE_NUMBER";
68
+ TypeAnswerEnum["RANGE_NUMBER_PERCENT"] = "RANGE_NUMBER_PERCENT";
69
+ TypeAnswerEnum["RANGE_DATETIME"] = "RANGE_DATETIME";
70
+ TypeAnswerEnum["RANGE_DATE"] = "RANGE_DATE";
71
+ TypeAnswerEnum["RANGE_TIME"] = "RANGE_TIME";
72
+ TypeAnswerEnum["BOOLEAN"] = "BOOLEAN";
73
+ TypeAnswerEnum["DATE"] = "DATE";
74
+ })(TypeAnswerEnum || (exports.TypeAnswerEnum = TypeAnswerEnum = {}));
75
+ var TypeValidationEnum;
76
+ (function (TypeValidationEnum) {
77
+ TypeValidationEnum["TIP"] = "TIP";
78
+ TypeValidationEnum["WARNING"] = "WARNING";
79
+ TypeValidationEnum["VALIDATION"] = "VALIDATION";
80
+ })(TypeValidationEnum || (exports.TypeValidationEnum = TypeValidationEnum = {}));
81
+ var TypeOutputValidationEnum;
82
+ (function (TypeOutputValidationEnum) {
83
+ TypeOutputValidationEnum["TEXT"] = "TEXT";
84
+ TypeOutputValidationEnum["LINK"] = "LINK";
85
+ TypeOutputValidationEnum["VIDEO_LINK"] = "VIDEO_LINK";
86
+ })(TypeOutputValidationEnum || (exports.TypeOutputValidationEnum = TypeOutputValidationEnum = {}));
87
+ /**
88
+ * Utilizado para FormUnitTypeEnum = MESSAGE
89
+ */
90
+ var TypeMessageEnum;
91
+ (function (TypeMessageEnum) {
92
+ TypeMessageEnum["MESSAGE_INFO_1"] = "MESSAGE_INFO_1";
93
+ TypeMessageEnum["MESSAGE_INFO_2"] = "MESSAGE_INFO_2";
94
+ TypeMessageEnum["MESSAGE_WARNING_1"] = "MESSAGE_WARNING_1";
95
+ TypeMessageEnum["MESSAGE_WARNING_2"] = "MESSAGE_WARNING_2";
96
+ TypeMessageEnum["MESSAGE_DANGER_1"] = "MESSAGE_DANGER_1";
97
+ TypeMessageEnum["MESSAGE_DANGER_2"] = "MESSAGE_DANGER_2";
98
+ })(TypeMessageEnum || (exports.TypeMessageEnum = TypeMessageEnum = {}));
@@ -1,26 +1,6 @@
1
1
  import { Schema } from "mongoose";
2
- import { IDefault } from "../IDefault";
3
- /**
4
- * Define aonde o formulário é aplicado
5
- */
6
- export declare enum CategoryFormEnum {
7
- PROFILE = "PROFILE",//criadas ao cadastrar o paciente (idade, sexo, etc), toda alteracao no cadastro deve atualizar essas respostas
8
- QPC = "QPC",
9
- QA = "QA",
10
- ANAMNESE = "ANAMNESE",
11
- ANTROPHOMETRIC = "ANTROPHOMETRIC",
12
- ENERGY_EXPENDITURE = "ENERGY_EXPENDITURE",
13
- EXAM_RESULT = "EXAM_RESULT"
14
- }
15
- export declare enum TypeFormEnum {
16
- STRUCTURED = "STRUCTURED",
17
- FREE_TEXT = "FREE_TEXT"
18
- }
19
- export declare enum OwnerEnum {
20
- SYSTEM = "SYSTEM",
21
- NUTRITIONIST_REFERENCE = "NUTRITIONIST_REFERENCE",
22
- ACCOUNT = "ACCOUNT"
23
- }
2
+ import { IDefault } from "../Default";
3
+ import { CategoryFormEnum, OwnerEnum, TypeFormEnum } from "../enum";
24
4
  export interface IForm extends IDefault {
25
5
  type: TypeFormEnum;
26
6
  category: CategoryFormEnum;
@@ -1,38 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FormSchema = exports.OwnerEnum = exports.TypeFormEnum = exports.CategoryFormEnum = void 0;
3
+ exports.FormSchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
- // import { AdminQuestionSchema, CategoryQuestionEnum } from "./AdminQuestionV2";
6
- /**
7
- * Define aonde o formulário é aplicado
8
- */
9
- var CategoryFormEnum;
10
- (function (CategoryFormEnum) {
11
- CategoryFormEnum["PROFILE"] = "PROFILE";
12
- CategoryFormEnum["QPC"] = "QPC";
13
- CategoryFormEnum["QA"] = "QA";
14
- CategoryFormEnum["ANAMNESE"] = "ANAMNESE";
15
- CategoryFormEnum["ANTROPHOMETRIC"] = "ANTROPHOMETRIC";
16
- CategoryFormEnum["ENERGY_EXPENDITURE"] = "ENERGY_EXPENDITURE";
17
- CategoryFormEnum["EXAM_RESULT"] = "EXAM_RESULT";
18
- })(CategoryFormEnum || (exports.CategoryFormEnum = CategoryFormEnum = {}));
19
- var TypeFormEnum;
20
- (function (TypeFormEnum) {
21
- TypeFormEnum["STRUCTURED"] = "STRUCTURED";
22
- TypeFormEnum["FREE_TEXT"] = "FREE_TEXT";
23
- })(TypeFormEnum || (exports.TypeFormEnum = TypeFormEnum = {}));
24
- var OwnerEnum;
25
- (function (OwnerEnum) {
26
- OwnerEnum["SYSTEM"] = "SYSTEM";
27
- OwnerEnum["NUTRITIONIST_REFERENCE"] = "NUTRITIONIST_REFERENCE";
28
- OwnerEnum["ACCOUNT"] = "ACCOUNT";
29
- })(OwnerEnum || (exports.OwnerEnum = OwnerEnum = {}));
5
+ const enum_1 = require("../enum");
30
6
  exports.FormSchema = new mongoose_1.Schema({
31
7
  //account só é usado quando o form for montado por uma conta, quando for default ele deve estar sem preenchimento
32
8
  account: { type: mongoose_1.Schema.Types.ObjectId, ref: "account" },
33
- type: { type: String, enum: TypeFormEnum, required: true },
34
- category: { type: String, enum: CategoryFormEnum, required: true },
35
- owner: { type: String, enum: OwnerEnum, required: true },
9
+ type: { type: String, enum: enum_1.TypeFormEnum, required: true },
10
+ category: { type: String, enum: enum_1.CategoryFormEnum, required: true },
11
+ owner: { type: String, enum: enum_1.OwnerEnum, required: true },
36
12
  name: { type: String, required: true },
37
13
  description: { type: String },
38
14
  observation: { type: String },
@@ -1,59 +1,7 @@
1
1
  import { Schema, Types } from "mongoose";
2
- import { IDefault } from "../IDefault";
3
- import { CategoryFormEnum, IForm } from "./Form";
4
- /**
5
- * Define o tipo da unidade de formulário
6
- */
7
- export declare enum TypeFormUnitEnum {
8
- GROUP = "GROUP",
9
- QUESTION = "QUESTION",
10
- GRAPHIC = "GRAPHIC",
11
- SEPARATOR = "SEPARATOR",
12
- MESSAGE = "MESSAGE"
13
- }
14
- /**
15
- * Utilizado para FormUnitTypeEnum = QUESTION
16
- */
17
- export declare enum TypeAnswerEnum {
18
- CHOICE_SINGLE = "CHOICE_SINGLE",
19
- CHOICE_SINGLE_WITH_OTHER = "CHOICE_SINGLE_WITH_OTHER",
20
- CHOICE_MULTIPLE = "CHOICE_MULTIPLE",
21
- CHOICE_MULTIPLE_WITH_OTHER = "CHOICE_MULTIPLE_WITH_OTHER",
22
- OPEN_TEXT = "OPEN_TEXT",
23
- OPEN_TEXT_AREA = "OPEN_TEXT_AREA",
24
- OPEN_TEXT_AREA_ADVANCED = "OPEN_TEXT_AREA_ADVANCED",// modelo WORD
25
- OPEN_NUMBER = "OPEN_NUMBER",
26
- OPEN_NUMBER_PERCENT = "OPEN_NUMBER_PERCENT",
27
- RANGE_TEXT = "RANGE_TEXT",
28
- RANGE_NUMBER = "RANGE_NUMBER",
29
- RANGE_NUMBER_PERCENT = "RANGE_NUMBER_PERCENT",
30
- RANGE_DATETIME = "RANGE_DATETIME",
31
- RANGE_DATE = "RANGE_DATE",
32
- RANGE_TIME = "RANGE_TIME",
33
- BOOLEAN = "BOOLEAN",
34
- DATE = "DATE"
35
- }
36
- export declare enum TypeValidationEnum {
37
- TIP = "TIP",
38
- WARNING = "WARNING",
39
- VALIDATION = "VALIDATION"
40
- }
41
- export declare enum TypeOutputValidationEnum {
42
- TEXT = "TEXT",
43
- LINK = "LINK",
44
- VIDEO_LINK = "VIDEO_LINK"
45
- }
46
- /**
47
- * Utilizado para FormUnitTypeEnum = MESSAGE
48
- */
49
- export declare enum TypeMessageEnum {
50
- MESSAGE_INFO_1 = "MESSAGE_INFO_1",
51
- MESSAGE_INFO_2 = "MESSAGE_INFO_2",
52
- MESSAGE_WARNING_1 = "MESSAGE_WARNING_1",
53
- MESSAGE_WARNING_2 = "MESSAGE_WARNING_2",
54
- MESSAGE_DANGER_1 = "MESSAGE_DANGER_1",
55
- MESSAGE_DANGER_2 = "MESSAGE_DANGER_2"
56
- }
2
+ import { IDefault } from "../Default";
3
+ import { CategoryFormEnum, TypeAnswerEnum, TypeFormUnitEnum, TypeOutputValidationEnum, TypeValidationEnum } from "../enum";
4
+ import { IForm } from "./Form";
57
5
  /**
58
6
  * Utilizado para FormUnitTypeEnum = GRAPHIC
59
7
  */
@@ -1,66 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FormUnitSchema = exports.ValidationSchema = 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 = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
- const Form_1 = require("./Form");
6
- /**
7
- * Define o tipo da unidade de formulário
8
- */
9
- var TypeFormUnitEnum;
10
- (function (TypeFormUnitEnum) {
11
- TypeFormUnitEnum["GROUP"] = "GROUP";
12
- TypeFormUnitEnum["QUESTION"] = "QUESTION";
13
- TypeFormUnitEnum["GRAPHIC"] = "GRAPHIC";
14
- TypeFormUnitEnum["SEPARATOR"] = "SEPARATOR";
15
- TypeFormUnitEnum["MESSAGE"] = "MESSAGE";
16
- })(TypeFormUnitEnum || (exports.TypeFormUnitEnum = TypeFormUnitEnum = {}));
17
- /**
18
- * Utilizado para FormUnitTypeEnum = QUESTION
19
- */
20
- var TypeAnswerEnum;
21
- (function (TypeAnswerEnum) {
22
- TypeAnswerEnum["CHOICE_SINGLE"] = "CHOICE_SINGLE";
23
- TypeAnswerEnum["CHOICE_SINGLE_WITH_OTHER"] = "CHOICE_SINGLE_WITH_OTHER";
24
- TypeAnswerEnum["CHOICE_MULTIPLE"] = "CHOICE_MULTIPLE";
25
- TypeAnswerEnum["CHOICE_MULTIPLE_WITH_OTHER"] = "CHOICE_MULTIPLE_WITH_OTHER";
26
- TypeAnswerEnum["OPEN_TEXT"] = "OPEN_TEXT";
27
- TypeAnswerEnum["OPEN_TEXT_AREA"] = "OPEN_TEXT_AREA";
28
- TypeAnswerEnum["OPEN_TEXT_AREA_ADVANCED"] = "OPEN_TEXT_AREA_ADVANCED";
29
- TypeAnswerEnum["OPEN_NUMBER"] = "OPEN_NUMBER";
30
- TypeAnswerEnum["OPEN_NUMBER_PERCENT"] = "OPEN_NUMBER_PERCENT";
31
- TypeAnswerEnum["RANGE_TEXT"] = "RANGE_TEXT";
32
- TypeAnswerEnum["RANGE_NUMBER"] = "RANGE_NUMBER";
33
- TypeAnswerEnum["RANGE_NUMBER_PERCENT"] = "RANGE_NUMBER_PERCENT";
34
- TypeAnswerEnum["RANGE_DATETIME"] = "RANGE_DATETIME";
35
- TypeAnswerEnum["RANGE_DATE"] = "RANGE_DATE";
36
- TypeAnswerEnum["RANGE_TIME"] = "RANGE_TIME";
37
- TypeAnswerEnum["BOOLEAN"] = "BOOLEAN";
38
- TypeAnswerEnum["DATE"] = "DATE";
39
- })(TypeAnswerEnum || (exports.TypeAnswerEnum = TypeAnswerEnum = {}));
40
- var TypeValidationEnum;
41
- (function (TypeValidationEnum) {
42
- TypeValidationEnum["TIP"] = "TIP";
43
- TypeValidationEnum["WARNING"] = "WARNING";
44
- TypeValidationEnum["VALIDATION"] = "VALIDATION";
45
- })(TypeValidationEnum || (exports.TypeValidationEnum = TypeValidationEnum = {}));
46
- var TypeOutputValidationEnum;
47
- (function (TypeOutputValidationEnum) {
48
- TypeOutputValidationEnum["TEXT"] = "TEXT";
49
- TypeOutputValidationEnum["LINK"] = "LINK";
50
- TypeOutputValidationEnum["VIDEO_LINK"] = "VIDEO_LINK";
51
- })(TypeOutputValidationEnum || (exports.TypeOutputValidationEnum = TypeOutputValidationEnum = {}));
52
- /**
53
- * Utilizado para FormUnitTypeEnum = MESSAGE
54
- */
55
- var TypeMessageEnum;
56
- (function (TypeMessageEnum) {
57
- TypeMessageEnum["MESSAGE_INFO_1"] = "MESSAGE_INFO_1";
58
- TypeMessageEnum["MESSAGE_INFO_2"] = "MESSAGE_INFO_2";
59
- TypeMessageEnum["MESSAGE_WARNING_1"] = "MESSAGE_WARNING_1";
60
- TypeMessageEnum["MESSAGE_WARNING_2"] = "MESSAGE_WARNING_2";
61
- TypeMessageEnum["MESSAGE_DANGER_1"] = "MESSAGE_DANGER_1";
62
- TypeMessageEnum["MESSAGE_DANGER_2"] = "MESSAGE_DANGER_2";
63
- })(TypeMessageEnum || (exports.TypeMessageEnum = TypeMessageEnum = {}));
5
+ const enum_1 = require("../enum");
64
6
  exports.RequestGraphicDataSchema = new mongoose_1.Schema({
65
7
  method: { type: String, required: true },
66
8
  url: { type: String, required: true },
@@ -79,11 +21,11 @@ exports.QuestionOptionSchema = new mongoose_1.Schema({
79
21
  active: { type: Boolean, required: true, default: true }
80
22
  }, { _id: false });
81
23
  exports.ValidationSchema = new mongoose_1.Schema({
82
- type: { type: String, enum: TypeValidationEnum, required: true },
24
+ type: { type: String, enum: enum_1.TypeValidationEnum, required: true },
83
25
  typeOutput: {
84
26
  type: String,
85
- enum: TypeOutputValidationEnum,
86
- default: TypeOutputValidationEnum.TEXT
27
+ enum: enum_1.TypeOutputValidationEnum,
28
+ default: enum_1.TypeOutputValidationEnum.TEXT
87
29
  },
88
30
  formulaToMessage: { type: String, required: true }
89
31
  }, { _id: false });
@@ -101,11 +43,11 @@ exports.FormUnitSchema = new mongoose_1.Schema({
101
43
  column: { type: Number },
102
44
  type: {
103
45
  type: String,
104
- enum: TypeFormUnitEnum,
46
+ enum: enum_1.TypeFormUnitEnum,
105
47
  required: true
106
48
  },
107
- typeAnswer: { type: String, enum: TypeAnswerEnum },
108
- category: { type: String, enum: Form_1.CategoryFormEnum, required: true },
49
+ typeAnswer: { type: String, enum: enum_1.TypeAnswerEnum },
50
+ category: { type: String, enum: enum_1.CategoryFormEnum, required: true },
109
51
  measurementUnit: { type: String },
110
52
  options: { type: [exports.QuestionOptionSchema] },
111
53
  formulaToAnswer: { type: String },
@@ -0,0 +1,9 @@
1
+ import { MetTargetConditionEnum } from "../enum";
2
+ import { IDefaultAdmin } from "../Default";
3
+ export interface IMetActivity extends IDefaultAdmin {
4
+ activityName: string;
5
+ activityDescription: string;
6
+ activityCode: string;
7
+ metValue: number;
8
+ targetCondition: MetTargetConditionEnum;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ import { IDefault } from "../Default";
2
+ import { IMetActivity } from "./MetActivity";
3
+ export interface IMetActivityPatient extends IDefault {
4
+ patient: string;
5
+ met: IMetActivity;
6
+ sundayTime: string;
7
+ sundayTimeCoefficient: number;
8
+ mondayTime: string;
9
+ mondayTimeCoefficient: number;
10
+ tuesdayTime: string;
11
+ tuesdayTimeCoefficient: number;
12
+ wednesdayTime: string;
13
+ wednesdayTimeCoefficient: number;
14
+ thursdayTime: string;
15
+ thursdayTimeCoefficient: number;
16
+ fridayTime: string;
17
+ fridayTimeCoefficient: number;
18
+ saturdayTime: string;
19
+ saturdayTimeCoefficient: number;
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,15 +1,8 @@
1
1
  import { Schema, Types } from "mongoose";
2
- import { IFile } from "../File";
3
- import { IDefault } from "../IDefault";
2
+ import { IDefault } from "../Default";
4
3
  import { IForm } from "../form/Form";
5
- export declare enum StatusQPCEnum {
6
- AWAITING_IMPORT = "AWAITING_IMPORT",
7
- IMPORTED = "IMPORTED"
8
- }
4
+ import { StatusQPCEnum } from "../enum";
9
5
  export interface IQPC extends IDefault {
10
- name: string;
11
- photo: IFile;
12
- bornDate: Date;
13
6
  answeredDateTime: Date;
14
7
  status: StatusQPCEnum;
15
8
  form: Types.ObjectId | IForm;
@@ -20,43 +13,19 @@ export declare const QPCSchema: Schema<any, import("mongoose").Model<any, any, a
20
13
  updatedAt: string;
21
14
  };
22
15
  }, {} & {
23
- name: string;
24
16
  account: any;
25
17
  form: any;
26
- bornDate: NativeDate;
27
18
  status: string;
28
- photo?: ({} & {
29
- description: string;
30
- contentType: string;
31
- url?: string | null | undefined;
32
- format?: string | null | undefined;
33
- }) | null | undefined;
34
19
  answeredDateTime?: NativeDate | null | undefined;
35
20
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
36
- name: string;
37
21
  account: any;
38
22
  form: any;
39
- bornDate: NativeDate;
40
23
  status: string;
41
- photo?: ({} & {
42
- description: string;
43
- contentType: string;
44
- url?: string | null | undefined;
45
- format?: string | null | undefined;
46
- }) | null | undefined;
47
24
  answeredDateTime?: NativeDate | null | undefined;
48
25
  }>, {}> & import("mongoose").FlatRecord<{} & {
49
- name: string;
50
26
  account: any;
51
27
  form: any;
52
- bornDate: NativeDate;
53
28
  status: string;
54
- photo?: ({} & {
55
- description: string;
56
- contentType: string;
57
- url?: string | null | undefined;
58
- format?: string | null | undefined;
59
- }) | null | undefined;
60
29
  answeredDateTime?: NativeDate | null | undefined;
61
30
  }> & {
62
31
  _id: Types.ObjectId;
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QPCSchema = exports.StatusQPCEnum = void 0;
3
+ exports.QPCSchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
- const File_1 = require("../File");
6
- var StatusQPCEnum;
7
- (function (StatusQPCEnum) {
8
- StatusQPCEnum["AWAITING_IMPORT"] = "AWAITING_IMPORT";
9
- StatusQPCEnum["IMPORTED"] = "IMPORTED";
10
- })(StatusQPCEnum || (exports.StatusQPCEnum = StatusQPCEnum = {}));
5
+ const enum_1 = require("../enum");
11
6
  exports.QPCSchema = new mongoose_1.Schema({
12
7
  account: { type: mongoose_1.Types.ObjectId, ref: "account", required: true },
13
- name: { type: String, required: true },
14
- photo: { type: File_1.FileSchema },
15
- bornDate: { type: Date, required: true },
16
8
  answeredDateTime: { type: Date },
17
- status: { type: String, enum: StatusQPCEnum, default: StatusQPCEnum.AWAITING_IMPORT },
9
+ status: { type: String, enum: enum_1.StatusQPCEnum, default: enum_1.StatusQPCEnum.AWAITING_IMPORT },
18
10
  form: { type: mongoose_1.Types.ObjectId, ref: "form", required: true }
19
11
  }, {
20
12
  timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
@@ -1,5 +1,5 @@
1
1
  import { Schema, Types } from "mongoose";
2
- import { IAnswer } from "../IAnswer";
2
+ import { IAnswer } from "../Answer";
3
3
  import { IQPC } from "./QPC";
4
4
  export interface IQPCAnswer extends IAnswer {
5
5
  qpc: Types.ObjectId | IQPC;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-clinical",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "Biblioteca Typescript para API NodeJS",
5
5
  "repository": "https://github.com/cabralsilva/c2-clinical.git",
6
6
  "author": "Daniel Cabral <cabralconsultoriaemsoftware@gmail.com>",