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 +2 -2
- package/dist/Observation.js +4 -0
- package/dist/application/KeyValue.js +6 -0
- package/dist/task/Task.js +4 -0
- package/package.json +1 -1
package/dist/Concept.js
CHANGED
|
@@ -289,8 +289,8 @@ class Concept {
|
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
isMobileNo() {
|
|
292
|
-
const keyValue = this.recordValueByKey(
|
|
293
|
-
return keyValue ===
|
|
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
|
}
|
package/dist/Observation.js
CHANGED
|
@@ -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;
|