c2-clinical 1.0.23 → 1.0.25

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.
@@ -9,6 +9,7 @@ export interface IAddress {
9
9
  neighborhood: string;
10
10
  typeNeighborhood: string;
11
11
  typeStreet: string;
12
+ cityCodeIbge: string;
12
13
  city: Types.ObjectId | ICity;
13
14
  }
14
15
  export declare const AddressSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
@@ -22,6 +23,7 @@ export declare const AddressSchema: Schema<any, import("mongoose").Model<any, an
22
23
  neighborhood?: string | null | undefined;
23
24
  typeNeighborhood?: string | null | undefined;
24
25
  typeStreet?: string | null | undefined;
26
+ cityCodeIbge?: string | null | undefined;
25
27
  city?: any;
26
28
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
27
29
  description: string;
@@ -32,6 +34,7 @@ export declare const AddressSchema: Schema<any, import("mongoose").Model<any, an
32
34
  neighborhood?: string | null | undefined;
33
35
  typeNeighborhood?: string | null | undefined;
34
36
  typeStreet?: string | null | undefined;
37
+ cityCodeIbge?: string | null | undefined;
35
38
  city?: any;
36
39
  }>, {}> & import("mongoose").FlatRecord<{
37
40
  description: string;
@@ -42,6 +45,7 @@ export declare const AddressSchema: Schema<any, import("mongoose").Model<any, an
42
45
  neighborhood?: string | null | undefined;
43
46
  typeNeighborhood?: string | null | undefined;
44
47
  typeStreet?: string | null | undefined;
48
+ cityCodeIbge?: string | null | undefined;
45
49
  city?: any;
46
50
  }> & {
47
51
  _id: Types.ObjectId;
@@ -11,6 +11,7 @@ exports.AddressSchema = new mongoose_1.Schema({
11
11
  neighborhood: { type: String },
12
12
  typeNeighborhood: { type: String },
13
13
  typeStreet: { type: String },
14
+ cityCodeIbge: { type: String },
14
15
  city: { type: mongoose_1.Schema.Types.ObjectId, ref: "city" }
15
16
  }, {
16
17
  _id: false
@@ -7,7 +7,7 @@ export interface ICity extends IDefaultAdmin {
7
7
  code: string;
8
8
  state: Types.ObjectId | IState;
9
9
  }
10
- export declare const AdminCityModel: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
10
+ export declare const CitySchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
11
11
  timestamps: {
12
12
  createdAt: string;
13
13
  updatedAt: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AdminCityModel = void 0;
3
+ exports.CitySchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
- exports.AdminCityModel = new mongoose_1.Schema({
5
+ exports.CitySchema = new mongoose_1.Schema({
6
6
  name: { type: String, required: true },
7
7
  abbreviation: { type: String },
8
8
  code: { type: String, required: true },
@@ -10,4 +10,4 @@ exports.AdminCityModel = new mongoose_1.Schema({
10
10
  }, {
11
11
  timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
12
12
  });
13
- exports.AdminCityModel.index({ name: 1, state: 1 }, { unique: true });
13
+ exports.CitySchema.index({ name: 1, state: 1 }, { unique: true });
@@ -81,6 +81,7 @@ export declare const PatientSchema: Schema<any, import("mongoose").Model<any, an
81
81
  neighborhood?: string | null | undefined;
82
82
  typeNeighborhood?: string | null | undefined;
83
83
  typeStreet?: string | null | undefined;
84
+ cityCodeIbge?: string | null | undefined;
84
85
  city?: any;
85
86
  }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
86
87
  description: string;
@@ -91,6 +92,7 @@ export declare const PatientSchema: Schema<any, import("mongoose").Model<any, an
91
92
  neighborhood?: string | null | undefined;
92
93
  typeNeighborhood?: string | null | undefined;
93
94
  typeStreet?: string | null | undefined;
95
+ cityCodeIbge?: string | null | undefined;
94
96
  city?: any;
95
97
  }> & {
96
98
  description: string;
@@ -101,6 +103,7 @@ export declare const PatientSchema: Schema<any, import("mongoose").Model<any, an
101
103
  neighborhood?: string | null | undefined;
102
104
  typeNeighborhood?: string | null | undefined;
103
105
  typeStreet?: string | null | undefined;
106
+ cityCodeIbge?: string | null | undefined;
104
107
  city?: any;
105
108
  }>;
106
109
  email?: string | null | undefined;
@@ -146,6 +149,7 @@ export declare const PatientSchema: Schema<any, import("mongoose").Model<any, an
146
149
  neighborhood?: string | null | undefined;
147
150
  typeNeighborhood?: string | null | undefined;
148
151
  typeStreet?: string | null | undefined;
152
+ cityCodeIbge?: string | null | undefined;
149
153
  city?: any;
150
154
  }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
151
155
  description: string;
@@ -156,6 +160,7 @@ export declare const PatientSchema: Schema<any, import("mongoose").Model<any, an
156
160
  neighborhood?: string | null | undefined;
157
161
  typeNeighborhood?: string | null | undefined;
158
162
  typeStreet?: string | null | undefined;
163
+ cityCodeIbge?: string | null | undefined;
159
164
  city?: any;
160
165
  }> & {
161
166
  description: string;
@@ -166,6 +171,7 @@ export declare const PatientSchema: Schema<any, import("mongoose").Model<any, an
166
171
  neighborhood?: string | null | undefined;
167
172
  typeNeighborhood?: string | null | undefined;
168
173
  typeStreet?: string | null | undefined;
174
+ cityCodeIbge?: string | null | undefined;
169
175
  city?: any;
170
176
  }>;
171
177
  email?: string | null | undefined;
@@ -211,6 +217,7 @@ export declare const PatientSchema: Schema<any, import("mongoose").Model<any, an
211
217
  neighborhood?: string | null | undefined;
212
218
  typeNeighborhood?: string | null | undefined;
213
219
  typeStreet?: string | null | undefined;
220
+ cityCodeIbge?: string | null | undefined;
214
221
  city?: any;
215
222
  }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
216
223
  description: string;
@@ -221,6 +228,7 @@ export declare const PatientSchema: Schema<any, import("mongoose").Model<any, an
221
228
  neighborhood?: string | null | undefined;
222
229
  typeNeighborhood?: string | null | undefined;
223
230
  typeStreet?: string | null | undefined;
231
+ cityCodeIbge?: string | null | undefined;
224
232
  city?: any;
225
233
  }> & {
226
234
  description: string;
@@ -231,6 +239,7 @@ export declare const PatientSchema: Schema<any, import("mongoose").Model<any, an
231
239
  neighborhood?: string | null | undefined;
232
240
  typeNeighborhood?: string | null | undefined;
233
241
  typeStreet?: string | null | undefined;
242
+ cityCodeIbge?: string | null | undefined;
234
243
  city?: any;
235
244
  }>;
236
245
  email?: string | null | undefined;
@@ -0,0 +1,62 @@
1
+ import { Schema, Types } from "mongoose";
2
+ import { IDefault } from "../Default";
3
+ import { IForm } from "../form/Form";
4
+ export interface IQA extends IDefault {
5
+ answeredDateTime: Date;
6
+ form: Types.ObjectId | IForm;
7
+ }
8
+ export declare const QARecurrencechema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
9
+ timestamps: {
10
+ createdAt: string;
11
+ updatedAt: string;
12
+ };
13
+ }, {} & {
14
+ account: any;
15
+ form: any;
16
+ patient: any;
17
+ recurrence?: {
18
+ daysOfWeek: string[];
19
+ daysOfMonth: number[];
20
+ specificsDate: any;
21
+ code?: string | null | undefined;
22
+ period?: string | null | undefined;
23
+ intervalOfPeriods?: number | null | undefined;
24
+ intervalInDays?: number | null | undefined;
25
+ repeatUntilXBookings?: number | null | undefined;
26
+ repeatUntilDate?: NativeDate | null | undefined;
27
+ } | null | undefined;
28
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
29
+ account: any;
30
+ form: any;
31
+ patient: any;
32
+ recurrence?: {
33
+ daysOfWeek: string[];
34
+ daysOfMonth: number[];
35
+ specificsDate: any;
36
+ code?: string | null | undefined;
37
+ period?: string | null | undefined;
38
+ intervalOfPeriods?: number | null | undefined;
39
+ intervalInDays?: number | null | undefined;
40
+ repeatUntilXBookings?: number | null | undefined;
41
+ repeatUntilDate?: NativeDate | null | undefined;
42
+ } | null | undefined;
43
+ }>, {}> & import("mongoose").FlatRecord<{} & {
44
+ account: any;
45
+ form: any;
46
+ patient: any;
47
+ recurrence?: {
48
+ daysOfWeek: string[];
49
+ daysOfMonth: number[];
50
+ specificsDate: any;
51
+ code?: string | null | undefined;
52
+ period?: string | null | undefined;
53
+ intervalOfPeriods?: number | null | undefined;
54
+ intervalInDays?: number | null | undefined;
55
+ repeatUntilXBookings?: number | null | undefined;
56
+ repeatUntilDate?: NativeDate | null | undefined;
57
+ } | null | undefined;
58
+ }> & {
59
+ _id: Types.ObjectId;
60
+ } & {
61
+ __v: number;
62
+ }>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QARecurrencechema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const Recurrence_1 = require("./Recurrence");
6
+ exports.QARecurrencechema = new mongoose_1.Schema({
7
+ account: { type: mongoose_1.Types.ObjectId, ref: "account", required: true },
8
+ form: { type: mongoose_1.Types.ObjectId, ref: "form", required: true },
9
+ patient: { type: mongoose_1.Types.ObjectId, ref: "patient", required: true },
10
+ recurrence: { type: Recurrence_1.RecurrenceSchema }
11
+ }, {
12
+ timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
13
+ });
@@ -0,0 +1,102 @@
1
+ import * as mongoose from "mongoose";
2
+ export declare enum RecurrencePeriod {
3
+ INTERVAL_DAILY_FIXED = "INTERVAL_DAILY_FIXED",
4
+ DAYS_SPECIFIC = "DAYS_SPECIFIC",
5
+ DAILY = "DAILY",
6
+ WEEKLY = "WEEKLY",
7
+ BI_WEEKLY = "BI_WEEKLY",
8
+ MONTHLY = "MONTHLY",
9
+ BI_MONTHLY = "BI_MONTHLY",
10
+ TRI_MONTHLY = "TRI_MONTHLY",
11
+ YEARLY = "YEARLY"
12
+ }
13
+ export declare enum RecurrenceDaysOfWeek {
14
+ "SUNDAY" = "sunday",
15
+ "MONDAY" = "monday",
16
+ "TUESDAY" = "tuesday",
17
+ "WEDNESDAY" = "wednesday",
18
+ "THURSDAY" = "thursday",
19
+ "FRIDAY" = "friday",
20
+ "SATURDAY" = "saturday"
21
+ }
22
+ export declare enum RecurrenceDaysOfMonth {
23
+ "_1" = 1,
24
+ "_2" = 2,
25
+ "_3" = 3,
26
+ "_4" = 4,
27
+ "_5" = 5,
28
+ "_6" = 6,
29
+ "_7" = 7,
30
+ "_8" = 8,
31
+ "_9" = 9,
32
+ "_10" = 10,
33
+ "_11" = 11,
34
+ "_12" = 12,
35
+ "_13" = 13,
36
+ "_14" = 14,
37
+ "_15" = 15,
38
+ "_16" = 16,
39
+ "_17" = 17,
40
+ "_18" = 18,
41
+ "_19" = 19,
42
+ "_20" = 20,
43
+ "_21" = 21,
44
+ "_22" = 22,
45
+ "_23" = 23,
46
+ "_24" = 24,
47
+ "_25" = 25,
48
+ "_26" = 26,
49
+ "_27" = 27,
50
+ "_28" = 28,
51
+ "_29" = 29,
52
+ "_30" = 30,
53
+ "_31" = 31
54
+ }
55
+ export declare const RecurrenceSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
56
+ _id: false;
57
+ }, {
58
+ daysOfWeek: string[];
59
+ daysOfMonth: number[];
60
+ specificsDate: any;
61
+ code?: string | null | undefined;
62
+ period?: string | null | undefined;
63
+ intervalOfPeriods?: number | null | undefined;
64
+ intervalInDays?: number | null | undefined;
65
+ repeatUntilXBookings?: number | null | undefined;
66
+ repeatUntilDate?: NativeDate | null | undefined;
67
+ }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
68
+ daysOfWeek: string[];
69
+ daysOfMonth: number[];
70
+ specificsDate: any;
71
+ code?: string | null | undefined;
72
+ period?: string | null | undefined;
73
+ intervalOfPeriods?: number | null | undefined;
74
+ intervalInDays?: number | null | undefined;
75
+ repeatUntilXBookings?: number | null | undefined;
76
+ repeatUntilDate?: NativeDate | null | undefined;
77
+ }>, {}> & mongoose.FlatRecord<{
78
+ daysOfWeek: string[];
79
+ daysOfMonth: number[];
80
+ specificsDate: any;
81
+ code?: string | null | undefined;
82
+ period?: string | null | undefined;
83
+ intervalOfPeriods?: number | null | undefined;
84
+ intervalInDays?: number | null | undefined;
85
+ repeatUntilXBookings?: number | null | undefined;
86
+ repeatUntilDate?: NativeDate | null | undefined;
87
+ }> & {
88
+ _id: mongoose.Types.ObjectId;
89
+ } & {
90
+ __v: number;
91
+ }>;
92
+ export interface IRecurrence {
93
+ code: string;
94
+ intervalInDays: number;
95
+ period: RecurrencePeriod;
96
+ intervalOfPeriods: number;
97
+ repeatUntilX: number;
98
+ repeatUntilDate: Date;
99
+ daysOfWeek: RecurrenceDaysOfWeek[];
100
+ daysOfMonth: number[];
101
+ specificsDate: Date[];
102
+ }
@@ -0,0 +1,116 @@
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.RecurrenceSchema = exports.RecurrenceDaysOfMonth = exports.RecurrenceDaysOfWeek = exports.RecurrencePeriod = void 0;
37
+ const mongoose = __importStar(require("mongoose"));
38
+ var RecurrencePeriod;
39
+ (function (RecurrencePeriod) {
40
+ RecurrencePeriod["INTERVAL_DAILY_FIXED"] = "INTERVAL_DAILY_FIXED";
41
+ RecurrencePeriod["DAYS_SPECIFIC"] = "DAYS_SPECIFIC";
42
+ RecurrencePeriod["DAILY"] = "DAILY";
43
+ RecurrencePeriod["WEEKLY"] = "WEEKLY";
44
+ RecurrencePeriod["BI_WEEKLY"] = "BI_WEEKLY";
45
+ RecurrencePeriod["MONTHLY"] = "MONTHLY";
46
+ RecurrencePeriod["BI_MONTHLY"] = "BI_MONTHLY";
47
+ RecurrencePeriod["TRI_MONTHLY"] = "TRI_MONTHLY";
48
+ RecurrencePeriod["YEARLY"] = "YEARLY";
49
+ })(RecurrencePeriod || (exports.RecurrencePeriod = RecurrencePeriod = {}));
50
+ var RecurrenceDaysOfWeek;
51
+ (function (RecurrenceDaysOfWeek) {
52
+ RecurrenceDaysOfWeek["SUNDAY"] = "sunday";
53
+ RecurrenceDaysOfWeek["MONDAY"] = "monday";
54
+ RecurrenceDaysOfWeek["TUESDAY"] = "tuesday";
55
+ RecurrenceDaysOfWeek["WEDNESDAY"] = "wednesday";
56
+ RecurrenceDaysOfWeek["THURSDAY"] = "thursday";
57
+ RecurrenceDaysOfWeek["FRIDAY"] = "friday";
58
+ RecurrenceDaysOfWeek["SATURDAY"] = "saturday";
59
+ })(RecurrenceDaysOfWeek || (exports.RecurrenceDaysOfWeek = RecurrenceDaysOfWeek = {}));
60
+ var RecurrenceDaysOfMonth;
61
+ (function (RecurrenceDaysOfMonth) {
62
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_1"] = 1] = "_1";
63
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_2"] = 2] = "_2";
64
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_3"] = 3] = "_3";
65
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_4"] = 4] = "_4";
66
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_5"] = 5] = "_5";
67
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_6"] = 6] = "_6";
68
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_7"] = 7] = "_7";
69
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_8"] = 8] = "_8";
70
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_9"] = 9] = "_9";
71
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_10"] = 10] = "_10";
72
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_11"] = 11] = "_11";
73
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_12"] = 12] = "_12";
74
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_13"] = 13] = "_13";
75
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_14"] = 14] = "_14";
76
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_15"] = 15] = "_15";
77
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_16"] = 16] = "_16";
78
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_17"] = 17] = "_17";
79
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_18"] = 18] = "_18";
80
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_19"] = 19] = "_19";
81
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_20"] = 20] = "_20";
82
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_21"] = 21] = "_21";
83
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_22"] = 22] = "_22";
84
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_23"] = 23] = "_23";
85
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_24"] = 24] = "_24";
86
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_25"] = 25] = "_25";
87
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_26"] = 26] = "_26";
88
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_27"] = 27] = "_27";
89
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_28"] = 28] = "_28";
90
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_29"] = 29] = "_29";
91
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_30"] = 30] = "_30";
92
+ RecurrenceDaysOfMonth[RecurrenceDaysOfMonth["_31"] = 31] = "_31";
93
+ })(RecurrenceDaysOfMonth || (exports.RecurrenceDaysOfMonth = RecurrenceDaysOfMonth = {}));
94
+ exports.RecurrenceSchema = new mongoose.Schema({
95
+ code: { type: String },
96
+ period: { type: String, enum: RecurrencePeriod },
97
+ intervalOfPeriods: { type: Number },
98
+ intervalInDays: { type: Number },
99
+ repeatUntilXBookings: { type: Number },
100
+ repeatUntilDate: { type: Date },
101
+ daysOfWeek: { type: [String], enum: RecurrenceDaysOfWeek },
102
+ daysOfMonth: {
103
+ type: [Number],
104
+ min: 1,
105
+ max: 31,
106
+ validate: {
107
+ validator: function (value) {
108
+ return !value || value.every((v) => v >= 1 && v <= 31);
109
+ },
110
+ message: (props) => `${props.value} não é uma lista de dias do mês válido. Os valores devem estar entre 1 e 31.`
111
+ }
112
+ },
113
+ specificsDate: { type: [Date] }
114
+ }, {
115
+ _id: false
116
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-clinical",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
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>",