Skip to content

APP-769: filter unmapped race codes from demographics summary card#3365

Merged
nullflux merged 2 commits into
mainfrom
aw/seer-18435
Jun 25, 2026
Merged

APP-769: filter unmapped race codes from demographics summary card#3365
nullflux merged 2 commits into
mainfrom
aw/seer-18435

Conversation

@nullflux

@nullflux nullflux commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

The patient demographics Summary card showed raw race_category_cd values (e.g. "UNK", "1") for race codes with no NBS_SRTE..Code_value_general RACE_CALCULATED match, while the Demographics card correctly showed only matched values. Reported by Montana (SEER #18435).

Root cause: the two cards use different finders.

  • PatientDemographicsSummaryRaceFinder LEFT JOINed the SRTE code table and fell back to the raw code via coalesce(..., race_category_cd, ''), so an unmatched code rendered raw.
  • PatientRaceDemographicFinder (Demographics) INNER JOINs and drops unmatched codes.

Change

Switch the Summary race finder to an INNER JOIN, matching the Demographics finder, so unmapped category codes are filtered out instead of shown raw. Drops the now-dead coalesce fallbacks.

Testing

Added a demographics-summary Cucumber scenario with a race category code that has no SRTE match. Verified red→green against the nedssdb Testcontainer: before the fix $.races was ["Asian","ZTEST"]; after, ["Asian"]. Full @patient-demographics-summary and @patient-race-demographics suites pass with no regression.

The patient demographics Summary card rendered raw race_category_cd
values (e.g. "UNK", "1") for codes with no NBS_SRTE RACE_CALCULATED
match, while the Demographics card correctly showed only matched
values. The two cards use different finders: the Summary finder LEFT
JOINed the SRTE code table and fell back to the raw code via coalesce,
whereas the Demographics finder INNER JOINs and drops unmatched codes.

Switch the Summary race finder to an INNER JOIN (matching the
Demographics finder) so unmapped category codes are filtered out
instead of shown raw, and drop the now-dead coalesce fallbacks.

Adds a demographics-summary scenario covering a race category code with
no SRTE match.

SEER #18435
@nullflux nullflux changed the title fix: filter unmapped race codes from demographics summary card SEER #18435: filter unmapped race codes from demographics summary card Jun 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

@nullflux nullflux marked this pull request as ready for review June 24, 2026 20:17
@nullflux nullflux requested a review from a team as a code owner June 24, 2026 20:17
@nullflux nullflux requested review from JordanGuinn and emyl3 and removed request for a team June 24, 2026 20:17
@nullflux nullflux changed the title SEER #18435: filter unmapped race codes from demographics summary card APP-769: filter unmapped race codes from demographics summary card Jun 24, 2026

@JordanGuinn JordanGuinn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you! 🙏

@emyl3 emyl3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thank you for addressing this and adding tests! 🫡

@nullflux nullflux merged commit c512cae into main Jun 25, 2026
5 of 6 checks passed
@nullflux nullflux deleted the aw/seer-18435 branch June 25, 2026 15:12
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.

3 participants