openchs-models 1.31.15 → 1.31.16
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/AbstractEncounter.js +0 -35
- package/dist/Checklist.js +2 -41
- package/dist/ChecklistItem.js +4 -42
- package/dist/Comment.js +2 -41
- package/dist/Encounter.js +4 -9
- package/dist/EntityApprovalStatus.js +2 -41
- package/dist/GroupSubject.js +2 -41
- package/dist/IdentifierAssignment.js +2 -41
- package/dist/Individual.js +4 -42
- package/dist/ProgramEncounter.js +4 -9
- package/dist/ProgramEnrolment.js +4 -42
- package/dist/SubjectMigration.js +2 -41
- package/dist/assignment/UserSubjectAssignment.js +2 -41
- package/dist/draft/DraftEncounter.js +0 -3
- package/dist/program/SubjectProgramEligibility.js +2 -41
- package/dist/relationship/IndividualRelationship.js +6 -41
- package/dist/task/Task.js +2 -41
- package/dist/task/TaskUnAssignment.js +2 -41
- package/dist/utility/ResourceUtil.js +0 -4
- package/package.json +1 -1
- package/dist/utility/AuditUtil.js +0 -39
|
@@ -33,8 +33,6 @@ var _SchemaNames = _interopRequireDefault(require("./SchemaNames"));
|
|
|
33
33
|
|
|
34
34
|
var _MergeUtil = _interopRequireDefault(require("./utility/MergeUtil"));
|
|
35
35
|
|
|
36
|
-
var _AuditUtil = require("./utility/AuditUtil");
|
|
37
|
-
|
|
38
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
37
|
|
|
40
38
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -138,38 +136,6 @@ class AbstractEncounter extends _BaseEntity.default {
|
|
|
138
136
|
this.that.approvalStatuses = this.fromEntityList(x);
|
|
139
137
|
}
|
|
140
138
|
|
|
141
|
-
get createdBy() {
|
|
142
|
-
return this.that.createdBy;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
set createdBy(x) {
|
|
146
|
-
this.that.createdBy = x;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
get lastModifiedBy() {
|
|
150
|
-
return this.that.lastModifiedBy;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
set lastModifiedBy(x) {
|
|
154
|
-
this.that.lastModifiedBy = x;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
get createdByUUID() {
|
|
158
|
-
return this.that.createdByUUID;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
set createdByUUID(x) {
|
|
162
|
-
this.that.createdByUUID = x;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
get lastModifiedByUUID() {
|
|
166
|
-
return this.that.lastModifiedByUUID;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
set lastModifiedByUUID(x) {
|
|
170
|
-
this.that.lastModifiedByUUID = x;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
139
|
validate() {
|
|
174
140
|
return _lodash.default.isNil(this.encounterDateTime) ? [new _ValidationResult.default(false, AbstractEncounter.fieldKeys.ENCOUNTER_DATE_TIME, "emptyValidationMessage")] : [_ValidationResult.default.successful(AbstractEncounter.fieldKeys.ENCOUNTER_DATE_TIME)];
|
|
175
141
|
}
|
|
@@ -240,7 +206,6 @@ class AbstractEncounter extends _BaseEntity.default {
|
|
|
240
206
|
encounter.name = resource.name;
|
|
241
207
|
if (!_lodash.default.isNil(resource.encounterLocation)) encounter.encounterLocation = _Point.default.fromResource(resource.encounterLocation);
|
|
242
208
|
if (!_lodash.default.isNil(resource.cancelLocation)) encounter.cancelLocation = _Point.default.fromResource(resource.cancelLocation);
|
|
243
|
-
(0, _AuditUtil.mapAuditFields)(encounter, resource);
|
|
244
209
|
return encounter;
|
|
245
210
|
}
|
|
246
211
|
|
package/dist/Checklist.js
CHANGED
|
@@ -23,14 +23,8 @@ var _SchemaNames = _interopRequireDefault(require("./SchemaNames"));
|
|
|
23
23
|
|
|
24
24
|
var _EntityApprovalStatus = _interopRequireDefault(require("./EntityApprovalStatus"));
|
|
25
25
|
|
|
26
|
-
var _AuditUtil = require("./utility/AuditUtil");
|
|
27
|
-
|
|
28
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
27
|
|
|
30
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
-
|
|
32
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
33
|
-
|
|
34
28
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
29
|
|
|
36
30
|
class Checklist extends _BaseEntity.default {
|
|
@@ -70,38 +64,6 @@ class Checklist extends _BaseEntity.default {
|
|
|
70
64
|
this.that.programEnrolment = this.fromObject(x);
|
|
71
65
|
}
|
|
72
66
|
|
|
73
|
-
get createdBy() {
|
|
74
|
-
return this.that.createdBy;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
set createdBy(x) {
|
|
78
|
-
this.that.createdBy = x;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
get lastModifiedBy() {
|
|
82
|
-
return this.that.lastModifiedBy;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
set lastModifiedBy(x) {
|
|
86
|
-
this.that.lastModifiedBy = x;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
get createdByUUID() {
|
|
90
|
-
return this.that.createdByUUID;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
set createdByUUID(x) {
|
|
94
|
-
this.that.createdByUUID = x;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
get lastModifiedByUUID() {
|
|
98
|
-
return this.that.lastModifiedByUUID;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
set lastModifiedByUUID(x) {
|
|
102
|
-
this.that.lastModifiedByUUID = x;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
67
|
static create() {
|
|
106
68
|
const checklist = new Checklist();
|
|
107
69
|
checklist.uuid = _General.default.randomUUID();
|
|
@@ -117,7 +79,6 @@ class Checklist extends _BaseEntity.default {
|
|
|
117
79
|
const checklistDetail = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(checklistResource, "checklistDetailUUID"), _ChecklistDetail.default.schema.name);
|
|
118
80
|
checklist.programEnrolment = programEnrolment;
|
|
119
81
|
checklist.detail = checklistDetail;
|
|
120
|
-
(0, _AuditUtil.mapAuditFields)(checklist, checklistResource);
|
|
121
82
|
return checklist;
|
|
122
83
|
}
|
|
123
84
|
|
|
@@ -176,7 +137,7 @@ class Checklist extends _BaseEntity.default {
|
|
|
176
137
|
_defineProperty(Checklist, "schema", {
|
|
177
138
|
name: _SchemaNames.default.Checklist,
|
|
178
139
|
primaryKey: "uuid",
|
|
179
|
-
properties:
|
|
140
|
+
properties: {
|
|
180
141
|
uuid: "string",
|
|
181
142
|
detail: "ChecklistDetail",
|
|
182
143
|
baseDate: "date",
|
|
@@ -185,7 +146,7 @@ _defineProperty(Checklist, "schema", {
|
|
|
185
146
|
objectType: "ChecklistItem"
|
|
186
147
|
},
|
|
187
148
|
programEnrolment: "ProgramEnrolment"
|
|
188
|
-
}
|
|
149
|
+
}
|
|
189
150
|
});
|
|
190
151
|
|
|
191
152
|
_defineProperty(Checklist, "merge", () => _BaseEntity.default.mergeOn("items"));
|
package/dist/ChecklistItem.js
CHANGED
|
@@ -31,14 +31,8 @@ var _Observation = _interopRequireDefault(require("./Observation"));
|
|
|
31
31
|
|
|
32
32
|
var _MergeUtil = _interopRequireDefault(require("./utility/MergeUtil"));
|
|
33
33
|
|
|
34
|
-
var _AuditUtil = require("./utility/AuditUtil");
|
|
35
|
-
|
|
36
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
35
|
|
|
38
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
39
|
-
|
|
40
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
41
|
-
|
|
42
36
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
43
37
|
|
|
44
38
|
const mergeMap = new Map([[_SchemaNames.default.EntityApprovalStatus, "approvalStatuses"]]);
|
|
@@ -84,38 +78,6 @@ class ChecklistItem extends _BaseEntity.default {
|
|
|
84
78
|
return _lodash.default.maxBy(this.approvalStatuses, 'statusDateTime');
|
|
85
79
|
}
|
|
86
80
|
|
|
87
|
-
get createdBy() {
|
|
88
|
-
return this.that.createdBy;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
set createdBy(x) {
|
|
92
|
-
this.that.createdBy = x;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
get lastModifiedBy() {
|
|
96
|
-
return this.that.lastModifiedBy;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
set lastModifiedBy(x) {
|
|
100
|
-
this.that.lastModifiedBy = x;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
get createdByUUID() {
|
|
104
|
-
return this.that.createdByUUID;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
set createdByUUID(x) {
|
|
108
|
-
this.that.createdByUUID = x;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
get lastModifiedByUUID() {
|
|
112
|
-
return this.that.lastModifiedByUUID;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
set lastModifiedByUUID(x) {
|
|
116
|
-
this.that.lastModifiedByUUID = x;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
81
|
static create({
|
|
120
82
|
uuid = _General.default.randomUUID(),
|
|
121
83
|
observations = [],
|
|
@@ -138,7 +100,6 @@ class ChecklistItem extends _BaseEntity.default {
|
|
|
138
100
|
|
|
139
101
|
checklistItem.checklist = checklist;
|
|
140
102
|
checklistItem.detail = checklistItemDetail;
|
|
141
|
-
(0, _AuditUtil.mapAuditFields)(checklistItem, checklistItemResource);
|
|
142
103
|
return checklistItem;
|
|
143
104
|
}
|
|
144
105
|
|
|
@@ -353,7 +314,7 @@ class ChecklistItem extends _BaseEntity.default {
|
|
|
353
314
|
_defineProperty(ChecklistItem, "schema", {
|
|
354
315
|
name: _SchemaNames.default.ChecklistItem,
|
|
355
316
|
primaryKey: "uuid",
|
|
356
|
-
properties:
|
|
317
|
+
properties: {
|
|
357
318
|
uuid: "string",
|
|
358
319
|
detail: "ChecklistItemDetail",
|
|
359
320
|
completionDate: {
|
|
@@ -372,8 +333,9 @@ _defineProperty(ChecklistItem, "schema", {
|
|
|
372
333
|
latestEntityApprovalStatus: {
|
|
373
334
|
type: "EntityApprovalStatus",
|
|
374
335
|
optional: true
|
|
375
|
-
}
|
|
376
|
-
|
|
336
|
+
} //Reporting purposes
|
|
337
|
+
|
|
338
|
+
}
|
|
377
339
|
});
|
|
378
340
|
|
|
379
341
|
_defineProperty(ChecklistItem, "merge", childEntityName => _MergeUtil.default.getMergeFunction(childEntityName, mergeMap));
|
package/dist/Comment.js
CHANGED
|
@@ -19,14 +19,8 @@ var _CommentThread = _interopRequireDefault(require("./CommentThread"));
|
|
|
19
19
|
|
|
20
20
|
var _SchemaNames = _interopRequireDefault(require("./SchemaNames"));
|
|
21
21
|
|
|
22
|
-
var _AuditUtil = require("./utility/AuditUtil");
|
|
23
|
-
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
23
|
|
|
26
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
-
|
|
28
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
29
|
-
|
|
30
24
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
25
|
|
|
32
26
|
class Comment extends _BaseEntity.default {
|
|
@@ -90,38 +84,6 @@ class Comment extends _BaseEntity.default {
|
|
|
90
84
|
this.that.commentThread = this.fromObject(x);
|
|
91
85
|
}
|
|
92
86
|
|
|
93
|
-
get createdBy() {
|
|
94
|
-
return this.that.createdBy;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
set createdBy(x) {
|
|
98
|
-
this.that.createdBy = x;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
get lastModifiedBy() {
|
|
102
|
-
return this.that.lastModifiedBy;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
set lastModifiedBy(x) {
|
|
106
|
-
this.that.lastModifiedBy = x;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
get createdByUUID() {
|
|
110
|
-
return this.that.createdByUUID;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
set createdByUUID(x) {
|
|
114
|
-
this.that.createdByUUID = x;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
get lastModifiedByUUID() {
|
|
118
|
-
return this.that.lastModifiedByUUID;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
set lastModifiedByUUID(x) {
|
|
122
|
-
this.that.lastModifiedByUUID = x;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
87
|
get toResource() {
|
|
126
88
|
const resource = _lodash.default.pick(this, ["uuid", "text", "voided"]);
|
|
127
89
|
|
|
@@ -136,7 +98,6 @@ class Comment extends _BaseEntity.default {
|
|
|
136
98
|
comment.createdByUsername = resource["createdBy"];
|
|
137
99
|
comment.subject = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(resource, "individualUUID"), _Individual.default.schema.name);
|
|
138
100
|
comment.commentThread = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(resource, "commentThreadUUID"), _CommentThread.default.schema.name);
|
|
139
|
-
(0, _AuditUtil.mapAuditFields)(comment, resource);
|
|
140
101
|
return comment;
|
|
141
102
|
}
|
|
142
103
|
|
|
@@ -193,7 +154,7 @@ class Comment extends _BaseEntity.default {
|
|
|
193
154
|
_defineProperty(Comment, "schema", {
|
|
194
155
|
name: _SchemaNames.default.Comment,
|
|
195
156
|
primaryKey: "uuid",
|
|
196
|
-
properties:
|
|
157
|
+
properties: {
|
|
197
158
|
uuid: "string",
|
|
198
159
|
text: "string",
|
|
199
160
|
subject: "Individual",
|
|
@@ -206,7 +167,7 @@ _defineProperty(Comment, "schema", {
|
|
|
206
167
|
type: "bool",
|
|
207
168
|
default: false
|
|
208
169
|
}
|
|
209
|
-
}
|
|
170
|
+
}
|
|
210
171
|
});
|
|
211
172
|
|
|
212
173
|
var _default = Comment;
|
package/dist/Encounter.js
CHANGED
|
@@ -27,14 +27,8 @@ var _SchemaNames = _interopRequireDefault(require("./SchemaNames"));
|
|
|
27
27
|
|
|
28
28
|
var _BaseEntity = _interopRequireDefault(require("./BaseEntity"));
|
|
29
29
|
|
|
30
|
-
var _AuditUtil = require("./utility/AuditUtil");
|
|
31
|
-
|
|
32
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
31
|
|
|
34
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
35
|
-
|
|
36
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
37
|
-
|
|
38
32
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
33
|
|
|
40
34
|
class Encounter extends _AbstractEncounter.default {
|
|
@@ -124,7 +118,7 @@ class Encounter extends _AbstractEncounter.default {
|
|
|
124
118
|
_defineProperty(Encounter, "schema", {
|
|
125
119
|
name: _SchemaNames.default.Encounter,
|
|
126
120
|
primaryKey: "uuid",
|
|
127
|
-
properties:
|
|
121
|
+
properties: {
|
|
128
122
|
uuid: "string",
|
|
129
123
|
encounterType: "EncounterType",
|
|
130
124
|
encounterDateTime: {
|
|
@@ -175,8 +169,9 @@ _defineProperty(Encounter, "schema", {
|
|
|
175
169
|
latestEntityApprovalStatus: {
|
|
176
170
|
type: "EntityApprovalStatus",
|
|
177
171
|
optional: true
|
|
178
|
-
}
|
|
179
|
-
|
|
172
|
+
} //Reporting purposes
|
|
173
|
+
|
|
174
|
+
}
|
|
180
175
|
});
|
|
181
176
|
|
|
182
177
|
_defineProperty(Encounter, "validationKeys", {
|
|
@@ -17,14 +17,8 @@ var _lodash = _interopRequireDefault(require("lodash"));
|
|
|
17
17
|
|
|
18
18
|
var _SchemaNames = _interopRequireDefault(require("./SchemaNames"));
|
|
19
19
|
|
|
20
|
-
var _AuditUtil = require("./utility/AuditUtil");
|
|
21
|
-
|
|
22
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
21
|
|
|
24
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
-
|
|
26
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
27
|
-
|
|
28
22
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
23
|
|
|
30
24
|
function getMatchingApprovalStatusEntities(entities, approvalStatus_status) {
|
|
@@ -108,38 +102,6 @@ class EntityApprovalStatus extends _BaseEntity.default {
|
|
|
108
102
|
this.that.autoApproved = x;
|
|
109
103
|
}
|
|
110
104
|
|
|
111
|
-
get createdBy() {
|
|
112
|
-
return this.that.createdBy;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
set createdBy(x) {
|
|
116
|
-
this.that.createdBy = x;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
get lastModifiedBy() {
|
|
120
|
-
return this.that.lastModifiedBy;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
set lastModifiedBy(x) {
|
|
124
|
-
this.that.lastModifiedBy = x;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
get createdByUUID() {
|
|
128
|
-
return this.that.createdByUUID;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
set createdByUUID(x) {
|
|
132
|
-
this.that.createdByUUID = x;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
get lastModifiedByUUID() {
|
|
136
|
-
return this.that.lastModifiedByUUID;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
set lastModifiedByUUID(x) {
|
|
140
|
-
this.that.lastModifiedByUUID = x;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
105
|
get toResource() {
|
|
144
106
|
const resource = _lodash.default.pick(this, ["uuid", "entityType", "approvalStatusComment", "autoApproved", "voided"]);
|
|
145
107
|
|
|
@@ -155,7 +117,6 @@ class EntityApprovalStatus extends _BaseEntity.default {
|
|
|
155
117
|
|
|
156
118
|
entityApprovalStatus.approvalStatus = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(resource, "approvalStatusUUID"), _ApprovalStatus.default.schema.name);
|
|
157
119
|
entityApprovalStatus.entityUUID = _ResourceUtil.default.getUUIDFor(resource, "entityUUID");
|
|
158
|
-
(0, _AuditUtil.mapAuditFields)(entityApprovalStatus, resource);
|
|
159
120
|
return entityApprovalStatus;
|
|
160
121
|
}
|
|
161
122
|
|
|
@@ -212,7 +173,7 @@ class EntityApprovalStatus extends _BaseEntity.default {
|
|
|
212
173
|
_defineProperty(EntityApprovalStatus, "schema", {
|
|
213
174
|
name: _SchemaNames.default.EntityApprovalStatus,
|
|
214
175
|
primaryKey: "uuid",
|
|
215
|
-
properties:
|
|
176
|
+
properties: {
|
|
216
177
|
uuid: "string",
|
|
217
178
|
entityUUID: "string",
|
|
218
179
|
approvalStatus: "ApprovalStatus",
|
|
@@ -234,7 +195,7 @@ _defineProperty(EntityApprovalStatus, "schema", {
|
|
|
234
195
|
type: "bool",
|
|
235
196
|
default: false
|
|
236
197
|
}
|
|
237
|
-
}
|
|
198
|
+
}
|
|
238
199
|
});
|
|
239
200
|
|
|
240
201
|
_defineProperty(EntityApprovalStatus, "entityType", {
|
package/dist/GroupSubject.js
CHANGED
|
@@ -17,14 +17,8 @@ var _General = _interopRequireDefault(require("./utility/General"));
|
|
|
17
17
|
|
|
18
18
|
var _GroupRole = _interopRequireDefault(require("./GroupRole"));
|
|
19
19
|
|
|
20
|
-
var _AuditUtil = require("./utility/AuditUtil");
|
|
21
|
-
|
|
22
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
21
|
|
|
24
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
-
|
|
26
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
27
|
-
|
|
28
22
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
23
|
|
|
30
24
|
class GroupSubject extends _BaseEntity.default {
|
|
@@ -72,38 +66,6 @@ class GroupSubject extends _BaseEntity.default {
|
|
|
72
66
|
this.that.membershipEndDate = x;
|
|
73
67
|
}
|
|
74
68
|
|
|
75
|
-
get createdBy() {
|
|
76
|
-
return this.that.createdBy;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
set createdBy(x) {
|
|
80
|
-
this.that.createdBy = x;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
get lastModifiedBy() {
|
|
84
|
-
return this.that.lastModifiedBy;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
set lastModifiedBy(x) {
|
|
88
|
-
this.that.lastModifiedBy = x;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
get createdByUUID() {
|
|
92
|
-
return this.that.createdByUUID;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
set createdByUUID(x) {
|
|
96
|
-
this.that.createdByUUID = x;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
get lastModifiedByUUID() {
|
|
100
|
-
return this.that.lastModifiedByUUID;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
set lastModifiedByUUID(x) {
|
|
104
|
-
this.that.lastModifiedByUUID = x;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
69
|
get toResource() {
|
|
108
70
|
const resource = _lodash.default.pick(this, ["uuid"]);
|
|
109
71
|
|
|
@@ -160,7 +122,6 @@ class GroupSubject extends _BaseEntity.default {
|
|
|
160
122
|
groupSubjectEntity.groupSubject = groupOrHouseholdSubject;
|
|
161
123
|
groupSubjectEntity.memberSubject = memberSubject;
|
|
162
124
|
groupSubjectEntity.groupRole = groupRole;
|
|
163
|
-
(0, _AuditUtil.mapAuditFields)(groupSubjectEntity, resource);
|
|
164
125
|
return groupSubjectEntity;
|
|
165
126
|
}
|
|
166
127
|
|
|
@@ -229,7 +190,7 @@ _defineProperty(GroupSubject, "EXPLICIT_ERROR_CODE_KEY_FOR_MISSING_MEMBER", 'Gro
|
|
|
229
190
|
_defineProperty(GroupSubject, "schema", {
|
|
230
191
|
name: "GroupSubject",
|
|
231
192
|
primaryKey: "uuid",
|
|
232
|
-
properties:
|
|
193
|
+
properties: {
|
|
233
194
|
uuid: "string",
|
|
234
195
|
groupSubject: "Individual",
|
|
235
196
|
memberSubject: "Individual",
|
|
@@ -243,7 +204,7 @@ _defineProperty(GroupSubject, "schema", {
|
|
|
243
204
|
type: "bool",
|
|
244
205
|
default: false
|
|
245
206
|
}
|
|
246
|
-
}
|
|
207
|
+
}
|
|
247
208
|
});
|
|
248
209
|
|
|
249
210
|
var _default = GroupSubject;
|
|
@@ -19,14 +19,8 @@ var _IdentifierSource = _interopRequireDefault(require("./IdentifierSource"));
|
|
|
19
19
|
|
|
20
20
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
21
21
|
|
|
22
|
-
var _AuditUtil = require("./utility/AuditUtil");
|
|
23
|
-
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
23
|
|
|
26
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
-
|
|
28
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
29
|
-
|
|
30
24
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
25
|
|
|
32
26
|
class IdentifierAssignment extends _BaseEntity.default {
|
|
@@ -82,45 +76,12 @@ class IdentifierAssignment extends _BaseEntity.default {
|
|
|
82
76
|
this.that.used = x;
|
|
83
77
|
}
|
|
84
78
|
|
|
85
|
-
get createdBy() {
|
|
86
|
-
return this.that.createdBy;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
set createdBy(x) {
|
|
90
|
-
this.that.createdBy = x;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
get lastModifiedBy() {
|
|
94
|
-
return this.that.lastModifiedBy;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
set lastModifiedBy(x) {
|
|
98
|
-
this.that.lastModifiedBy = x;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
get createdByUUID() {
|
|
102
|
-
return this.that.createdByUUID;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
set createdByUUID(x) {
|
|
106
|
-
this.that.createdByUUID = x;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
get lastModifiedByUUID() {
|
|
110
|
-
return this.that.lastModifiedByUUID;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
set lastModifiedByUUID(x) {
|
|
114
|
-
this.that.lastModifiedByUUID = x;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
79
|
static fromResource(identifierAssignmentResource, entityService) {
|
|
118
80
|
const identifierAssignment = _General.default.assignFields(identifierAssignmentResource, new IdentifierAssignment(), ["uuid", "identifier", "assignmentOrder", "voided"]);
|
|
119
81
|
|
|
120
82
|
identifierAssignment.identifierSource = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(identifierAssignmentResource, "identifierSourceUUID"), _IdentifierSource.default.schema.name);
|
|
121
83
|
identifierAssignment.individual = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(identifierAssignmentResource, "individualUUID"), _Individual.default.schema.name);
|
|
122
84
|
identifierAssignment.programEnrolment = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(identifierAssignmentResource, "programEnrolmentUUID"), _ProgramEnrolment.default.schema.name);
|
|
123
|
-
(0, _AuditUtil.mapAuditFields)(identifierAssignment, identifierAssignmentResource);
|
|
124
85
|
return identifierAssignment;
|
|
125
86
|
}
|
|
126
87
|
|
|
@@ -151,7 +112,7 @@ exports.default = IdentifierAssignment;
|
|
|
151
112
|
_defineProperty(IdentifierAssignment, "schema", {
|
|
152
113
|
name: "IdentifierAssignment",
|
|
153
114
|
primaryKey: "uuid",
|
|
154
|
-
properties:
|
|
115
|
+
properties: {
|
|
155
116
|
uuid: "string",
|
|
156
117
|
identifierSource: "IdentifierSource",
|
|
157
118
|
identifier: "string",
|
|
@@ -173,5 +134,5 @@ _defineProperty(IdentifierAssignment, "schema", {
|
|
|
173
134
|
default: false,
|
|
174
135
|
optional: false
|
|
175
136
|
}
|
|
176
|
-
}
|
|
137
|
+
}
|
|
177
138
|
});
|
package/dist/Individual.js
CHANGED
|
@@ -53,14 +53,8 @@ var _MergeUtil = _interopRequireDefault(require("./utility/MergeUtil"));
|
|
|
53
53
|
|
|
54
54
|
var _AgeUtil = _interopRequireDefault(require("./utility/AgeUtil"));
|
|
55
55
|
|
|
56
|
-
var _AuditUtil = require("./utility/AuditUtil");
|
|
57
|
-
|
|
58
56
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
59
57
|
|
|
60
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
61
|
-
|
|
62
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
63
|
-
|
|
64
58
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
65
59
|
|
|
66
60
|
const mergeMap = new Map([[_SchemaNames.default.ProgramEnrolment, "enrolments"], [_SchemaNames.default.Encounter, "encounters"], [_SchemaNames.default.IndividualRelationship, "relationships"], [_SchemaNames.default.EntityApprovalStatus, "approvalStatuses"], [_SchemaNames.default.Comment, "comments"]]);
|
|
@@ -234,38 +228,6 @@ class Individual extends _BaseEntity.default {
|
|
|
234
228
|
this.that.approvalStatuses = this.fromEntityList(x);
|
|
235
229
|
}
|
|
236
230
|
|
|
237
|
-
get createdBy() {
|
|
238
|
-
return this.that.createdBy;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
set createdBy(x) {
|
|
242
|
-
this.that.createdBy = x;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
get lastModifiedBy() {
|
|
246
|
-
return this.that.lastModifiedBy;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
set lastModifiedBy(x) {
|
|
250
|
-
this.that.lastModifiedBy = x;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
get createdByUUID() {
|
|
254
|
-
return this.that.createdByUUID;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
set createdByUUID(x) {
|
|
258
|
-
this.that.createdByUUID = x;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
get lastModifiedByUUID() {
|
|
262
|
-
return this.that.lastModifiedByUUID;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
set lastModifiedByUUID(x) {
|
|
266
|
-
this.that.lastModifiedByUUID = x;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
231
|
static createEmptyInstance() {
|
|
270
232
|
const individual = new Individual();
|
|
271
233
|
individual.uuid = _General.default.randomUUID();
|
|
@@ -356,7 +318,6 @@ class Individual extends _BaseEntity.default {
|
|
|
356
318
|
individual.name = individual.nameString;
|
|
357
319
|
if (!_lodash.default.isNil(individualResource.registrationLocation)) individual.registrationLocation = _Point.default.fromResource(individualResource.registrationLocation);
|
|
358
320
|
individual.subjectType = subjectType;
|
|
359
|
-
(0, _AuditUtil.mapAuditFields)(individual, individualResource);
|
|
360
321
|
return individual;
|
|
361
322
|
}
|
|
362
323
|
|
|
@@ -1059,7 +1020,7 @@ class Individual extends _BaseEntity.default {
|
|
|
1059
1020
|
_defineProperty(Individual, "schema", {
|
|
1060
1021
|
name: _SchemaNames.default.Individual,
|
|
1061
1022
|
primaryKey: "uuid",
|
|
1062
|
-
properties:
|
|
1023
|
+
properties: {
|
|
1063
1024
|
uuid: "string",
|
|
1064
1025
|
subjectType: "SubjectType",
|
|
1065
1026
|
name: "string",
|
|
@@ -1133,8 +1094,9 @@ _defineProperty(Individual, "schema", {
|
|
|
1133
1094
|
latestEntityApprovalStatus: {
|
|
1134
1095
|
type: "EntityApprovalStatus",
|
|
1135
1096
|
optional: true
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1097
|
+
} //Reporting purposes
|
|
1098
|
+
|
|
1099
|
+
}
|
|
1138
1100
|
});
|
|
1139
1101
|
|
|
1140
1102
|
_defineProperty(Individual, "validationKeys", {
|
package/dist/ProgramEncounter.js
CHANGED
|
@@ -25,14 +25,8 @@ var _SchemaNames = _interopRequireDefault(require("./SchemaNames"));
|
|
|
25
25
|
|
|
26
26
|
var _BaseEntity = _interopRequireDefault(require("./BaseEntity"));
|
|
27
27
|
|
|
28
|
-
var _AuditUtil = require("./utility/AuditUtil");
|
|
29
|
-
|
|
30
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
29
|
|
|
32
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
33
|
-
|
|
34
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
35
|
-
|
|
36
30
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
37
31
|
|
|
38
32
|
class ProgramEncounter extends _AbstractEncounter.default {
|
|
@@ -170,7 +164,7 @@ _defineProperty(ProgramEncounter, "validationKeys", {
|
|
|
170
164
|
_defineProperty(ProgramEncounter, "schema", {
|
|
171
165
|
name: _SchemaNames.default.ProgramEncounter,
|
|
172
166
|
primaryKey: "uuid",
|
|
173
|
-
properties:
|
|
167
|
+
properties: {
|
|
174
168
|
uuid: {
|
|
175
169
|
type: "string"
|
|
176
170
|
},
|
|
@@ -225,8 +219,9 @@ _defineProperty(ProgramEncounter, "schema", {
|
|
|
225
219
|
latestEntityApprovalStatus: {
|
|
226
220
|
type: "EntityApprovalStatus",
|
|
227
221
|
optional: true
|
|
228
|
-
}
|
|
229
|
-
|
|
222
|
+
} //Reporting purposes
|
|
223
|
+
|
|
224
|
+
}
|
|
230
225
|
});
|
|
231
226
|
|
|
232
227
|
var _default = ProgramEncounter;
|
package/dist/ProgramEnrolment.js
CHANGED
|
@@ -41,14 +41,8 @@ var _SchemaNames = _interopRequireDefault(require("./SchemaNames"));
|
|
|
41
41
|
|
|
42
42
|
var _MergeUtil = _interopRequireDefault(require("./utility/MergeUtil"));
|
|
43
43
|
|
|
44
|
-
var _AuditUtil = require("./utility/AuditUtil");
|
|
45
|
-
|
|
46
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
47
45
|
|
|
48
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
49
|
-
|
|
50
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
51
|
-
|
|
52
46
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
53
47
|
|
|
54
48
|
const mergeMap = new Map([[_SchemaNames.default.ProgramEncounter, "encounters"], [_SchemaNames.default.Checklist, "checklists"], [_SchemaNames.default.EntityApprovalStatus, "approvalStatuses"]]);
|
|
@@ -158,38 +152,6 @@ class ProgramEnrolment extends _BaseEntity.default {
|
|
|
158
152
|
this.that.approvalStatuses = this.fromEntityList(x);
|
|
159
153
|
}
|
|
160
154
|
|
|
161
|
-
get createdBy() {
|
|
162
|
-
return this.that.createdBy;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
set createdBy(x) {
|
|
166
|
-
this.that.createdBy = x;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
get lastModifiedBy() {
|
|
170
|
-
return this.that.lastModifiedBy;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
set lastModifiedBy(x) {
|
|
174
|
-
this.that.lastModifiedBy = x;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
get createdByUUID() {
|
|
178
|
-
return this.that.createdByUUID;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
set createdByUUID(x) {
|
|
182
|
-
this.that.createdByUUID = x;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
get lastModifiedByUUID() {
|
|
186
|
-
return this.that.lastModifiedByUUID;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
set lastModifiedByUUID(x) {
|
|
190
|
-
this.that.lastModifiedByUUID = x;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
155
|
static createEmptyInstance({
|
|
194
156
|
individual,
|
|
195
157
|
program
|
|
@@ -258,7 +220,6 @@ class ProgramEnrolment extends _BaseEntity.default {
|
|
|
258
220
|
|
|
259
221
|
if (!_lodash.default.isNil(resource.enrolmentLocation)) programEnrolment.enrolmentLocation = _Point.default.fromResource(resource.enrolmentLocation);
|
|
260
222
|
if (!_lodash.default.isNil(resource.exitLocation)) programEnrolment.exitLocation = _Point.default.fromResource(resource.exitLocation);
|
|
261
|
-
(0, _AuditUtil.mapAuditFields)(programEnrolment, resource);
|
|
262
223
|
return programEnrolment;
|
|
263
224
|
}
|
|
264
225
|
|
|
@@ -675,7 +636,7 @@ class ProgramEnrolment extends _BaseEntity.default {
|
|
|
675
636
|
_defineProperty(ProgramEnrolment, "schema", {
|
|
676
637
|
name: _SchemaNames.default.ProgramEnrolment,
|
|
677
638
|
primaryKey: "uuid",
|
|
678
|
-
properties:
|
|
639
|
+
properties: {
|
|
679
640
|
uuid: "string",
|
|
680
641
|
program: "Program",
|
|
681
642
|
enrolmentDateTime: "date",
|
|
@@ -723,8 +684,9 @@ _defineProperty(ProgramEnrolment, "schema", {
|
|
|
723
684
|
latestEntityApprovalStatus: {
|
|
724
685
|
type: "EntityApprovalStatus",
|
|
725
686
|
optional: true
|
|
726
|
-
}
|
|
727
|
-
|
|
687
|
+
} //Reporting purposes
|
|
688
|
+
|
|
689
|
+
}
|
|
728
690
|
});
|
|
729
691
|
|
|
730
692
|
_defineProperty(ProgramEnrolment, "merge", childEntityName => _MergeUtil.default.getMergeFunction(childEntityName, mergeMap));
|
package/dist/SubjectMigration.js
CHANGED
|
@@ -11,14 +11,8 @@ var _BaseEntity = _interopRequireDefault(require("./BaseEntity"));
|
|
|
11
11
|
|
|
12
12
|
var _ResourceUtil = _interopRequireDefault(require("./utility/ResourceUtil"));
|
|
13
13
|
|
|
14
|
-
var _AuditUtil = require("./utility/AuditUtil");
|
|
15
|
-
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
15
|
|
|
18
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
-
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
21
|
-
|
|
22
16
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
17
|
|
|
24
18
|
class SubjectMigration extends _BaseEntity.default {
|
|
@@ -98,38 +92,6 @@ class SubjectMigration extends _BaseEntity.default {
|
|
|
98
92
|
this.that.hasMigrated = x;
|
|
99
93
|
}
|
|
100
94
|
|
|
101
|
-
get createdBy() {
|
|
102
|
-
return this.that.createdBy;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
set createdBy(x) {
|
|
106
|
-
this.that.createdBy = x;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
get lastModifiedBy() {
|
|
110
|
-
return this.that.lastModifiedBy;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
set lastModifiedBy(x) {
|
|
114
|
-
this.that.lastModifiedBy = x;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
get createdByUUID() {
|
|
118
|
-
return this.that.createdByUUID;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
set createdByUUID(x) {
|
|
122
|
-
this.that.createdByUUID = x;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
get lastModifiedByUUID() {
|
|
126
|
-
return this.that.lastModifiedByUUID;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
set lastModifiedByUUID(x) {
|
|
130
|
-
this.that.lastModifiedByUUID = x;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
95
|
static create(subjectUUID, oldAddressLevelUUID, newAddressLevelUUID, oldSyncConcept1Value, newSyncConcept1Value, oldSyncConcept2Value, newSyncConcept2Value, subjectTypeUUID) {
|
|
134
96
|
let subjectMigration = new SubjectMigration();
|
|
135
97
|
subjectMigration.uuid = _General.default.randomUUID();
|
|
@@ -155,7 +117,6 @@ class SubjectMigration extends _BaseEntity.default {
|
|
|
155
117
|
subjectMigration.newSyncConcept1Value = resource.newSyncConcept1Value;
|
|
156
118
|
subjectMigration.oldSyncConcept2Value = resource.oldSyncConcept2Value;
|
|
157
119
|
subjectMigration.newSyncConcept2Value = resource.newSyncConcept2Value;
|
|
158
|
-
(0, _AuditUtil.mapAuditFields)(subjectMigration, resource);
|
|
159
120
|
return subjectMigration;
|
|
160
121
|
}
|
|
161
122
|
|
|
@@ -179,7 +140,7 @@ class SubjectMigration extends _BaseEntity.default {
|
|
|
179
140
|
_defineProperty(SubjectMigration, "schema", {
|
|
180
141
|
name: 'SubjectMigration',
|
|
181
142
|
primaryKey: 'uuid',
|
|
182
|
-
properties:
|
|
143
|
+
properties: {
|
|
183
144
|
uuid: 'string',
|
|
184
145
|
subjectUUID: 'string',
|
|
185
146
|
oldAddressLevelUUID: {
|
|
@@ -211,7 +172,7 @@ _defineProperty(SubjectMigration, "schema", {
|
|
|
211
172
|
type: 'bool',
|
|
212
173
|
default: false
|
|
213
174
|
}
|
|
214
|
-
}
|
|
175
|
+
}
|
|
215
176
|
});
|
|
216
177
|
|
|
217
178
|
var _default = SubjectMigration;
|
|
@@ -11,14 +11,8 @@ var _ResourceUtil = _interopRequireDefault(require("../utility/ResourceUtil"));
|
|
|
11
11
|
|
|
12
12
|
var _SchemaNames = _interopRequireDefault(require("../SchemaNames"));
|
|
13
13
|
|
|
14
|
-
var _AuditUtil = require("../utility/AuditUtil");
|
|
15
|
-
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
15
|
|
|
18
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
-
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
21
|
-
|
|
22
16
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
17
|
|
|
24
18
|
class UserSubjectAssignment extends _BaseEntity.default {
|
|
@@ -34,43 +28,10 @@ class UserSubjectAssignment extends _BaseEntity.default {
|
|
|
34
28
|
this.that.subjectUUID = x;
|
|
35
29
|
}
|
|
36
30
|
|
|
37
|
-
get createdBy() {
|
|
38
|
-
return this.that.createdBy;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
set createdBy(x) {
|
|
42
|
-
this.that.createdBy = x;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
get lastModifiedBy() {
|
|
46
|
-
return this.that.lastModifiedBy;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
set lastModifiedBy(x) {
|
|
50
|
-
this.that.lastModifiedBy = x;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
get createdByUUID() {
|
|
54
|
-
return this.that.createdByUUID;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
set createdByUUID(x) {
|
|
58
|
-
this.that.createdByUUID = x;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
get lastModifiedByUUID() {
|
|
62
|
-
return this.that.lastModifiedByUUID;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
set lastModifiedByUUID(x) {
|
|
66
|
-
this.that.lastModifiedByUUID = x;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
31
|
static fromResource(resource) {
|
|
70
32
|
const userSubjectAssignment = new UserSubjectAssignment();
|
|
71
33
|
userSubjectAssignment.uuid = resource.uuid;
|
|
72
34
|
userSubjectAssignment.subjectUUID = _ResourceUtil.default.getUUIDFor(resource, 'subjectUUID');
|
|
73
|
-
(0, _AuditUtil.mapAuditFields)(userSubjectAssignment, resource);
|
|
74
35
|
return userSubjectAssignment;
|
|
75
36
|
}
|
|
76
37
|
|
|
@@ -79,10 +40,10 @@ class UserSubjectAssignment extends _BaseEntity.default {
|
|
|
79
40
|
_defineProperty(UserSubjectAssignment, "schema", {
|
|
80
41
|
name: _SchemaNames.default.UserSubjectAssignment,
|
|
81
42
|
primaryKey: 'uuid',
|
|
82
|
-
properties:
|
|
43
|
+
properties: {
|
|
83
44
|
uuid: 'string',
|
|
84
45
|
subjectUUID: 'string'
|
|
85
|
-
}
|
|
46
|
+
}
|
|
86
47
|
});
|
|
87
48
|
|
|
88
49
|
var _default = UserSubjectAssignment;
|
|
@@ -133,8 +133,6 @@ class DraftEncounter extends _BaseEntity.default {
|
|
|
133
133
|
draftEncounter.cancelObservations = _ObservationsHolder.default.clone(encounter.cancelObservations);
|
|
134
134
|
draftEncounter.cancelLocation = encounter.cancelLocation;
|
|
135
135
|
draftEncounter.voided = encounter.voided;
|
|
136
|
-
draftEncounter.registrationLocation = encounter.registrationLocation;
|
|
137
|
-
draftEncounter.updatedOn = new Date();
|
|
138
136
|
return draftEncounter;
|
|
139
137
|
}
|
|
140
138
|
|
|
@@ -153,7 +151,6 @@ class DraftEncounter extends _BaseEntity.default {
|
|
|
153
151
|
encounter.cancelObservations = _ObservationsHolder.default.clone(this.cancelObservations);
|
|
154
152
|
encounter.cancelLocation = this.cancelLocation;
|
|
155
153
|
encounter.voided = this.voided;
|
|
156
|
-
encounter.registrationLocation = this.registrationLocation;
|
|
157
154
|
encounter.approvalStatuses = [];
|
|
158
155
|
return encounter;
|
|
159
156
|
}
|
|
@@ -23,14 +23,8 @@ var _lodash = _interopRequireDefault(require("lodash"));
|
|
|
23
23
|
|
|
24
24
|
var _SchemaNames = _interopRequireDefault(require("../SchemaNames"));
|
|
25
25
|
|
|
26
|
-
var _AuditUtil = require("../utility/AuditUtil");
|
|
27
|
-
|
|
28
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
27
|
|
|
30
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
-
|
|
32
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
33
|
-
|
|
34
28
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
29
|
|
|
36
30
|
class SubjectProgramEligibility extends _BaseEntity.default {
|
|
@@ -78,38 +72,6 @@ class SubjectProgramEligibility extends _BaseEntity.default {
|
|
|
78
72
|
this.that.observations = this.fromEntityList(x);
|
|
79
73
|
}
|
|
80
74
|
|
|
81
|
-
get createdBy() {
|
|
82
|
-
return this.that.createdBy;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
set createdBy(x) {
|
|
86
|
-
this.that.createdBy = x;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
get lastModifiedBy() {
|
|
90
|
-
return this.that.lastModifiedBy;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
set lastModifiedBy(x) {
|
|
94
|
-
this.that.lastModifiedBy = x;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
get createdByUUID() {
|
|
98
|
-
return this.that.createdByUUID;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
set createdByUUID(x) {
|
|
102
|
-
this.that.createdByUUID = x;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
get lastModifiedByUUID() {
|
|
106
|
-
return this.that.lastModifiedByUUID;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
set lastModifiedByUUID(x) {
|
|
110
|
-
this.that.lastModifiedByUUID = x;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
75
|
static createEmptyInstance(program, subject) {
|
|
114
76
|
const subjectProgramEligibility = new SubjectProgramEligibility();
|
|
115
77
|
subjectProgramEligibility.checkDate = new Date();
|
|
@@ -145,7 +107,6 @@ class SubjectProgramEligibility extends _BaseEntity.default {
|
|
|
145
107
|
|
|
146
108
|
subjectProgramEligibility.program = program;
|
|
147
109
|
subjectProgramEligibility.subject = subject;
|
|
148
|
-
(0, _AuditUtil.mapAuditFields)(subjectProgramEligibility, resource);
|
|
149
110
|
return subjectProgramEligibility;
|
|
150
111
|
}
|
|
151
112
|
|
|
@@ -210,7 +171,7 @@ class SubjectProgramEligibility extends _BaseEntity.default {
|
|
|
210
171
|
_defineProperty(SubjectProgramEligibility, "schema", {
|
|
211
172
|
name: _SchemaNames.default.SubjectProgramEligibility,
|
|
212
173
|
primaryKey: "uuid",
|
|
213
|
-
properties:
|
|
174
|
+
properties: {
|
|
214
175
|
uuid: "string",
|
|
215
176
|
subject: "Individual",
|
|
216
177
|
program: "Program",
|
|
@@ -227,7 +188,7 @@ _defineProperty(SubjectProgramEligibility, "schema", {
|
|
|
227
188
|
type: "bool",
|
|
228
189
|
default: false
|
|
229
190
|
}
|
|
230
|
-
}
|
|
191
|
+
}
|
|
231
192
|
});
|
|
232
193
|
|
|
233
194
|
var _default = SubjectProgramEligibility;
|
|
@@ -21,17 +21,15 @@ var _Observation = _interopRequireDefault(require("../Observation"));
|
|
|
21
21
|
|
|
22
22
|
var _SchemaNames = _interopRequireDefault(require("../SchemaNames"));
|
|
23
23
|
|
|
24
|
-
var _AuditUtil = require("../utility/AuditUtil");
|
|
25
|
-
|
|
26
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
25
|
|
|
28
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
-
|
|
30
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
31
|
-
|
|
32
26
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
27
|
|
|
34
28
|
class IndividualRelationship extends _BaseEntity.default {
|
|
29
|
+
constructor(that = null) {
|
|
30
|
+
super(that);
|
|
31
|
+
}
|
|
32
|
+
|
|
35
33
|
get relationship() {
|
|
36
34
|
return this.toEntity("relationship", _IndividualRelationshipType.default);
|
|
37
35
|
}
|
|
@@ -80,38 +78,6 @@ class IndividualRelationship extends _BaseEntity.default {
|
|
|
80
78
|
this.that.exitObservations = this.fromEntityList(x);
|
|
81
79
|
}
|
|
82
80
|
|
|
83
|
-
get createdBy() {
|
|
84
|
-
return this.that.createdBy;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
set createdBy(x) {
|
|
88
|
-
this.that.createdBy = x;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
get lastModifiedBy() {
|
|
92
|
-
return this.that.lastModifiedBy;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
set lastModifiedBy(x) {
|
|
96
|
-
this.that.lastModifiedBy = x;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
get createdByUUID() {
|
|
100
|
-
return this.that.createdByUUID;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
set createdByUUID(x) {
|
|
104
|
-
this.that.createdByUUID = x;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
get lastModifiedByUUID() {
|
|
108
|
-
return this.that.lastModifiedByUUID;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
set lastModifiedByUUID(x) {
|
|
112
|
-
this.that.lastModifiedByUUID = x;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
81
|
static createEmptyInstance() {
|
|
116
82
|
const individualRelationship = new IndividualRelationship();
|
|
117
83
|
individualRelationship.uuid = _General.default.randomUUID();
|
|
@@ -143,7 +109,6 @@ class IndividualRelationship extends _BaseEntity.default {
|
|
|
143
109
|
individualRelationship.relationship = relationshipType;
|
|
144
110
|
individualRelationship.individualA = individualA;
|
|
145
111
|
individualRelationship.individualB = individualB;
|
|
146
|
-
(0, _AuditUtil.mapAuditFields)(individualRelationship, resource);
|
|
147
112
|
return individualRelationship;
|
|
148
113
|
}
|
|
149
114
|
|
|
@@ -192,7 +157,7 @@ class IndividualRelationship extends _BaseEntity.default {
|
|
|
192
157
|
_defineProperty(IndividualRelationship, "schema", {
|
|
193
158
|
name: _SchemaNames.default.IndividualRelationship,
|
|
194
159
|
primaryKey: "uuid",
|
|
195
|
-
properties:
|
|
160
|
+
properties: {
|
|
196
161
|
uuid: "string",
|
|
197
162
|
relationship: "IndividualRelationshipType",
|
|
198
163
|
individualA: "Individual",
|
|
@@ -213,7 +178,7 @@ _defineProperty(IndividualRelationship, "schema", {
|
|
|
213
178
|
type: "bool",
|
|
214
179
|
default: false
|
|
215
180
|
}
|
|
216
|
-
}
|
|
181
|
+
}
|
|
217
182
|
});
|
|
218
183
|
|
|
219
184
|
var _default = IndividualRelationship;
|
package/dist/task/Task.js
CHANGED
|
@@ -27,14 +27,8 @@ var _BaseEntity = _interopRequireDefault(require("../BaseEntity"));
|
|
|
27
27
|
|
|
28
28
|
var _SchemaNames = _interopRequireDefault(require("../SchemaNames"));
|
|
29
29
|
|
|
30
|
-
var _AuditUtil = require("../utility/AuditUtil");
|
|
31
|
-
|
|
32
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
31
|
|
|
34
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
35
|
-
|
|
36
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
37
|
-
|
|
38
32
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
33
|
|
|
40
34
|
class Task extends _BaseEntity.default {
|
|
@@ -106,38 +100,6 @@ class Task extends _BaseEntity.default {
|
|
|
106
100
|
this.that.taskStatus = this.fromObject(x);
|
|
107
101
|
}
|
|
108
102
|
|
|
109
|
-
get createdBy() {
|
|
110
|
-
return this.that.createdBy;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
set createdBy(x) {
|
|
114
|
-
this.that.createdBy = x;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
get lastModifiedBy() {
|
|
118
|
-
return this.that.lastModifiedBy;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
set lastModifiedBy(x) {
|
|
122
|
-
this.that.lastModifiedBy = x;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
get createdByUUID() {
|
|
126
|
-
return this.that.createdByUUID;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
set createdByUUID(x) {
|
|
130
|
-
this.that.createdByUUID = x;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
get lastModifiedByUUID() {
|
|
134
|
-
return this.that.lastModifiedByUUID;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
set lastModifiedByUUID(x) {
|
|
138
|
-
this.that.lastModifiedByUUID = x;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
103
|
get toResource() {
|
|
142
104
|
const taskResource = _lodash.default.pick(this, ["uuid", "voided", "name"]);
|
|
143
105
|
|
|
@@ -164,7 +126,6 @@ class Task extends _BaseEntity.default {
|
|
|
164
126
|
task.taskType = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(resource, "taskTypeUUID"), _TaskType.default.schema.name);
|
|
165
127
|
task.taskStatus = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(resource, "taskStatusUUID"), _TaskStatus.default.schema.name);
|
|
166
128
|
task.subject = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(resource, "subjectUUID"), _Individual.default.schema.name);
|
|
167
|
-
(0, _AuditUtil.mapAuditFields)(task, resource);
|
|
168
129
|
return task;
|
|
169
130
|
}
|
|
170
131
|
|
|
@@ -216,7 +177,7 @@ class Task extends _BaseEntity.default {
|
|
|
216
177
|
_defineProperty(Task, "schema", {
|
|
217
178
|
name: _SchemaNames.default.Task,
|
|
218
179
|
primaryKey: "uuid",
|
|
219
|
-
properties:
|
|
180
|
+
properties: {
|
|
220
181
|
uuid: "string",
|
|
221
182
|
name: "string",
|
|
222
183
|
taskType: "TaskType",
|
|
@@ -244,7 +205,7 @@ _defineProperty(Task, "schema", {
|
|
|
244
205
|
type: 'bool',
|
|
245
206
|
default: false
|
|
246
207
|
}
|
|
247
|
-
}
|
|
208
|
+
}
|
|
248
209
|
});
|
|
249
210
|
|
|
250
211
|
var _default = Task;
|
|
@@ -11,14 +11,8 @@ var _ResourceUtil = _interopRequireDefault(require("../utility/ResourceUtil"));
|
|
|
11
11
|
|
|
12
12
|
var _SchemaNames = _interopRequireDefault(require("../SchemaNames"));
|
|
13
13
|
|
|
14
|
-
var _AuditUtil = require("../utility/AuditUtil");
|
|
15
|
-
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
15
|
|
|
18
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
-
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
21
|
-
|
|
22
16
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
17
|
|
|
24
18
|
class TaskUnAssignment extends _BaseEntity.default {
|
|
@@ -42,43 +36,10 @@ class TaskUnAssignment extends _BaseEntity.default {
|
|
|
42
36
|
this.that.hasMigrated = x;
|
|
43
37
|
}
|
|
44
38
|
|
|
45
|
-
get createdBy() {
|
|
46
|
-
return this.that.createdBy;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
set createdBy(x) {
|
|
50
|
-
this.that.createdBy = x;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
get lastModifiedBy() {
|
|
54
|
-
return this.that.lastModifiedBy;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
set lastModifiedBy(x) {
|
|
58
|
-
this.that.lastModifiedBy = x;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
get createdByUUID() {
|
|
62
|
-
return this.that.createdByUUID;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
set createdByUUID(x) {
|
|
66
|
-
this.that.createdByUUID = x;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
get lastModifiedByUUID() {
|
|
70
|
-
return this.that.lastModifiedByUUID;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
set lastModifiedByUUID(x) {
|
|
74
|
-
this.that.lastModifiedByUUID = x;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
39
|
static fromResource(resource) {
|
|
78
40
|
const taskUnAssigment = new TaskUnAssignment();
|
|
79
41
|
taskUnAssigment.uuid = resource.uuid;
|
|
80
42
|
taskUnAssigment.taskUUID = _ResourceUtil.default.getUUIDFor(resource, 'taskUUID');
|
|
81
|
-
(0, _AuditUtil.mapAuditFields)(taskUnAssigment, resource);
|
|
82
43
|
return taskUnAssigment;
|
|
83
44
|
}
|
|
84
45
|
|
|
@@ -101,14 +62,14 @@ class TaskUnAssignment extends _BaseEntity.default {
|
|
|
101
62
|
_defineProperty(TaskUnAssignment, "schema", {
|
|
102
63
|
name: _SchemaNames.default.TaskUnAssignment,
|
|
103
64
|
primaryKey: 'uuid',
|
|
104
|
-
properties:
|
|
65
|
+
properties: {
|
|
105
66
|
uuid: 'string',
|
|
106
67
|
taskUUID: 'string',
|
|
107
68
|
hasMigrated: {
|
|
108
69
|
type: 'bool',
|
|
109
70
|
default: false
|
|
110
71
|
}
|
|
111
|
-
}
|
|
72
|
+
}
|
|
112
73
|
});
|
|
113
74
|
|
|
114
75
|
var _default = TaskUnAssignment;
|
|
@@ -11,10 +11,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
11
11
|
|
|
12
12
|
class ResourceUtil {
|
|
13
13
|
static getUUIDFor(resource, property) {
|
|
14
|
-
return ResourceUtil.getFieldValue(resource, property);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
static getFieldValue(resource, property) {
|
|
18
14
|
return _lodash.default.get(resource, ["_links", property, "href"]);
|
|
19
15
|
}
|
|
20
16
|
|
package/package.json
CHANGED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.mapAuditFields = exports.AuditFields = void 0;
|
|
7
|
-
|
|
8
|
-
var _ResourceUtil = _interopRequireDefault(require("./ResourceUtil"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
const AuditFields = {
|
|
13
|
-
createdBy: {
|
|
14
|
-
type: "string",
|
|
15
|
-
optional: true
|
|
16
|
-
},
|
|
17
|
-
createdByUUID: {
|
|
18
|
-
type: "string",
|
|
19
|
-
optional: true
|
|
20
|
-
},
|
|
21
|
-
lastModifiedBy: {
|
|
22
|
-
type: "string",
|
|
23
|
-
optional: true
|
|
24
|
-
},
|
|
25
|
-
lastModifiedByUUID: {
|
|
26
|
-
type: "string",
|
|
27
|
-
optional: true
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
exports.AuditFields = AuditFields;
|
|
31
|
-
|
|
32
|
-
const mapAuditFields = function (txnEntity, txnResource) {
|
|
33
|
-
txnEntity.createdBy = _ResourceUtil.default.getFieldValue(txnResource, "createdBy");
|
|
34
|
-
txnEntity.createdByUUID = _ResourceUtil.default.getFieldValue(txnResource, "createdByUUID");
|
|
35
|
-
txnEntity.lastModifiedBy = _ResourceUtil.default.getFieldValue(txnResource, "lastModifiedBy");
|
|
36
|
-
txnEntity.lastModifiedByUUID = _ResourceUtil.default.getFieldValue(txnResource, "lastModifiedByUUID");
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
exports.mapAuditFields = mapAuditFields;
|