Skip to content

Commit

Permalink
POC-392: added report
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqedme committed Feb 15, 2024
1 parent 30ac718 commit 56dd9a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/reporting-framework/base-mysql.report.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ import * as txrtt_aggregate_report from './json-reports/tx-reports/tx-rtt/tx-rtt
import * as txrtt_base_report from './json-reports/tx-reports/tx-rtt/tx-rtt-report-base.json';
import * as txrtt_summary from './json-reports/txrtt-summary.json';

//ahd report
import * as ahd_monthly_summary from './json-reports/ahd';
export class BaseMysqlReport {
constructor(reportName, params) {
this.reportName = reportName;
Expand Down
5 changes: 3 additions & 2 deletions app/routes/ahd-monthly-summary.route.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ const routes = [
['endDate', 'locationUuids'],
requestParams
);
reportParams.requestParams.isAggregated = true;

reportParams.requestParams.isAggregated = true;
console.log('ReportParams', reportParams);
let service = new AHDMonthlySummaryService(
'ahdMonthlySummaryReport',
reportParams.requestParams
);
service
.getAggregateReport()
.getAggregateReport(reportParams)
.then((result) => {
reply(result);
})
Expand Down
2 changes: 2 additions & 0 deletions service/ahd-monthly-summary.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export class AHDMonthlySummaryService extends MultiDatasetPatientlistReport {
super(reportName, params);
}
getAggregateReport(reportParams) {
console.log('Here: ', reportParams);
const that = this;
return new Promise((resolve, reject) => {
super
Expand All @@ -24,6 +25,7 @@ export class AHDMonthlySummaryService extends MultiDatasetPatientlistReport {
} else {
let finalResult = [];
const reportProcessorHelpersService = new ReportProcessorHelpersService();
console.log('ReportParams: ', reportParams);
for (let result of results) {
if (
result.report &&
Expand Down

0 comments on commit 56dd9a1

Please sign in to comment.