openchs-models 1.32.32 → 1.32.33
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/Concept.js +2 -7
- package/dist/Observation.js +0 -2
- package/dist/ObservationsHolder.js +1 -15
- package/dist/Program.js +0 -10
- package/dist/Schema.js +1 -7
- package/dist/application/Form.js +3 -3
- package/dist/application/FormElement.js +2 -1
- package/dist/index.js +0 -8
- package/package.json +1 -1
package/dist/Concept.js
CHANGED
|
@@ -267,15 +267,11 @@ class Concept extends _BaseEntity.default {
|
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
isMediaConcept() {
|
|
270
|
-
return _lodash.default.includes([Concept.dataType.Image, Concept.dataType.ImageV2, Concept.dataType.Video, Concept.dataType.File], this.datatype);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
isMediaSelectConcept() {
|
|
274
270
|
return _lodash.default.includes([Concept.dataType.Image, Concept.dataType.Video, Concept.dataType.File], this.datatype);
|
|
275
271
|
}
|
|
276
272
|
|
|
277
273
|
isSelectConcept() {
|
|
278
|
-
return this.isCodedConcept() || this.isSubjectConcept() || this.isEncounterConcept() || this.
|
|
274
|
+
return this.isCodedConcept() || this.isSubjectConcept() || this.isEncounterConcept() || this.isMediaConcept();
|
|
279
275
|
}
|
|
280
276
|
|
|
281
277
|
isDurationConcept() {
|
|
@@ -410,7 +406,6 @@ _defineProperty(Concept, "dataType", {
|
|
|
410
406
|
Notes: "Notes",
|
|
411
407
|
NA: "NA",
|
|
412
408
|
Image: "Image",
|
|
413
|
-
ImageV2: "ImageV2",
|
|
414
409
|
Video: "Video",
|
|
415
410
|
Audio: "Audio",
|
|
416
411
|
Id: "Id",
|
|
@@ -423,7 +418,7 @@ _defineProperty(Concept, "dataType", {
|
|
|
423
418
|
Encounter: "Encounter",
|
|
424
419
|
|
|
425
420
|
get Media() {
|
|
426
|
-
return [this.Image, this.
|
|
421
|
+
return [this.Image, this.Video, this.Audio, this.File];
|
|
427
422
|
}
|
|
428
423
|
|
|
429
424
|
});
|
package/dist/Observation.js
CHANGED
|
@@ -86,8 +86,6 @@ class Observation extends _PersistedObject.default {
|
|
|
86
86
|
return new _Displayable.default(valueWrapper.asDisplayDate(), null);
|
|
87
87
|
} else if (observation.concept.datatype === _Concept.default.dataType.Time) {
|
|
88
88
|
return new _Displayable.default(valueWrapper.asDisplayTime(), null);
|
|
89
|
-
} else if (observation.concept.datatype === _Concept.default.dataType.ImageV2) {
|
|
90
|
-
return new _Displayable.default(JSON.parse(valueWrapper.getValue()), null);
|
|
91
89
|
} else if (valueWrapper.isSingleCoded) {
|
|
92
90
|
if (observation.concept.datatype === _Concept.default.dataType.Subject) {
|
|
93
91
|
const uuid = valueWrapper.getValue();
|
|
@@ -142,8 +142,6 @@ class ObservationsHolder {
|
|
|
142
142
|
formElementsIncludingRepeatableElements.push(newFormElement);
|
|
143
143
|
});
|
|
144
144
|
});
|
|
145
|
-
|
|
146
|
-
formElementsIncludingRepeatableElements.push(fe);
|
|
147
145
|
} else if (_lodash.default.isNil(fe.groupUuid)) {
|
|
148
146
|
formElementsIncludingRepeatableElements.push(fe);
|
|
149
147
|
}
|
|
@@ -489,19 +487,7 @@ class ObservationsHolder {
|
|
|
489
487
|
if (observation) {
|
|
490
488
|
const valueWrapper = observation.getValueWrapper();
|
|
491
489
|
|
|
492
|
-
if (
|
|
493
|
-
const mediaObjects = JSON.parse(valueWrapper.getValue());
|
|
494
|
-
|
|
495
|
-
const newAnswers = _lodash.default.map(mediaObjects, mediaObject => {
|
|
496
|
-
if (mediaObject.uri === oldValue) {
|
|
497
|
-
mediaObject.uri = newValue;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
return mediaObject;
|
|
501
|
-
});
|
|
502
|
-
|
|
503
|
-
observation.valueJSON = new _PrimitiveValue.default(JSON.stringify(newAnswers), _Concept.default.dataType.ImageV2);
|
|
504
|
-
} else if (valueWrapper.isMultipleCoded) {
|
|
490
|
+
if (valueWrapper.isMultipleCoded) {
|
|
505
491
|
const answers = valueWrapper.getValue();
|
|
506
492
|
|
|
507
493
|
const oldValueIndex = _lodash.default.indexOf(answers, oldValue);
|
package/dist/Program.js
CHANGED
|
@@ -68,14 +68,6 @@ class Program extends _ReferenceEntity.default {
|
|
|
68
68
|
this.that.manualEligibilityCheckRequired = x;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
get showGrowthChart() {
|
|
72
|
-
return this.that.showGrowthChart;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
set showGrowthChart(x) {
|
|
76
|
-
this.that.showGrowthChart = x;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
71
|
get enrolmentSummaryRule() {
|
|
80
72
|
return this.that.enrolmentSummaryRule;
|
|
81
73
|
}
|
|
@@ -126,7 +118,6 @@ class Program extends _ReferenceEntity.default {
|
|
|
126
118
|
program.programSubjectLabel = operationalProgram.programSubjectLabel || operationalProgram.name || program.name;
|
|
127
119
|
program.enrolmentSummaryRule = operationalProgram.enrolmentSummaryRule;
|
|
128
120
|
program.manualEligibilityCheckRequired = operationalProgram.manualEligibilityCheckRequired;
|
|
129
|
-
program.showGrowthChart = operationalProgram.showGrowthChart;
|
|
130
121
|
program.manualEnrolmentEligibilityCheckRule = operationalProgram.manualEnrolmentEligibilityCheckRule;
|
|
131
122
|
program.enrolmentEligibilityCheckRule = operationalProgram.enrolmentEligibilityCheckRule;
|
|
132
123
|
program.allowMultipleEnrolments = operationalProgram.allowMultipleEnrolments;
|
|
@@ -171,7 +162,6 @@ _defineProperty(Program, "schema", {
|
|
|
171
162
|
optional: true
|
|
172
163
|
},
|
|
173
164
|
manualEligibilityCheckRequired: 'bool',
|
|
174
|
-
showGrowthChart: 'bool',
|
|
175
165
|
manualEnrolmentEligibilityCheckRule: {
|
|
176
166
|
type: 'string',
|
|
177
167
|
optional: true
|
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:
|
|
286
|
+
schemaVersion: 198,
|
|
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.`);
|
|
@@ -965,12 +965,6 @@ function createRealmConfig() {
|
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
|
|
969
|
-
if (oldDB.schemaVersion < 199) {
|
|
970
|
-
_lodash.default.forEach(newDB.objects("Program"), program => {
|
|
971
|
-
program.showGrowthChart = _lodash.default.toLower(program.name) === "child";
|
|
972
|
-
});
|
|
973
|
-
}
|
|
974
968
|
}
|
|
975
969
|
};
|
|
976
970
|
}
|
package/dist/application/Form.js
CHANGED
|
@@ -305,12 +305,12 @@ class Form extends _BaseEntity.default {
|
|
|
305
305
|
|
|
306
306
|
const orderedFormElements = _lodash.default.sortBy(childFormElements, fe => fe.displayOrder);
|
|
307
307
|
|
|
308
|
-
_lodash.default.forEach(orderedFormElements, formElement => this.addSortedObservations(formElement, observations, orderedChildObs
|
|
308
|
+
_lodash.default.forEach(orderedFormElements, formElement => this.addSortedObservations(formElement, observations, orderedChildObs));
|
|
309
309
|
|
|
310
310
|
return orderedChildObs;
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
addSortedObservations(formElement, observations, orderedObservations
|
|
313
|
+
addSortedObservations(formElement, observations, orderedObservations) {
|
|
314
314
|
const concept = formElement.concept;
|
|
315
315
|
const foundObs = observations.find(obs => obs.concept.uuid === concept.uuid);
|
|
316
316
|
|
|
@@ -326,7 +326,7 @@ class Form extends _BaseEntity.default {
|
|
|
326
326
|
orderedObservations.push(clonedObs);
|
|
327
327
|
}
|
|
328
328
|
} else {
|
|
329
|
-
if (!_lodash.default.isNil(foundObs)
|
|
329
|
+
if (!_lodash.default.isNil(foundObs)) {
|
|
330
330
|
foundObs.styles = formElement.styles;
|
|
331
331
|
orderedObservations.push(foundObs);
|
|
332
332
|
}
|
|
@@ -478,7 +478,8 @@ _defineProperty(FormElement, "keys", {
|
|
|
478
478
|
groupSubjectRoleUUID: "groupSubjectRoleUUID",
|
|
479
479
|
allowedTypes: "allowedTypes",
|
|
480
480
|
allowedMaxSize: "allowedMaxSize",
|
|
481
|
-
displayAllGroupMembers: "displayAllGroupMembers"
|
|
481
|
+
displayAllGroupMembers: "displayAllGroupMembers",
|
|
482
|
+
searchOptions: "searchOptions"
|
|
482
483
|
});
|
|
483
484
|
|
|
484
485
|
_defineProperty(FormElement, "values", {
|
package/dist/index.js
CHANGED
|
@@ -165,12 +165,6 @@ Object.defineProperty(exports, "FormMapping", {
|
|
|
165
165
|
return _FormMapping.default;
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
|
-
Object.defineProperty(exports, "findMediaObservations", {
|
|
169
|
-
enumerable: true,
|
|
170
|
-
get: function () {
|
|
171
|
-
return _Media.findMediaObservations;
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
168
|
Object.defineProperty(exports, "MenuItem", {
|
|
175
169
|
enumerable: true,
|
|
176
170
|
get: function () {
|
|
@@ -870,8 +864,6 @@ var _Form = _interopRequireDefault(require("./application/Form"));
|
|
|
870
864
|
|
|
871
865
|
var _FormMapping = _interopRequireDefault(require("./application/FormMapping"));
|
|
872
866
|
|
|
873
|
-
var _Media = require("./Media");
|
|
874
|
-
|
|
875
867
|
var _MenuItem = _interopRequireDefault(require("./application/MenuItem"));
|
|
876
868
|
|
|
877
869
|
var _Gender = _interopRequireDefault(require("./Gender"));
|