Skip to content

Add dermatology and ophthalmology domains to NER catalog #318

@maziyarpanahi

Description

@maziyarpanahi

Summary

Dermatology and ophthalmology are common specialty note types with no OpenMed NER domain. Neither appears in zero_shot defaults.json nor in get_model_suggestions routing, so specialty text falls back to generic clinical labels and the catalog cannot surface specialty coverage. Both reuse existing finding/anatomy/measurement canonical labels, making this small additive scaffolding.

Scope

  • Add 'dermatology' and 'ophthalmology' domains to zero_shot/data/label_maps/defaults.json (dermatology: Skin lesion, Morphology, Distribution, Anatomy; ophthalmology: Eye finding, Visual acuity, Intraocular pressure, Anatomy).
  • Add dermatology routing keywords (rash, lesion, macule, papule, erythema, pruritus, biopsy of skin) and ophthalmology routing keywords (visual acuity, intraocular pressure, retina, cornea, glaucoma, fundus) to get_model_suggestions.
  • Reuse FINDING, ANATOMY, MEASUREMENT canonical labels; add SKIN_LESION and EYE_FINDING only if reuse is insufficient.
  • Add Dermatology and Ophthalmology entries to _CATEGORY_ENTITY_TYPES.

Acceptance criteria

  • available_domains() includes both 'dermatology' and 'ophthalmology' with non-empty label sets.
  • get_model_suggestions routes a dermatology sentence to Dermatology and an ophthalmology sentence to Ophthalmology.
  • A test asserts both domains' labels normalise to known canonical labels.
  • test suite green: .venv/bin/python -m pytest tests/ -q

Out of scope

  • Training specialty models.
  • Image-based dermatology (text only).
  • Adding canonical labels that duplicate FINDING/ANATOMY.

Files

  • openmed/zero_shot/data/label_maps/defaults.json
  • openmed/core/model_registry.py
  • openmed/core/labels.py
  • tests/unit/ner/test_label_map_consistency.py

Task: OM-153 · Milestone: Backlog · Priority: P3 · Size: S
Depends on: — · Blocks: —
Roadmap: OPENMED_V2_UNIFIED_ROADMAP.md §3.5 (new clinical NER domains)
Spec: PLANS/V2/EXECUTION/tasks/OM-153.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3StrategicfeatureNew capabilitygood first issueGood for newcomershelp wantedExtra attention is neededroadmap-v2OpenMed V2 roadmap backlog

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions