get_mapping_statistics
Retrieve statistics about loaded mapping files to monitor data integration status and verify connections between drug identifiers in the DailyMed database.
Instructions
Get statistics about loaded mapping files
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mapping-service.ts:229-248 (handler)The actual implementation of the mapping statistics retrieval logic in the MappingService class.
getStatistics(): { pharmacologicClassMappings: number; rxNormMappings: number; uniqueSetIds: number; uniqueRxCUIs: number; uniquePharmacologicClasses: number; } { let totalPharmaMappings = 0; let totalRxNormMappings = 0; for (const mappings of this.pharmacologicClassMappings.values()) { totalPharmaMappings += mappings.length; } for (const mappings of this.rxNormMappings.values()) { totalRxNormMappings += mappings.length; } return { pharmacologicClassMappings: totalPharmaMappings, - src/clients/dailymed-client.ts:145-147 (handler)The DailyMedClient method that calls the mapping service to get statistics.
async getMappingStatistics() { return this.mappingService.getStatistics(); } - src/tools.ts:494-501 (registration)Tool registration for get_mapping_statistics.
{ name: "get_mapping_statistics", description: "Get statistics about loaded mapping files", inputSchema: { type: "object", properties: {}, }, }, - src/index.ts:348-349 (handler)The index handler where the tool call is dispatched to the client.
case "get_mapping_statistics": const mappingStats = await this.client.getMappingStatistics();