Openmrs best practices for creating a widget in coreapps

Tags: #<Tag:0x00007f23e0b89a38>

(Laura Vignoli) #1

Hi All,

I would like to know what are the best practices when creating a new widget in coreapps.

For example, we are developing a widget that displays 2 graphs for vitals vs lab results. Part of the config is a vitals concepts set and a lab results concepts set that will populate 2 dropdowns.

 "id": "coreapps.resultstrendview",
 "instanceOf": "coreapps.template.dashboardWidget",
 "description": "",
 "order": 10,
 "config": {
     "widget": "resultstrendview",
     "icon": "",
     "label": "RESULTS TREND VIEW",
     "maxResults": "100",
     "maxAge": "1y",
     "Go to Page":"/openmrs/coreapps/patientdashboard/{{patientUuid}}&app=coreapps.resultstrendview"
 "extensions": [
         "id": "${project.parent.groupId}.${project.parent.artifactId}.mostRecentVitals.clinicianDashboardFirstColumn",
         "appId": "coreapps.resultstrendview",
         "extensionPointId": "patientDashboard.firstColumnFragments",
         "extensionParams": {
             "provider": "${project.parent.artifactId}",
             "fragment": "dashboardwidgets/customLinksWidget"

My questions are:

1- Is it ok to expect sets instead of comma delimited concepts

2- Should we add the app json as a template?

3- Should we write documentation in this wiki page:

4- Can we add the template with concept uuids that don’t exist in reference application?

Thanks you!


@maimoonak @minoneves @ssmusoke @imranarif @tmvumbi @dkayiwa

(Daniel Kayiwa) #2

@lauravignoli we are please sorry for the delay in getting back to you on this!

  1. Fine as a starting point to use sets. Though comma delimited concepts, or a mixture of both, looks like a more flexible approach.
  2. Yes go ahead and add the app json as a template.
  3. Adding to that documentation would be awesome! :slight_smile:
  4. Could you be knowing why these concepts are not part of the CIEL dictionary?

(Laura Vignoli) #3

Hi Daniel,

We are still adding concepts, so for now, we haven’t added them to CIEL. We plan to do it later on.

Thanks :slight_smile: Laura