Hot Fix Patient Registeration

Hi Team,

I am making some changes in view of patient registeration page i.e. (registerPatient.gsp), which when deployed gets displayed as .page file. Now each and every time I make any change in registerPatient.gsp (view) I have to redeploy registeration module.

Can someone please tell is there an easy way of doing this to esacpe redeploying the module again and again?

OR is there any better way of doing this?

Did you get a chance to look at this? https://wiki.openmrs.org/display/docs/Using+the+UI+Framework+in+Your+Module

Hi @dkayiwa what is moduleId in this “-DuiFramework.development.yourmoduleid=”/path/to/root/of/mavenized/yourmoduleid" ?

And after enabling this as suggested in above link, how i will make the changes?

In your module, look for the equivalent of this: https://github.com/openmrs/openmrs-module-coreapps/blob/master/pom.xml#L5 For this module, the equivalent module id is coreapps.

After doing this, you just make changes as you have already been doing.

@dkayiwa Hi I have taken the below steps to start into developement mode.

Note:- I am running it on windows.

  1. Cloned registeration module into " C:\Projects\code\openmrs-module-registrationapp"

  2. Start the tomcat with passing variable arguments from command line C:\Projects\apache-tomcat-9.0.0.M15\bin>startup.bat -DuiFramework.development.registrationapp=“C:\Projects\code\openmrs-module-registrationapp”

  3. Then tried to make changes in registerPatient.gsp( in openmrs cache) file, but there was no effect

Could you please tell where I am going wrong?

What do you mean by openmrs cache? Secondly, try without using quotes for the module path.

I mean that after deploying the registeration module into openmrs, the changes I am doing in registerpatient.gsp page is in the cache (C:\Projects\apache-tomcat-9.0.0.M15\bin\openMRSAppData.openmrs-lib-cache\registrationapp)

That will not work. The automatic reloading works with changes made directly from the original source, not that cache. Where the original source is the path you specified with -DuiFramework.development.registrationapp

Hi @dkayiwa, I am making changes in the existing registeration module to change the UI (registerPatient.gsp) according to my requiremnt.

Did you try removing the quotes as i advised above?

yup done the same.

Which IDE are you using? Eclipse? IntelliJ? or something else?

I am using eclipse Luna Service Release 1 (4.4.1).

Let me go through with all the steps that I am doing.

  1. Cloned the code in C:\Projects\code\openmrs-module-registrationapp.

  2. Import this as maven project in eclipse.

  3. Build the code in eclipse using mvn clean install -DskipTests.

  4. Copy openrms.war file in C:\Projects\apache-tomcat-9.0.0.M15\webapps.

  5. Copy openmrs-runtime.properties file in C:\Projects\apache-tomcat-9.0.0.M15\bin

  6. Start tomcat server from command line.

    C:\Projects\apache-tomcat-9.0.0.M15\bin>startup.bat -        DuiFramework.development.registrationapp=C:\Projects\code\openmrs-module-registrationapp
    
  7. Now after enabling the development mode. I am going to the below folder for making UI changes to get refllected once I referesh the page.

C:\Projects\apache-tomcat-9.0.0.M15\bin\openMRSAppData.openmrs-lib-cache\registrationapp\web\module\pages\registerPatient.gsp

@dkayiwa, we can have a skype call, my skypeId is himanshu.jain1989

We generally discourage private calls and chats for public conversations. We always want as many as possible to learn from the conversations. So i would recommend that you use the public openmrs irc channel https://wiki.openmrs.org/display/IRC/Home

That being said, you are using the hardest and longest path for development changes testing. While in eclipse, right click on the webapp project and select Run As -> Maven build… In the windows that shows up, under Goals put: jetty:run Then go to the JRE tab and paste in the VM arguments before you click Run