MCP 서버

medical-codes-mcp-server

io.github.cyanheads/medical-codes-mcp-server
헬스케어 공개 · 연결 가능 MCP 2025-11-25

이 MCP로 할 수 있는 일

Looks up, validates, searches, and crosswalks US ICD-10, ICD-10-PCS, HCPCS, RxNorm, and NDC medical codes.

medcode_browse_hierarchy
Browse Code Hierarchy
Walk a US medical code system's hierarchy for discovery without a search term. With no `node`, returns the top-level entries (ICD-10-CM categories, HCPCS range buckets, or ICD-10-PCS first-axis values). With a `node`, returns its immediate children. ICD-10-CM and HCPCS use a prefix hierarchy (a shorter code is the parent of a longer one); ICD-10-PCS is axis-based — each of its 7 characters is an independent axis (section, body system, root operation, body part, approach, device, qualifier), but only the top-level Section axis is browsable (omit `node`): positions 2–7 are context-dependent on the preceding axis path and are not enumerable from a flat partial code. Lets an agent orient in an unfamiliar system or enumerate a category's specific codes. A large child set paginates: when the response carries a `nextCursor`, pass it back as `cursor` to fetch the next page.
읽기 전용 멱등성
입력 스키마
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['system'], 'properties': {'node': {'anyOf': [{'type': 'string', 'const': ''}, {'type': 'string', 'minLength': 1, 'description': 'A code whose children to list (ICD-10-CM/HCPCS). ICD-10-PCS supports only top-level Section browsing â\x80\x94 a partial PCS code does not expand to next-position axis values.'}], 'description': 'A node to expand â\x80\x94 or omit / pass an empty string for the top level. For ICD-10-CM/HCPCS, a code whose children to list; ICD-10-PCS supports only top-level Section browsing. Must not be blank or whitespace-only when provided.'}, 'limit': {'type': 'integer', 'maximum': 200, 'minimum': 1, 'description': 'Max entries per page. Defaults to MEDCODE_MAX_RESULTS (50), ceiling 200.'}, 'cursor': {'type': 'string', 'description': "Opaque continuation token from a previous response's `nextCursor`, to fetch the next page of children/entries. Omit for the top of the list."}, 'system': {'enum': ['ICD10CM', 'ICD10PCS', 'HCPCS', 'RXNORM'], 'type': 'string', 'description': 'The code system to browse.'}}, 'additionalProperties': False}
출력 스키마
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['kind', 'codes', 'axes', 'truncated', 'shown', 'cap']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'cap': {'type': 'number', 'description': 'The page size that was applied.'}, 'axes': {'type': 'array', 'items': {'type': 'object', 'required': ['position', 'value', 'meaning'], 'properties': {'value': {'type': 'string', 'description': 'The single-character axis value valid at this position.'}, 'meaning': {'type': 'string', 'description': 'What this axis value means at this position.'}, 'position': {'type': 'number', 'description': 'The 1-based character position in the ICD-10-PCS code.'}}, 'description': 'A valid ICD-10-PCS axis value at a given character position.', 'additionalProperties': False}, 'description': 'The top-level ICD-10-PCS Section axis values (only the Section axis is enumerable). Empty when kind is "codes".'}, 'kind': {'enum': ['codes', 'axes'], 'type': 'string', 'description': '"codes" for prefix-hierarchy children (ICD-10-CM/HCPCS); "axes" for ICD-10-PCS axis values.'}, 'codes': {'type': 'array', 'items': {'type': 'object', 'required': ['system', 'code', 'description', 'shortDescription', 'billable', 'header', 'chapter'], 'properties': {'code': {'type': 'string', 'description': 'The child code in display form.'}, 'header': {'type': 'boolean', 'description': 'True when the code is a non-billable category/header.'}, 'system': {'type': 'string', 'description': 'The system the node belongs to.'}, 'chapter': {'type': ['string', 'null'], 'description': 'Chapter/range bucket, or null.'}, 'billable': {'type': ['boolean', 'null'], 'description': 'True when the code is a billable leaf. Null when the system has no billing concept.'}, 'description': {'type': ['string', 'null'], 'description': 'Official long description, or null.'}, 'shortDescription': {'type': ['string', 'null'], 'description': 'Official short description, or null.'}}, 'description': 'A child code in a prefix hierarchy (ICD-10-CM/HCPCS).', 'additionalProperties': False}, 'description': 'Child codes under the requested node or top level. Empty when kind is "axes".'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['unknown_node'], 'description': 'Machine-readable failure mode. Declared by this tool: `unknown_node`: The node does not exist in the system â\x80\x94 for ICD-10-PCS, also when it uses a character outside the axis alphabet or begins no bundled code. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'shown': {'type': 'number', 'description': 'Number of entries returned on this page (codes or axes).'}, 'notice': {'type': 'string', 'description': 'Guidance when a node has no children/axes â\x80\x94 suggests the top level or a valid node.'}, 'truncated': {'type': 'boolean', 'description': 'True when more entries exist beyond this page.'}, 'nextCursor': {'type': 'string', 'description': 'Opaque token to pass back as `cursor` for the next page. Present only when more entries exist beyond this page.'}}, 'additionalProperties': False}
medcode_check_code
Check Medical Code
Validate whether a US medical code exists, is current, and is billable in the active bundled release. Returns a discriminated status — valid_billable, valid_not_billable, valid_header, valid, or terminated — with a `whyNot` explaining non-billable and terminated cases (e.g. "valid ICD-10-CM category but not billable — submit a more specific child code"). This is the detail a coder needs before submitting a claim. RxNorm has no billing concept, so a current RxNorm concept is `valid` with `billable: null` and no billing verdict. Auto-detects the system from the code's shape; pass an explicit `system` to disambiguate. A non-billable or terminated code is a successful result with a whyNot, not an error — only a code absent from the named or detected system raises unknown_code, which names the other bundled system when one holds the code. A code string that also exists in another bundled system carries `alsoInSystems` naming it, since the verdict applies only to the system that answered.
읽기 전용 멱등성
입력 스키마
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['code'], 'properties': {'code': {'type': 'string', 'minLength': 1, 'description': 'The code to validate, with or without dots. Must not be blank or whitespace-only.'}, 'system': {'enum': ['ICD10CM', 'ICD10PCS', 'HCPCS', 'RXNORM'], 'type': 'string', 'description': "Force the lookup into this system. Omit to auto-detect from the code's shape."}}, 'additionalProperties': False}
출력 스키마
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['system', 'code', 'status', 'billable', 'whyNot']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'code': {'type': 'string', 'description': 'The code in display form (ICD-10-CM carries the dot).'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['unknown_code', 'ambiguous_system'], 'description': 'Machine-readable failure mode. Declared by this tool: `unknown_code`: The code does not exist in the named or detected system. `ambiguous_system`: The code is present in more than one bundled system and no `system` was given. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'status': {'enum': ['valid_billable', 'valid_not_billable', 'valid_header', 'valid', 'terminated'], 'type': 'string', 'description': 'Validity status. valid_billable = submit as-is; valid_header/valid_not_billable = needs a more specific code; valid = exists and is current in a system with no billing concept (RxNorm), so there is no billing verdict; terminated = retired.'}, 'system': {'type': 'string', 'description': 'The system the code was resolved in, echoed for chaining.'}, 'whyNot': {'type': ['string', 'null'], 'description': 'Explanation for non-billable/terminated statuses, or null when valid_billable or valid.'}, 'billable': {'type': ['boolean', 'null'], 'description': 'True only when status is valid_billable. Null when status is valid â\x80\x94 the system has no billing concept.'}, 'alsoInSystems': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Other bundled systems holding this same code string, present only when there is at least one. The verdict above is for the system this code resolved in; the code is a DIFFERENT code in each system listed here, with its own billability â\x80\x94 "B00" is the ICD-10-CM category "Herpesviral [herpes simplex] infections" and also the ICD-10-PCS table row "Imaging, Central Nervous System, Plain Radiography". Re-call with `system` set to one of these values to validate it there.'}}, 'additionalProperties': False}
medcode_get_code
Get Medical Code
Decode one or more US medical codes to their official descriptions across ICD-10-CM (diagnoses), ICD-10-PCS (inpatient procedures), HCPCS Level II (supplies/drugs/services), and RxNorm (drugs, by RXCUI). Also decodes a National Drug Code (NDC) directly to its RxNorm product offline, tagged `source: "NDC"` — hyphenated in an FDA segment configuration (4-4-2, 5-3-2, 5-4-1, or the 11-digit 5-4-2) or as bare 10/11 digits; any other segment widths are malformed and stay unresolved. Auto-detects the system from each code's shape; pass an explicit `system` only when a value is genuinely ambiguous. Accepts 1–50 codes and returns partial success: resolved codes in `found`, unresolved in `notFound` with a per-code reason, so one bad code never fails the batch. Set `includeHierarchy` to attach each code's parent and immediate children (with a `childrenTruncated` flag when a code has more children than the cap returns — walk the full set via medcode_browse_hierarchy or medcode_map_codes). The resolved `system` is echoed on every result for chaining into a billability check or a medcode_map_codes parents/children walk; a bare integer that resolves nowhere is named as a possible CPT / HCPCS Level I code, which is out of scope, except a bare 10/11-digit one, which is named as an NDC no bundled drug maps to; a code string that also exists in another bundled system carries `alsoInSystems` naming it, so a single answer to a colliding code is never mistaken for the only one.
읽기 전용 멱등성
입력 스키마
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['codes'], 'properties': {'codes': {'type': 'array', 'items': {'type': 'string', 'minLength': 1, 'description': 'A single code to decode (with or without dots), an RXCUI, or an NDC. Must not be blank or whitespace-only.'}, 'maxItems': 50, 'minItems': 1, 'description': 'Codes to decode (1â\x80\x9350). Mixed systems are fine â\x80\x94 each is detected independently. An NDC decodes to its RxNorm product: hyphenated as 4-4-2, 5-3-2, 5-4-1, or 5-4-2, or as bare 10/11 digits.'}, 'system': {'enum': ['ICD10CM', 'ICD10PCS', 'HCPCS', 'RXNORM'], 'type': 'string', 'description': 'Force every code to be looked up in this system, which also skips the NDC decode. Omit to auto-detect per code.'}, 'includeHierarchy': {'type': 'boolean', 'default': False, 'description': "When true, attach each found code's parent and immediate children."}}, 'additionalProperties': False}
출력 스키마
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['found', 'notFound']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['no_codes_found'], 'description': 'Machine-readable failure mode. Declared by this tool: `no_codes_found`: None of the requested codes resolved â\x80\x94 in any bundled system, or in the explicit `system` when one is given (the message then names any other bundled system that holds a code). Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'found': {'type': 'array', 'items': {'type': 'object', 'required': ['system', 'code', 'description', 'shortDescription', 'billable', 'header', 'chapter'], 'properties': {'code': {'type': 'string', 'description': 'The resolved code in display form (ICD-10-CM codes carry the dot, e.g. "E11.9").'}, 'header': {'type': 'boolean', 'description': 'True when the code is a non-billable category/header (ICD-10-CM) rather than a leaf code.'}, 'parent': {'type': ['string', 'null'], 'description': 'Immediate parent code (present only when includeHierarchy is true). Null at a root.'}, 'source': {'type': 'string', 'description': 'Resolution provenance when the input was not a direct code: "NDC" when an NDC was decoded to its RxNorm product via the NDCâ\x86\x94RxNorm map. Omitted for direct code lookups.'}, 'system': {'type': 'string', 'description': 'The system that answered: "ICD10CM", "ICD10PCS", "HCPCS", or "RXNORM". Pass it as `system` to medcode_check_code, or to medcode_map_codes on a parents/children walk; the map_codes drug directions accept only "RXNORM", which they need no `system` to reach.'}, 'chapter': {'type': ['string', 'null'], 'description': 'Chapter/range bucket the code belongs to, or null when not applicable. For RxNorm, the concept term type (IN, PIN, MIN, BN, SCD, SBD, GPCK, BPCK).'}, 'billable': {'type': ['boolean', 'null'], 'description': 'True when the code is a billable leaf. False for headers/categories and non-billable codes. Null when the system has no billing concept (RxNorm).'}, 'children': {'type': 'array', 'items': {'type': 'object', 'required': ['system', 'code', 'description', 'shortDescription', 'billable', 'header', 'chapter'], 'properties': {'code': {'type': 'string', 'description': 'The resolved code in display form (ICD-10-CM codes carry the dot, e.g. "E11.9").'}, 'header': {'type': 'boolean', 'description': 'True when the code is a non-billable category/header (ICD-10-CM) rather than a leaf code.'}, 'system': {'type': 'string', 'description': 'The system that answered: "ICD10CM", "ICD10PCS", "HCPCS", or "RXNORM". Pass it as `system` to medcode_check_code, or to medcode_map_codes on a parents/children walk; the map_codes drug directions accept only "RXNORM", which they need no `system` to reach.'}, 'chapter': {'type': ['string', 'null'], 'description': 'Chapter/range bucket the code belongs to, or null when not applicable. For RxNorm, the concept term type (IN, PIN, MIN, BN, SCD, SBD, GPCK, BPCK).'}, 'billable': {'type': ['boolean', 'null'], 'description': 'True when the code is a billable leaf. False for headers/categories and non-billable codes. Null when the system has no billing concept (RxNorm).'}, 'description': {'type': ['string', 'null'], 'description': 'Official long description (falls back to the short description when no long form exists).'}, 'shortDescription': {'type': ['string', 'null'], 'description': 'Official short/abbreviated description, or null when none is on record. Always null for RxNorm, which publishes a single name.'}}, 'description': 'A decoded code with its official descriptions and derived flags.', 'additionalProperties': False}, 'description': 'Immediate child codes (present only when includeHierarchy is true).'}, 'description': {'type': ['string', 'null'], 'description': 'Official long description (falls back to the short description when no long form exists).'}, 'alsoInSystems': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Other bundled systems holding this same code string, present only when there is at least one. The result above is the system this code resolved in; the code is a DIFFERENT code in each system listed here â\x80\x94 "B00" is the ICD-10-CM category "Herpesviral [herpes simplex] infections" and also the ICD-10-PCS table row "Imaging, Central Nervous System, Plain Radiography". Re-call with `system` set to one of these values to decode it there.'}, 'shortDescription': {'type': ['string', 'null'], 'description': 'Official short/abbreviated description, or null when none is on record. Always null for RxNorm, which publishes a single name.'}, 'childrenTruncated': {'type': 'boolean', 'description': 'True when the code has more immediate children than `children` carries â\x80\x94 the list was capped at the server cap (present only when includeHierarchy is true). Retrieve the full child list with medcode_browse_hierarchy or medcode_map_codes (children) for this code.'}}, 'description': 'A decoded code, optionally with its parent/children and resolution source.', 'additionalProperties': False}, 'description': 'Successfully decoded codes, in request order.'}, 'notFound': {'type': 'array', 'items': {'type': 'object', 'required': ['code', 'reason'], 'properties': {'code': {'type': 'string', 'description': 'The input code that could not be resolved.'}, 'reason': {'type': 'string', 'description': 'Why it could not be resolved (absent from every bundled system â\x80\x94 for a bare integer, with a note that CPT / HCPCS Level I codes are out of scope â\x80\x94 absent from the explicit `system` while another bundled system holds it, which is named, a well-formed NDC nothing maps to, hyphenated or as bare 10/11 digits, an NDC looked up under an explicit `system` that skips the NDC decode, or ambiguous across systems).'}, 'candidateSystems': {'type': 'array', 'items': {'type': 'string'}, 'description': 'When ambiguous, the systems whose shape/content the code matched â\x80\x94 re-call with one as `system`.'}}, 'description': 'An input code that did not resolve, with the reason it failed.', 'additionalProperties': False}, 'description': 'Codes that did not resolve, with per-code reasons.'}}, 'additionalProperties': False}
medcode_list_systems
List Code Systems
List the bundled US medical code systems with their release identifiers, effective dates, and code counts, and the RxClass drug-class layer the class crosswalks read, with each source’s version. Confirms which ICD-10-CM fiscal year, ICD-10-PCS fiscal year, HCPCS Level II release, RxNorm normalized set, and RxClass sources are active before acting on any decode, search, or crosswalk result. The corpus is offline and built at package-build time — this call reports exactly which release is baked into the running server. ICD-10-CM/PCS are the US clinical modifications, not the ICD-10/ICD-11 base.
읽기 전용 멱등성
입력 스키마
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {}, 'additionalProperties': False}
출력 스키마
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['systems', 'classLayer']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'description': 'Machine-readable failure mode.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'systems': {'type': 'array', 'items': {'type': 'object', 'required': ['system', 'label', 'releaseId', 'effectiveStart', 'effectiveEnd', 'codeCount', 'sourceUrl', 'builtAt'], 'properties': {'label': {'type': 'string', 'description': 'Human-readable system name, e.g. "ICD-10-CM".'}, 'system': {'type': 'string', 'description': 'System identifier, e.g. "ICD10CM", "ICD10PCS", "HCPCS", "RXNORM".'}, 'builtAt': {'type': 'string', 'description': 'ISO 8601 timestamp of this systemâ\x80\x99s data. For ICD-10-CM, ICD-10-PCS, and HCPCS, the time the index was built from the release named in `releaseId`. For RxNorm, which publishes no release label, the date the RxNav snapshot was fetched â\x80\x94 how current its drug data is, unchanged by a rebuild from the same snapshot.'}, 'codeCount': {'type': 'number', 'description': 'Number of code rows bundled for this system.'}, 'releaseId': {'type': 'string', 'description': 'Release/version identifier baked into this build, e.g. "ICD-10-CM FY2026".'}, 'sourceUrl': {'type': ['string', 'null'], 'description': 'Canonical .gov source the release was built from, or null.'}, 'effectiveEnd': {'type': ['string', 'null'], 'description': 'Last date this release is effective (YYYY-MM-DD), or null if open-ended.'}, 'effectiveStart': {'type': ['string', 'null'], 'description': 'First date this release is effective (YYYY-MM-DD), or null if not recorded.'}}, 'description': 'Provenance for one bundled code system.', 'additionalProperties': False}, 'description': 'One entry per bundled code system, in canonical order â\x80\x94 the systems the `system` inputs of the other tools accept.'}, 'classLayer': {'anyOf': [{'type': 'object', 'required': ['classCount', 'edgeCount', 'sourceUrl', 'sources'], 'properties': {'sources': {'type': 'array', 'items': {'type': 'object', 'required': ['source', 'version', 'classCount', 'edgeCount', 'fetchedAt'], 'properties': {'source': {'type': 'string', 'description': 'The RxClass source, as class hits carry it in `source`: MEDRT, FDASPL, FMTSME, VA, RXNORM (DEA schedules), or CDC (CVX).'}, 'version': {'type': ['string', 'null'], 'description': 'The release RxClass reports for this source, or null when it publishes none.'}, 'edgeCount': {'type': 'number', 'description': 'Drugâ\x80\x93class edges this source contributes.'}, 'fetchedAt': {'type': 'string', 'description': 'ISO 8601 date the RxClass snapshot was fetched â\x80\x94 how current the class edges are.'}, 'classCount': {'type': 'number', 'description': 'Classes this source asserts at least one bundled edge to.'}}, 'description': 'Provenance for one bundled RxClass source.', 'additionalProperties': False}, 'description': 'One entry per bundled RxClass source.'}, 'edgeCount': {'type': 'number', 'description': 'Drugâ\x80\x93class edges bundled, across every source.'}, 'sourceUrl': {'type': 'string', 'description': 'The RxClass API the layer was fetched from.'}, 'classCount': {'type': 'number', 'description': 'RxClass class nodes bundled, including hierarchy nodes with no direct member.'}}, 'additionalProperties': False}, {'type': 'null'}], 'description': 'The RxClass drug-class layer the rxcui_to_classes and class_to_rxcuis directions of medcode_map_codes read â\x80\x94 not a code system, so it has no entry in `systems`. Null when this build carries no class layer.'}}, 'additionalProperties': False}
medcode_map_codes
Map Medical Codes
Crosswalk a US medical code or drug across systems and within a hierarchy. Hierarchy directions: `parents` and `children` walk a code's prefix hierarchy one level per call — immediate parent/children only (depth-1); call iteratively for the full ancestor or descendant path (ICD-10-CM/HCPCS; ICD-10-PCS codes have no prefix parent, and RxNorm concepts no code hierarchy). A resolvable source with no edge in the requested direction is a successful empty result with a notice, not an error. A source code string that also exists in another bundled system carries `alsoInSystems` naming it, since only the resolved system's hierarchy was walked. Drug directions (RxNorm): `name_to_rxcui` (drug name → RXCUI), `ndc_to_rxcui` and `rxcui_to_ndc` (NDC ↔ RXCUI; NDCs accepted hyphenated in an FDA segment configuration — 4-4-2, 5-3-2, 5-4-1, or the 11-digit 5-4-2 — or as bare 10/11 digits; `ndc_to_rxcui` names the product it decoded to), `rxcui_to_ingredients` and `rxcui_to_brands` (RXCUI → ingredient/brand RXCUIs, each with the target's RxNorm name and its `conceptType` — read that before counting a combination product's ingredients). Drug-class directions (RxClass): `rxcui_to_classes` (RXCUI → its classes: pharmacologic class, mechanism of action, physiologic effect, pharmacokinetics, therapeutic category, chemical structure, the diseases it may treat, prevent, diagnose, or induce or is contraindicated with, VA class, DEA controlled-substance schedule, CDC vaccine code; a drug product also carries its ingredients' classes, naming the ingredient in `via`, while DEA schedules are recorded only on drug products and VA classes almost only there, so map a product for those) and `class_to_rxcuis` (class ID → its direct member RXCUIs, each with its RxNorm name and `conceptType`). Each class hit carries `classType`, `source` (the RxClass source asserting it), and `relation` — a `ci_` relation is a contraindication, not an indication; narrow either direction with `classType`. Every result carries `source` provenance (which system or edge answered) so a chained call (e.g. into openfda with a resolved NDC) uses the right identifier. The `children`, `name_to_rxcui`, `rxcui_to_ndc`, `rxcui_to_classes`, and `class_to_rxcuis` directions can return large sets and paginate: a `nextCursor` in the response is passed back as `cursor` (with an optional `limit` page size) to walk the full set. A field the direction does not use is rejected with `field_not_applicable`: `limit` and `cursor` on the point directions, `classType` outside the class directions, and a `system` other than RXNORM on the drug and class directions.
읽기 전용 멱등성
입력 스키마
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['from', 'direction'], 'properties': {'from': {'type': 'string', 'minLength': 1, 'description': 'The source value: a code (for parents/children), a drug name, an NDC, an RXCUI, or an RxClass class ID (for class_to_rxcuis). Must not be blank or whitespace-only.'}, 'limit': {'type': 'integer', 'maximum': 200, 'minimum': 1, 'description': 'Max results per page, for the paginated directions only (children, name_to_rxcui, rxcui_to_ndc, rxcui_to_classes, class_to_rxcuis). Defaults to MEDCODE_MAX_RESULTS (50), ceiling 200. Rejected on every other direction.'}, 'cursor': {'type': 'string', 'description': "Opaque continuation token from a previous response's `nextCursor`, for the paginated directions only (children, name_to_rxcui, rxcui_to_ndc, rxcui_to_classes, class_to_rxcuis). Omit for the first page; an empty string counts as omitted. A non-empty cursor on any other direction is rejected."}, 'system': {'enum': ['ICD10CM', 'ICD10PCS', 'HCPCS', 'RXNORM'], 'type': 'string', 'description': 'For parents/children, force the source code into this system. Omit to auto-detect. The drug and class directions resolve in RxNorm and accept only "RXNORM" (no effect); any other value there is rejected.'}, 'classType': {'enum': ['EPC', 'MOA', 'PE', 'PK', 'TC', 'CHEM', 'DISEASE', 'VA', 'SCHEDULE', 'CVX'], 'type': 'string', 'description': 'For rxcui_to_classes and class_to_rxcuis only: keep only classes of this RxClass type â\x80\x94 EPC (FDA established pharmacologic class), MOA (mechanism of action), PE (physiologic effect), PK (pharmacokinetics), TC (therapeutic category), CHEM (chemical structure), DISEASE (diseases the drug may treat, prevent, diagnose, or induce, or is contraindicated with), VA (VA drug class, recorded almost only on drug products), SCHEDULE (DEA controlled-substance schedule, recorded on drug products only), CVX (CDC vaccine code). Omit for every type. Rejected on every other direction.'}, 'direction': {'enum': ['parents', 'children', 'name_to_rxcui', 'ndc_to_rxcui', 'rxcui_to_ndc', 'rxcui_to_ingredients', 'rxcui_to_brands', 'rxcui_to_classes', 'class_to_rxcuis'], 'type': 'string', 'description': 'What to map to. parents/children return the immediate parent or children only (depth-1) â\x80\x94 call iteratively to walk a full path; the rxcui/ndc/name directions are RxNorm drug crosswalks; rxcui_to_classes and class_to_rxcuis are RxClass drug-class crosswalks.'}}, 'additionalProperties': False}
출력 스키마
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['from', 'direction', 'resolvedSystem', 'hits']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'cap': {'type': 'number', 'description': 'Paginated directions only: the page size that was applied.'}, 'from': {'type': 'string', 'description': 'The source value, echoed back.'}, 'hits': {'type': 'array', 'items': {'type': 'object', 'required': ['source', 'system', 'value'], 'properties': {'via': {'type': 'string', 'description': 'On `rxcui_to_classes` hits only: the ingredient RXCUI a drug product inherits this class through â\x80\x94 RxClass attaches most classes to ingredients. Absent when the class attaches to the source RXCUI itself. When several ingredients carry the same class, names an ingredient ("IN") over its precise ingredient ("PIN"), then the lowest RXCUI.'}, 'value': {'type': 'string', 'description': 'The mapped target value (a code, RXCUI, NDC, or RxClass class ID).'}, 'source': {'type': 'string', 'description': 'Which system or relationship edge produced this hit (e.g. "ICD10CM", "has_ingredient", "NDC"). On the class directions, the RxClass source asserting the drugâ\x80\x93class edge: "MEDRT" (VA MED-RT), "FDASPL" (FDA structured product labels), "FMTSME" (Federal Medication Terminologies), "VA" (VA National Formulary classes), "RXNORM" (DEA schedules as RxNorm records them), or "CDC" (CVX vaccine codes).'}, 'system': {'type': ['string', 'null'], 'description': 'The code system of the target value, or null when the target is not a system code (an NDC, or an RxClass class ID).'}, 'relation': {'type': 'string', 'description': 'The RxClass relationship between the drug and the class, on `rxcui_to_classes` and `class_to_rxcuis` hits only: has_epc, has_moa, has_pe, has_pk, site_of_metabolism, has_tc, has_ingredient / has_chemical_structure / has_active_metabolites (CHEM), may_treat / may_prevent / may_diagnose / induces (DISEASE), has_vaclass / has_vaclass_extended, has_schedule, isa_cvx. A `ci_` relation (ci_with, ci_moa, ci_pe, ci_chemclass) is a contraindication: the drug is contraindicated with that disease or class â\x80\x94 never an indication, and never class membership.'}, 'classType': {'enum': ['EPC', 'MOA', 'PE', 'PK', 'TC', 'CHEM', 'DISEASE', 'VA', 'SCHEDULE', 'CVX'], 'type': 'string', 'description': 'The RxClass class type, on `rxcui_to_classes` and `class_to_rxcuis` hits only â\x80\x94 the values the `classType` input takes.'}, 'conceptType': {'type': 'string', 'description': 'The target concept\'s RxNorm type, present on `rxcui_to_ingredients`, `rxcui_to_brands`, and `class_to_rxcuis` hits only. A class member may be any drug concept: an ingredient type below, or a drug product â\x80\x94 "SCD"/"SBD" (clinical/branded drug) or "GPCK"/"BPCK" (generic/branded pack). Otherwise "IN" (ingredient), "PIN" (precise ingredient â\x80\x94 a specific salt, ester, or isomer of an ingredient), "MIN" (multiple ingredients â\x80\x94 a concept naming a combination, never a substance within it), or "BN" (brand name). Ingredient hits mix the first three, so the hit count is not the substance count: a "MIN" hit is the grouping concept and never counts, and a "PIN" names a form of a substance rather than an extra one â\x80\x94 usually alongside the "IN" it refines, though two "PIN" esters can share a single "IN". Counting the "IN" hits is the closest reading, and under-counts those shared cases.'}, 'description': {'type': 'string', 'description': 'Description of the target when available: the code description for hierarchy hits, the official RxNorm name for the `name_to_rxcui`, `ndc_to_rxcui`, `rxcui_to_ingredients`, `rxcui_to_brands`, and `class_to_rxcuis` drug concepts, and the class name for `rxcui_to_classes`. Absent for `rxcui_to_ndc`, whose targets are package identifiers with no description of their own.'}}, 'description': 'One crosswalk result tagged with the edge that produced it.', 'additionalProperties': False}, 'description': 'Crosswalk results, each tagged with the edge that produced it.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['field_not_applicable', 'no_mapping', 'direction_unavailable', 'ambiguous_system'], 'description': 'Machine-readable failure mode. Declared by this tool: `field_not_applicable`: A `system`, `classType`, `limit`, or `cursor` was sent on a direction that does not use it. `no_mapping`: The source value did not resolve to any bundled code, drug, or class. `direction_unavailable`: A drug-crosswalk direction was requested but this build carries no RxNorm tables, or a class direction was requested but it carries no RxClass class layer. `ambiguous_system`: The source code is present in more than one system and no `system` was given. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'shown': {'type': 'number', 'description': 'Paginated directions only: number of hits returned on this page.'}, 'notice': {'type': 'string', 'description': 'Guidance whenever a resolvable source returns no hits, naming which of the two causes applies: it has no edge in the requested direction (a top-level code has no parent; a leaf has no children; ICD-10-PCS codes have no prefix parent; RxNorm concepts have no code hierarchy; no bundled class, or none of the requested `classType`, covers the RXCUI; a class has no direct member), or the `cursor` starts past the last page of a direction that does have results.'}, 'direction': {'type': 'string', 'description': 'The mapping direction that was applied.'}, 'truncated': {'type': 'boolean', 'description': 'Paginated directions (children, name_to_rxcui, rxcui_to_ndc, rxcui_to_classes, class_to_rxcuis) only: true when more results exist beyond this page.'}, 'nextCursor': {'type': 'string', 'description': 'Paginated directions only: opaque token to pass back as `cursor` for the next page. Present only when more results exist beyond this page.'}, 'alsoInSystems': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Other bundled systems holding the same `from` code string, present only when there is at least one (hierarchy directions only â\x80\x94 a drug name, NDC, or RXCUI is not system-scoped). The hits above were walked in `resolvedSystem` alone; the code is a DIFFERENT code with a different hierarchy in each system listed here â\x80\x94 "B00" is the ICD-10-CM category "Herpesviral [herpes simplex] infections" and also the ICD-10-PCS table row "Imaging, Central Nervous System, Plain Radiography". Re-call with `system` set to one of these values to walk it there.'}, 'resolvedSystem': {'type': ['string', 'null'], 'description': 'The system the source resolved in, or null when not system-scoped.'}}, 'additionalProperties': False}
medcode_search_codes
Search Medical Codes
Find US medical codes whose official descriptions match a described concept, via full-text search over the bundled index. Every search term must appear — matched first as a token prefix, then as a substring so inflected and compound forms are also found (a "neuropathy" search surfaces "mononeuropathy"/"polyneuropathy" siblings too, not only a standalone "neuropathy" token). An RxNorm concept matches on its drug name alone, never its term type (SBD, IN, …) — narrow by type with `chapter`. Filter by `system` (ICD10CM/ICD10PCS/HCPCS/RXNORM), `billableOnly` to exclude headers/categories, and `chapter`. Use when you have a clinical description and need the code — the reverse of medcode_get_code. Results echo the resolved system per row for chaining, rank exact prefix matches ahead of substring-only matches with a deterministic tie-break, and disclose truncation with a `nextCursor`: pass it back as `cursor` to page through the full ranked set.
읽기 전용 멱등성
입력 스키마
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['query'], 'properties': {'limit': {'type': 'integer', 'maximum': 200, 'minimum': 1, 'description': "Max codes per page. Defaults to the server's MEDCODE_MAX_RESULTS (50), ceiling 200."}, 'query': {'type': 'string', 'minLength': 1, 'description': 'Clinical description to match, e.g. "type 2 diabetes with neuropathy". Must not be blank or whitespace-only.'}, 'cursor': {'type': 'string', 'description': "Opaque continuation token from a previous response's `nextCursor`, to fetch the next page of the same ranked result set. Omit for the first page."}, 'system': {'enum': ['ICD10CM', 'ICD10PCS', 'HCPCS', 'RXNORM'], 'type': 'string', 'description': 'Restrict results to one system. Omit to search all bundled systems.'}, 'chapter': {'type': 'string', 'description': "Restrict to a chapter/range bucket (the value from a code's `chapter` field). Case-insensitive: surrounding whitespace is trimmed and the value is upper-cased to match how chapters are stored, and `appliedFilters.chapter` echoes the upper-cased value that actually ran. A blank or whitespace-only value carries no filtering intent and is treated as omitted, which the response discloses as `appliedFilters.chapter: null`."}, 'billableOnly': {'type': 'boolean', 'default': False, 'description': 'When true, return only billable leaf codes (exclude headers/categories). RxNorm has no billing concept, so this excludes every RxNorm concept.'}}, 'additionalProperties': False}
출력 스키마
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['codes', 'effectiveQuery', 'appliedFilters', 'truncated', 'shown', 'cap']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'cap': {'type': 'number', 'description': 'The page size that was applied.'}, 'codes': {'type': 'array', 'items': {'type': 'object', 'required': ['system', 'code', 'description', 'shortDescription', 'billable', 'header', 'chapter'], 'properties': {'code': {'type': 'string', 'description': 'The code in display form (ICD-10-CM carries the dot).'}, 'header': {'type': 'boolean', 'description': 'True when the code is a non-billable category/header.'}, 'system': {'type': 'string', 'description': 'The system the code belongs to, echoed for chaining.'}, 'chapter': {'type': ['string', 'null'], 'description': 'Chapter/range bucket, or null. For RxNorm, the concept term type (IN, PIN, MIN, BN, SCD, SBD, GPCK, BPCK).'}, 'billable': {'type': ['boolean', 'null'], 'description': 'True when the code is a billable leaf. Null when the system has no billing concept (RxNorm).'}, 'description': {'type': ['string', 'null'], 'description': 'Official long description (falls back to short when no long form exists).'}, 'shortDescription': {'type': ['string', 'null'], 'description': 'Official short description, or null when none is on record. Always null for RxNorm, which publishes a single name.'}}, 'description': 'A code matching the search query.', 'additionalProperties': False}, 'description': 'Matching codes, ranked by full-text relevance.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'description': 'Machine-readable failure mode.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'shown': {'type': 'number', 'description': 'Number of codes returned on this page.'}, 'notice': {'type': 'string', 'description': 'Guidance when nothing matched â\x80\x94 echoes the query and suggests how to broaden, or names `billableOnly` as the cause when the searched system has no billing concept.'}, 'truncated': {'type': 'boolean', 'description': 'True when more matches exist beyond this page.'}, 'nextCursor': {'type': 'string', 'description': 'Opaque token to pass back as `cursor` for the next page. Present only when more matches exist beyond this page.'}, 'appliedFilters': {'type': 'object', 'required': ['system', 'billableOnly', 'chapter'], 'properties': {'system': {'type': ['string', 'null'], 'description': 'System filter applied, or null.'}, 'chapter': {'type': ['string', 'null'], 'description': 'Chapter filter applied, or null.'}, 'billableOnly': {'type': 'boolean', 'description': 'Whether the billable-only filter was applied.'}}, 'description': 'Filters the server applied to the search.', 'additionalProperties': False}, 'effectiveQuery': {'type': 'string', 'description': 'The query as the server parsed it for matching.'}}, 'additionalProperties': False}
변경됨
medcode_list_systems
2026년 9월 27일 2:44 AM
변경됨
medcode_browse_hierarchy
2026년 9월 27일 2:44 AM
변경됨
medcode_map_codes
2026년 9월 27일 2:44 AM
변경됨
medcode_check_code
2026년 9월 27일 2:44 AM
변경됨
medcode_search_codes
2026년 9월 27일 2:44 AM
변경됨
medcode_get_code
2026년 9월 27일 2:44 AM
변경됨
medcode_list_systems
2026년 9월 21일 2:50 AM
변경됨
medcode_browse_hierarchy
2026년 9월 21일 2:50 AM
변경됨
medcode_map_codes
2026년 9월 21일 2:50 AM
변경됨
medcode_check_code
2026년 9월 21일 2:50 AM
변경됨
medcode_search_codes
2026년 9월 21일 2:50 AM
변경됨
medcode_get_code
2026년 9월 21일 2:50 AM
추가됨
medcode_list_systems
2026년 9월 17일 12:41 PM
추가됨
medcode_browse_hierarchy
2026년 9월 17일 12:41 PM
추가됨
medcode_map_codes
2026년 9월 17일 12:41 PM
추가됨
medcode_check_code
2026년 9월 17일 12:41 PM
추가됨
medcode_search_codes
2026년 9월 17일 12:41 PM
추가됨
medcode_get_code
2026년 9월 17일 12:41 PM