Skip to content

Commit

Permalink
Merge pull request #915 from EyeSeeTea/feature/revert-de-analytics
Browse files Browse the repository at this point in the history
Revert "Include DEs on analytics"
  • Loading branch information
adrianq authored Nov 17, 2021
2 parents 37a8d68 + 71503c4 commit c243f3f
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/domain/events/usecases/EventsSyncUseCase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,10 @@ export class EventsSyncUseCase extends GenericSyncUseCase {
programs?.map(({ programIndicators }: Partial<D2Program>) => programIndicators?.map(({ id }) => id) ?? [])
);

const dataElementsByProgram = _(programs)
.flatMap(({ id, programStages }: Partial<D2Program>) =>
_.flatMap(
programStages,
({ programStageDataElements }) =>
programStageDataElements.map(({ dataElement }) => `${id}.${dataElement.id}`) ?? []
)
)
.value();

const { dataValues: candidateDataValues = [] } = enableAggregation
? await aggregatedRepository.getAnalytics({
dataParams,
dimensionIds: [...directIndicators, ...indicatorsByProgram, ...dataElementsByProgram],
dimensionIds: [...directIndicators, ...indicatorsByProgram],
includeCategories: false,
})
: {};
Expand Down

0 comments on commit c243f3f

Please sign in to comment.