Having difficult time getting start

Hey folks!

I am currently new to the OpenMRS project, and to be quite honest, I am starting to lose hope in being able to contribute to this project. One issue I was stuck on was trying to test my own module with the “Platform”. But the issue is, I don’t know how to. I have currently set up my OpenMRS SDK along with the “OpenMRS stand-alone” zip folder but when I tried to launch it up it gave me an invalid credential error when launching it up.

Sorry if this is somewhat incoherent but I am just wanting to get started to fixing and developing modules for the OpenMRS backend and just don’t know where to get started. I have read through some of the wiki and figured the best thing to do was to just be able to use the platform before even touching the code. If anybody could send me a link to some useful resources or even provide some tip and tricks to getting started with the development, I would be truly grateful.

Edit: I am also currently having trouble trying to start the stand-alone because of this issue: connection.password in openmrs-standalone-runtime.properties: how to set? . I am not quite sure how to log in through my shell; I have tried those commands given but it does not work.

Hi Vincent (and welcome); I am fairly new to OpenMRS myself so others might have better suggestions. But since I have to go through this process a few months ago, I thought I can share what has worked for me best.

I think you have seen OpenMRS SDK documentation. I usually use the Reference Application. You can simply start with

mvn openmrs-sdk:setup

and follow the interactive setup, use the “Distribution” option, and choose one of the “Reference Application” choices. Here is one example of how I set it up (to skip some of the questions):

mvn -e openmrs-sdk:setup -DserverId=SERVERID -Ddistro=org.openmrs.distro:referenceapplication-package:2.11.0-SNAPSHOT [OTHER FLAGS IF NEEDED, e.g., -DdbUser=DBUSER -DdbPassword=DBPASSWORD -DbUri='jdbc:mysql://localhost:3306/@DBNAME@?serverTimezone=GMT'... ]

you should replace the all-caps with what works in your environment (and can use the 2.10.0 version if you need a more stable one). I prefer to use a locally installed MySQL but you can also install and run MySQL through docker. Once the setup is done you should be able to run the Ref App:

mvn openmrs-sdk:run -DserverId=SERVERID

and access it on the port you specified during the setup, e.g., http://localhost:8080/openmrs.

To work on modules (and I suggest starting with fixing minor bugs in some existing modules), you can just make changes in the module repo, do a mvn clean package and copy the .omod file in the omod/target directory into the modules directory of the server you just set up under ~/openmrs/SERVERID/modules. Or you can do so from inside the Ref. App. at “Sys Admin > Modules > Add/Upgrad Modules” to avoid a server restart.

As I said, I am sure people with more OpenMRS experience have useful tips to add but I hope this helps.

5 Likes

Kindly try this credentials:

password : admin and Username: test

1 Like