Category Archives: cs-wsu

Setting up OpenMRS

Initially getting OpenMRS running was not that difficult, but connecting it to MySQL and installing the Legacy UI was a little more challenging. To Install OpenMRS, I simply cloned the repository to my machine. Initially I had tried importing the project into IntelliJ, but was having difficulty properly configuring JUnit to work with IntelliJ, so I switched to Eclipse. After importing the project, I used the command line to navigate to the directory the repository was in and ran mvn clean install. I then navigated to the webapp subdirectory and ran mvn clean install and then mvn jetty:run to get OpenMRS running whereupon I tried connecting it to my MySQL instance.

I had initially thought that I already had MySQL installed correctly, but I had to re-download an older version and the correct command line utilities to get it to run. I started MySQL from the command line using sudo /usr/local/mysql/support-files/mysql.server start

After starting MySQL the Database correctly connected to OpenMRS, but I still needed to get the Legacy UI. I cloned the Legacy UI repository, navigated to that directory, and ran mvn clean install. I then copied the legacy-ui-snapshot-1.0.omod to my ~/.OpenMRS/modules directory and everything was working!

From the blog cs-wsu – Spencer Leal by spencerleal and used with permission of the author. All other rights reserved by the author.

Setting up my OpenMRS Environment

To begin working on the OpenMRS project, me and my assigned team had to set up our work environment on our computers, which proved to be no simple task. Here is the list of steps I took in order to get it working on my computer.

  1. Checked the list of prerequisites we needed locally for OpenMRS
    • Java 1.7 or higher
    • Maven
    • MySQL 5.6
    • Git
    • Java IDE (I used IntelliJ IDEA)
  2. Clone the “openmrs-core” Github repository locally
  3. Run “mvn clean install” in the openmrs-core directory on the command line
    • Everything built fine
  4. Run “mvn jetty:run” in the openmrs-core/webapp directory on the command line
    • Wait for the message saying it is running
  5. Go to http://localhost:8080/openmrs and follow the instructions
    • I setup the database with demo data
  6. Clone the “openmrs-module-legacyui” Github repository locally
  7. Run “mvn clean install” in the openmrs-module-legacyui directory on the command line
  8. Copy the file “openmrs-module-legacyui/omod/target/legacyui-{version}-SNAPSHOT.omod” ON WINDOWS put into APPDATA/OpenMRS/modules
  9. Redo step 4 and refresh the page until the legacyUI loads

 

From the blog cs-wsu – mmoussa7wsu by mmoussa7 and used with permission of the author. All other rights reserved by the author.

Clean Coder Chapter 2-3

Robert C. Martin’s textbook Clean Coder: A Code of Conduct for Professional Programmers gives useful insight to being a professional programmer. After reading chapter 2 and 3 of Clean Coder, you can begin to understand the big responsibility a programmer or a team has when they say they “can” or “cannot” do something. When you are completing your tasks on a deadline, other people are relying on your work to be correct and functional. Accepting the task and saying you “can” do it, is not something that should be taken lightly. Sometimes there has to be compromise in order to release something that is acceptable. If there is something that simply “cannot” be done, then speak up and say what you actually achieve. A professional must fully stand behind his acceptance of a task, and be able to complete it. In order to be a professional in the workplace, you must have your own opinion on when and how something can be completed. These two chapters are all about the responsibility that every professional programmer must have.

From the blog cs-wsu – mmoussa7wsu by mmoussa7 and used with permission of the author. All other rights reserved by the author.

Setting Up OpenMRS Core

This task seemed fairly simple at a glance, detailed instructions, clear screenshots, and a group of classmates doing it together; what could be so difficult? To start off I had cloned the openmrs-core repository from github into my eclipse workspace. After doing so I had imported it as a git project from a local repository. After doing so I needed to convert the project into a maven project. After doing so I was able to run the project as maven clean then maven install with build success! Doing this was just the beginning. Next was to get it to work on command line and be able to run the UI for the EMR that we will soon be creating modules for. After getting into the top level of my openmrs-core directory I ran mvn clean install with another build success. Next I needed to download MySQL in order to have access to storing patient information and to also import the demo data that was given to test the EMR. After installing MySQL and then moving one level down into the webapp folder I ran mvn jetty:run. This connected me to the jetty server where I could see the UI. After going to the EMR setup I had found out that the UI was not  installed with the latest version of OpenMRS. I had to clone another git hub repository with the UI and run mvn clean install from command line to create an .omod file. This was then moved to my appdata directory inside the modules directory of OpenMRS. Finally! The last step was to go back into webapp and connect to the jetty server. I was now able to sign into the EMR and get OpenMRS core working. All that is left is to find out what tickets need to be worked on in the Radiology module.This was very time consuming as the project instructions were out of date or missing some information that would have helped along the way. The OpenMRS project is a great tool to help people around the globe and I hope to contribute meaningful work to this project!

From the blog CS@worcester – Greg Tzikas by Greg Tzikas and used with permission of the author. All other rights reserved by the author.

The Clean Coder

I enjoyed reading the beginning of The Clean Coder very much. The Foreword in which the way that developers  are treated by management is highlighted rang true with my own personal experience. The Foreword also laid out the main theme of the book and gave a great purpose for continuing reading. The Preface was also very powerful, and displayed how management ignores the technical experts with dire consequences. The Pre-Requisite Introduction gave a good introduction to the author and his background. The most powerful part of the reading in my mind was in Chapter 1 where the author said that QA should find nothing, and that bugs making it to QA should be just as embarrassing as bugs making it to production. The emphasis on extensive testing and automated tests had an impact on how I do my software development. I enjoyed reading the beginning of The Clean Coder and look forward to continuing reading.

From the blog cs-wsu – Spencer Leal by spencerleal and used with permission of the author. All other rights reserved by the author.

Clean Coder ch2

This chapter was very hard to read because I am not a confrontational person. I would rather become a sleep deprived, caffeine addicted, overworked person for a few weeks than tell my boss no. I may argue here and there with people on the same field as me, but anyone put in authority over me is to be heeded to. I would absolutely be one of the people saying, “I will try”. I am not sure how much I could change in this aspect, being friendly with others is my personality, and I am not sure I would want to risk changing that. In the instances provided in the text, I can see why and how it is useful to say no, but it would take a lot to get me to that point. This chapter was filled with useful points and examples, and probably contains the most important information that I needed to hear.

From the blog shatos by shatos and used with permission of the author. All other rights reserved by the author.

Clean Coder ch1

Overall, the first chapter of the book “The Clean Coder” had a lot of useful insights and lists of useful information, as well as good ideas for self-improvement. There were a few minor things I disagreed with such as always writing tests first, and testing every single line. While parts of these things are useful, actually writing the tests first is not always the best thing, and testing every line is ideal but often unnecessary unless coding in a basic environment. His point about spending time outside of work on practice is a good idea, though hard to follow. I think it is great that he talks about owning your work and the responsibility that comes with it. I do not know if I would pay a company $10,000 for a mistake I made, but the reasoning was not lost on me. Professionalism is definitely something I must work on.

From the blog shatos by shatos and used with permission of the author. All other rights reserved by the author.

Clean Coder ch2

This chapter was very hard to read because I am not a confrontational person. I would rather become a sleep deprived, caffeine addicted, overworked person for a few weeks than tell my boss no. I may argue here and there with people on the same field as me, but anyone put in authority over me is to be heeded to. I would absolutely be one of the people saying, “I will try”. I am not sure how much I could change in this aspect, being friendly with others is my personality, and I am not sure I would want to risk changing that. In the instances provided in the text, I can see why and how it is useful to say no, but it would take a lot to get me to that point. This chapter was filled with useful points and examples, and probably contains the most important information that I needed to hear.

From the blog shatos by shatos and used with permission of the author. All other rights reserved by the author.

Clean Coder Chapter 1

Robert C. Martin’s book  Clean Coder: A Code of Conduct for Professional Programmers reviews the basics of being a professional programmer in chapter 1. Some of the important key points are being responsible for all your work, making sure your code is the highest quality you can manage, always test your own code, and being aware of more than just the code. Martin gives a great introduction to being a professional for anyone that is not quite sure what it truly means to be a professional programmer. I personally did not think this was that useful of a chapter though because most people know what being a professional is, it is just the matter of applying yourself to succeed at it. We will see what advice Martin gives in the next few chapters in my next Clean Coder post.

From the blog cs-wsu – mmoussa7wsu by mmoussa7 and used with permission of the author. All other rights reserved by the author.

Clean Coder ch1

Overall, the first chapter of the book “The Clean Coder” had a lot of useful insights and lists of useful information, as well as good ideas for self-improvement. There were a few minor things I disagreed with such as always writing tests first, and testing every single line. While parts of these things are useful, actually writing the tests first is not always the best thing, and testing every line is ideal but often unnecessary unless coding in a basic environment. His point about spending time outside of work on practice is a good idea, though hard to follow. I think it is great that he talks about owning your work and the responsibility that comes with it. I do not know if I would pay a company $10,000 for a mistake I made, but the reasoning was not lost on me. Professionalism is definitely something I must work on.

From the blog shatos by shatos and used with permission of the author. All other rights reserved by the author.