tag:blogger.com,1999:blog-30766633641642525532024-03-12T21:34:18.142-07:00Samuel Male with GSoCSamuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-3076663364164252553.post-40348431889918409872018-08-12T09:25:00.000-07:002018-08-13T04:02:59.086-07:00Merge Patient Data Project - GSoC FINAL REPORT<h2>
Project : Merge Patient Data From Multiple Installations</h2>
<div>
<ul>
<li>Primary mentor : <a href="https://talk.openmrs.org/u/ssmusoke">Stephen Senkomago Musoke</a> </li>
<li>Secondary mentor : <a href="https://talk.openmrs.org/u/dkayiwa">Daniel Kayiwa</a></li>
<li>Student : <a href="https://talk.openmrs.org/u/samuel34">Samuel Male</a></li>
<li>Project wiki : <a href="https://wiki.openmrs.org/display/projects/Merge+Patient+data+from+Multiple+Installations">https://wiki.openmrs.org/display/projects/Merge+Patient+data+from+Multiple+Installations</a></li>
</ul>
</div>
<h3>
Overview</h3>
<div>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; color: #232323; -webkit-text-stroke: #232323}
span.s1 {font-kerning: none}
</style>
<br />
<div class="p1">
<span class="s1">There are individual installations where each installation is based at a facility (no guarantee of a consistent Internet connection), and is at the same version (OpenMRS, HTML forms, concepts and other metadata) - but there is a need to bring the patient records (or extracts) together to a central database. Site level users and metadata are not synced, neither are concepts and forms, as they are expected to be similar. The merged data (father instance) would be read-only, used reporting and analysis purposes.</span><br />
<span class="s1"><br /></span>
<span class="s1"><br /></span>
<br />
<h3>
<span class="s1">Objectives</span></h3>
<div>
<ul>
<li>Merge Patients --> <b>Achieved</b></li>
<li>Merge Encounters --> <b>Achieved</b></li>
<li>Merge Obs --> <b>Achieved</b></li>
</ul>
<h3>
<b>Extra Credit</b></h3>
</div>
<div>
<ul>
<li>Encrypt Data During Transfer --> <b>Achieved </b></li>
</ul>
<div>
<b><br /></b></div>
<div>
<div>
<h3>
Contributions</h3>
</div>
<div>
While working on this project, I developed a new Openmrs module.<br />
If you wanna use this module, what you simply want is to build <a href="https://github.com/samuelmale/openmrs-module-mergepatientdata">this</a> project, install your .OMOD on your running Openmrs instance and your set.<br />
<br /></div>
<div style="text-indent: 0px;">
<div style="margin: 0px;">
<div style="color: black; font-family: times; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
mergepatientdata --> <a href="https://github.com/samuelmale/openmrs-module-mergepatientdata">https://github.com/samuelmale/openmrs-module-mergepatientdata</a> </div>
<div style="color: black; font-family: times; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div style="color: black; font-family: times; font-size: medium; font-style: normal; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;">
While working, I felt comfortable managing my progress using <a href="https://trello.com/">trello</a>, I setup my <a href="https://trello.com/b/zxRaa0IM/merge-patient-data-module">dashboard</a> before my second evaluation. I worked on the following cards.</div>
<br />
<ul>
<li><span style="font-family: "times";"><a href="https://trello.com/c/6CEJ4LK8/1-work-on-adding-support-for-encounter-resourcempd-1">MPD-1</a></span></li>
<li><a href="https://trello.com/c/TCWXtj0q/2-add-support-for-obs">MPD-2</a></li>
<li><a href="https://trello.com/c/D42USTyU/7-updating-a-patient-resource">MPD-3</a></li>
<li><a href="https://trello.com/c/KxIbGEwZ/8-updating-encounter-resource">MPD-4</a></li>
<li><a href="https://issues.openmrs.org/browse/VM-11">VM-11</a></li>
</ul>
<div>
Commits on the github project can be found <a href="https://github.com/samuelmale/openmrs-module-mergepatientdata/pulls?q=is%3Apr+is%3Aclosed">here</a>.<br />
<br /></div>
</div>
</div>
</div>
<h3>
Resources </h3>
</div>
<div>
This is a quick documentation on how to deploy the module with a steps and guidelines in a convention of 'How To' approach available <a href="https://wiki.openmrs.org/display/docs/Mergepatientdata+Module">here</a>.<br />
<br />
<h4>
Talk Discussions</h4>
</div>
<div>
<ul>
<li><a href="https://talk.openmrs.org/t/merge-patient-data-from-multiple-installations-project/18024">https://talk.openmrs.org/t/merge-patient-data-from-multiple-installations-project/18024</a></li>
<li><a href="https://talk.openmrs.org/t/overriding-default-multipart-file-size-in-openmrs-module-dev/19333">https://talk.openmrs.org/t/overriding-default-multipart-file-size-in-openmrs-module-dev/19333</a></li>
<li><a href="https://talk.openmrs.org/t/failed-export-concepts-metasharing-module/19331/2">https://talk.openmrs.org/t/failed-export-concepts-metasharing-module/19331/2</a></li>
<li><a href="https://talk.openmrs.org/t/updating-the-validation-module/19346">https://talk.openmrs.org/t/updating-the-validation-module/19346</a></li>
<div>
</div>
</ul>
<div>
<br />
<h4>
Mid-term Video Presentation</h4>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/lgsL8UaUDeY/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/lgsL8UaUDeY?feature=player_embedded" width="320"></iframe></div>
<div>
<br /></div>
<br />
<br /></div>
</div>
<div>
<h4>
A more detailed Presentation</h4>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/ylWSCZG-xDk/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/ylWSCZG-xDk?feature=player_embedded" width="320"></iframe></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3>
Experience</h3>
<div>
<br /></div>
<div>
Well, this was my first time participating in GSoC, and it has been fun working with Openmrs. I have been able to learn lots of stuff, both programing stuff and communication skills. </div>
<div>
<br /></div>
<div>
With communication I learnt working with a community which is typically OpenSource, which is made up by an ecosystem of volunteers. </div>
<div>
<br /></div>
<div>
As for programming, I learned of new Libraries like <a href="http://js-grid.com/docs/">js-grid</a>. On working with js-grid, I ended up learning of <a href="https://springframework.guru/hibernate-pagination/">Hibernate Pagination</a>. I don't think I can exhaust all new stuff I hit upon while in the Epic. Just know, I learnt lot in, JS, Java, Spring . etc..</div>
<div>
<br /></div>
<div>
I thank Openmrs for participating in such a resourceful a program. This has given lots of confidence and insight to students aspiring to become advanced devs. Me as a First year student pursuing a Bachelor's of Info Systems, I have been greatly motivated that however much I was/am a newbie to everything, I can do some work. I thank my mentors, Musoke Steve and Daniel Kayiwa. These guys were like parents to me. Due to my lil understanding of most aspects, these guys have always shown me the right path towards how to implement stuff and for long I looked at them like impossible ideals. </div>
<div>
<br /></div>
</div>
</div>
Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-6298603537738970472018-08-06T13:30:00.000-07:002018-08-06T13:30:00.513-07:00Week 12Hi all,<br />
<br />
This is the last week of the Epic. If you missed last week's update, then you wanna look at it <a href="http://malesamuel34.blogspot.com/2018/07/week-11.html">here</a>.<br />
<br />
<h3>
Work done</h3>
<div>
<ul>
<li>The week started off swiftly with a quick fix of last week's Hibernate <a href="https://talk.openmrs.org/t/enabling-hibernate-logging/19140/7">issue</a>. Wycliff's advice worked like a charm.</li>
<li>After fixing this, I thought I was set to go after-all the module worked fine with my small Patient dataset. I then resorted to cleaning the codebase, implementing most of the TODOs.</li>
<li>As the week was almost ending, I realized something was not fine. I asked the community to help me out test the module on a more realistic hospital dataset, this is when I realized we had Memory issues.</li>
<ul>
<li>I had to increase my JVM heap space.</li>
<li>I had to optimize my codebase.</li>
<ul>
<li>Looked for memory leaks. While doing this, I realized I was Merging Concepts which Daniel claimed shouldn't me Merged since they are expected to be similar. However, I'm still blocked from here. </li>
</ul>
</ul>
</ul>
</div>
<h3>
Challenges Encountered</h3>
<div>
I didn't expect to have such a blocker by this time, probably the mistake I made was to test out the module on a serious dataset late. Regardless of whether I'm getting nervous and hairy, we should come up with a fix for this.</div>
<div>
<br />
Before, I used to test out the module on a server with around 60 Patients, and all was cool. Now with a server containing around 2000+ Patients, I hit upon Memory issues. This could be no worry, probably it could have a configurable workaround but its not the case. On exporting data, a file of around 1GB is produced. This far way large!<br />
<br />
Looking at the codebase, I tried to hunt down memory leaks and found that Concepts are consuming more memory space than expected. This is fully addressed <a href="https://talk.openmrs.org/t/testing-mergepatientdata-module/19242/27?u=samuel34">here</a>.<br />
<br />
<h4>
Question</h4>
</div>
<div>
How can one identify General Concepts(eg- those already include in the Concept Dictionary) from Customized Concepts?</div>
<div>
<br /></div>
<div>
Regards,</div>
<div>
<br /></div>
<div>
Samuel Male</div>
<br />
<br />Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-11980632522268809322018-07-30T09:45:00.000-07:002018-07-30T09:45:32.905-07:00Week 11Hi all,<br />
<br />
This the end of week 11, and we a heading week 12 which basically the last week of work.<br />
If you missed last week's blog, you probably wanna see it <a href="http://malesamuel34.blogspot.com/2018/07/week-10.html">here</a>.<br />
<br />
<h3>
Work done this week.</h3>
<div>
By the end of this week, the module could ably merge Patient, Location, Encounter and Obs resource.</div>
<div>
However, I had to tested it on larger dataset of Patient data. I discovered that with large data I faced <i><span style="color: red;">java.lang.OutOfMemoryError</span></i> issues. So I had to make sure my code optimizes memory which I think was solved.<br />
<br />
I also done more work on the Audition and done a few changes on the UI.<br />
<br />
<h3>
Challenges Encountered</h3>
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<br />
<br />
<div class="code">
org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size of<br />
75000000 bytes exceeded; nested exception is org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException
<br />
<br /></div>
This calls for overriding the '<span style="background-color: #f9f9f9; color: #dd1144; font-family: "consolas" , "menlo" , "monaco" , "lucida console" , "liberation mono" , "dejavu sans mono" , "bitstream vera sans mono" , "courier new" , monospace; font-size: 14px; white-space: pre;">maxUploadSize</span> ' property of '<span style="background-color: #f9f9f9; color: #dd1144; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace; font-size: 14px; white-space: pre;">CommonsMultipartResolver'</span><br />
<br />
<div>
But I have failed to do this in Openmrs module dev and I posted this on talk <a href="https://talk.openmrs.org/t/overriding-the-default-multipart-file-size/19193">here</a>.<br />
<br />
I'm also facing another Hibernate issue.<br />
<h4>
Context of the Hibernate Issue</h4>
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 <a href="https://pastebin.com/SbS8mjMZ">StaleStateException</a><br />
<h4>
Proposed solution</h4>
<div>
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 <a href="https://talk.openmrs.org/t/enabling-hibernate-logging/19140/7">thread</a> but got no help as yet.<br />
<br />
<h3>
How to Contribute?</h3>
</div>
</div>
</div>
<div>
If your reading this blog, you could want help me on the following critical blockers that are blocking my progress</div>
<div>
<ul>
<li>https://talk.openmrs.org/t/enabling-hibernate-logging/19140/9</li>
<li>https://talk.openmrs.org/t/overriding-the-default-multipart-file-size/19193/6</li>
</ul>
<div>
Regards,</div>
</div>
<div>
<br /></div>
<div>
Samuel Male</div>
Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-67082104055377397502018-07-22T23:27:00.000-07:002018-07-22T23:27:19.615-07:00Week 10Hi all,<br />
<br />
Its now the end of <b>week 10</b> since the program started. Incase you missed out last week's feed, you could want to check it out <a href="http://malesamuel34.blogspot.com/2018/07/week-9.html">here</a> .<br />
<br />
<h3>
Work done this week.</h3>
For this week, I have been working on a few <a href="https://trello.com/b/zxRaa0IM/merge-patient-data-module">Tickets</a>. These are all about Mapping Patient metadata in a MergeAble format. I finished work on <span style="background-color: white; color: #757575; font-family: "roboto" , sans-serif; font-size: 15px;"> </span><a href="https://trello.com/c/zCZC2d8r/4-add-mapping-for-a-concept-mpd-2" style="background: rgb(255, 255, 255); color: #2196f3; font-family: Roboto, sans-serif; font-size: 15px; text-decoration-line: none;">Mapping Concepts</a>, <span style="color: #757575;"> </span><a href="https://trello.com/c/TCWXtj0q/2-add-support-for-obs" style="background: rgb(255, 255, 255); color: #2196f3; font-family: Roboto, sans-serif; font-size: 15px; text-decoration-line: none;">OBS</a> and<a href="https://trello.com/c/6CEJ4LK8/1-work-on-adding-support-for-encounter-resourcempd-1" style="background: rgb(255, 255, 255); color: #2196f3; font-family: Roboto, sans-serif; font-size: 15px; text-decoration-line: none;"> Encounters</a> now am assembling everything to get sense out my work. In a nutshell, am now using the Mapping to add support for Encounters.<br />
<h3>
Challenges Encountered.</h3>
<div>
In every development stage, there are always challenges and its those challenges that make one learn.</div>
<h4>
Handling database Table Ids for Merged Data ๐ </h4>
<div>
For instance we have two servers ie:- Server A and B. A has 50 patients while B has 5 Patients. Regardless of the DBMS, Every row needs an Id. Well while merging data, we could want to merge a Patient from the last row of server A to B. Let me assume that the Patient has an Id of 50. When this Patient is merged, the Patient in Server B may look something like below</div>
<div>
<table><thead>
<tr><th>Id</th><th>patient_name</th></tr>
</thead><tbody>
<tr><td>5</td><td> Male Samuel</td></tr>
<tr><td>6</td><td> Kenny</td></tr>
<tr><td>7</td><td> Kaddu Ronnie</td></tr>
<tr><td>8</td><td> Another One</td></tr>
<tr><td>9</td><td> Some Patient</td></tr>
<tr><td><span style="background-color: yellow;">50 </span></td><td><span style="background-color: yellow;"> From Server A</span></td></tr>
</tbody></table>
</div>
<div>
Like you can see, it looks dirty within the database.</div>
<h4>
Proposed Solution</h4>
<div>
We could first make first make a check to the database to see whether the Patient we are trying to Merge already exists or not, if it exists, the update it otherwise set the id to null and register it as a new Patient. For a few metadata, this is simple but with other metadata like Encounters, Obs, Locations and Concepts that reference the original Patient id it becomes hard to handle this. You could want to advise me on this modal. Please leave a comment of advice.</div>
<div>
<br /></div>
<div>
Regards,</div>
<div>
<br /></div>
<div>
Samuel Male</div>
<div>
<br /></div>
Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-52385063763635032972018-07-17T02:31:00.000-07:002018-07-17T02:31:39.204-07:00Week 9Hi all,<br />
<br />
This is the 9th week since the game started. If you missed out about last week's update, you could want to check it out <a href="http://malesamuel34.blogspot.com/2018/07/week-8.html">here</a> .<br />
<br />
<h3>
Work Done this week</h3>
<div>
This was the week were I had my second evaluation. I was making ends meet to seeing myself pass the evaluation. And do you what, I passed the evaluation and thanks to my mentors ๐ </div>
<div>
<br /></div>
<div>
Currently, the module codebase ain't found in the Openmrs <a href="https://github.com/openmrs">repo</a>. Its still within my <a href="https://github.com/samuelmale/">repo</a> but Steven told me we will just transit it later to the Openmrs repo. So I couldn't use <a href="https://issues.openmrs.org/secure/Dashboard.jspa">JIRA</a> for PM. But just as a good practice, I came up with a <a href="https://trello.com/">Trello</a> dashboard(<a href="https://trello.com/b/zxRaa0IM/merge-patient-data-module">MPD</a>) to help me keep track of progress.</div>
<div>
<br /></div>
<div>
So currently I have been working on <a href="https://trello.com/c/zCZC2d8r/4-add-mapping-for-a-concept-mpd-2">Mapping Concepts</a> and 85% of the work is complete.</div>
<div>
After that I will proceed to <a href="https://trello.com/c/TCWXtj0q/2-add-support-for-obs">Mapping OBS</a>. Note that these are all subtasks for <a href="https://trello.com/c/6CEJ4LK8/1-work-on-adding-support-for-encounter-resourcempd-1">Adding Support for Encounters</a> as a Resource.</div>
<div>
<br /></div>
<h3>
Challenges Encountered</h3>
<div>
I have faced a challenge of Mapping Concepts since they are soo wide and have a complex hierarchy.</div>
<div>
I need your tech support in this. But what I believe is that my current implementation(pending) will be able to give the expected performance. What confuses me is "I wonder how to distinguish a Concept from the dictionary from a customized one! "</div>
<div>
<br /></div>
<div>
Otherwise, I expect significant progress due this week.</div>
<div>
<br /></div>
<div>
Regards,</div>
<div>
<br /></div>
<div>
Samuel Male</div>
<div>
<br /></div>
Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-22853319770981283082018-07-09T04:22:00.000-07:002018-07-09T04:22:32.851-07:00Week 8Hi all,<br />
<br />
This is the 8th week since I started work on <span style="background-color: white; color: #757575; font-family: "roboto" , sans-serif; font-size: 15px;"> </span><a href="https://wiki.openmrs.org/display/projects/Merge+Patient+data+from+Multiple+Installations" style="background: rgb(255, 255, 255); color: #2196f3; font-family: Roboto, sans-serif; font-size: 15px; text-decoration-line: none;">Merge Patient Data</a> project. I'm very excited to inform you dear reader that we currently have a working module in place, unless otherwise.<br />
<br />
<h3>
Work done this week</h3>
<div>
Generally, I capitalized from the front end.<br />
<br />
<h4>
<ul>
<li>Audition</li>
<br />
<span style="font-weight: 400;">I managed to put in place a page that lists down all audits that are available. Basically an audit is a brief accountability of what really happened in a given MPD Operation(Export/Import).</span><span style="font-weight: 400;"><div>
<br /></div>
</span><span style="font-weight: 400;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgblYAQF3wpc9NaGBanIC5bdHFV708gDy35jq3WBw2guPGu48AgDINT6wbO4dhp5R3nRKOLGL2bSqGmKi6LjGMiw-_5py5SN_YD5zNCVO9JjjsaaJ9Lpq7hz6uuNQZhXfJotILZGwS_HB8/s1600/screencapture-localhost-8080-openmrs-mergepatientdata-MergePatientDataAuditList-page-2018-07-09-12_02_49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="703" data-original-width="1280" height="175" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgblYAQF3wpc9NaGBanIC5bdHFV708gDy35jq3WBw2guPGu48AgDINT6wbO4dhp5R3nRKOLGL2bSqGmKi6LjGMiw-_5py5SN_YD5zNCVO9JjjsaaJ9Lpq7hz6uuNQZhXfJotILZGwS_HB8/s320/screencapture-localhost-8080-openmrs-mergepatientdata-MergePatientDataAuditList-page-2018-07-09-12_02_49.png" width="320" /></a></div>
<div>
<br /></div>
</span><span style="font-weight: 400;">I also put came up with a details page for a give audit.</span><span style="font-weight: 400;"><br /></span><span style="font-weight: 400;"><br /></span><span style="font-weight: 400;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9R9ggL4Yxh1UH7_h1iSNSPFXAIpk7e2-Q_bTB0WmfXk8pfYrfuUQlkotQOk0vR9CeNdBKcVPKHd4Y0CAAD2g3iUJ0RUi_lz2pwr5Sxsxh6grmrGzW05h9H4T3DrDyrikOpTRo1XcYEZE/s1600/screencapture-localhost-8080-openmrs-mergepatientdata-auditDetails-page-2018-07-09-13_51_13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="904" data-original-width="1280" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9R9ggL4Yxh1UH7_h1iSNSPFXAIpk7e2-Q_bTB0WmfXk8pfYrfuUQlkotQOk0vR9CeNdBKcVPKHd4Y0CAAD2g3iUJ0RUi_lz2pwr5Sxsxh6grmrGzW05h9H4T3DrDyrikOpTRo1XcYEZE/s320/screencapture-localhost-8080-openmrs-mergepatientdata-auditDetails-page-2018-07-09-13_51_13.png" width="320" /></a></div>
<br />
<a name='more'></a></span>
<li>Configuration</li>
<br />
<span style="font-weight: normal;">I also managed to do some work on the Configuration management. MPD Configurations are managed using JSON scripts. One configures on which Resources he/she requires in a given Operation.</span><br />
<span style="font-weight: normal;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6FAQvTJpAXwrpjIHQXEU9yzDRVCIVbxvlk45ydW4J4GHo3uSwayNZOlDVPGBeiRBCNurz4t3WiwBM7xuHsoXoa-awGERNQz2HIVnGHkhTFdjRPo2tPiuIYWuCcLgfXtrxRM8stun1gMM/s1600/screencapture-localhost-8080-openmrs-mergepatientdata-LoadMPDConfiguration-page-2018-07-09-13_58_59.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="737" data-original-width="1280" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6FAQvTJpAXwrpjIHQXEU9yzDRVCIVbxvlk45ydW4J4GHo3uSwayNZOlDVPGBeiRBCNurz4t3WiwBM7xuHsoXoa-awGERNQz2HIVnGHkhTFdjRPo2tPiuIYWuCcLgfXtrxRM8stun1gMM/s320/screencapture-localhost-8080-openmrs-mergepatientdata-LoadMPDConfiguration-page-2018-07-09-13_58_59.png" width="320" /></a></div>
<h3>
How to use the Module</h3>
<div>
<span style="font-weight: 400;">The module is User friendly though its recommended to use the default configurations. Just change the 'localinstanceId' field to the Id of your server for Identification.</span></div>
<div>
<span style="font-weight: 400;"> </span></div>
<div>
<span style="font-weight: 400;">Currently the module codebase isn't included in the <a href="https://github.com/openmrs">Openmrs</a> repo, so you could clone it from <a href="https://github.com/samuelmale/openmrs-module-mergepatientdata">here</a> and build it to get the .omod file. </span></div>
<div>
<span style="font-weight: 400;">Install the module on your server and move to the Merge Patient Data dashboard and there you set to go. I'm pretty sure you wanna give it a try ๐</span></div>
<h3>
Whats Pending</h3>
<div>
<span style="font-weight: normal;">Currently, I'm planning to add support for the Encounter and Observation Resources and then Adding Unit Test Cases for the Utility classes I haven't tested. </span></div>
<div>
<span style="font-weight: normal;"><br /></span></div>
<div>
<span style="font-weight: normal;">I extend my sincere gratitude to the entire Openmrs community. Thanks for the support to see that the module actually works. I also thank you my dear reader, thanks for the concern and the follow up.</span></div>
<div>
<span style="font-weight: normal;"><br /></span></div>
<div>
<span style="font-weight: normal;">Regards,</span></div>
<div>
<span style="font-weight: normal;">Samuel Male</span></div>
</ul>
</h4>
</div>
Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-45593440330029159862018-07-01T12:45:00.000-07:002018-07-01T12:45:36.850-07:00week 7Hi folks,<br />
<br />
Its now seven weeks down the road since I begun working on the <a href="https://wiki.openmrs.org/display/projects/Merge+Patient+data+from+Multiple+Installations">Merge Patient Data</a> Module.<br />
I think I have been slow with progress. This has been cause of some inevitable blockers. However, lots of work has been done this week.<br />
<br />
<h3>
Work Done</h3>
<div>
<ul>
<li>I set up my dev environment on a new Platform(mac OSX). Though my performance decreased, I spent sleepless nights configuring stuff and getting used to the platform.</li>
</ul>
<h4>
</h4>
<ul>
<li>More development.
Last <a href="http://malesamuel34.blogspot.com/2018/06/week-6.html">week</a> I had a <a href="https://talk.openmrs.org/t/mapping-complex-data-to-customized-gson-handlers/18661">bug</a> that blocked me for a while. I'm serializing the data using the <a href="https://github.com/google/gson">gson</a><span style="background-color: white; color: #757575; font-family: "roboto" , sans-serif; font-size: 15px;"> library. However I was facing a challenge dealing with generic types. I realized I invested more time trying to fix the bug than moving forward.</span></li>
</ul>
<h3>
<span style="color: #757575; font-family: "roboto" , sans-serif;"><span style="font-size: 15px;">Suggested Solution</span></span></h3>
<div>
<span style="color: #757575; font-family: "roboto" , sans-serif;"><span style="font-size: 15px;">Just for the use case of serialization of data, I just implemented a dataStore</span></span><br />
<div class="code">
public class MPDStore {<br />
public MPDStore() {}<br />
List<Patient> patients;<br />
<patient> List</patient><Location> locations;<br />
<patient><location> List<mergeabledatacategory> types = new ArrayList<>(); </mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory> public List<mergeabledatacategory> getTypes() { </mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory> return types; </mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory> } </mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory> public void setTypes(List<mergeabledatacategory> types) { </mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory> this.types = types; </mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory> } </mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory> public List<patient> getPatients() { </patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient> return patients; </patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient> } </patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient> public void setPatients(List<patient> patients) { </patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient><patient> this.patients = patients; </patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient><patient> } </patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient><patient> public List<location> getLocations() { </location></patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient><patient><location> return locations; </location></patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient><patient><location> } </location></patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient><patient><location> public void setLocations(List<location> locations) { </location></location></patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient><patient><location><location> this.locations = locations; </location></location></patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient><patient><location><location> } </location></location></patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient><patient><location><location> public void addType(MergeAbleDataCategory type) { </location></location></patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient><patient><location><location> this.types.add(type); </location></location></patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient><patient><location><location> }</location></location></patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient><br />
<patient><location><mergeabledatacategory><mergeabledatacategory><mergeabledatacategory><patient><patient><location><location> }</location></location></patient></patient></mergeabledatacategory></mergeabledatacategory></mergeabledatacategory></location></patient></div>
<span style="color: #757575; font-family: "roboto" , sans-serif;"><span style="font-size: 15px;"><br /></span></span>
<span style="color: #757575; font-family: "roboto" , sans-serif;"><span style="font-size: 15px;"><br /></span></span><br />
<span style="color: #757575; font-family: "roboto" , sans-serif;"><span style="font-size: 15px;">With this model, the module perfectly exports and imports Patient data from one Openmrs instance to another.</span></span><br />
<span style="color: #757575; font-family: "roboto" , sans-serif;"><span style="font-size: 15px;">Currently I'm working on the audition of the module Operations. I anticipate that this won't take me long then I proceed to the Configuration Services.</span></span><br />
<span style="color: #757575; font-family: "roboto" , sans-serif;"><span style="font-size: 15px;"><br /></span></span>
<span style="color: #757575; font-family: roboto, sans-serif;"><span style="font-size: 15px;">I'm looking forward to finishing with both the Audit and Configuration Service implementation by 9th this month.</span></span><br />
<span style="color: #757575; font-family: roboto, sans-serif;"><span style="font-size: 15px;"><br /></span></span>
<blockquote class="tr_bq">
<span style="color: #757575; font-family: roboto, sans-serif;"><span style="font-size: 15px;">By the way I'm excited to inform you that the module currently offers the basic functionality inline with the project objectives though more work is still needed at the UI to improve the end User Experience.</span></span></blockquote>
</div>
</div>
Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-6521743691084577742018-06-25T05:55:00.000-07:002018-06-25T05:55:53.105-07:00Week 6Hi folks,<br />
<br />
Like I said in the preceding week my machine was down. Actually I purchased another machine. I'm struggling with my dev environment setup and adopting to a new platform that's OSx.<br />
<br />
Today I had a physical meetup with my mentor( Senkomago Stephen) at Kololo Uganda. We had lunch together, he advised me on better/recommended development practices as required by GSoC. I have loved this guy, he is very motivating and resourceful.<br />
<br />
<h4>
Project Progress</h4>
<div>
To be honest, for this week I have done less as expected by last week's objectives. The module currently downloads/exports data but I started with the Patient domain as a Resource. I also tried to implement the import part of it. Just like you know in development, we always hit upon bugs. There is this logical bug that took me almost 2 days to hunt down and understand. I use the <a href="https://github.com/google/gson">gson</a> library for serialization and de-serialization of data. Serialization is quite straight obvious. I love all the magic with this library. But as data goes complex, de-serialization is quite complicated That when your dealing with generic Classes/domains.<br />
</div>
<div class="code">
public interface Resource {<br />
// Some logic goes here<br />
}
<br />
<br />
public class Patient implements Resource {<br />
//Patient Resource logic<br />
}<br />
<br />
public class Location implements Resource {<br />
//Location Resource logic<br />
}<br />
<br />
@Test<br />
public void dummyTest() {<br />
Patient patient = new Patient();<br />
Location location = new Location();<br />
<br />
//Add the Resources to a Collection<br />
HashMap<string resource=""> resourceMap = new HashMap<string resource="">();</string></string><br />
resourceMap.add("Patient", patient);<br />
resourceMap.add("Location", location);<br />
<br />
//Serialize<br />
String data = gson.toJson(resourceMap); // Works fine<br />
<br />
//deserialize<br />
HashMap deserializedObj = gson.fromJson(data, HashMap.class);<br />
<br />
//Attempt getting a Patient object.<br />
Object patientResource = deserializedObj.get("Patient");<br />
Patient patient = (Patient) patientResource; //Ooopppss, this throws an //Exception."ClassCastException : gson.internal.LinkedTreeMap cannot be cast to Patient.class"<br />
<br />
}</div>
<div>
<br />
That's basically my current blocker. I googled around it and I'm planning to implement manual handlers. I you have a better and quick work around, feel free comment it here or get me on <a href="https://talk.openmrs.org/">talk</a> and ping me (@samuel34) . We could resolve this an the module would start working at all ends. Then I work on the Configuration part of it.<br />
<br />
Regards,<br />
<br />
Samuel Male.<br />
<br /></div>
Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-4889305952003568602018-06-18T04:12:00.001-07:002018-06-18T04:12:52.631-07:00Week 5Hi folks,<br />
<br />
For this week, I got number of blockers, my machine was down and we had power shortage in my home area. But however, I tried to nab a few of this week's objectives(<a href="http://malesamuel34.blogspot.com/2018/06/week-4.html">check down here</a>).<br />
<br />
<h4>
What the module can currently do.</h4>
<div>
Currently, the module can download or export Patient data in an encrypted format but depending on default configurations.</div>
<br />
<b>Steps followed</b><br />
<ul>
<li>Build the module with "mvn install" (src :- <a href="https://github.com/samuelmale/openmrs-module-mergepatientdata">mergepatientdata</a>);</li>
<li>Install the module on Reff App 2.x;</li>
<li>Move to the module dashboard;</li>
<li>Click the export button;</li>
<ul>
<li>This will trigger the whole process, collects all Patient data, encrypts it and a download is automatically triggered. </li>
</ul>
<div style="margin: 0px;">
</div>
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="margin: 0px;">
</div>
</div>
</ul>
<ul>
<li>NB:- Currectly the module supports only Patient and Location as a Resource. I think next week I will add support for other Resources.</li>
</ul>
<div>
<b>More about the dev work this week</b></div>
<div>
<ul>
<li>I looked through my codebase as a module, did some code cleaning and Implemented logging for debugging purposes. </li>
<li>I refactored my Resource Services to a better implementation. </li>
<li>I think as for now I finished with the export logic. Exporting works good, However I haven't tested it with a big dataset โน๏ธ.</li>
<li>Written lots of lines of code and Utility methods.</li>
<li>And by the way, I successfully completed my first evaluation with Google and Passed ๐</li>
</ul>
<div>
<b>Next week( week 6 ) Expectations</b></div>
</div>
<div>
<br /></div>
<div>
<b> NB:- </b>I have kept pushing objectives from one week to another which I want to stop this week โบ๏ธ</div>
<div>
<ul>
<li>I expect to get done with the importing/merging logic from the UI point of view.</li>
<ul>
<li>Need to add a dialog box where one can drag and drop or browse to the ".mpd" file</li>
<li>Test whether the entire API can really merge MPD data.</li>
</ul>
<li>Need to also work on the Configuration support from the UI.</li>
<ul>
<li>I think I will add another GSP page that will contain the congs</li>
<li>I think I will use the <a href="http://js-grid.com/">gridJs</a> Library at the front end for indexing, paging, validation etc..</li>
</ul>
</ul>
<div>
If it doesn't challenge me, then I won't help me. I think I will be strong enough to stand all this. </div>
</div>
<div>
<br /></div>
<div>
Regards,</div>
<div>
<br /></div>
<div>
Samuel Male</div>
<div>
</div>
Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-68547072292275054522018-06-10T04:25:00.000-07:002018-06-10T04:25:10.674-07:00Week 4Hi all,<br />
<br />
<h4>
Release tasks.</h4>
Looking at the lately anticipated tentative <a href="https://talk.openmrs.org/t/platform-2-2-release-is-on-4th-june-2018/16399">release</a> date, I couldn't proceed with the release process when most of the tickets in the <a href="https://wiki.openmrs.org/display/docs/Technical+Road+Map">Road Map</a> in the batch aren't fixed. Lots of the time for this week was invested in release tasks. We were very ambitious that by this week, Platform 2.2 could released!<br />
<br />
<h4>
Merge Patient Data Module</h4>
<div>
Basing from the expected objectives (<a href="http://malesamuel34.blogspot.com/2018/06/week-3.html">check here down</a>) for this week,</div>
<div>
<ul>
<li> I'm only and almost done with the Data exporting logic (I mean from the UI end).</li>
</ul>
<ul>
<li>I did some little work on Exception handling.</li>
</ul>
<ul>
<li>To be honest, not yet implemented logging in the entire API. I don't know why I consistently forget.</li>
</ul>
<ul>
<li>The UI
</li>
<ul>
<li>I added a mergepatientdata app link on the OpenMRS Ref app homepage.</li>
<li>I created a mergepatientdata dash board. </li>
<li>I'm still caught up assembling the rest of the API to actually get real life application. I started with the Export fuctionality.</li>
</ul>
</ul>
<h4>
Week 5 Expections</h4>
</div>
<div>
<ul>
<li>In week five, we need to do the first program evaluation with Google. So I'm gonna prepare myself. I anticipate doing it tommorow(Monday).</li>
<li>I need to make sure the module really gives a basic functionality. At least covering 58% of the project <a href="https://wiki.openmrs.org/display/projects/Merge+Patient+data+from+Multiple+Installations">objectives</a>. </li>
</ul>
Thanks for keeping track and getting concerned with this project development.<br />
<br />
Regards,<br />
<br />
Samuel Male</div>
Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-11497870059287273472018-06-03T00:53:00.001-07:002018-06-03T00:53:37.330-07:00Week 3<h3>
More coding </h3>
<div>
Hi,</div>
<div>
<br /></div>
<div>
Week three has been sort of challenging but lots of work has been done. More work has been done on the API of the module.</div>
<div>
<br /></div>
<h3>
Work done.</h3>
<div>
I started work capitalizing on a Patient as the main Resource. Later, I will work on the rest of the Resources like Location, OBs etc.</div>
<div>
<ul>
<li>I completed work on the <span style="background-color: white; color: #757575; font-family: Roboto, sans-serif; font-size: 15px;"> </span><a href="https://github.com/samuelmale/openmrs-module-mergepatientdata/blob/master/api/src/main/java/org/openmrs/module/mergepatientdata/api/PatientResourceService.java" style="background: rgb(255, 255, 255); color: #2196f3; font-family: Roboto, sans-serif; font-size: 15px; text-decoration-line: none;">PatietResourceService</a> .</li>
<li>I created an <a href="https://github.com/samuelmale/openmrs-module-mergepatientdata/blob/master/api/src/main/java/org/openmrs/module/mergepatientdata/sync/MPDClient.java">MPDClient</a> .<br />This contains all the logic of importing and exporting data. I started with the exporting part of it. </li>
<li>Done some partial implementation of the <a href="https://github.com/samuelmale/openmrs-module-mergepatientdata/tree/master/api/src/main/java/org/openmrs/module/mergepatientdata/api/model/config">Configuration</a> domain.</li>
<li>I introduced an <a href="https://github.com/samuelmale/openmrs-module-mergepatientdata/blob/master/api/src/main/java/org/openmrs/module/mergepatientdata/api/MergePatientDataExportService.java">Export Service</a> and <a href="https://github.com/samuelmale/openmrs-module-mergepatientdata/blob/master/api/src/main/java/org/openmrs/module/mergepatientdata/api/MergePatientDataEncryptionService.java">Encryption Service</a> .</li>
<li>And lots of new Methods introduced in the <a href="https://github.com/samuelmale/openmrs-module-mergepatientdata/tree/master/api/src/main/java/org/openmrs/module/mergepatientdata/api/utils">Utility layer</a> .</li>
</ul>
<h4>
MPDClient</h4>
</div>
<div>
<b>Abstract</b></div>
<div>
This client will abstract us from all the logic of exporting and importing data. It simply uses a given configuration, collect the required data from the database, serialize it to a file and then encrypt the file and possibly return an Audit message. It accomplishes all this by delegating the concerned Services that are currently partly implemented.</div>
<h4>
Week 4 Expectations</h4>
<div>
<ul>
<li>I expect to get done with the MPDClient(Both export and import logic). </li>
<li>Need to work on Exception handling of the entire API.</li>
<li>Need to work on logging in the entire API.</li>
<li>Need to work on the UI.<br /> Implement a module page on the RefApp.</li>
</ul>
<h4>
Extra Credit for Week 4</h4>
</div>
<div>
<ul>
<li>The module should be able to export and import data.</li>
<li>I'm gonna do some release task since I'm the OpenMRS Release Manager for <a href="https://wiki.openmrs.org/display/docs/Technical+Road+Map">platform 2.</a></li>
</ul>
<div>
Best Regards</div>
</div>
<div>
<br /></div>
<div>
Samuel Male</div>
Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-91096531549434761922018-05-25T08:55:00.002-07:002018-05-25T08:55:48.893-07:00Week 2 <h3>
Implementation phase</h3>
<div>
In the preceding week, I was basically trying to study <span style="background-color: white; color: #757575; font-family: Roboto, sans-serif; font-size: 15px;"> </span><a href="https://wiki.openmrs.org/display/projects/Sync+2.0" style="background: rgb(255, 255, 255); color: #2196f3; font-family: Roboto, sans-serif; font-size: 15px; text-decoration-line: none;">sync2</a>, how it works and technically understanding its codebase. At the beginning of this week, I finalized on the study case, roughly made a design model for the <span style="background-color: white; color: #757575; font-family: Roboto, sans-serif; font-size: 15px;"> </span><a href="https://wiki.openmrs.org/display/projects/Merge+Patient+data+from+Multiple+Installations" style="background: rgb(255, 255, 255); color: #2196f3; font-family: Roboto, sans-serif; font-size: 15px; text-decoration-line: none;">MergePatientData</a> module. I also came up with a number of properties the project must portray ie:-</div>
<div>
<ul>
<li>Serialisation and Encryption(Cryptography):<br />Resource data will be serialized to JSON and stored in a file, which will be encrypted to a 'data.mpd' file. This can reversely be decrypted by the module. </li>
<li>Persistance: <br />The module should be in position to retrieve/save data from the OpenMRS context after-all the module merges data from one OpenMRS instance to another. </li>
<li>Auditing: <br />Like in the <a href="https://wiki.openmrs.org/display/projects/Sync+2.0" style="background: rgb(255, 255, 255); color: #2196f3; font-family: Roboto, sans-serif; font-size: 15px; text-decoration-line: none;">sync2</a> module, Auditing is required to keep track of what really happened during a transfer process of data.</li>
<li>Configuration and Validation:<br />We should configure which type of data is required to be merged.</li>
</ul>
<div>
Late this week, I started with the coding phase. I'm writing code basing on the design I came up with.</div>
</div>
<h3>
Work done so far.</h3>
<div>
<ul>
<li>Resource domain:<br />I wrote <a href="https://github.com/samuelmale/openmrs-module-mergepatientdata/tree/master/api/src/main/java/org/openmrs/module/mergepatientdata/resource">code</a> for almost all intended Resources . </li>
<li>Implemented a Service layer for some Resources like <a href="https://github.com/samuelmale/openmrs-module-mergepatientdata/blob/master/api/src/main/java/org/openmrs/module/mergepatientdata/api/PatientResourceService.java">PatietResourceService</a> .. However, more work is still required here.</li>
<li>I came up with a Repository(<a href="https://github.com/samuelmale/openmrs-module-mergepatientdata/blob/master/api/src/main/java/org/openmrs/module/mergepatientdata/sync/MergeAbleBatchRepo.java">MergeAbleBatchRepo</a>) that can store all Resources intended to be shared in a format that it could be easy to serialize. </li>
<li>Lots work has been done. (<a href="https://github.com/samuelmale/openmrs-module-mergepatientdata">check it out</a>)</li>
</ul>
<div>
Best Regards </div>
</div>
<div>
<br /></div>
<div>
Samuel Male</div>
Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-17606183921336655372018-05-22T03:05:00.002-07:002018-06-03T02:09:19.777-07:00Week 1<h3>
Design phase </h3>
<div>
Currently, <a href="https://wiki.openmrs.org/display/projects/Sync+2.0">sync2</a> depends on <a href="https://wiki.openmrs.org/display/RES/2012-05-07+Event+and+AtomFeed+Module+Sprint">AtomFeed</a> and <a href="https://wiki.openmrs.org/display/~surangak/FHIR">Fhir</a>/<a href="https://wiki.openmrs.org/display/docs/Webservices.rest+Module">REST</a> modules for synchronizing Patient and related metadata in Openmrs. As a matter of fact that the <a href="https://wiki.openmrs.org/display/projects/Merge+Patient+data+from+Multiple+Installations">MergePatientData</a> module will be an improvement of the sync module, I was advised that it should depend on the sync2 module. What basically fails sync2 is synchronizing data that existed before it was running in the OpenMRS context. Since we are depending on sync2, I spent the 1st week trying to gather information and looking at the entire codebase of sync and how it works. I came with a simple design. <a href="https://wiki.openmrs.org/display/projects/Merge+Patient+data+from+Multiple+Installations">MergePatientData</a> should checkout all existing synchronize-able data at a given Node(Could be child/parent). If sync is running, get data from sync tables, do a filtration of data and store it in a zip file with some encryption. The module should be able to download the zip file.</div>
<div>
In a nutshell, I have encountered the following:</div>
<div>
<div>
<ul>
<li>I started designing a workflow of how the project will be best implemented.</li>
<li>I closely studied and inspected the codebase of the sync module and left at an average understanding of the entire logic.</li>
<li>I created a skeleton(an initialization) of the module(<a href="https://github.com/samuelmale/openmrs-module-mergepatientdata">mergepatientdata</a>)</li>
</ul>
<h3>
Blockers</h3>
</div>
</div>
<div>
I don't know whether its quite trivial but in the process of studying sync, All I know it uses AtomFeed module to update it of new events/feeds but I have failed to understand how :( . </div>
Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0tag:blogger.com,1999:blog-3076663364164252553.post-49541287309144648152018-05-13T07:00:00.001-07:002018-05-13T07:00:28.775-07:00Google Summer of Code with OpenMRS<img src="https://cdn-images-1.medium.com/max/800/1*eG9dgXYxM6pycgkC_T--Ng.png" /><br />
<h3>
Abstract</h3>
<span style="font-family: Georgia, Times New Roman, serif; font-size: large;">I received an email on April 23, it sounded like, <span style="background-color: white; letter-spacing: -0.063px;">โYou got selected for Google Summer of Code 2018โ. This made me pretty excited, called my friends and jazzed them about it. To my side it was a great achievement because it was my first time to apply and write a project proposal. However, according to the contributions that I made before in OpenMRS, I felt it/I was worth.</span></span><br />
<br />
<h3>
About The Project</h3>
<span style="font-family: Georgia, "Times New Roman", serif; font-size: large;">I made two project proposals, one for <a href="https://wiki.openmrs.org/display/projects/Merge+Patient+data+from+Multiple+Installations">Merge Patient Data From Multiple Installation</a> and the other for <a href="https://wiki.openmrs.org/display/projects/Location+Based+Access+Control">Location Based Access Control</a> and I got selected for </span><a href="https://wiki.openmrs.org/display/projects/Merge+Patient+data+from+Multiple+Installations"><span style="color: orange; font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: large;">Merge Patient Data From Multiple Installation</span></a><span style="font-family: Georgia, "Times New Roman", serif; font-size: large;"> . Its about creating an OpenMRS module that adds the functionality of merging Patient and related Metadata from like a childNode database to the ParentNode or Central Database to OpenMRS. To some of the OpenMRS implementations, there is no guarantee for a stable Internet connection for the "sync module" to work efficiently. </span><br />
<div>
<span style="font-size: large;"><span style="font-family: Georgia, Times New Roman, serif;"><br /></span></span></div>
<div>
<span style="font-size: large;"><span style="font-family: Georgia, Times New Roman, serif;">I thank the OpenMRS community for entrusting me with this project. </span></span></div>
<div>
<span style="font-size: large;"><span style="font-family: Georgia, Times New Roman, serif;"><br /></span></span></div>
<div>
<span style="font-size: large;"><span style="font-family: Georgia, Times New Roman, serif;">Happy coding and best regards.</span></span></div>
<div>
<span style="font-size: large;"><span style="font-family: Georgia, Times New Roman, serif;"><br /></span></span></div>
<div>
<span style="font-size: large;"><span style="font-family: Georgia, Times New Roman, serif;">Samuel Male. </span></span></div>
<span style="background-color: white; color: rgba(0, 0, 0, 0.84); font-size: 21px; letter-spacing: -0.063px;"><span style="font-family: Georgia, Times New Roman, serif;"><br /></span></span>
<span style="background-color: white; color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; letter-spacing: -0.063px;"><br /></span>Samuel Malehttp://www.blogger.com/profile/01515617946926525972noreply@blogger.com0