get_encounter
Retrieve detailed clinical encounter information from athenahealth's electronic health records to support patient care decisions and documentation.
Instructions
Get details of a specific encounter
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| encounter_id | Yes | Encounter ID |
Implementation Reference
- src/definitions/tools.ts:182-192 (schema)Tool schema definition including name, description, and input validation schema requiring 'encounter_id'.{ name: 'get_encounter', description: 'Get details of a specific encounter', inputSchema: { type: 'object', properties: { encounter_id: { type: 'string', description: 'Encounter ID' }, }, required: ['encounter_id'], }, },
- src/handlers/tool-handlers.ts:512-546 (handler)Executes the get_encounter tool: parses input, fetches encounter via client, logs audit, returns JSON response or error.async handleGetEncounter(args: any) { try { const { encounter_id } = args; const encounter = await this.client.getEncounter(encounter_id); auditLog('ENCOUNTER_ACCESS', { resourceId: encounter_id, result: 'success', resourceType: 'ENCOUNTER', }); return { content: [ { type: 'text' as const, text: JSON.stringify(encounter, null, 2), }, ], }; } catch (error: any) { return { content: [ { type: 'text' as const, text: JSON.stringify({ error: 'Failed to get encounter', message: error.message || 'Unknown error occurred', status: error.status || null, note: 'Encounter endpoints may not be available in the athenahealth preview/sandbox environment.', }, null, 2), }, ], }; } }
- src/mcp-server.ts:209-210 (registration)Dispatches get_encounter tool calls to the handler in the MCP server's tool execution switch statement.case 'get_encounter': return await this.toolHandlers.handleGetEncounter(args);