openchs-models 1.11.1 → 1.11.2

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.
@@ -241,12 +241,14 @@ class ObservationsHolder {
241
241
  const parentObservation = this.getObservation(parentConcept);
242
242
  const childObservations = _lodash.default.isEmpty(parentObservation) ? new _QuestionGroup.default() : parentObservation.getValueWrapper();
243
243
 
244
- if (!_lodash.default.isEmpty(_lodash.default.toString(value)) && childConcept.isPrimitive() && _lodash.default.isNil(childFormElement.durationOptions)) {
244
+ if (childConcept.isPrimitive() && _lodash.default.isNil(childFormElement.durationOptions)) {
245
245
  childObservations.removeExistingObs(childConcept);
246
246
 
247
- const observation = _Observation.default.create(childConcept, new _PrimitiveValue.default(value, childConcept.datatype));
247
+ if (!_lodash.default.isEmpty(_lodash.default.toString(value))) {
248
+ const observation = _Observation.default.create(childConcept, new _PrimitiveValue.default(value, childConcept.datatype));
248
249
 
249
- childObservations.addObservation(observation);
250
+ childObservations.addObservation(observation);
251
+ }
250
252
  }
251
253
 
252
254
  if (childConcept.isCodedConcept()) {
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.11.1",
4
+ "version": "1.11.2",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",