From 1816f44add0dd4f2f2eda3ba5ce75b60eafa5bbb Mon Sep 17 00:00:00 2001 From: Raul Bob Date: Fri, 14 Nov 2025 17:33:13 +0100 Subject: [PATCH 1/2] #13676 - Fixed case classification not set for doctor declaration messages --- .../AbstractDoctorDeclarationMessageProcessingFlow.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/processing/doctordeclaration/AbstractDoctorDeclarationMessageProcessingFlow.java b/sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/processing/doctordeclaration/AbstractDoctorDeclarationMessageProcessingFlow.java index 3c4b3bbdd7c..705659a5a19 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/processing/doctordeclaration/AbstractDoctorDeclarationMessageProcessingFlow.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/processing/doctordeclaration/AbstractDoctorDeclarationMessageProcessingFlow.java @@ -164,6 +164,9 @@ protected void postBuildCase(CaseDataDto caseDto, ExternalMessageDto externalMes * The external message containing diagnostic data. */ protected void postBuildCaseData(CaseDataDto caseDto, ExternalMessageDto externalMessageDto) { + + caseDto.setCaseClassification( + externalMessageDto.getCaseClassification() != null ? externalMessageDto.getCaseClassification() : caseDto.getCaseClassification()); caseDto.setRadiographyCompatibility(externalMessageDto.getRadiographyCompatibility()); caseDto.setOtherDiagnosticCriteria(externalMessageDto.getOtherDiagnosticCriteria()); } From c2a4addf9f35636e998315e91f3c40f0386b5c50 Mon Sep 17 00:00:00 2001 From: Raul Bob Date: Fri, 14 Nov 2025 17:34:46 +0100 Subject: [PATCH 2/2] #13677 - Fixed NPE in pathogen test form leading to external message processing issues - Fixed some formatting issues in the pathogen test form --- .../sormas/ui/samples/PathogenTestForm.java | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java index f7a260e90f4..319744c6ec7 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java @@ -317,10 +317,10 @@ public void setValue(PathogenTestDto newFieldValue) throws ReadOnlyException, Co } typingIdField.setValue(newFieldValue.getTypingId()); specieField.setValue(newFieldValue.getSpecie()); - if(!genoTypingCB.isReadOnly()) { + if (!genoTypingCB.isReadOnly()) { genoTypingCB.setValue(newFieldValue.getGenoTypeResult()); // We only set the genotyping result text if the genotyping result is not read only - if(!genoTypingResultTextTF.isReadOnly()) { + if (!genoTypingResultTextTF.isReadOnly()) { genoTypingResultTextTF.setValue(newFieldValue.getGenoTypeResultText()); } } @@ -362,22 +362,27 @@ protected void addFields() { I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, SampleDto.SAMPLE_DATE_TIME), DateFormatHelper.formatDate(getSampleDate())))); testDateField.addValueChangeListener(e -> { - boolean hasTime = !getSampleDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate().equals(LocalTime.MIDNIGHT); - if (hasTime) { - testDateField.removeAllValidators(); - testDateField.addValidator( - new DateComparisonValidator( - testDateField, - this::getSampleDate, - false, - false, - false, - I18nProperties.getValidationError( - Validations.afterDateWithDate, - testDateField.getCaption(), - I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, SampleDto.SAMPLE_DATE_TIME), - DateFormatHelper.formatLocalDateTime(getSampleDate())))); + boolean hasTime = + getSampleDate() != null && !getSampleDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate().equals(LocalTime.MIDNIGHT); + + if (!hasTime) { + return; } + + testDateField.removeAllValidators(); + testDateField.addValidator( + new DateComparisonValidator( + testDateField, + this::getSampleDate, + false, + false, + false, + I18nProperties.getValidationError( + Validations.afterDateWithDate, + testDateField.getCaption(), + I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, SampleDto.SAMPLE_DATE_TIME), + DateFormatHelper.formatLocalDateTime(getSampleDate())))); + }); ComboBox lab = addInfrastructureField(PathogenTestDto.LAB); lab.addItems(FacadeProvider.getFacilityFacade().getAllActiveLaboratories(true));