Skip to content

Commit

Permalink
Merge pull request #48 from palladiumkenya/ehr_reports
Browse files Browse the repository at this point in the history
Ehr reports
  • Loading branch information
makombe authored Apr 17, 2024
2 parents f8f4d68 + 0a83802 commit 128d368
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ public class ReportConfiguration extends AbstractContentConfiguration {

private Set<ReportDescriptor> cohortAnalysis;

public Set<ReportDescriptor> getEhrReports() {
return ehrReports;
}

public void setEhrReports(Set<ReportDescriptor> ehrReports) {
this.ehrReports = ehrReports;
}

private Set<ReportDescriptor> ehrReports;

/**
* Gets the cohort analysis reports
* @return the report descriptors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ public class ReportManager implements ContentManager {

private List<ReportDescriptor> cohortAnalysisReports = new ArrayList<ReportDescriptor>();

public List<ReportDescriptor> getEhrReports(AppDescriptor app) {
return filterReports(ehrReports, app);
}

private List<ReportDescriptor> ehrReports = new ArrayList<ReportDescriptor>();

@Autowired
private ProgramManager programManager;

Expand Down Expand Up @@ -93,6 +99,10 @@ public synchronized void refresh() {
if (configuration.getCohortAnalysis() != null) {
cohortAnalysisReports.addAll(configuration.getCohortAnalysis());
}
//Register ehr reports
if (configuration.getEhrReports() != null) {
ehrReports.addAll(configuration.getEhrReports());
}


// Register additional program specific reports
Expand Down

0 comments on commit 128d368

Please sign in to comment.