Skip to content

Add API to retrieve merge candidates by patient ID.#358

Merged
sizatenquizit merged 7 commits intomainfrom
CND-269-API-Retrieve-Merge-Candidates-details
Apr 23, 2025
Merged

Add API to retrieve merge candidates by patient ID.#358
sizatenquizit merged 7 commits intomainfrom
CND-269-API-Retrieve-Merge-Candidates-details

Conversation

@sizatenquizit
Copy link
Copy Markdown
Contributor

  • Added an endpoint that accepts a patient ID from the merge_candidates table.
  • Returns an array of matched patients with supporting data for the merge screen.

JIRA

https://cdc-nbs.atlassian.net/browse/CND-269

@sizatenquizit sizatenquizit requested a review from mpeels April 22, 2025 20:04
Comment on lines +26 to +34
private static final Map<String, String> RACE_MAP = Map.ofEntries(
Map.entry("1002-5", "AMERICAN_INDIAN"),
Map.entry("2028-9", "ASIAN"),
Map.entry("2054-5", "BLACK"),
Map.entry("2076-8", "HAWAIIAN"),
Map.entry("2106-3", "WHITE"),
Map.entry("2131-1", "OTHER"),
Map.entry("U", "UNKNOWN")
);
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.

Possible issue: These values come from the code_value_general table. They are SYS controlled values so they shouldn't change frequently (user can't edit them through UI), but it is still possible for them to change.

I'm fine with caching these values but it would be better to pull them from the database on startup.

If we want to keep it this way for now, I'm ok with it. We would just need to put a story in the backlog to address it in the future.

Comment on lines +69 to +81
public static final List<String> SUPPORTED_IDENTIFIERS = Arrays.asList(
"AC", "ACSN", "AIN", "AM", "AMA", "AN", "ANC", "AND", "ANON", "ANT", "APRN", "ASID", "BA", "BC",
"BCFN", "BCT", "BR", "BRN", "BSNR", "CAII", "CC", "CONM", "CY", "CZ", "DC", "DCFN", "DDS", "DEA",
"DFN", "DI", "DL", "DN", "DO", "DP", "DPM", "DR", "DS", "DSG", "EI", "EN", "ESN", "FDR", "FDRFN",
"FGN", "FI", "FILL", "GI", "GIN", "GL", "GN", "HC", "IND", "IRISTEM", "JHN", "LACSN", "LANR", "LI",
"LN", "LR", "MA", "MB", "MC", "MCD", "MCN", "MCR", "MCT", "MD", "MI", "MR", "MRT", "MS", "NBSNR",
"NCT", "NE", "NH", "NI", "NII", "NIIP", "NP", "NPI", "OBI", "OD", "PA", "PC", "PCN", "PE", "PEN",
"PGN", "PHC", "PHE", "PHO", "PI", "PIN", "PLAC", "PN", "PNT", "PPIN", "PPN", "PRC", "PRN", "PT",
"QA", "RI", "RN", "RPH", "RR", "RRI", "RRP", "SAMN", "SB", "SID", "SL", "SN", "SNBSN", "SNO", "SP",
"SR", "SRX", "SS", "STN", "TAX", "TN", "TPR", "TRL", "U", "UDI", "UPIN", "USID", "VN", "VP", "VS",
"WC", "WCN", "WP", "XV", "XX"
);
}
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.

Possible Issue: Its possible that these could be different for different STLTs or change over time.
See RACE_MAP comment for more info.

@sizatenquizit sizatenquizit requested a review from mpeels April 23, 2025 16:55
@sonarqubecloud
Copy link
Copy Markdown

@sizatenquizit sizatenquizit merged commit 53a6ad1 into main Apr 23, 2025
3 checks passed
@mpeels mpeels deleted the CND-269-API-Retrieve-Merge-Candidates-details branch May 13, 2025 17:42
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.

2 participants