openchs-models 1.32.13 → 1.32.15

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/Duration.js CHANGED
@@ -16,7 +16,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
16
16
  class Duration {
17
17
  constructor(durationValue, durationUnit) {
18
18
  this._durationValue = durationValue;
19
- this.durationUnit = durationUnit;
19
+ this.durationUnit = durationUnit || Duration.Day;
20
20
  }
21
21
 
22
22
  static inDay(value) {
@@ -136,6 +136,10 @@ class ReportCard extends _BaseEntity.default {
136
136
  }
137
137
 
138
138
  getStandardReportCardInputRecentDuration() {
139
+ if (_lodash.default.isEmpty(this.that.standardReportCardInputRecentDurationJSON)) {
140
+ return new _Duration.default(1, _Duration.default.Day);
141
+ }
142
+
139
143
  const duration = JSON.parse(this.that.standardReportCardInputRecentDurationJSON);
140
144
  return new _Duration.default(duration.value, duration.unit);
141
145
  }
package/dist/Schema.js CHANGED
@@ -937,6 +937,12 @@ function createRealmConfig() {
937
937
  }
938
938
 
939
939
  standardReportCardType.type = _lodash.default.replace(_lodash.default.startCase(standardReportCardType.description), new RegExp(' ', 'g'), '');
940
+ });
941
+
942
+ _lodash.default.forEach(newDB.objects(_ReportCard.default.schema.name), card => {
943
+ card.standardReportCardInputSubjectTypes = [];
944
+ card.standardReportCardInputPrograms = [];
945
+ card.standardReportCardInputEncounterTypes = [];
940
946
  }); //Reset MyDashboard cache because shape of filterJSON in cache has changed
941
947
 
942
948
 
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.13",
4
+ "version": "1.32.15",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",