Skip to content

Commit 55679f6

Browse files
authored
Merge pull request #13785 from SORMAS-Foundation/feature-13771-epipulse-measles-export
Feature 13771 epipulse measles export
2 parents cef2068 + c97279a commit 55679f6

21 files changed

Lines changed: 2771 additions & 518 deletions

sormas-api/src/main/java/de/symeda/sormas/api/epipulse/EpipulseDiseaseExportEntryDto.java

Lines changed: 285 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,27 @@ public class EpipulseDiseaseExportEntryDto {
8282
private List<EpipulseImmunizationCheckDto> immunizations;
8383
private List<EpipulseVaccinationCheckDto> vaccinations;
8484

85+
// MEAS-specific laboratory fields (can be mapped from existing SORMAS data)
86+
private Date dateOfSpecimen;
87+
private Date dateOfLaboratoryResult;
88+
private List<String> typeOfSpecimenCollected; // SampleMaterial mapped to EpiPulse codes (repeatable)
89+
private String resultOfVirusDetection; // PathogenTestResultType mapped to POS/NEG/EQUI/NOTEST
90+
private String genotype; // PathogenTest typingId/genoTypeResult
91+
private List<String> typeOfSpecimenSerology; // SampleMaterial for serology tests (repeatable)
92+
private String resultIgG; // IgG test result
93+
private String resultIgM; // IgM test result
94+
95+
// Phase 3: Clinical and epidemiology fields (mapped from existing SORMAS data)
96+
private Date dateOfInvestigation; // CaseDataDto.investigatedDate
97+
private Boolean clusterRelated; // EpiDataDto.clusterRelated
98+
private String clusterIdentification; // EpiDataDto.clusterTypeText
99+
private List<String> clusterSetting; // EpiDataDto.clusterType mapped to EpiPulse codes (repeatable)
100+
private String importedStatus; // EpiDataDto.caseImportedStatus mapped to EpiPulse codes
101+
private List<String> complicationDiagnosis; // SymptomsDto complications (repeatable)
102+
private Boolean clinicalCriteriaStatus; // Derived from CaseDataDto.clinicalConfirmation
103+
private List<String> placeOfInfection; // EpiDataDto.exposures locations (repeatable)
104+
private String causeOfDeath; // PersonDto.causeOfDeathDetails
105+
85106
public String getReportingCountry() {
86107
return reportingCountry;
87108
}
@@ -326,6 +347,70 @@ public void setVaccinations(List<EpipulseVaccinationCheckDto> vaccinations) {
326347
this.vaccinations = vaccinations;
327348
}
328349

350+
public Date getDateOfSpecimen() {
351+
return dateOfSpecimen;
352+
}
353+
354+
public void setDateOfSpecimen(Date dateOfSpecimen) {
355+
this.dateOfSpecimen = dateOfSpecimen;
356+
}
357+
358+
public Date getDateOfLaboratoryResult() {
359+
return dateOfLaboratoryResult;
360+
}
361+
362+
public void setDateOfLaboratoryResult(Date dateOfLaboratoryResult) {
363+
this.dateOfLaboratoryResult = dateOfLaboratoryResult;
364+
}
365+
366+
public List<String> getTypeOfSpecimenCollected() {
367+
return typeOfSpecimenCollected;
368+
}
369+
370+
public void setTypeOfSpecimenCollected(List<String> typeOfSpecimenCollected) {
371+
this.typeOfSpecimenCollected = typeOfSpecimenCollected;
372+
}
373+
374+
public String getResultOfVirusDetection() {
375+
return resultOfVirusDetection;
376+
}
377+
378+
public void setResultOfVirusDetection(String resultOfVirusDetection) {
379+
this.resultOfVirusDetection = resultOfVirusDetection;
380+
}
381+
382+
public String getGenotype() {
383+
return genotype;
384+
}
385+
386+
public void setGenotype(String genotype) {
387+
this.genotype = genotype;
388+
}
389+
390+
public List<String> getTypeOfSpecimenSerology() {
391+
return typeOfSpecimenSerology;
392+
}
393+
394+
public void setTypeOfSpecimenSerology(List<String> typeOfSpecimenSerology) {
395+
this.typeOfSpecimenSerology = typeOfSpecimenSerology;
396+
}
397+
398+
public String getResultIgG() {
399+
return resultIgG;
400+
}
401+
402+
public void setResultIgG(String resultIgG) {
403+
this.resultIgG = resultIgG;
404+
}
405+
406+
public String getResultIgM() {
407+
return resultIgM;
408+
}
409+
410+
public void setResultIgM(String resultIgM) {
411+
this.resultIgM = resultIgM;
412+
}
413+
329414
public String getDiseaseForCsv() {
330415
return EpipulseDiseaseRef.getBySubjectCode(subjectCode).name();
331416
}
@@ -365,6 +450,7 @@ public String getAgeForCsv() {
365450
public String getAgeMonthForCsv() {
366451
switch (subjectCode) {
367452
case PERT:
453+
case MEAS:
368454
if (ageYears != null && ageYears < 2) {
369455
return ageMonths == null ? null : ageMonths.toString();
370456
}
@@ -384,6 +470,7 @@ public String getGenderForCsv() {
384470
public String getPlaceOfResidenceForCsv() {
385471
switch (subjectCode) {
386472
case PERT:
473+
case MEAS:
387474
if (addressCommunityNutsCode != null && !addressCommunityNutsCode.isEmpty()) {
388475
return addressCommunityNutsCode;
389476
} else if (addressDistrictNutsCode != null && !addressDistrictNutsCode.isEmpty()) {
@@ -400,6 +487,7 @@ public String getPlaceOfResidenceForCsv() {
400487
public String getPlaceOfNotificationForCsv() {
401488
switch (subjectCode) {
402489
case PERT:
490+
case MEAS:
403491
if (responsibleCommunityNutsCode != null && !responsibleCommunityNutsCode.isEmpty()) {
404492
return responsibleCommunityNutsCode;
405493
} else if (responsibleDistrictNutsCode != null && !responsibleDistrictNutsCode.isEmpty()) {
@@ -529,6 +617,203 @@ public String getGestationalAgeAtVaccinationForCsv() {
529617
return null;
530618
}
531619

620+
// MEAS-specific laboratory field CSV getters
621+
public String getDateOfSpecimenForCsv() {
622+
return formatDateForCsv(dateOfSpecimen);
623+
}
624+
625+
public String getDateOfLaboratoryResultForCsv() {
626+
return formatDateForCsv(dateOfLaboratoryResult);
627+
}
628+
629+
public List<String> getTypeOfSpecimenCollectedForCsv(int maxSpecimenVirDetect) {
630+
// Repeatable field - return list padded to max length
631+
List<String> specimens = new ArrayList<>();
632+
for (int i = 0; i < maxSpecimenVirDetect; i++) {
633+
if (typeOfSpecimenCollected != null && i < typeOfSpecimenCollected.size()) {
634+
specimens.add(typeOfSpecimenCollected.get(i));
635+
} else {
636+
specimens.add("");
637+
}
638+
}
639+
return specimens;
640+
}
641+
642+
public String getResultOfVirusDetectionForCsv() {
643+
// Already mapped to EpiPulse codes (POS/NEG/EQUI/NOTEST)
644+
return resultOfVirusDetection;
645+
}
646+
647+
public String getGenotypeForCsv() {
648+
// Already mapped to EpiPulse genotype codes (MEASV_A, MEASV_B1, etc.)
649+
return genotype;
650+
}
651+
652+
public List<String> getTypeOfSpecimenSerologyForCsv(int maxSpecimenSero) {
653+
// Repeatable field - return list padded to max length
654+
List<String> specimens = new ArrayList<>();
655+
for (int i = 0; i < maxSpecimenSero; i++) {
656+
if (typeOfSpecimenSerology != null && i < typeOfSpecimenSerology.size()) {
657+
specimens.add(typeOfSpecimenSerology.get(i));
658+
} else {
659+
specimens.add("");
660+
}
661+
}
662+
return specimens;
663+
}
664+
665+
public String getResultIgGForCsv() {
666+
// Already mapped to EpiPulse codes (POS/NEG/EQUI/NOTEST)
667+
return resultIgG;
668+
}
669+
670+
public String getResultIgMForCsv() {
671+
// Already mapped to EpiPulse codes (POS/NEG/EQUI/NOTEST)
672+
return resultIgM;
673+
}
674+
675+
// Phase 3: Getters and setters for clinical and epidemiology fields
676+
public Date getDateOfInvestigation() {
677+
return dateOfInvestigation;
678+
}
679+
680+
public void setDateOfInvestigation(Date dateOfInvestigation) {
681+
this.dateOfInvestigation = dateOfInvestigation;
682+
}
683+
684+
public Boolean getClusterRelated() {
685+
return clusterRelated;
686+
}
687+
688+
public void setClusterRelated(Boolean clusterRelated) {
689+
this.clusterRelated = clusterRelated;
690+
}
691+
692+
public String getClusterIdentification() {
693+
return clusterIdentification;
694+
}
695+
696+
public void setClusterIdentification(String clusterIdentification) {
697+
this.clusterIdentification = clusterIdentification;
698+
}
699+
700+
public List<String> getClusterSetting() {
701+
return clusterSetting;
702+
}
703+
704+
public void setClusterSetting(List<String> clusterSetting) {
705+
this.clusterSetting = clusterSetting;
706+
}
707+
708+
public String getImportedStatus() {
709+
return importedStatus;
710+
}
711+
712+
public void setImportedStatus(String importedStatus) {
713+
this.importedStatus = importedStatus;
714+
}
715+
716+
public List<String> getComplicationDiagnosis() {
717+
return complicationDiagnosis;
718+
}
719+
720+
public void setComplicationDiagnosis(List<String> complicationDiagnosis) {
721+
this.complicationDiagnosis = complicationDiagnosis;
722+
}
723+
724+
public Boolean getClinicalCriteriaStatus() {
725+
return clinicalCriteriaStatus;
726+
}
727+
728+
public void setClinicalCriteriaStatus(Boolean clinicalCriteriaStatus) {
729+
this.clinicalCriteriaStatus = clinicalCriteriaStatus;
730+
}
731+
732+
public List<String> getPlaceOfInfection() {
733+
return placeOfInfection;
734+
}
735+
736+
public void setPlaceOfInfection(List<String> placeOfInfection) {
737+
this.placeOfInfection = placeOfInfection;
738+
}
739+
740+
public String getCauseOfDeath() {
741+
return causeOfDeath;
742+
}
743+
744+
public void setCauseOfDeath(String causeOfDeath) {
745+
this.causeOfDeath = causeOfDeath;
746+
}
747+
748+
// Phase 3: CSV getter methods
749+
public String getDateOfInvestigationForCsv() {
750+
return formatDateForCsv(dateOfInvestigation);
751+
}
752+
753+
public String getClusterRelatedForCsv() {
754+
return clusterRelated != null ? String.valueOf(clusterRelated) : "";
755+
}
756+
757+
public String getClusterIdentificationForCsv() {
758+
return clusterIdentification != null ? clusterIdentification : "";
759+
}
760+
761+
public List<String> getClusterSettingForCsv(int maxClusterSettings) {
762+
// Repeatable field - return list padded to max length
763+
List<String> settings = new ArrayList<>();
764+
for (int i = 0; i < maxClusterSettings; i++) {
765+
if (clusterSetting != null && i < clusterSetting.size()) {
766+
settings.add(clusterSetting.get(i));
767+
} else {
768+
settings.add("");
769+
}
770+
}
771+
return settings;
772+
}
773+
774+
public String getImportedStatusForCsv() {
775+
return importedStatus != null ? importedStatus : "";
776+
}
777+
778+
public List<String> getComplicationDiagnosisForCsv(int maxComplicationDiagnosis) {
779+
// Repeatable field - return list padded to max length
780+
List<String> complications = new ArrayList<>();
781+
for (int i = 0; i < maxComplicationDiagnosis; i++) {
782+
if (complicationDiagnosis != null && i < complicationDiagnosis.size()) {
783+
complications.add(complicationDiagnosis.get(i));
784+
} else {
785+
// Use "NONE" for first empty slot if no complications, otherwise empty
786+
if (i == 0 && (complicationDiagnosis == null || complicationDiagnosis.isEmpty())) {
787+
complications.add("NONE");
788+
} else {
789+
complications.add("");
790+
}
791+
}
792+
}
793+
return complications;
794+
}
795+
796+
public String getClinicalCriteriaStatusForCsv() {
797+
return clinicalCriteriaStatus != null ? String.valueOf(clinicalCriteriaStatus) : "";
798+
}
799+
800+
public List<String> getPlaceOfInfectionForCsv(int maxPlaceOfInfection) {
801+
// Repeatable field - return list padded to max length
802+
List<String> places = new ArrayList<>();
803+
for (int i = 0; i < maxPlaceOfInfection; i++) {
804+
if (placeOfInfection != null && i < placeOfInfection.size()) {
805+
places.add(placeOfInfection.get(i));
806+
} else {
807+
places.add("");
808+
}
809+
}
810+
return places;
811+
}
812+
813+
public String getCauseOfDeathForCsv() {
814+
return causeOfDeath != null ? causeOfDeath : "";
815+
}
816+
532817
public void calculateAge() {
533818
if (symptomOnsetDate == null || yearOfBirth == null || monthOfBirth == null || dayOfBirth == null) {
534819
return;

sormas-api/src/main/java/de/symeda/sormas/api/epipulse/EpipulseDiseaseExportFacade.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@
2121
public interface EpipulseDiseaseExportFacade {
2222

2323
public void startPertussisExport(String uuid);
24+
25+
public void startMeaslesExport(String uuid);
2426
}

sormas-api/src/main/java/de/symeda/sormas/api/epipulse/EpipulseDiseaseExportResult.java

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ public class EpipulseDiseaseExportResult {
2323
private int maxImmunizations;
2424
private List<EpipulseDiseaseExportEntryDto> exportEntryList;
2525

26+
// MEAS repeatable field max counts
27+
private int maxComplicationDiagnosis;
28+
private int maxClusterSettings;
29+
private int maxPlaceOfInfection;
30+
private int maxSpecimenVirDetect;
31+
private int maxSpecimenSero;
32+
2633
public int getMaxPathogenTests() {
2734
return maxPathogenTests;
2835
}
@@ -46,4 +53,44 @@ public List<EpipulseDiseaseExportEntryDto> getExportEntryList() {
4653
public void setExportEntryList(List<EpipulseDiseaseExportEntryDto> exportEntryList) {
4754
this.exportEntryList = exportEntryList;
4855
}
56+
57+
public int getMaxComplicationDiagnosis() {
58+
return maxComplicationDiagnosis;
59+
}
60+
61+
public void setMaxComplicationDiagnosis(int maxComplicationDiagnosis) {
62+
this.maxComplicationDiagnosis = maxComplicationDiagnosis;
63+
}
64+
65+
public int getMaxClusterSettings() {
66+
return maxClusterSettings;
67+
}
68+
69+
public void setMaxClusterSettings(int maxClusterSettings) {
70+
this.maxClusterSettings = maxClusterSettings;
71+
}
72+
73+
public int getMaxPlaceOfInfection() {
74+
return maxPlaceOfInfection;
75+
}
76+
77+
public void setMaxPlaceOfInfection(int maxPlaceOfInfection) {
78+
this.maxPlaceOfInfection = maxPlaceOfInfection;
79+
}
80+
81+
public int getMaxSpecimenVirDetect() {
82+
return maxSpecimenVirDetect;
83+
}
84+
85+
public void setMaxSpecimenVirDetect(int maxSpecimenVirDetect) {
86+
this.maxSpecimenVirDetect = maxSpecimenVirDetect;
87+
}
88+
89+
public int getMaxSpecimenSero() {
90+
return maxSpecimenSero;
91+
}
92+
93+
public void setMaxSpecimenSero(int maxSpecimenSero) {
94+
this.maxSpecimenSero = maxSpecimenSero;
95+
}
4996
}

0 commit comments

Comments
 (0)