openchs-models 1.33.60 → 1.33.61
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/GroupSubject.js +17 -2
- package/dist/Schema.js +4 -1
- package/dist/SubjectType.js +2 -1
- package/package.json +1 -1
package/dist/GroupSubject.js
CHANGED
|
@@ -51,6 +51,12 @@ class GroupSubject extends _BaseEntity.default {
|
|
|
51
51
|
set membershipEndDate(x) {
|
|
52
52
|
this.that.membershipEndDate = x;
|
|
53
53
|
}
|
|
54
|
+
get removalReasonConceptUUID() {
|
|
55
|
+
return this.that.removalReasonConceptUUID;
|
|
56
|
+
}
|
|
57
|
+
set removalReasonConceptUUID(x) {
|
|
58
|
+
this.that.removalReasonConceptUUID = x;
|
|
59
|
+
}
|
|
54
60
|
get createdBy() {
|
|
55
61
|
return this.that.createdBy;
|
|
56
62
|
}
|
|
@@ -82,6 +88,7 @@ class GroupSubject extends _BaseEntity.default {
|
|
|
82
88
|
resource.groupRoleUUID = this.groupRole.uuid;
|
|
83
89
|
resource.membershipStartDate = this.membershipStartDate;
|
|
84
90
|
resource.membershipEndDate = this.membershipEndDate;
|
|
91
|
+
resource.removalReasonConceptUUID = this.removalReasonConceptUUID;
|
|
85
92
|
resource.voided = this.voided;
|
|
86
93
|
return resource;
|
|
87
94
|
}
|
|
@@ -99,7 +106,8 @@ class GroupSubject extends _BaseEntity.default {
|
|
|
99
106
|
memberSubject,
|
|
100
107
|
groupRole,
|
|
101
108
|
membershipStartDate,
|
|
102
|
-
membershipEndDate
|
|
109
|
+
membershipEndDate,
|
|
110
|
+
removalReasonConceptUUID
|
|
103
111
|
}) {
|
|
104
112
|
const groupSubjectEntity = GroupSubject.createEmptyInstance(uuid);
|
|
105
113
|
groupSubjectEntity.groupSubject = groupSubject;
|
|
@@ -107,6 +115,7 @@ class GroupSubject extends _BaseEntity.default {
|
|
|
107
115
|
groupSubjectEntity.groupRole = groupRole;
|
|
108
116
|
groupSubjectEntity.membershipStartDate = membershipStartDate.value;
|
|
109
117
|
groupSubjectEntity.membershipEndDate = membershipEndDate.value;
|
|
118
|
+
groupSubjectEntity.removalReasonConceptUUID = removalReasonConceptUUID;
|
|
110
119
|
return groupSubjectEntity;
|
|
111
120
|
}
|
|
112
121
|
static fromResource(resource, entityService) {
|
|
@@ -118,7 +127,7 @@ class GroupSubject extends _BaseEntity.default {
|
|
|
118
127
|
const groupOrHouseholdSubject = _BaseEntity.default.getParentEntity(entityService, childEntityClass, childResource, groupSubjectParentIdField, parentSchema);
|
|
119
128
|
const memberSubject = _BaseEntity.default.getParentEntity(entityService, childEntityClass, childResource, memberSubjectParentIdField, parentSchema, true, GroupSubject.EXPLICIT_ERROR_CODE_KEY_FOR_MISSING_MEMBER);
|
|
120
129
|
const groupRole = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(resource, "groupRoleUUID"), _GroupRole.default.schema.name);
|
|
121
|
-
const groupSubjectEntity = _General.default.assignFields(resource, new GroupSubject(), ["uuid", "voided"], ["membershipStartDate", "membershipEndDate"]);
|
|
130
|
+
const groupSubjectEntity = _General.default.assignFields(resource, new GroupSubject(), ["uuid", "voided", "removalReasonConceptUUID"], ["membershipStartDate", "membershipEndDate"]);
|
|
122
131
|
groupSubjectEntity.groupSubject = groupOrHouseholdSubject;
|
|
123
132
|
groupSubjectEntity.memberSubject = memberSubject;
|
|
124
133
|
groupSubjectEntity.groupRole = groupRole;
|
|
@@ -133,6 +142,7 @@ class GroupSubject extends _BaseEntity.default {
|
|
|
133
142
|
groupSubjectEntity.groupRole = this.groupRole;
|
|
134
143
|
groupSubjectEntity.membershipStartDate = this.membershipStartDate;
|
|
135
144
|
groupSubjectEntity.membershipEndDate = this.membershipEndDate;
|
|
145
|
+
groupSubjectEntity.removalReasonConceptUUID = this.removalReasonConceptUUID;
|
|
136
146
|
groupSubjectEntity.voided = this.voided;
|
|
137
147
|
return groupSubjectEntity;
|
|
138
148
|
}
|
|
@@ -144,6 +154,7 @@ class GroupSubject extends _BaseEntity.default {
|
|
|
144
154
|
groupRole: this.groupRole,
|
|
145
155
|
membershipStartDate: this.membershipStartDate,
|
|
146
156
|
membershipEndDate: this.membershipEndDate,
|
|
157
|
+
removalReasonConceptUUID: this.removalReasonConceptUUID,
|
|
147
158
|
voided: this.voided
|
|
148
159
|
};
|
|
149
160
|
}
|
|
@@ -196,6 +207,10 @@ _defineProperty(GroupSubject, "schema", {
|
|
|
196
207
|
type: "date",
|
|
197
208
|
optional: true
|
|
198
209
|
},
|
|
210
|
+
removalReasonConceptUUID: {
|
|
211
|
+
type: "string",
|
|
212
|
+
optional: true
|
|
213
|
+
},
|
|
199
214
|
voided: {
|
|
200
215
|
type: "bool",
|
|
201
216
|
default: false
|
package/dist/Schema.js
CHANGED
|
@@ -186,7 +186,7 @@ function createRealmConfig() {
|
|
|
186
186
|
return doCompact;
|
|
187
187
|
},
|
|
188
188
|
//order is important, should be arranged according to the dependency
|
|
189
|
-
schemaVersion:
|
|
189
|
+
schemaVersion: 216,
|
|
190
190
|
onMigration: function (oldDB, newDB) {
|
|
191
191
|
console.log("[AvniModels.Schema]", `Running migration with old schema version: ${oldDB.schemaVersion} and new schema version: ${newDB.schemaVersion}`);
|
|
192
192
|
if (oldDB.schemaVersion === VersionWithEmbeddedMigrationProblem) throw new Error(`Update from schema version ${VersionWithEmbeddedMigrationProblem} is not allowed. Please uninstall and install app.`);
|
|
@@ -846,6 +846,9 @@ function createRealmConfig() {
|
|
|
846
846
|
newRecords[i].reasonConceptUUIDs = _lodash.default.isNil(reason) ? [] : [reason];
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
|
+
if (oldDB.schemaVersion < 216) {
|
|
850
|
+
// GroupSubject.removalReasonConceptUUID added (additive optional string). No backfill needed.
|
|
851
|
+
}
|
|
849
852
|
}
|
|
850
853
|
};
|
|
851
854
|
}
|
package/dist/SubjectType.js
CHANGED
|
@@ -354,7 +354,8 @@ _defineProperty(SubjectType, "types", {
|
|
|
354
354
|
});
|
|
355
355
|
_defineProperty(SubjectType, "settingKeys", {
|
|
356
356
|
displayRegistrationDetails: 'displayRegistrationDetails',
|
|
357
|
-
displayPlannedEncounters: 'displayPlannedEncounters'
|
|
357
|
+
displayPlannedEncounters: 'displayPlannedEncounters',
|
|
358
|
+
removalReasonConceptUuid: 'removalReasonConceptUuid'
|
|
358
359
|
});
|
|
359
360
|
var _default = SubjectType;
|
|
360
361
|
exports.default = _default;
|