@lowlysre/icd-10-cm 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +23 -0
  2. package/package.json +4 -1
package/README.md CHANGED
@@ -16,6 +16,7 @@ A data package containing the FY2027 ICD-10-CM diagnosis codes and descriptions
16
16
  - 🔒 Secure, a zero dependency package with provenance
17
17
  - ⚛️ Small, limited to CM (Clinical Modification) data and less than 1MB compressed
18
18
  - 🔏 Immutable, GitHub releases are locked and cannot be altered or replaced after publishing
19
+ - 🔌 Offline, the full code set ships inside the package: no API keys, no rate limits, and no calls to government servers at runtime. It runs inside closed-loop healthcare systems that block outbound traffic or require a vendor review for every external API
19
20
 
20
21
  ## Install
21
22
 
@@ -60,6 +61,27 @@ ICD10_CM_RELEASE.effectiveDate; // "2026-10-01"
60
61
  ICD10_CM_RELEASE.codeCount; // 74879
61
62
  ```
62
63
 
64
+ ### Using with AI
65
+
66
+ - Grounding AI output. Language models describe ICD-10-CM codes from memory, so they get laterality and severity wrong and invent descriptions for codes that don't exist. Check each model-produced code against the official set before showing or storing it.
67
+ - Agent tools. Expose `getICD10Description` as a tool or function call, so an agent reads the official description instead of recalling one.
68
+
69
+ ```ts
70
+ import { getICD10Description } from "@lowlysre/icd-10-cm";
71
+
72
+ const modelCodes = ["E11.9", "H40.1131", "E11.99"];
73
+
74
+ const checked = modelCodes.map((code) => ({
75
+ code,
76
+ description: getICD10Description(code) ?? null,
77
+ }));
78
+ // [
79
+ // { code: "E11.9", description: "Type 2 diabetes mellitus without complications" },
80
+ // { code: "H40.1131", description: "Primary open-angle glaucoma, bilateral, mild stage" },
81
+ // { code: "E11.99", description: null }, // not a real code
82
+ // ]
83
+ ```
84
+
63
85
  ## API
64
86
 
65
87
  - `getICD10Description(code)` (also the default export) returns the description for a code, or `undefined` when the code isn't in the bundled release. Input is normalized first.
@@ -102,6 +124,7 @@ See [CONTRIBUTING.md](.github/CONTRIBUTING.md) for setup and the yearly data upd
102
124
 
103
125
  ## Versions
104
126
 
127
+ - v3.1.1 - README AI use cases (output grounding, agent tools), closed-loop offline use, `ai`, `llm`, and `offline` npm keywords
105
128
  - v3.1.0 - `ICD10_CM_RELEASE` export with the bundled fiscal year, effective date, and code count. Node.js 22+ declared in `engines`, `package.json` exported, expanded npm keywords. API, CDN, and versioning docs, plus contributing and security guides
106
129
  - v3.0.0 - Data updated to the October 1, 2026 ICD-10-CM release (74,879 codes, from the FY2027 set)
107
130
  - v2.0.0 - Data updated to the April 1, 2026 ICD-10-CM release (74,719 codes, from the FY2024 set). TypeScript 7 (native compiler) toolchain, ESLint replaced with oxlint + Prettier, dropped tsup for plain tsc (zero-bundler dual ESM/CJS), dataset shipped once and lazy-loaded (~50% smaller install, faster imports), fixed broken `require()` entry point
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowlysre/icd-10-cm",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "FY2027 ICD-10-CM diagnosis codes and descriptions (CDC/NCHS, effective October 1, 2026) with TypeScript types and zero dependencies",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -68,6 +68,9 @@
68
68
  "nchs",
69
69
  "cms",
70
70
  "fhir",
71
+ "ai",
72
+ "llm",
73
+ "offline",
71
74
  "fy2027",
72
75
  "typescript"
73
76
  ],