openchs-models 1.30.11 → 1.30.13

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.
@@ -345,6 +345,10 @@ class AbstractEncounter extends _BaseEntity.default {
345
345
  return _lodash.default.get(this, this.getName() === "Encounter" ? "individual.subjectType" : "programEnrolment.individual.subjectType");
346
346
  }
347
347
 
348
+ setLatestEntityApprovalStatus(entityApprovalStatus) {
349
+ this.that.latestEntityApprovalStatus = this.fromObject(entityApprovalStatus);
350
+ }
351
+
348
352
  }
349
353
 
350
354
  _defineProperty(AbstractEncounter, "fieldKeys", {
@@ -299,6 +299,10 @@ class ChecklistItem extends _BaseEntity.default {
299
299
  return realmChecklistItem;
300
300
  }
301
301
 
302
+ setLatestEntityApprovalStatus(entityApprovalStatus) {
303
+ this.that.latestEntityApprovalStatus = this.fromObject(entityApprovalStatus);
304
+ }
305
+
302
306
  }
303
307
 
304
308
  _defineProperty(ChecklistItem, "schema", {
@@ -968,6 +968,10 @@ class Individual extends _BaseEntity.default {
968
968
  return _lodash.default.some(this.encounters, encounter => _lodash.default.some(encounterTypes, encounterType => encounterType.uuid === encounter.encounterType.uuid));
969
969
  }
970
970
 
971
+ setLatestEntityApprovalStatus(entityApprovalStatus) {
972
+ this.that.latestEntityApprovalStatus = this.fromObject(entityApprovalStatus);
973
+ }
974
+
971
975
  toJSON() {
972
976
  return {
973
977
  uuid: this.uuid,
@@ -141,6 +141,10 @@ class ProgramEncounter extends _AbstractEncounter.default {
141
141
  return realmProgramEncounter;
142
142
  }
143
143
 
144
+ setLatestEntityApprovalStatus(entityApprovalStatus) {
145
+ this.that.latestEntityApprovalStatus = this.fromObject(entityApprovalStatus);
146
+ }
147
+
144
148
  }
145
149
 
146
150
  _defineProperty(ProgramEncounter, "fieldKeys", {
@@ -585,6 +585,10 @@ class ProgramEnrolment extends _BaseEntity.default {
585
585
  return this.latestEntityApprovalStatus && this.latestEntityApprovalStatus.isRejected;
586
586
  }
587
587
 
588
+ setLatestEntityApprovalStatus(entityApprovalStatus) {
589
+ this.that.latestEntityApprovalStatus = this.fromObject(entityApprovalStatus);
590
+ }
591
+
588
592
  toJSON() {
589
593
  return {
590
594
  uuid: this.uuid,
@@ -286,6 +286,8 @@ class General {
286
286
  }
287
287
 
288
288
  static isDeepEmpty(x) {
289
+ if (_lodash.default.isNil(x)) return true;
290
+ if (_lodash.default.isDate(x)) return false;
289
291
  if (_lodash.default.isEmpty(x)) return true;
290
292
 
291
293
  if (!_lodash.default.isArray(x)) {
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.30.11",
4
+ "version": "1.30.13",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",