Skip to content

Commit

Permalink
refactor: replace assignment with field declaration
Browse files Browse the repository at this point in the history
This also removes obsolete constructor.
  • Loading branch information
pcvolkmer committed Aug 12, 2024
1 parent 89070f4 commit 7049a74
Show file tree
Hide file tree
Showing 13 changed files with 238 additions and 306 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@

public class BeurteilungResidualstatusVsLookup {

private final HashMap<String, String> lookup;

public BeurteilungResidualstatusVsLookup() {
lookup =
new HashMap<>() {
{
put("RX", "Vorhandensein von Residualtumor kann nicht beurteilt werden");
put("R0", "kein Residualtumor");
put("R1", "Mikroskopischer Residualtumor");
put("R1(is)", "In-Situ-Rest");
put("R1(cy+)", "Cytologischer Rest");
put("R2", "Makroskopischer Residualtumor");
}
};
}
private final static HashMap<String, String> lookup = new HashMap<>() {
{
put("RX", "Vorhandensein von Residualtumor kann nicht beurteilt werden");
put("R0", "kein Residualtumor");
put("R1", "Mikroskopischer Residualtumor");
put("R1(is)", "In-Situ-Rest");
put("R1(cy+)", "Cytologischer Rest");
put("R2", "Makroskopischer Residualtumor");
}
};

public final String lookupBeurteilungResidualstatusDisplay(String code) {
return lookup.get(code);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,18 @@
import java.util.HashMap;

public class DisplayAdtSeitenlokalisationLookup {
private final HashMap<String, String> lookup;

public DisplayAdtSeitenlokalisationLookup() {
lookup =
new HashMap<>() {
{
put("L", "links");
put("R", "rechts");
put("B", "beidseitig (sollte bei bestimmten Tumoren 2 Meldungen ergeben)");
put("M", "Mittellinie/Mittig");
put(
"T",
"trifft nicht zu (Seitenangabe nicht sinnvoll, einschließlich Systemerkrankungen)");
put("U", "unbekannt");
}
};
}
private final static HashMap<String, String> lookup = new HashMap<>() {
{
put("L", "links");
put("R", "rechts");
put("B", "beidseitig (sollte bei bestimmten Tumoren 2 Meldungen ergeben)");
put("M", "Mittellinie/Mittig");
put(
"T",
"trifft nicht zu (Seitenangabe nicht sinnvoll, einschließlich Systemerkrankungen)");
put("U", "unbekannt");
}
};

public final String lookupAdtSeitenlokalisationDisplay(String code) {
return lookup.get(code);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,22 @@
import java.util.HashMap;

public class FMLokalisationVsLookup {
private final HashMap<String, String> lookup;

public FMLokalisationVsLookup() {
lookup =
new HashMap<>() {
{
put("PUL", "Lunge");
put("OSS", "Knochen");
put("HEP", "Leber");
put("BRA", "Hirn");
put("LYM", "Lymphknoten");
put("MAR", "Knochenmark");
put("PLE", "Pleura");
put("PER", "Peritoneum");
put("ADR", "Nebennieren");
put("SKI", "Haut");
put("OTH", "Andere Organe");
put("GEN", "Generalisierte Metastasierung");
}
};
}
private final static HashMap<String, String> lookup = new HashMap<>() {
{
put("PUL", "Lunge");
put("OSS", "Knochen");
put("HEP", "Leber");
put("BRA", "Hirn");
put("LYM", "Lymphknoten");
put("MAR", "Knochenmark");
put("PLE", "Pleura");
put("PER", "Peritoneum");
put("ADR", "Nebennieren");
put("SKI", "Haut");
put("OTH", "Andere Organe");
put("GEN", "Generalisierte Metastasierung");
}
};

public final String lookupFMLokalisationVSDisplay(String code) {
return lookup.get(code);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,22 @@

public class GradingLookup {

private final HashMap<String, String> lookup;

public GradingLookup() {
lookup =
new HashMap<>() {
{
put("0", "malignes Melanom der Konjunktiva");
put("1", "gut differenziert");
put("2", "mäßig differenziert");
put("3", "schlecht differenziert");
put("4", "undifferenziert");
put("X", "nicht bestimmbar");
put("L", "low grade (G1 oder G2)");
put("M", "intermediate (G2 oder G3)");
put("H", "high grade (G3 oder G4)");
put("B", "Borderline");
put("U", "unbekannt");
put("T", "trifft nicht zu");
}
};
}
private final static HashMap<String, String> lookup = new HashMap<>() {
{
put("0", "malignes Melanom der Konjunktiva");
put("1", "gut differenziert");
put("2", "mäßig differenziert");
put("3", "schlecht differenziert");
put("4", "undifferenziert");
put("X", "nicht bestimmbar");
put("L", "low grade (G1 oder G2)");
put("M", "intermediate (G2 oder G3)");
put("H", "high grade (G3 oder G4)");
put("B", "Borderline");
put("U", "unbekannt");
put("T", "trifft nicht zu");
}
};

public final String lookupGradingDisplay(String code) {
return lookup.get(code);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@
import java.util.HashMap;

public class JnuVsLookup {
private final HashMap<String, String> lookup;

public JnuVsLookup() {
lookup =
new HashMap<>() {
{
put("J", "Ja");
put("N", "Nein");
put("U", "unbekannt");
}
};
}
private final static HashMap<String, String> lookup = new HashMap<>() {
{
put("J", "Ja");
put("N", "Nein");
put("U", "unbekannt");
}
};

public final String lookupJnuDisplay(String code) {
return lookup.get(code);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@

public class OPIntentionVsLookup {

private final HashMap<String, String> lookup;

public OPIntentionVsLookup() {
lookup =
new HashMap<>() {
{
put("K", "kurativ");
put("P", "palliativ");
put("D", "diagnostisch");
put("R", "Revision/Komplikation");
put("S", "sonstiges");
put("X", "Fehlende Angabe");
}
};
}
private final static HashMap<String, String> lookup = new HashMap<>() {
{
put("K", "kurativ");
put("P", "palliativ");
put("D", "diagnostisch");
put("R", "Revision/Komplikation");
put("S", "sonstiges");
put("X", "Fehlende Angabe");
}
};

public final String lookupOPIntentionVSDisplay(String code) {
return lookup.get(code);
Expand Down
Loading

0 comments on commit 7049a74

Please sign in to comment.