GSoC 2017 Final Report

It’s the end of the GSoC 2017 and here is my final report.

The photo below is from my colleague Ujjwal Arora‘s blog. I hope he doesn’t sue me :D.

gsoc-lh

 

Project Title

Radiology Reporting Enhancements Continuation

Description

The LibreHealth Radiology Module provides features of a Radiology Information System powered by LibreHealth Toolkit. In the past the module could only create free text reports. To report a completed radiology order such as an x-ray examination, users of the module were presented with simple text field that they fill in their reports and on submission this text is stored inside the database as a string. But this was too limiting as radiologists use templates to create reports.

My task as GSoC student was to provide a means where users of this module will be able to use already developed templates to report their observations and store them as Complex Obs. Some of these templates can be downloaded from http://radreport.org/. These templates are in HTML 5 format.

Note support for MRRT report templates was provided last year during GSoC 2016. After GSoC 2016 the module was able to import MRRT report templates but it did not use these templates in the creation of reports yet. https://ivange94blog.wordpress.com/2016/08/20/gsoc-2016-final-evaluation/

Team

  • Student (me)
  • Mentors
    • Judy Gichoya (Radiologist, US)
    • Ankit Rastogi (Medical Doctor, Canada)

I’d also like to acknowledge the org admin for  LibreHealth Robert (Robby) O’Connor for the smooth running of the programming and always making sure we don’t miss any GSoC deadline. Thank you.

Both LibreHealth and the OpenMRS community helped me a lot with my queries. At OpenMRS Daniel Kayiwa was always there to answer my questions on IRC and https://talk.openmrs.org. A lot of other community members in OpenMRS also responded to my queries.

Work Done

Backend work

None of my code has been merged and hardly reviewed. I communicated my progress to my mentors using screenshots of the working software and documentations on my weekly blogs. All the work that was done for the backend can be found in the gsoc2017 branch on my fork of LibreHealth Radiology.

I started the coding phase by trying to make the radiology module a fhir server. I thought it was theoretically impossible as the docs on implementing a fhir server talked of java web applications with their own web.xml deployment descriptor while the radiology module was not a web application on it’s own but need a server which was the actual web application and I may be right. After spending almost half of the first coding phase working on this with no progress, my mentors decided I continue with the primary goals of my GSoC project which was to use MRRT report templates in the creation of reports and also build a new UI for the radiology module. For more information on this, visit the links below

https://gitlab.com/librehealth/lh-radiology/issues/16

https://ivange94blog.wordpress.com/2017/06/04/gsoc-week-1/

https://ivange94blog.wordpress.com/2017/06/13/gsoc-week-2/

https://forums.librehealth.io/t/gsoc-project-radiology-reporting-enhancements-continuation/817/6

https://forums.librehealth.io/t/gsoc-project-radiology-reporting-enhancements-continuation/817/7

The two major changes to the backend was the creation of radiology reports using MRRT report templates and storing them as Complex Obs and refining of the REST API.

Create reports using MRRT templates

Modified the claim report section of the radiology order details page to provide option for creating MRRT reports

Screen Shot 2017-08-26 at 11.54.44 PM

Author report using an imported MRRT report template

Screen Shot 2017-08-27 at 12.07.58 AM

Once your report is saved, you can view it in the editor and can also download a copy of it as html since it’s been stored as Complex Obs and complex obs handles the saving of the report as a file.

I turned off template validation. It was decided that the module will not validate these templates. That validation will be left for radreport.org.

Commit Save radiology reports as complex obs. This commit actually holds a lot more than it’s title suggest. Since my code was not been reviewed and merged during the program, I found my self pushing to this branch and having too many unmerged commits to follow up at once so I had to squash all in one commit.

For documentation on how to use this feature, visit https://ivange94blog.wordpress.com/2017/08/21/creating-a-radiology-report-using-mrrt-report-template-librehealth-radiology/

REST API work

I also worked on the REST API for the radiology module. I faced a lot of difficulties here as the REST module was not properly documented and it was kind of hard to figure things out on my own. I sometimes had to place breakpoints in the code and run it in debug mode and followed the workflow just to understand how things work and how to make modifications. Sometimes I figured things out by a lot of tries and errors.

I implemented the REST endpoint for /radiologyorder to GET/POST/DELETE radiologyorders

Screen Shot 2017-08-27 at 1.27.08 AM

Commit Implement the newDelegate and save methos to create radiology order

Frontend

After research and discussions with my mentors we decided to use Angular 4 for our frontend. Angular 4 is component based and really easy to work with.

I had to pick up Angular on the fly. I had no previous experience working with Angular so I started with a course on Udemy. But I didn’t finish the course. Was going to take a while to finish it so I just used the Angular docs.

The code for the new UI is hosted on my github repo

https://github.com/ivange94/lh-radiology-owa

Dashboard

Screen Shot 2017-08-27 at 1.37.03 AM

Add order

Screen Shot 2017-08-27 at 1.38.43 AM

Order detail

Screen Shot 2017-08-27 at 1.40.28 AM

Edit report

Screen Shot 2017-08-27 at 1.41.43 AM.png

Report templates

Screen Shot 2017-08-27 at 1.42.42 AM.png

The above screenshot show some components of the UI.

The UI is simple, user friendly and responsive. And at the back it’s built with reusability in mind.

My next plans

  • code, code, code
  • Run my Java User Group
  • Have fun
  • continue working on LibreHealth Radiology
  • Travel for Open Source Summit North America
  • Travel for QCon San Francisco
  • Mentor Google Code-in 2017
  • Mentor Google Summer of Code 2018

I’m currently the only one contributing code to the radiology module. There’s a lot of work left to make the radiology module ready for it’s first release. I plan to form a team to work on the radiology module. I run a Java User Group in my community and I’ll be bringing in two enthusiastic members from the group to join me work on the module. This will be great a experience for us. For me I’ll be gaining experience running a team and for them it’ll be good learning experience and first time exposure to open source.

Together we’ll

  • Remove the legacyui from the radiology module so the module is left only with the Java API and REST API. We’ll be using the new UI moving forward.
  • Implement REST endpoints for the other radiology resources /radiologyreport, /mrrtreporttemplate and /radiologymodality
  • Clean up the UI code and move it to LibreHealth GitLab repo.
  • Work on packs server integration
  • Design and implement a more feasible solution for FHIR integration with radiology

Commits

Save radiology reports as complex obs

Implement the newDelegate and save methos to create radiology order

https://github.com/ivange94/lh-radiology-owa/commits/master?author=ivange94

Skills Acquired

I picked up Angular 4 on the fly

Learned how to work with minimal supervision

Understood more about the codebase and what improvements are needed.

References

https://forums.librehealth.io/t/gsoc-project-radiology-reporting-enhancements-continuation/817

https://summerofcode.withgoogle.com/projects/#5824169460629504

https://forums.librehealth.io/t/rest-module-does-not-document-post-for-radiologyorderresource/994

https://forums.librehealth.io/t/why-do-i-get-404-on-javascript-files-that-are-present-my-application-root-in-an-angular-2-owa/949

https://forums.librehealth.io/t/caused-by-java-lang-classnotfoundexception-javax-servlet-servletregistration/797/5

https://forums.librehealth.io/t/dependency-issues-with-making-the-radiology-module-a-fhir-server/766

Since LibreHealth Radiology is a fork of the OpenMRS Radiology module. I made use of the OpenMRS forums to get a wider audience to my problems. Below is a list threads I opened in OpenMRS

https://talk.openmrs.org/t/creating-a-radiologyorder-via-rest/12878

https://talk.openmrs.org/t/rest-module-does-not-document-post-for-radiologyorderresource/12830

https://talk.openmrs.org/t/rational-for-defining-the-display-property-on-resources/12818

https://talk.openmrs.org/t/search-concepts-by-concept-class-via-rest/12800

https://talk.openmrs.org/t/why-do-i-get-404-on-javascript-files-that-are-present-my-application-root-in-an-angular-2-owa/12465

https://talk.openmrs.org/t/sdk-failure-when-using-the-watch-goal/11969

https://talk.openmrs.org/t/help-understanding-how-datadelegatingcrudresource/11898

https://talk.openmrs.org/t/reports-saved-a-complex-obs-dont-show-up-on-obs-section-on-patient-dashboard/11889

https://talk.openmrs.org/t/can-a-module-have-its-own-database-configs-different-from-core/11782

https://talk.openmrs.org/t/help-understand-how-openmrs-works-with-fhir/10730

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s