Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Table of Contents

Table of Contents
excludeTable of Contents

Design and Configuration

The Report capabilities of Presentation Services is currently using SpagoBI as reporting service. The code was designed having multiple reporting services in mind, but it is still coupled to Spago.

The generic interface to communicate with an external Reporting Server is  org.socraticgrid.report.api.ReportServiceIFace. The concrete implementation being used in runtime can be configured using spring in the file kmrReports.xml located in PresentationService's configuration directory.
Currently, there is only 1 implementation of this interface called  com.cognitivemedicine.report.service.ReportServiceImpl. This implementation is not part of PresentationServices code.

The configuration of the available reports is done using 3 different tables: ReportTemplates, ReportParameters and ReportRoles.

ReportTemplates Table

This table contains the list of all available reports in the system. This table is still tightly-coupled to Spago. 

Column NameTypeDescription
ReportTemplateIdintegerThis id the auto-generated id of each entry.
NamestringThe user-friendly name of the report.
SpagoIdstringThe id of the report template in Spago server.
SpagoNamestringThe id of the report template in Spago server.
CreatedBystringName of the creator of the report. (This field is not related in any way to Users table. Its value is only descriptive)
TypestringThe type of the report as stated by Spago specifications.
DatasetIdintegerThe id of the dataset of this report in Spago.
EngineIdintegerThe Engine id of the report as stated by Spago specifications.

ReportParameters Table

Column NameTypeDescription
ParameterIdstringThis id each entry.
ReportTemplateIdintThe id of the Report Template where this parameter belongs.
ParameterOrdinalintThe order of this parameter in the generated form.
ParameterLabelstringThe user-friendly label that should be displayed in the UI when the template's parameters form is displayed.
ParameterNamestringThe name of the parameter (this parameter is not currently being used).
ParameterTypeENUMPossible values: ['text', 'number', 'date', 'label', 'datetime-local', 'organization-combobox', 'facility-combobox', 'workspace-combobox']
ParameterURLstringThe identifier of this parameter in Spago BI.
NullablebooleanIndicates whether this parameter is nullable or not.

 

The supported parameter types are basically the same as in SurveyQuestions.AnswerType (From the Surveys API) with the addition of:

  • organization-combobox: this type will generate a combobox widget with all the Organizations where the User has LIST_PATIENTS_* permissions.
  • facility-combobox: this type will generate a combobox widget with all the Facilities where the User has LIST_PATIENTS_* permissions. If a parameter of this type is specified, then a parameter with type organization-combobox must be also configured. The generated widget will filter the available Facilities according to the Organization selected in the Organization's combobox.
  • workspace-combobox: this type will generate a combobox widget with all the Workspaces where the User has LIST_PATIENTS_* permissions. If a parameter of this type is specified, then a parameter with type facility-combobox must be also configured. The generated widget will filter the available Workspaces according to the Facility selected in the Facilities' combobox.

API

List Report Templates

Current Implementation

...

Name
Type
Mandatory
Description
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
reportTemplateIdStringYesThe Id of the Report Template to be executed.
<report-specific-parameters>N/ANoEach specific Report Template has a set of parameters (mandatory or not) that must be present in the request.

...