Skip to content

Commit a86feee

Browse files
Merge pull request #13643 from SORMAS-Foundation/13395-no-sanity-check-on-date-sample-was-sent
Defect fixes
2 parents b715df4 + cc768d8 commit a86feee

File tree

14 files changed

+114
-18
lines changed

14 files changed

+114
-18
lines changed

sormas-api/src/main/java/de/symeda/sormas/api/Disease.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public enum Disease
7575
INFLUENZA_B(false, true, true, false, false, 0, true, false, false),
7676
H_METAPNEUMOVIRUS(true, false, true, false, false, 0, true, false, false),
7777
RESPIRATORY_SYNCYTIAL_VIRUS(true, false, true, false, false, 0, true, false, false),
78-
PARAINFLUENZA_1_4(true, false, true, false, false, 0, true, false, false),
78+
PARAINFLUENZA_1_4(false, false, true, false, false, 0, true, false, false),
7979
ADENOVIRUS(true, false, true, false, false, 0, true, false, false),
8080
RHINOVIRUS(true, false, true, false, false, 0, true, false, false),
8181
ENTEROVIRUS(true, false, true, false, false, 0, true, false, false),

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,6 +2275,8 @@ public interface Captions {
22752275
String PathogenTest_prescriberPostalCode = "PathogenTest.prescriberPostalCode";
22762276
String PathogenTest_reportDate = "PathogenTest.reportDate";
22772277
String PathogenTest_rifampicinResistant = "PathogenTest.rifampicinResistant";
2278+
String PathogenTest_rsv_testedDiseaseVariant = "PathogenTest.rsv.testedDiseaseVariant";
2279+
String PathogenTest_rsv_testedDiseaseVariantDetails = "PathogenTest.rsv.testedDiseaseVariantDetails";
22782280
String PathogenTest_seroGroupSpecification = "PathogenTest.seroGroupSpecification";
22792281
String PathogenTest_seroGroupSpecificationText = "PathogenTest.seroGroupSpecificationText";
22802282
String PathogenTest_serotype = "PathogenTest.serotype";

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ public enum PathogenTestType {
161161

162162
@Diseases(value = {
163163
Disease.RESPIRATORY_SYNCYTIAL_VIRUS,
164-
Disease.MEASLES })
164+
Disease.MEASLES,
165+
Disease.INVASIVE_PNEUMOCOCCAL_INFECTION,
166+
Disease.INVASIVE_MENINGOCOCCAL_INFECTION })
165167
SEQUENCING,
166168

167169
@Diseases(value = {

sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2525,7 +2525,8 @@ public static SymptomsDto build() {
25252525
UNDEFINED,
25262526
OTHER })
25272527
@HideForCountriesExcept(countries = {
2528-
CountryHelper.COUNTRY_CODE_SWITZERLAND })
2528+
CountryHelper.COUNTRY_CODE_SWITZERLAND,
2529+
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
25292530
@SymptomGrouping(SymptomGroup.GENERAL)
25302531
private SymptomState fatigue;
25312532
@Diseases({

sormas-api/src/main/resources/captions.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ EpiData.caseImportedStatus=Case imported status
11491149
EpiData.clusterRelated=Cluster Related
11501150
EpiData.clusterType=Cluster type
11511151
EpiData.clusterTypeText=Specify cluster type text
1152-
EpiData.modeOfTransmission=Mode of transmission
1152+
EpiData.modeOfTransmission=Suspected main mode of transmission
11531153
EpiData.modeOfTransmissionType= Specify mode of transmission
11541154
EpiData.infectionSource= Suspected vehicle or source of infection
11551155
EpiData.infectionSourceText= Specify source of infection
@@ -1872,6 +1872,7 @@ PathogenTest.pcrTestSpecification=PCR/RT-PCR test specification
18721872
PathogenTest.testTypeText=Specify test details
18731873
PathogenTest.testedDisease=Tested disease
18741874
PathogenTest.testedDiseaseVariant=Tested disease variant
1875+
PathogenTest.rsv.testedDiseaseVariant=Tested disease subtype
18751876
PathogenTest.testedDiseaseDetails=Tested disease name
18761877
PathogenTest.testedPathogen=Tested pathogen
18771878
PathogenTest.testedPathogenDetails=Tested pathogen details
@@ -1884,6 +1885,7 @@ PathogenTest.externalId=External ID
18841885
PathogenTest.reportDate=Report date
18851886
PathogenTest.viaLims=Via LIMS
18861887
PathogenTest.testedDiseaseVariantDetails=Disease variant details
1888+
PathogenTest.rsv.testedDiseaseVariantDetails=Disease subtype details
18871889
PathogenTest.externalOrderId=External order ID
18881890
PathogenTest.preliminary=Preliminary
18891891
PathogenTest.ctValueE=Ct target E

sormas-api/src/main/resources/enum.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -775,9 +775,9 @@ ExposureType.BURIAL=Burial
775775
ExposureType.ANIMAL_CONTACT=Animal Contact
776776
ExposureType.OTHER=Other
777777
ExposureType.UNKNOWN=Unknown
778-
ExposureType.RECREATIONAL_WATER=Exposure to recreational water
779-
ExposureType.FOOD=Exposure to food
780-
ExposureType.SEXUAL_CONTACT=Sexual exposure
778+
ExposureType.RECREATIONAL_WATER=Recreational water
779+
ExposureType.FOOD=Food
780+
ExposureType.SEXUAL_CONTACT=Sexual contact
781781
ExposureType.SYMPTOMATIC_CONTACT=Contact with symptomatic individuals
782782
ExposureType.FLOOD_EXPOSURE=Flooded area
783783

sormas-backend/src/main/resources/sql/sormas_schema.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14820,4 +14820,11 @@ ALTER TABLE symptoms_history ALTER COLUMN timeoffworkdays TYPE float4 USING time
1482014820
ALTER TABLE healthconditions_history DROP COLUMN IF EXISTS immunodepression;
1482114821

1482214822
INSERT INTO schema_version (version_number, comment) VALUES (595, 'RSV issue fixes and minor observations of Giardiasis and Cryptosporidiosis #13540 #13613');
14823+
14824+
-- 2025-10-29 - Included new Disease variant/subtype for RSV #13543
14825+
INSERT INTO customizableenumvalue(id, uuid, changedate, creationdate, datatype, value, caption, diseases)
14826+
VALUES (nextval('entity_seq'), generate_base32_uuid(), now(), now(), 'DISEASE_VARIANT', 'INDETERMINATE', 'Indeterminate',
14827+
'RESPIRATORY_SYNCYTIAL_VIRUS');
14828+
INSERT INTO schema_version (version_number, comment) VALUES (596, 'Included new Disease variant/subtype for RSV #13543');
14829+
1482314830
-- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. ***

sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,10 @@ protected void addFields() {
476476
TextField diseaseVariantDetailsField = addField(CaseDataDto.DISEASE_VARIANT_DETAILS, TextField.class);
477477
diseaseVariantDetailsField.setVisible(false);
478478
diseaseVariantField.setNullSelectionAllowed(true);
479+
if (disease == Disease.RESPIRATORY_SYNCYTIAL_VIRUS) {
480+
diseaseVariantField.setCaption(I18nProperties.getCaption(Captions.PathogenTest_rsv_testedDiseaseVariant));
481+
diseaseVariantDetailsField.setCaption(I18nProperties.getCaption(Captions.PathogenTest_rsv_testedDiseaseVariantDetails));
482+
}
479483
addField(CaseDataDto.DISEASE_DETAILS, TextField.class);
480484
addField(CaseDataDto.PLAGUE_TYPE, NullableOptionGroup.class);
481485
addField(CaseDataDto.DENGUE_FEVER_TYPE, NullableOptionGroup.class);

sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventDataForm.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ protected void addFields() {
259259
EventDto.EVENT_INVESTIGATION_STATUS,
260260
Arrays.asList(EventInvestigationStatus.ONGOING, EventInvestigationStatus.DONE, EventInvestigationStatus.DISCARDED),
261261
true);
262-
DateComparisonValidator.addStartEndValidators(investigationStartDate, investigationEndDate, false);
263-
DateComparisonValidator.addStartEndValidators(startDate, investigationStartDate, false);
262+
DateComparisonValidator.addStartEndValidators(investigationStartDate, investigationEndDate, true);
263+
DateComparisonValidator.addStartEndValidators(startDate, investigationStartDate, true);
264264
TextField title = addField(EventDto.EVENT_TITLE, TextField.class);
265265
title.addStyleName(CssStyles.SOFT_REQUIRED);
266266

sormas-ui/src/main/java/de/symeda/sormas/ui/hospitalization/HospitalizationForm.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,15 @@ protected void addFields() {
247247
initializeAccessAndAllowedAccesses();
248248

249249
if (List.of(Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS).contains(caze.getDisease())) {
250-
FieldHelper
251-
.setRequiredWhenNotNull(getFieldGroup(), HospitalizationDto.ADMITTED_TO_HEALTH_FACILITY, HospitalizationDto.HOSPITALIZATION_REASON);
250+
// Make hospitalization reason required when admitted to health facility or currently hospitalized
251+
admittedToHealthFacilityField.addValueChangeListener(e -> {
252+
YesNoUnknown value = (YesNoUnknown) admittedToHealthFacilityField.getNullableValue();
253+
hospitalizationReason.setRequired(value == YesNoUnknown.YES);
254+
});
255+
currentlyHospitalizedField.addValueChangeListener(e -> {
256+
YesNoUnknown value = (YesNoUnknown) currentlyHospitalizedField.getNullableValue();
257+
hospitalizationReason.setRequired(value == YesNoUnknown.YES);
258+
});
252259
durationOfHospitalization.setVisible(true);
253260
}
254261

0 commit comments

Comments
 (0)