Monday, June 19, 2023

GSoC 2023 at OpenMRS | Coding Period Week 03

 

Week three(03) of my GSoC journey was a move into the right direction since it involved assessment of my work so far on my part so as to forge a way forward to meeting all the project objectives. Welcome to the past week's blog post and i hope you enjoy the read or better yet pick something useful from it.

Like the forecast was from last week, this week was more into code reviews and finishing up on some of the resources. I began the week by adding Encounter resource to the resources that need to support json merge patch and json patch operations. 

However the patching was not happening for the Encounter resource and the error below was being returned. Actually this blocker consumed a big chunk of my time this week.

Expected: response with HTTP status indicating request was handled successfully
     but: response with status code <500> with message "Failed to call access method: org.hibernate.HibernateException: A collection with cascade=\"all-delete-orphan\" was no longer referenced by the owning entity instance: org.openmrs.Encounter.encounterProviders"

The issue here was that somehow we deleted an encounter but not the encounterproviders attached to the encounter. This was brought about by how the translation of the Fhir Encounter resource to the OpenMRS Encounter data model was done. On further investigation and consultation with my mentor, we came with a fix for that as can be seen at https://github.com/openmrs/openmrs-module-fhir2/pull/489.

The rest of the week i embarked on making changes as was advised by my mentor especially on the integrations. I  had to migrate them the Integration tests 2.2 directory to the integration tests directory. The former is based of openmrs v2.2 whereas the latter is based off openmrs v2.0.5 so since most resources were supported by openmrs v2.0.5, it was fine to have all our integration tests in that folder save for a few which are not supported upto until version 2.2.

During our weekly meetings with my mentor, part of agenda was the discussion on the need to discuss the projected length of the project for administrative purpose. I wont dive into the reasons here, i am just highlighting it among the developments from last week.

Part of my projections last week was to be able to start on XML Patching but most of the week was taken up in fixing the Encounter resource and making changes as advised on our weekly call.

Appreciation to my mentor Ian for the time he offers to have me unblocked or learn something new. 

Thanks for the taking your time to read through.

Onto next week enthusiastically 😎

No comments:

Post a Comment