Skip to content

Commit 6771f4b

Browse files
committed
Register SALMONELLOSIS disease + base configuration
1 parent 5ba0cd0 commit 6771f4b

3 files changed

Lines changed: 36 additions & 18 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public enum Disease
9090
INVASIVE_MENINGOCOCCAL_INFECTION(true, true, true, false, true, 7, false, false, false, true, 1, 10),
9191
GIARDIASIS(true, true, true, false, true, 14, false, false, false, true, 7, 21),
9292
CRYPTOSPORIDIOSIS(true, true, true, false, true, 14, false, false, false, true, 2, 12),
93+
SALMONELLOSIS(true, true, true, false, true, 14, false, false, false, true, 1, 3),
9394
OTHER(true, true, true, false, true, 21, false, false, false, false, 0, 0),
9495
UNDEFINED(true, true, true, false, true, 0, false, false, false, false, 0, 0);
9596

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,7 @@ Disease.POST_IMMUNIZATION_ADVERSE_EVENTS_SEVERE = Post-immunization adverse even
578578
Disease.FHA = FHA (Functional Hypothalamic Amenorrhea)
579579
Disease.GIARDIASIS=Giardiasis
580580
Disease.CRYPTOSPORIDIOSIS=Cryptosporidiosis
581+
Disease.SALMONELLOSIS=Salmonellosis
581582
Disease.Short.AFP = AFP
582583
Disease.Short.CHOLERA = Cholera
583584
Disease.Short.CONGENITAL_RUBELLA = CRS
@@ -644,6 +645,7 @@ Disease.Short.INVASIVE_PNEUMOCOCCAL_INFECTION = IPI
644645
Disease.Short.INVASIVE_MENINGOCOCCAL_INFECTION = IMI
645646
Disease.Short.GIARDIASIS=Giardia
646647
Disease.Short.CRYPTOSPORIDIOSIS=Cryptosporidiosis
648+
Disease.Short.SALMONELLOSIS=Salmonellosis
647649

648650
DiseaseTransmissionMode.HUMAN_TO_HUMAN = Primarily via human to human
649651
DiseaseTransmissionMode.ANIMAL = Primarily via animal
@@ -3091,4 +3093,4 @@ AnimalCategory.WILD=Wild
30913093

30923094
# FomiteTransmissionLocation
30933095
FomiteTransmissionLocation.INSIDE_HOME=Inside home
3094-
FomiteTransmissionLocation.OUTSIDE=Outside
3096+
FomiteTransmissionLocation.OUTSIDE=Outside

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

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15513,11 +15513,11 @@ ALTER TABLE testreport ADD COLUMN IF NOT EXISTS serotypetext varchar(255);
1551315513
UPDATE testreport SET serotypetext = serotype, serotype = 'OTHER' WHERE serotype IS NOT null and serotypetext is null;
1551415514
DO $$
1551515515
BEGIN
15516-
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'testreport' AND column_name = 'genotyperesult')
15516+
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'testreport' AND column_name = 'genotyperesult')
1551715517
AND NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'testreport' AND column_name = 'genotype') THEN
1551815518
ALTER TABLE testreport RENAME COLUMN genotyperesult TO genotype;
1551915519
END IF;
15520-
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'testreport' AND column_name = 'genotyperesulttext')
15520+
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'testreport' AND column_name = 'genotyperesulttext')
1552115521
AND NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'testreport' AND column_name = 'genotypetext') THEN
1552215522
ALTER TABLE testreport RENAME COLUMN genotyperesulttext TO genotypetext;
1552315523
END IF;
@@ -15527,11 +15527,11 @@ ALTER TABLE testreport_history ADD COLUMN IF NOT EXISTS serotypetext varchar(255
1552715527
UPDATE testreport_history SET serotypetext = serotype, serotype = 'OTHER' WHERE serotype IS NOT null and serotypetext is null;
1552815528
DO $$
1552915529
BEGIN
15530-
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'testreport_history' AND column_name = 'genotyperesult')
15530+
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'testreport_history' AND column_name = 'genotyperesult')
1553115531
AND NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'testreport_history' AND column_name = 'genotype') THEN
1553215532
ALTER TABLE testreport_history RENAME COLUMN genotyperesult TO genotype;
1553315533
END IF;
15534-
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'testreport_history' AND column_name = 'genotyperesulttext')
15534+
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'testreport_history' AND column_name = 'genotyperesulttext')
1553515535
AND NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'testreport_history' AND column_name = 'genotypetext') THEN
1553615536
ALTER TABLE testreport_history RENAME COLUMN genotyperesulttext TO genotypetext;
1553715537
END IF;
@@ -15598,20 +15598,20 @@ CREATE TABLE IF NOT EXISTS customizablefieldmetadata (
1559815598

1559915599
change_user_id bigint,
1560015600
sys_period tstzrange NOT NULL,
15601-
15601+
1560215602
PRIMARY KEY (id),
1560315603
UNIQUE(name, contextClass)
1560415604
);
1560515605

15606-
CREATE INDEX idx_customizablefieldmetadata_uuid
15606+
CREATE INDEX idx_customizablefieldmetadata_uuid
1560715607
ON customizablefieldmetadata (uuid);
15608-
CREATE INDEX idx_customizablefieldmetadata_contextClass
15608+
CREATE INDEX idx_customizablefieldmetadata_contextClass
1560915609
ON customizablefieldmetadata (contextClass);
15610-
CREATE INDEX idx_customizablefieldmetadata_uiGroup
15610+
CREATE INDEX idx_customizablefieldmetadata_uiGroup
1561115611
ON customizablefieldmetadata (uiGroup);
15612-
CREATE INDEX idx_customizablefieldmetadata_active
15612+
CREATE INDEX idx_customizablefieldmetadata_active
1561315613
ON customizablefieldmetadata (active);
15614-
CREATE INDEX idx_customizablefieldmetadata_deleted
15614+
CREATE INDEX idx_customizablefieldmetadata_deleted
1561515615
ON customizablefieldmetadata (deleted);
1561615616

1561715617
ALTER TABLE customizablefieldmetadata OWNER TO sormas_user;
@@ -15662,20 +15662,20 @@ CREATE TABLE IF NOT EXISTS customizablefieldvalue (
1566215662

1566315663
change_user_id bigint,
1566415664
sys_period tstzrange NOT NULL,
15665-
15665+
1566615666
PRIMARY KEY (id),
1566715667
UNIQUE(customizablefieldmetadata_id, entityUuid, contextClass)
1566815668
);
1566915669

15670-
CREATE INDEX idx_customizablefieldvalue_uuid
15670+
CREATE INDEX idx_customizablefieldvalue_uuid
1567115671
ON customizablefieldvalue (uuid);
15672-
CREATE INDEX idx_customizablefieldvalue_entityUuid
15672+
CREATE INDEX idx_customizablefieldvalue_entityUuid
1567315673
ON customizablefieldvalue (entityUuid);
15674-
CREATE INDEX idx_customizablefieldvalue_contextEntity
15674+
CREATE INDEX idx_customizablefieldvalue_contextEntity
1567515675
ON customizablefieldvalue (contextClass, entityUuid);
15676-
CREATE INDEX idx_customizablefieldvalue_fieldMetadata
15676+
CREATE INDEX idx_customizablefieldvalue_fieldMetadata
1567715677
ON customizablefieldvalue (customizablefieldmetadata_id);
15678-
CREATE INDEX idx_customizablefieldvalue_deleted
15678+
CREATE INDEX idx_customizablefieldvalue_deleted
1567915679
ON customizablefieldvalue (deleted);
1568015680

1568115681
ALTER TABLE customizablefieldvalue ADD CONSTRAINT fk_change_user_id FOREIGN KEY (change_user_id) REFERENCES users (id);
@@ -15822,4 +15822,19 @@ ALTER TABLE externalmessage_history ADD COLUMN healthcareprofessional varchar(25
1582215822
ALTER TABLE externalmessage_history ADD COLUMN modeoftransmission varchar(255);
1582315823
ALTER TABLE externalmessage_history ADD column modeoftransmissiontype varchar(255);
1582415824
INSERT INTO schema_version (version_number, comment) VALUES (624, '#13838, #13837, #13835, #13836 - Malaria and Dengue Doctors declaration and lab messages changes');
15825-
-- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. ***
15825+
15826+
-- 2026-04-27 Salmonellosis disease configuration (Luxembourg) #13915
15827+
-- The diseaseconfiguration row for SALMONELLOSIS is created by createMissingDiseaseConfigurations() at startup,
15828+
-- which runs after this migration. Insert a row up-front so the UPDATE applies on the first deployment.
15829+
INSERT INTO diseaseconfiguration (id, uuid, changedate, creationdate, disease)
15830+
SELECT nextval('entity_seq'),
15831+
upper(substring(CAST(CAST(md5(CAST(random() AS text) || CAST(clock_timestamp() AS text)) AS uuid) AS text), 3, 29)),
15832+
now(), now(), 'SALMONELLOSIS'
15833+
WHERE NOT EXISTS (SELECT 1 FROM diseaseconfiguration WHERE disease = 'SALMONELLOSIS');
15834+
15835+
UPDATE diseaseconfiguration
15836+
SET exposurecategories = 'FOOD_BORNE,WATER_BORNE,ANIMAL_CONTACT,DIRECT_CONTACT'
15837+
WHERE disease = 'SALMONELLOSIS';
15838+
15839+
INSERT INTO schema_version (version_number, comment) VALUES (625, '#13915 - Salmonellosis disease configuration');
15840+
-- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. ***

0 commit comments

Comments
 (0)