My second week with OpenMRS

Pahonsi Bebeto
3 min readJun 14, 2020

--

The second week of the coding period for Google Summer of Code 2020 is about to end, I’d like to share what have been done for this second week and my action plan for this third week.

Tickets I worked on:

This week's work didn't go as I wanted.

But hey I could still work on this ticket :

And I have succeeded in working on the 9 out of 10 sub-tasks that its contains. but the work has not yet been merged.

Challenges faced

The difficulty that I had this week was to make merge the PR of the past week and this week. because to make it merge it is necessary the test the new changes , and there is unfortunately some incomprehension at the level of the test method and the criteria test. it is for this reason that I have not completed this problem below, which I raised last week.

my first difficulty was in converting the tests from junit 4 to junit 5 on the Core-Api in this ticket

With the help of @ibachar I was able to convert a good part of the tests. but currently I am stuck for the following reasons:

I could not find the equivalence of the following expressions in Junit 5:

@Rule
public TemporaryFolder folder= new TemporaryFolder();

The TemporaryFolder does not exist and has no equivalence in junit 5.

@RunWith(PowerMockRunner.class)

Is the same problem with PowerMockRunner there is not PowerMockExtension in junit 5.

public abstract class BaseContextSensitiveTest extends AbstractJUnit4SpringContextTests

for this one AbstractJUnit4SpringContextTests ,i try to use jupiter.SpringExtension but i did not succeed .

2.The second blocking is with this ticket

MessageTypeRouter does not exist in ca.uhn.hapi 2.3 version after some research I decided to replace it with ApplicationRouter. But it is not easy and any help or suggestion will be welcome.

Plan for Week 3

For this week

  1. I'm going to make sure that we merge all the PRs that are finished.
  2. solve the problem of this 2 ticket:

3.work on this Ticket it has 2 related Ticket:

4.And finally find out how and if possible do most of the tasks below.:

1. migrating to using JPA instead of raw Hibernate. The rationale for this is less to enable supporting other JPA providers and more because Hibernate’s new feature development is primarily focused on being a proper implementation of the JPA spec. So, for example JQL gets more attention than HQL these days and the Hibernate Criteria API has been “deprecated” in favour of the JPA version (it’s not going away anytime soon; it’s just not receiving new features).

2.Migrate to using a child Spring context per module instead of a single big Spring context. This is much more pie-in-the-sky, but it could likely result in a reduction of the time it takes to refresh the main Spring context (which is a large chunk of the start-up time). This would need to be tested to ensure that, e.g., modules can still add services to the Context object, etc.

3.Sync2 will need to be updated to work with the FHIR2 module.

5.Any help or guidance will be welcome.

--

--