openchs-models 1.27.6 → 1.27.7

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 CHANGED
@@ -289,8 +289,8 @@ class Concept {
289
289
  }
290
290
 
291
291
  isMobileNo() {
292
- const keyValue = this.recordValueByKey('primary_contact') || this.recordValueByKey('contact_number');
293
- return keyValue === 'yes';
292
+ const keyValue = this.recordValueByKey(_KeyValue.default.PrimaryContactKey) || this.recordValueByKey(_KeyValue.default.ContactNumberKey);
293
+ return keyValue === _KeyValue.default.ContactYesValue;
294
294
  }
295
295
 
296
296
  }
@@ -27,6 +27,10 @@ const clone = function (concept, valueJSON) {
27
27
  };
28
28
 
29
29
  class Observation {
30
+ constructor() {
31
+ _defineProperty(this, "concept", void 0);
32
+ }
33
+
30
34
  static create(concept, value, abnormal = false) {
31
35
  const observation = new Observation();
32
36
  observation.concept = concept;
@@ -25,6 +25,12 @@ class KeyValue {
25
25
 
26
26
  }
27
27
 
28
+ _defineProperty(KeyValue, "PrimaryContactKey", "primary_contact");
29
+
30
+ _defineProperty(KeyValue, "ContactNumberKey", "contact_number");
31
+
32
+ _defineProperty(KeyValue, "ContactYesValue", "yes");
33
+
28
34
  _defineProperty(KeyValue, "schema", {
29
35
  name: "KeyValue",
30
36
  properties: {
package/dist/task/Task.js CHANGED
@@ -105,6 +105,10 @@ class Task extends _BaseEntity.default {
105
105
  return this.taskType.type === _TaskType.default.TaskTypeName.OpenSubject;
106
106
  }
107
107
 
108
+ getNonMobileNumberMetadataObservationValues() {
109
+ return this.metadata.map(_lodash.default.identity).filter(o => !o.isMobileNumberObs()).map(x => x.getReadableValue());
110
+ }
111
+
108
112
  cloneForEdit() {
109
113
  const task = new Task();
110
114
  task.uuid = this.uuid;
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.27.6",
4
+ "version": "1.27.7",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",