Monday, July 30, 2018

Week 11

Hi all,

This the end of week 11, and we a heading week 12 which basically the last week of work.
If you missed last week's blog, you probably wanna see it here.

Work done this week.

By the end of this week, the module could ably merge Patient, Location, Encounter and Obs resource.
However, I had to tested it on larger dataset of Patient data. I discovered that with large data I faced java.lang.OutOfMemoryError issues. So I had to make sure my code optimizes memory which I think was solved.

I also done more work on the Audition and done a few changes on the UI.

Challenges Encountered

When you download data from a server with many patient, the file is amazingly big. I of recent downloaded a file of 100mb. Now uploading such a file to another server, I ended in such an error

org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size of
75000000 bytes exceeded; nested exception is org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException

This calls for overriding the 'maxUploadSize ' property of 'CommonsMultipartResolver'

But I have failed to do this in Openmrs module dev and I posted this on talk here.

I'm also facing another Hibernate issue.

Context of the Hibernate Issue

Like for instance you are merging Patients from serverA to B which a new server with Patients. However, data comes with primary keys and foreign keys set yet we use key Generator class of hibernate. Ok I tried as possible to set all these IDs like patientId to null to tell hibernate that this is a new Object. However, there some culprit id values that I could be missing to set to null which make Hibernate think that we are updating it ending up with StaleStateException

Proposed solution

Check the Hibernate logs to see which row Hibernate is trying to updated or retrieve but I don’t know how to turn the Hibernate logging so I started this talk thread but got no help as yet.

How to Contribute?

If your reading this blog, you could want help me on the following critical blockers that are blocking my progress
  • https://talk.openmrs.org/t/enabling-hibernate-logging/19140/9
  • https://talk.openmrs.org/t/overriding-the-default-multipart-file-size/19193/6
Regards,

Samuel Male

No comments:

Post a Comment