nadavWeisler / nadavWeisler/MedCodeTranslator
[Search] Implement alias expansion layer from data/aliases/common.json
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 7m
- Merged PRs (30d)
- 7
Description
Problem summary
Alias expansion is documented in README and MatchMethod includes 'alias', but packages/search/src/layered.ts does not load or apply data/aliases/common.json. Queries like DM, HTN, and T2DM do not expand to canonical terms.
Affected area
data/aliases/common.jsonpackages/search/src/layered.tsapp/components/CodeCard.tsx(alias badge label exists but is never shown)
Expected behavior
Common clinical abbreviations expand before layered search runs. Expanded hits surface with matchMethod: 'alias'.
Actual behavior
Only exact → prefix → substring → fuzzy layers run. Alias file is unused.
Reproduction
- Open ATC-5 or ICD-10.
- Search
DMorHTN. - Compare with searching
diabetes mellitusorhypertension.
Acceptance criteria
- Alias table is loaded at search index build time.
- Layered search applies alias expansion before or alongside other layers.
- Results from alias expansion use
matchMethod: 'alias'. - Unit tests cover at least 5 common abbreviations from
common.json. - README architecture diagram matches implementation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with data/aliases/common.json and packages/search/src/layered.ts to trace how the search index is built and how layers assign matchMethod values. Check app/components/CodeCard.tsx and the README architecture diagram for the alias result presentation. Add coverage for at least five abbreviations, verify alias-expanded results use matchMethod 'alias', and confirm the documented architecture matches the implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100