Skip to content

Commit

Permalink
manually implement commit 9a31001 from develop into master for hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebSLane committed Nov 22, 2023
1 parent 11bcf69 commit 88dfd30
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<major.version>2</major.version>
<minor.version>6</minor.version>
<state.version>3</state.version> <!-- 0 = alpha, 1 = beta, 2 = rc, 3 = deployable -->
<fix.version>14</fix.version>
<fix.version>15</fix.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ private void setAppropriateResults(List<Result> resultList, Analysis analysis, T
String reportResult = resultResultService.getResultValue(result, true);
Result quantifiableResult = analysisService.getQuantifiedResult(analysis);
if (quantifiableResult != null) {
reportResult += ":" + quantifiableResult.getValue(true);
reportResult += ":" + quantifiableResult.getValue();
}

data.setResult(reportResult.replace(",", ";"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,16 @@ protected void setTestInfo(ARVReportData data) {
data.setShowSerologie(Boolean.TRUE);
} else if (result.getAnalyte() != null
&& result.getAnalyte().getId().equals(CD4_CNT_CONCLUSION)) {
data.setCd4(valid ? result.getValue(true) : invalidValue);
data.setCd4(valid ? result.getValue() : invalidValue);
} else {
resultValue = result.getValue(true);
resultValue = result.getValue();
}
}
}

if (resultList.size() > 0) {
if (resultValue == null) {
resultValue = resultList.get(resultList.size() - 1).getValue(true);
resultValue = resultList.get(resultList.size() - 1).getValue();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected void setTestInfo(EIDReportData data) {
if (valid) {
String resultValue = "";
if (resultList.size() > 0) {
resultValue = resultList.get(resultList.size() - 1).getValue(true);
resultValue = resultList.get(resultList.size() - 1).getValue();
}
Dictionary dictionary = new Dictionary();
dictionary.setId(resultValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ private void setAppropriateResults(List<Result> resultList, ClinicalPatientData
reportResult = dictionary.getId() != null ? dictionary.getLocalizedName() : "";
if (quantification != null
&& quantification.getParentResult().getId().equals(sibResult.getId())) {
reportResult += ": " + quantification.getValue(true);
reportResult += ": " + quantification.getValue();
}
}
}
Expand Down Expand Up @@ -792,7 +792,7 @@ public int compare(Result o1, Result o2) {
&& quantifiedResult.getParentResult().getId().equals(subResult.getId())
&& !GenericValidator.isBlankOrNull(quantifiedResult.getValue())) {
multiResult.append(": ");
multiResult.append(quantifiedResult.getValue(true));
multiResult.append(quantifiedResult.getValue());
}
multiResult.append("\n");
}
Expand Down Expand Up @@ -1018,7 +1018,7 @@ private String findDisplayableReportResult(Result result) {
reportResult = dictionary.getId() != null ? dictionary.getLocalizedName() : "";
}
} else {
reportResult = result.getValue(true);
reportResult = result.getValue();
}
return reportResult;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public String getResultValue(Result result, String separator, boolean printable,
if (TypeOfTestResultServiceImpl.ResultType.DICTIONARY.matches(getTestType(result))) {

if (!printable) {
return result.getValue(printable);
return result.getValue();
}
String reportResult = "";
List<Result> resultList = baseObjectDAO.getResultsByAnalysis(result.getAnalysis());
Expand All @@ -237,13 +237,13 @@ public String getResultValue(Result result, String separator, boolean printable,
}

for (Result sibResult : dictionaryResults) {
Dictionary dictionary = dictionaryService.getDictionaryById(sibResult.getValue(printable));
Dictionary dictionary = dictionaryService.getDictionaryById(sibResult.getValue());
reportResult = (dictionary != null && dictionary.getId() != null)
? dictionary.getLocalizedName()
: "";
if (quantification != null
&& quantification.getParentResult().getId().equals(sibResult.getId())) {
reportResult += separator + quantification.getValue(printable);
reportResult += separator + quantification.getValue();
}
}
}
Expand Down Expand Up @@ -271,26 +271,26 @@ public String getResultValue(Result result, String separator, boolean printable,
} else {
buffer.append(separator);
}
buffer.append(dictionaryService.getDataForId(multiResult.getValue(printable)).getDictEntry());
buffer.append(dictionaryService.getDataForId(multiResult.getValue()).getDictEntry());
}
}
return buffer.toString();
} else if (TypeOfTestResultServiceImpl.ResultType.NUMERIC.matches(getTestType(result))) {
int significantPlaces = result.getSignificantDigits();
if (significantPlaces == -1) {
return result.getValue(printable) + appendUOM(result, includeUOM);
return result.getValue() + appendUOM(result, includeUOM);
}
if (significantPlaces == 0) {
return result.getValue(printable).split("\\.")[0] + appendUOM(result, includeUOM);
return result.getValue().split("\\.")[0] + appendUOM(result, includeUOM);
}
StringBuilder value = new StringBuilder();
value.append(result.getValue(printable));
value.append(result.getValue());
int startFill = 0;

if (!result.getValue(printable).contains(".")) {
if (!result.getValue().contains(".")) {
value.append(".");
} else {
startFill = result.getValue(printable).length() - result.getValue(printable).lastIndexOf(".") - 1;
startFill = result.getValue().length() - result.getValue().lastIndexOf(".") - 1;
}

for (int i = startFill; i < significantPlaces; i++) {
Expand All @@ -300,9 +300,9 @@ public String getResultValue(Result result, String separator, boolean printable,
return value.toString() + appendUOM(result, includeUOM);
} else if (TypeOfTestResultServiceImpl.ResultType.ALPHA.matches(result.getResultType())
&& !GenericValidator.isBlankOrNull(result.getValue())) {
return result.getValue(printable).split("\\(")[0].trim();
return result.getValue().split("\\(")[0].trim();
} else {
return result.getValue(printable);
return result.getValue();
}
}

Expand All @@ -315,7 +315,7 @@ public String getResultValueForDisplay(Result result, String separator, boolean
if (TypeOfTestResultServiceImpl.ResultType.DICTIONARY.matches(getTestType(result))) {

if (!printable) {
return result.getValue(printable);
return result.getValue();
}
String reportResult = "";
List<Result> resultList = baseObjectDAO.getResultsByAnalysis(result.getAnalysis());
Expand All @@ -336,13 +336,13 @@ public String getResultValueForDisplay(Result result, String separator, boolean
}

for (Result sibResult : dictionaryResults) {
Dictionary dictionary = dictionaryService.getDictionaryById(sibResult.getValue(printable));
Dictionary dictionary = dictionaryService.getDictionaryById(sibResult.getValue());
reportResult = (dictionary != null && dictionary.getId() != null)
? dictionary.getLocalizedName()
: "";
if (quantification != null
&& quantification.getParentResult().getId().equals(sibResult.getId())) {
reportResult += separator + quantification.getValue(printable);
reportResult += separator + quantification.getValue();
}
}
}
Expand All @@ -363,33 +363,33 @@ public String getResultValueForDisplay(Result result, String separator, boolean
List<Result> results = new ResultDAOImpl().getResultsByAnalysis(result.getAnalysis());

for (Result multiResult : results) {
if (!GenericValidator.isBlankOrNull(multiResult.getValue(printable))
if (!GenericValidator.isBlankOrNull(multiResult.getValue())
&& TypeOfTestResultServiceImpl.ResultType.isMultiSelectVariant(multiResult.getResultType())) {
if (firstPass) {
firstPass = false;
} else {
buffer.append(separator);
}
buffer.append(dictionaryService.getDataForId(multiResult.getValue(printable)).getDictEntry());
buffer.append(dictionaryService.getDataForId(multiResult.getValue()).getDictEntry());
}
}
return buffer.toString();
} else if (TypeOfTestResultServiceImpl.ResultType.NUMERIC.matches(getTestType(result))) {
int significantPlaces = result.getSignificantDigits();
if (significantPlaces == -1) {
return result.getValue(printable) + appendUOM(result, includeUOM);
return result.getValue() + appendUOM(result, includeUOM);
}
if (significantPlaces == 0) {
return result.getValue(printable).split("\\.")[0] + appendUOM(result, includeUOM);
return result.getValue().split("\\.")[0] + appendUOM(result, includeUOM);
}
StringBuilder value = new StringBuilder();
value.append(result.getValue(printable));
value.append(result.getValue());
int startFill = 0;

if (!result.getValue(printable).contains(".")) {
if (!result.getValue().contains(".")) {
value.append(".");
} else {
startFill = result.getValue(printable).length() - result.getValue(printable).lastIndexOf(".") - 1;
startFill = result.getValue().length() - result.getValue().lastIndexOf(".") - 1;
}

for (int i = startFill; i < significantPlaces; i++) {
Expand All @@ -399,9 +399,9 @@ public String getResultValueForDisplay(Result result, String separator, boolean
return value.toString() + appendUOM(result, includeUOM);
} else if (TypeOfTestResultServiceImpl.ResultType.ALPHA.matches(result.getResultType())
&& !GenericValidator.isBlankOrNull(result.getValue())) {
return result.getValue(printable).split("\\(")[0].trim();
return result.getValue().split("\\(")[0].trim();
} else {
return result.getValue(printable);
return result.getValue();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public String getValue() {

public String getValue(Boolean getActualNumericValue) {
if (getActualNumericValue) {
if ((this.resultType.equals("N") || this.resultType.equals("D") || this.resultType.equals("A"))&& this.value != null) {
if (this.resultType.equals("N")) {
return StringUtil.getActualNumericValue(value);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ public final AnalysisItem testResultItemToAnalysisItem(ResultValidationItem test
}

protected final String getFormattedResult(ResultValidationItem testResultItem) {
String result = testResultItem.getResult().getValue(false);
String result = testResultItem.getResult().getValue();
if (TestIdentityService.getInstance().isTestNumericViralLoad(testResultItem.getTestId())
&& !GenericValidator.isBlankOrNull(result)) {
return result.split("\\(")[0].trim();
Expand Down

0 comments on commit 88dfd30

Please sign in to comment.