Skip to content

Commit

Permalink
Update Calculation Implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzy11 committed Jul 26, 2023
1 parent 9b74b4e commit d376dc7
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ private Analysis createCalculatedResult(ResultCalculation resultCalculation, Res
if ("D".equals(resultType)) {
if (Boolean.valueOf(value)) {
result.setValue(calculation.getResult());
}else{
return null;
}
} else {
result.setValue(value);
Expand Down Expand Up @@ -236,13 +238,13 @@ private void createInternalNote(Result result, Analysis newAnalysis, Analysis cu
String systemUserId) {
List<Note> notes = new ArrayList<>();
Note note = noteService.createSavableNote(newAnalysis, NoteType.INTERNAL,
"Result Calculated From Calculation Rule :" + calculatioName, CALCULATION_SUBJECT, systemUserId);
"Result Succesfully Calculated From Calculation Rule :" + calculatioName, CALCULATION_SUBJECT, systemUserId);
if (!noteService.duplicateNoteExists(note)) {
notes.add(note);
}

Note note2 = noteService.createSavableNote(newAnalysis, NoteType.INTERNAL,
"Calculated From " + currentAnalysis.getTest().getLocalizedReportingName().getLocalizedValue(),
"Calculation Parameters include Result of Test " + currentAnalysis.getTest().getLocalizedReportingName().getLocalizedValue(),
CALCULATION_SUBJECT, systemUserId);
if (!noteService.duplicateNoteExists(note2)) {
notes.add(note2);
Expand All @@ -260,7 +262,7 @@ private void createMissingValueInternalNote(Result result, Analysis newAnalysis,
notes.add(note);
}
Note note2 = noteService.createSavableNote(newAnalysis, NoteType.INTERNAL,
"Calculated From " + currentAnalysis.getTest().getLocalizedReportingName().getLocalizedValue(),
"Calculation Parameters include Result of Test : " + currentAnalysis.getTest().getLocalizedReportingName().getLocalizedValue(),
CALCULATION_SUBJECT, systemUserId);
if (!noteService.duplicateNoteExists(note2)) {
notes.add(note2);
Expand Down

0 comments on commit d376dc7

Please sign in to comment.