openchs-models 1.33.2 → 1.33.5
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/.circleci/config.yml +15 -5
- package/.commit-message.txt +21 -0
- package/.nvmrc +1 -1
- package/Makefile +32 -10
- package/REALM_V12_NOTES.md +46 -0
- package/dist/AbstractEncounter.js +4 -105
- package/dist/AddressLevel.js +5 -62
- package/dist/ApprovalStatus.js +4 -17
- package/dist/BaseEntity.js +5 -42
- package/dist/BeneficiaryModePin.js +4 -13
- package/dist/Checklist.js +6 -52
- package/dist/ChecklistDetail.js +4 -22
- package/dist/ChecklistItem.js +16 -96
- package/dist/ChecklistItemDetail.js +4 -43
- package/dist/ChecklistItemStatus.js +4 -33
- package/dist/Comment.js +6 -51
- package/dist/CommentThread.js +4 -26
- package/dist/CompositeDuration.js +1 -18
- package/dist/Concept.js +5 -107
- package/dist/ConceptAnswer.js +4 -21
- package/dist/CustomDashboardCache.js +4 -38
- package/dist/CustomFilter.js +5 -15
- package/dist/Dashboard.js +4 -23
- package/dist/DashboardCache.js +4 -23
- package/dist/DashboardSection.js +4 -24
- package/dist/DashboardSectionCardMapping.js +4 -21
- package/dist/Displayable.js +3 -11
- package/dist/Documentation.js +4 -21
- package/dist/DocumentationItem.js +4 -20
- package/dist/Duration.js +4 -39
- package/dist/Encounter.js +6 -41
- package/dist/EncounterType.js +4 -26
- package/dist/EntityApprovalStatus.js +6 -56
- package/dist/EntityMetaData.js +7 -105
- package/dist/EntityQueue.js +4 -15
- package/dist/EntityRule.js +1 -29
- package/dist/EntitySyncStatus.js +4 -19
- package/dist/Extension.js +4 -18
- package/dist/Family.js +4 -56
- package/dist/FileFormat.js +0 -7
- package/dist/Gender.js +4 -17
- package/dist/GroupDashboard.js +4 -23
- package/dist/GroupPrivileges.js +4 -28
- package/dist/GroupRole.js +4 -34
- package/dist/GroupSubject.js +6 -59
- package/dist/Groups.js +4 -14
- package/dist/Identifier.js +4 -20
- package/dist/IdentifierAssignment.js +6 -45
- package/dist/IdentifierSource.js +4 -15
- package/dist/Individual.js +17 -265
- package/dist/LocaleMapping.js +4 -13
- package/dist/LocationHierarchy.js +4 -25
- package/dist/Media.js +35 -35
- package/dist/MediaQueue.js +4 -26
- package/dist/MigrationsHelper.js +15 -22
- package/dist/MyGroups.js +4 -14
- package/dist/News.js +4 -31
- package/dist/Observation.js +4 -54
- package/dist/ObservationsHolder.js +104 -216
- package/dist/OrganisationConfig.js +4 -19
- package/dist/PersistedObject.js +1 -19
- package/dist/PhoneNumber.js +0 -11
- package/dist/PlatformTranslation.js +4 -17
- package/dist/Privilege.js +5 -22
- package/dist/Program.js +4 -39
- package/dist/ProgramEncounter.js +6 -48
- package/dist/ProgramEnrolment.js +8 -162
- package/dist/ReferenceEntity.js +1 -10
- package/dist/ReportCard.js +5 -60
- package/dist/ResetSync.js +4 -17
- package/dist/Rule.js +4 -28
- package/dist/RuleDependency.js +4 -17
- package/dist/RuleFailureTelemetry.js +4 -36
- package/dist/Schema.js +16 -268
- package/dist/SchemaNames.js +3 -46
- package/dist/Settings.js +4 -53
- package/dist/StandardReportCardType.js +4 -39
- package/dist/SubjectMigration.js +6 -45
- package/dist/SubjectType.js +6 -72
- package/dist/SyncTelemetry.js +4 -40
- package/dist/Translation.js +4 -17
- package/dist/UserInfo.js +4 -33
- package/dist/application/DashboardCacheFilter.js +4 -24
- package/dist/application/Filter.js +3 -16
- package/dist/application/Form.js +6 -93
- package/dist/application/FormElement.js +5 -100
- package/dist/application/FormElementGroup.js +4 -75
- package/dist/application/FormElementStatus.js +1 -11
- package/dist/application/FormMapping.js +6 -44
- package/dist/application/Format.js +4 -20
- package/dist/application/KeyValue.js +4 -19
- package/dist/application/MenuItem.js +4 -35
- package/dist/application/MultiSelectFilter.js +1 -11
- package/dist/application/NullProgramEnrolment.js +0 -8
- package/dist/application/SingleSelectFilter.js +1 -12
- package/dist/application/StaticFormElementGroup.js +0 -11
- package/dist/application/StringKeyNumericValue.js +4 -17
- package/dist/application/ValidationResult.js +6 -20
- package/dist/application/ValidationResults.js +1 -14
- package/dist/application/WorkItem.js +4 -20
- package/dist/application/WorkList.js +1 -24
- package/dist/application/WorkLists.js +1 -13
- package/dist/assignment/UserSubjectAssignment.js +6 -26
- package/dist/draft/DraftEncounter.js +4 -40
- package/dist/draft/DraftSubject.js +4 -46
- package/dist/error/IgnorableSyncError.js +1 -6
- package/dist/error/SyncError.js +1 -6
- package/dist/framework/ArrayHelper.js +3 -11
- package/dist/framework/DefinedObjectSchema.js +4 -12
- package/dist/framework/RealmCollectionHelper.js +1 -9
- package/dist/framework/RealmEmbeddedObjectHandler.js +126 -0
- package/dist/framework/RealmListProxy.js +1 -10
- package/dist/framework/RealmObjectSchema.js +1 -11
- package/dist/framework/RealmProxy.js +15 -39
- package/dist/framework/RealmResultsProxy.js +3 -37
- package/dist/framework/RealmResultsProxyHandler.js +2 -5
- package/dist/geo/Point.js +4 -17
- package/dist/index.js +9 -137
- package/dist/location/Locations.js +1 -6
- package/dist/observation/MultipleCodedValues.js +1 -21
- package/dist/observation/PrimitiveValue.js +1 -17
- package/dist/observation/QuestionGroup.js +1 -36
- package/dist/observation/RepeatableQuestionGroup.js +4 -27
- package/dist/observation/SingleCodedValue.js +1 -15
- package/dist/program/SubjectProgramEligibility.js +6 -56
- package/dist/relationship/IndividualRelation.js +6 -18
- package/dist/relationship/IndividualRelationGenderMapping.js +4 -22
- package/dist/relationship/IndividualRelationship.js +6 -51
- package/dist/relationship/IndividualRelationshipType.js +4 -24
- package/dist/relationship/IndividualRelative.js +4 -31
- package/dist/reports/DashboardFilter.js +4 -20
- package/dist/reports/DashboardFilterConfig.js +5 -85
- package/dist/reports/NestedReportCardResult.js +5 -35
- package/dist/reports/Range.js +4 -13
- package/dist/reports/ReportCardResult.js +5 -24
- package/dist/service/MetaDataService.js +1 -30
- package/dist/task/Task.js +6 -62
- package/dist/task/TaskStatus.js +4 -21
- package/dist/task/TaskType.js +4 -23
- package/dist/task/TaskUnAssignment.js +6 -30
- package/dist/utility/AgeUtil.js +1 -15
- package/dist/utility/ArrayUtil.js +1 -6
- package/dist/utility/AuditUtil.js +1 -8
- package/dist/utility/DateTimeUtil.js +1 -8
- package/dist/utility/General.js +4 -71
- package/dist/utility/JsonStringify.js +15 -28
- package/dist/utility/MergeUtil.js +1 -10
- package/dist/utility/ResourceUtil.js +1 -7
- package/dist/videos/Video.js +4 -23
- package/dist/videos/VideoTelemetric.js +6 -37
- package/package.json +6 -3
- package/scripts/validateSchemas.js +40 -0
- package/tsconfig.json +1 -1
- package/yarn.lock +0 -6744
package/dist/ReportCard.js
CHANGED
|
@@ -4,31 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _BaseEntity = _interopRequireDefault(require("./BaseEntity"));
|
|
9
|
-
|
|
10
8
|
var _General = _interopRequireDefault(require("./utility/General"));
|
|
11
|
-
|
|
12
9
|
var _ResourceUtil = _interopRequireDefault(require("./utility/ResourceUtil"));
|
|
13
|
-
|
|
14
10
|
var _StandardReportCardType = _interopRequireDefault(require("./StandardReportCardType"));
|
|
15
|
-
|
|
16
11
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
17
|
-
|
|
18
12
|
var _SubjectType = _interopRequireDefault(require("./SubjectType"));
|
|
19
|
-
|
|
20
13
|
var _Program = _interopRequireDefault(require("./Program"));
|
|
21
|
-
|
|
22
14
|
var _EncounterType = _interopRequireDefault(require("./EncounterType"));
|
|
23
|
-
|
|
24
15
|
var _Duration = _interopRequireDefault(require("./Duration"));
|
|
25
|
-
|
|
26
16
|
var _NestedReportCardResult = _interopRequireDefault(require("./reports/NestedReportCardResult"));
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
32
21
|
class ReportCard extends _BaseEntity.default {
|
|
33
22
|
static newReportCard() {
|
|
34
23
|
const reportCard = new ReportCard();
|
|
@@ -37,112 +26,87 @@ class ReportCard extends _BaseEntity.default {
|
|
|
37
26
|
reportCard.standardReportCardInputEncounterTypes = [];
|
|
38
27
|
return reportCard;
|
|
39
28
|
}
|
|
40
|
-
|
|
41
29
|
constructor(that = null) {
|
|
42
30
|
super(that);
|
|
43
31
|
}
|
|
44
|
-
|
|
45
32
|
get name() {
|
|
46
33
|
return this.that.name;
|
|
47
34
|
}
|
|
48
|
-
|
|
49
35
|
set name(x) {
|
|
50
36
|
this.that.name = x;
|
|
51
37
|
}
|
|
52
|
-
|
|
53
38
|
get query() {
|
|
54
39
|
return this.that.query;
|
|
55
40
|
}
|
|
56
|
-
|
|
57
41
|
set query(x) {
|
|
58
42
|
this.that.query = x;
|
|
59
43
|
}
|
|
60
|
-
|
|
61
44
|
get description() {
|
|
62
45
|
return this.that.description;
|
|
63
46
|
}
|
|
64
|
-
|
|
65
47
|
set description(x) {
|
|
66
48
|
this.that.description = x;
|
|
67
49
|
}
|
|
68
|
-
|
|
69
50
|
get standardReportCardType() {
|
|
70
51
|
return this.toEntity("standardReportCardType", _StandardReportCardType.default);
|
|
71
52
|
}
|
|
72
|
-
|
|
73
53
|
set standardReportCardType(x) {
|
|
74
54
|
this.that.standardReportCardType = this.fromObject(x);
|
|
75
55
|
}
|
|
76
|
-
|
|
77
56
|
get colour() {
|
|
78
57
|
return this.that.colour;
|
|
79
58
|
}
|
|
80
|
-
|
|
81
59
|
set colour(x) {
|
|
82
60
|
this.that.colour = x;
|
|
83
61
|
}
|
|
84
|
-
|
|
85
62
|
get nested() {
|
|
86
63
|
return this.that.nested;
|
|
87
64
|
}
|
|
88
|
-
|
|
89
65
|
set nested(x) {
|
|
90
66
|
this.that.nested = x;
|
|
91
67
|
}
|
|
92
|
-
|
|
93
68
|
get countOfCards() {
|
|
94
69
|
return this.that.countOfCards;
|
|
95
70
|
}
|
|
96
|
-
|
|
97
71
|
set countOfCards(x) {
|
|
98
72
|
this.that.countOfCards = x;
|
|
99
73
|
}
|
|
100
|
-
|
|
101
74
|
get iconName() {
|
|
102
75
|
//TODO: right now not syncing the icon name uploaded from app designer.
|
|
103
76
|
return _lodash.default.isNil(this.standardReportCardType) ? null : this.standardReportCardType.iconName;
|
|
104
77
|
}
|
|
105
|
-
|
|
106
78
|
get cardColor() {
|
|
107
79
|
return _lodash.default.isNil(this.standardReportCardType) ? this.colour : this.standardReportCardType.cardColor;
|
|
108
80
|
}
|
|
109
|
-
|
|
110
81
|
get textColor() {
|
|
111
82
|
return _lodash.default.isNil(this.standardReportCardType) ? '#ffffff' : this.standardReportCardType.textColor;
|
|
112
83
|
}
|
|
113
|
-
|
|
114
84
|
get standardReportCardInputSubjectTypes() {
|
|
115
85
|
return this.toEntityList("standardReportCardInputSubjectTypes", _SubjectType.default);
|
|
116
86
|
}
|
|
117
|
-
|
|
118
87
|
set standardReportCardInputSubjectTypes(x) {
|
|
119
88
|
this.that.standardReportCardInputSubjectTypes = this.fromEntityList(x);
|
|
120
89
|
}
|
|
121
|
-
|
|
122
90
|
get standardReportCardInputPrograms() {
|
|
123
91
|
return this.toEntityList("standardReportCardInputPrograms", _Program.default);
|
|
124
92
|
}
|
|
125
|
-
|
|
126
93
|
set standardReportCardInputPrograms(x) {
|
|
127
94
|
this.that.standardReportCardInputPrograms = this.fromEntityList(x);
|
|
128
95
|
}
|
|
129
|
-
|
|
130
96
|
get standardReportCardInputEncounterTypes() {
|
|
131
97
|
return this.toEntityList("standardReportCardInputEncounterTypes", _EncounterType.default);
|
|
132
98
|
}
|
|
133
|
-
|
|
134
99
|
set standardReportCardInputEncounterTypes(x) {
|
|
135
100
|
this.that.standardReportCardInputEncounterTypes = this.fromEntityList(x);
|
|
136
101
|
}
|
|
137
|
-
|
|
138
102
|
getStandardReportCardInputRecentDuration() {
|
|
139
103
|
const duration = JSON.parse(this.that.standardReportCardInputRecentDurationJSON);
|
|
140
104
|
return new _Duration.default(duration.value, duration.unit);
|
|
141
105
|
}
|
|
142
|
-
|
|
143
106
|
setStandardReportCardInputRecentDurationJSON(x) {
|
|
144
107
|
this.that.standardReportCardInputRecentDurationJSON = x;
|
|
145
108
|
}
|
|
109
|
+
|
|
146
110
|
/**
|
|
147
111
|
* Helper method used to generate unique key value for Nested Report Cards using UUID and Index of the Report Card.
|
|
148
112
|
* The Nested Report Card's query responses would be mapped to the corresponding Dashboard Report cards using the UUID and Index.
|
|
@@ -150,27 +114,20 @@ class ReportCard extends _BaseEntity.default {
|
|
|
150
114
|
* @param index
|
|
151
115
|
* @returns {string}
|
|
152
116
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
155
117
|
getCardId(index = 0) {
|
|
156
118
|
return this.uuid + '#' + index;
|
|
157
119
|
}
|
|
158
|
-
|
|
159
120
|
getCardName(response, index = 0) {
|
|
160
121
|
return _lodash.default.get(response, `reportCards[${index}].name`) || this.name;
|
|
161
122
|
}
|
|
162
|
-
|
|
163
123
|
getCardColor(response, index = 0) {
|
|
164
124
|
return _lodash.default.get(response, `reportCards[${index}].cardColor`) || this.cardColor;
|
|
165
125
|
}
|
|
166
|
-
|
|
167
126
|
getTextColor(response, index = 0) {
|
|
168
127
|
return _lodash.default.get(response, `reportCards[${index}].textColor`) || this.textColor;
|
|
169
128
|
}
|
|
170
|
-
|
|
171
129
|
static fromResource(resource, entityService) {
|
|
172
130
|
const reportCard = _General.default.assignFields(resource, ReportCard.newReportCard(), ["uuid", "name", "query", "description", "colour", "voided", "nested", "countOfCards"]);
|
|
173
|
-
|
|
174
131
|
reportCard.standardReportCardType = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(resource, "standardReportCardUUID"), _StandardReportCardType.default.schema.name);
|
|
175
132
|
resource.standardReportCardInputSubjectTypes.forEach(uuid => {
|
|
176
133
|
reportCard.standardReportCardInputSubjectTypes.push(entityService.findByUUID(uuid, _SubjectType.default.schema.name));
|
|
@@ -184,39 +141,30 @@ class ReportCard extends _BaseEntity.default {
|
|
|
184
141
|
reportCard.setStandardReportCardInputRecentDurationJSON(resource.standardReportCardInputRecentDuration);
|
|
185
142
|
return reportCard;
|
|
186
143
|
}
|
|
187
|
-
|
|
188
144
|
isStandardTaskType() {
|
|
189
145
|
return _lodash.default.isNil(this.standardReportCardType) ? false : this.standardReportCardType.isTaskType();
|
|
190
146
|
}
|
|
191
|
-
|
|
192
147
|
isStandardReportType() {
|
|
193
148
|
return !_lodash.default.isNil(this.standardReportCardType);
|
|
194
149
|
}
|
|
195
|
-
|
|
196
150
|
isSubjectTypeFilterSupported() {
|
|
197
151
|
return this.isStandardReportType() && this.standardReportCardType.isSubjectTypeFilterSupported();
|
|
198
152
|
}
|
|
199
|
-
|
|
200
153
|
isRecentType() {
|
|
201
154
|
return this.isStandardReportType() && this.standardReportCardType.isRecentType();
|
|
202
155
|
}
|
|
203
|
-
|
|
204
156
|
hasInputForSubject() {
|
|
205
157
|
return this.standardReportCardInputSubjectTypes.length > 0;
|
|
206
158
|
}
|
|
207
|
-
|
|
208
159
|
hasInputForEnrolment() {
|
|
209
160
|
return this.standardReportCardInputPrograms.length > 0;
|
|
210
161
|
}
|
|
211
|
-
|
|
212
162
|
hasInputForProgramEncounter() {
|
|
213
163
|
return this.hasInputForEnrolment() && this.standardReportCardInputEncounterTypes.length > 0;
|
|
214
164
|
}
|
|
215
|
-
|
|
216
165
|
hasInputForGeneralEncounter() {
|
|
217
166
|
return this.standardReportCardInputEncounterTypes.length > 0;
|
|
218
167
|
}
|
|
219
|
-
|
|
220
168
|
createNestedErrorResults(primaryValue, secondaryValue) {
|
|
221
169
|
const reportCard = this;
|
|
222
170
|
return Array.from(Array(this.countOfCards).keys()).map(index => {
|
|
@@ -224,9 +172,7 @@ class ReportCard extends _BaseEntity.default {
|
|
|
224
172
|
return _NestedReportCardResult.default.create(primaryValue, secondaryValue, false, true, itemKey);
|
|
225
173
|
});
|
|
226
174
|
}
|
|
227
|
-
|
|
228
175
|
}
|
|
229
|
-
|
|
230
176
|
_defineProperty(ReportCard, "schema", {
|
|
231
177
|
name: "ReportCard",
|
|
232
178
|
primaryKey: "uuid",
|
|
@@ -280,6 +226,5 @@ _defineProperty(ReportCard, "schema", {
|
|
|
280
226
|
}
|
|
281
227
|
}
|
|
282
228
|
});
|
|
283
|
-
|
|
284
229
|
var _default = ReportCard;
|
|
285
230
|
exports.default = _default;
|
package/dist/ResetSync.js
CHANGED
|
@@ -4,36 +4,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _BaseEntity = _interopRequireDefault(require("./BaseEntity"));
|
|
9
|
-
|
|
10
8
|
var _ResourceUtil = _interopRequireDefault(require("./utility/ResourceUtil"));
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
13
|
class ResetSync extends _BaseEntity.default {
|
|
17
14
|
constructor(that = null) {
|
|
18
15
|
super(that);
|
|
19
16
|
}
|
|
20
|
-
|
|
21
17
|
get subjectTypeUUID() {
|
|
22
18
|
return this.that.subjectTypeUUID;
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
set subjectTypeUUID(x) {
|
|
26
21
|
this.that.subjectTypeUUID = x;
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
get hasMigrated() {
|
|
30
24
|
return this.that.hasMigrated;
|
|
31
25
|
}
|
|
32
|
-
|
|
33
26
|
set hasMigrated(x) {
|
|
34
27
|
this.that.hasMigrated = x;
|
|
35
28
|
}
|
|
36
|
-
|
|
37
29
|
static fromResource(resource) {
|
|
38
30
|
const resetSync = new ResetSync();
|
|
39
31
|
resetSync.uuid = resource.uuid;
|
|
@@ -41,13 +33,11 @@ class ResetSync extends _BaseEntity.default {
|
|
|
41
33
|
resetSync.subjectTypeUUID = _ResourceUtil.default.getUUIDFor(resource, 'subjectTypeUUID');
|
|
42
34
|
return resetSync;
|
|
43
35
|
}
|
|
44
|
-
|
|
45
36
|
updatedHasMigrated() {
|
|
46
37
|
const resetSync = this.clone();
|
|
47
38
|
resetSync.hasMigrated = true;
|
|
48
39
|
return resetSync;
|
|
49
40
|
}
|
|
50
|
-
|
|
51
41
|
clone() {
|
|
52
42
|
const resetSync = new ResetSync();
|
|
53
43
|
resetSync.uuid = this.uuid;
|
|
@@ -56,9 +46,7 @@ class ResetSync extends _BaseEntity.default {
|
|
|
56
46
|
resetSync.voided = this.voided;
|
|
57
47
|
return resetSync;
|
|
58
48
|
}
|
|
59
|
-
|
|
60
49
|
}
|
|
61
|
-
|
|
62
50
|
_defineProperty(ResetSync, "schema", {
|
|
63
51
|
name: 'ResetSync',
|
|
64
52
|
primaryKey: 'uuid',
|
|
@@ -78,6 +66,5 @@ _defineProperty(ResetSync, "schema", {
|
|
|
78
66
|
}
|
|
79
67
|
}
|
|
80
68
|
});
|
|
81
|
-
|
|
82
69
|
var _default = ResetSync;
|
|
83
70
|
exports.default = _default;
|
package/dist/Rule.js
CHANGED
|
@@ -4,90 +4,68 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _ReferenceEntity = _interopRequireDefault(require("./ReferenceEntity"));
|
|
9
|
-
|
|
10
8
|
var _General = _interopRequireDefault(require("./utility/General"));
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
13
|
class Rule extends _ReferenceEntity.default {
|
|
17
14
|
constructor(that = null) {
|
|
18
15
|
super(that);
|
|
19
16
|
}
|
|
20
|
-
|
|
21
17
|
get _entityString() {
|
|
22
18
|
return this.that._entityString;
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
set _entityString(x) {
|
|
26
21
|
this.that._entityString = x;
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
get type() {
|
|
30
24
|
return this.that.type;
|
|
31
25
|
}
|
|
32
|
-
|
|
33
26
|
set type(x) {
|
|
34
27
|
this.that.type = x;
|
|
35
28
|
}
|
|
36
|
-
|
|
37
29
|
get name() {
|
|
38
30
|
return this.that.name;
|
|
39
31
|
}
|
|
40
|
-
|
|
41
32
|
set name(x) {
|
|
42
33
|
this.that.name = x;
|
|
43
34
|
}
|
|
44
|
-
|
|
45
35
|
get fnName() {
|
|
46
36
|
return this.that.fnName;
|
|
47
37
|
}
|
|
48
|
-
|
|
49
38
|
set fnName(x) {
|
|
50
39
|
this.that.fnName = x;
|
|
51
40
|
}
|
|
52
|
-
|
|
53
41
|
get executionOrder() {
|
|
54
42
|
return this.that.executionOrder;
|
|
55
43
|
}
|
|
56
|
-
|
|
57
44
|
set executionOrder(x) {
|
|
58
45
|
this.that.executionOrder = x;
|
|
59
46
|
}
|
|
60
|
-
|
|
61
47
|
get data() {
|
|
62
48
|
return this.that.data;
|
|
63
49
|
}
|
|
64
|
-
|
|
65
50
|
set data(x) {
|
|
66
51
|
this.that.data = x;
|
|
67
52
|
}
|
|
68
|
-
|
|
69
53
|
static fromResource(resource, entityService) {
|
|
70
54
|
const rule = _General.default.assignFields(resource, new Rule(), ["uuid", "name", "type", "fnName", "executionOrder", "entity"]);
|
|
71
|
-
|
|
72
55
|
rule.data = JSON.stringify(resource["data"]);
|
|
73
56
|
rule.voided = !!resource.voided;
|
|
74
57
|
return rule;
|
|
75
58
|
}
|
|
76
|
-
|
|
77
59
|
get entity() {
|
|
78
60
|
return JSON.parse(this._entityString || "{}");
|
|
79
61
|
}
|
|
80
|
-
|
|
81
62
|
set entity(entityJson) {
|
|
82
63
|
this._entityString = JSON.stringify(entityJson || {});
|
|
83
64
|
}
|
|
84
|
-
|
|
85
65
|
clone() {
|
|
86
66
|
return super.clone(new Rule());
|
|
87
67
|
}
|
|
88
|
-
|
|
89
68
|
}
|
|
90
|
-
|
|
91
69
|
_defineProperty(Rule, "schema", {
|
|
92
70
|
name: "Rule",
|
|
93
71
|
primaryKey: "uuid",
|
|
@@ -108,7 +86,6 @@ _defineProperty(Rule, "schema", {
|
|
|
108
86
|
}
|
|
109
87
|
}
|
|
110
88
|
});
|
|
111
|
-
|
|
112
89
|
_defineProperty(Rule, "types", {
|
|
113
90
|
Decision: "Decision",
|
|
114
91
|
VisitSchedule: "VisitSchedule",
|
|
@@ -117,6 +94,5 @@ _defineProperty(Rule, "types", {
|
|
|
117
94
|
Validation: "Validation",
|
|
118
95
|
EnrolmentSummary: "EnrolmentSummary"
|
|
119
96
|
});
|
|
120
|
-
|
|
121
97
|
var _default = Rule;
|
|
122
98
|
exports.default = _default;
|
package/dist/RuleDependency.js
CHANGED
|
@@ -4,46 +4,34 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _ReferenceEntity = _interopRequireDefault(require("./ReferenceEntity"));
|
|
9
|
-
|
|
10
8
|
var _General = _interopRequireDefault(require("./utility/General"));
|
|
11
|
-
|
|
12
9
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
13
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
14
|
class RuleDependency extends _ReferenceEntity.default {
|
|
19
15
|
constructor(that = null) {
|
|
20
16
|
super(that);
|
|
21
17
|
}
|
|
22
|
-
|
|
23
18
|
get code() {
|
|
24
19
|
return this.that.code;
|
|
25
20
|
}
|
|
26
|
-
|
|
27
21
|
set code(x) {
|
|
28
22
|
this.that.code = x;
|
|
29
23
|
}
|
|
30
|
-
|
|
31
24
|
static fromResource(resource, entityService) {
|
|
32
25
|
return _General.default.assignFields(resource, new RuleDependency(), ["uuid", "code"]);
|
|
33
26
|
}
|
|
34
|
-
|
|
35
27
|
static getCode(ruleDependency) {
|
|
36
28
|
return _lodash.default.isEmpty(ruleDependency) ? RuleDependency.noop : ruleDependency.code;
|
|
37
29
|
}
|
|
38
|
-
|
|
39
30
|
clone() {
|
|
40
31
|
return super.clone(new RuleDependency());
|
|
41
32
|
}
|
|
42
|
-
|
|
43
33
|
}
|
|
44
|
-
|
|
45
34
|
_defineProperty(RuleDependency, "noop", "{}");
|
|
46
|
-
|
|
47
35
|
_defineProperty(RuleDependency, "schema", {
|
|
48
36
|
name: "RuleDependency",
|
|
49
37
|
primaryKey: "uuid",
|
|
@@ -52,6 +40,5 @@ _defineProperty(RuleDependency, "schema", {
|
|
|
52
40
|
code: "string"
|
|
53
41
|
}
|
|
54
42
|
});
|
|
55
|
-
|
|
56
43
|
var _default = RuleDependency;
|
|
57
44
|
exports.default = _default;
|
|
@@ -4,110 +4,83 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _General = _interopRequireDefault(require("./utility/General"));
|
|
9
|
-
|
|
10
8
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
11
|
-
|
|
12
9
|
var _BaseEntity = _interopRequireDefault(require("./BaseEntity"));
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
13
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
14
|
class RuleFailureTelemetry extends _BaseEntity.default {
|
|
19
15
|
constructor(that = null) {
|
|
20
16
|
super(that);
|
|
21
17
|
}
|
|
22
|
-
|
|
23
18
|
get ruleUuid() {
|
|
24
19
|
return this.that.ruleUuid;
|
|
25
20
|
}
|
|
26
|
-
|
|
27
21
|
set ruleUuid(x) {
|
|
28
22
|
this.that.ruleUuid = x;
|
|
29
23
|
}
|
|
30
|
-
|
|
31
24
|
get individualUuid() {
|
|
32
25
|
return this.that.individualUuid;
|
|
33
26
|
}
|
|
34
|
-
|
|
35
27
|
set individualUuid(x) {
|
|
36
28
|
this.that.individualUuid = x;
|
|
37
29
|
}
|
|
38
|
-
|
|
39
30
|
get errorMessage() {
|
|
40
31
|
return this.that.errorMessage;
|
|
41
32
|
}
|
|
42
|
-
|
|
43
33
|
set errorMessage(x) {
|
|
44
34
|
this.that.errorMessage = x;
|
|
45
35
|
}
|
|
46
|
-
|
|
47
36
|
get stacktrace() {
|
|
48
37
|
return this.that.stacktrace;
|
|
49
38
|
}
|
|
50
|
-
|
|
51
39
|
set stacktrace(x) {
|
|
52
40
|
this.that.stacktrace = x;
|
|
53
41
|
}
|
|
54
|
-
|
|
55
42
|
get closed() {
|
|
56
43
|
return this.that.closed;
|
|
57
44
|
}
|
|
58
|
-
|
|
59
45
|
set closed(x) {
|
|
60
46
|
this.that.closed = x;
|
|
61
47
|
}
|
|
62
|
-
|
|
63
48
|
get errorDateTime() {
|
|
64
49
|
return this.that.errorDateTime;
|
|
65
50
|
}
|
|
66
|
-
|
|
67
51
|
set errorDateTime(x) {
|
|
68
52
|
this.that.errorDateTime = x;
|
|
69
53
|
}
|
|
70
|
-
|
|
71
54
|
get sourceType() {
|
|
72
55
|
return this.that.sourceType;
|
|
73
56
|
}
|
|
74
|
-
|
|
75
57
|
set sourceType(x) {
|
|
76
58
|
this.that.sourceType = x;
|
|
77
59
|
}
|
|
78
|
-
|
|
79
60
|
get sourceId() {
|
|
80
61
|
return this.that.sourceId;
|
|
81
62
|
}
|
|
82
|
-
|
|
83
63
|
set sourceId(x) {
|
|
84
64
|
this.that.sourceId = x;
|
|
85
65
|
}
|
|
86
|
-
|
|
87
66
|
get entityType() {
|
|
88
67
|
return this.that.entityType;
|
|
89
68
|
}
|
|
90
|
-
|
|
91
69
|
set entityType(x) {
|
|
92
70
|
this.that.entityType = x;
|
|
93
71
|
}
|
|
94
|
-
|
|
95
72
|
get entityId() {
|
|
96
73
|
return this.that.entityId;
|
|
97
74
|
}
|
|
98
|
-
|
|
99
75
|
set entityId(x) {
|
|
100
76
|
this.that.entityId = x;
|
|
101
77
|
}
|
|
102
|
-
|
|
103
78
|
get appType() {
|
|
104
79
|
return this.that.appType;
|
|
105
80
|
}
|
|
106
|
-
|
|
107
81
|
set appType(x) {
|
|
108
82
|
this.that.appType = x;
|
|
109
83
|
}
|
|
110
|
-
|
|
111
84
|
static create({
|
|
112
85
|
ruleUUID,
|
|
113
86
|
individualUUID,
|
|
@@ -134,11 +107,9 @@ class RuleFailureTelemetry extends _BaseEntity.default {
|
|
|
134
107
|
ruleFailureTelemetry.appType = appType;
|
|
135
108
|
return ruleFailureTelemetry;
|
|
136
109
|
}
|
|
137
|
-
|
|
138
110
|
get toResource() {
|
|
139
111
|
return _lodash.default.pick(this, ["ruleUuid", "individualUuid", "errorMessage", "stacktrace", "closed", "errorDateTime", "sourceType", "sourceId", "entityType", "entityId", "appType"]);
|
|
140
112
|
}
|
|
141
|
-
|
|
142
113
|
clone() {
|
|
143
114
|
const ruleFailureTelemetry = new RuleFailureTelemetry();
|
|
144
115
|
ruleFailureTelemetry.uuid = this.uuid;
|
|
@@ -155,9 +126,7 @@ class RuleFailureTelemetry extends _BaseEntity.default {
|
|
|
155
126
|
ruleFailureTelemetry.appType = this.appType;
|
|
156
127
|
return ruleFailureTelemetry;
|
|
157
128
|
}
|
|
158
|
-
|
|
159
129
|
}
|
|
160
|
-
|
|
161
130
|
_defineProperty(RuleFailureTelemetry, "schema", {
|
|
162
131
|
name: "RuleFailureTelemetry",
|
|
163
132
|
primaryKey: "uuid",
|
|
@@ -191,6 +160,5 @@ _defineProperty(RuleFailureTelemetry, "schema", {
|
|
|
191
160
|
appType: "string"
|
|
192
161
|
}
|
|
193
162
|
});
|
|
194
|
-
|
|
195
163
|
var _default = RuleFailureTelemetry;
|
|
196
164
|
exports.default = _default;
|