Getting Summary information for patients, appointments & others

Hi All,

We are creating a user based custom dashboard (React based). It needs to show summary informations like number of patients registered per month, Number of missed appointments per month & other reports.

These information will be show in dashboard as line charts & summary tables.

To get those summary information, we are creating custom reports (using SQL dataset) and consuming them using rest APIs. We want to know is there any other better OpenMRS way to get summary information like this.

@mksd, @angshuonline, @wyclif

Hi @mseaton, would you have a sample report definition somewhere that does something like that? Like each row would be the count of the same cohort but for a different period?

The final output would be something like that:

Period Count
December 23
November 17
October 34

Did you consider this?

@dkayiwa Yes. We are already using reportingrest API for consuming the custom report we have created.

@mksd, I can check but it’s possible the existing RepeatPerTimePeriodDataSetDefinition will provide what you are looking for

1 Like

If this can be used with EncounterCohortDefinition then it looks like it could be it.

@rrameshbtech I think you should stick to the SQL-based report definition for now, as long as it is tested it will be straightforward to change the implementation later on. Unless of course you have some room now to try out RepeatPerTimePeriodDataSetDefinition with EncounterCohortDefinition.

Thanks @mseaton & @mksd.

I have tried using RepeatPerTimePeriodDataSetDefinition. But I am unable to continue as I was not able to find any result (Shows server error in demo website when try to run a sample dataset definition ) and I unable to find any documentation to know how to use it. Is there any document which I missed?

Yes @mksd. I also hope, we can stick to SQL based report definition. It can be tested only through integration tests. Let’s check.

By integration test you mean Spring context sensitive test? If yes then that’s fine.

For the record there’s an example here:

But again we don’t have to dive into it now, we can look at this after the Spring tests are in place.

are u asking if there’s any other way besides using the reporting framework?

@rrameshbtech I guess you are looking for

I would encourage, if the required reports aren’t available, we can discuss further on implementing in this existing module.

Yes. If any thing better & quick.