From b26c2cf3c7a2ed1a5884174a43fbae46ed7d97ac Mon Sep 17 00:00:00 2001 From: mcmcphillips Date: Thu, 30 May 2024 13:00:00 -0700 Subject: [PATCH 1/2] MAT-6393: Fix condition for unique valuesets with no author --- .../service/FhirTerminologyService.java | 9 +++++---- .../madie/terminology/service/VsacService.java | 16 +++++++++++----- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/main/java/gov/cms/madie/terminology/service/FhirTerminologyService.java b/src/main/java/gov/cms/madie/terminology/service/FhirTerminologyService.java index 46f4b37..6916bbb 100644 --- a/src/main/java/gov/cms/madie/terminology/service/FhirTerminologyService.java +++ b/src/main/java/gov/cms/madie/terminology/service/FhirTerminologyService.java @@ -140,10 +140,11 @@ public List searchValueSets(String apiKey, Map String.valueOf(extension.getValue())) + .orElse("")) .name(vs.getName()) .composedOf( vs.getCompose().getInclude().stream() diff --git a/src/main/java/gov/cms/madie/terminology/service/VsacService.java b/src/main/java/gov/cms/madie/terminology/service/VsacService.java index 70a01b8..06f5bb3 100644 --- a/src/main/java/gov/cms/madie/terminology/service/VsacService.java +++ b/src/main/java/gov/cms/madie/terminology/service/VsacService.java @@ -144,8 +144,8 @@ public List validateCodes(List 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"); } @@ -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()); } @@ -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()); } } From d57f0991db78afffff1674586cdf46d537d09d05 Mon Sep 17 00:00:00 2001 From: mcmcphillips <84744653+mcmcphillips@users.noreply.github.com> Date: Thu, 30 May 2024 14:46:18 -0700 Subject: [PATCH 2/2] Update FhirTerminologyService.java --- .../cms/madie/terminology/service/FhirTerminologyService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gov/cms/madie/terminology/service/FhirTerminologyService.java b/src/main/java/gov/cms/madie/terminology/service/FhirTerminologyService.java index 6916bbb..19facc7 100644 --- a/src/main/java/gov/cms/madie/terminology/service/FhirTerminologyService.java +++ b/src/main/java/gov/cms/madie/terminology/service/FhirTerminologyService.java @@ -142,7 +142,7 @@ public List searchValueSets(String apiKey, Map String.valueOf(extension.getValue())) .orElse("")) .name(vs.getName())