Skip to content

Commit

Permalink
Resolve issues reported by CheckStyle tech-by-design#242
Browse files Browse the repository at this point in the history
resolved AbbreviationAsWordInName
  • Loading branch information
razakpm committed Aug 7, 2024
1 parent 3702307 commit 57961ae
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@ private String convertToEST(String inputTime) {
}

@GetMapping(value = "/dashboard/stat/fhir/fhir-submission-summary", produces = "text/html")
public String fetchFHIRSubmissionSummary(Model model) {
public String fetchFHIRsubmissionSummary(Model model) {
String schemaName = "techbd_udi_ingress";
String viewName = "fhir_submission_summary";
final String DEFAULT_VALUE = "0";
String totalSubmissions = DEFAULT_VALUE;
String pendingSubmissions = DEFAULT_VALUE;
String acceptedSubmissions = DEFAULT_VALUE;
String rejectedSubmissions = DEFAULT_VALUE;
final String defaultValue = "0";
String totalSubmissions = defaultValue;
String pendingSubmissions = defaultValue;
String acceptedSubmissions = defaultValue;
String rejectedSubmissions = defaultValue;
try {
final var typableTable = JooqRowsSupplier.TypableTable.fromTablesRegistry(Tables.class, schemaName,
viewName);
Expand All @@ -234,10 +234,10 @@ public String fetchFHIRSubmissionSummary(Model model) {
.intoMaps();
if (CollectionUtils.isNotEmpty(fhirSubmission)) {
Map<String, Object> data = fhirSubmission.get(0);
totalSubmissions = data.getOrDefault("total_submissions", DEFAULT_VALUE).toString();
pendingSubmissions = data.getOrDefault("pending_submissions", DEFAULT_VALUE).toString();
acceptedSubmissions = data.getOrDefault("accepted_submissions", DEFAULT_VALUE).toString();
rejectedSubmissions = data.getOrDefault("rejected_submissions", DEFAULT_VALUE).toString();
totalSubmissions = data.getOrDefault("total_submissions", defaultValue).toString();
pendingSubmissions = data.getOrDefault("pending_submissions", defaultValue).toString();
acceptedSubmissions = data.getOrDefault("accepted_submissions", defaultValue).toString();
rejectedSubmissions = data.getOrDefault("rejected_submissions", defaultValue).toString();
}
} catch (Exception e) {
LOG.error("Error fetching FHIR interactions", e);
Expand Down

0 comments on commit 57961ae

Please sign in to comment.