|
| 1 | +package femr.util.reportgeneration; |
| 2 | + |
| 3 | +import java.lang.annotation.*; |
| 4 | +import java.time.LocalDate; |
| 5 | +import java.time.LocalDateTime; |
| 6 | + |
| 7 | +//@Retention(RetentionPolicy.RUNTIME); |
| 8 | + |
| 9 | +@Target(ElementType.FIELD) |
| 10 | +@interface CSVFieldHeader { |
| 11 | + String value() default "UNKNOWN"; |
| 12 | +} |
| 13 | + |
| 14 | +// based on 2019WHO MDS eData version |
| 15 | +public class DailyReport { |
| 16 | + |
| 17 | + // TEAM INFORMATION |
| 18 | + // These will be static or configured once per EMT |
| 19 | + @CSVFieldHeader("a") |
| 20 | + public String organizationName; |
| 21 | + @CSVFieldHeader("b") |
| 22 | + public String teamName; |
| 23 | + @CSVFieldHeader("c1") |
| 24 | + public boolean isType1Mobile; |
| 25 | + @CSVFieldHeader("c2") |
| 26 | + public boolean isType1Fixed; |
| 27 | + @CSVFieldHeader("c3") |
| 28 | + public boolean isType2; |
| 29 | + @CSVFieldHeader("c4") |
| 30 | + public boolean isType3; |
| 31 | + @CSVFieldHeader("c5") |
| 32 | + public boolean isType4; |
| 33 | + @CSVFieldHeader("d") |
| 34 | + public String contactPersonName; |
| 35 | + @CSVFieldHeader("e") |
| 36 | + public int phoneNumber; |
| 37 | + @CSVFieldHeader("f") |
| 38 | + public String email; |
| 39 | + @CSVFieldHeader("n") |
| 40 | + public LocalDate estimatedDateOfDeparture; |
| 41 | + @CSVFieldHeader("h") |
| 42 | + public LocalDate dateOfActivity; |
| 43 | + @CSVFieldHeader("g") |
| 44 | + public LocalDateTime dateOfDeparture; |
| 45 | + /*has to be in 24 hour format (yyyy/mm/dd/hh:mm) |
| 46 | + use with |
| 47 | + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd/HH:mm"); |
| 48 | + LocalDateTime dt = LocalDateTime.parse("2025/11/06/14:30", formatter); |
| 49 | + */ |
| 50 | + // LOCATION |
| 51 | + @CSVFieldHeader("i") |
| 52 | + public String locationState; |
| 53 | + @CSVFieldHeader("j") |
| 54 | + public String locationCity; |
| 55 | + @CSVFieldHeader("k") |
| 56 | + public String locationVillage; |
| 57 | + @CSVFieldHeader("l") |
| 58 | + public String locationFacilityName; |
| 59 | + @CSVFieldHeader("m") |
| 60 | + public String locationGeoTag; |
| 61 | + //do we want to keep it as a string or tuple of doubles |
| 62 | + |
| 63 | + |
| 64 | + // DAILY SUMMARY |
| 65 | + @CSVFieldHeader("o") |
| 66 | + public int patientsTotalNumberOfNewConsultations; |
| 67 | + //can be a static which is incremented every time a new patient is added |
| 68 | + @CSVFieldHeader("p") |
| 69 | + public int patientsNewAdmission; |
| 70 | + @CSVFieldHeader("q") |
| 71 | + public int patientsLiveBirth; |
| 72 | + |
| 73 | + @CSVFieldHeader("r") |
| 74 | + public int bedTotalBedCapacity; //r |
| 75 | + @CSVFieldHeader("s") |
| 76 | + public int bedEmptyInpatientBed; //s |
| 77 | + @CSVFieldHeader("t") |
| 78 | + public int bedEmptyIntensiveCareUnitBed; //t |
| 79 | + @CSVFieldHeader("u") |
| 80 | + public int reserveBlank; //u |
| 81 | + |
| 82 | + |
| 83 | + //DEMOGRAPHIC |
| 84 | + @CSVFieldHeader("MDS1:0") |
| 85 | + public int maleDemographics_under1; |
| 86 | + @CSVFieldHeader("MDS1:1-4") |
| 87 | + public int maleDemographics_range1to4; |
| 88 | + @CSVFieldHeader("MDS1:5-17") |
| 89 | + public int maleDemographics_range5to17; |
| 90 | + @CSVFieldHeader("MDS1:18-64") |
| 91 | + public int maleDemographics_range18to64; |
| 92 | + @CSVFieldHeader("MDS1:65-") |
| 93 | + public int maleDemographics_over65; |
| 94 | + @CSVFieldHeader("Total1") |
| 95 | + public int maleDemographics_total; |
| 96 | + |
| 97 | + @CSVFieldHeader("MDS2:0") |
| 98 | + public int femaleNonPregnantDemographics_under1; |
| 99 | + @CSVFieldHeader("MDS2:1-4") |
| 100 | + public int femaleNonPregnantDemographics_range1to4; |
| 101 | + @CSVFieldHeader("MDS2:5-17") |
| 102 | + public int femaleNonPregnantDemographics_range5to17; |
| 103 | + @CSVFieldHeader("MDS2:18-64") |
| 104 | + public int femaleNonPregnantDemographics_range18to64; |
| 105 | + @CSVFieldHeader("MDS2:65-") |
| 106 | + public int femaleNonPregnantDemographics_over65; |
| 107 | + @CSVFieldHeader("Total2") |
| 108 | + public int femaleNonPregnantDemographics_total; |
| 109 | + |
| 110 | + @CSVFieldHeader("MDS3:0") |
| 111 | + public int femalePregnantDemographics_under1; |
| 112 | + @CSVFieldHeader("MDS3:1-4") |
| 113 | + public int femalePregnantDemographics_range1to4; |
| 114 | + @CSVFieldHeader("MDS3:5-17") |
| 115 | + public int femalePregnantDemographics_range5to17; |
| 116 | + @CSVFieldHeader("MDS3:18-64") |
| 117 | + public int femalePregnantDemographics_range18to64; |
| 118 | + @CSVFieldHeader("MDS3:65-") |
| 119 | + public int femalePregnantDemographics_over65; |
| 120 | + @CSVFieldHeader("Total3") |
| 121 | + public int femalePregnantDemographics_total; |
| 122 | + |
| 123 | + //HEALTH EVENTS - TRAUMA |
| 124 | + @CSVFieldHeader("MDS4:0") |
| 125 | + public int traumaMajorHeadOrSpineInjury_none; |
| 126 | + @CSVFieldHeader("MDS4:5-") |
| 127 | + public int traumaMajorHeadOrSpineInjury_over5; |
| 128 | + |
| 129 | + @CSVFieldHeader("MDS5:0") |
| 130 | + public int traumaMajorTorsoInjury_none; |
| 131 | + @CSVFieldHeader("MDS5:5-") |
| 132 | + public int traumaMajorTorsoInjury_over5; |
| 133 | + |
| 134 | + @CSVFieldHeader("MDS6:0") |
| 135 | + public int traumaMajorExtremityInjury_none; |
| 136 | + @CSVFieldHeader("MDS6:5-") |
| 137 | + public int traumaMajorExtremityInjury_over5; |
| 138 | + |
| 139 | + @CSVFieldHeader("MDS7:0") |
| 140 | + public int traumaModerateInjury_none; |
| 141 | + @CSVFieldHeader("MDS7:5-") |
| 142 | + public int traumaModerateInjury_over5; |
| 143 | + |
| 144 | + @CSVFieldHeader("MDS8:0") |
| 145 | + public int traumaMinorInjury_none; |
| 146 | + @CSVFieldHeader("MDS8:5-") |
| 147 | + public int traumaMinorInjury_over5; |
| 148 | + |
| 149 | + // HEALTH EVENTS - INFECTIOUS DISEASE |
| 150 | + @CSVFieldHeader("MDS9:0") |
| 151 | + public int infectiousAcuteRespiratoryInfection_none; |
| 152 | + @CSVFieldHeader("MDS9:5-") |
| 153 | + public int infectiousAcuteRespiratoryInfection_over5; |
| 154 | + |
| 155 | + @CSVFieldHeader("MDS10:0") |
| 156 | + public int infectiousAcuteWateryDiarrhea_none; |
| 157 | + @CSVFieldHeader("MDS10:5-") |
| 158 | + public int infectiousAcuteWateryDiarrhea_over5; |
| 159 | + |
| 160 | + @CSVFieldHeader("MDS11:0") |
| 161 | + public int infectiousAcuteBloodyDiarrhea_none; |
| 162 | + @CSVFieldHeader("MDS11:5-") |
| 163 | + public int infectiousAcuteBloodyDiarrhea_over5; |
| 164 | + |
| 165 | + @CSVFieldHeader("MDS12:0") |
| 166 | + public int infectiousAcuteJaundiceSyndrome_none; |
| 167 | + @CSVFieldHeader("MDS12:5-") |
| 168 | + public int infectiousAcuteJaundiceSyndrome_over5; |
| 169 | + |
| 170 | + @CSVFieldHeader("MDS13:0") |
| 171 | + public int infectiousSuspectedMeasles_none; |
| 172 | + @CSVFieldHeader("MDS13:5-") |
| 173 | + public int infectiousSuspectedMeasles_over5; |
| 174 | + |
| 175 | + @CSVFieldHeader("MDS14:0") |
| 176 | + public int infectiousSuspectedMeningitis_none; |
| 177 | + @CSVFieldHeader("MDS14:5-") |
| 178 | + public int infectiousSuspectedMeningitis_over5; |
| 179 | + |
| 180 | + @CSVFieldHeader("MDS15:0") |
| 181 | + public int infectiousSuspectedTetanus_none; |
| 182 | + @CSVFieldHeader("MDS15:5-") |
| 183 | + public int infectiousSuspectedTetanus_over5; |
| 184 | + |
| 185 | + @CSVFieldHeader("MDS16:0") |
| 186 | + public int infectiousAcuteFlaccidParalysis_none; |
| 187 | + @CSVFieldHeader("MDS16:5-") |
| 188 | + public int infectiousAcuteFlaccidParalysis_over5; |
| 189 | + |
| 190 | + @CSVFieldHeader("MDS17:0") |
| 191 | + public int infectiousAcuteHaemorrhagicFever_none; |
| 192 | + @CSVFieldHeader("MDS17:5-") |
| 193 | + public int infectiousAcuteHaemorrhagicFever_over5; |
| 194 | + |
| 195 | + @CSVFieldHeader("MDS18:0") |
| 196 | + public int infectiousFeverOfUnknownOrigin_none; |
| 197 | + @CSVFieldHeader("MDS18:5-") |
| 198 | + public int infectiousFeverOfUnknownOrigin_over5; |
| 199 | + |
| 200 | + |
| 201 | + // HEALTH EVENTS - ADDITIONAL |
| 202 | + @CSVFieldHeader("MDS19") |
| 203 | + public int additionalAddedItem1; |
| 204 | + @CSVFieldHeader("MDS20") |
| 205 | + public int additionalAddedItem2; |
| 206 | + @CSVFieldHeader("MDS21") |
| 207 | + public int additionalAddedItem3; |
| 208 | + @CSVFieldHeader("MDS22") |
| 209 | + public int additionalAddedItem4; |
| 210 | + |
| 211 | + |
| 212 | + // HEALTH EVENTS - EMERGENCIES |
| 213 | + @CSVFieldHeader("MDS23") |
| 214 | + public int emgSurgicalEmergencyNonTrauma; |
| 215 | + @CSVFieldHeader("MDS24") |
| 216 | + public int emgMedicalEmergencyNonInfectious; |
| 217 | + |
| 218 | + @CSVFieldHeader("MDS25") |
| 219 | + public int otherKeyDiseasesSkinDisease; |
| 220 | + @CSVFieldHeader("MDS26") |
| 221 | + public int otherKeyDiseasesAcuteMentalHealthProblem; |
| 222 | + @CSVFieldHeader("MDS27") |
| 223 | + public int otherKeyDiseasesObstetricComplications; |
| 224 | + |
| 225 | + |
| 226 | + // PROCEDURES & OUTCOME |
| 227 | + @CSVFieldHeader("MDS28") |
| 228 | + public int procedureSevereAcuteMalnutritionSAM; |
| 229 | + @CSVFieldHeader("MDS29") |
| 230 | + public int procedureOtherDiagnosisNotSpecified; |
| 231 | + @CSVFieldHeader("MDS30") |
| 232 | + public int procedureMajorProcedureExcludingMDS31; |
| 233 | + @CSVFieldHeader("MDS31") |
| 234 | + public int procedureLimbAmputationExcludingDigits; |
| 235 | + @CSVFieldHeader("MDS32") |
| 236 | + public int procedureMinorSurgicalProcedure; |
| 237 | + @CSVFieldHeader("MDS33") |
| 238 | + public int procedureNormalVaginalDeliveryNVD; |
| 239 | + @CSVFieldHeader("MDS34") |
| 240 | + public int procedureCaesareanSection; |
| 241 | + @CSVFieldHeader("MDS35") |
| 242 | + public int procedureObstetricsOthers; |
| 243 | + |
| 244 | + @CSVFieldHeader("MDS36") |
| 245 | + public int outcomeDischargeWithoutMedicalFollowUp; |
| 246 | + @CSVFieldHeader("MDS37") |
| 247 | + public int outcomeDischargeWithMedicalFollowUp; |
| 248 | + @CSVFieldHeader("MDS38") |
| 249 | + public int outcomeDischargeAgainstMedicalAdvice; |
| 250 | + @CSVFieldHeader("MDS39") |
| 251 | + public int outcomeReferral; |
| 252 | + @CSVFieldHeader("MDS40") |
| 253 | + public int outcomeAdmission; |
| 254 | + @CSVFieldHeader("MDS41") |
| 255 | + public int outcomeDeadOnArrival; |
| 256 | + @CSVFieldHeader("MDS42") |
| 257 | + public int outcomeDeathWithinFacility; |
| 258 | + @CSVFieldHeader("MDS43") |
| 259 | + public int outcomeRequiringLongTermRehabilitation; |
| 260 | + |
| 261 | + |
| 262 | + // CONTEXT |
| 263 | + @CSVFieldHeader("MDS44") |
| 264 | + public int contextDirectlyRelatedToEvent; |
| 265 | + @CSVFieldHeader("MDS45") |
| 266 | + public int contextIndirectlyRelatedToEvent; |
| 267 | + @CSVFieldHeader("MDS46") |
| 268 | + public int contextNotRelatedToEvent; |
| 269 | + |
| 270 | + @CSVFieldHeader("MDS47") |
| 271 | + public int contextVulnerableChild; |
| 272 | + @CSVFieldHeader("MDS48") |
| 273 | + public int contextVulnerableAdult; |
| 274 | + @CSVFieldHeader("MDS49") |
| 275 | + public int contextSexualGenderBasedViolenceSGBV; |
| 276 | + @CSVFieldHeader("MDS50") |
| 277 | + public int contextViolenceNonSGBV; |
| 278 | + |
| 279 | + |
| 280 | + // NEEDS AND RISKS |
| 281 | + @CSVFieldHeader("MDS51") |
| 282 | + public int needsUnexpectedDeath; |
| 283 | + @CSVFieldHeader("MDS52") |
| 284 | + public int needsNotifiableDisease; |
| 285 | + @CSVFieldHeader("MDS53") |
| 286 | + public int needsProtectionIssues; |
| 287 | + @CSVFieldHeader("MDS54") |
| 288 | + public int needsCriticalIncidentToEMTAndCommunity; |
| 289 | + @CSVFieldHeader("MDS55") |
| 290 | + public int needsOtherIssueRequiringImmediateReporting; |
| 291 | + |
| 292 | + @CSVFieldHeader("MDS56") |
| 293 | + public int communityWASH; |
| 294 | + @CSVFieldHeader("MDS57") |
| 295 | + public int communitySuspectedOrInfectiousDisease; |
| 296 | + @CSVFieldHeader("MDS58") |
| 297 | + public int communityEnvironmentalRiskExposure; |
| 298 | + @CSVFieldHeader("MDS59") |
| 299 | + public int communityShelterNonFoodItems; |
| 300 | + @CSVFieldHeader("MDS60") |
| 301 | + public int communityFoodInsecurity; |
| 302 | + |
| 303 | + @CSVFieldHeader("MDS61") |
| 304 | + public int operationalLogisticsOperationalSupport; |
| 305 | + @CSVFieldHeader("MDS62") |
| 306 | + public int operationalSupply; |
| 307 | + @CSVFieldHeader("MDS63") |
| 308 | + public int operationalHumanResources; |
| 309 | + @CSVFieldHeader("MDS64") |
| 310 | + public int operationalFinance; |
| 311 | + @CSVFieldHeader("MDS65") |
| 312 | + public int operationalOthers; |
| 313 | + |
| 314 | + |
| 315 | + // DETAILS COMMENTS |
| 316 | + @CSVFieldHeader("NR1-No") |
| 317 | + public int detailedComment1Count; |
| 318 | + @CSVFieldHeader("NR1-DC") |
| 319 | + public String detailedComment1Text; |
| 320 | + |
| 321 | + @CSVFieldHeader("NR2-No") |
| 322 | + public int detailedComment2Count; |
| 323 | + @CSVFieldHeader("NR2-DC") |
| 324 | + public String detailedComment2Text; |
| 325 | + |
| 326 | + @CSVFieldHeader("NR3-No") |
| 327 | + public int detailedComment3Count; |
| 328 | + @CSVFieldHeader("NR3-DC") |
| 329 | + public String detailedComment3Text; |
| 330 | + |
| 331 | + @CSVFieldHeader("NR4-No") |
| 332 | + public int detailedComment4Count; |
| 333 | + @CSVFieldHeader("NR4-DC") |
| 334 | + public String detailedComment4Text; |
| 335 | + |
| 336 | + // OTHER |
| 337 | + @CSVFieldHeader("ToolVer") |
| 338 | + public String csvFileCreationToolNameAndVersion = "fEMR ?v3.1.2?"; |
| 339 | + |
| 340 | + @CSVFieldHeader("Ver") |
| 341 | + public String emtMDSDailyReportingFormVersion = "2019WHO"; |
| 342 | + |
| 343 | + // ====================METHODS======================= |
| 344 | + public DailyReport() {} |
| 345 | +} |
0 commit comments