@@ -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 ;
0 commit comments