search_by_rxnorm_mapping
Find RxNorm mappings for medications using drug names to access standardized drug identifiers and related information from the DailyMed database.
Instructions
Search for RxNorm mappings by drug name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| drugName | Yes | Drug name to search for in RxNorm mappings |
Implementation Reference
- src/mapping-service.ts:141-154 (handler)The searchRxNormMappingsByName method in MappingService performs the core logic for searching RxNorm mappings by drug name.
searchRxNormMappingsByName(drugName: string): RxNormMapping[] { const searchTerm = drugName.toLowerCase(); const results: RxNormMapping[] = []; for (const mappings of this.rxNormMappings.values()) { for (const mapping of mappings) { if (mapping.rxstring.toLowerCase().includes(searchTerm)) { results.push(mapping); } } } return results; } - src/tools.ts:502-514 (schema)The tool definition and input schema for search_by_rxnorm_mapping in src/tools.ts.
{ name: "search_by_rxnorm_mapping", description: "Search for RxNorm mappings by drug name", inputSchema: { type: "object", properties: { drugName: { type: "string", description: "Drug name to search for in RxNorm mappings", }, }, required: ["drugName"], }, - src/clients/dailymed-client.ts:149-151 (registration)The delegate method searchByRxNormMapping in DailyMedClient, which bridges the tool call to the MappingService.
async searchByRxNormMapping(drugName: string) { return this.mappingService.searchRxNormMappingsByName(drugName); }