OpenMRS Feedback Module - User Guide Presentation


OpenMRS Feedback Module - User guide Presentation: Targeting implementers usage Done by me @OpenMRS University Forum :)

Notes

OpenMRS University 2012-09-19 - Feedback Module

Recording at:
  • Adobe Connect recording (nothing extra here, just watch the presentation on youtube and look at the comments lower on this etherpad): http://connect.iu.edu/p95nol8t68q/

=== Feedback module ===

As an administrator, what do I need to do to get started:
  • Install the module
  • Assign the "Add Feedback" privilege to all roles I want to be able to give feedback
  • e.g. to the Authenticated role for everyone
  • (Recommended) change Predefined Subjects
  • (Optional, not necessary) Statuses

ada> where can we find the add feedback privillege?
  • harshadura: inside roles u will able to see in the list of privliges
  • (i.e. inside the regular Manage Roles administration page)


OpenMRS  Feedback Module: Allows general OpenMRS Users to communicate with  System Admins/Supporters regarding System-related (non patient-specific)  messages/issues.

Feedback Module - User Documentation : https://wiki.openmrs.org/x/uIAvAg

Installation

To  install the Feedback Module download the distribution .omod package  from here[1] at OpenMRS Module Repository and upload it into your  OpenMRS system.


finally my GSoC T-Shirt and Certificate reached home!




End of GSoC thoughtz, OpenSource Software and my project at a glance!



Well, After long time of hard work with coding stuff, GSoC has come to an End ! I am extremely  happy to say about my experience which I got on these last few months during my Google Summer of Code Internship at OpenMRS. I real loved my project and the marvelous Open Source Community I have worked with. By any chance If you are not aware about OpenMRS, the name says what it does, It's a Medical Record Management System made for the developing world. "Write Codes, Save Lives!" how cool intention, isn't it ?



Okay! Now I will tell you bit about my GSoC project. My project is Better Error Submission process for Feedback Module, Basically this is an extension of the Project called General Feedback Mechanism of OpenMRS. The new version of OpenMRS Feedback Module follows some of the cool features in Google Feedback tools. (something like Automated Screenshot capture and edit process within web browser, You may have seen that functions or may have tried it in YouTube or somewhere else on Google Products, if not you can try that from here.) My project is a Web Based Java EE Application, Of course its an OpenMRS Module application. 60% of entire project coded in JavaScript, Jquery (I had real nice time working with these JS stuff lol) 40% of it has coded using Java and related its server side technologies.


OpenMRS Feedback Module v2.0 at a Glance

What's New ?
  • User friendly, Wizard driven Feedback Form
  • Automated Screenshot Capture/Edit process within Web Browser.
  • User-to-User Communication within Feedback System. (Comment System)

About Feedback Module v2.0

Basically Feedback module provides a mechanism for users to communicate with system Supporters/Admins with system-related (non-patient-specific) messages. In this new version of Feedback module provides a really cool feature which will automatically Capture the Screenshot and allow user to edit it (highlight/blackout) within Web Browser itself. So this will reduce the time taken to process Screenshots manually. And the users will able to submit their problem/feedback directly to the most responsible person rather than same Admin. Multiple OpenMRS users can be mapped into a single Feedback Ticket by Admin, So faster problem solving can be happen. User-to-User communication is a great way to interact with other users regarding a Feedback Ticket in this new version of Feedback Module.


You can read User Documentation from below link.
Feedback Module - User Documentation


Installation and Usage


OMOD file is a specialized WAR file which is used as a OpenMRS Module file installed as plugins into OpenMRS System. Installation isn't just straight forward thing, So if you aren't aware of installing OpenMRS modules, I prefer you to watch the Demo Video below to get an idea how it works! :)






I must say! Entire OpenMRS community is really nice and helpful! They are like a family working towards a single goal to make the world even better place to live. They helped me every time when I was in trouble. For my Coding problems to Technical issues I got great support from #openmrs IRC channel and mailing lists.

I can't never forget my Primary Mentor, Gaurav Paliwal. He helped me every time when I was in trouble and guided my path all the time. I have to thank alot for his great commitment done for me.  And my Backup mentor Ben Wolfe, being a Core developer of OpenMRS his advices were really helped for me to get succeed in project work too.


I have completed main goals and objectives of my GSoC project, And now GsoC is over! Well is that all over now....? Nope its not! I am not going to run away from this wonderful place where I learnt lots of Coding, gained lots of knowledge about Open Source software and Community involvement. I'll definitely stay with OpenMRS in future too. I know Thats the true spirit of Open Source software development! 

OpenMRS is a really cool Open Source Project, If you are skillful in Java you should definitely join to it. Not only coding, There are so many other things available to do, If you are skillful in technical writing stuff you can contribute by documenting wiki docs, You can contribute by help testing product, etc. Don't forget your work is not just a task, Thats a hard work done for the sake of Humanity, For the intention of saving lives! You can proud being a part of something huge! Your contribution for this great project will be an indirect help for the well-being of Global Healthcare.

"Write Codes! Save Lives!" Code for Humanity, Join with OpenMRS !

නමෝ බුද්ධාය! Thank god for giving me the strength to successfully complete my Google Summer of Code Internship at OpenMRS.org ! This is one of my lifetime achievement indeed!

"Nothings Forgotten. Nothing's ever forgotten."

Regards,
- harshadura

Better Error Submission Process for FDBK Module - Presentation


GSoC Project Progress Presentation

21th June 2012 @ OpenMRS Dev Forum



 

Playback Recording





Presentation Slides


Reference links used in the Presentation - Feedback Module

Project Contents 

Demo of the work done so far (Hosted OpenMRS)

Username:  admin
Password:  Admin123

User Documentation

What do I do when I see java.lang.OutOfMemoryError: PermGen

Troubleshooting JVM Memory Errors

java.lang.OutOfMemoryError: PermGen space

In my endeavors to troubleshoot tomcat memory issues i performed the following in Ubuntu 10.04:
sudo gedit /etc/init.d/tomcat6
Changed (~line 81):
if [ -z "$JAVA_OPTS" ]; then
        JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"
fi
To:
if [ -z "$JAVA_OPTS" ]; then
        JAVA_OPTS="-Djava.awt.headless=true -Xmx1024M -Xms1024M -XX:PermSize=256m -XX:MaxPermSize=256m -XX:NewSize=128m"
fi
You can as well explicitly state in catalina.sh file as follows (in bold):
#!/bin/sh
CATALINA_OPTS="-Xms1024m -Xmx1024m"

___________
REF : https://wiki.openmrs.org/display/docs/Troubleshooting+Memory+Errors

Preventing from Mysql holding hand shake problem for OpenMRS WebApp.

Waiting for changelog lock....
Waiting for changelog lock....
Waiting for changelog lock....
Waiting for changelog lock....
ERROR - Listener.contextInitialized(124) |2009-05-26 12:07:49,197| Got exception while starting up: 
javax.servlet.ServletException: java.lang.RuntimeException: error getting unrun updates on the database
 at org.openmrs.web.Listener.setupNeeded(Listener.java:144)

Solution.

You must have attempted an upgrade at some point and it failed in the middle. The liquibase changelog lock is not getting released in these cases. You can manually clear the lock by emptying the liquibasechangeloglock table:

By firing the following command in mysql

delete from liquibasechangeloglock;

(Make sure to not delete the liquibasechangelog table contents, those are important!)


REF : http://openmrs-mailing-list-archives.1560443.n2.nabble.com/Waiting-for-changelog-lock-td5166981.html

http://dev.openmrs.org/ticket/1524

Technical Overview - OpenMRS architecture



OpenMRS has been designed to have a tiered architecture. The real strength of OpenMRS is in its robust and flexible data model. However, not all users want to have to know this data model inside and out. The ?API layer allows a developer to only have to know Java objects and read/save to them. This layer can be used in a standalone application or, as most people use it, in a J2EE web application.


Context

The backbone of OpenMRS is the core ?API. This API has methods for all of the basic functions like adding/updating a patient, adding/updating a concept, etc. These methods are provided in services. There are classes named PatientService, ConceptService, EncounterService, ObsService, etc. The Data Model groups the database tables into "domains." Each domain is a separate colored box. The breakdown of domains/tables is essentially a visual representation of the service separation.
The Context is a static class to allow the application to save on memory. Only one PatientService object, one ConceptService object, etc (and of course the associated DAO's) are instantiated. The Context's services are split into two categories: methods for the Services and for Users. The services are kept in the aptly named ServiceContext class. This is instantiated only once and is stored statically in the Context. The getter methods for the services simply pass through Context to the ServiceContext. The StaticContext properties are set via our Spring application Context and Dependency Injection. The UserContext contains methods for acting on users: authentication and authorization, logging in, logging out, etc. A different UserContext is instantiated for every user accessing the system. The "current" UserContext is stored on the current thread. When that user is done, the UserContext is taken off of the thread and put into the user's session variable (in the case of the webapp). When the user accesses the system again, the UserContext is taken off of the user's session and placed onto the thread again. In the webapp, this manipulation is done by the OpenmrsFilter class that wraps around every call to the server. Similar to the services, the methods on the Context class pass through to the current UserContext on the current thread.
Every access to the system must be defined within a "unit of work". This unit is bordered by calls to Context.openSession() and Context.closeSession(). In the webapp, these calls are done in OpenmrsFilter and most developers don't have to worry about making those calls. However, any developer of an external application or a thread spinoff (like Hl7InQueueProcessor and FormEntryProcessor) will need to be sure to include open/closeSession calls or risk leaking database connections.
Read more about the API

Spring DI and AOP

[PatientService], [ConceptService], etc are interfaces. [PatientServiceImpl], [ConceptServiceImpl], etc are the current default implementations of those interfaces. Which implementation Context serves up is determined by Spring's dependency injection. Each *Impl contains a reference to its DAO ([PatientDAO], [ConceptDAO], etc). The DAOs are also interfaces. The current default implementation of them are for Hibernate ([HibernatePatientDAO], [HibernateConceptDAO], etc). Which DAO implementation is used at runtime is also determined by Spring's DI.
All of these implementations are described in the Spring [applicationContext-services.xml] file. This file also controls the transaction and authorization AOP annotations (See next section).
Each *Service (not *DAO) is considered to be an AOP advice point. Because we instantiate and serve only one *Service class out of the Context, this is easy. When Spring starts, each service that has advice points around it gets wrapped with a Spring AOP class. If there are five modules/methods that wrap around a certain class, there will be five different wrappers. Any one of those could exit method execution early (if it's an "around" advice). Most AOP linking will be done by modules.
Also see OpenMRS AOP.

Authorization and Authentication

OpenMRS has a very granulated permissions system. Every action is associated with a [Privilege]. An action would be "Add Patient", "Update Patient", "Delete Patient", "Add Concept", "Update Concept", etc. A [Role] contains a collection of Privileges. A Role can also point to a list of inherited roles. The role inherits all privileges from that inherited role. In this way, hierarchies of roles are possible. A User contains only a collection of Roles, not Privileges.
AOP annotations are used to require a privilege for a service method.
@Authorized({"Add Patients"})
The annotation is placed in the interface of the service. If the current user does not possess that privilege an APIAuthenticationException is thrown. (The webapp catches this exception and redirects to the login form). Each page in the webapp is able to require a certain privilege for the page with the openmrs:require taglib. The openmrs:hasPrivilege taglib provides support for restricting only certain sections of a page.
While using the API, you may come to a point where you need to temporarily grant the current user a certain privilege in order to make an API call. This is accomplished using the Context.addProxyPrivilege(String priv) and removeProxyPrivilege(String priv) methods. Multiple priv objects defining the same string can be proxied. Subsequent calls to removePrivilege will only pop the first one off the stack. Best practice says that you should put your API method calls in a try/catch block and put the removeProxyPrivilege call in a finally block.

Hibernate

Hibernate is an excellent Object Relational Mapper. Using just xml files, we are able to describe the relationship between all of our tables and our domain (POJO) objects (like Patient.java, Concept.java, etc). Looking at the concept domain in the datamodel, we see that it consists of tables named concept, concept_answer, concept_set, concept_name. It would be very difficult to keep up with where to store each part of the concept object and the relations between them. Using Hibernate, we only need to concern ourselves with the Concept object, not the tables behind the object. The concept.hbm.xml mapping file does the hard work of knowing that the Concept object contains a collection of ConceptSet objects, a collection of ConceptName objects, etc. To add a new name to a concept:
ConceptService conceptService = Context.getConceptService();
Concept concept = conceptService.getConcept(1234);
ConceptName newConceptName = new ConceptName("some name", "some locale");
concept.addName(newConceptName);
conceptService.updateConcept(concept);
Hibernate knows what has changed and what needs to be saved into the database. (The long and short of it is that Hibernate wraps the Concept object in its own object and keeps track of what has been added, removed, etc).
Hibernate will not load all associated objects until they are needed – this is called lazy loading. The concept object above never dove into the concept_answer table to get the list of answers for concept 1234. If we had called concept.getConceptAnswers() Hibernate at that point would have made a call to the database to retrieve the answers for us. For this reason, you must either fetch/save/manipulate your object in the same session (between one open/closeSession) or you must hydrate all object collections in the object by calling the getters (getConceptAnswers, getConceptNames, getSynonyms, etc).

OpenMRS Source code

OpenMRS lives in a subversion repository.  See the ?Code Repository wiki page for more info.

Building OpenMRS

OpenMRS uses ?Maven to manage the libraries and build system.  See that wiki page for more info.

Modules

See the Module documentation for developers.  Modules are allowed to interact with OpenMRS on every level.  They can provide new entries into the Spring Application Context, new database tables, new web pages, and even modify current service layer methods.

Webapp

The OpenMRS organization creates and ships a webapp (openmrs.war) for people to use.  This webapp is a consumer of the API.  We expect there to be (and there are already) several different consumers of the API by different parties.

Spring MVC

OpenMRS strongly subscribes to the Model-View-Controller pattern. We won't go into the depths of MVC, or even the basics of it. Mediawiki has a complete writeup about everything you may have wanted to know about the MVC programming pattern. Spring has also written a fair amount on how and why to use MVC. OpenMRS, for the most part, uses the domain objects as the model. Most controllers will be SimpleFormControllers and be placed in the [org.openmrs.web.controller] package.  There are some controllers that have been rewritten to use Spring 2.5+ annotations.  We recommend using those. The model is set up in the controller's formBackingObject, and processed/saved in the processFormSubmission and onSubmit methods. The jsp views are placed in [/web/WEB-INF/view].
Not all files served by the webapp are run through Spring. The [/web/WEB-INF/web.xml] file maps certain web page extensions to the [SpringController]. All *.form, *.htm, and *.list pages are mapped. The SpringController then uses the mappings in the [openmrs-servlet.xml] file to know which pages are mapping to which Controller.
There are no .jsp pages that are accessed directly. If a pages url is /admin/patients/index.htm, the jsp will actually reside in [/web/WEB-INF/view/admin/patients/index.jsp]. This is necessary so that we can do the redirect with the SpringController. Because the file being accessed ends with .htm, the SpringController is invoked by the web server. When the SpringController sees the url, it simply replaces .htm with .jsp and looks for the file in /web/WEB-INF/view/ according to the jspViewResolver bean in openmrs-servlet.xml. If the page being accessed was patient.form, the mapping in the urlMapping bean would have told spring to use the PatientFormController and the patientForm.jsp file.
That spring descriptor file also contains settings for the max form upload size, locale changing, message names, fieldGen handlers, and name/address templates (to be removed: TRUNK-368 ).

DWR

Direct Web Remoting is a framework that allows us to translate java objects and methods to javascript objects and methods. Together with jquery/DOJO, DWR forms the basis of the AJAX in OpenMRS. The dwr.xml descriptor file describes which classes and methods are translated and made available to javascript calls. Most base DWR-able classes are placed into the org.openmrs.web.dwr package.  Modules can add dwr methods/objects and those will go into the already-registered-with-dwr dwr-modules.xml file.

Javascript

jQuery is the recommended JS framework. The included jquery package will be kept up to date with openmrs releases.  Import the one you need with
<openmrs:htmlInclude file="/scripts/jquery/jquery.min.js" />
(but its already done in the header for you as of version 1.7) DOJO is a javascript library and packaging system. All dojo packages are stored in /webapp/src/main/webapp/WEB-INF/view/scripts/dojo. The custom OpenMRS javascript "classes" are stored in /webapp/src/main/webapp/WEB-INF/view/scripts/dojo/src/widget/openmrs.

________________________
Ref: https://wiki.openmrs.org/display/docs/Technical+Overview 

Yey! Google Summer of Code 2012, I'm IN !! :) :) :)





As April 23 approaches, the heart-beat level rises in every students’ body for a one reason - its Google Summer of Code a.k.a GSoC. 

Google Summer of Code is a global program that offers post-secondary student developers ages 18 and older stipends to write code for various open source software projects. They have to work with open source, free software, and open technology-related groups over a three month period. Google Summer of Code is a highly competitive program with a limited number of spots. I am proud to be part of it this year.

My name is Harsha Sanjeewa Siriwardena, 3rd Year, IT Undergraduate who studies in SLIIT and lives in Colombo, SriLanka. I am a Simple, Cool guy enjoy Coding, Android development, Open source and learning new Technological stuff.

I am planning to implement Project idea called Better Error Submission Process - Feedback Module for OpenMRS as a part of GSoC 2012. This post will give a short description of the process I went through to make it to coding for OpenMRS project through GSoC 2012.


I chose OpenMRS as my organization. Why? After taking a look at Gsoc list, Among all these projects, organizations the relatively coolest Project is called "OpenMRS" which is my favorite. I loved their idea. "Write Codes, Save Lives!" As it sounds, its a Medical Record Management System, which is widely used in many countries globally as a Free and Open source software product. And that’s totally awesome! I really wanted to be part of this wonderful project. No matter even after the end of Gsoc 2012, for sure I will remain with this marvelous Open Source Community. So, when did I start to get involved? It was year 2012, January. Yeah I started bit early cause I had a serious intension to get through gsoc this year.  




Before started contributing OpenMRS, I have completed a 6 months Internship at hSenid Mobile where I gained lots of experience in Industrial Software Engineering. Those experience at office was really helpful for me to work in OpenMRS project as both Organizations were using almost the same technologies for developing stuff. I am pretty much familiar with J2EE and related its Technologies as OpenMRS uses J2EE at its core too. I still remember the great supervision I got  from Mr. Jason, Mr. Romith and Mr. Thilina at hSenid Mobile. In this occasion I should advert them too.

In the pre-gsoc period I was gathering information about Gsoc. These days Pradeeban Ayya, Nirmal Ayya, Suhothayan Ayya helped me a lot to get a quick jump start. (Sorry! "Ayya" means brother in my mother lang :) Specially Pradeeban Ayya did a excellent job from his Blog Articles to teach us the Basics of Gsoc, IRC/Mailing list Ethics and other random facts of a Open Source Communities. I attend to Apache BarCamp (Thanks to WSO2) held at University of Colombo, SriLanka which I have learnt lots of Gsoc related stuff (How, why, what?) and how self motivation affects to get through gsoc.  



And finally, I worked with Gaurav Paliwal, Suranga Kasthurirathne, who are Senior Developers and Mentors of OpenMRS. They were really, really helpful. Guided me right from basics of OpenMRS and helped me out at every difficult stage of the project. And whole OpenMRS Developers Community was wonderful. Whenever I got problems regarding developments, fixing bug ticketsreplied as soon as they got time to answer via IRC and Mailing lists. That’s totally cool!

I hacked a bit of OpenMRS Core modules and Patched few tickets. I almost spent my time Coding OpenMRS for more than 9 hours a day in those previous months since Feb 2012. Earlier January of 2012, I have done an interesting OpenMRS English to Sinhala Localization contribution with the help of several people. That was a significant milestone of my OpenMRS related work, which really grew-up my love towards OpenMRS.

Then came the news of GSoC 2012. And OpenMRS made its way to the selected organizations list this time too! So It was a great pleasure for me knowing that I had the chance to work on my favorite project as part of Google Summer of Code 2012.




I started preparing the Proposal for Better Error Submission Process for FDBK Module which is an extension of the project General Feedback Mechanism in OpenMRS. The main objective of the Feedback module is to provide a mechanism for users to communicate with system supporters/admins with system-related (not patient-specific) messages, refactoring the error submission process and make it more easy and effective preferably a wizard driven one. Finally I thought only to stick with this project idea as my main Gsoc Proposal and tried to make it more effective and a Strong one.


And after all the discussions, I was able to fine tune my Project proposal and submitted. The list of accepted proposals were out by GMT 1900 hours (00.30 AM in here) on April 23rd, 2012 on the Google melange site and I was glad to see my name on the List and on the OpenMRS 2012 GSoccers Landing page



So now (as soon as my Final exam finishes in May 4th) I am going to work in one of the coolest projects in the open source world as part of the Google Summer of Code. I am really proud and happy to be at this place!


Thanks for Reading my Gsoc-Story this far! :)

Regards,
harshadura

______________________
Other related Links.
  1. GSoc 2012 - Accepted Students From Sri Lanka
  2. OpenMRS - GSoC 2012 Landing Page
  3. List of all projects accepted into GSoC 2012
  4. Project Proposal - Better Error Submission Process for FDBK Module

Screenshots of the Sinhala Localized version of OpenMRS

After a certain amount of translation (50% out of full) I have hosted the OpenMRS web app on Amazon EC2 server and added the translated message.properties file into the corresponding location and let the people to enjoy the Localized version of OpenMRS :)

I have shutted down that EC2 server after couple of days of public release because its like unnecessary spend of money for EC2 Servers. I forgot to take screen shots when it was hosted on EC2 but here are screenshots from my localhost.


Login Screen




Welcome Screen




Proposed Concept Management Screen




Admin Screen


 

Help Screen

How I gather People to get Involved in Localization Campaign.


I created  Facebook group called "OpenMRS සිංහලෙන් ලියමු!" (Lets convert OpenMRS in Sinhalese together!) Most of the people who contributed to this translation program was my University friends. I really respect there humble contribution towards this innocent approach of mine. :) And there were some good people that I really dont know personally but they understood the value of this global healthcare system and contributed really really fine. I am thankful for all of them as well.

Facebook Group URL : https://www.facebook.com/groups/348002341879342/



Inside Facebook Group Screenshots



I used a Collaborative etherpad tool Meeting words to Translate OpenMRS but I got to know after some time there were good online tools available specially for localization stuff and hopefully I think this method is also not bad. Other than the Server limitations of meetingwords.com it worked really fine.

Meeting Words : http://meetingwords.com/ep/pad/view/gCr6VIz0GT/latest




Meetingwords shared online document Screenshot

After a certain amount of translation (50% out of full) I have hosted the OpenMRS web app on Amazon EC2 server and added the translated message.properties file into the corresponding location and let the people to enjoy the Localized version of OpenMRS :)

Here's the List of Contributors who helped this OpenMRS Sinhalese Localization Campaign in many ways.
  1. Navodth Bhanuka
  2. Mahen Samaranayake
  3. Kulitha de Silva
  4. Janani Jayathilake
  5. Yashodha de Silva
  6. Dehan Wijesekara
  7. Udesh Settinayake
  8. Geethika Perera
  9. Hiyal Chathura
  10. Roshana Muthuwan
  11. Isuru Kodi
  12. Manorama Perera
  13. Sahan Maldeniya
  14. Sumudu Abesuriya
  15. Madushan Sameera
  16. Nuwani Nishadhi
  17. Jeewan Nandasena
  18. Chamil Sanjeewa
  19. Uthpala Dilhari
  20. Angel Kodithuwakku
  21. Dewmal Nilanka (EC2 hosting for the public release)



Screenshot of all the Contributors
(Used this page as homepage when hosting to EC2 for the public release)

Note : Please note that, me (with these contributors) have translated as much as possible (only 50% out of full translated upto now, rest of others remains to be translated later on) I have opened a JIRA ticket at OpenMRS regarding this new feature. Then one of the senior developers of OpenMRS reviewed the translation and committed it to trunk repository.

JIRA Issue : https://tickets.openmrs.org/browse/TRUNK-3040



Initial Phase of OpenMRS Sinhala localization Campaign [Open MRS පලමු අදියර.]

[This post describes Contributors who were interested in Localizing OpenMRS into Sinahala version, how they can contribute for this Camp. I have used Meeting Words one of Collaborative Etherpad tool for people to gather and translate the Values.]

(The below post is written in Sinhalese Unicode font which is the native Language of Srilanka)

හරි අපි මේ මහා පුණයකර්මය ආරම්භ කරන්නයි යන්නෙ..වැඩේ ගැන ඔයා තවම හරියට දැනුවත් නැත්තම් මේක මුලින් කියවල එන්න.

මම දැන් කියන්නම් මේ වැඩේ අපි කරං යන විදිය ගැන..
අපි දැන් මේ සෙට් කරල තීන විදියට වෙබ් බේස්ඩ් Document එකක් තීන්නෙ..
ඒ නිසා ඕනි වෙලාවක ඕනිම කෙනෙක්ට සැරෙන් සැරේට උනත් ඇවිත් වචන කීපයක් ලියල දායක වෙන්න පුලුවන්

[01] Document එක ගැන..
-----------------------------
මේක Programming languages වල නිතර වෙනස් වෙන Values දාලා තියෙන Document එකක්.. ඒකට සාමානයෙන් කියන්නෙ Property File 1ක් කියලයි.
ඔය කියන Property Files වල තීන්නෙ කොටස් 2යි. එකක් Key එක, අනික Value එක ඒ දෙක වෙන් වෙන්නෙ සමාන ලකුණකින්. key එක තමයි කෝඩ් එකෙ Variables ව්ලදි පාවිච්චි කරන්නෙ.. ඒ නිසා ආයි පස්සෙ කාලෙකදි ලේබල් එකෙ නම වෙනස් කරනවනම් Value එකෙ වෙනස් කරාම හරිනෙ. ඔන්න ඕකයි Property file එහෙක තියෙන වාසිය.

උදා:
key=value
user.code=User Name
pass.code=Password

මෙන්න මේ වගේ ගොඩාරියක් එකතු වෙලා තමයි Property file 1ක් හැදෙන්නෙ.

හරි දැන් මට කියන්න ඕනි මේකයි.
අපි Java Code එකක් ගහනකොට තිතයි කොමාව, බ්‍රැකට් මේන්ටේන් කරන්න ඕනිනෙ හරියට. නැත්තම් පස්සෙ ලෙඩ දෙනවානෙ.. ඒවගේම තමයි මේකෙත්. Property File එකක් තීන්න ඕනි විදියට තිබ්බෙ නැත්තම් ආයි ලෙඩ දෙනව. ඒක නිසා අපි පුලුවන් තරම් හරිම ක්‍රමේට කරන්න බැලුවොත් ලේසිවෙයි ලෙඩ අඩුකරගන්න.

Property files වලදි Single Line comment කරන්න පුලුවන් # ලකුණින්.
ඒ කියන්නෙ
උදා:
Navigation.home = නිවස
#Navigation.home = Home

මේකෙ Home කියන එක කොමෙන්ට් එකක්.

හරි ක්‍රමේ.
Navigation.home = නිවස
#Navigation.home = Home

වැරදි ක්‍රමේ.
Navigation.home = නිවස #Navigation.home = Home

උඩ තීන විදිය වැරදිය. මොකො Propert file එහෙක සමාන ලකුණ එහා පැත්තෙන් තීන ඔක්කොම ඌ Value එකට ගන්නව. තව ඔය පෙරලි කොමා උදා: ["ටෙස්ට්"], තනි කොමා උදා: ['ටෙස්ට්'] දැමීමෙනුත් වැඩේ කෙලවෙනව..
ඒව දාන්නෙ නැතුව වැඩේ කරන්න මහන්සි ගන්න.

[2] Comment දැමීම අනිවාර්යයි.
-----------------------------------

මම් කලින් කිව්ව නේද Property Files වල Comment දාන විදිය ගැන. ඔව් # එක ඊලට පේලියෙ තියල තමයි. මේ වැඩේ කරන්න ඕනි මොකද පස්සෙ Recheck කරද්දි මට බලාගන්න පුලුවන්නෙ මේ ලියල තීන සිංහල පරිවර්තනය කලින් තිබිච්ච ඉංග්‍රීසි වචනෙත් එක්කහරියට පරිවර්තනය වීමක් සිදු වෙලාද කියල. ඒක නිසා පරිවර්තනය කරන්න කලින් අර තිබිච්ච එක කොමෙන්ට් කරල යටට දාන්න.

මෙන්න මේ වගෙ..

කලින් තියෙන්නෙ මේ වගෙ
forgotPassword.title=OpenMRS - Forgot Password

පරිවර්තනයෙන් පසුව
forgotPassword.title=OpenMRS - මුරපදය අමතක වුනා
#forgotPassword.title=OpenMRS - Forgot Password

කොමෙන්ට් කරපු ඉංග්‍රීසි වචනෙ තීන පේලියයි, පරිවර්තනය කරපු පේලියයි වෙන් කරන්න හොදට ඉඩ කඩ තියන්න Enter එකෙන් ඔබල මෙන්න මේ වගෙ. එතකොට පැහැදිලිනෙ හුගක්.

#index.title=OpenMRS - Home
index.title=OpenMRS -නිවස

#login.title=OpenMRS - Login
login.title=OpenMRS - ඇතුලුවීම

#forgotPassword.title=OpenMRS - Forgot Passwordක්
forgotPassword.title=OpenMRS - මුරපදය අමතක වුනා

[3] Parameters සමග එකගොඩේ ලිවීමේදි උපදෙස්
---------------------------------------------------
general.displayingXtoYofZ=Displaying {0} to {1} of {2}
මෙවැනි වචනයක් පරිවර්තනය කරද්දි ගොඩක් ප්‍රවේසම් වෙන්න ඕනි.
මොකද ඔය {} දාල තීන්නෙ Parameters වගයක් Code එකෙන් පාස් කරන.
Java වල Command line arguments වගෙ සීන් එකක්.. ඒ නිසා ඕව කපන්නෙ නැතුව ගැලපෙන තැන් වලට සෙට් කර කර හදන්න.

මෙන්න මේ වගෙ
#general.displayingXtoYofZ=Displaying {0} to {1} of {2}
general.displayingXtoYofZ=දැන් පෙන්වන්නේ {0} සිට {1} දක්වා {2} මෙයයි

[4] HTML Tags තියෙ නම් එහෙමම තියන්න. කලින් අර Parameters සීන් එක විදියටම ක්‍රියාත්මක වන්න.

උදා :
#general.notYetImplemented=<font color='red'>Not Yet Implemented</font>

general.notYetImplemented=<font color='red'>මෙය තාම යොදාගෙන නැහැ</font>

---------------------------------------

දැනට නම් මට මෙච්චරයි විශේෂයෙන් සදහන් කරන්න දේවල් තීන්නෙ.. මොනා හරි අවුල් තැනක් තිබ්බොත් මට කියන්න. නැත්තම් මැසේජ් එකක් දාන්න..

සිංහලෙන් කොටන්න දන්නෙ නැති අයට
--------------------------------------------

RSinglish තමයි මං යූස් කරන Tool එකෙ නම. තව ඒව ගොඩක් තීනව.
මොනා හරි කමක් නෑ සිංහල යුනිකෝඩ් වලින් ටයිප් වෙන්නයි ඕනි.

Rsinglish වෙබ් අඩවිය :  [http://www.madurax86.com/rsinglish]
මේක නම් හෙන ලේසි පාවිච්චි කරන්න.
මේකෙන් අපි ලියනවත් එක්කම සිංහලෙන් කොටන්න පුලුවන්.
Scroll Lock එකෙන් තමයි සිංහල/ඉංග්‍රීසි switch වෙන්නෙ..

මුලින් මේක Download කරගෙන Install කරගන්න.


ඊට පස්සෙ Scroll eka එක ඔබල මොනා හරි කොටන්න. ඔයාට පෙනේවි සිංහල අකුරු.
ආයි ඉංග්‍රීසියට මාරු වෙන්න ආයි Scroll lock එක ඔබන්න. වැඩේ හෙන ලෙසි.

ඔයාට "අම්මා" කියල ටයිප් කරන්න ඕනි නම් Keyboard එකෙ "amma" කියල ටයිප් කරාම හරි.

Notes.
බිංදුව එන්නෙ q එකෙන්. තව Shift එකෙන් දීර්ග ඇලපිලි ආදිය පුලුවන්.
ටයිප් කරන ආකාර ගැන වැඩි විස්තර සදහා  [http://www.madurax86.com/rsinglish] බලන්න.

----------------------------

සිංහලයට පරිවර්තනය කරද්දි පුලුවන් තරම් ලංකාවෙ තොරතුරු තාක්ෂණයට නඹුරු වෙච්ච වචන භාවිත කරන්න උත්සුක වෙනවානම් වටිනව.

පලමු අදියර විදියට මම වචන 500 List එකක් Web Based Document එහෙක දාල තීනව. මේක Web based Collaborative Writing Tool එකක්.. ඒ නිසා Online කීප දෙනෙක්ට එක සැරේ උනත් මේ Document එක Edit කරන්න පුලුවනි.
ටිකක් ඈතින් ඈතින් ඔයා ටයිප් කරගෙන යන්න.. කොහොමත් අනික් කෙනා ටයිප් කරන දේ පෙනෙන නිසා ලොකු ගැටුලුවක් මතු වෙයි කියල මම හිතන්නෙ නැහැ.

හරි එහෙනම් අපි වැඩේ පටන් ගමු!
සිංහලෙන් ලිවීමේදී සිංහල Unicode පමණක්ම භාවිතා කරන්න
මේ Document එකෙ මහන්සි වෙලා ලියන ඔයාගෙ අනන්‍යතාවය තවහුරු කරන්න අමතක කරන්නෙපා. ඒ සදහා දකුණු පැත්තෙන් උඩම තියෙන කොටුවෙ නම සදහන් කරන්න.
Document එකෙ කැමති තැනකින් පරිවර්තන කටයුතු පටන් ගන්න ඔයාට අවස්ථාව තීනව.
 
මං හිතනව කවුරුත් මේ පුණයකර්ම වැඩේට අනවශය විහිළු නොකරයි කියල. මේ ලියන දේට කුණුහරුප ලියලවත්, ලියන දේවල් මකල වත් පව් පුරවා නොගනී කියල.
කලින් Save කරන ලද Revisions තියෙන නිසා කොහොමත් එච්චර ලොකු අවුලක් වෙන්නෙ නැහැ.

මොනා හරි දෙයක් ලියූ පසු Save Icon එක මත ක්ලික් කර Save කරන්න.  
හැම තිස්සෙම Save කරන්නත් එපා මොකද මේක Free Service එකක් නිසා හැමෝගෙන්ම එකතුව උපරිම Save 100ක් තමා ඉඩදීල තියෙන්නෙ.. 
පමණට හිතල ඔයා ගොඩක් දේවල් ලිව්ව කියල හිතුනම විතරක් Save කරන්න.

මෙන්න එහෙනම් අපි වැඩ පටන් ගමු.
http://open-mrs-sinhalen.tk/

Gathering Srilankan community to involve in traslating Sinhala localized version of OpenMRS [සිංහල සංස්කරණයකට.]

[Here's my first blog post gathering community (actually most of them were my University friends) to translate OpenMRS into a Sinhala localized version, while explaining them the value of OpenMRS system and how we could involve by "Write codes, Save lives!" in a global health-care system.]
(The below post is written in Sinhalese Unicode font which is the native Language of Srilanka)
මචංලා, මචීලා, පොඩි උදව්වක් ගන්නයි මේ හදන්නෙ.. හරිම වටින දේකට..
ඔයාල සමහරවිට දන්නව ඇති Open MRS කියල විවෘත කේත අරෝගයශාලා කලමණාකරණ පද්ධතියක් ගැන. http://openmrs.org/ 
ඉතිං මගෙ අයිඩියා එකක් තීනව ඒ සිස්ටම් එක Localisation කියන දේ පදනම් කරගෙන සම්පූර්ණ සිංහල සංස්කරණයක් සකස් කරන්න.. ඇත්තටම ඒ දේ එච්චරම ලොකු වැඩකුත් නැහැ.. නිකම්ම ඉංග්‍රීසි බසින් තියෙන දේවල් ටික සිංහලයට ගැලෙපෙන පරිදි හරවන්නයි තීන්නෙ.. මෙන්න මේ වගේ..

උදා: Patient Registration=රෝගීන් ලියාපදිංචි කිරීම

හරිම පොඩි වැඩක් නේද තීන්නෙ. වැඩේ තින්නෙ මේ සිස්ටම් එකෙ ආසන්න වශයෙන් වචන/වගන්ති 2600 ක් පමණ අන්තර්ගතයි.. ඒක නිසා මේ දේ මට තනියම කරන්න පුලුවන් දෙයක් නම් නෙවෙයි.. අපි හැමෝම එකතු වෙලා වචන 50, 50 බෙදාගෙන සතියක් විතර කරොත් නම් ලේසියෙන්ම කරගන්න පුලුවන් වෙයි කියල හිතනව. සිංහලෙන් කොටන්න කැමති යාලුවො මට උදව් කරන්න.. ලොකු දෙයක්..
සිංහලෙන් කොටන්න හරියට දන්නෙ නැති ඒත් උදව් කරන්න කැමති නම් ඒත් කමක් නැහැ. පොඩි සොෆ්ට්වෙයා කෑල්ලක් දාගත්තම හරි ඒකට.

අමතක කරන්නෙපා මේක තමයි ලෝකෙ දැනට තීන ලොකුම සහ සාර්ථකම අරෝගයශාලා කලමණාකරණ පද්ධතිය බව. කවදහරි දවසක මේකෙ සිංහල සංස්කරණය එලිදක්වද්දි ඔයාටත් සංතෝස වෙන්න පුලුවන් මාත් මේකට සම්මාදම් උනා කියල..

වැඩේට කැමති නම් මේ ෆේස්බුක් ගෲප් එකට සෙට් වෙන්න පස්සෙ මම ඒ කට්ටියට වැඩේ කරනං යන විදිය දැනුම් දෙන්නම්. ස්තූතියි!
 

[Solved] Open MRS WebApp build Problem.

Are you Experiencing below kind of a problem when building the OpenMRS System for the First time?

[INFO] Starting jetty 6.1.10 ...
2012-01-19 11:46:28.295::INFO:  jetty-6.1.10
2012-01-19 11:46:29.043::INFO:  No Transaction manager found - if your webapp requires one, please configure one.
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2438) |2012-01-19 11:46:30,460| Unable to find a runtime properties file at /home/harshadura/OpenMRS/Openmrs-trunk/webapp/openmrs-runtime.properties
ERROR - Listener.contextInitialized(154) |2012-01-19 11:46:35,015| Got exception while starting up: 
java.lang.RuntimeException: Error occurred while trying to get the updates needed for the database. Unable to get a connection to the database.  Please check your openmrs runtime properties file and make sure you have the correct connection.username and connection.password set
 at org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:627)
 at org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:586)


Then, Create the "openmrs-runtime.properties" on the place mentioned by the jetty log.

vim /home/harshadura/OpenMRS/Openmrs-trunk/webapp/openmrs-runtime.properties

And then put the below data into it. Note : Create the Database and give the necessary details into it.

connection.username=open
connection.password=open
connection.url=jdbc:mysql://localhost:3306/openmrs?autoReconnect=true

Save and try a Jetty:run again! It should work.