OpenMRS-Dev1

(Difference between revisions)
Jump to: navigation, search
(Created page with "At OpenMRS-Dev Howard Francis, based on group work started at the September 2015 POSSE, describes a virtual machine that has the OpenMRS-core as downloaded from [https://g...")
 
Line 1: Line 1:
 
At [[OpenMRS-Dev]] Howard Francis, based on group work started at the September 2015 POSSE, describes a virtual machine that has the OpenMRS-core as downloaded from [https://github.com/openmrs/openmrs-core the OpenMRS github repo].  He then installed Eclipse on the VM so that he and his students could develop for the OpenMRS-core directly within the VM.
 
At [[OpenMRS-Dev]] Howard Francis, based on group work started at the September 2015 POSSE, describes a virtual machine that has the OpenMRS-core as downloaded from [https://github.com/openmrs/openmrs-core the OpenMRS github repo].  He then installed Eclipse on the VM so that he and his students could develop for the OpenMRS-core directly within the VM.
  
I took a slightly different approach with the VM I describe below.  I also started with the VM developed at POSSE 2015.  However, feeling that development within the OpenMRS core was too complicated, I instead had my students work on developing an OpenMRS module as described in [http://en.flossmanuals.net/openmrs-developers-guide/hello-world-module/ the OpenMRS Developer Guide].  This meant that I only had to have my students run the
+
I took a slightly different approach with the VM I describe below.  I also started with the VM developed at POSSE 2015.  However, feeling that development within the OpenMRS core was too complicated, I instead had my students work on developing an OpenMRS module as described at [http://en.flossmanuals.net/openmrs-developers-guide/hello-world-module/ the OpenMRS Developer Guide] and [https://wiki.openmrs.org/display/docs/Using+the+Module+Maven+Archetype Using the maven archtype wizard].  This meant that I only had to have my students run the VM as an OpenMRS-core JSP server with a MySQL DB on the backend.  My students could compile their module on their own workstation, which was the host machine for the VM OpenMRS server, and hence use whatever IDE they felt most comfortable with in developing that module.  Once the module was built on the host machine, the resulting OMOD file could be transferred to the ~/.OpenMRS directory on the VM using SFTP as described in the [https://manual.cs50.net/appliance/2015/ CS50 appliance manual].
 +
 
 +
To see how this works, download my virtual machine from [http://csf11.acs.uwosh.edu/CompletedDeptMod.zip] (about 2.5 GB).  Import and start the virtual machine.  Then open a terminal and start the OpenMRS JSP server by typing:
 +
 
 +
  '''$ cd openmrs-code/webapp'''
 +
  '''$ mvn jetty:run'''
 +
 
 +
I've put a working version of the "Add-a-department" module described under ''Customize Your Model'' in [http://en.flossmanuals.net/openmrs-developers-guide/hello-world-module/ the OpenMRS Developer Guide].  You'll find the source code for this module in a directory ''OpenMRS-module-development/Department/department'' on the VM.  If you copy this directory to your host machine, this will be the source code that your students can compile and build to get the OMOD module file.  To build the module, just type
 +
 
 +
  '''$ mvn clean install -Dmaven.test.skip=true'''
 +
 
 +
in this directory.  You will find the resulting OMOD file in ''omod/target/department-1.0-SNAPSHOT.omod''.  This is file the file you can transfer to the ~/.OpenMRS directory on the VM to install the module on the server.

Revision as of 02:45, 22 June 2016

At OpenMRS-Dev Howard Francis, based on group work started at the September 2015 POSSE, describes a virtual machine that has the OpenMRS-core as downloaded from the OpenMRS github repo. He then installed Eclipse on the VM so that he and his students could develop for the OpenMRS-core directly within the VM.

I took a slightly different approach with the VM I describe below. I also started with the VM developed at POSSE 2015. However, feeling that development within the OpenMRS core was too complicated, I instead had my students work on developing an OpenMRS module as described at the OpenMRS Developer Guide and Using the maven archtype wizard. This meant that I only had to have my students run the VM as an OpenMRS-core JSP server with a MySQL DB on the backend. My students could compile their module on their own workstation, which was the host machine for the VM OpenMRS server, and hence use whatever IDE they felt most comfortable with in developing that module. Once the module was built on the host machine, the resulting OMOD file could be transferred to the ~/.OpenMRS directory on the VM using SFTP as described in the CS50 appliance manual.

To see how this works, download my virtual machine from [1] (about 2.5 GB). Import and start the virtual machine. Then open a terminal and start the OpenMRS JSP server by typing:

 $ cd openmrs-code/webapp
 $ mvn jetty:run

I've put a working version of the "Add-a-department" module described under Customize Your Model in the OpenMRS Developer Guide. You'll find the source code for this module in a directory OpenMRS-module-development/Department/department on the VM. If you copy this directory to your host machine, this will be the source code that your students can compile and build to get the OMOD module file. To build the module, just type

 $ mvn clean install -Dmaven.test.skip=true

in this directory. You will find the resulting OMOD file in omod/target/department-1.0-SNAPSHOT.omod. This is file the file you can transfer to the ~/.OpenMRS directory on the VM to install the module on the server.

Personal tools
Namespaces
Variants
Actions
Events
Learning Resources
HFOSS Projects
Evaluation
Navigation
Toolbox