|
33 | 33 | import static de.symeda.sormas.api.therapy.DrugSusceptibilityDto.RIFAMPICIN_SUSCEPTIBILITY; |
34 | 34 | import static de.symeda.sormas.api.therapy.DrugSusceptibilityDto.STREPTOMYCIN_SUSCEPTIBILITY; |
35 | 35 | import static de.symeda.sormas.ui.utils.CssStyles.H3; |
36 | | -import static de.symeda.sormas.ui.utils.LayoutUtil.fluidColumn; |
37 | | -import static de.symeda.sormas.ui.utils.LayoutUtil.fluidRow; |
38 | 36 | import static de.symeda.sormas.ui.utils.LayoutUtil.fluidRowLocs; |
39 | 37 | import static de.symeda.sormas.ui.utils.LayoutUtil.loc; |
40 | 38 |
|
@@ -78,30 +76,19 @@ public class DrugSusceptibilityResultPanel extends CustomLayout { |
78 | 76 |
|
79 | 77 | //@formatter:off |
80 | 78 | private static final String HTML_LAYOUT = |
81 | | - loc(FORM_HEADING_LOC) + |
82 | | - fluidRow( |
83 | | - fluidColumn(4, 0, |
84 | | - fluidRowLocs(AMIKACIN_SUSCEPTIBILITY) |
85 | | - + fluidRowLocs(BEDAQUILINE_SUSCEPTIBILITY) |
86 | | - + fluidRowLocs(CAPREOMYCIN_SUSCEPTIBILITY) |
87 | | - + fluidRowLocs(CIPROFLOXACIN_SUSCEPTIBILITY) |
88 | | - + fluidRowLocs(DELAMANID_SUSCEPTIBILITY) |
89 | | - + fluidRowLocs(ETHAMBUTOL_SUSCEPTIBILITY) |
90 | | - + fluidRowLocs(GATIFLOXACIN_SUSCEPTIBILITY) |
91 | | - + fluidRowLocs("LAYOUT_CEFTRIAXONE") |
92 | | - + fluidRowLocs("LAYOUT_CIPROFLOXACIN") |
93 | | - + fluidRowLocs("LAYOUT_ERYTHROMYCIN")), |
94 | | - fluidColumn(4, 0, |
95 | | - fluidRowLocs(ISONIAZID_SUSCEPTIBILITY) |
96 | | - + fluidRowLocs(KANAMYCIN_SUSCEPTIBILITY) |
97 | | - + fluidRowLocs(LEVOFLOXACIN_SUSCEPTIBILITY) |
98 | | - + fluidRowLocs(MOXIFLOXACIN_SUSCEPTIBILITY) |
99 | | - + fluidRowLocs(OFLOXACIN_SUSCEPTIBILITY) |
100 | | - + fluidRowLocs(RIFAMPICIN_SUSCEPTIBILITY) |
101 | | - + fluidRowLocs(STREPTOMYCIN_SUSCEPTIBILITY) |
102 | | - + fluidRowLocs("LAYOUT_RIFAMPICIN") |
103 | | - +fluidRowLocs("LAYOUT_PENICILLIN")) |
104 | | - ); |
| 79 | + loc(FORM_HEADING_LOC) |
| 80 | + + fluidRowLocs(ISONIAZID_SUSCEPTIBILITY, RIFAMPICIN_SUSCEPTIBILITY, "", "") |
| 81 | + + fluidRowLocs(ETHAMBUTOL_SUSCEPTIBILITY, STREPTOMYCIN_SUSCEPTIBILITY, "", "") |
| 82 | + + fluidRowLocs(LEVOFLOXACIN_SUSCEPTIBILITY, MOXIFLOXACIN_SUSCEPTIBILITY, "", "") |
| 83 | + + fluidRowLocs(BEDAQUILINE_SUSCEPTIBILITY, "", "", "") |
| 84 | + + fluidRowLocs(DELAMANID_SUSCEPTIBILITY, CAPREOMYCIN_SUSCEPTIBILITY, "", "") |
| 85 | + + fluidRowLocs(KANAMYCIN_SUSCEPTIBILITY, "", "", "") |
| 86 | + + fluidRowLocs(CIPROFLOXACIN_SUSCEPTIBILITY, OFLOXACIN_SUSCEPTIBILITY, "", "") |
| 87 | + + fluidRowLocs(GATIFLOXACIN_SUSCEPTIBILITY, "", "", "") |
| 88 | + + fluidRowLocs(AMIKACIN_SUSCEPTIBILITY, "", "", "") |
| 89 | + + fluidRowLocs("LAYOUT_CEFTRIAXONE", "LAYOUT_RIFAMPICIN", "", "") |
| 90 | + + fluidRowLocs("LAYOUT_CIPROFLOXACIN", "LAYOUT_PENICILLIN", "", "") |
| 91 | + + fluidRowLocs("LAYOUT_ERYTHROMYCIN", "", "", ""); |
105 | 92 | //@formatter:on |
106 | 93 |
|
107 | 94 | private static final List<String> componentLocationsList = List.of( |
@@ -142,87 +129,103 @@ private void addFields() { |
142 | 129 | DrugSusceptibilityDto drugSusceptibilityDto = pathogenTestDto.getDrugSusceptibility(); |
143 | 130 |
|
144 | 131 | addResistanceResultField( |
145 | | - AMIKACIN_SUSCEPTIBILITY, |
146 | | - drugSusceptibilityDto.getAmikacinSusceptibility(), |
147 | | - I18nProperties.getEnumCaption(Drug.AMIKACIN), |
| 132 | + ISONIAZID_SUSCEPTIBILITY, |
| 133 | + drugSusceptibilityDto.getIsoniazidSusceptibility(), |
| 134 | + I18nProperties.getEnumCaption(Drug.ISONIAZID), |
148 | 135 | pathogenTestDto.getTestedDisease()); |
| 136 | + |
149 | 137 | addResistanceResultField( |
150 | | - BEDAQUILINE_SUSCEPTIBILITY, |
151 | | - drugSusceptibilityDto.getBedaquilineSusceptibility(), |
152 | | - I18nProperties.getEnumCaption(Drug.BEDAQUILINE), |
| 138 | + RIFAMPICIN_SUSCEPTIBILITY, |
| 139 | + drugSusceptibilityDto.getRifampicinSusceptibility(), |
| 140 | + I18nProperties.getEnumCaption(Drug.RIFAMPICIN), |
153 | 141 | pathogenTestDto.getTestedDisease()); |
| 142 | + |
154 | 143 | addResistanceResultField( |
155 | | - CAPREOMYCIN_SUSCEPTIBILITY, |
156 | | - drugSusceptibilityDto.getCapreomycinSusceptibility(), |
157 | | - I18nProperties.getEnumCaption(Drug.CAPREOMYCIN), |
| 144 | + ETHAMBUTOL_SUSCEPTIBILITY, |
| 145 | + drugSusceptibilityDto.getEthambutolSusceptibility(), |
| 146 | + I18nProperties.getEnumCaption(Drug.ETHAMBUTOL), |
158 | 147 | pathogenTestDto.getTestedDisease()); |
| 148 | + |
159 | 149 | addResistanceResultField( |
160 | | - CIPROFLOXACIN_SUSCEPTIBILITY, |
161 | | - drugSusceptibilityDto.getCiprofloxacinSusceptibility(), |
162 | | - I18nProperties.getEnumCaption(Drug.CIPROFLOXACIN), |
| 150 | + STREPTOMYCIN_SUSCEPTIBILITY, |
| 151 | + drugSusceptibilityDto.getStreptomycinSusceptibility(), |
| 152 | + I18nProperties.getEnumCaption(Drug.STREPTOMYCIN), |
163 | 153 | pathogenTestDto.getTestedDisease()); |
| 154 | + |
164 | 155 | addResistanceResultField( |
165 | | - DELAMANID_SUSCEPTIBILITY, |
166 | | - drugSusceptibilityDto.getDelamanidSusceptibility(), |
167 | | - I18nProperties.getEnumCaption(Drug.DELAMANID), |
| 156 | + LEVOFLOXACIN_SUSCEPTIBILITY, |
| 157 | + drugSusceptibilityDto.getLevofloxacinSusceptibility(), |
| 158 | + I18nProperties.getEnumCaption(Drug.LEVOFLOXACIN), |
168 | 159 | pathogenTestDto.getTestedDisease()); |
| 160 | + |
169 | 161 | addResistanceResultField( |
170 | | - ETHAMBUTOL_SUSCEPTIBILITY, |
171 | | - drugSusceptibilityDto.getEthambutolSusceptibility(), |
172 | | - I18nProperties.getEnumCaption(Drug.ETHAMBUTOL), |
| 162 | + MOXIFLOXACIN_SUSCEPTIBILITY, |
| 163 | + drugSusceptibilityDto.getMoxifloxacinSusceptibility(), |
| 164 | + I18nProperties.getEnumCaption(Drug.MOXIFLOXACIN), |
173 | 165 | pathogenTestDto.getTestedDisease()); |
| 166 | + |
174 | 167 | addResistanceResultField( |
175 | | - GATIFLOXACIN_SUSCEPTIBILITY, |
176 | | - drugSusceptibilityDto.getGatifloxacinSusceptibility(), |
177 | | - I18nProperties.getEnumCaption(Drug.GATIFLOXACIN), |
| 168 | + BEDAQUILINE_SUSCEPTIBILITY, |
| 169 | + drugSusceptibilityDto.getBedaquilineSusceptibility(), |
| 170 | + I18nProperties.getEnumCaption(Drug.BEDAQUILINE), |
178 | 171 | pathogenTestDto.getTestedDisease()); |
| 172 | + |
179 | 173 | addResistanceResultField( |
180 | | - ISONIAZID_SUSCEPTIBILITY, |
181 | | - drugSusceptibilityDto.getIsoniazidSusceptibility(), |
182 | | - I18nProperties.getEnumCaption(Drug.ISONIAZID), |
| 174 | + DELAMANID_SUSCEPTIBILITY, |
| 175 | + drugSusceptibilityDto.getDelamanidSusceptibility(), |
| 176 | + I18nProperties.getEnumCaption(Drug.DELAMANID), |
183 | 177 | pathogenTestDto.getTestedDisease()); |
| 178 | + |
| 179 | + addResistanceResultField( |
| 180 | + CAPREOMYCIN_SUSCEPTIBILITY, |
| 181 | + drugSusceptibilityDto.getCapreomycinSusceptibility(), |
| 182 | + I18nProperties.getEnumCaption(Drug.CAPREOMYCIN), |
| 183 | + pathogenTestDto.getTestedDisease()); |
| 184 | + |
184 | 185 | addResistanceResultField( |
185 | 186 | KANAMYCIN_SUSCEPTIBILITY, |
186 | 187 | drugSusceptibilityDto.getKanamycinSusceptibility(), |
187 | 188 | I18nProperties.getEnumCaption(Drug.KANAMYCIN), |
188 | 189 | pathogenTestDto.getTestedDisease()); |
| 190 | + |
189 | 191 | addResistanceResultField( |
190 | | - LEVOFLOXACIN_SUSCEPTIBILITY, |
191 | | - drugSusceptibilityDto.getLevofloxacinSusceptibility(), |
192 | | - I18nProperties.getEnumCaption(Drug.LEVOFLOXACIN), |
193 | | - pathogenTestDto.getTestedDisease()); |
194 | | - addResistanceResultField( |
195 | | - MOXIFLOXACIN_SUSCEPTIBILITY, |
196 | | - drugSusceptibilityDto.getMoxifloxacinSusceptibility(), |
197 | | - I18nProperties.getEnumCaption(Drug.MOXIFLOXACIN), |
| 192 | + CIPROFLOXACIN_SUSCEPTIBILITY, |
| 193 | + drugSusceptibilityDto.getCiprofloxacinSusceptibility(), |
| 194 | + I18nProperties.getEnumCaption(Drug.CIPROFLOXACIN), |
198 | 195 | pathogenTestDto.getTestedDisease()); |
| 196 | + |
199 | 197 | addResistanceResultField( |
200 | 198 | OFLOXACIN_SUSCEPTIBILITY, |
201 | 199 | drugSusceptibilityDto.getOfloxacinSusceptibility(), |
202 | 200 | I18nProperties.getEnumCaption(Drug.OFLOXACIN), |
203 | 201 | pathogenTestDto.getTestedDisease()); |
| 202 | + |
204 | 203 | addResistanceResultField( |
205 | | - RIFAMPICIN_SUSCEPTIBILITY, |
206 | | - drugSusceptibilityDto.getRifampicinSusceptibility(), |
207 | | - I18nProperties.getEnumCaption(Drug.RIFAMPICIN), |
| 204 | + GATIFLOXACIN_SUSCEPTIBILITY, |
| 205 | + drugSusceptibilityDto.getGatifloxacinSusceptibility(), |
| 206 | + I18nProperties.getEnumCaption(Drug.GATIFLOXACIN), |
208 | 207 | pathogenTestDto.getTestedDisease()); |
| 208 | + |
209 | 209 | addResistanceResultField( |
210 | | - STREPTOMYCIN_SUSCEPTIBILITY, |
211 | | - drugSusceptibilityDto.getStreptomycinSusceptibility(), |
212 | | - I18nProperties.getEnumCaption(Drug.STREPTOMYCIN), |
| 210 | + AMIKACIN_SUSCEPTIBILITY, |
| 211 | + drugSusceptibilityDto.getAmikacinSusceptibility(), |
| 212 | + I18nProperties.getEnumCaption(Drug.AMIKACIN), |
213 | 213 | pathogenTestDto.getTestedDisease()); |
| 214 | + |
214 | 215 | // CEFTRIAXONE |
215 | 216 | addResistanceResultField( |
216 | 217 | CEFTRIAXONE_SUSCEPTIBILITY, |
217 | 218 | drugSusceptibilityDto.getCeftriaxoneSusceptibility(), |
218 | 219 | I18nProperties.getEnumCaption(Drug.CEFTRIAXONE), |
219 | 220 | pathogenTestDto.getTestedDisease()); |
| 221 | + |
220 | 222 | // PENICILLIN |
221 | 223 | addResistanceResultField( |
222 | 224 | PENICILLIN_SUSCEPTIBILITY, |
223 | 225 | drugSusceptibilityDto.getPenicillinSusceptibility(), |
224 | 226 | I18nProperties.getEnumCaption(Drug.PENICILLIN), |
225 | 227 | pathogenTestDto.getTestedDisease()); |
| 228 | + |
226 | 229 | // ERYTHROMYCIN |
227 | 230 | addResistanceResultField( |
228 | 231 | ERYTHROMYCIN_SUSCEPTIBILITY, |
|
0 commit comments