GSoC 2018 - Improved built-in reports project

gsoc2018
Tags: #<Tag:0x00007efda9532098>

(Rafal Korytkowski) #1

Hi @sumangala28,

Congrats again on being selected to work on the project!

I’d like us to use this topic for a regular communication around the project including daily reports on your progress, blockers and links to any new blog posts. It will help me, @k.joseph and others to follow your work.

Once coding period starts the minimum I’d like to see from you is one post a day listing items you worked on in the past 24 hours and what you plan to do next.


(Jeyasumangala Rasanayagam) #2

Hi @raff and community,

Thank you for OpenMRS community for believing in me and selecting me for the project. And thanks to my mentors @raff and @k.joseph for the guidance and support for this project.

I am working on built-in Reports module. This thread is used for posting the project updates and related questions regarding the project. Thank you @raff to create this thread.

Built-in Reports Module

There is an existing OWA(Open Web App) module called built-in reports for reference application distribution. This module was implemented to provide more statistical information in more meaningful ways. It has used charts and other graphs to demonstrate some information to the users. we can see there is a big potential in this module as it can be used to give more analytical information about the entire system level data.

The module has been implemented with the help of OpenMRS reporting module and OpenMRS REST API module. Currently, there are 10 reports already implemented. We expect more reports to be available which are crucial for administrative decisions within a clinical environment.

Please go through this wiki documentation to get more about the project - https://wiki.openmrs.org/display/projects/Improved+Built-In+Reports+module


I am excited to work on this project and write code for OpemMRS and contribute to the community.

For any suggestions and questions please feel free to post here and help me to complete this project as good as possible :slight_smile:.

Regards,


(Rafal Korytkowski) #3

I see you posted a request to move the repo. You can start coding on your fork before it is done.

We’ll skip the first objective for now about extracting react components out of our OWA until the openmrs-contrib-reactcomponents effort led by @mogoodrich will be ready for contributions and we have a consensus on how it should work :slight_smile:

Meanwhile, please pick up this objective: “In List of Diagnosis report, once a table row is being clicked, it should redirect to a new view which shows patients who were affected.” It should be easy enough to start with.


(Jeyasumangala Rasanayagam) #4

Hi @raff

I see you posted a request to move the repo. You can start coding on your fork before it is done.

Yes, and I have sent a mail to OpenMRS helpdesk for requesting a new JIRA project for this module. Hope I can make it within this week.

We’ll skip the first objective for now about extracting react components out of our OWA until the openmrs-contrib-reactcomponents effort led by @mogoodrich will be ready for contributions and we have a consensus on how it should work :slight_smile:

I also thought to skip this now to work on other objectives.

Hello @mogoodrich, In my GSoC project, there is an objective defined to create a reusable react elements for the future usage. I have planned to create the

  1. OpenMRS header
  2. OpenMRS breadcrumbs
  3. OpenMRS body layout
  4. Side Left Menu view
  5. Table content view

In the meantime, I have seen about your attention to create the common reusable react elements for OpenMRS.

As I discussed with @raff, I’m waiting for your guidance and direction to put my contributions to this module also.

Meanwhile, please pick up this objective: “In List of Diagnosis report, once a table row is being clicked, it should redirect to a new view which shows patients who were affected.” It should be easy enough to start with.

Thanks @raff, I will look into this objective and start to work on this.

I will use my own repository for keeping the commits and changes until we have a project and repository under the OpenMRS.


(Mark Goodrich) #5

@sumangala28… nice to meet you!

Yes, these components are should definitely live in the openmrs-contrib-reactcomponents module!

As you can tell by looking at the code, it is very much in the early stages, so, yes, I think it is fine to work on your other objectives first. But almost don’t be afraid to contribute to “reactcomponents:” as well! I’m a React newbie myself, so feel free to take a look at the code and please don’t hesitate to make suggestions/issue pull requests if you have things that you are creating that you think would be best to “live” there.

If you take a look, right now all I have a dummy header with one piece of dynamic content (session location) just as a example of how things might be structured.

Take care! Mark


(Jeyasumangala Rasanayagam) #6

Thank you so much @mogoodrich for the great initiative to build this module. I will look into the tickets related to this module and start to work on some tickets.


(Mark Goodrich) #7

Sure, keep me posted!


(Jeyasumangala Rasanayagam) #8

Hi @raff,

I started to work on the Diagnosis report part. I have explored the existing changes done by @judeniroshan in the reference meta-data module, reporting module, reporting rest module, and build-in-reports OWA. I was able to understand the work flow to create a new report.

I’m playing among the modules to create a new report to show the patient information based on the diagnosis. Let me work on it and will post it here, if I have any issues at there.


Further, I am very happy to inform you that the JIRA project for Build-In-Reports module was created. Please use this following link to go there,

https://issues.openmrs.org/projects/BIR

@raff, Shall I create the whole tickets for my objectives or create one by one while working on the objectives?


(Rafal Korytkowski) #9

Please create a ticket for the current objective for now.

I’ll have a look at other objectives and see if we want to break them down into more issues.


(Jeyasumangala Rasanayagam) #10

Thanks @raff. I will create a ticket for the diagnosis report with patient information implementation.


(Jeyasumangala Rasanayagam) #11

Hi @raff

I started working on the Patient Information Report for a selected Diagnosis. First I wanted to create a ListOfPatientsForADiagnosis API in the referencemetadata module.

I would like to use ListOfDiagnosis report API as a sample for my work. I was able to understand the API structure and database queries at there. But I need some clarifications on the ListOfDiagnosis report API in referencemetadata module.

  1. What is the Data_set_uuid in this API? How can I find it for a new report API?
  2. Where can I get this excelDesign UUID propertery for a new report?

(Rafal Korytkowski) #12

I think these are randomly generated for the purpose of uniquely identifying objects being created in this component. You can create random uuids at e.g. https://www.uuidgenerator.net/


(Jeyasumangala Rasanayagam) #13

Thanks for the information @raff.

I am still working on the Diagnosis report section to create a new report for Patient Report for a selected Diagnosis. I have explored the database fields, and decided to display these information to the reports,

  • Patient Given Name - Middle Name - Last Name (Good to merge these and have one column as Patient Name)
  • Patient Gender details through M/F text or Male/Female.
  • Last Encountered Date (If same diagnosis was encountered for two times, then It will show the latest date)
  • Total number of encounters for this diagnosis for that patient.

I have successfully created a ListOfPatientsForADiagnosis report API in referencemetadata module. Actually I followed the ListOfDiagnosis report API to create a new one. Then I have deployed into my local instance and I was able to retrive the patient information for given Diagnosis UUID. This API will request these following parameters to serve the report,

  1. Start date
  2. End date
  3. Diagnosis Uuid

I am very happy to inform you that, I was able to create a new report as “Patient List for a Diagnosis” and I could get the view in built-in-reports OWA. I have annexed some screen shots of the OWA here.

Diagnosis Report

List of Patients for Diagnosis Report

Please have a look at here and give some comments for the improvements :slight_smile:.

CC : @raff, @k.joseph


(Jeyasumangala Rasanayagam) #14

Hi @raff

I have changed the content of the List of Patients for Diagnosis Report. The updated content will contains these following columns,

  1. Patient Name ( Given Name - Middle Name - Last Name)
  2. Gender
  3. Last Encounter Date
  4. Total encounters which have this diagnosis

And the Chart below the table will indicate the number of patients who affected by this diagnosis against months. The updated view is given below,


(Rafal Korytkowski) #15

Thanks @sumangala28! Looks great. A few modifications:

  1. Please add an “Identifier” column with patient primary identifier and a link to a patient dashboard.
  2. Change Encounter Date to “Last encounter date”
  3. Change “List of Patients affected by this Diagnosis” to "Patients affected by "
  4. Change “Patient registered between” to “Encounters between” (please correct it on the previous view as well), can you make it like on the previous screen with date pickers?

How many patients does it list? If we want to list more than e.g. 50 patients then we need pagination.

Have you created an issue in JIRA? I don’t see one. Please submit a pull request for code review.

Once done let’s pick the next objective: New patient Registrations view and Number of patient registrations view , bar chart should have flexibility to change the view, Like, see by dates, by weeks, by months etc.


(Jeyasumangala Rasanayagam) #16

Hi @raff

I will make these changes into the module and send the PR soon.

can you make it like on the previous screen with date pickers?

Actually users will select the diagnosis between a date frame using the date time picker in the Diagnosis report, and then they will be redirected to the new patient list report. So I preferred to use the existing selected date frame for this as well.

How many patients does it list? If we want to list more than e.g. 50 patients then we need pagination.

I would like to limit the number of patients in the table to 20 or 10 for a given date period who has higher number of encounters with that diagnosis. Because I feel, adding pagination will reduce the view size of this table. What do you think about this?

Have you created an issue in JIRA? I don’t see one. Please submit a pull request for code review.

I have created some tickets in the JIRA, Can you please review it and change the status of the ticket for work?

  1. https://issues.openmrs.org/browse/BIR-1
  2. https://issues.openmrs.org/browse/BIR-2
  3. https://issues.openmrs.org/browse/RA-1499

Once done let’s pick the next objective: New patient Registrations view and Number of patient registrations view , bar chart should have flexibility to change the view, Like, see by dates, by weeks, by months etc.

I will start to work on this as well. Thanks @raff for the information.


(Rafal Korytkowski) #17

@sumangala28, I asked for daily reports on what you were able to accomplish during a day. I didn’t hear from you on Thursday and Friday. Could you please list what you did since your last message here?


(Jeyasumangala Rasanayagam) #18

Hi @raff,

I started work on the Next objective last Thursday.

  • While working on that, I found some bugs in the exiting reports and the queries which displayed some duplicate data in the tables due to the grouping problem. I have fixed those bugs right now. I will send the PRs with the tickets today night. (https://issues.openmrs.org/browse/RA-1500)

  • Number of Patients report doesn’t show any information at the begging before selecting the location. So I have tried to display the locations with counts in the initial view

  • Worked on the New patient Registrations reports to change the view depend on the selection (on progress).

I will send the PR for these following tickets today night with the weekly report submission.

  1. https://issues.openmrs.org/browse/BIR-11
  2. https://issues.openmrs.org/browse/BIR-21
  3. https://issues.openmrs.org/browse/RA-14991

Thanks.


(Jeyasumangala Rasanayagam) #19

Hi @raff

I have committed my code to the repository. Could you please review these PRs,

  • Create Patients affected by Diagnosis report for given Diagnosis id - RA-1499
  • Change the ReportAsTable class to support the hyperlink for required reports - BIR-2
  • Improve the Diagnosis Report in the Built-in-Reports module - BIR-1

Thanks.


(Jeyasumangala Rasanayagam) #20

Hi @raff,

Please review and help me to change the status of this tickets,

  1. https://issues.openmrs.org/projects/RA/issues/RA-1501
  2. https://issues.openmrs.org/projects/BIR/issues/BIR-3
  3. https://issues.openmrs.org/projects/BIR/issues/BIR-4

I have mistakenly canceled a issue in RA. Could you please help me to change the status of this ticket for working?

  1. https://issues.openmrs.org/projects/RA/issues/RA-1500

These tickets are waiting for the Testing. Please have a look at here if you have time :slight_smile:

  1. https://issues.openmrs.org/projects/BIR/issues/BIR-1
  2. https://issues.openmrs.org/projects/BIR/issues/BIR-2
  3. https://issues.openmrs.org/projects/RA/issues/RA-1499

Thanks.