Docs
Configure O3 Your Way
Configure your First Widget with an easy Template

Configure your First Widget with an easy Template

This can be achieved by adding an extension to the patient-chart-allergies-dashboard-slot of the esm-patient-chart-app.

Note: The "color" comes in for the chart visual. The color code you choose dictates the color of the data line in the chart.

Sample Config

{
  "@openmrs/esm-patient-chart-app": {
    "extensionSlots": {
      "patient-chart-allergies-dashboard-slot": {
        "add": [
          "obs-by-encounter-widget#hiv",
          "obs-by-encounter-widget#diabetes"
        ],
        "configure": {
          "obs-by-encounter-widget#hiv": {
            "title": "HIV Widget",
            "resultName": "HIV",
            "data": [
              {
                "concept": "1132AAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                "label": "sodium",
                "color": "green"
              },
              {
                "concept": "856AAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                "label": "Viral load",
                "color": "red"
              }
            ],
            "table": {
              "pageSize": 5
            }
          }
        }
      }
    }
  }
}

Video Tutorial: Add the Template "obs-by-encounter" Widget

Note: Have you developed a configurable extension? Please consider making a similar video to showcase how to do the configuration, and share your video on our Talk Forum (opens in a new tab)! This will create a library of widgets for us to showcase.