openchs-models 1.32.50 → 1.32.52

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.
@@ -243,6 +243,12 @@ class AbstractEncounter extends _BaseEntity.default {
243
243
  encounter.encounterLocation = _lodash.default.isNil(this.encounterLocation) ? null : this.encounterLocation.clone();
244
244
  encounter.cancelLocation = _lodash.default.isNil(this.cancelLocation) ? null : this.cancelLocation.clone();
245
245
  encounter.approvalStatuses = this.approvalStatuses;
246
+ encounter.createdBy = this.createdBy;
247
+ encounter.createdByUUID = this.createdByUUID;
248
+ encounter.lastModifiedBy = this.lastModifiedBy;
249
+ encounter.lastModifiedByUUID = this.lastModifiedByUUID;
250
+ encounter.filledBy = this.filledBy;
251
+ encounter.filledByUUID = this.filledByUUID;
246
252
  return encounter;
247
253
  }
248
254
 
package/dist/Schema.js CHANGED
@@ -283,7 +283,7 @@ function createRealmConfig() {
283
283
  return doCompact;
284
284
  },
285
285
  //order is important, should be arranged according to the dependency
286
- schemaVersion: 203,
286
+ schemaVersion: 202,
287
287
  onMigration: function (oldDB, newDB) {
288
288
  console.log("[AvniModels.Schema]", `Running migration with old schema version: ${oldDB.schemaVersion} and new schema version: ${newDB.schemaVersion}`);
289
289
  if (oldDB.schemaVersion === VersionWithEmbeddedMigrationProblem) throw new Error(`Update from schema version ${VersionWithEmbeddedMigrationProblem} is not allowed. Please uninstall and install app.`);
@@ -987,13 +987,10 @@ function createRealmConfig() {
987
987
  });
988
988
  }
989
989
 
990
- if (oldDB.schemaVersion < 203) {
991
- const entities = newDB.objects(_EntitySyncStatus.default.schema.name).filtered("entityName = $0", "SubjectType");
992
-
993
- if (entities.length === 1) {
994
- const stype = entities[0];
995
- stype.loadedSince = _EntitySyncStatus.default.REALLY_OLD_DATE;
996
- }
990
+ if (oldDB.schemaVersion < 202) {
991
+ _lodash.default.forEach(newDB.objects("SubjectType"), stype => {
992
+ stype.loadedSince = _EntitySyncStatus.default.REALLY_OLD_DATE.getTime();
993
+ });
997
994
  }
998
995
  }
999
996
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "openchs-models",
3
3
  "description": "OpenCHS data model to be used by front end clients",
4
- "version": "1.32.50",
4
+ "version": "1.32.52",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",