Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

How to do a custom login and/or home page?

The login and home pages are provided by the referenceapplication module (code). The general idea is that this is a "distribution modules" which controls how the entire reference application distribution works.

If you want to make significant customizations, you may be best off building your own distribution module and using this instead of the referenceapplication module. See how PIH has done this for Mirebalais here. (This module is an earlier approach that combines openmrs-module-referenceapplication and openmrs-distro-referenceapplication in a single place.)

Alternately you can fork the referenceapplication module, and modify the login and home pages there.

(We welcome suggestions for better ways to support this common use case.)

How to change the logo in the header?

You need to write a module that provides an extension with certain configuration. Your module should require the appui module, and in a file like /omod/src/main/resources/apps/headerconfig_extension.json

 {
    "id": "yourmoduleid.configureStandardHeader",
    "extensionPointId": "org.openmrs.module.appui.header.config",
    "type": "config",
    "extensionParams": {
        "logo-icon-url": "/ms/uiframework/resource/mirebalais/images/partners_in_health_logo.png", // a link underneath /CONTEXT_PATH that will be an <img src="..."/>
        "logo-icon-link": "http://google.com/" // defaults to /CONTEXT_PATH, i.e. the homepage, so you probably should not override it
    }
}

Note that this requires you be writing your own distribution module, and not using the referenceapplication module. See RA-461.

How to add an app to the home page with a link to a page in the legacy application from a module

For Example, lets add an app to the home page that has url to the find patient page in the legacy application, below are the steps:

1- Create an app descriptor file for the app with the contents below

   

 [

    {
       "id": "legacy.findPatient",
       "extensionPointId": "org.openmrs.referenceapplication.homepageLink",
       "type": "link",
       "label": "referenceapplication.app.legacy.findPatient.label",
       "url": "findPatient.htm",
       "icon": "icon-search",
       "order": 100,
       "requiredPrivilege": "App: legacy.findPatient"
     }
]

 

2- Add the file to the apps directory under the omod sub project of your module

How to define suggested names for registration?

Registration Core comes with 2 algorithms for the auto suggest name feature. You can specify which one to use by setting a global property. Go to the Legacy Administration app, then choose Advanced Settings and set registrationcore.patientNameSearch to one of the following:

  1. registrationcore.ExistingPatientNameSearch - (default) suggests names which have previously been entered more than 5 times
  2. registrationcore.BasicPatientNameSearch - suggests names which are listed as global properties. In order to configure click the Legacy Administration app, then choose Advanced Settings and set a comma separated list of names for these global properties. "registrationcore.familyNameAutoSuggestList" and "registrationcore.givenNameAutoSuggestList". Those will be the ones available for auto select.
  • No labels