I am looking at pulling together about 6 to 10 different pieces of summary information on the patient dashboard from different observations, encounters.
I am wondering if there is any recommended approach or best practice rather than querying each value and putting it in session to display on the dashboard
@mseaton Is this something that reporting module would support, or do I go through pulling each piece of information via the ObsService?
In my recent work for iSantèPlus design (a customization of OpenMRS Reference App), I suggested that dashboard components be backed by Reporting Module reports with the HTML renderer. They would just need to do some programming to display the reports at the right place in the UI. This is still theoretical at this point.
@ssmusoke, when I need to do this kind of thing, I definitely use the reporting module API whenever possible. You could certainly use the ObsService / EncounterService / etc, but the various DataDefinitions that the reporting module exposes are intended to be more comprehensive, easier to use, and higher-performing both for single patients and cohorts of patients than the core OpenMRS services.
As @arbaughj and @dkayiwa have mentioned, there have been some efforts to formalize this usage. The patient summary module provides wrapper classes around reporting definitions and hooks (into the 1.x UI, AFAIK) that enable creating a ReportDefinition (containing the data of interest), and an HTML template for laying it out.
For our Malawi implementation, we retrieve data points for a custom patient summary similarly.
Happy to discuss further.