Skip to content

feat(diagnoses): ICD-10 search + attach diagnoses to encounters#151

Merged
inteee merged 5 commits intoCIVRA-INC:mainfrom
rmsb-art:ft/taxonomy
Mar 8, 2026
Merged

feat(diagnoses): ICD-10 search + attach diagnoses to encounters#151
inteee merged 5 commits intoCIVRA-INC:mainfrom
rmsb-art:ft/taxonomy

Conversation

@rmsb-art
Copy link
Contributor

@rmsb-art rmsb-art commented Mar 6, 2026

Implements standardized diagnosis coding for encounters in LumenHealth EHR, enabling doctors to attach ICD-10 codes instead of free-text diagnoses.

Backend

  • Added DiagnosisModel for storing ICD-10 codes and descriptions.
  • Implemented scripts/seed-icd10-lite.ts to populate MongoDB with ~1,000 common primary care ICD-10 codes (idempotent).
  • Added MongoDB text indexes to support fuzzy diagnosis search.
  • Implemented GET /api/v1/diagnoses/search?q= for fast code lookup (<100ms).
  • Implemented POST /api/v1/encounters/:encounterId/diagnoses to attach diagnoses to an encounter (uses hardcoded encounterId for now).

Frontend

  • Built async debounced Combobox (Tags Input) using shadcn/ui.
  • Fetches diagnoses via the search endpoint with strict debounce to prevent API spam.
  • Selected diagnoses render as removable badges
    e.g. [B50.9 - Malaria ✕].

Notes

Acceptance

  • ICD-10 dataset seeds successfully and idempotently.
  • Search endpoint returns results in <100ms.
  • Frontend debounces requests before calling the API.

closes #118

@rmsb-art rmsb-art requested a review from inteee March 8, 2026 21:36
Copy link
Contributor

@inteee inteee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. The changes look good and align with the project requirements. Thanks for the contribution.

@inteee inteee merged commit 62b4dd2 into CIVRA-INC:main Mar 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Medical Taxonomy & Diagnosis Engine

2 participants