Category Archives: CS_WSU

OpenMRS DB issues

I wrote a detailed blog on what I have done since my last entry and in an attempt to undo a paste I hit cmd+z and it deleted everything I wrote. In my anger and frustration I will not be redoing it in as much detail. Essentially what I have been working on was trying to get the correct configuration for the mySQL database. I initially installed mySQL with homebrew. I think this led to some configuration issues so what I did was uninstall the homebrew version of mySQL and re-installed it with the mySQL .dmg that is provided from the mySQL official page. Once this was done there were several steps to take to configure mySQL. I used the instructions provided here for the installation, and here for the post installation configuration. Finally I followed the instructions here to change the root password. Once mySQL was all set up I started tomcat and hit the openMRS site. This launched the initial configuration to the DB, I chose the simple setup with the demo data. Once this was complete I found that I did not seem to have any of the data. To solve this I followed the instructions here. Once the data was added I was able to search for a patient and find one. After that I was able to add a drug regiment which was what we needed to be able to test.

Once we added the drug to a patient we could see where the drugs that a patient is on are populated and the buttons that come along with them. This lead us to decide to redesign how our functionality was implemented. We added a button at the bottom that will have a box open where you can select a drug that a patient is on (a feature that we found doesn’t work as we thought), modify the dosage and how often they should take it. We want to move this box up so that it comes more inline with the buttons that are present with each drug.

This is how it currently looks:
You click the button next to the green arrow and the content in the green box comes up.

We want it to look more like this:

This is what we will be working on now.

From the blog A blog about things by TRStaake and used with permission of the author. All other rights reserved by the author.

A blog about things 2014-04-07 14:03:00

Since my last post Matt and I have accomplished a few things. One we finalized the layout of the modify dosage feature we are looking to add. What we did was mimic the layout of the section used to add a new drug regimen. When you click on the modify dosage button a box opens up in the current window that has an area to modify the a drug regimen. The box contains a drop down populated with all the current drugs that the patient is on. There is also a text box to modify the dosage. There are some drop downs to modify the frequencey of drug administration, There is a “start date” box that will pop up a calendar that you can use to select a date. We added a Submit button that should submit the data and a clear button that will clear all fields.

Since the layout is all set now all we need to do is test. This is where we are coming into some issues. We are not able to add drug regimens to a patient. This makes it impossible to see if our drop down will populate with all the medications that the patient is on. Since we can not add a drug regimen we can not modify one. We are currently working to find out what is the issue here. My guess is that it has to do with the DB that we are connecting to.

Another thing that we have done was create a build script that reduces the time to deployment. Initially, when we run a maven clean/install it takes about 8 minutes to build and deploy. This means that any changes we make and want to see will take at least 8 minutes. We cut this down to about 1 minute by running the maven install with the skip tests flag.

  • mvn install -Dmaven.test.skip=true

While this helps in development we realize that the unit tests are important and so once we have reached a state that we are happy with we run the build with the tests as normal.

From the blog A blog about things by TRStaake and used with permission of the author. All other rights reserved by the author.

A blog about things 2014-03-10 14:03:00

Since my last Blog I have done a lot of work to get my workspace up and running. I first had to download and install java EE version of Eclipse from http://www.eclipse.org/downloads/

Once I had the EE version of eclipse i set out to make sure that EGit was installed and configured. It was already installed out of the box. So I cloned my project and then imported it into eclipse as a maven project. All this was done by following these instructions
Once that project was in my eclipse I built it by right clicking on the project -> Run As->Maven Clean. Then right clicking on the project -> Run As->Maven install. 
This kicks out a open.war to webapps/target folder. Then I deploy the openmrs.war to webapps folder in tomcat and am able to access the site via localhost:8080/openmrs. 

From the blog A blog about things by TRStaake and used with permission of the author. All other rights reserved by the author.

Installing openMRS Tools

This week I worked on installing the openMRS SDK along with cloning building and running the openMRS-core[0] codebase this week. To do this I needed to install mySQL and maven as prerequisites for the project.

Installing mySQL and maven were pretty simple thanks to the package installer homebrew[1]. If you are using a Mac and haven’t heard of homebrew i suggest you look into it. It makes installing maven as easy as: “brew install maven”. There is also a homebrew package for mySQL so I installed mySQL  the same way. Once I had the two installed I added the variables M2_HOME and MYSQL_HOME to my .bash_profile to remember where they are.

I had issues with my Terminal only recognizing java 1.6 even though when I did a check through the Java website it said that I had version 7. What I had to do was go to the Oracle website and download and install the Java 1.7 JDK. Once I did that the terminal reflected the correct version.

After this I went to github and forked the openMRS-Core [0] then cloned it to my local. Once in my local I changed to the repository and ran “mvn clean install” this built the code to the ‘target’ directory in the project.

Next was to run the project. I ran the “mvn jetty:run” command, then went to the localhost url, and did the initial setup.

After doing the initial setup, which created the DB, I am no longer able to successfully do a “mvn jetty:run” I will have to look into this more this week.

From the blog A blog about things by TRStaake and used with permission of the author. All other rights reserved by the author.

First CS-401 Post

This is my first post for the CS-401 class. It’s really late but you know what they say… Anyway today I sat down to catch up on all the work that I have missed. I wanted to do the following:

  • Catch up on readings
    • 14 Ways to Contribute…
      • I saw some of the same excuses that I run through my head when I think about trying to contribute to some kind of programming project. 
      • I had never thought about the closed bug issue I see this at at work all the time. The squeaky wheel gets the grease, and if there are issues out there that have been solved and aren’t causing an issue why would most people look thought the bug tracker for them. How would they even know about an issue to go looking for that matter. 
      • Over all the article was a pretty easy read, not long or overly technical.
    • How to Contribute to Open Source Without Coding
      • Just a list of things, not much of a read but I bookmarked it just incase I was at a loss for something to do. 
    • Bug Tracker
      • I am already familiar with bug trackers from work but the knowledge was gained on the fly so it was nice to see a fomal explanation of the system.

   Once I had caught up on the readings i wanted to catch up on the work so I set out to fork the Github repo. I am pretty familiar with git from my job so this was a painless activity that took less than 5 minutes. I am however torn between using the Github GUI that I have installed on my Mac or the good ‘ole command line. Who am i kidding command all day. Since I am using the command line I created a folder in my home directory (~) that will hold the repos for this project so I don’t have to ‘cd’ through a bunch of folders to get to it.

   After that I worked on the Issue Tracker Assignment. What we were supposed to do in the assignment is familiarize ourselves with the OpenMRS issue tracker. The assignment worked well I got familiar with the terminology that they use and the layout of the application. 

From the blog A blog about things by TRStaake and used with permission of the author. All other rights reserved by the author.