/
Solution proposal for task OH2-148

Solution proposal for task OH2-148

 Task

The aim is to make OH Web dashboard data available for download. So the user could export data in the desired format (PDF, CSV, EXCEL, …).

Link of Jira issue : https://openhospital.atlassian.net/browse/OH2-148

 Solutions

There are two approaches :

  1. Send a request to the backend. The backend design a file, fill it with requested data and send back the file to the frontend.

  2. In the frontend, export data provided by the backend in the format specified by the user.

Solutions analysis

Solution 1

Description

For this solution, the biggest part of the work is on the backend side. The backend designs a new controller to download data related to OPD, admissions, discharges, …, everything needed. Every endpoint of this controller accepts some parameters to filter data and return a file as HTTP response. Also, every endpoint defines a parameter that will be used to set the format of data to download.

On the frontend, download options are added to dashboard UI components and a new component for download status is created. When the user click on the download button of a dashboard component, available data formats are shown and when the user choose one format, a request is designed using the same parameters that were used to fetch dashboard and sent to right backend endpoint.

Pros of this solution

  • Centralization of data download logic.

  • The backend is better equipped to achieve this kind of task. In fact, there is very powerful library, JasperReports, that is already present in the backend. With this library, we design a report one time and we can generate report in many format (PDF, CSV, HTML, XML, …).

  • The same logic could be used when it will come to work on reporting module (if reporting module will be added in OH web).

  • Might take less time to implement.

Cons of this solution

  • Needs the design and creation of new resources in the backend.

Time estimation

Concerning backend side, I don’t know how long it could take to provide necessary resources.

From the frontend side, the following table shows an estimation of the time it could take to complete this task :

Sub-task

Time estimation

Sub-task

Time estimation

Add download options on dashboard components

2 days

Create download status component

2 days

Configure state for data download

2 days

Tests

1 day

Solution 2

I’m making researches for this solution, the next lines are just a draft for the moment

Description

 

Pros of this solution

  •  

Cons of this solution

  • May cause performance issue because data will be fetched and stored in the frontend before they’re exported into desired format.

  • If there is many clients (apps) for the backend, every client will have to develop its way to download dashboard data.

  •  

Time estimation

 

 

Related content

Time estimation for tasks OH2-191 and OH2-194
Time estimation for tasks OH2-191 and OH2-194
More like this
Documentation guidelines
Documentation guidelines
Read with this
OH2022 - Dashboard
OH2022 - Dashboard
More like this
UI - Http connection library
UI - Http connection library
More like this
Open Hospital 2.x Dashboard
Open Hospital 2.x Dashboard
More like this
2020-04-02 Call 11 Working Group
2020-04-02 Call 11 Working Group
More like this

Open Hospital powered by ISF
2005 - 2016 ISF © Informatici senza frontiere - ONLUS