GSoC 2021 Project: The REST of Administration

@dkayiwa @gcliff

I’ve just posted a pull request for RESTWS-821

Added REST resource with links to administration pages of installed modules.

It can return a list of all administration links for installed modules at /openmrs/ws/rest/v1/administration-links/ .

It can also return list of administration links for given module id at /openmrs/ws/rest/v1/administration-links/{moduleId} .

Example response body can be found here: { "results": [ { "uuid": "webservices.rest", - Pastebin.com

PR with documentation: https://github.com/openmrs/openmrs-contrib-rest-api-docs/pull/140

To not rely on LegacyUI, I’ve copied AdministrationSectionExt from openmrs-module-legacyui/AdministrationSectionExt.java at master · openmrs/openmrs-module-legacyui · GitHub into omod-common module. I’m wondering if that’s a good solution though. If I didn’t include this class, the SwaggerSpecificationCreatorTest test would fail with NoClassDefFoundError. What do you think I should do with this? Fix the test and not include the Ext class or just leave it like right now?

Another solution to this problem would be to include AdministrationSectionExt class in openmrs-core project.

I’ve also posted a pull request for RESTWS-822.

After investigating, it turned out that the UserResource already supports such a filter, and you would only need to append includeAll=true parameter to retrieve all users, including disabled ones.

#gsoc2021

1 Like

I have just posted pull requests for RESTWS-823

It was a basic CRUD Resource for Alert metadata object.

You can see all available operations and examples of request/response bodies in REST documentation PR.

Code PR: https://github.com/openmrs/openmrs-module-webservices.rest/pull/485

Docs PR: https://github.com/openmrs/openmrs-contrib-rest-api-docs/pull/143

cc: @dkayiwa @gcliff

#gsoc2021

2 Likes

I’ve posted a pull request for RESTWS-841

I had to add some REST API documentation for the RelationshipTypeResource which will be used for People Management task.

PR: https://github.com/openmrs/openmrs-contrib-rest-api-docs/pull/144

cc: @dkayiwa @gcliff

#gsoc2021

1 Like

By the way, I have a question to you.

I want to implement this task RESTWS-842.

It involves exposing PatientService.getDuplicatePatientsByAttributes() through REST. Should I just add this functionality to doSearch method in PatientResource1_8 or should I create new resource/controller ?

cc: @dkayiwa @gcliff

#gsoc2021

EDIT: Blocker

When I’m trying to use Find Patients to Merge on any two attributes related to Patient’s names, it throws SQL Exception.

I’ve made a separate thread for it: https://talk.openmrs.org/t/find-patients-to-merge-throws-sqlexception/33822/3

1 Like

I’ve created an issue for the blocker I’m having on RESTWS-842

https://issues.openmrs.org/browse/TRUNK-6008

#gsoc2021

1 Like

I’ve just posted a PR for https://issues.openmrs.org/browse/RESTWS-838

My task was to add REST API documentation for IdentifierSourceResource from idgen module.

My next tasks will be to resolve a previous blocker: https://issues.openmrs.org/browse/TRUNK-6008 and to work on a new issues from our list: https://issues.openmrs.org/browse/RESTWS-839

#gsoc2021

EDIT: Just posted a PR for the latest blocker: https://github.com/openmrs/openmrs-core/pull/3810

I’ve just posted a PR for https://issues.openmrs.org/browse/RESTWS-839

My task was to add REST API documentation for AutoGenerationOptionResource from idgen module.

My next tasks will be a next REST API docs task: https://issues.openmrs.org/browse/RESTWS-840

Meanwhile, I’m waiting for my blocker resolution to be merged.

EDIT: New PR: RESTWS-840: Add documentation for LogEntryResource by BartlomiejRasztabiga · Pull Request #147 · openmrs/openmrs-contrib-rest-api-docs · GitHub

Long time without updates! :slight_smile:

We’ve been able to close quite a few issues this week:

These await code review:

And these are in active development:

The last one is blocked by another issue: TRUNK-6010

We’ve found that there were more issues with HibernatePatientDAO.getDuplicatePatientsByAttributes than initially thought. However, I’ve already submitted my PR with a fix here: https://github.com/openmrs/openmrs-core/pull/3814

In the upcoming week, I’m planning to close any currently reviewed/in progress tasks and move to RESTWS-829 which will be quite significant.

#gsoc2021

1 Like

Another update!

The following issues have been closed this week:

We’ve finally merged an issue TRUNK-6010 which blocked RESTWS-842. However, we couldn’t add appropriate tests to it in REST-WS module, as it doesn’t have access to the newest Core module (2.5 SNAPSHOT). That’s why we’ve decided to ignore those tests for now and unignore them after 2.5 version release.

There is 1 task currently undergoing a code review:

And there are 2 tasks currently in progress:

A quick note about RESTWS-829, initially I thought this task would involve coding. However, after investigating for a bit, it turned out that there are already REST Resources that fulfill the functionality of corresponding Legacy UI pages. That’s why I will only need to prepare the documentation, but it’s going to be significant, as I will have to document at least 6 resources :slight_smile:

In the upcoming week, I’m going to work on the two issues above as they are pretty significant in the volume of work needed.

#gsoc2021

1 Like

Post-eval update.

The following issue has been closed this week:

There are also 2 tasks currently undergoing a code review:

There are also 2 tasks currently in progress:

In the upcoming week, I’m going to work on the two issues above. One of them should be fully about documentation and the other should involve creating new custom REST resource. Finally, I’m getting some bigger coding tasks. I’m glad because I was doing a lot of documentation lately :slight_smile:

#gsoc2021

Week 7 update:

There were no issues closed this week.

However, 4 of them are currently undergoing a code review:

There are also 2 tasks currently in progress:

In the upcoming week, I’m going to work on the two issues above. Both of them will involve creating new REST resources, as well as adding some documentation to them.

#gsoc2021

Week 8 update:

The were 5 issues closed this week:

There is 1 task currently undergoing a code review:

There are also 2 tasks currently in progress:

In the upcoming week, I’m going to work on the two issues above.

These tasks will be the final 2 tasks of my GSoC 2021 project, however, I will try to find some more tasks for my final week before evaluations :slight_smile:

#gsoc2021

Week 9 update:

There was 1 issue closed this week:

There is 1 task currently undergoing a code review:

There is also 1 task currently in progress:

In the upcoming week, I’m going to work on my last task above.

I will also look through the Legacy UI for any functionalities that I forgot to cover with my GSoC project.

If there are any, I will work on adding them as REST resources.

If not, I will spend the next week preparing my final evaluation :slight_smile:

Best regards and see you next week!

#gsoc2021

Week 10 update:

In the last week, I’ve been able to close all of my tasks. We’ve also found 3 more endpoints that I forgot to implement, so they were my main goal for this week.

There were 5 issues closed this week:

That’s it. These were all my tasks for GSoC 2021 :slight_smile:

In the upcoming week, I’m going to work on my final evaluation. I will have to create a video presentation about my project and a document describing all my tasks. Also, I will prepare a final talk post and update the OpenMRS wiki page about my project.

#gsoc2021

Hi,

Please have a look at my draft final evaluation. I still have to record a video presentation so I will send it to you later. Also, I would like to get some tips from you on how to demonstrate my work as it was mainly REST APIs and their documentation so there’s not much visual content that I can present :slight_smile:

https://rasztabiga.me/blog/gsoc-2021-final-evaluation/

@dkayiwa @gcliff

#gsoc2021

How about a video for the REST calls with both the input and output?

1 Like

Should I also include documentation in this video? I’m afraid that it will take more than 5 minutes.

You can skip the documentation.

Sounds good. I will keep you updated on my progress.

@dkayiwa I’ve attempted to record a video only about the resources that I’ve modified (there are 12 of them), but I don’t think I’m going to fit in those 5 minutes, even if I’m only showing the REST calls. Can I exceed that limit, for example, to under 10 minutes?