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

MAT-6393: Fix condition for unique valuesets with no author #84

Merged
merged 2 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,11 @@ public List<ValueSetForSearch> searchValueSets(String apiKey, Map<String, String
ValueSetForSearch.builder()
.title(vs.getTitle())
.author(
String.valueOf(
vs.getExtensionByUrl(
"http://hl7.org/fhir/StructureDefinition/valueset-author")
.getValue()))
Optional.ofNullable(
vs.getExtensionByUrl(
"http://hl7.org/fhir/StructureDefinition/valueset -author"))
mcmcphillips marked this conversation as resolved.
Show resolved Hide resolved
.map(extension -> String.valueOf(extension.getValue()))
.orElse(""))
.name(vs.getName())
.composedOf(
vs.getCompose().getInclude().stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ public List<CqlCode> validateCodes(List<CqlCode> cqlCodes, UmlsUser umlsUser, St
} else {
// unidentified code system.
log.info(
"No associated Code system found in code system entry json for {}",
cqlCode.getCodeSystem().getOid());
"No associated Code system found in code system entry json for {}",
cqlCode.getCodeSystem().getOid());
cqlCode.getCodeSystem().setValid(false);
cqlCode.getCodeSystem().setErrorMessage("Invalid Code system");
}
Expand Down Expand Up @@ -281,13 +281,16 @@ private void buildVsacErrorMessage(CqlCode cqlCode, VsacCode vsacCode) {
&& StringUtils.isNumeric(vsacCode.getErrors().getResultSet().get(0).getErrCode())) {
int errorCode = Integer.parseInt(vsacCode.getErrors().getResultSet().get(0).getErrCode());
if (errorCode == 800 || errorCode == 801) {
log.info("Error code is 800, or 801 from VSAC. Error: {}", vsacCode.getErrors().getResultSet().get(0));
log.info(
"Error code is 800, or 801 from VSAC. Error: {}",
vsacCode.getErrors().getResultSet().get(0));
cqlCode.getCodeSystem().setValid(false);
cqlCode
.getCodeSystem()
.setErrorMessage(vsacCode.getErrors().getResultSet().get(0).getErrDesc());
} else if (errorCode == 802) {
log.info("Error code is 802 from VSAC. Error: {}", vsacCode.getErrors().getResultSet().get(0));
log.info(
"Error code is 802 from VSAC. Error: {}", vsacCode.getErrors().getResultSet().get(0));
cqlCode.setValid(false);
cqlCode.setErrorMessage(vsacCode.getErrors().getResultSet().get(0).getErrDesc());
}
Expand All @@ -299,7 +302,10 @@ private void buildVsacErrorMessage(CqlCode cqlCode, VsacCode vsacCode) {
+ "If this error persists, please contact the Help Desk.");
} else {
cqlCode.setValid(false);
log.info("Error code is uncaught. General catch, Error: {} status: {}", vsacCode.getErrors().getResultSet().get(0), vsacCode.getStatus());
log.info(
"Error code is uncaught. General catch, Error: {} status: {}",
vsacCode.getErrors().getResultSet().get(0),
vsacCode.getStatus());
}
}

Expand Down
Loading