Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeSystem/$validate-code causes and NPE when display is not present in the data #2716

Closed
JohnTimm opened this issue Aug 24, 2021 · 1 comment
Assignees
Labels
P2 Priority 2 - Should Have terminology

Comments

@JohnTimm
Copy link
Collaborator

There are scenarios where a $validate-code operation causes a 500 Internal Server Error due to a NullPointerException on line 1042 of FHIRTermService. This is because, when the code system is case-sensitive, we must normalize the display name before we compare:

result = caseSensitive ? outcome.getDisplay().equals(coding.getDisplay()) : normalize(outcome.getDisplay().getValue()).equals(normalize(coding.getDisplay().getValue()));

We must add an additional null check on outcome.getDisplay.getValue() and coding.getDisplay().getValue() to protect against this.

@JohnTimm JohnTimm added terminology P2 Priority 2 - Should Have labels Aug 24, 2021
@JohnTimm JohnTimm self-assigned this Aug 24, 2021
@JohnTimm JohnTimm added this to the Sprint 2021-11 milestone Aug 24, 2021
JohnTimm added a commit that referenced this issue Aug 24, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue Aug 24, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
@prb112
Copy link
Contributor

prb112 commented Aug 31, 2021

QA - Tested for NPE, and found it returns properly
image

@prb112 prb112 closed this as completed Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Priority 2 - Should Have terminology
Projects
None yet
Development

No branches or pull requests

2 participants