Skip to content

Commit

Permalink
Minor updates > Version 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fra82 committed Jan 28, 2019
1 parent 7927c70 commit 43e86e3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,5 @@
</dependencies>


<version>3.1</version>
<version>3.2</version>
</project>
4 changes: 2 additions & 2 deletions rtdoc/LocalExecution.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
Comorbidity4j has to be executed by Java 1.8 or newer. As a consequence, as a prerequisite for the execution of Comorbidity4j you need to have <a href="https://www.java.com/en/download/" target="_blank">Java</a> installed.

## Download the JAR package
The compressed archive (comorbidity4j-3.1-bin.zip) that contains the latest version (LATEST_VERS = 3.1) of comorbidity4j can be downloaded at the following URL:
The compressed archive (comorbidity4j-3.2-bin.zip) that contains the latest version (LATEST_VERS = 3.2) of comorbidity4j can be downloaded at the following URL:

<a href="https://github.com/fra82/comorbidity4j/releases/tag/3.1" target="_blank">https://github.com/fra82/comorbidity4j/releases/tag/3.1</a>
<a href="https://github.com/fra82/comorbidity4j/releases/tag/3.2" target="_blank">https://github.com/fra82/comorbidity4j/releases/tag/3.2</a>


## Comorbidity4j Execution
Expand Down
2 changes: 1 addition & 1 deletion rtdoc/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![Comorbidity4j](/img/logo.png)
<h3>Open-source Java tool to analyze comorbidities over large datasets of patients</h3>

**Latest version: 3.1**
**Latest version: 3.2**

Comorbidity4j is an Open-source java tool tailored to easily perform <a href="https://en.wikipedia.org/wiki/Comorbidity" target="_blank">comorbidity analyses</a>, thus **supporting the analysis of significant cooccurrences of diseases over large datasets of patient data**.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ public DataLoadContainer<Map<String, String>> loadDataFromReader(Reader inputRea

if(!is_first_column_header) {
try {
description_index = Integer.valueOf(code.toLowerCase().replace("col_", ""));
description_index = Integer.valueOf(description.toLowerCase().replace("col_", ""));
} catch (Exception e) {
e.printStackTrace();
errorString.append(GenericUtils.newLine + "ERROR: while identifying the index of the Patient ID column - EXCEPTION: " + e.getMessage());
logger.error(" > EXCEPTION: " + e.getMessage());
}

try {
code_index = Integer.valueOf(description.toLowerCase().replace("col_", ""));
code_index = Integer.valueOf(code.toLowerCase().replace("col_", ""));
} catch (Exception e) {
e.printStackTrace();
errorString.append(GenericUtils.newLine + "ERROR: while identifying the index of the Visit ID column - EXCEPTION: " + e.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,13 @@ else if(nextLine[i].trim().toLowerCase().equals(diagnosis_code.toLowerCase())) {
String diagnosis_code_value = nextLine[diagnosis_code_index].trim();

if(!Strings.isNullOrEmpty(patient_id_value) && !Strings.isNullOrEmpty(admission_id_value) && !Strings.isNullOrEmpty(diagnosis_code_value)) {


System.out.println("Checking patient_id_value: '" + patient_id_value + "' and admission_id_value: '" + admission_id_value + "'");

if(strPatVisitToVisitMap.containsKey(patient_id_value + "_" + admission_id_value)) {

// System.out.println(" > FOUND patient_id_value: '" + patient_id_value + "' and admission_id_value: '" + admission_id_value + "'");

// If the diagnosis code belongs to a diagnosis group, substitute the diagnosis code string to the diagnosis group string
/*
, Map<String, String> diagnosisCodeStringGroupsMap
Expand All @@ -185,7 +189,7 @@ else if(nextLine[i].trim().toLowerCase().equals(diagnosis_code.toLowerCase())) {
diagnosisCodeCount++;
diagnosisCodeIdStringMap.put(diagnosis_code_value, diagnosisCodeCount);
}

visitToEnrichWithDiagnosis.getDiagnosisCodeSet().add(diagnosisCodeIdStringMap.get(diagnosis_code_value));

addedDiagnosisSet.add(patient_id_value + "_" + admission_id_value + "_" + diagnosis_code_value);
Expand All @@ -200,6 +204,9 @@ else if(nextLine[i].trim().toLowerCase().equals(diagnosis_code.toLowerCase())) {
}
}
else {

System.out.println(" > !!! NOT FOUND patient_id_value: '" + patient_id_value + "' and admission_id_value: '" + admission_id_value + "'");

skippedLineCount++;
unexistingPatientOrVisitID++;
if(skippedLineCount <= 500) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.slf4j.LoggerFactory;

import com.google.common.base.Strings;
import com.google.common.io.Files;

import es.imim.ibi.comorbidity4j.analysis.ComorbidityMiner;
import es.imim.ibi.comorbidity4j.analysis.ComorbidityMinerCache;
Expand Down Expand Up @@ -77,7 +78,7 @@ public class ComputeComorbidityServlet extends HttpServlet {

private static Random rnd = new Random();

public static String basePathResultStorage = "/home/ronzano/comorbidity4web/results/"; // Files.createTempDir().getAbsolutePath();
public static String basePathResultStorage = Files.createTempDir().getAbsolutePath(); // "/home/ronzano/comorbidity4web/results/"

private static DecimalFormat decimFormatThreeDec = new DecimalFormat("#######0.000");

Expand Down

0 comments on commit 43e86e3

Please sign in to comment.