4545import de .symeda .sormas .api .person .Sex ;
4646import de .symeda .sormas .api .sample .PathogenTestResultType ;
4747import de .symeda .sormas .api .symptoms .SymptomsDto ;
48- import de .symeda .sormas .api .utils .DateHelper ;
4948import de .symeda .sormas .api .utils .HideForCountriesExcept ;
5049import de .symeda .sormas .api .utils .Order ;
5150import de .symeda .sormas .api .utils .PersonalData ;
@@ -186,10 +185,10 @@ public class CaseExportDto implements Serializable {
186185 private int numberOfPrescriptions ;
187186 private int numberOfTreatments ;
188187 private int numberOfClinicalVisits ;
189- private CaseExportSampleDto sample1 = new CaseExportSampleDto ();
190- private CaseExportSampleDto sample2 = new CaseExportSampleDto ();
191- private CaseExportSampleDto sample3 = new CaseExportSampleDto ();
192- private List <CaseExportSampleDto > otherSamples = new ArrayList <>();
188+ private EmbeddedSampleExportDto sample1 = new EmbeddedSampleExportDto ();
189+ private EmbeddedSampleExportDto sample2 = new EmbeddedSampleExportDto ();
190+ private EmbeddedSampleExportDto sample3 = new EmbeddedSampleExportDto ();
191+ private List <EmbeddedSampleExportDto > otherSamples = new ArrayList <>();
193192
194193 private QuarantineType quarantine ;
195194 @ SensitiveData
@@ -1104,7 +1103,7 @@ public int getNumberOfClinicalVisits() {
11041103 @ ExportProperty (value = SAMPLE_INFORMATION , combined = true )
11051104 @ ExportGroup (ExportGroupType .ADDITIONAL )
11061105 public Date getSampleDateTime1 () {
1107- return sample1 .dateTime ;
1106+ return sample1 .getDateTime () ;
11081107 }
11091108
11101109 @ Order (121 )
@@ -1113,7 +1112,7 @@ public Date getSampleDateTime1() {
11131112 @ ExportProperty (value = SAMPLE_INFORMATION , combined = true )
11141113 @ ExportGroup (ExportGroupType .ADDITIONAL )
11151114 public String getSampleLab1 () {
1116- return sample1 .lab ;
1115+ return sample1 .getLab () ;
11171116 }
11181117
11191118 @ Order (122 )
@@ -1122,7 +1121,7 @@ public String getSampleLab1() {
11221121 @ ExportProperty (value = SAMPLE_INFORMATION , combined = true )
11231122 @ ExportGroup (ExportGroupType .ADDITIONAL )
11241123 public PathogenTestResultType getSampleResult1 () {
1125- return sample1 .result ;
1124+ return sample1 .getResult () ;
11261125 }
11271126
11281127 @ Order (123 )
@@ -1131,7 +1130,7 @@ public PathogenTestResultType getSampleResult1() {
11311130 @ ExportProperty (value = SAMPLE_INFORMATION , combined = true )
11321131 @ ExportGroup (ExportGroupType .ADDITIONAL )
11331132 public Date getSampleDateTime2 () {
1134- return sample2 .dateTime ;
1133+ return sample2 .getDateTime () ;
11351134 }
11361135
11371136 @ Order (124 )
@@ -1140,7 +1139,7 @@ public Date getSampleDateTime2() {
11401139 @ ExportProperty (value = SAMPLE_INFORMATION , combined = true )
11411140 @ ExportGroup (ExportGroupType .ADDITIONAL )
11421141 public String getSampleLab2 () {
1143- return sample2 .lab ;
1142+ return sample2 .getLab () ;
11441143 }
11451144
11461145 @ Order (125 )
@@ -1149,7 +1148,7 @@ public String getSampleLab2() {
11491148 @ ExportProperty (value = SAMPLE_INFORMATION , combined = true )
11501149 @ ExportGroup (ExportGroupType .ADDITIONAL )
11511150 public PathogenTestResultType getSampleResult2 () {
1152- return sample2 .result ;
1151+ return sample2 .getResult () ;
11531152 }
11541153
11551154 @ Order (126 )
@@ -1158,7 +1157,7 @@ public PathogenTestResultType getSampleResult2() {
11581157 @ ExportProperty (value = SAMPLE_INFORMATION , combined = true )
11591158 @ ExportGroup (ExportGroupType .ADDITIONAL )
11601159 public Date getSampleDateTime3 () {
1161- return sample3 .dateTime ;
1160+ return sample3 .getDateTime () ;
11621161 }
11631162
11641163 @ Order (127 )
@@ -1167,7 +1166,7 @@ public Date getSampleDateTime3() {
11671166 @ ExportProperty (value = SAMPLE_INFORMATION , combined = true )
11681167 @ ExportGroup (ExportGroupType .ADDITIONAL )
11691168 public String getSampleLab3 () {
1170- return sample3 .lab ;
1169+ return sample3 .getLab () ;
11711170 }
11721171
11731172 @ Order (128 )
@@ -1176,7 +1175,7 @@ public String getSampleLab3() {
11761175 @ ExportProperty (value = SAMPLE_INFORMATION , combined = true )
11771176 @ ExportGroup (ExportGroupType .ADDITIONAL )
11781177 public PathogenTestResultType getSampleResult3 () {
1179- return sample3 .result ;
1178+ return sample3 .getResult () ;
11801179 }
11811180
11821181 @ Order (130 )
@@ -1188,7 +1187,7 @@ public String getOtherSamplesString() {
11881187 StringBuilder samples = new StringBuilder ();
11891188 String separator = ", " ;
11901189
1191- for (CaseExportSampleDto sample : otherSamples ) {
1190+ for (EmbeddedSampleExportDto sample : otherSamples ) {
11921191 samples .append (sample .formatString ()).append (separator );
11931192 }
11941193
@@ -1457,71 +1456,42 @@ public void setNumberOfClinicalVisits(int numberOfClinicalVisits) {
14571456 this .numberOfClinicalVisits = numberOfClinicalVisits ;
14581457 }
14591458
1460- public CaseExportSampleDto getSample1 () {
1459+ public EmbeddedSampleExportDto getSample1 () {
14611460 return sample1 ;
14621461 }
14631462
1464- public void setSample1 (CaseExportSampleDto sample1 ) {
1463+ public void setSample1 (EmbeddedSampleExportDto sample1 ) {
14651464 this .sample1 = sample1 ;
14661465 }
14671466
1468- public CaseExportSampleDto getSample2 () {
1467+ public EmbeddedSampleExportDto getSample2 () {
14691468 return sample2 ;
14701469 }
14711470
1472- public void setSample2 (CaseExportSampleDto sample2 ) {
1471+ public void setSample2 (EmbeddedSampleExportDto sample2 ) {
14731472 this .sample2 = sample2 ;
14741473 }
14751474
1476- public CaseExportSampleDto getSample3 () {
1475+ public EmbeddedSampleExportDto getSample3 () {
14771476 return sample3 ;
14781477 }
14791478
1480- public void setSample3 (CaseExportSampleDto sample3 ) {
1479+ public void setSample3 (EmbeddedSampleExportDto sample3 ) {
14811480 this .sample3 = sample3 ;
14821481 }
14831482
1484- public List <CaseExportSampleDto > getOtherSamples () {
1483+ public List <EmbeddedSampleExportDto > getOtherSamples () {
14851484 return otherSamples ;
14861485 }
14871486
1488- public void addOtherSample (CaseExportSampleDto otherSample ) {
1487+ public void addOtherSample (EmbeddedSampleExportDto otherSample ) {
14891488 this .otherSamples .add (otherSample );
14901489 }
14911490
14921491 public CaseJurisdictionDto getJurisdiction () {
14931492 return jurisdiction ;
14941493 }
14951494
1496- public static class CaseExportSampleDto implements Serializable {
1497-
1498- private Date dateTime ;
1499- @ SensitiveData
1500- private String lab ;
1501- private PathogenTestResultType result ;
1502-
1503- public CaseExportSampleDto () {
1504- }
1505-
1506- public CaseExportSampleDto (Date dateTime , String lab , PathogenTestResultType result ) {
1507- this .dateTime = dateTime ;
1508- this .lab = lab ;
1509- this .result = result ;
1510- }
1511-
1512- public String formatString () {
1513- StringBuilder sb = new StringBuilder ();
1514-
1515- sb .append (DateHelper .formatDateForExport (dateTime )).append (" (" );
1516- if (lab != null && lab .length () > 0 ) {
1517- sb .append (lab ).append (", " );
1518- }
1519- sb .append (result ).append (")" );
1520-
1521- return sb .toString ();
1522- }
1523- }
1524-
15251495 public void setFollowUpStatus (FollowUpStatus followUpStatus ) {
15261496 this .followUpStatus = followUpStatus ;
15271497 }
0 commit comments