OpenMRS SoC - Final week update


Hello Everyone,

It's the final week of GSoC 2013. And this week I was focused to scrub the code base, transfer repo's to OpenMRS github umbrella and improve documentation stuff for my project.

Here's the user documentation (User Guide) I have written for the patient narratives module.

Also I did a lil presentation about my project at this week's OpenMRS Developer Forum - Interns Final Presentation: http://notes.openmrs.org/Developers-Forum-2013-09-19

You can find more resources I used for that right here:

Code Repository: https://github.com/openmrs/openmrs-module-patientnarratives
Report Issues/Tickets: https://tickets.openmrs.org/browse/PNM

I would like to thank the OpenMRS community, especially my mentor Saptarshi Purkayastha, Daniel Kayiwa, Mark Goodrich, for the great help given at designing and developing the project.

And I must say it was an awesome learning experience, I gathered through this year's Google summer of Code. I had to learn various new technologies, namely: SpringAOP, DWR, WebRTC, Xuggler, HTML Form entry module, Xforms Module and lots of functions in OpenMRS framework (played with Concept dictionary, Observations, ComplexObs, Encounters, etc) 

One more point I wanna mention is, GSoC will be over from today, but its not the end of the development work for this module or contributing OpenMRS. I will be continuing my work and contribute OpenMRS even more next. Best is yet to come! :-)

Thank you very much Lord.Budhdha for always blessing me to get done this work properly! නමෝ බුද්ධාය.

~~~ GSoC 2013 is over ~~~

OpenMRS SoC - 12th week update


Hello Everyone,

Its the final week just before the firm pencils down date which will be starting from next Monday! I am really glad that I have been able to complete most of the essential end to end functionality of my project by today.

This week I was focusing on improving user experience (UX) and UI design.. So now the UI looks much simpler to follow and very responsive.

You can check out the latest DEMO (its a nice BETA release!) from below URL.
I have hosted it for you guys to check it out :-)

URL: http://54.235.163.128:8080/openmrs
Username: admin, password: Admin123

Starting from next week I will be focusing on improve documentation stuff for my project, and I will be presenting about my project at next Week's OpenMRS Developer Forum too!

OpenMRS SoC - 11th week update


Hello Everyone,

It was a big week for the Patient Narratives Module project. So many new improvments and feature developments happened in this week.

After lot of struggle Finally, I have been able to parse the complex obs to a byte stream and view it as a video playback under care provider console. I have used Video JS to show the video in a inbuilt flash player which is really cool to have controls like in youtube.
Then I have added Multi-file upload feature to the care seeker interface. Along with its care provider console interface to view and download those files. Similarly I have used openmrs complex obs to save the user uploaded files.






OpenMRS SoC - 10th week update



Hello Everyone,

This week, I have added a new feature to update status of the selected narrative. So the reviewers will able to easily change the statuses of the narrative they are working on.

And discussion panel (comment system) for care provider's to discuss things about the patient's sickness for patient narratives retrieved by the system.

Meanwhile, I have been working to display the saved patient narrative video (complex observation) back in the care provider console for the care providers review. Unfortunately this feature isn't completed yet. There are some weird issues like Broken pipe which i will need to resolve soon.
 







OpenMRS SoC - 9th week update



Hello everyone,

Its almost the end of a ninth week of GSoC 2013. yeap! more than 2 months has been passed already. In this week i have worked for the Patient Narratives video stream capturing feature. It wasn't that much easy task. The WebRTC mediastream API isn't that much of mature tool yet. (Its actually an ongoing project by Mozilla and Chrome team) But this the most suitable option to use in my project -- since its a web based, Open source tool.

Basically WebRTC API will allow developers to create apps (which will capture web-cam video/audio recording, Streaming and things like that) simply using the power of HTML5 and JavaScript. The main advantage of using WebRTC technology is, the user will not have trouble to install Video capture softwares/drivers since it uses the Web as the platform. So everything will be take cared by the web browser. Currently latest versions of Chrome and Firefox browsers support the WebRTC technology.

Here's a quick demo about how WebRTC works : http://harshadura.github.io/record-rtc-together/



Well, the media-stream API is real cool to play with but still it lacks an essential feature specially for my project. Thats media-stream api still doesn't have the capability to return the recorded media as a single file (which contains both audio and video together). What it currently does is generate audio and video as separate blobs (files). Apparently this issue open the door for a real big mess to merge the two files later time.

So I was searching for a solution to get rid of this issue. And I found there's a popular library called FFMPEG which will allow to merge two video+audio files together. Then i tried to find a Java wrapper for it. And finally I found the best tool for the work called Xuggle which will internally process FFMPEG stuff and behave as a Java API.

So I used this Xuggle API to successfully merge the two files i generate with the WebRTC. The merging will happens on server side. after passing the video and audio. (Still there's no obvious way to handle it on client side)

So now everything works as intended! :-)




OpenMRS SoC - 8th week update


Hello Everyone,

I have completed the allow logged in care-provider user to review uploaded information, register valid patient by creating a new patient and automatically transfer the appropriate encounter to the newly created patient functionality.




Currently I am working on the WebRTC implementation to capture the video/audio media stream from the care seekers.

Thank you,
Harsha

OpenMRS SoC - 7th week update


Hi All,

I had my university mid semester exams this week, So there's nothing much progress this week, I am sure will get back to you with a good update in next week!

-Harsha

OpenMRS SoC - 6th week update


Hi All,

I'm really glad to announce that, I have got completed the main end to end functionality as my mentor expected from me, before the mid term which gonna happen next week.

Features completed:

  • HTML/X form entry submissions.
  • Anonymous submissions.
  • Care Provider Console (For Care providers: to review the received patient narratives--encounters)
  • Module settings panel: (For admins: to switch X/HTML form as they wish and config the default patient used by the encounters and encounter type.)
  • Captcha validation before form submissions.
  • Initial WebRTC  integration.
I have updated the current version of the Module at my EC2 server so you can check the progress of my work:

URL: http://54.235.163.128:8080/openmrs
user name: admin
password: Admin123

And I have documented a brief user guide at wiki: https://wiki.openmrs.org/x/IAIzAw

And... Here are some screenshots :-)





 



 


OpenMRS SoC - 5th week update



Hi All,

The module work is going really well. I have finished embedding of the both Xforms and HTML forms into the module and now both allows to fill forms, gets saved properly and creates new encounters. Care seeker panel also have the basic functionality. In overall module works pretty well with Authenticated (logged in) users.

Currently I am focusing on the Anonymous submission stuff; Things seems like lil bit complicated than I expected since the other modules (X and HTML form entry modules) depends on some parameters which collects while authentication process. So currently I am trying to by-pass them using the Spring AOP advicer class (as daniel suggested) or if not using a deamon thread (as wyclif suggested)

I have hosted the current version of the Module at my EC2 server so you can check the progress of work:

URL: http://54.235.163.128:8080/openmrs
user name: admin
password: Admin123


OpenMRS SoC - 4th week update


Hi All,

Its the 4th week of GSoC, well just passed a big month of period after the GSoC coding start date! This week was a great week, So many improvements and development happened.

1. Created a Xform (customized for the patient narratives' collection) Of course I have created required concepts to map the observations used at Form.

I wanna Thank bunch for Daniel Kayiwa for the great help and guidance given for me from the very beginning of Xform integration till the end of Xforms creation process.

Final look after the Xform integration



2. The care provider console improvements.





3. HTML form entry integration -- I wanna thank Mark Goodrich for the valuable guidance given for me to get done things related to HTML forms integration in my custom module UI.

After getting things done, I have created a small guide including my learning’s related to this case: How to Embed HTML Form (generated by HTML Form Entry module) in a custom module


Look after the HTML form integration.



OpenMRS SoC - 3rd week update

Hi All,

Its the end of the third week of gsoc and it was a busy week for me.
So much research and development happened this week. Since i haven't work with Concept dictionary , Encounters and Observations before, I had to read lot about them. Actually now I understand why OpenMRS is a very unique software amoung all other healthcare related software products, Its because of the wonderful *Concept-Dictionary* it made of and the extensible framework it has.

Currently I am working on to build a basic Care provider console which will show up all the encounters filtered by a particular encounter type.



If all goes well it should look like this :-)



Understanding OpenMRS "Concepts"

Introduction

At the heart of every OpenMRS implementation is a concept dictionary that defines the medical concepts (questions and answers) used as the building blocks for forms, orders, clinical summaries, reports and almost every aspect of the data.  Most OpenMRS implementations have an open concept dictionary - one that is considered incomplete and evolves over time. Therefore, as clinicians document conditions, the OpenMRS concept dictionary must be expandable to accommodate meaningful clinical data.
What follows is an introduction to the Concept Dictionary, OpenMRS's unique foundation, and how it provides flexibility for the implementation.

Definitions

Concept Dictionary

The concept dictionary represents a fundamental building block of OpenMRS. Similar to a dictionary defining the function, meaning, and relationships of the words, the concept dictionary defines the name, code, and appropriate attributes for any observations or data collected (including medical tests, drugs, results, symptoms and conditions). To even further simplify the concept dictionary, one could compare it to an infinitely large Excel spreadsheet, where patients are represented as rows and concepts are represented by columns.

Concept

The concept is the basic element of flexibility in OpenMRS. Concepts are the individual data points collected from a population of patients. Concepts include both questions and answers.
For example, blood type data is collected for a patient.  The question is "What is the blood type for the patient?", with a set of discrete answers of "A, B, AB or O".  To implement this in OpenMRS with concepts, the question is a concept ("blood type") and each response ("A", "B", "AB" and "O") is also a concept.  For this one question, a total of 5 concepts are required.
What about a question where the answer is not a discrete answer?  If the question is "What is the name of your first pet?", the answer would be expressed in a text box.  It would not be possible to provide a complete list of every possible name for your pet.  In this example, there would be one concept -- "name of first pet".
The bottom line is, if you need a medical word within your electronic records system, it needs to be defined within the concept dictionary.  More detail about all the possible concepts in a later section.

Encounter

A single, specific interaction between the patient and a provider. An encounter can be any interaction and includes doctor visits, laboratory tests, food distribution, home visits, counselor appointments, etc. Encounters are typically represented as a form (consisting of hundreds of observations), but could also be a touch-screen patient registration or a single lab test for CD4.  For example, a patient visits a health center or hospital.  For each electronic form completed for that patient, a new encounter is created.  Each will have a unique encounter_id and encounter_type.  Forms could be completed by different departments (ie.  drug pickup, visit with an HIV clinician, Diabetes visit, food package received), and will have an associated encounter_type (ie. ART Drug Regimen Pickup, Adult intake, food assistance, lab test, etc).  Each encounter has an encounter type, date/time, location and provider.

Observations

Anything actively measured or observed during an encounter. As an example, patients' weights, heights, blood pressures, and BMIs are observations, as well as qualitative facts including the number of years a patient smoked, the activities in which the patient experiences shortness of breath, and finding on an X-ray. Although typically an observable question, demographics are an exception, and are recorded as separate concepts. Each observation has a unique obs_id.
These are possible scenarios for encounters and observations:
  • One visit with one encounter without observations – Touch screen patient registration in Haiti
  • One visit with one encounter with one observation – Touch screen patient registration in Rwinkwavu, Rwanda with weight recorded
  • One visit with one encounter and many observations – HIV followup form
  • One visit with multiple encounters and many observations – HIV followup form along with ART drug regimen pickup.  This would show 2 encounters, where each encounter would have a different encounter id and encounter type.

Demographics

Demographics are any descriptive characteristic of a person. This includes: name, address, date of birth, age, and any other social construct involvement.

OpenMRS SoC - 2nd week update

Hi Everyone,

Its second week already and feels like the time is flying to reach mid term! My mentor Saptarshi advised me to develop a simple End to End working system as the time to mid term so I could improve upon after that to final.

This week I have successfully embedded an Xform into my module. And the intend of this embedding is to enable care providers to customize Xform any time to fit their needs and edit question fields, And I have a plan to create an Android App based on ODK Clinic so the care seeker's will able to fill patient narratives with their Mobile devices too! Xforms are a great Form type to cater all of these requirements.

Currently the User interface looks like below, I have studied about Google recaptcha api and added it to this new UI and server side coding. (actually it wasn't that much hard as i thought) And ready to start work on the Care provider console next week.





"Story of the Floss" -- About a great phrase commonly use in open source software development.



Yesterday at the discussion with my mentor Saptarshi, he mentioned a really nice phrase called "Story of the Floss" I studied more about it. Its a really great phrase and can learn lots of thing from it.

Simply it means: Keep it simple, Build an End to End solution, Most importantly take action(code) without thinking/talking too much and adding more and more fancy ideas into the problem.

Here's the related story. (Reference: https://wiki.openmrs.org/display/RES/The+Story+of+the+Floss)


Clem and another group are faced with the same challenge: build a bridge across a canyon.

The other group — like most of us would — gathers engineers, draws up specifications, and begins planning on how the bridge should be constructed properly.  Meanwhile, Clem pulls a box of dental floss out of his pocket, unwinds it, and throws it across the canyon. Almost immediately, he's got something across the canyon. It's only floss, but it's there — end to end.

The other group is arguing about whether the bridge should be a beam, suspension, truss, or arch bridge.  Clem starts layering paper mâché onto the floss.

The other group has finally decided on a suspension bridge and begins preparing the materials according to specifications.  Clem has people walking across his paper mâché bridge.

The other group realizes that they would probably be better off with a truss bridge, begins discussions on the new specifications, and then realizes that they are too far over budget and the project is shut down.  Clem has people driving across his bridge.

The other group finally creates their version of the bridge, only to realize it doesn't reach over to the other side where they initially intended it to!


The Lesson

Whenever possible, start with the floss. See the solution through end-to-end, since this is often the best way to understand the problem and often informs the next pass at the solution. In the end, it is rare that we fully understand the problem until the third iteration of the solution.
Be agile, open to corrections, and iterate on your solutions. But, most importantly, take action.
  

My Thoughts

In my words the lesson of this story is dont try to be so smart and keep expanding the idea of your project. Just start simply from sctratch and add lil by lil, But the goal should be to develop an end to end solution (that means a product which is something useful and usable in a practical scenario.) After getting accomplish the basic goals of the project you can proceed into your other fancy ideas. Note that those fancy ideas could take a longer time to develop (or might get failed) but if you have followed the floss way, you still have a basic product which is really a usable one!

Actually I think this phrase isn't only related to the open source software development, This is a truly awesome phrase which we can adopt in our life in general!


OpenMRS SoC - 1st week update


Hello Everone!

GSoC coding period has just started (June 18th) and I am really excited about it, I am going to speed up my coding for the project in the coming few days! As an open source freak I really like to keep my repo clean and nice! So I have integreted my github repo with Travis CI, Cool heh > So anytime i push code to repo. travis willl build and tell if the build is okay or failing.. xD cool huh. Notice the Green label in my repo snap below. :-)




Since travis isnt provide any build artifacts to the outsiders, I am going to implement a Jenkins on a free OpenShift server So  i can link it to my github repo displaying as "nightly builds" :-)

Watch out this space for more interesting things on the coming days with OpenMRS GSoC!

Until next time hack-on!
-Harsha

Google Summer of Code 2013.





So Glad to heard that I have been selected for "Google summer of code 2013" as a Student this year again, yeap for the second time! :-) This year it was very amazing and much more competitive than last year. To mention a lil wow fact: I have been selected for *two* open source organizations this time!! In-fact those are two great organizations:"Raxa" and "OpenMRS" both are related to Healthcare informatics. (Sometimes we need to take some crucial decisions in our life.) So finally I chose OpenMRS as my organization, because of my love towards this awesome open source community which I have been with over year now,
And ripen, I love this concept by now, "Write codes, Save lives!" I dont think we (as coders) can do much better work than this to serve the global healthcare informatics force. Saving human lives is a priority among all other alms-giving stuff. 

Lastly I wanna thank Lord Budhdha who were always blessed me to get through this big achievement! නමෝ බුද්ධාය.

Congratz everyone! Looking forward for a great summer with OpenMRS!

If you are interested, My Project details can be found here:
I will be developing a "User-driven healthcare" system by integrating OpenMRS-core as the base.

1) https://google-melange.appspot.com/gsoc/project/google/gsoc2013/durapix/118001
2) https://wiki.openmrs.org/display/projects/Patient+Narratives+Upload+-+Project+Proposal



Few Links:
OpenMRS GSoC 2013 students list: https://wiki.openmrs.org/display/RES/Summer+Of+Code+2013#SummerOfCode2013-Interns,Mentors,andProjects

GSoC 2013 Accept students at Google Melange web: https://google-melange.appspot.com/gsoc/projects/list/google/gsoc2013