openchs-models 1.31.75 → 1.31.76
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/CustomFilter.js +1 -2
- package/dist/Individual.js +4 -0
- package/dist/Observation.js +4 -2
- package/dist/ObservationsHolder.js +1 -1
- package/dist/ReportCard.js +6 -52
- package/dist/Schema.js +10 -2
- package/dist/StandardReportCardType.js +0 -4
- package/package.json +1 -1
package/dist/CustomFilter.js
CHANGED
|
@@ -41,8 +41,7 @@ _defineProperty(CustomFilter, "type", {
|
|
|
41
41
|
EncounterDate: "EncounterDate",
|
|
42
42
|
Address: "Address",
|
|
43
43
|
Concept: "Concept",
|
|
44
|
-
GroupSubject: "GroupSubject"
|
|
45
|
-
SubjectType: "SubjectType"
|
|
44
|
+
GroupSubject: "GroupSubject"
|
|
46
45
|
});
|
|
47
46
|
|
|
48
47
|
_defineProperty(CustomFilter, "scope", {
|
package/dist/Individual.js
CHANGED
|
@@ -1087,6 +1087,10 @@ class Individual extends _BaseEntity.default {
|
|
|
1087
1087
|
(0, _AuditUtil.updateAuditFields)(this, userInfo, isNew);
|
|
1088
1088
|
}
|
|
1089
1089
|
|
|
1090
|
+
static getAddressLevelDummyUUID() {
|
|
1091
|
+
return ADDRESS_LEVEL_DUMMY_UUID;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1090
1094
|
}
|
|
1091
1095
|
|
|
1092
1096
|
_defineProperty(Individual, "schema", {
|
package/dist/Observation.js
CHANGED
|
@@ -84,8 +84,10 @@ class Observation extends _PersistedObject.default {
|
|
|
84
84
|
return new _Displayable.default(valueWrapper.asDisplayTime(), null);
|
|
85
85
|
} else if (valueWrapper.isSingleCoded) {
|
|
86
86
|
if (observation.concept.datatype === _Concept.default.dataType.Subject) {
|
|
87
|
-
const
|
|
88
|
-
|
|
87
|
+
const uuid = valueWrapper.getValue();
|
|
88
|
+
const subject = subjectService.findByUUID(uuid);
|
|
89
|
+
const displayName = subject && subject.nameStringWithUniqueAttribute || uuid;
|
|
90
|
+
return [new _Displayable.default(displayName, subject)];
|
|
89
91
|
} else if (observation.concept.datatype === _Concept.default.dataType.Encounter) {
|
|
90
92
|
const encounter = encounterService.findByUUID(valueWrapper.getValue());
|
|
91
93
|
const identifier = observation.concept.recordValueByKey(_Concept.default.keys.encounterIdentifier);
|
|
@@ -59,7 +59,7 @@ class ObservationsHolder {
|
|
|
59
59
|
const groupObservations = observations && observations.getValueWrapper();
|
|
60
60
|
|
|
61
61
|
if (parentFormElement.repeatable) {
|
|
62
|
-
return groupObservations && groupObservations.getGroupObservationAtIndex(questionGroupIndex).getObservation(concept);
|
|
62
|
+
return groupObservations && groupObservations.size() > questionGroupIndex && groupObservations.getGroupObservationAtIndex(questionGroupIndex).getObservation(concept);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
return groupObservations && groupObservations.getObservation(concept);
|
package/dist/ReportCard.js
CHANGED
|
@@ -15,16 +15,14 @@ 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
|
-
|
|
24
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
19
|
|
|
26
20
|
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; }
|
|
27
21
|
|
|
22
|
+
function throwInvalidIndexError(index, reportCardsLength) {
|
|
23
|
+
throw new Error(`Invalid index ${index} specified for reportCard with length ${reportCardsLength}`);
|
|
24
|
+
}
|
|
25
|
+
|
|
28
26
|
class ReportCard extends _BaseEntity.default {
|
|
29
27
|
constructor(that = null) {
|
|
30
28
|
super(that);
|
|
@@ -98,30 +96,6 @@ class ReportCard extends _BaseEntity.default {
|
|
|
98
96
|
get textColor() {
|
|
99
97
|
return _lodash.default.isNil(this.standardReportCardType) ? '#ffffff' : this.standardReportCardType.textColor;
|
|
100
98
|
}
|
|
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
|
-
}
|
|
125
99
|
/**
|
|
126
100
|
* Helper method used to generate unique key value for Nested Report Cards using UUID and Index of the Report Card.
|
|
127
101
|
* The Nested Report Card's query responses would be mapped to the corresponding Dashboard Report cards using the UUID and Index.
|
|
@@ -158,14 +132,6 @@ class ReportCard extends _BaseEntity.default {
|
|
|
158
132
|
return _lodash.default.isNil(this.standardReportCardType) ? false : this.standardReportCardType.isTaskType();
|
|
159
133
|
}
|
|
160
134
|
|
|
161
|
-
isStandardReportType() {
|
|
162
|
-
return !_lodash.default.isNil(this.standardReportCardType);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
isSubjectTypeFilterSupported() {
|
|
166
|
-
return this.isStandardReportType() && this.standardReportCardType.isSubjectTypeFilterSupported();
|
|
167
|
-
}
|
|
168
|
-
|
|
169
135
|
}
|
|
170
136
|
|
|
171
137
|
_defineProperty(ReportCard, "schema", {
|
|
@@ -200,20 +166,8 @@ _defineProperty(ReportCard, "schema", {
|
|
|
200
166
|
type: "int",
|
|
201
167
|
default: 1,
|
|
202
168
|
optional: true
|
|
203
|
-
}
|
|
204
|
-
|
|
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
|
-
}
|
|
169
|
+
} //Used only by nested ReportCards
|
|
170
|
+
|
|
217
171
|
}
|
|
218
172
|
});
|
|
219
173
|
|
package/dist/Schema.js
CHANGED
|
@@ -902,8 +902,16 @@ function createRealmConfig() {
|
|
|
902
902
|
// newDB.deleteModel("ProgramOutcome");
|
|
903
903
|
}
|
|
904
904
|
|
|
905
|
-
if (oldDB.schemaVersion < 189) {
|
|
906
|
-
|
|
905
|
+
if (oldDB.schemaVersion < 189) {
|
|
906
|
+
_lodash.default.forEach(newDB.objects("SubjectType"), subjectType => {
|
|
907
|
+
if (!subjectType.settings) {
|
|
908
|
+
subjectType.settings = '{}';
|
|
909
|
+
}
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
if (oldDB.schemaVersion < 190) {// PlaceHolder for SubjectType.User changes, so that people with previous version of client
|
|
914
|
+
// are not able to use fastSync of version 190 and above
|
|
907
915
|
}
|
|
908
916
|
}
|
|
909
917
|
};
|
|
@@ -118,10 +118,6 @@ class StandardReportCardType extends _BaseEntity.default {
|
|
|
118
118
|
return typeToStatusMap[this.name];
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
isSubjectTypeFilterSupported() {
|
|
122
|
-
return [StandardReportCardType.type.ScheduledVisits, StandardReportCardType.type.OverdueVisits].includes(this.name);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
121
|
}
|
|
126
122
|
|
|
127
123
|
_defineProperty(StandardReportCardType, "schema", {
|