I am extremely sorry for the delay in the updates. Me and my mentor Daniel worked together and solved many issues. This is the first time in my lifetime to correct such many errors. But finally I see a small hope that I can finish the major part of the first deliverable by tomorrow. Actually I thought I could do that by last weekend but I could not. And that was the reason for the delay in the updates. Hope I will put my codes in repository in this week for further reviews, suggestions and enhancements. Right now I am little bit held up in the hql part. I am in the verge of completing. I will update this post once I get done with this issue. Thanks for the patience.
This week also had been very hectic because of the exams. AAAAHHH finally I am done with exams. This week I managed to do only few things. Right now I am stuck with my form controller. I think I don’t have any problems with hibernate and mapping. They seem to be pretty fine. I am planning to put my code in the svn repository once I am done with my form controller. All I have to do now with it is once my form is submitted the values should hierarchically stored in the table. Hope I will solve it soon. After this I still have “manage hierarchy section” I think that can be done easily once I complete this controller. But I must appreciate Rwanda Registration Module. It helped me a lot. Actually Brian insisted me to have a look at Rwanda Registration Module and Printing Module. In Rwanda Registration they have the address hierarchy facility. Though the locations are already stored in there and pulled out in the forms the codes can be used as reference and it instantly gives us some sparks to resolve some issue. Since its really late in the night my brain (oops… this is the third time i writing brian instead brain and correcting it…) is totally exhausted and I cannot get where am I stuck in this form controller. Tomorrow I gotta catch Daniel and solve this. It has been two weeks but still I have not complete the form thing. Again I have to speed up myself. You see I am the laziest person in the world 😛
Last week Ben and Paul enquired me about the Lambda Probe. And I replied to their comments. Actually Lambda Probe works fine for me. The main thing it helps me is in maintaining the system performance and not slowing down the firefox. But still I have to figure out one thing. When I delete my old module and try to upload the new modified one I am getting an error message saying “addresshierarchysupport-1.0.omod is already associated with a loaded module”. I thought to ask about this in IRC last week but forgot somehow because of exams. How will it be associated when there’s no modules at all in the module repository. Then everytime I have to restart my application to get the module to work in the system and LambdaProbe helps me to do that quickly without any troubles.
Why I have used this smiley in this title?
Answer at the end
Lets come to the point. The first week had been very hectic to me. I had a lot of trouble in designing project. The trouble is all because of me I have to accept that honestly. I had to satisfy everyone’s ideas like Daniel, Brian, Ben and etc. But I have done successfully in the late Wednesday. I had to speed up my brain and to work fast on coding. Here comes the problem, the biggest headache in everyone’s life EXAMSSSSS. I wanna know who introduced this in the world. It really slowed down my progress. I thought to be on safer i can do the front-end and sql stuffs. I first chose to do the sql thing. I made a very big mistake in sql.diff.xml file. I wrote the queries in two <diff> division. Well it gave me error 150. That error is for foreign key constraint. Finally I asked for Daniel’s help he suggested me to put all the queries under one <diff>. Ha that worked fine:).
In summer we face one more problem in India. The problem is so simple but cant tackle it. Power cuts. I struggled a lot with that last week. We never had so many power cuts in day time. 6 hours a day without power?? nah thats so difficult. Somehow now its alright but still i have exams till 6th :(.
During my coding i had to reload my webapp very often. I had a very hard time with tomcat while reloading it. It slowed down my entire system. I had to find some tool to fix it. Here come Lambda Probe. Really a good work which saved my time and temper. Here’s the link for the screenshot while reloading my app. It dint slow down my system and pretty fast too. Hats off Lambda Probe.
Finally I brought my module under the module management page without any errors. You can have a look at it here. And under the admin page I have brought it successfully. I have created two links one to create the hierarchies another to manage it like editing and deleting the hierarchy. But not yet decided about the second one. I am gonna start the backend work today hope I will get less errors this time :). I am gonna give you two more screenshots have a look at it. Here it is 1 and 2.
Sorry guys I dont want to test your patience by inserting all the images in the page. So if you wish to view them click on the links.
Answer: Because I have used that smiley more than a thousand times this week .
Address Hierarchy Support is one of the important module needed for enhanced user experience and easier administration. OpenMRS implementations need a way to enter patient location through a hierarchical approach — e.g., select a district from a drop-down list, then pick a village from within the district, then a location within the village.
Create a module which will allow the admin from within OpenMRS to easily create a location and to define custom location hierarchies. And the user from within OpenMRS to easily create a patient details with the flowing location hierarchy.
- Create two new tables address_hierarchy_type and address_hierarchy_type_value. address_hierarchy_type is to store and maintain the hierarchy components and address_hierarchy_type_value is to store the hierarchy component values or simply locations.
- Adding a new column to the table person_address named location_attribute_type_value_id. Its function is explained clearly in the example below.
- Adding a page under the module which enables admin to create locations in a hierarchical order and the values are stored in address_hierarchy_type_value.
- Editing the newPatientForm.jsp and its dependencies for enabling users to create the patient’s location hierarchically and only the location_attribute_type_value_id of the last member in the hierarchy is copied from address_hierarchy_type_value table to location_attribute_type_value_id of person_address table.
- For a clear working picture of the module please see below.
- The code for the module page which allows admin to create locations interactively and saves the locations in the location_attribute_type_value table and the hierarchy components in the location_attribute_type table. This will be my delivery for the mid-term evaluation.
- The rest of the project i.e. Editing the newPatientForm.jsp and its dependencies will be done after the mid term which enables users to select the locations hierarchically.
For working example click here.
P.S: Please leave your comments and suggestions.
After a lot of struggle I have successfully deployed OpenMRS in my computer with the help of Kayiwa Daniel!!!
It all started at 10 pm yesterday. I read the installation guide for developers in OpenMRS site. And prepared myself for the deployment as a Knight prepare himself for the battle. Yeah of course I am the Knight in the shining golden armor. I decided to download every prerequisites even though I have them in my system already. At around 11 pm I queued everything for download. The list follows
- Eclipse for JEE developers
- Tortoise SVN
Huh… I woke up early in the morning at 9 am(thats too early for me).. I decided to install fresh os on my secondary hard drive (160 GB). Yep done os has been installed and I installed all the prerequisites successfully and started my mission of deployment. I was doing the stuffs and I saw Kayiwa Daniel online at around 12.30 pm, that was 10 am in Daniel’s place. Discussed with him about today’s plan and started continuing my work. While I was wondering how everything is going so smooth without any problems, an error occurred in sql. Error 1451: cannot delete or update parent row. I was scared and for Daniel’s help. He immediately asked whether I have run the scripts properly or not. I said yes and he said me to try it with Mysql Manager GUI and actually I had Mysql command line tool. As he suggested I was downloading Mysql manager and the meanwhile I was trying to get everything right with command line itself. I grant the permission to the user I could insert into rows but could not delete… I was like ‘What the hell is going on???’… I lost my hope and tried with Mysql Manager and immediately everything worked. After this only I realized the importance of a mentor. Though this is a silly thing this thing would have taken me a longer time but fortunately I done everything successfully. Then I came to deployment in eclipse. Again I got struck at installing the build.xml in the ant console. Then I realized my mistake, I installed both JDK and JRE somehow unknowingly. So I uninstalled JRE alone and it needed the system to be restarted. I restarted the system and again I tried installing the build.xml in the ant console and got connection error. Then I checked everything and noticed my Tomcat was not working because it was set to the JRE path while installing. So I changed the path and started the server and installed the build.xml. Gotcha it was working and finally the build was created successfully :-). At last at 6 pm the mission has been accomplished successfully. It had taken me around 8 hours to do that this includes so many short naps, lunch and breakfast. I think I should speed up myself. Thats all for today folks. ta ta.
I am Sri Prasanna. K. I am doing my 2nd year in College of Engineering, Guindy, Chennai, India. I am very happy to work with OpenMRS in this summer particularly with my mentor Daniel Kayiwa. As Docpaul said in irc Daniel is a wonderful guy to work with. Docpaul is lucky he met Daniel once. Today I spoke to Daniel I dunno somehow he impressed me. The way he chatted impressed me at first. He avoided cutting short the sentences thats very rare to see. Probably he is the first for me 🙂 Oh no this my introduction post but i was introducing my mentor. Ok now about me. I am always fascinated and crazy about java. Java, the one thing I cant live without. So I applied for 5 Java projects this year in GSoC but only one got selected 😦 anyways thanks for OpenMRS. I love to code, play games and watch lot and lotta movies. I have a desktop pc right now but gonna buy a mac with $4500 from Google 🙂
Wait for my posts… I will be rite back… brb…