After the journey of 12 weeks, it’s time to wrap and submit my work to the mentors. In these weeks, I had lots of interaction with my mentors and other community members. And Finally, I completed my project under the guidance of Kaweesi Joseph and Herbert Yiga sir.

Project Link: Patient Search Criteria Module

What is the Patient Search Criteria Module?

One of the tasks of OpenMRS is to store patient details. To retrieve the patient's details, one can either use a patient’s ID or name. But this is not enough if you have a huge dataset. To solve this, I created new patient search criteria, which…


It’s time to wrap up. I spent my whole week to interact with mentors and other community members. Also, I work on PR to make it more perfect. As the size of the core app module is increasing more than expected, it starts giving an error on the PR. But I talked with other community members I solved the problem.

Now it’s time work on the final evaluation i.e. documentation😜 work. Everyone hates documentation work, but I think this is the most important part of the software development cycle because it helps other developers to understand your work. The final evaluation is the most important part of GSoC.


Coverage/Coveralls decreased’’ the unexpected problem everyone faces while creating a PR on Github. This week I spend my most time to understand what is the main reason behind this issue. Also, we decided to make an official patient search criteria module for OpenMRS.

Maintaining a well-tested codebase is mission-critical, but figuring out where your tests are lacking can be painful. You’re already running your tests on a continuous integration server, let it do the heavy lifting. Coveralls works with your CI to sift through coverage data to find gaps you didn’t know you had.

In my case, to check the…


As the patient search criteria module is working perfectly, it is time to move the functionality of the module to the openmrs core, as this is the main goal of the project. This was the task of this week.

To add the functionality of the module into the core, I added the class and related functions in the core. Also, I tried to reduce the size of code by using the Java stream API.

My PR: https://github.com/openmrs/openmrs-core/pull/2980

To actually use the patient search criteria, I also need to create REST resources, for that, I need to perform the changes in patient search handler in webservices.rest module. This is my goal of the next week.😃


After this week's task, I can say that my project is almost completed😃 . My goal for this week is to make UI functional i.e. add required functions in the PatientSearchWidget.js file. Now, the OpenMRS’s core apps module uses the REST resources of the PatientSearchCriteria module to provides different search criteria in the “Find Patients” widget.

Search and filter patients by birthdate and gender

At last, the task of creating a UI is completed 😁. New UI supports the user to enter the gender, birth date, and range of patient's age for searching the patients. Here is some screenshot of new UI:

Here you can filter the patient’s search result with the patient’s gender.

UI screenshot 1

To search or filter the patient’s search result with a range of age or birth date, the user needs to check the checkbox. It provides you two options, either you can enter a range of age or birth date of a patient. …


For me, this week is more about learning than the coding phase. This week I spent most of the time learning about GSP(Groovy Server Page). As the UI required for my module is built with GSP and Javascript in the openmrs-coreapp module.

To use patient search criteria in reference application, I need to add four more input fields which help the user to provides the input such as age, birthdate, gender. Current UI is as follow:


In the last week, I created a controller and resource for a patient search criteria module. This week, I added a web service search handler for patient search criteria resource. The search handler provides the different custom search capability for any resource.

With the help of search handler, module supports the following REST endpoints for patient search :

  1. byNameOrId: GET /ws/rest/v1/patientsearch/patient?q={NameOrId}
  2. byGender: GET /ws/rest/v1/patientsearch/patient?gender={M/F}
  3. byBirthdate: GET /ws/rest/v1/patientsearch/patient?birthdate={long int value of birthdate}
  4. byRangeOfAge: GET /ws/rest/v1/patientsearch/patient?from={min age}&to={max age}
  5. byNameOrIdAndGender: GET /ws/rest/v1/patientsearch/patient?q={NameOrId}&gender={M/F}
  6. byNameOrIdAndBirthdate: GET /ws/rest/v1/patientsearch/patient?q={NameOrId}&birthdate={long int value of birthdate}
  7. byNameOrIdAndRangeOfAge: GET /ws/rest/v1/patientsearch/patient?q={NameOrId}&from={min age}&to={max age}
  8. byNameOrIdAndGenderAndBirthdate: GET /ws/rest/v1/patientsearch/patient?q={NameOrId}&gender={M/F}&birthdate={long int value of birthdate}…

First of all, this week we had GSoC first evaluation. In the evaluation, we shared our experience of interaction with the community and feedback by giving answers to questions asked in the first evaluation sheet.

This week, I decided to work on the extra credit of the project. For that, I created a public post in OpenMRS Talk, the post describes the different kinds of patient search criteria I developed and request for any suggestions from the community. Community members appreciated my work and gave suggestions to work on the REST resources. …


This week, my goal was to complete the module. All the logic functions and test cases in the module are completed in the last three weeks. So, this week, I have work on the dependency of the module, so it can easily build with the help of maven. The module depends on the openmrs core for the index generation of the person class. I did some changes in the openmrs core, so it can generate the index for the person class but these changes were not merged with the official openmrs core on GitHub, so I can not use the…

Rushi Chaudhari

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store