Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you don't feel like reading that, checkout the basicmodule at http://github.com/OpenMRS/openmrs-module-basicmodule.git following the steps described here

You can find and check out a lot of examples from Git Hub at http://github.com/OpenMRS/. See projects starting with "openmrs-module-devexamplesexample". git following Following the steps described here to check out the code

For a more detailed introduction, download the EHSDI Training Course.  Module development is covered in lectures 8 and 9 of course EH204 OpenMRS Development. 

...

  • How do I deploy my module?
    • Run the the target "package-module" in the ant build.xml in the root of your module.
    • Option 1: Go to Manage Modules in the Administration section of the webapp. Upload your compiled .omod file from the /dist folder in your module
    • Option 2: Drop your .omod file into the <openmrs application directory>/modules folder and restart openmrs. (The application directory is either /home/tomcatuser/.OpenMRS or c:/docs and settings/tomcatuser/application data/openmrs)
  • How do I redeploy my updated module?
    • Option 1: Choose the "undeploy" link on the Manage Modules page and then deploy your module again
    • Option 2: Drop your new .omod file in the application data directory and restart openmrs
  • How do I specify Module Updates?
    • There is a page dedicated to theupdate.rdf file
  • How can I allow administration of the modules through the web?
    • You need to be sure this line is in your runtime properties file: module.allow_web_admin=true
  • Can I store my module source code in your Git Hub or subversion repository?
    • We welcome and encourage you to use our source code repository. Contact code at openmrs.org for additional help.
  • How do I perform unit testing in my module?
  • How can my module access the database? (Aka How can my module create its own service?)
  • What parts of OpenMRS does a module have access to override?
  • How can I add a new hibernate interceptor?
    • See the interceptorexample module's application context file (requires at least v1.6.0.8566)
  • What is a good/bad example of a Module adding functionality to OpenMRS?
    • A Module would not be used for to create a javaSwing client, but would be used to provide a RESTful view of the OpenMRS API via web services which could perhaps be connected to that Swing client.
  • Where does a Module fit into the larger OpenMRS architecture?
    • A Module is simply extended code in the OpenMRS web application. However modules are not permitted to alter web.xml except via the config.xml file.
  • How do I call one module from another? Can one module depend on another?
  • Does a Module have any special relationship to Spring?
    • No. A module is simply additional servlets, JSPs and resources to extend the OpenMRS web application. A module can use Spring, but is not tied to it.
  • I can't work on my module anymore, how do I abandon/retire my module?
    • There might be someone else in the community that wants to take over development. Send an email to the developer's list asking for volunteers. If no takers, put a note about the module's abandonment on the module's wiki page and in the module repository (if the omod has been uploaded) If you have not made a release, you can delete the module code from the repository and leave the abandonment note on the module wiki page with a link to the last working changeset in the repository.
  • A page requires certain global properties to be filled in, how to force the user to fill those out?