get_procedures_for_icd
Look up NHI procedure codes by Taiwan ICD-10 code and specialty, returning payment points and audit notes for accurate billing.
Instructions
Given a Taiwan ICD-10 code and specialty, return the NHI procedure codes applicable. Results include nhi_points (healthcare payment points) and audit_notes (review caveats). 1,497 procedures across 20 specialties curated by OPDSTAR (https://opdstar.com).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icd10 | Yes | ICD-10 code, e.g. 'L30.9' (chronic eczema), 'J06.9' (acute URI) | |
| specialty | Yes | Specialty ID — one of 20 supported specialties | |
| limit | No | Max results (1-20, default 10) |
Implementation Reference
- src/tools/getProceduresForIcd.ts:44-56 (handler)The main handler function that executes the tool logic: calls client.get('/procedures-for-icd', ...) with icd10, specialty, and optional limit parameters.
export async function runGetProceduresForIcd( client: OpdstarClient, args: GetProceduresForIcdArgs ): Promise<ProceduresForIcdResult> { if (!args || typeof args.icd10 !== 'string' || typeof args.specialty !== 'string') { throw new Error('Missing required parameters: icd10 and specialty'); } return (await client.get('/procedures-for-icd', { icd10: args.icd10.trim(), specialty: args.specialty.trim().toLowerCase(), limit: args.limit, })) as ProceduresForIcdResult; } - The tool definition including inputSchema (icd10 string, specialty enum, limit integer) and the GetProceduresForIcdArgs interface.
export const GET_PROCEDURES_FOR_ICD_DEF = { name: 'get_procedures_for_icd', description: 'Given a Taiwan ICD-10 code and specialty, return the NHI procedure codes applicable. Results include nhi_points (healthcare payment points) and audit_notes (review caveats). 1,497 procedures across 20 specialties curated by OPDSTAR (https://opdstar.com).', inputSchema: { type: 'object', properties: { icd10: { type: 'string', description: "ICD-10 code, e.g. 'L30.9' (chronic eczema), 'J06.9' (acute URI)", }, specialty: { type: 'string', description: 'Specialty ID — one of 20 supported specialties', enum: [...SPECIALTIES], }, limit: { type: 'integer', description: 'Max results (1-20, default 10)', minimum: 1, maximum: 20, default: 10, }, }, required: ['icd10', 'specialty'], }, } as const; - src/index.ts:64-65 (registration)Registration in the switch/case dispatch that routes 'get_procedures_for_icd' to the handler.
case 'get_procedures_for_icd': result = await runGetProceduresForIcd(client, args as never); - src/index.ts:47-53 (registration)Tool is listed in the ListToolsRequestSchema handler, registering GET_PROCEDURES_FOR_ICD_DEF for tool discovery.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ LOOKUP_REJECTION_CODE_DEF, GET_PROCEDURES_FOR_ICD_DEF, GET_INDICATOR_DEF, SEARCH_NHI_WIKI_DEF, ], - src/types.ts:28-33 (helper)The ProceduresForIcdResult interface defining the return shape (icd10, specialty, count, results array of ProcedureItem).
export interface ProceduresForIcdResult { icd10: string; specialty: string; count: number; results: ProcedureItem[]; }