[APP-770] Filter inactive counties from county options dropdown#3366
Open
nullflux wants to merge 2 commits into
Open
[APP-770] Filter inactive counties from county options dropdown#3366nullflux wants to merge 2 commits into
nullflux wants to merge 2 commits into
Conversation
The NBS 7 patient address County dropdown (Add Patient -> Address, and its autocomplete) listed outdated and duplicate counties because the two county option queries selected from NBS_SRTE..state_county_code_value without an active-status predicate. Every other SRTE-backed option finder in options-api (jurisdiction, condition, language, occupation, program area) filters status_cd = 'A'; the county list finder and the county autocomplete resolver were the lone exceptions. Add status_cd = 'A' to CountiesListFinder and CountyOptionResolver so retired county codes are excluded, matching the sibling finders. Adds CountiesOptions scenarios covering an inactive county for both the list and autocomplete paths; CountyMother now stamps status_cd and can seed inactive counties. SEER #18441
JordanGuinn
approved these changes
Jun 25, 2026
JordanGuinn
left a comment
Contributor
There was a problem hiding this comment.
Much appreciated 👏 🚀
|
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.



Summary
The NBS 7 patient address County dropdown (Add Patient → Address, plus its autocomplete) listed outdated and duplicate counties. Reported by Alaska via NBS Central SEER #18441; expected behavior is active counties only.
Root cause
The county option queries read
NBS_SRTE..state_county_code_valuewith no active-status predicate:CountiesListFinder(GET /nbs/api/options/counties/{state}, the dropdown)CountyOptionResolver(county autocomplete)Every other SRTE-backed option finder in
options-api(jurisdiction, condition, primary language, occupation, program area) filtersstatus_cd = 'A'. These two county finders were the only exceptions, so retired/renamed county codes and their old-vs-new duplicates renderedChange
Add
status_cd = 'A'to both county finders, matching the sibling finders.Test plan
Red-fix-green on the
options-api@EmbeddedNbsDatabaseCucumber harness (real SQL Server Testcontainer):CountiesOptions.featurescenarios assert an inactive county is excluded from the list and from autocomplete.CountyMothernow stampsstatus_cdand can seed inactive counties.Follow-up
Not yet confirmed against live AK SRTE data whether the outdated counties are flagged via
status_cdor viaeffective_to_time(withstatus_cdstillA). If the latter, both finders also need(effective_to_time is null or effective_to_time > getdate()). Repro SQL is on SEER #18441 for the state to confirm.