elasticsearch-mcp-vsee-stage 0.5.13 → 0.5.14
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/LICENSE +0 -0
- package/README.md +0 -0
- package/build/config.d.ts +0 -0
- package/build/config.d.ts.map +0 -0
- package/build/config.js +0 -0
- package/build/config.js.map +0 -0
- package/build/elasticsearch/client.d.ts +0 -0
- package/build/elasticsearch/client.d.ts.map +0 -0
- package/build/elasticsearch/client.js +0 -0
- package/build/elasticsearch/client.js.map +0 -0
- package/build/errors/handlers.d.ts +0 -0
- package/build/errors/handlers.d.ts.map +0 -0
- package/build/errors/handlers.js +0 -0
- package/build/errors/handlers.js.map +0 -0
- package/build/index.d.ts +0 -0
- package/build/index.d.ts.map +0 -0
- package/build/index.js +0 -0
- package/build/index.js.map +0 -0
- package/build/logger.d.ts +0 -0
- package/build/logger.d.ts.map +0 -0
- package/build/logger.js +0 -0
- package/build/logger.js.map +0 -0
- package/build/server.d.ts +2 -9
- package/build/server.d.ts.map +1 -1
- package/build/server.js +24 -445
- package/build/server.js.map +1 -1
- package/build/tools/base-tool.d.ts +41 -0
- package/build/tools/base-tool.d.ts.map +1 -0
- package/build/tools/base-tool.js +75 -0
- package/build/tools/base-tool.js.map +1 -0
- package/build/tools/find-entities-by-metric.d.ts +315 -24
- package/build/tools/find-entities-by-metric.d.ts.map +1 -1
- package/build/tools/find-entities-by-metric.js +280 -284
- package/build/tools/find-entities-by-metric.js.map +1 -1
- package/build/tools/get-index-fields.d.ts +38 -4
- package/build/tools/get-index-fields.d.ts.map +1 -1
- package/build/tools/get-index-fields.js +37 -49
- package/build/tools/get-index-fields.js.map +1 -1
- package/build/tools/get-platform-breakdown.d.ts +61 -22
- package/build/tools/get-platform-breakdown.d.ts.map +1 -1
- package/build/tools/get-platform-breakdown.js +223 -266
- package/build/tools/get-platform-breakdown.js.map +1 -1
- package/build/tools/get-rating-distribution.d.ts +66 -25
- package/build/tools/get-rating-distribution.d.ts.map +1 -1
- package/build/tools/get-rating-distribution.js +209 -245
- package/build/tools/get-rating-distribution.js.map +1 -1
- package/build/tools/get-subscription-breakdown.d.ts +31 -15
- package/build/tools/get-subscription-breakdown.d.ts.map +1 -1
- package/build/tools/get-subscription-breakdown.js +143 -155
- package/build/tools/get-subscription-breakdown.js.map +1 -1
- package/build/tools/get-usage-leaderboard.d.ts +102 -25
- package/build/tools/get-usage-leaderboard.d.ts.map +1 -1
- package/build/tools/get-usage-leaderboard.js +131 -136
- package/build/tools/get-usage-leaderboard.js.map +1 -1
- package/build/tools/get-usage-profile.d.ts +54 -22
- package/build/tools/get-usage-profile.d.ts.map +1 -1
- package/build/tools/get-usage-profile.js +209 -244
- package/build/tools/get-usage-profile.js.map +1 -1
- package/build/tools/get-visit-trends.d.ts +60 -25
- package/build/tools/get-visit-trends.d.ts.map +1 -1
- package/build/tools/get-visit-trends.js +185 -241
- package/build/tools/get-visit-trends.js.map +1 -1
- package/build/tools/index.d.ts +0 -0
- package/build/tools/index.d.ts.map +0 -0
- package/build/tools/index.js +0 -0
- package/build/tools/index.js.map +0 -0
- package/build/tools/top-change.d.ts +57 -23
- package/build/tools/top-change.d.ts.map +1 -1
- package/build/tools/top-change.js +172 -217
- 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/aggregation-limits.d.ts +0 -0
- package/build/utils/aggregation-limits.d.ts.map +0 -0
- package/build/utils/aggregation-limits.js +0 -0
- package/build/utils/aggregation-limits.js.map +0 -0
- package/build/utils/date-math.d.ts +0 -0
- package/build/utils/date-math.d.ts.map +0 -0
- package/build/utils/date-math.js +0 -0
- package/build/utils/date-math.js.map +0 -0
- package/build/utils/field-constants.d.ts +0 -0
- package/build/utils/field-constants.d.ts.map +0 -0
- package/build/utils/field-constants.js +0 -0
- package/build/utils/field-constants.js.map +0 -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/build/utils/schema-converter.d.ts +17 -0
- package/build/utils/schema-converter.d.ts.map +1 -0
- package/build/utils/schema-converter.js +101 -0
- package/build/utils/schema-converter.js.map +1 -0
- package/build/validation/schemas.d.ts +0 -0
- package/build/validation/schemas.d.ts.map +0 -0
- package/build/validation/schemas.js +0 -0
- package/build/validation/schemas.js.map +0 -0
- package/package.json +1 -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,247 @@ 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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
{
|
|
22
|
+
get schema() {
|
|
23
|
+
return GetPlatformBreakdownArgsSchema;
|
|
24
|
+
}
|
|
25
|
+
get description() {
|
|
26
|
+
return 'Get breakdown of top N platforms or platform versions by usage over a time period, can optionally be filtered by account or group. Supports both provider and patient roles. Returns top N items (default 10) plus "Other" category if needed, with metrics per item including visit counts, unique accounts/providers/patients, ratings, and call duration.';
|
|
27
|
+
}
|
|
28
|
+
async run(args) {
|
|
29
|
+
const topN = Math.min(args.topN || 10, 50);
|
|
30
|
+
const { startIso: startDateIso, endIso: endDateIso } = this.resolveTimeRange(args.startDate, args.endDate, 'now-14d', 'now');
|
|
31
|
+
this.logger.info('Getting platform breakdown', {
|
|
32
|
+
role: args.role,
|
|
33
|
+
breakdownType: args.breakdownType,
|
|
34
|
+
topN,
|
|
35
|
+
originalTopN: args.topN,
|
|
36
|
+
startDate: startDateIso,
|
|
37
|
+
endDate: endDateIso,
|
|
38
|
+
account: args.account,
|
|
39
|
+
group: args.group,
|
|
40
|
+
});
|
|
41
|
+
const client = this.elasticsearch.getClient();
|
|
42
|
+
const index = field_constants_js_1.FIELD_CONSTANTS.index;
|
|
43
|
+
const timeField = field_constants_js_1.FIELD_CONSTANTS.timeField;
|
|
44
|
+
const accountField = field_constants_js_1.FIELD_CONSTANTS.accountField;
|
|
45
|
+
const providerField = field_constants_js_1.FIELD_CONSTANTS.providerField;
|
|
46
|
+
const patientField = field_constants_js_1.FIELD_CONSTANTS.patientField;
|
|
47
|
+
const callDurationField = field_constants_js_1.FIELD_CONSTANTS.callDurationField;
|
|
48
|
+
const providerRatingField = field_constants_js_1.FIELD_CONSTANTS.providerRatingField;
|
|
49
|
+
const patientRatingField = field_constants_js_1.FIELD_CONSTANTS.patientRatingField;
|
|
50
|
+
const subscriptionField = field_constants_js_1.FIELD_CONSTANTS.subscriptionField;
|
|
51
|
+
let aggregationField;
|
|
52
|
+
if (args.role === 'provider') {
|
|
53
|
+
aggregationField = args.breakdownType === 'version'
|
|
54
|
+
? 'provider0_platform_version.keyword'
|
|
55
|
+
: 'provider0_platform.keyword';
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
aggregationField = args.breakdownType === 'version'
|
|
59
|
+
? 'patient0_platform_version.keyword'
|
|
60
|
+
: 'patient0_platform.keyword';
|
|
61
|
+
}
|
|
62
|
+
// Use helper for common filters
|
|
63
|
+
const filters = (0, query_helpers_js_1.buildCommonFilters)({
|
|
64
|
+
startDate: startDateIso,
|
|
65
|
+
endDate: endDateIso,
|
|
66
|
+
account: args.account,
|
|
67
|
+
group: args.group,
|
|
68
|
+
excludeTestVisits: true
|
|
69
|
+
});
|
|
70
|
+
// Platform specific extra filters (call duration or meeting based false)
|
|
71
|
+
filters.push({
|
|
72
|
+
bool: {
|
|
73
|
+
should: [
|
|
74
|
+
{ exists: { field: callDurationField } },
|
|
75
|
+
{ term: { [field_constants_js_1.FIELD_CONSTANTS.meetingBasedField]: false } },
|
|
76
|
+
],
|
|
77
|
+
minimum_should_match: 1,
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
const query = {
|
|
81
|
+
index,
|
|
82
|
+
size: 0,
|
|
83
|
+
body: {
|
|
84
|
+
track_total_hits: false,
|
|
85
|
+
query: {
|
|
90
86
|
bool: {
|
|
91
|
-
|
|
92
|
-
{ exists: { field: callDurationField } },
|
|
93
|
-
{ term: { [meetingBasedField]: false } },
|
|
94
|
-
],
|
|
95
|
-
minimum_should_match: 1,
|
|
87
|
+
filter: filters,
|
|
96
88
|
},
|
|
97
89
|
},
|
|
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,
|
|
90
|
+
aggs: {
|
|
91
|
+
by_item: {
|
|
92
|
+
terms: {
|
|
93
|
+
field: aggregationField,
|
|
94
|
+
size: (0, aggregation_limits_js_1.calculateTermsSize)(topN || 10, 2, aggregation_limits_js_1.AGGREGATION_LIMITS.LARGE),
|
|
95
|
+
order: { _count: 'desc' },
|
|
121
96
|
},
|
|
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' },
|
|
97
|
+
aggs: {
|
|
98
|
+
count_records: {
|
|
99
|
+
value_count: { field: timeField },
|
|
129
100
|
},
|
|
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
|
-
},
|
|
101
|
+
unique_accounts: {
|
|
102
|
+
cardinality: { field: accountField },
|
|
103
|
+
},
|
|
104
|
+
unique_providers: {
|
|
105
|
+
cardinality: { field: providerField },
|
|
106
|
+
},
|
|
107
|
+
unique_patients: {
|
|
108
|
+
cardinality: { field: patientField },
|
|
109
|
+
},
|
|
110
|
+
avg_call_duration: {
|
|
111
|
+
avg: { field: callDurationField },
|
|
112
|
+
},
|
|
113
|
+
provider_rating_count: {
|
|
114
|
+
value_count: { field: providerRatingField },
|
|
115
|
+
},
|
|
116
|
+
avg_provider_rating: {
|
|
117
|
+
avg: { field: providerRatingField },
|
|
118
|
+
},
|
|
119
|
+
patient_rating_count: {
|
|
120
|
+
value_count: { field: patientRatingField },
|
|
121
|
+
},
|
|
122
|
+
avg_patient_rating: {
|
|
123
|
+
avg: { field: patientRatingField },
|
|
124
|
+
},
|
|
125
|
+
subscription_distribution: {
|
|
126
|
+
terms: {
|
|
127
|
+
field: subscriptionField,
|
|
128
|
+
size: aggregation_limits_js_1.AGGREGATION_LIMITS.SMALL * 2, // 20 for subscription distribution
|
|
163
129
|
},
|
|
164
130
|
},
|
|
165
131
|
},
|
|
166
132
|
},
|
|
167
133
|
},
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
this.logger.debug('Executing query', { query: JSON.stringify(query, null, 2) });
|
|
137
|
+
const response = await client.search(query);
|
|
138
|
+
const aggs = response.aggregations;
|
|
139
|
+
const itemBuckets = aggs?.by_item?.buckets || [];
|
|
140
|
+
const topItems = [];
|
|
141
|
+
let otherRecords = 0;
|
|
142
|
+
let otherAccounts = 0;
|
|
143
|
+
let otherProviders = 0;
|
|
144
|
+
let otherPatients = 0;
|
|
145
|
+
let otherCallDurationSum = 0;
|
|
146
|
+
let otherCallDurationCount = 0;
|
|
147
|
+
let otherProviderRatingSum = 0;
|
|
148
|
+
let otherProviderRatingCount = 0;
|
|
149
|
+
let otherPatientRatingSum = 0;
|
|
150
|
+
let otherPatientRatingCount = 0;
|
|
151
|
+
const otherSubscriptionMap = new Map();
|
|
152
|
+
for (let i = 0; i < itemBuckets.length; i++) {
|
|
153
|
+
const bucket = itemBuckets[i];
|
|
154
|
+
const item = bucket.key;
|
|
155
|
+
const countRecords = bucket.count_records?.value || bucket.doc_count || 0;
|
|
156
|
+
const uniqueAccounts = bucket.unique_accounts?.value || 0;
|
|
157
|
+
const uniqueProviders = bucket.unique_providers?.value || 0;
|
|
158
|
+
const uniquePatients = bucket.unique_patients?.value || 0;
|
|
159
|
+
const avgCallDuration = bucket.avg_call_duration?.value || null;
|
|
160
|
+
const providerRatingCount = bucket.provider_rating_count?.value || 0;
|
|
161
|
+
const avgProviderRating = bucket.avg_provider_rating?.value || null;
|
|
162
|
+
const patientRatingCount = bucket.patient_rating_count?.value || 0;
|
|
163
|
+
const avgPatientRating = bucket.avg_patient_rating?.value || null;
|
|
164
|
+
const subscriptionDist = [];
|
|
165
|
+
const subscriptionBuckets = bucket.subscription_distribution?.buckets || [];
|
|
166
|
+
for (const subBucket of subscriptionBuckets) {
|
|
167
|
+
subscriptionDist.push({
|
|
168
|
+
subscription: subBucket.key,
|
|
169
|
+
count: subBucket.doc_count || 0,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
const itemMetrics = {
|
|
173
|
+
platform: item,
|
|
174
|
+
count_records: countRecords,
|
|
175
|
+
unique_accounts: uniqueAccounts,
|
|
176
|
+
unique_providers: uniqueProviders,
|
|
177
|
+
unique_patients: uniquePatients,
|
|
178
|
+
avg_call_duration: avgCallDuration ? Math.round(avgCallDuration * 100) / 100 : null,
|
|
179
|
+
provider_rating_count: providerRatingCount,
|
|
180
|
+
avg_provider_rating: avgProviderRating ? Math.round(avgProviderRating * 100) / 100 : null,
|
|
181
|
+
patient_rating_count: patientRatingCount,
|
|
182
|
+
avg_patient_rating: avgPatientRating ? Math.round(avgPatientRating * 100) / 100 : null,
|
|
183
|
+
subscription_distribution: subscriptionDist,
|
|
168
184
|
};
|
|
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
|
-
});
|
|
185
|
+
if (i < topN) {
|
|
186
|
+
topItems.push(itemMetrics);
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
otherRecords += countRecords;
|
|
190
|
+
otherAccounts += uniqueAccounts;
|
|
191
|
+
otherProviders += uniqueProviders;
|
|
192
|
+
otherPatients += uniquePatients;
|
|
193
|
+
if (avgCallDuration !== null) {
|
|
194
|
+
otherCallDurationSum += avgCallDuration * countRecords;
|
|
195
|
+
otherCallDurationCount += countRecords;
|
|
204
196
|
}
|
|
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);
|
|
197
|
+
if (avgProviderRating !== null) {
|
|
198
|
+
otherProviderRatingSum += avgProviderRating * providerRatingCount;
|
|
199
|
+
otherProviderRatingCount += providerRatingCount;
|
|
220
200
|
}
|
|
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
|
-
}
|
|
201
|
+
if (avgPatientRating !== null) {
|
|
202
|
+
otherPatientRatingSum += avgPatientRating * patientRatingCount;
|
|
203
|
+
otherPatientRatingCount += patientRatingCount;
|
|
242
204
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
const otherSubscriptionDist = [];
|
|
247
|
-
for (const [subscription, count] of otherSubscriptionMap.entries()) {
|
|
248
|
-
otherSubscriptionDist.push({ subscription, count });
|
|
205
|
+
for (const sub of subscriptionDist) {
|
|
206
|
+
const current = otherSubscriptionMap.get(sub.subscription) || 0;
|
|
207
|
+
otherSubscriptionMap.set(sub.subscription, current + sub.count);
|
|
249
208
|
}
|
|
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
209
|
}
|
|
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
210
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
if (error instanceof handlers_js_1.ValidationError) {
|
|
293
|
-
throw error;
|
|
211
|
+
let otherItems = null;
|
|
212
|
+
if (itemBuckets.length > topN) {
|
|
213
|
+
const otherSubscriptionDist = [];
|
|
214
|
+
for (const [subscription, count] of otherSubscriptionMap.entries()) {
|
|
215
|
+
otherSubscriptionDist.push({ subscription, count });
|
|
294
216
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
217
|
+
otherItems = {
|
|
218
|
+
platform: `Other (${itemBuckets.length - topN} ${args.breakdownType === 'version' ? 'versions' : 'platforms'})`,
|
|
219
|
+
count_records: otherRecords,
|
|
220
|
+
unique_accounts: otherAccounts,
|
|
221
|
+
unique_providers: otherProviders,
|
|
222
|
+
unique_patients: otherPatients,
|
|
223
|
+
avg_call_duration: otherCallDurationCount > 0
|
|
224
|
+
? Math.round((otherCallDurationSum / otherCallDurationCount) * 100) / 100
|
|
225
|
+
: null,
|
|
226
|
+
provider_rating_count: otherProviderRatingCount,
|
|
227
|
+
avg_provider_rating: otherProviderRatingCount > 0
|
|
228
|
+
? Math.round((otherProviderRatingSum / otherProviderRatingCount) * 100) / 100
|
|
229
|
+
: null,
|
|
230
|
+
patient_rating_count: otherPatientRatingCount,
|
|
231
|
+
avg_patient_rating: otherPatientRatingCount > 0
|
|
232
|
+
? Math.round((otherPatientRatingSum / otherPatientRatingCount) * 100) / 100
|
|
233
|
+
: null,
|
|
234
|
+
subscription_distribution: otherSubscriptionDist,
|
|
235
|
+
};
|
|
301
236
|
}
|
|
237
|
+
return this.buildResponse({
|
|
238
|
+
top_items: topItems,
|
|
239
|
+
other_items: otherItems
|
|
240
|
+
}, {
|
|
241
|
+
description: `Platform breakdown by ${args.breakdownType} for ${args.role}s from ${startDateIso} to ${endDateIso}`,
|
|
242
|
+
arguments: args,
|
|
243
|
+
time: {
|
|
244
|
+
start: startDateIso,
|
|
245
|
+
end: endDateIso
|
|
246
|
+
},
|
|
247
|
+
visualization: {
|
|
248
|
+
type: 'bar', // Should be pie?? Original code logic had visualization hardcoded?
|
|
249
|
+
// The previous replace_file_content used 'pie'.
|
|
250
|
+
// Wait, the original code didn't have visualization object fully populated beyond basic structure.
|
|
251
|
+
// Previous Step 290 showed visualization.type = 'bar' in my constructed buildResponse? No, step 290 view_file just showed previous code.
|
|
252
|
+
// I will use 'pie' as it fits breakdown. "Visits by ..."
|
|
253
|
+
title: `Top ${topN} ${args.role} ${args.breakdownType}s`,
|
|
254
|
+
description: `${startDateIso.split('T')[0]} to ${endDateIso.split('T')[0]}`,
|
|
255
|
+
xAxisLabel: args.breakdownType === 'version' ? 'Version' : 'Platform',
|
|
256
|
+
yAxisLabel: 'Records'
|
|
257
|
+
}
|
|
258
|
+
});
|
|
302
259
|
}
|
|
303
260
|
}
|
|
304
261
|
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,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,C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