feat: add microbiology domain scaffolding (closes #314)#410
Open
Zeesky-code wants to merge 2 commits into
Open
feat: add microbiology domain scaffolding (closes #314)#410Zeesky-code wants to merge 2 commits into
Zeesky-code wants to merge 2 commits into
Conversation
…hi#314) Add the microbiology NER domain across the label taxonomy, zero-shot label map, model registry routing, and policy profiles.
…omain # Conflicts: # openmed/core/labels.py # openmed/core/model_registry.py # openmed/zero_shot/data/label_maps/defaults.json # tests/unit/ner/test_label_map_consistency.py
Owner
|
Thank you @Zeesky-code. I reviewed this against #314 and the related #289 context, then added a maintainer merge-resolution commit: What changed:
Verification:
I copied #314 labels onto the PR. The branch is mergeable with no conflicts. GitHub has not reported hosted checks for this fork head, so the validation above is local. |
Author
|
Thank you for the review and the merge-resolution commit. I'll take note of the display-label style (CamelCase, no spaces) and the JSON formatting conventions for future contributions. |
maziyarpanahi
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Adds the microbiology NER domain scaffolding across the label taxonomy,
zero-shot label map, model registry, and policy profiles. This allows
organism/antibiotic/susceptibility extraction for infectious-disease and
antimicrobial-stewardship use cases, distinct from the existing generic
Species family.
Type of Change
Changes Made
openmed/zero_shot/data/label_maps/defaults.json: addedmicrobiologydomain with labels Microorganism, Antibiotic, Susceptibility, Specimen
source, Culture result
openmed/core/labels.py: added canonical labelsMICROORGANISM,ANTIBIOTIC,SUSCEPTIBILITYasCLINICAL_CONCEPTwith system hints(SNOMED/LOINC/RxNorm) and alias entries (
organism,pathogen,antimicrobial, etc.)openmed/core/model_registry.py: addedMicrobiologyentry to_CATEGORY_ENTITY_TYPES; added dedicated routing keywords (culture,gram stain,mrsa,resistant,susceptib…) toget_model_suggestionsdistinct from the Species pattern
openmed/core/policies/*.json: addedkeep/maskactions for the threenew labels across all six policy profiles to satisfy the
CANONICAL_LABELScoverage invariant enforced at load timeTesting
uv run pytest tests/ --ignore=tests/integration -q→ 1600 passed, 12 skippedNew
TestMicrobiologyDomainclass intests/unit/ner/test_label_map_consistency.pycovers all acceptance criteria from the issue:
available_domains()includesmicrobiologyget_default_labels('microbiology')returns a non-empty label setnormalize_label('susceptibility') == 'SUSCEPTIBILITY'normalize_label('antibiotic') == 'ANTIBIOTIC'normalize_label('microorganism') == 'MICROORGANISM'normalize_label('organism') == 'MICROORGANISM'(alias)get_model_suggestions('Blood culture grew MRSA, resistant to oxacillin')runs without errorDocumentation
Code Quality
Dependencies
Checklist
Related Issues
Closes #314
Related to #289 (zero-shot domain label maps for biomedical NER families)