Skip to content

Commit 6054d9c

Browse files
authored
Merge pull request #14166 from SORMAS-Foundation/bugfix-14018-14156-14124-sample-types-ast-binding
Fix sample-type visibility and AST commit crash (#14018, #14156, #14124)
2 parents bfad852 + 280ba79 commit 6054d9c

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public enum SampleMaterial {
340340
PLEURAL_FLUID,
341341

342342
// Re-activated for RSV new samples (#14023): the RSV specimen requirements list Nasopharyngeal lavage.
343-
// No canonical SNOMED-CT code on the specimen sheet, so its SNOMED export stays null.
343+
// No canonical SNOMED-CT code on the specimen sheet, so its SNOMED export stays null.
344344
@Diseases(value = {
345345
Disease.RESPIRATORY_SYNCYTIAL_VIRUS })
346346
NASOPHARYNGEAL_LAVAGE,
@@ -367,11 +367,10 @@ public enum SampleMaterial {
367367
Disease.SHIGELLOSIS }, hide = true)
368368
AMNIOTIC_FLUID,
369369

370-
@Diseases(value = {
371-
Disease.RESPIRATORY_SYNCYTIAL_VIRUS,
372-
Disease.GIARDIASIS }, hide = true)
370+
// Clinical Sample (Other) is offered for every disease (#14018) — no @Diseases means "visible for all".
373371
CLINICAL_SAMPLE,
374372

373+
// Lux hide lifted so Peritoneal fluid shows for IPI on Luxembourg servers (#14156).
375374
@Diseases(value = {
376375
Disease.RESPIRATORY_SYNCYTIAL_VIRUS,
377376
Disease.INVASIVE_MENINGOCOCCAL_INFECTION,
@@ -381,8 +380,6 @@ public enum SampleMaterial {
381380
Disease.MALARIA,
382381
Disease.DENGUE,
383382
Disease.SALMONELLOSIS }, hide = true)
384-
@HideForCountries(countries = {
385-
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
386383
PERITONEAL_FLUID,
387384

388385
@Diseases(value = {

sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/ImiSectionComponent.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,4 @@ protected void unbindLegacyFields() {
152152
drugSusceptibilityField = null;
153153
}
154154
}
155-
156155
}

sormas-ui/src/main/java/de/symeda/sormas/ui/therapy/DrugSusceptibilityForm.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,17 @@ public void markAsDirty() {
348348
super.markAsDirty();
349349
}
350350

351+
@Override
352+
public void commit() {
353+
// When no DrugSusceptibilityDto is bound (e.g. after a disease-section swap nulls it), the internal
354+
// field group has no item datasource, so committing its always-bound drug fields would throw
355+
// "Property amikacinMic not bound to datasource" (#14124). Nothing to write, so skip the commit.
356+
if (getValue() == null) {
357+
return;
358+
}
359+
super.commit();
360+
}
361+
351362
public void forceUpdateDrugSusceptibilityFields() {
352363
final DrugSusceptibilityDto drugSusceptibilityDto = getValue();
353364
if (drugSusceptibilityDto == null) {

0 commit comments

Comments
 (0)