openchs-models 1.31.73 → 1.31.75

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.
@@ -15,14 +15,16 @@ var _StandardReportCardType = _interopRequireDefault(require("./StandardReportCa
15
15
 
16
16
  var _lodash = _interopRequireDefault(require("lodash"));
17
17
 
18
+ var _SubjectType = _interopRequireDefault(require("./SubjectType"));
19
+
20
+ var _Program = _interopRequireDefault(require("./Program"));
21
+
22
+ var _EncounterType = _interopRequireDefault(require("./EncounterType"));
23
+
18
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
25
 
20
26
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
27
 
22
- function throwInvalidIndexError(index, reportCardsLength) {
23
- throw new Error(`Invalid index ${index} specified for reportCard with length ${reportCardsLength}`);
24
- }
25
-
26
28
  class ReportCard extends _BaseEntity.default {
27
29
  constructor(that = null) {
28
30
  super(that);
@@ -96,6 +98,30 @@ class ReportCard extends _BaseEntity.default {
96
98
  get textColor() {
97
99
  return _lodash.default.isNil(this.standardReportCardType) ? '#ffffff' : this.standardReportCardType.textColor;
98
100
  }
101
+
102
+ get standardReportCardInputSubjectTypes() {
103
+ return this.toEntityList("standardReportCardInputSubjectTypes", _SubjectType.default);
104
+ }
105
+
106
+ set standardReportCardInputSubjectTypes(x) {
107
+ this.that.standardReportCardInputSubjectTypes = this.fromEntityList(x);
108
+ }
109
+
110
+ get standardReportCardInputPrograms() {
111
+ return this.toEntityList("standardReportCardInputPrograms", _Program.default);
112
+ }
113
+
114
+ set standardReportCardInputPrograms(x) {
115
+ this.that.standardReportCardInputPrograms = this.fromEntityList(x);
116
+ }
117
+
118
+ get standardReportCardInputEncounterTypes() {
119
+ return this.toEntityList("standardReportCardInputEncounterTypes", _EncounterType.default);
120
+ }
121
+
122
+ set standardReportCardInputEncounterTypes(x) {
123
+ this.that.standardReportCardInputEncounterTypes = this.fromEntityList(x);
124
+ }
99
125
  /**
100
126
  * Helper method used to generate unique key value for Nested Report Cards using UUID and Index of the Report Card.
101
127
  * The Nested Report Card's query responses would be mapped to the corresponding Dashboard Report cards using the UUID and Index.
@@ -174,8 +200,20 @@ _defineProperty(ReportCard, "schema", {
174
200
  type: "int",
175
201
  default: 1,
176
202
  optional: true
177
- } //Used only by nested ReportCards
178
-
203
+ },
204
+ //Used only by nested ReportCards
205
+ standardReportCardInputSubjectTypes: {
206
+ type: "list",
207
+ objectType: "SubjectType"
208
+ },
209
+ standardReportCardInputPrograms: {
210
+ type: "list",
211
+ objectType: "Program"
212
+ },
213
+ standardReportCardInputEncounterTypes: {
214
+ type: "list",
215
+ objectType: "EncounterType"
216
+ }
179
217
  }
180
218
  });
181
219
 
package/dist/Schema.js CHANGED
@@ -279,7 +279,7 @@ function createRealmConfig() {
279
279
  return doCompact;
280
280
  },
281
281
  //order is important, should be arranged according to the dependency
282
- schemaVersion: 189,
282
+ schemaVersion: 190,
283
283
  onMigration: function (oldDB, newDB) {
284
284
  console.log("[AvniModels.Schema]", `Running migration with old schema version: ${oldDB.schemaVersion} and new schema version: ${newDB.schemaVersion}`);
285
285
  if (oldDB.schemaVersion === VersionWithEmbeddedMigrationProblem) throw new Error(`Update from schema version ${VersionWithEmbeddedMigrationProblem} is not allowed. Please uninstall and install app.`);
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.31.73",
4
+ "version": "1.31.75",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",