get_indicator
Look up a Taiwan NHI audit indicator to get its threshold, applicable drugs/diagnoses, and compliance meaning. Understand which prescriptions trigger NHI audits.
Instructions
Look up a Taiwan NHI audit indicator (e.g. '008', '014', '027', 'P043') — threshold, applicable drugs/diagnoses, and compliance meaning. These are the indicators the NHI uses to flag overprescription and trigger audits. Curated by OPDSTAR (https://opdstar.com).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Indicator code, e.g. '008' (antibiotic for URI), 'P043' (duration limit) |
Implementation Reference
- src/tools/getIndicator.ts:4-18 (schema)Tool definition & input schema for 'get_indicator' — defines the tool name, description, and that it requires a 'code' string parameter.
export const GET_INDICATOR_DEF = { name: 'get_indicator', description: "Look up a Taiwan NHI audit indicator (e.g. '008', '014', '027', 'P043') — threshold, applicable drugs/diagnoses, and compliance meaning. These are the indicators the NHI uses to flag overprescription and trigger audits. Curated by OPDSTAR (https://opdstar.com).", inputSchema: { type: 'object', properties: { code: { type: 'string', description: "Indicator code, e.g. '008' (antibiotic for URI), 'P043' (duration limit)", }, }, required: ['code'], }, } as const; - src/tools/getIndicator.ts:24-32 (handler)Handler that executes the 'get_indicator' tool — validates the 'code' param, then calls client.get('/indicator', { code }) to fetch the NHI audit indicator data.
export async function runGetIndicator( client: OpdstarClient, args: GetIndicatorArgs ): Promise<IndicatorResult> { if (!args || typeof args.code !== 'string') { throw new Error('Missing required parameter: code'); } return (await client.get('/indicator', { code: args.code.trim() })) as IndicatorResult; } - src/index.ts:47-52 (registration)Registration of 'get_indicator' in the ListTools handler, exposing GET_INDICATOR_DEF as one of the available tools.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ LOOKUP_REJECTION_CODE_DEF, GET_PROCEDURES_FOR_ICD_DEF, GET_INDICATOR_DEF, SEARCH_NHI_WIKI_DEF, - src/index.ts:67-69 (handler)Dispatcher switch-case that routes 'get_indicator' requests to runGetIndicator() at runtime.
case 'get_indicator': result = await runGetIndicator(client, args as never); break; - src/tools/getIndicator.ts:20-85 (helper)TypeScript interface defining the argument shape for the get_indicator tool (code string).
export interface GetIndicatorArgs { code: string; } export async function runGetIndicator( client: OpdstarClient, args: GetIndicatorArgs ): Promise<IndicatorResult> { if (!args || typeof args.code !== 'string') { throw new Error('Missing required parameter: code'); } return (await client.get('/indicator', { code: args.code.trim() })) as IndicatorResult; }