-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GITFLOW]merging 'release-0.7.0' into 'master'
- Loading branch information
Showing
161 changed files
with
13,248 additions
and
1,628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
sormas-api/src/main/java/de/symeda/sormas/api/DiseaseHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package de.symeda.sormas.api; | ||
|
||
import de.symeda.sormas.api.caze.CaseDataDto; | ||
import de.symeda.sormas.api.symptoms.SymptomState; | ||
import de.symeda.sormas.api.symptoms.SymptomsDto; | ||
|
||
public class DiseaseHelper { | ||
|
||
public static boolean hasContactFollowUp(CaseDataDto caze) { | ||
Disease disease = caze.getDisease(); | ||
|
||
return disease == Disease.EVD || disease == Disease.LASSA || disease == Disease.AVIAN_INFLUENCA | ||
|| disease == Disease.MONKEYPOX || (disease == Disease.PLAGUE && caze.getPlagueType() == PlagueType.PNEUMONIC) | ||
|| disease == Disease.OTHER; | ||
} | ||
|
||
/** | ||
* Checks whether the given symptoms match the clinical criteria of one of the three Plague types. | ||
* | ||
* @param symptoms The symptoms of a case with the Plague disease | ||
* @return One of the three Plague types if the clinical criteria are met, null otherwise | ||
*/ | ||
public static PlagueType getPlagueTypeForSymptoms(SymptomsDto symptoms) { | ||
if (symptoms.getFever() == SymptomState.YES) { | ||
if (symptoms.getPainfulLymphadenitis() == SymptomState.YES) { | ||
return PlagueType.BUBONIC; | ||
} else if (symptoms.getCough() == SymptomState.YES || symptoms.getChestPain() == SymptomState.YES || | ||
symptoms.getCoughingBlood() == SymptomState.YES) { | ||
return PlagueType.PNEUMONIC; | ||
} else if (symptoms.getChillsSweats() == SymptomState.YES) { | ||
return PlagueType.SEPTICAEMIC; | ||
} else { | ||
return null; | ||
} | ||
} else { | ||
return null; | ||
} | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
sormas-api/src/main/java/de/symeda/sormas/api/PlagueType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package de.symeda.sormas.api; | ||
|
||
public enum PlagueType { | ||
|
||
BUBONIC, | ||
PNEUMONIC, | ||
SEPTICAEMIC; | ||
|
||
public String toString() { | ||
return I18nProperties.getEnumCaption(this); | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.