Observation Control

Purpose

Observation Control can be configured to display all the observation values captured against the configured concepts (and within the configured number of visits). This control also has a provision to add initial and latest observation value (across all visits). The control can display values in a grid (tabular format, one column for each visit) or in section format (one for each visit).

Screenshot

Configuration

Sample Configuration

Add to clinical/dashboard.json for it to appear on the patient dashboard
"someNiceName": { // Any unique name
  "translationKey": "Vitals", // Mandatory. Should be a key from translation file, or just english text to show as title of the control
  "type":"observation", 
  "isObservation": true,
  "dashboardConfig": {   
    "conceptNames": ["Height", "Weight", "BMI", "BMI STATUS"],
    "scope": "latest" or "numberOfVisits": "4", //use either scope attribute or numberOfVisits attribute
    "showGroupDateTime": false   
  } ,
  "expandedViewConfig": {
    "conceptNames": ["Height", "Weight", "BMI", "BMI STATUS"],
    "showDetailsButton": true,
    "pivotTable": {
      "numberOfVisits": "4",
      "groupBy": "encounters",
      "obsConcepts": ["Vitals", "Height", "Weight", "Pathology"],
      "drugConcepts": "",
      "labConcepts": ""
    }
  },
  "hideEmptyDisplayControl": false
}


Key Field Table

KeyInfoMandatory
translationKeyThe name/translation Key(Internationalization) of the control to be displayed as Widget Title in the UI.Y
conceptNamesThe concept names of the concepts that need to be displayed in this widget.Y
scope

Can be latest/initial/blank.

If "latest", then the latest value of the observation across visits is shown. If "initial", then the first value across visits is shown. If a scope is not mentioned, then the number of visits has to be mentioned (numberOfVisits). Otherwise if the scope is blank, then the observation values across all visits are displayed.

N
isObservationSpecifies whether the given section is an observation control or a disease template control. If this is set to true then the section behaves as an observation control.Y
numberOfVisitsSpecifies the number of previous visits for which data has to be displayed on the pivot tableN
groupBy

Can be encounters/visits.

If grouped by the encounter, then the data is displayed per encounter in the pivot table. (A patient may have more than one doctor encounter within a visit).

If grouped by the visit, then the latest value of the observations in each visit is displayed in the pivot table.

Y
obsConceptSpecify the concept names of the observations that need to be displayed in the pivot tableY
drugConceptSpecify the concept names of the drugs that need to be displayed in the pivot tableY
labConceptConcept names of the lab tests that need to be displayed in the pivot tableY
dashboardConfigIndicates the configuration for the dashboard (Section Sub-Group)
Y
expandedViewConfigIndicates the configuration for the details page (All Observations Page)Y
showDetailsButton

Configuration to display audit information when '+ ' sign is clicked.

If set to false, the '+' button will not be displayed.

N
showGroupDateTimeConfiguration to display grouped encounter date time. If set to false, it is hidden. Default value is true (which means it is treated as true, if nothing specified). Should be separately configured for both dashboard and allDetails pageN
hideEmptyDisplayControl

Hides the display control if there are no recorded values present for it when set to true, default value is set to false

N

Initial And Latest Observations

Sample configuration

"atAdmission": {
 "type": "observation",
 "title": "At Admission",
 "config": {
 "conceptNames": ["Weight", "Height", "BMI"],
 "scope": "initial"
 }
}
"atDischarge": {
 "type": "observation",
 "title": "At Discharge",
 "config": {
 "conceptNames": ["Weight"],
 "scope": "latest"
 }
}


Nutritional Values Control

This is an example of an Observation Control


Sample configuration

"nutritionalValues": {
	"type": "observation",
	"isObservation": true,
	"dashboardConfig": {
		"conceptNames": ["Height (cm)","Weight (kg)","BMI Data"],
		"numberOfVisits": 1
	},
	"displayOrder": 1,
	"translationKey": "DASHBOARD_TITLE_NUTRITIONAL_VALUES_KEY",
     "hideEmptyDisplayControl": false
},

Please refer to https://github.com/Bhamni/default-config/blob/master/openmrs/apps/clinical/dashboard.json for further information.

Key Field Table

KeyInfoMandatory
typeIndicates type of control. This attribute is not being used in this control and can be set to any value. Recommend using value 'observation' for clarity that this is an observation control.Y

isObservation

Specifies whether the given section is an observation control or a disease template control. If this is set to true then the section behaves as an observation control

Y

dashboardConfig

Indicates the configuration for the dashboard

Y

conceptNames

Specify the concept names of the concepts that need to be displayed in this section. (Required)

Y

numberOfVisits

The number of visits for which data has to be displayed (alternatively you can use scope attribute and set it to value initial or latest value)

numberOfVisits or scope is required

displayOrder

The order in which the display control will be displayed

N

translationKey

Internationalizes the display control (picks the display title from a translation file)

Y
hideEmptyDisplayControl

Hides the display control if there are no recorded values present for it when set to true, default value is set to false

N

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)