Skip to content

CodeLookup: ICD-11 support (ingest WHO ICD-11 into the condition shard) #335

Description

@horner

Context

CodeLookup now has a coding-system mode (PR #333 branch codelookup-code-search):

  • searchCodetypes prop — programmer fixes the system (e.g. ['ICD10'])
  • codetypeOptions prop — user-facing segmented control (see the Conditions Only story: All | ICD-10 | SNOMED)
  • Engine-side SearchOptions.codetypes filters both label and code-prefix matches

The filter is fully generic — ICD-11 mode is just codetypes: ['ICD11'] once the data exists. It doesn't yet: the source dataset (rxdb_utf8.MedicalCodify_search) has no ICD-11 rows (codetypes present: CVX, FDB, FDB MEDNAME, HCPCS, ICD10, ICD10PCS, ICD9, LabCorp Order, LOINC, LOINC Hierarchy, Measure, NDC, Quest Order, RxNORM, SNOMED US, ValueSet, VIS).

Task

Ingest the WHO ICD-11 MMS linearization into the codify pipeline so the condition shard carries ICD11 entries:

  • Source: WHO ICD-11 release files or ICD-API (https://icd.who.int/icdapi) — codes + titles (+ index terms as aliases?); check license/attribution requirements
  • Either add ICD-11 rows to MedicalCodify_search upstream, or add a supplemental input to packages/codify/scripts/build-index.mjs (external repo)
  • Add ICD11 to the condition shard codetype list; rebuild .mcdx shards (git-lfs) — watch shard size / Cloudflare Pages 25 MiB cap
  • Decide family grouping for ICD-11 codes in familyKey() (engine.ts) — current ICD-10 rule is letter+digit code-root; ICD-11 codes look like BD10, 8A61.0
  • Check billableMask() (leaf-code rule) applicability to ICD-11 or scope it to ICD-10 only
  • Add { label: 'ICD-11', codetypes: ['ICD11'] } to the Conditions Only story toggle
  • Engine tests with ICD-11-shaped codes

Out of scope

ICD-10 ↔ ICD-11 crosswalk/mapping tables (separate ticket if needed).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions