Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public class CommonReportsConstants {
public static final String COMPONENT_REPORTMANAGER_LAB = MODULE_ARTIFACT_ID + ".lab";

public static final String COMPONENT_REPORTMANAGER_VACCINATION = MODULE_ARTIFACT_ID + ".vaccination";

public static final String COMPONENT_REPORTMANAGER_FAMILY_PLANNING = MODULE_ARTIFACT_ID + ".familyPlanning";

/*
* URIs URLs
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,25 @@ public void render(ReportData results, String argument, OutputStream out) throws
Set<String> rows = dsd.getRows().keySet();

// Add rest of the columns
for (String column : columns) {
metaData.addColumn(new DataSetColumn(column, column, Object.class));
}
data.setMetaData(metaData);
// Add column values
for (String row : rows) {
DataSetRow dsr = new DataSetRow();
for (DataSetColumn column : metaData.getColumns()) {
if (column.getName().equals("")) {
dsr.addColumnValue(column, row);
} else {
dsr.addColumnValue(column, ((Cohort) cohortCrossTabDataSetRow.getColumnValue(row + "." + column))
.size());
}
}
data.addRow(dsr);
}
dataSetsToRender.put(name, data);
for (String column : columns) {
metaData.addColumn(new DataSetColumn(column, column, Object.class));
}
data.setMetaData(metaData);
// Add column values
for (String row : rows) {
DataSetRow dsr = new DataSetRow();
for (DataSetColumn column : metaData.getColumns()) {
if (column.getName().equals("")) {
dsr.addColumnValue(column, row);
} else {
dsr.addColumnValue(column,
((Cohort) cohortCrossTabDataSetRow.getColumnValue(row + "." + column)).size());
}
}
data.addRow(dsr);
}
dataSetsToRender.put(name, data);
} else {
dataSetsToRender.put(name, ds);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ public ReportDefinition constructReportDefinition() {
emergencies.addRow(
svc.getDisplayString() + " - " + MessageUtil.translate("commonreports.report.MSPP.emergency.women") + " "
+ MessageUtil.translate("commonreports.report.MSPP.emergency.above14years"),
createCohortComposition(sexualViolence, males, above14y), parameterMappings);
createCohortComposition(sexualViolence, females, above14y), parameterMappings);
emergencies.addRow(
svc.getDisplayString() + " - " + MessageUtil.translate("commonreports.report.MSPP.emergency.women") + " "
svc.getDisplayString() + " - " + MessageUtil.translate("commonreports.report.MSPP.emergency.men") + " "
+ MessageUtil.translate("commonreports.report.MSPP.emergency.above14years"),
createCohortComposition(sexualViolence, females, above14y), parameterMappings);
createCohortComposition(sexualViolence, males, above14y), parameterMappings);
}

{
Expand All @@ -203,11 +203,11 @@ public ReportDefinition constructReportDefinition() {
emergencies.addRow(
pvc.getDisplayString() + " - " + MessageUtil.translate("commonreports.report.MSPP.emergency.men") + " "
+ MessageUtil.translate("commonreports.report.MSPP.emergency.above14years"),
createCohortComposition(physicalViolence, females), parameterMappings);
createCohortComposition(physicalViolence, males), parameterMappings);
emergencies.addRow(
pvc.getDisplayString() + " - " + MessageUtil.translate("commonreports.report.MSPP.emergency.women") + " "
+ MessageUtil.translate("commonreports.report.MSPP.emergency.above14years"),
createCohortComposition(physicalViolence, males), parameterMappings);
createCohortComposition(physicalViolence, females), parameterMappings);

}

Expand All @@ -230,11 +230,11 @@ public ReportDefinition constructReportDefinition() {
emergencies.addRow(
ovtc.getDisplayString() + " - " + MessageUtil.translate("commonreports.report.MSPP.emergency.men") + " "
+ MessageUtil.translate("commonreports.report.MSPP.emergency.above14years"),
createCohortComposition(otherViolenceType, females), parameterMappings);
createCohortComposition(otherViolenceType, males), parameterMappings);
emergencies.addRow(
ovtc.getDisplayString() + " - " + MessageUtil.translate("commonreports.report.MSPP.emergency.women") + " "
+ MessageUtil.translate("commonreports.report.MSPP.emergency.above14years"),
createCohortComposition(otherViolenceType, males), parameterMappings);
createCohortComposition(otherViolenceType, females), parameterMappings);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,86 +103,115 @@ public ReportDefinition constructReportDefinition() {

// Add rows for each method and user type combination
// Microgynon - New Users
familyPlanning.addRow("newMycogynonFemaleLT25", createFamilyPlanningCohort(fpAdministredConceptId,
microgynonConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, false, 1),
parameterMappings);
familyPlanning.addRow("newMycogynonFemaleGT25", createFamilyPlanningCohort(fpAdministredConceptId,
microgynonConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, true, 1),
parameterMappings);
familyPlanning
.addRow(
"existentMycogynonFemaleLT25", createFamilyPlanningCohort(fpAdministredConceptId, microgynonConceptId,
familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, false, 1),
"New - Mycogynon - Female - below 25", createFamilyPlanningCohort(fpAdministredConceptId,
microgynonConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, false, 1),
parameterMappings);
familyPlanning
.addRow(
"existentMycogynonFemaleGT25", createFamilyPlanningCohort(fpAdministredConceptId, microgynonConceptId,
familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, true, 1),
"New - Mycogynon - Female - above 25", createFamilyPlanningCohort(fpAdministredConceptId,
microgynonConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, true, 1),
parameterMappings);
familyPlanning.addRow(
"Existent - Mycogynon - Female - below 25", createFamilyPlanningCohort(fpAdministredConceptId,
microgynonConceptId, familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, false, 1),
parameterMappings);
familyPlanning.addRow(
"Existent - Mycogynon - Female - above 25", createFamilyPlanningCohort(fpAdministredConceptId,
microgynonConceptId, familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, true, 1),
parameterMappings);

// Microlut - New Users
familyPlanning.addRow("newMicrolutFemaleLT25", createFamilyPlanningCohort(fpAdministredConceptId, microlutConceptId,
familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, false, 1), parameterMappings);
familyPlanning.addRow("newMicrolutFemaleGT25", createFamilyPlanningCohort(fpAdministredConceptId, microlutConceptId,
familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, true, 1), parameterMappings);
familyPlanning
.addRow(
"existentMicrolutFemaleLT25", createFamilyPlanningCohort(fpAdministredConceptId, microlutConceptId,
familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, false, 1),
"New - Microlut - Female - below 25", createFamilyPlanningCohort(fpAdministredConceptId,
microlutConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, false, 1),
parameterMappings);
familyPlanning
.addRow(
"existentMicrolutFemaleGT25", createFamilyPlanningCohort(fpAdministredConceptId, microlutConceptId,
familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, true, 1),
"New - Microlut - Female - above 25", createFamilyPlanningCohort(fpAdministredConceptId,
microlutConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, true, 1),
parameterMappings);
familyPlanning.addRow("Existent - Microlut - Female - below 25", createFamilyPlanningCohort(fpAdministredConceptId,
microlutConceptId, familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, false, 1),
parameterMappings);
familyPlanning.addRow("Existent - Microlut - Female - above 25", createFamilyPlanningCohort(fpAdministredConceptId,
microlutConceptId, familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, true, 1),
parameterMappings);

// Depo Provera - New Users (3 months interval)
familyPlanning.addRow("newDepoFemaleLT25", createFamilyPlanningCohort(fpAdministredConceptId,
familyPlanning.addRow("New - Depo - Female - below 25", createFamilyPlanningCohort(fpAdministredConceptId,
depoProveraInjectionConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, false, 3),
parameterMappings);
familyPlanning.addRow("newDepoFemaleGT25", createFamilyPlanningCohort(fpAdministredConceptId,
depoProveraInjectionConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, true, 3),
familyPlanning.addRow(
"New - Depo - Female - above 25", createFamilyPlanningCohort(fpAdministredConceptId,
depoProveraInjectionConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, true, 3),
parameterMappings);
familyPlanning
.addRow("existentDepoFemaleLT25",
.addRow("Existent - Depo - Female - below 25",
createFamilyPlanningCohort(fpAdministredConceptId, depoProveraInjectionConceptId,
familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, false, 3),
parameterMappings);
familyPlanning
.addRow("existentDepoFemaleGT25",
.addRow("Existent - Depo - Female - above 25",
createFamilyPlanningCohort(fpAdministredConceptId, depoProveraInjectionConceptId,
familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, true, 3),
parameterMappings);

// Jadel - New Users (5 years interval)
familyPlanning.addRow("newJadelFemaleLT25", createFamilyPlanningCohort(fpAdministredConceptId, jadelConceptId,
familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, false, 60), parameterMappings);
familyPlanning.addRow("newJadelFemaleGT25", createFamilyPlanningCohort(fpAdministredConceptId, jadelConceptId,
familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, true, 60), parameterMappings);
familyPlanning.addRow("existentJadelFemaleLT25", createFamilyPlanningCohort(fpAdministredConceptId, jadelConceptId,
familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, false, 60), parameterMappings);
familyPlanning.addRow("existentJadelFemaleGT25", createFamilyPlanningCohort(fpAdministredConceptId, jadelConceptId,
familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, true, 60), parameterMappings);
familyPlanning.addRow("New - Jadel - Female - below 25", createFamilyPlanningCohort(fpAdministredConceptId,
jadelConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, false, 60),
parameterMappings);
familyPlanning.addRow("New - Jadel - Female - above 25", createFamilyPlanningCohort(fpAdministredConceptId,
jadelConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, true, 60),
parameterMappings);
familyPlanning
.addRow(
"Existent - Jadel - Female - below 25", createFamilyPlanningCohort(fpAdministredConceptId,
jadelConceptId, familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, false, 60),
parameterMappings);
familyPlanning
.addRow(
"Existent - Jadel - Female - above 25", createFamilyPlanningCohort(fpAdministredConceptId,
jadelConceptId, familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, true, 60),
parameterMappings);

// Condom - New Users (no interval)
familyPlanning.addRow("newCondomFemaleLT25", createFamilyPlanningCohort(fpAdministredConceptId, condomConceptId,
familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, false, 0), parameterMappings);
familyPlanning.addRow("newCondomFemaleGT25", createFamilyPlanningCohort(fpAdministredConceptId, condomConceptId,
familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, true, 0), parameterMappings);
familyPlanning.addRow("existentCondomFemaleLT25", createFamilyPlanningCohort(fpAdministredConceptId, condomConceptId,
familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, false, 0), parameterMappings);
familyPlanning.addRow("existentCondomFemaleGT25", createFamilyPlanningCohort(fpAdministredConceptId, condomConceptId,
familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, true, 0), parameterMappings);
familyPlanning.addRow("New - Condom - Female - below 25", createFamilyPlanningCohort(fpAdministredConceptId,
condomConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, false, 0),
parameterMappings);
familyPlanning.addRow("New - Condom - Female - above 25", createFamilyPlanningCohort(fpAdministredConceptId,
condomConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "F", 25, true, 0),
parameterMappings);
familyPlanning
.addRow(
"Existent - Condom - Female - below 25", createFamilyPlanningCohort(fpAdministredConceptId,
condomConceptId, familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, false, 0),
parameterMappings);
familyPlanning
.addRow(
"Existent - Condom - Female - above 25", createFamilyPlanningCohort(fpAdministredConceptId,
condomConceptId, familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "F", 25, true, 0),
parameterMappings);

// Condom - Males
familyPlanning.addRow("newCondomMaleLT25", createFamilyPlanningCohort(fpAdministredConceptId, condomConceptId,
familyPlanningConceptId, typeOfUserConceptId, newConceptId, "M", 25, false, 0), parameterMappings);
familyPlanning.addRow("newCondomMaleGT25", createFamilyPlanningCohort(fpAdministredConceptId, condomConceptId,
familyPlanningConceptId, typeOfUserConceptId, newConceptId, "M", 25, true, 0), parameterMappings);
familyPlanning.addRow("existentCondomMaleLT25", createFamilyPlanningCohort(fpAdministredConceptId, condomConceptId,
familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "M", 25, false, 0), parameterMappings);
familyPlanning.addRow("existentCondomMaleGT25", createFamilyPlanningCohort(fpAdministredConceptId, condomConceptId,
familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "M", 25, true, 0), parameterMappings);
familyPlanning.addRow("New - Condom - Male - below 25", createFamilyPlanningCohort(fpAdministredConceptId,
condomConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "M", 25, false, 0),
parameterMappings);
familyPlanning.addRow("New - Condom - Male - above 25", createFamilyPlanningCohort(fpAdministredConceptId,
condomConceptId, familyPlanningConceptId, typeOfUserConceptId, newConceptId, "M", 25, true, 0),
parameterMappings);
familyPlanning
.addRow(
"Existent - Condom - Male - below 25", createFamilyPlanningCohort(fpAdministredConceptId,
condomConceptId, familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "M", 25, false, 0),
parameterMappings);
familyPlanning
.addRow(
"Existent - Condom - Male - above 25", createFamilyPlanningCohort(fpAdministredConceptId,
condomConceptId, familyPlanningConceptId, typeOfUserConceptId, existentConceptId, "M", 25, true, 0),
parameterMappings);

// Add a single column for "Total" (all patients)
GenderCohortDefinition allGender = new GenderCohortDefinition();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ public ReportDefinition constructReportDefinition() {
String[] vaccinationConceptsListWithSequence = inizService
.getValueFromKey("report.MSPP.vaccination.vaccinationConceptsListWithSequence").split(",");

if (inizService.getConceptFromKey("report.MSPP.vaccination.isChildFullyVaccinatedQuestion.concept") != null &&
inizService.getConceptFromKey("report.MSPP.vaccination.yesAnswer.concept") != null) {
if (inizService.getConceptFromKey("report.MSPP.vaccination.isChildFullyVaccinatedQuestion.concept") != null
&& inizService.getConceptFromKey("report.MSPP.vaccination.yesAnswer.concept") != null) {
CodedObsCohortDefinition isChildFullyVaccinated = new CodedObsCohortDefinition();
isChildFullyVaccinated.setQuestion(
inizService.getConceptFromKey("report.MSPP.vaccination.isChildFullyVaccinatedQuestion.concept"));
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ ${project.parent.artifactId}.report.MSPP.visits.category1.label=Children under o
${project.parent.artifactId}.report.MSPP.visits.category2.label=Children aged 1 to 4 years old
${project.parent.artifactId}.report.MSPP.visits.category3.label=Children aged 5 to 9 years old
${project.parent.artifactId}.report.MSPP.visits.category4.label=Children aged 10 to 14
${project.parent.artifactId}.report.MSPP.visits.category5.label=Children aged 10 to 14
${project.parent.artifactId}.report.MSPP.visits.category5.label=Children aged 15 to 19
${project.parent.artifactId}.report.MSPP.visits.category6.label=Young adults aged 20 to 24
${project.parent.artifactId}.report.MSPP.visits.category7.label=Pregnant women
${project.parent.artifactId}.report.MSPP.visits.category8.label=Family planning clients
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/resources/messages_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ ${project.parent.artifactId}.report.MSPP.emergency.notInCategory.label=Soignés
${project.parent.artifactId}.report.MSPP.emergency.men=Hommes
${project.parent.artifactId}.report.MSPP.emergency.women=Femmes
${project.parent.artifactId}.report.MSPP.emergency.children=Enfants
${project.parent.artifactId}.report.MSPP.emergency.boys=Garçons 0-14 ans
${project.parent.artifactId}.report.MSPP.emergency.boys=Garçons
${project.parent.artifactId}.report.MSPP.emergency.girls=Filles
${project.parent.artifactId}.report.MSPP.emergency.0_14years=(0-14 ans)
${project.parent.artifactId}.report.MSPP.emergency.above14years=(15 ans et plus)
Expand Down
Loading