Skip to content

Commit e88508f

Browse files
authored
Merge pull request #13688 from SORMAS-Foundation/bugfix-external_message_processing_issues
Bugfix external message processing issues
2 parents 76e338d + c2a4add commit e88508f

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/processing/doctordeclaration/AbstractDoctorDeclarationMessageProcessingFlow.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ protected void postBuildCase(CaseDataDto caseDto, ExternalMessageDto externalMes
164164
* The external message containing diagnostic data.
165165
*/
166166
protected void postBuildCaseData(CaseDataDto caseDto, ExternalMessageDto externalMessageDto) {
167+
168+
caseDto.setCaseClassification(
169+
externalMessageDto.getCaseClassification() != null ? externalMessageDto.getCaseClassification() : caseDto.getCaseClassification());
167170
caseDto.setRadiographyCompatibility(externalMessageDto.getRadiographyCompatibility());
168171
caseDto.setOtherDiagnosticCriteria(externalMessageDto.getOtherDiagnosticCriteria());
169172
}

sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,10 @@ public void setValue(PathogenTestDto newFieldValue) throws ReadOnlyException, Co
317317
}
318318
typingIdField.setValue(newFieldValue.getTypingId());
319319
specieField.setValue(newFieldValue.getSpecie());
320-
if(!genoTypingCB.isReadOnly()) {
320+
if (!genoTypingCB.isReadOnly()) {
321321
genoTypingCB.setValue(newFieldValue.getGenoTypeResult());
322322
// We only set the genotyping result text if the genotyping result is not read only
323-
if(!genoTypingResultTextTF.isReadOnly()) {
323+
if (!genoTypingResultTextTF.isReadOnly()) {
324324
genoTypingResultTextTF.setValue(newFieldValue.getGenoTypeResultText());
325325
}
326326
}
@@ -362,22 +362,27 @@ protected void addFields() {
362362
I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, SampleDto.SAMPLE_DATE_TIME),
363363
DateFormatHelper.formatDate(getSampleDate()))));
364364
testDateField.addValueChangeListener(e -> {
365-
boolean hasTime = !getSampleDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate().equals(LocalTime.MIDNIGHT);
366-
if (hasTime) {
367-
testDateField.removeAllValidators();
368-
testDateField.addValidator(
369-
new DateComparisonValidator(
370-
testDateField,
371-
this::getSampleDate,
372-
false,
373-
false,
374-
false,
375-
I18nProperties.getValidationError(
376-
Validations.afterDateWithDate,
377-
testDateField.getCaption(),
378-
I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, SampleDto.SAMPLE_DATE_TIME),
379-
DateFormatHelper.formatLocalDateTime(getSampleDate()))));
365+
boolean hasTime =
366+
getSampleDate() != null && !getSampleDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate().equals(LocalTime.MIDNIGHT);
367+
368+
if (!hasTime) {
369+
return;
380370
}
371+
372+
testDateField.removeAllValidators();
373+
testDateField.addValidator(
374+
new DateComparisonValidator(
375+
testDateField,
376+
this::getSampleDate,
377+
false,
378+
false,
379+
false,
380+
I18nProperties.getValidationError(
381+
Validations.afterDateWithDate,
382+
testDateField.getCaption(),
383+
I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, SampleDto.SAMPLE_DATE_TIME),
384+
DateFormatHelper.formatLocalDateTime(getSampleDate()))));
385+
381386
});
382387
ComboBox lab = addInfrastructureField(PathogenTestDto.LAB);
383388
lab.addItems(FacadeProvider.getFacilityFacade().getAllActiveLaboratories(true));

0 commit comments

Comments
 (0)