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 13 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.

 

How to Add Visit Note(Diagnosis) To Closed Visit?

Problem: When a visit ends there wasn't an easy way for a user to reopen the visit X days later and add a visit note.

Solution: Create a HTML form that'll allow the user to add a visit note in the case of a closed visit:

With the HTML Form Entry Module installed, go to:
System Administration -> Advanced Administration -> HTML Form Entry -> Manage Forms -> New HTML Form:

After Clicking save you'll see the below, copy simpleVisitNote.xml contents into the HTML part e.g:

After saving, go to:
DashBoard -> Configure Metadata -> Manage Forms and from UI, click Add:

Then as explained by Darius Jazayeri enter the below: 

for the "UI" bit you want to add it as a visit action (not an overall/general action), and set:
label: "referenceapplication.visitNote.title"
icon: "icon-stethoscope",
order: 30,
requiredPrivilege: "Task: referenceapplication.simpleVisitNote",
require: "!visit.active"

This will now look like this and you can click then click on save:

Now when you want to add a visit note on a closed visit, you'll see the option as per the below, click on Visit Note and Enter Diagnosis as required:

This was Tested on Platform Version 1.11.4

 

 


  • No labels