elasticsearch-mcp-vsee 0.5.12 → 0.5.13
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/build/server.d.ts +2 -1
- package/build/server.d.ts.map +1 -1
- package/build/server.js +65 -9
- package/build/server.js.map +1 -1
- package/build/tools/base-tool.d.ts +38 -0
- package/build/tools/base-tool.d.ts.map +1 -0
- package/build/tools/base-tool.js +67 -0
- package/build/tools/base-tool.js.map +1 -0
- package/build/tools/find-entities-by-metric.d.ts +314 -24
- package/build/tools/find-entities-by-metric.d.ts.map +1 -1
- package/build/tools/find-entities-by-metric.js +277 -284
- package/build/tools/find-entities-by-metric.js.map +1 -1
- package/build/tools/get-platform-breakdown.d.ts +60 -22
- package/build/tools/get-platform-breakdown.d.ts.map +1 -1
- package/build/tools/get-platform-breakdown.js +220 -266
- package/build/tools/get-platform-breakdown.js.map +1 -1
- package/build/tools/get-rating-distribution.d.ts +65 -25
- package/build/tools/get-rating-distribution.d.ts.map +1 -1
- package/build/tools/get-rating-distribution.js +206 -245
- package/build/tools/get-rating-distribution.js.map +1 -1
- package/build/tools/get-subscription-breakdown.d.ts +30 -15
- package/build/tools/get-subscription-breakdown.d.ts.map +1 -1
- package/build/tools/get-subscription-breakdown.js +140 -155
- package/build/tools/get-subscription-breakdown.js.map +1 -1
- package/build/tools/get-usage-leaderboard.d.ts +114 -0
- package/build/tools/get-usage-leaderboard.d.ts.map +1 -0
- package/build/tools/get-usage-leaderboard.js +169 -0
- package/build/tools/get-usage-leaderboard.js.map +1 -0
- package/build/tools/get-usage-profile.d.ts +83 -0
- package/build/tools/get-usage-profile.d.ts.map +1 -0
- package/build/tools/get-usage-profile.js +235 -0
- package/build/tools/get-usage-profile.js.map +1 -0
- package/build/tools/get-visit-trends.d.ts +59 -25
- package/build/tools/get-visit-trends.d.ts.map +1 -1
- package/build/tools/get-visit-trends.js +175 -242
- package/build/tools/get-visit-trends.js.map +1 -1
- package/build/tools/index.d.ts +4 -2
- package/build/tools/index.d.ts.map +1 -1
- package/build/tools/index.js +5 -3
- package/build/tools/index.js.map +1 -1
- package/build/tools/top-change.d.ts +56 -23
- package/build/tools/top-change.d.ts.map +1 -1
- package/build/tools/top-change.js +177 -193
- package/build/tools/top-change.js.map +1 -1
- package/build/tools/types.d.ts +24 -0
- package/build/tools/types.d.ts.map +1 -0
- package/build/tools/types.js +3 -0
- package/build/tools/types.js.map +1 -0
- package/build/utils/query-helpers.d.ts +10 -0
- package/build/utils/query-helpers.d.ts.map +1 -0
- package/build/utils/query-helpers.js +48 -0
- package/build/utils/query-helpers.js.map +1 -0
- package/package.json +1 -1
- package/build/tools/get-usage-summary.d.ts +0 -52
- package/build/tools/get-usage-summary.d.ts.map +0 -1
- package/build/tools/get-usage-summary.js +0 -273
- package/build/tools/get-usage-summary.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetPlatformBreakdownTool = void 0;
|
|
4
|
+
const base_tool_js_1 = require("./base-tool.js");
|
|
4
5
|
const zod_1 = require("zod");
|
|
5
|
-
const handlers_js_1 = require("../errors/handlers.js");
|
|
6
|
-
//import { capTimePeriod } from '../utils/date-math.js';
|
|
7
|
-
const aggregation_limits_js_1 = require("../utils/aggregation-limits.js");
|
|
8
6
|
const field_constants_js_1 = require("../utils/field-constants.js");
|
|
7
|
+
const query_helpers_js_1 = require("../utils/query-helpers.js");
|
|
8
|
+
const aggregation_limits_js_1 = require("../utils/aggregation-limits.js");
|
|
9
9
|
const GetPlatformBreakdownArgsSchema = zod_1.z.object({
|
|
10
10
|
role: zod_1.z.enum(['provider', 'patient']).describe('Role: "provider" for provider platforms/versions, "patient" for patient platforms/versions'),
|
|
11
11
|
breakdownType: zod_1.z.enum(['platform', 'version']).describe('Breakdown type: "platform" for platform breakdown (Web/iOS/Android), "version" for platform version breakdown'),
|
|
@@ -15,290 +15,244 @@ const GetPlatformBreakdownArgsSchema = zod_1.z.object({
|
|
|
15
15
|
account: zod_1.z.string().optional().describe('Optional account name to filter data to'),
|
|
16
16
|
group: zod_1.z.string().optional().describe('Optional group name to filter data to'),
|
|
17
17
|
}).strict();
|
|
18
|
-
class GetPlatformBreakdownTool {
|
|
19
|
-
elasticsearch;
|
|
20
|
-
logger;
|
|
18
|
+
class GetPlatformBreakdownTool extends base_tool_js_1.BaseTool {
|
|
21
19
|
constructor(elasticsearch, logger) {
|
|
22
|
-
|
|
23
|
-
this.logger = logger.child({ tool: 'get-platform-breakdown' });
|
|
20
|
+
super(elasticsearch, logger, 'get-platform-breakdown');
|
|
24
21
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
[testVisitField]: 'No',
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
{
|
|
22
|
+
get schema() {
|
|
23
|
+
return GetPlatformBreakdownArgsSchema;
|
|
24
|
+
}
|
|
25
|
+
async run(args) {
|
|
26
|
+
const topN = Math.min(args.topN || 10, 50);
|
|
27
|
+
const { startIso: startDateIso, endIso: endDateIso } = this.resolveTimeRange(args.startDate, args.endDate, 'now-14d', 'now');
|
|
28
|
+
this.logger.info('Getting platform breakdown', {
|
|
29
|
+
role: args.role,
|
|
30
|
+
breakdownType: args.breakdownType,
|
|
31
|
+
topN,
|
|
32
|
+
originalTopN: args.topN,
|
|
33
|
+
startDate: startDateIso,
|
|
34
|
+
endDate: endDateIso,
|
|
35
|
+
account: args.account,
|
|
36
|
+
group: args.group,
|
|
37
|
+
});
|
|
38
|
+
const client = this.elasticsearch.getClient();
|
|
39
|
+
const index = field_constants_js_1.FIELD_CONSTANTS.index;
|
|
40
|
+
const timeField = field_constants_js_1.FIELD_CONSTANTS.timeField;
|
|
41
|
+
const accountField = field_constants_js_1.FIELD_CONSTANTS.accountField;
|
|
42
|
+
const providerField = field_constants_js_1.FIELD_CONSTANTS.providerField;
|
|
43
|
+
const patientField = field_constants_js_1.FIELD_CONSTANTS.patientField;
|
|
44
|
+
const callDurationField = field_constants_js_1.FIELD_CONSTANTS.callDurationField;
|
|
45
|
+
const providerRatingField = field_constants_js_1.FIELD_CONSTANTS.providerRatingField;
|
|
46
|
+
const patientRatingField = field_constants_js_1.FIELD_CONSTANTS.patientRatingField;
|
|
47
|
+
const subscriptionField = field_constants_js_1.FIELD_CONSTANTS.subscriptionField;
|
|
48
|
+
let aggregationField;
|
|
49
|
+
if (args.role === 'provider') {
|
|
50
|
+
aggregationField = args.breakdownType === 'version'
|
|
51
|
+
? 'provider0_platform_version.keyword'
|
|
52
|
+
: 'provider0_platform.keyword';
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
aggregationField = args.breakdownType === 'version'
|
|
56
|
+
? 'patient0_platform_version.keyword'
|
|
57
|
+
: 'patient0_platform.keyword';
|
|
58
|
+
}
|
|
59
|
+
// Use helper for common filters
|
|
60
|
+
const filters = (0, query_helpers_js_1.buildCommonFilters)({
|
|
61
|
+
startDate: startDateIso,
|
|
62
|
+
endDate: endDateIso,
|
|
63
|
+
account: args.account,
|
|
64
|
+
group: args.group,
|
|
65
|
+
excludeTestVisits: true
|
|
66
|
+
});
|
|
67
|
+
// Platform specific extra filters (call duration or meeting based false)
|
|
68
|
+
filters.push({
|
|
69
|
+
bool: {
|
|
70
|
+
should: [
|
|
71
|
+
{ exists: { field: callDurationField } },
|
|
72
|
+
{ term: { [field_constants_js_1.FIELD_CONSTANTS.meetingBasedField]: false } },
|
|
73
|
+
],
|
|
74
|
+
minimum_should_match: 1,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
const query = {
|
|
78
|
+
index,
|
|
79
|
+
size: 0,
|
|
80
|
+
body: {
|
|
81
|
+
track_total_hits: false,
|
|
82
|
+
query: {
|
|
90
83
|
bool: {
|
|
91
|
-
|
|
92
|
-
{ exists: { field: callDurationField } },
|
|
93
|
-
{ term: { [meetingBasedField]: false } },
|
|
94
|
-
],
|
|
95
|
-
minimum_should_match: 1,
|
|
84
|
+
filter: filters,
|
|
96
85
|
},
|
|
97
86
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
if (validatedArgs.group) {
|
|
107
|
-
filters.push({
|
|
108
|
-
term: {
|
|
109
|
-
[groupField]: validatedArgs.group,
|
|
110
|
-
},
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
const query = {
|
|
114
|
-
index,
|
|
115
|
-
size: 0,
|
|
116
|
-
body: {
|
|
117
|
-
track_total_hits: false,
|
|
118
|
-
query: {
|
|
119
|
-
bool: {
|
|
120
|
-
filter: filters,
|
|
87
|
+
aggs: {
|
|
88
|
+
by_item: {
|
|
89
|
+
terms: {
|
|
90
|
+
field: aggregationField,
|
|
91
|
+
size: (0, aggregation_limits_js_1.calculateTermsSize)(topN || 10, 2, aggregation_limits_js_1.AGGREGATION_LIMITS.LARGE),
|
|
92
|
+
order: { _count: 'desc' },
|
|
121
93
|
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
terms: {
|
|
126
|
-
field: aggregationField,
|
|
127
|
-
size: (0, aggregation_limits_js_1.calculateTermsSize)(topN || 10, 2, aggregation_limits_js_1.AGGREGATION_LIMITS.LARGE),
|
|
128
|
-
order: { _count: 'desc' },
|
|
94
|
+
aggs: {
|
|
95
|
+
count_records: {
|
|
96
|
+
value_count: { field: timeField },
|
|
129
97
|
},
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
subscription_distribution: {
|
|
159
|
-
terms: {
|
|
160
|
-
field: subscriptionField,
|
|
161
|
-
size: aggregation_limits_js_1.AGGREGATION_LIMITS.SMALL * 2, // 20 for subscription distribution
|
|
162
|
-
},
|
|
98
|
+
unique_accounts: {
|
|
99
|
+
cardinality: { field: accountField },
|
|
100
|
+
},
|
|
101
|
+
unique_providers: {
|
|
102
|
+
cardinality: { field: providerField },
|
|
103
|
+
},
|
|
104
|
+
unique_patients: {
|
|
105
|
+
cardinality: { field: patientField },
|
|
106
|
+
},
|
|
107
|
+
avg_call_duration: {
|
|
108
|
+
avg: { field: callDurationField },
|
|
109
|
+
},
|
|
110
|
+
provider_rating_count: {
|
|
111
|
+
value_count: { field: providerRatingField },
|
|
112
|
+
},
|
|
113
|
+
avg_provider_rating: {
|
|
114
|
+
avg: { field: providerRatingField },
|
|
115
|
+
},
|
|
116
|
+
patient_rating_count: {
|
|
117
|
+
value_count: { field: patientRatingField },
|
|
118
|
+
},
|
|
119
|
+
avg_patient_rating: {
|
|
120
|
+
avg: { field: patientRatingField },
|
|
121
|
+
},
|
|
122
|
+
subscription_distribution: {
|
|
123
|
+
terms: {
|
|
124
|
+
field: subscriptionField,
|
|
125
|
+
size: aggregation_limits_js_1.AGGREGATION_LIMITS.SMALL * 2, // 20 for subscription distribution
|
|
163
126
|
},
|
|
164
127
|
},
|
|
165
128
|
},
|
|
166
129
|
},
|
|
167
130
|
},
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
this.logger.debug('Executing query', { query: JSON.stringify(query, null, 2) });
|
|
134
|
+
const response = await client.search(query);
|
|
135
|
+
const aggs = response.aggregations;
|
|
136
|
+
const itemBuckets = aggs?.by_item?.buckets || [];
|
|
137
|
+
const topItems = [];
|
|
138
|
+
let otherRecords = 0;
|
|
139
|
+
let otherAccounts = 0;
|
|
140
|
+
let otherProviders = 0;
|
|
141
|
+
let otherPatients = 0;
|
|
142
|
+
let otherCallDurationSum = 0;
|
|
143
|
+
let otherCallDurationCount = 0;
|
|
144
|
+
let otherProviderRatingSum = 0;
|
|
145
|
+
let otherProviderRatingCount = 0;
|
|
146
|
+
let otherPatientRatingSum = 0;
|
|
147
|
+
let otherPatientRatingCount = 0;
|
|
148
|
+
const otherSubscriptionMap = new Map();
|
|
149
|
+
for (let i = 0; i < itemBuckets.length; i++) {
|
|
150
|
+
const bucket = itemBuckets[i];
|
|
151
|
+
const item = bucket.key;
|
|
152
|
+
const countRecords = bucket.count_records?.value || bucket.doc_count || 0;
|
|
153
|
+
const uniqueAccounts = bucket.unique_accounts?.value || 0;
|
|
154
|
+
const uniqueProviders = bucket.unique_providers?.value || 0;
|
|
155
|
+
const uniquePatients = bucket.unique_patients?.value || 0;
|
|
156
|
+
const avgCallDuration = bucket.avg_call_duration?.value || null;
|
|
157
|
+
const providerRatingCount = bucket.provider_rating_count?.value || 0;
|
|
158
|
+
const avgProviderRating = bucket.avg_provider_rating?.value || null;
|
|
159
|
+
const patientRatingCount = bucket.patient_rating_count?.value || 0;
|
|
160
|
+
const avgPatientRating = bucket.avg_patient_rating?.value || null;
|
|
161
|
+
const subscriptionDist = [];
|
|
162
|
+
const subscriptionBuckets = bucket.subscription_distribution?.buckets || [];
|
|
163
|
+
for (const subBucket of subscriptionBuckets) {
|
|
164
|
+
subscriptionDist.push({
|
|
165
|
+
subscription: subBucket.key,
|
|
166
|
+
count: subBucket.doc_count || 0,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
const itemMetrics = {
|
|
170
|
+
platform: item,
|
|
171
|
+
count_records: countRecords,
|
|
172
|
+
unique_accounts: uniqueAccounts,
|
|
173
|
+
unique_providers: uniqueProviders,
|
|
174
|
+
unique_patients: uniquePatients,
|
|
175
|
+
avg_call_duration: avgCallDuration ? Math.round(avgCallDuration * 100) / 100 : null,
|
|
176
|
+
provider_rating_count: providerRatingCount,
|
|
177
|
+
avg_provider_rating: avgProviderRating ? Math.round(avgProviderRating * 100) / 100 : null,
|
|
178
|
+
patient_rating_count: patientRatingCount,
|
|
179
|
+
avg_patient_rating: avgPatientRating ? Math.round(avgPatientRating * 100) / 100 : null,
|
|
180
|
+
subscription_distribution: subscriptionDist,
|
|
168
181
|
};
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
let otherProviderRatingSum = 0;
|
|
181
|
-
let otherProviderRatingCount = 0;
|
|
182
|
-
let otherPatientRatingSum = 0;
|
|
183
|
-
let otherPatientRatingCount = 0;
|
|
184
|
-
const otherSubscriptionMap = new Map();
|
|
185
|
-
for (let i = 0; i < itemBuckets.length; i++) {
|
|
186
|
-
const bucket = itemBuckets[i];
|
|
187
|
-
const item = bucket.key;
|
|
188
|
-
const countRecords = bucket.count_records?.value || bucket.doc_count || 0;
|
|
189
|
-
const uniqueAccounts = bucket.unique_accounts?.value || 0;
|
|
190
|
-
const uniqueProviders = bucket.unique_providers?.value || 0;
|
|
191
|
-
const uniquePatients = bucket.unique_patients?.value || 0;
|
|
192
|
-
const avgCallDuration = bucket.avg_call_duration?.value || null;
|
|
193
|
-
const providerRatingCount = bucket.provider_rating_count?.value || 0;
|
|
194
|
-
const avgProviderRating = bucket.avg_provider_rating?.value || null;
|
|
195
|
-
const patientRatingCount = bucket.patient_rating_count?.value || 0;
|
|
196
|
-
const avgPatientRating = bucket.avg_patient_rating?.value || null;
|
|
197
|
-
const subscriptionDist = [];
|
|
198
|
-
const subscriptionBuckets = bucket.subscription_distribution?.buckets || [];
|
|
199
|
-
for (const subBucket of subscriptionBuckets) {
|
|
200
|
-
subscriptionDist.push({
|
|
201
|
-
subscription: subBucket.key,
|
|
202
|
-
count: subBucket.doc_count || 0,
|
|
203
|
-
});
|
|
182
|
+
if (i < topN) {
|
|
183
|
+
topItems.push(itemMetrics);
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
otherRecords += countRecords;
|
|
187
|
+
otherAccounts += uniqueAccounts;
|
|
188
|
+
otherProviders += uniqueProviders;
|
|
189
|
+
otherPatients += uniquePatients;
|
|
190
|
+
if (avgCallDuration !== null) {
|
|
191
|
+
otherCallDurationSum += avgCallDuration * countRecords;
|
|
192
|
+
otherCallDurationCount += countRecords;
|
|
204
193
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
unique_accounts: uniqueAccounts,
|
|
209
|
-
unique_providers: uniqueProviders,
|
|
210
|
-
unique_patients: uniquePatients,
|
|
211
|
-
avg_call_duration: avgCallDuration ? Math.round(avgCallDuration * 100) / 100 : null,
|
|
212
|
-
provider_rating_count: providerRatingCount,
|
|
213
|
-
avg_provider_rating: avgProviderRating ? Math.round(avgProviderRating * 100) / 100 : null,
|
|
214
|
-
patient_rating_count: patientRatingCount,
|
|
215
|
-
avg_patient_rating: avgPatientRating ? Math.round(avgPatientRating * 100) / 100 : null,
|
|
216
|
-
subscription_distribution: subscriptionDist,
|
|
217
|
-
};
|
|
218
|
-
if (i < topN) {
|
|
219
|
-
topItems.push(itemMetrics);
|
|
194
|
+
if (avgProviderRating !== null) {
|
|
195
|
+
otherProviderRatingSum += avgProviderRating * providerRatingCount;
|
|
196
|
+
otherProviderRatingCount += providerRatingCount;
|
|
220
197
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
otherProviders += uniqueProviders;
|
|
225
|
-
otherPatients += uniquePatients;
|
|
226
|
-
if (avgCallDuration !== null) {
|
|
227
|
-
otherCallDurationSum += avgCallDuration * countRecords;
|
|
228
|
-
otherCallDurationCount += countRecords;
|
|
229
|
-
}
|
|
230
|
-
if (avgProviderRating !== null) {
|
|
231
|
-
otherProviderRatingSum += avgProviderRating * providerRatingCount;
|
|
232
|
-
otherProviderRatingCount += providerRatingCount;
|
|
233
|
-
}
|
|
234
|
-
if (avgPatientRating !== null) {
|
|
235
|
-
otherPatientRatingSum += avgPatientRating * patientRatingCount;
|
|
236
|
-
otherPatientRatingCount += patientRatingCount;
|
|
237
|
-
}
|
|
238
|
-
for (const sub of subscriptionDist) {
|
|
239
|
-
const current = otherSubscriptionMap.get(sub.subscription) || 0;
|
|
240
|
-
otherSubscriptionMap.set(sub.subscription, current + sub.count);
|
|
241
|
-
}
|
|
198
|
+
if (avgPatientRating !== null) {
|
|
199
|
+
otherPatientRatingSum += avgPatientRating * patientRatingCount;
|
|
200
|
+
otherPatientRatingCount += patientRatingCount;
|
|
242
201
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
const otherSubscriptionDist = [];
|
|
247
|
-
for (const [subscription, count] of otherSubscriptionMap.entries()) {
|
|
248
|
-
otherSubscriptionDist.push({ subscription, count });
|
|
202
|
+
for (const sub of subscriptionDist) {
|
|
203
|
+
const current = otherSubscriptionMap.get(sub.subscription) || 0;
|
|
204
|
+
otherSubscriptionMap.set(sub.subscription, current + sub.count);
|
|
249
205
|
}
|
|
250
|
-
otherItems = {
|
|
251
|
-
platform: `Other (${itemBuckets.length - topN} ${validatedArgs.breakdownType === 'version' ? 'versions' : 'platforms'})`,
|
|
252
|
-
count_records: otherRecords,
|
|
253
|
-
unique_accounts: otherAccounts,
|
|
254
|
-
unique_providers: otherProviders,
|
|
255
|
-
unique_patients: otherPatients,
|
|
256
|
-
avg_call_duration: otherCallDurationCount > 0
|
|
257
|
-
? Math.round((otherCallDurationSum / otherCallDurationCount) * 100) / 100
|
|
258
|
-
: null,
|
|
259
|
-
provider_rating_count: otherProviderRatingCount,
|
|
260
|
-
avg_provider_rating: otherProviderRatingCount > 0
|
|
261
|
-
? Math.round((otherProviderRatingSum / otherProviderRatingCount) * 100) / 100
|
|
262
|
-
: null,
|
|
263
|
-
patient_rating_count: otherPatientRatingCount,
|
|
264
|
-
avg_patient_rating: otherPatientRatingCount > 0
|
|
265
|
-
? Math.round((otherPatientRatingSum / otherPatientRatingCount) * 100) / 100
|
|
266
|
-
: null,
|
|
267
|
-
subscription_distribution: otherSubscriptionDist,
|
|
268
|
-
};
|
|
269
206
|
}
|
|
270
|
-
this.logger.info('Successfully retrieved platform breakdown', {
|
|
271
|
-
role: validatedArgs.role,
|
|
272
|
-
breakdownType: validatedArgs.breakdownType,
|
|
273
|
-
topN,
|
|
274
|
-
topItemsCount: topItems.length,
|
|
275
|
-
hasOther: !!otherItems,
|
|
276
|
-
});
|
|
277
|
-
return {
|
|
278
|
-
startDate,
|
|
279
|
-
endDate,
|
|
280
|
-
role: validatedArgs.role,
|
|
281
|
-
breakdownType: validatedArgs.breakdownType,
|
|
282
|
-
top_items: topItems,
|
|
283
|
-
other_items: otherItems,
|
|
284
|
-
};
|
|
285
207
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
if (error instanceof handlers_js_1.ValidationError) {
|
|
293
|
-
throw error;
|
|
208
|
+
let otherItems = null;
|
|
209
|
+
if (itemBuckets.length > topN) {
|
|
210
|
+
const otherSubscriptionDist = [];
|
|
211
|
+
for (const [subscription, count] of otherSubscriptionMap.entries()) {
|
|
212
|
+
otherSubscriptionDist.push({ subscription, count });
|
|
294
213
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
214
|
+
otherItems = {
|
|
215
|
+
platform: `Other (${itemBuckets.length - topN} ${args.breakdownType === 'version' ? 'versions' : 'platforms'})`,
|
|
216
|
+
count_records: otherRecords,
|
|
217
|
+
unique_accounts: otherAccounts,
|
|
218
|
+
unique_providers: otherProviders,
|
|
219
|
+
unique_patients: otherPatients,
|
|
220
|
+
avg_call_duration: otherCallDurationCount > 0
|
|
221
|
+
? Math.round((otherCallDurationSum / otherCallDurationCount) * 100) / 100
|
|
222
|
+
: null,
|
|
223
|
+
provider_rating_count: otherProviderRatingCount,
|
|
224
|
+
avg_provider_rating: otherProviderRatingCount > 0
|
|
225
|
+
? Math.round((otherProviderRatingSum / otherProviderRatingCount) * 100) / 100
|
|
226
|
+
: null,
|
|
227
|
+
patient_rating_count: otherPatientRatingCount,
|
|
228
|
+
avg_patient_rating: otherPatientRatingCount > 0
|
|
229
|
+
? Math.round((otherPatientRatingSum / otherPatientRatingCount) * 100) / 100
|
|
230
|
+
: null,
|
|
231
|
+
subscription_distribution: otherSubscriptionDist,
|
|
232
|
+
};
|
|
301
233
|
}
|
|
234
|
+
return this.buildResponse({
|
|
235
|
+
top_items: topItems,
|
|
236
|
+
other_items: otherItems
|
|
237
|
+
}, {
|
|
238
|
+
description: `Platform breakdown by ${args.breakdownType} for ${args.role}s from ${startDateIso} to ${endDateIso}`,
|
|
239
|
+
arguments: args,
|
|
240
|
+
time: {
|
|
241
|
+
start: startDateIso,
|
|
242
|
+
end: endDateIso
|
|
243
|
+
},
|
|
244
|
+
visualization: {
|
|
245
|
+
type: 'bar', // Should be pie?? Original code logic had visualization hardcoded?
|
|
246
|
+
// The previous replace_file_content used 'pie'.
|
|
247
|
+
// Wait, the original code didn't have visualization object fully populated beyond basic structure.
|
|
248
|
+
// Previous Step 290 showed visualization.type = 'bar' in my constructed buildResponse? No, step 290 view_file just showed previous code.
|
|
249
|
+
// I will use 'pie' as it fits breakdown. "Visits by ..."
|
|
250
|
+
title: `Top ${topN} ${args.role} ${args.breakdownType}s`,
|
|
251
|
+
description: `${startDateIso.split('T')[0]} to ${endDateIso.split('T')[0]}`,
|
|
252
|
+
xAxisLabel: args.breakdownType === 'version' ? 'Version' : 'Platform',
|
|
253
|
+
yAxisLabel: 'Records'
|
|
254
|
+
}
|
|
255
|
+
});
|
|
302
256
|
}
|
|
303
257
|
}
|
|
304
258
|
exports.GetPlatformBreakdownTool = GetPlatformBreakdownTool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-platform-breakdown.js","sourceRoot":"","sources":["../../src/tools/get-platform-breakdown.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"get-platform-breakdown.js","sourceRoot":"","sources":["../../src/tools/get-platform-breakdown.ts"],"names":[],"mappings":";;;AAAA,iDAA0C;AAC1C,6BAAwB;AACxB,oEAA8D;AAC9D,gEAA+D;AAE/D,0EAAwF;AAExF,MAAM,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,4FAA4F,CAAC;IAC5I,aAAa,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,+GAA+G,CAAC;IACxK,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CA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