Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
ec89022
IMPLEMENTS: #13832: External Survey Integration (NgSurvey).
Pa-Touche Feb 18, 2026
ad4c38f
missing translation message
Pa-Touche Feb 18, 2026
37a4960
prepared patch-api
Pa-Touche Feb 19, 2026
cc030af
Prepared registries.
Pa-Touche Feb 19, 2026
f9c146b
Added comments and placeholders.
Pa-Touche Feb 19, 2026
8f2f262
continued preparation.
Pa-Touche Feb 19, 2026
772df3b
Added some mapper implementations
Pa-Touche Feb 20, 2026
ab4bdf6
Added some mapper mapper implementations
Pa-Touche Feb 20, 2026
332d100
Added some todos: added replacement type check.
Pa-Touche Feb 20, 2026
5231cb4
TODO: prepare ReferenceData code
Pa-Touche Feb 20, 2026
1f5affc
imagined single source to fetch referenceData. To check if this is ad…
Pa-Touche Feb 20, 2026
c991e46
Continued patching logic
Pa-Touche Feb 23, 2026
7fcc124
Minor enhancements for tests.
Pa-Touche Feb 23, 2026
44d5005
Minor enhancements for tests.
Pa-Touche Feb 23, 2026
c031858
added checks
Pa-Touche Feb 24, 2026
262016f
after discussion with xavier
Pa-Touche Feb 24, 2026
97e68cb
Added disease handling on patching.
Pa-Touche Feb 25, 2026
ac35c96
Integrated visibility checkers logic
Pa-Touche Feb 25, 2026
f126bd5
Added feature checker to be complete
Pa-Touche Feb 26, 2026
8a9455a
java enums can be patched
Pa-Touche Feb 26, 2026
c937ab4
CustomEnums a hack
Pa-Touche Feb 26, 2026
43792f2
Added naive implementation of reference search
Pa-Touche Feb 26, 2026
2cddd50
now all tests except non-defautl custom enum works.
Pa-Touche Feb 26, 2026
7a8b678
♻️ enhanced error messages
Pa-Touche Feb 26, 2026
17e829c
Supporting multiple fields + custom enum defaults
Pa-Touche Feb 26, 2026
41db295
♻️ added request to patcher to allow more config
Pa-Touche Feb 26, 2026
c184c3a
languages are now taken into account from input
Pa-Touche Feb 26, 2026
7d8fdd8
minor enhancements: code coverage / javaDoc etc.
Pa-Touche Feb 27, 2026
c4f5940
♻️ reduced size of methods
Pa-Touche Feb 27, 2026
41e0fc9
✨ add handling for partial update
Pa-Touche Feb 27, 2026
d6ead1c
♻️ before adding path alias helper. CaseDataPatcherImpl are (almost a…
Pa-Touche Feb 27, 2026
a735413
♻️ refactored code
Pa-Touche Mar 2, 2026
84434f4
✨ integrated alias usage
Pa-Touche Mar 2, 2026
8f58794
🚧 PartialRetrieval logic
Pa-Touche Mar 2, 2026
05483e0
🚧 prepared somewhat logic for RSV
Pa-Touche Mar 4, 2026
f7204b8
📝 added explanation how to implement the GroupedFieldsMapper logic. N…
Pa-Touche Mar 4, 2026
143d3d6
drafted impl
Pa-Touche Mar 5, 2026
51540d3
integrated api doesn't break anything for now, to see how it goes
Pa-Touche Mar 5, 2026
9a0f4bc
🚧: WIP: started groupedFields impl.
Pa-Touche Mar 5, 2026
642c922
before changing branch, does not build
Pa-Touche Mar 5, 2026
ec675d6
now using BusinessDtoFacade to have a single entry
Pa-Touche Mar 9, 2026
eab9db4
naive vaccination implementation
Pa-Touche Mar 10, 2026
540e59f
✨🚧 naive mother vaccination implementation
Pa-Touche Mar 10, 2026
9452b3c
✅ ignored null value
Pa-Touche Mar 10, 2026
475b840
Started boilerplate for ExternalMessage-API.
Pa-Touche Mar 11, 2026
4a14b43
✅ broken tests due to missing permission
Pa-Touche Mar 11, 2026
d905100
Preparing partial retrieve.
Pa-Touche Mar 12, 2026
896d7e0
🚧 preparing partial retrieval.
Pa-Touche Mar 12, 2026
da97e95
✨ added TypeToDisplayValueMappers.
Pa-Touche Mar 12, 2026
458f134
🐛 Displaying values in nice format works now.
Pa-Touche Mar 13, 2026
9d48180
♻️ registry mapped type
Pa-Touche Mar 13, 2026
c62e941
♻️ registry mapped type. Added failure for invalid path type
Pa-Touche Mar 13, 2026
9bcbc64
before breaking partial retriever
Pa-Touche Mar 13, 2026
69fb179
in my understanding works as it should
Pa-Touche Mar 13, 2026
aedb4e4
♻️📝 minor API enhancements
Pa-Touche Mar 16, 2026
5fe7e6d
🚧 Added symptoms in SymptomsDto only for now.
Pa-Touche Mar 17, 2026
fd6b197
🚧 ✨ : naive UI implementation for processing external messages of typ…
Pa-Touche Mar 17, 2026
cb57f53
📝 missing javadoc
Pa-Touche Mar 17, 2026
dd1a725
💬 translated failure causes
Pa-Touche Mar 17, 2026
a9d0bf5
Added symptoms mapping
Pa-Touche Mar 17, 2026
b3d8126
cleanup
Pa-Touche Mar 17, 2026
36cba46
✨ respect skip if already processed during cron
Pa-Touche Mar 17, 2026
c5738fd
✨ display of questionnaire results
Pa-Touche Mar 17, 2026
45e5309
💡cleanup and minor enhancements
Pa-Touche Mar 17, 2026
bd659d1
reverting format
Pa-Touche Mar 18, 2026
81a6f51
single caption change
Pa-Touche Mar 18, 2026
d7e3edb
merge development
Pa-Touche Mar 18, 2026
00a1947
💡cleanup and minor enhancements
Pa-Touche Mar 18, 2026
582b665
Added missing external survey respondent ID into UI
Pa-Touche Apr 22, 2026
8ca1d5e
Merge branch 'development' of https://github.com/SORMAS-Foundation/SO…
Pa-Touche Apr 22, 2026
3576647
External Message row is produced, but:
Pa-Touche Apr 23, 2026
e3e8ef7
FIX serializable issue
Pa-Touche Apr 24, 2026
e0f1658
ExternalMessages are displayed **BUT** for every fetch a new message …
Pa-Touche Apr 24, 2026
4815c4c
ability to display Case info in external messages
Pa-Touche Apr 24, 2026
ad614c3
Current values are now successfully displayed
Pa-Touche Apr 27, 2026
6ebfab7
fixes:
Pa-Touche Apr 27, 2026
5c71601
Handled downloading of survey request / ignore option for some fields
Pa-Touche Apr 27, 2026
e82a009
missing captions
Pa-Touche Apr 27, 2026
55068f9
Handled downloading of survey request / ignore option for some fields
Pa-Touche Apr 27, 2026
76b7fc0
removed / enhanced warning popups
Pa-Touche Apr 27, 2026
a87522b
enhanced processing display
Pa-Touche Apr 27, 2026
50c918d
Fixing DEMO-comments
Pa-Touche Apr 29, 2026
011b103
Showing excluded fields within modal and within download
Pa-Touche Apr 29, 2026
3ae1690
Fixed optimistic locking exception
Pa-Touche Apr 29, 2026
62dd085
enhanced display name of fields to use the alias
Pa-Touche Apr 29, 2026
5520493
fixed test
Apr 30, 2026
0ddee0e
preparing systemconfig usage
Pa-Touche Apr 30, 2026
1b86a1c
translation files
Pa-Touche Apr 30, 2026
ca8842a
fixing unit tests
Apr 30, 2026
745b52f
Prepared code to retrieve field with specific handling.
Apr 30, 2026
a8db1b5
✨ displaying of person contact details: phone and email
May 1, 2026
2a30467
✅ remaining broken unit tests
May 1, 2026
fa00717
🐛 empty contact details displaying null; Otherwise displaying works o…
Pa-Touche May 3, 2026
4b5506a
🐛 multiple messages couldn't be fetched: missing comparable - invalid…
Pa-Touche May 4, 2026
47e3e4f
🐛 personContact details path
Pa-Touche May 4, 2026
898ba01
🐛 catching retrieval exception to always display something: some fiel…
Pa-Touche May 4, 2026
8fa93cb
🐛 minor issues.
Pa-Touche May 4, 2026
47dfc98
🐛 NPE
Pa-Touche May 5, 2026
b6c8ad7
🐛✅ Do not add duplicate contactInfo details
Pa-Touche May 5, 2026
ebbacae
Merge remote-tracking branch 'origin/feat/13832-ngsurvey-integration-…
Pa-Touche May 5, 2026
d198be3
♻️ Alias using references to avoid 'magic-strings'
Pa-Touche May 5, 2026
315cdac
✨ Added new section to be able to distinguish among different survey …
Pa-Touche May 5, 2026
ae3b4a9
💬 enhanced value display
Pa-Touche May 5, 2026
c1f27a0
💬 missing external ID translation
Pa-Touche May 6, 2026
445a46f
♻️ Simplified survey display
Pa-Touche May 6, 2026
fbf8780
✨ Added registry for Equality check: consider java.util.Date to equal
Pa-Touche May 6, 2026
ec2fc97
🔥 Grouped field mapping strategy
Pa-Touche May 6, 2026
8ca2433
📝 added todos for Vaccination handling
Pa-Touche May 6, 2026
777bed6
♻️ BusinessDtoFacade allowing creation of new elements
Pa-Touche May 7, 2026
76f5480
✅ same day Date patching
Pa-Touche May 7, 2026
269e845
♻️ Cleanup before trying to refactor data patcher to be similar to re…
Pa-Touche May 7, 2026
db631d4
♻️ Unified "entity" storage in patcher
Pa-Touche May 7, 2026
d448ac3
🚧 prepared storing vaccinations
Pa-Touche May 7, 2026
9e91187
🚧 prepared leaf-linked entities for storage
Pa-Touche May 7, 2026
c1ec22e
✨ Patching single vaccination and single immunization.
Pa-Touche May 7, 2026
6daed72
✅ Validated hospitalization patching
Pa-Touche May 7, 2026
da9647b
♻️ Added registry for leaf elements to make it more readable and less…
Pa-Touche May 7, 2026
dec43b7
✅ Validated Exposure and ActivityAsCase
Pa-Touche May 7, 2026
885dab5
✨ PreviousHospitalization
Pa-Touche May 7, 2026
f9527e2
♻️ MR-comments enhancements. Code coverage
Pa-Touche May 9, 2026
0a88108
♻️ data patcher, created helper class to ease readability
Pa-Touche May 9, 2026
10051da
Missing translations
Pa-Touche May 11, 2026
9db6a87
Merge branch 'feat/13832-ngsurvey-integration-external-api' of https:…
Pa-Touche May 11, 2026
c52a719
✨: FEAT: Allowing overriding of newly created DTOs to override defaul…
Pa-Touche May 11, 2026
3a26abb
fixing self PR-review comments
Pa-Touche May 11, 2026
84e0546
self review-mr comments
Pa-Touche May 12, 2026
a927df5
missing test
Pa-Touche May 12, 2026
18d564d
continued self review
Pa-Touche May 12, 2026
35e4986
enhancements
Pa-Touche May 12, 2026
f34e18c
fix hardcoded translations
Pa-Touche May 12, 2026
dbe3977
merge development
Pa-Touche May 12, 2026
b4da2d8
merged sql migrations
Pa-Touche May 12, 2026
cf9b9c4
Fixed broken unit tests
Pa-Touche May 12, 2026
4411fb2
revert formatting
Pa-Touche May 12, 2026
ba77f2f
revert changes
Pa-Touche May 12, 2026
d1bf9cb
README format revert
Pa-Touche May 12, 2026
061dd30
🐛 removed "encrypted" system-config values
Pa-Touche May 12, 2026
0f698e0
fixed broken tests
Pa-Touche May 13, 2026
fcc92f8
missing history columns
Pa-Touche May 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/Disease.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

import com.google.common.collect.ImmutableSet;

import de.symeda.sormas.api.i18n.I18nProperties;
import de.symeda.sormas.api.statistics.StatisticsGroupingKey;
Expand Down Expand Up @@ -95,6 +99,12 @@ public enum Disease
OTHER(true, true, true, false, true, 21, false, false, false, false, 0, 0),
UNDEFINED(true, true, true, false, true, 0, false, false, false, false, 0, 0);

/**
* Immutable that eager loads all available diseases.
*/
public static final Set<Disease> ALL_DISEASES =
Arrays.stream(Disease.values()).collect(Collectors.collectingAndThen(Collectors.toSet(), ImmutableSet::copyOf));

private final boolean defaultActive;
private final boolean defaultPrimary;
private final boolean defaultCaseSurveillanceEnabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
import de.symeda.sormas.api.specialcaseaccess.SpecialCaseAccessFacade;
import de.symeda.sormas.api.survey.SurveyFacade;
import de.symeda.sormas.api.survey.SurveyTokenFacade;
import de.symeda.sormas.api.survey.alias.PathAliasFacade;
import de.symeda.sormas.api.symptoms.SymptomsFacade;
import de.symeda.sormas.api.systemconfiguration.SystemConfigurationCategoryFacade;
import de.symeda.sormas.api.systemconfiguration.SystemConfigurationValueFacade;
Expand Down Expand Up @@ -319,6 +320,10 @@ public static PrescriptionFacade getPrescriptionFacade() {
return get().lookupEjbRemote(PrescriptionFacade.class);
}

public static PathAliasFacade getPathAliasFacade() {
return get().lookupEjbRemote(PathAliasFacade.class);
}

public static TreatmentFacade getTreatmentFacade() {
return get().lookupEjbRemote(TreatmentFacade.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ public String getString(String key, String defaultValue) {
public String getString(String key) {
return getString(key, null);
}

public java.util.ResourceBundle getResourceBundle() {
return resourceBundle;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
package de.symeda.sormas.api.caze;

import de.symeda.sormas.api.i18n.I18nProperties;
import de.symeda.sormas.api.patch.mapping.ValueMapperDefault;

public enum InfectionSetting {

@ValueMapperDefault
UNKNOWN(null),
AMBULATORY(null),
MEDICAL_PRACTICE(AMBULATORY),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
package de.symeda.sormas.api.caze;

import de.symeda.sormas.api.i18n.I18nProperties;
import de.symeda.sormas.api.patch.mapping.ValueMapperDefault;

public enum QuarantineReason {

IDENTIFIED_BY_CONTACT_TRACING,
ENTRY_FROM_RISK_AREA,
SWISS_COVID_APP_NOTIFICATION,
OUTBREAK_INVESTIGATION,
@ValueMapperDefault
OTHER_REASON;

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package de.symeda.sormas.api.caze;

import de.symeda.sormas.api.i18n.I18nProperties;
import de.symeda.sormas.api.patch.mapping.ValueMapperDefault;

public enum Trimester {

FIRST,
SECOND,
THIRD,
@ValueMapperDefault
UNKNOWN;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public class HealthConditionsDto extends PseudonymizableDto {
private YesNoUnknown hivArt;
private YesNoUnknown chronicLiverDisease;
private YesNoUnknown malignancyChemotherapy;

//TODO: rename ? general heart issue
@HideForCountries(countries = {
CountryHelper.COUNTRY_CODE_GERMANY,
CountryHelper.COUNTRY_CODE_SWITZERLAND })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.Date;
import java.util.List;

import javax.annotation.Nullable;
import javax.validation.constraints.Size;

import de.symeda.sormas.api.CountryHelper;
Expand All @@ -33,6 +34,7 @@
import de.symeda.sormas.api.disease.DiseaseVariant;
import de.symeda.sormas.api.exposure.ModeOfTransmission;
import de.symeda.sormas.api.externalmessage.labmessage.SampleReportDto;
import de.symeda.sormas.api.externalmessage.survey.ExternalSurveyResponseData;
import de.symeda.sormas.api.feature.FeatureType;
import de.symeda.sormas.api.i18n.Validations;
import de.symeda.sormas.api.infrastructure.country.CountryReferenceDto;
Expand Down Expand Up @@ -206,6 +208,10 @@ public class ExternalMessageDto extends SormasToSormasShareableDto {
private String externalMessageDetails;
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
private String caseComments;

/**
* Used as deduplication key for {@link ExternalMessageType#SURVEY_RESPONSE}.
*/
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
private String reportId;

Expand Down Expand Up @@ -279,6 +285,12 @@ public class ExternalMessageDto extends SormasToSormasShareableDto {
private ModeOfTransmission modeOfTransmission;
private String modeOfTransmissionType;

/**
* Will only be present for: {@link ExternalMessageType#SURVEY_RESPONSE} to represent the pair.
*/
@Nullable
private ExternalSurveyResponseData surveyResponseData;

public ExternalMessageType getType() {
return type;
}
Expand Down Expand Up @@ -1020,4 +1032,14 @@ public String getModeOfTransmissionType() {
public void setModeOfTransmissionType(String modeOfTransmissionType) {
this.modeOfTransmissionType = modeOfTransmissionType;
}

@Nullable
public ExternalSurveyResponseData getSurveyResponseData() {
return surveyResponseData;
}

public ExternalMessageDto setSurveyResponseData(@Nullable ExternalSurveyResponseData surveyResponseData) {
this.surveyResponseData = surveyResponseData;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.annotation.Nullable;
import javax.ejb.Remote;
import javax.naming.NamingException;
import javax.validation.Valid;
Expand All @@ -11,6 +13,7 @@
import de.symeda.sormas.api.ReferenceDto;
import de.symeda.sormas.api.caze.surveillancereport.SurveillanceReportReferenceDto;
import de.symeda.sormas.api.common.Page;
import de.symeda.sormas.api.patch.partial_retrieval.DisplayablePartialRetrievalResponse;
import de.symeda.sormas.api.sample.SampleReferenceDto;
import de.symeda.sormas.api.user.UserReferenceDto;
import de.symeda.sormas.api.utils.SortProperty;
Expand All @@ -22,6 +25,19 @@ public interface ExternalMessageFacade extends PermanentlyDeletableFacade {

ExternalMessageDto saveAndProcessLabmessage(@Valid ExternalMessageDto dto);

/**
* Will attempt to fetch and refresh.
*
* @param since
* if not specified
* @return external messages that have been saved.
*/
List<ExternalMessageDto> saveAndProcessSurveyResponses(@Nullable Date since);

default List<ExternalMessageDto> saveAndProcessSurveyResponses() {
return saveAndProcessSurveyResponses(null);
}

void validate(ExternalMessageDto dto);

// Also returns deleted lab messages
Expand Down Expand Up @@ -70,4 +86,25 @@ public interface ExternalMessageFacade extends PermanentlyDeletableFacade {
boolean existsForwardedExternalMessageWith(String reportId);

ExternalMessageDto getForSurveillanceReport(SurveillanceReportReferenceDto surveillanceReport);

/**
* Re-submits a survey response with a corrected patch dictionary after previous processing failures.
*
* @param uuid
* UUID of the external message (must be of type SURVEY_RESPONSE)
* @param correctedDictionary
* the corrected field path -> value map to apply
* @return updated ExternalMessageDto after reprocessing
*/
ExternalMessageDto overwriteSurveyResponse(String uuid, Map<String, Object> correctedDictionary);

/**
* Retrieves display-ready field information (translated names and current case values) for all fields
* in the survey response patch dictionary. Used by the UI to render the detail/editor windows.
*
* @param externalMessageUuid
* UUID of the external message (must be of type SURVEY_RESPONSE with a processed result)
* @return displayable field info keyed by field path
*/
DisplayablePartialRetrievalResponse fetchSurveyResponseFieldsForDisplay(String externalMessageUuid);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
public enum ExternalMessageType {

LAB_MESSAGE,
PHYSICIANS_REPORT;
PHYSICIANS_REPORT,
SURVEY_RESPONSE;

@Override
public String toString() {
Expand Down
Loading
Loading