openchs-models 1.29.5 → 1.29.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.
|
@@ -77,7 +77,7 @@ class StandardReportCardType extends _BaseEntity.default {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
defaultTypes() {
|
|
80
|
-
return [StandardReportCardType.type.ScheduledVisits, StandardReportCardType.type.OverdueVisits, StandardReportCardType.type.LatestRegistrations, StandardReportCardType.type.LatestEnrolments, StandardReportCardType.type.LatestVisits, StandardReportCardType.type.Total];
|
|
80
|
+
return [StandardReportCardType.type.ScheduledVisits, StandardReportCardType.type.OverdueVisits, StandardReportCardType.type.LatestRegistrations, StandardReportCardType.type.LatestEnrolments, StandardReportCardType.type.LatestVisits, StandardReportCardType.type.Total, StandardReportCardType.type.DueChecklist];
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
isApprovalType() {
|
|
@@ -137,7 +137,8 @@ _defineProperty(StandardReportCardType, "type", {
|
|
|
137
137
|
Total: "Total",
|
|
138
138
|
Comments: "Comments",
|
|
139
139
|
CallTasks: "Call tasks",
|
|
140
|
-
OpenSubjectTasks: "Open subject tasks"
|
|
140
|
+
OpenSubjectTasks: "Open subject tasks",
|
|
141
|
+
DueChecklist: "Due checklist"
|
|
141
142
|
});
|
|
142
143
|
|
|
143
144
|
var _default = StandardReportCardType;
|
|
@@ -22,6 +22,14 @@ class DashboardFilter extends _BaseEntity.default {
|
|
|
22
22
|
super(that);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
get name() {
|
|
26
|
+
return this.that.name;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
set name(x) {
|
|
30
|
+
this.that.name = x;
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
get dashboard() {
|
|
26
34
|
return this.toEntity("dashboard", _Dashboard.default);
|
|
27
35
|
}
|
|
@@ -30,18 +38,18 @@ class DashboardFilter extends _BaseEntity.default {
|
|
|
30
38
|
this.that.dashboard = this.fromObject(x);
|
|
31
39
|
}
|
|
32
40
|
|
|
33
|
-
get
|
|
34
|
-
return this.that.
|
|
41
|
+
get filterConfig() {
|
|
42
|
+
return this.that.filterConfig;
|
|
35
43
|
}
|
|
36
44
|
|
|
37
|
-
set
|
|
38
|
-
this.that.
|
|
45
|
+
set filterConfig(x) {
|
|
46
|
+
this.that.filterConfig = x;
|
|
39
47
|
}
|
|
40
48
|
|
|
41
49
|
static fromResource(resource, entityService) {
|
|
42
|
-
const dashboardFilter = _General.default.assignFields(resource, new DashboardFilter(), ["uuid", "voided"]);
|
|
50
|
+
const dashboardFilter = _General.default.assignFields(resource, new DashboardFilter(), ["uuid", "voided", "name"]);
|
|
43
51
|
|
|
44
|
-
dashboardFilter.
|
|
52
|
+
dashboardFilter.filterConfig = JSON.stringify(resource["filterConfig"]);
|
|
45
53
|
dashboardFilter.dashboard = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(resource, "dashboardUUID"), _Dashboard.default.schema.name);
|
|
46
54
|
return dashboardFilter;
|
|
47
55
|
}
|
|
@@ -105,6 +105,7 @@ class GroupSubjectTypeFilter {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
exports.GroupSubjectTypeFilter = GroupSubjectTypeFilter;
|
|
108
|
+
const dateFilterTypes = [_CustomFilter.default.type.RegistrationDate, _CustomFilter.default.type.EnrolmentDate, _CustomFilter.default.type.EncounterDate, _CustomFilter.default.type.ProgramEncounterDate];
|
|
108
109
|
|
|
109
110
|
class DashboardFilterConfig {
|
|
110
111
|
constructor() {
|
|
@@ -119,6 +120,18 @@ class DashboardFilterConfig {
|
|
|
119
120
|
_defineProperty(this, "observationBasedFilter", void 0);
|
|
120
121
|
}
|
|
121
122
|
|
|
123
|
+
getInputDataType() {
|
|
124
|
+
if (this.isConceptTypeFilter()) {
|
|
125
|
+
return this.observationBasedFilter.concept.datatype;
|
|
126
|
+
} else if (this.isGroupSubjectTypeFilter()) {
|
|
127
|
+
return _Concept.default.dataType.Subject;
|
|
128
|
+
} else if (dateFilterTypes.includes(this.type)) {
|
|
129
|
+
return _Concept.default.dataType.Date;
|
|
130
|
+
} else {
|
|
131
|
+
return this.type;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
122
135
|
isConceptTypeFilter() {
|
|
123
136
|
return this.type === _CustomFilter.default.type.Concept;
|
|
124
137
|
}
|