Extract ICD-10-CM, HCPCS and CPT codes and dates from clinical text
ner_extractExtract medical codes from de-identified clinical text and check each against the MyMedi-AI code database to confirm code-set presence, description, and active status.
Instructions
Extract the medical codes already present in de-identified text and check each against the MyMedi-AI code database: ICD-10-CM codes whole, dotted or undotted, with their 7th-character extensions (S72.001A, S72001A); HCPCS Level II codes (a letter A–V and four digits), with modifiers attached (E0601RR, E0601-RR) reported as modifiers — a glued suffix only when it is a known DMEPOS modifier; and CPT codes only where a keyword such as CPT or procedure code marks them (Category II and III and PLA codes such as 0001U included), so ZIP codes and other numbers are not read as codes, and a five-digit number that continues a marked list is kept only when the CPT set holds it. Codes are read in upper case, as code sets print them; lower-case text is not read as a code. Each code entity says whether the code set holds it (inCodeSet) and, when it does, gives its description and whether it is active; an undotted ICD-10-CM shape is returned only when the code set holds it, so words such as B12 are not read as codes. codeSets names the code-set releases checked. Also returns M/D/Y dates and one MEDICATION_INDICATOR entity when a dose unit (mg, mcg or mL) appears. It does not extract drug names and does not infer or suggest codes. PHI-free: for de-identified text only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "ner_extract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Clinical text to extract entities from | |
| entityTypes | No | Return only these entity types: ICD10_CODE, HCPCS_CODE, CPT_CODE, DATE, MEDICATION_INDICATOR (any letter case; default all). Any other type is refused, and refunded. |