Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

A display control is a widget that displays a specific medical domain object. It takes in configuration that specifies the context (patient, visit etc) and other parameters (display specific feature toggles), retrieves relevant data on its own and displays it where it is placed on the application.

...

Jump to one of the sections:

Table of Contents

 Specify one or two column layout

We can specify one or two column layout for display controls. Options can be "Full-Page" and "Half-Page", with "Half-Page" being the default. When the "Full-Page" layout is specified for a display control it should appear on the top of the dashboard.

Info
titleSample

"sections": {
"diagnosis": {
"title": "Diagnosis",
"name": "diagnosis",
"showCertainty": true,
"showOrder": true,
"displayType": "Full-Page"
},
"disposition": {
"title": "Disposition",
"name": "disposition",
"numberOfVisits": 1,
"displayType": "Full-Page"
},

"radiology": {
"title": "Radiology",
"name": "radiology"
},
"programs": {
"title": "Programs",
"name": "programs"
}

}


Observation Control

Sample config

"nutritionalValues": {

...

KeyInfo
TitleIndicates the title that will be displayed on the dashboard/visit page for the section
NameThe name/id for the control that needs to be picked from the code
conceptNamesSpecify the concept names of the concepts that need to be displayed in this section
scopeCan be latest/blank. If "latest", then the latest value of the observation across visits is shown. If a scope is not mentioned, then the number of visits has to be mentioned. Otherwise if the scope is blank then the observation values across all visits are displayed
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
observationGraphIndicates the configuration for the pivot table/flowsheet
numberOfVisitsSpecifies the number of visits for which data has to be displayed on the pivot table
groupByCan be encounters/visits. If grouped by the encounter, then the data is displayed per encounter in the pivot table. If grouped by the visit, then the latest value of the observations in each visit is displayed in the pivot table.
obsConceptImplementor must specify the concept names of the observations that need to be displayed in the pivot table
drugConceptImplementor must specify the concept names of the drugs that need to be displayed in the pivot table
labConceptImplementor must specify the concept names of the lab tests that need to be displayed in the pivot table
dashboardParamsIndicates the configuration for the dashboard
allObservationDetailsIndicates the configuration for the details page (All Observations Page)
showDetailsButtonConfiguration to display audit information when '+ ' sign is clicked. If set to false, the '+' button will not be displayed.
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 page

...


For Initial And Latest Observations

Sample config

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

"atDischarge": {
"type": "observation",
"title": "At Discharge",
"config": {
"conceptNames": ["Weight"],
"scope": "latest"
}
}

...

Disease Template Control

Sample config

...

KeyInfo
titleIndicates the title that will be displayed on the dashboard/visit page for the section
templateNameindicates the name of the disease template in openMRS that needs to be displayed
namethe name/id for the control that needs to be picked from the code
showOnly

specify the concept names of the concepts that need to be displayed in this section. If blank, then all the concepts in that disease template will be displayed

pivotTableindicates the configuration for the pivot table/flowsheet
observationGraphindicates the configuration for the observationGraph (OPTIONAL)
numberOfVisits

specifies the number of visits for which data has to be displayed on the pivot table

groupBycan be encounters/visits. If grouped by the encounter, then the data is displayed per encounter in the pivot table. If grouped by the visit, then the latest value of the observations in each visit is displayed in the pivot table.
obsConceptsimplementor must specify the concept names of the observations that need to be displayed in the pivot table
drugConcepts

implementor must specify the concept names of the drugs that need to be displayed in the pivot table

labConceptsimplementor must specify the concept names of the lab tests that need to be displayed in the pivot table
dashboardParamsindicates the configuration for the dashboard
allDiseaseDetails

indicates the configuration for the details page (All Disease Details Page)

showDetailsButtonConfiguration to display audit information when '+ ' sign is clicked. If set to false, the '+' button will not be displayed.
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 page.

 

Treatment Control

Sample config

"treatment": {

...

KeyInfo
title

Indicates the title that will be displayed on the dashboard/visit page for the section

namethe name/id for the control that needs to be picked from the code
showFlowSheetconfiguration to display the flowsheet (treatment chart). If it is on, the flowsheet will be displayed along with the treatment details for IPD patients.
showListViewconfiguration to display the treatment details list. If set to false along with showFlowSheet, only the header will be displayed.
showRouteconfiguration to display the route information. If you don't specify the "showRoute" in the treatment section, the default value will be false.
showDrugFormconfiguration to display the drug form information. If you don't specify the "showDrugForm" in the treatment section, the default value will be false.
numberOfVisitsspecifies the number of visits for which data has to be displayed
showOtherActiveif set to true, then display a separate section "Other Active Drugs" which displays active drugs from other visits.
showDetailsButtonConfiguration to display audit information when '+ ' sign is clicked. If set to false, the '+' button will not be displayed.
dashboardParamsindicates the configuration for the dashboard
allTreatmentDetailsIndicates the configuration for the details page (All Treatments Page)

 

...

Lab Result Control

Sample config

"labResults": {
 "title": "Lab Results",
"name": "labOrders",
"dashboardParams": {
   "title": null,
   "numberOfVisits": 1,
   "showChart": false,
   "showTable": true,
   "showDetailsButton": false,
"showNormalLabResults": true,
"showCommentsExpanded": true,
"showAccessionNotes": true,
"visitUuids": null, //ignores numberOfVisits if provided
"patientUuid: null, //mandatory if numberOfVisits provided
},
"allLabDetails": {
   "numberOfVisits": 3,
"observationGraph" : {
"type": "observationGraph",
"name": "observationGraph",
"title": "Temperature",
"config": {
    "yAxisConcepts": ["Temperature"],
    "numberOfVisits": 3
}
 }
}
KeyInfo
dashboardParamsindicates the configuration for the dashboard
titleIndicates the title that will be displayed on the dashboard/visit page for the section
namethe name/id for the control that needs to be picked from the code
numberOfVisitsspecifies the number of visits for which data has to be displayed
showChartconfiguration to display the investigation chart. If it is on, the investigation chart will be displayed along with the lab results table for IPD patients
showTableconfiguration to display the lab results table. If set to false along with showFlowSheet, only the header will be displayed.
showDetailsButtonConfiguration to display audit information when '+ ' sign is clicked. If set to false, the '+' button will not be displayed.
showNormalLabResultsShow lab results that are not marked abnormal in OpenElis. 
showCommentsExpandedShow comments expanded where they are present. The comments section will be collapsed by default if there are no comments mentioned in OpenElis
showAccessionNotesDisplay Accession Notes provided by Lab Manager in OpenElis
allLabDetailsindicates the configuration for the details page (All LabDetails Page)
observationGraphindicates the configuration for the observationGraph (OPTIONAL)

 

...

Diagnosis Control

Sample config

"diagnosis": {
"title": "Diagnosis",
"showRuledOutDiagnoses": false,
"name": "diagnosis",
"showCertainty": true,
"showOrder": true,
},

 

KeyInfo
titleIndicates the title that will be displayed on the dashboard/visit page for the section
namethe name/id for the control that needs to be picked from the code
showRuledOutDiagnoses

Indicates whether to filter out ruled out diagnoses or not. If set to false, ruled out diagnoses will not be displayed in the display control

showCertainty

Indicates whether certainty(CONFIRMED/PRESUMED) of the diagnosis should be displayed for each diagnosis in the display control.

If set to false, certainty of the diagnosis will not be displayed for the diagnoses.

showOrder

Indicates whether order(PRIMARY/SECONDARY) of the diagnosis should be displayed for each diagnosis in the display control.

If set to false, orders for the diagnosis will not be displayed for the diagnoses.

...

Patient Profile Control

Sample config

"patientInformation": {

...

KeyInfo
showDOBIndicates whether date of birth should be displayed in the control. Default value is true if nothing mentioned

...

Disposition Control

Sample config

"disposition": {
 "title": "Disposition",
"name":"disposition",
"numberOfVisits": 2

}

 

...

Graph Control

Sample config

"temperature": {

...

KeyInfo
typethe type/id for the control that needs to be picked from the code. (Required in Visit page)
namethe name/id for the control that needs to be picked from the code. (Required)
titleindicates the title that will be displayed on the dashboard/visit page for the section. (Required)
yAxisConceptsarray of concepts for which observations need to be plotted on the graph. (Required)
xAxisConceptsconcept on X Axis (observationDateTime, age or any concept) (Required)
numberOfVisitsspecifies the number of visits for which data has to be displayed. (Optional)

 

...

Graph With Reference Data Control

Graph Control Config becomes Chart With Reference Data Config with the addition of the 'referenceData' in the config section referring to the .csv file as shown below

"growthChart": {
"type": "observationGraph",
"name": "observationGraph",
"title": "Growth Chart",
"config": {
"yAxisConcepts": [ "Weight" ],
"referenceData": "growthChartReference.csv",
"numberOfVisits": 20
  }
}
KeyInfo
yAxisConcepts
It can be any Numeric Concept name.
It has to be a single value.
It can't be multiple values or empty. (Required)
referenceData
It would be name of the csv file to be loaded.
The csv file has to be in the same folder as this config file. (Required**)
**If the referenceData is not mentioned, the config will become Graph Control Config. Then, Graph Control Config specifications are applicable.
 numberOfVisits
It is the number of visits for which data has to be displayed.

 

Sample Reference Data CSV file
Gender, Age, Ref1, Ref2
M, 1, 10.5, 12.5
M, 2, 20.5, 22.5
F, 1, 9.5, 12
F, 2, 19.5, 22
  • First row is the header row
  • Age, Gender column name should always be 'Age', 'Gender' labels
  • Age, Gender columns are mandatory
  • Age is always assumed to be months (you can give decimals to represent days)
  • Other columns will correspond to the each reference line

...

Orders Control

Displays all the orders (for configured number of visits) and associated observations (scope latest always) for an orderType configured below.

...

KeyInfo
orderTypetype of the order you want to display (Required)
namethe name/id for the control that needs to be picked from the code. (Required)
titleindicates the title that will be displayed on the dashboard/visit page for the section. (Required)
conceptNamesSpecify the concept names of the concepts that need to be displayed in this section. (Required)
numberOfVisits

specifies the number of visits for which orders has to be displayed. (Optional)

dashboardParamsindicates the configuration for the dashboard
allOrdersDetailsIndicates the configuration for the details page (All Orders Page)

...

"radiologyOrderControl":  {
        "type": "order",
        "title": "Radiology Order Display Control",
        "config": {
                           "title": "Radiology Order Display Control",
                           "name": "ordersControl",
                          "orderType": "Radiology Order",
                          "conceptNames":["Systolic", "Diastolic", "Posture", "Temperature"]
          }
}

...

Programs Display Control

When the user navigates to the patient dashboard by selecting a program from the program management page, the program display control displays only information that pertains to that selected program. However when the user enters consultation directly, the program display control displays all programs and related information. 

"programs": {

    "title": "Programs",
"name": "programs"
}
KeyInformation
titleThe title to be shown in the display control
nameShould be 'programs'

...

Pacs Orders Control

"allPackOrders": {
"orderType": "Radiology Order",
"name": "pacsOrders",
"title": "ALL PACS ORDER",
"dashboardParams":{
"pacsImageUrl":"http://10.0.0.10:8080/oviyam2/viewer.html?patientID={{patientID}}&accessionNumber={{orderNumber}}",
"numberOfVisits":4
  }
}
KeyInformation
titleThe title to be shown in the display control
nameShould be 'pacsOrders'
orderTypeOnly the orders of this type will shown in the display control
dashboardParams
KeyInformation
pacsImageurl

The url template of the pacs image link. (For ex. It could be the Oviyam2 DICOM image viewer link)

PlacholdersReplaced with
{{patientID}}The identifier of the patient
{{orderNumber}}The order number of the order

These placholders has to be parts of the url template

numberOfVisitsIt is the number of visits for which data has to be displayed

Flow Sheet Control

The flow sheet found in the Observations Display Control and the Disease Template Display Control can be independently set on the dashboard by using the flow sheet display control. 

...

KeyInformation
titleTitle of the visit tab.

dashboardParams

Parameters of display control on the dashboard.

KeyInformation
numberOfVisits
Specifies the number of visits for which data has to be displayed
groupBy
Can be encounters/visits. If grouped by the encounter, then the data is displayed per encounter in the pivot table. If grouped by the visit, then the latest value of the observations in each visit is displayed in the pivot table.
obsConcepts
Concepts of observations to be chosen for display
labConcepts
Concepts of lab results to be chosen for display
drugConcepts
Concepts of drug orders to be chosen for display
  
 allFlowSheetDetails

Parameters for configuration in the expanded view. Elements inside have the same format as elements inside dashboardParams.

If empty, defaults to dashboardParams

  

...

Custom Control

Bahmni allows implementers to create their own custom display control.

...

1. Make sure you don't create a different file for new directives (all custom directives should be in the same file.)
2. Don't forget to change the contentUrl to the html file you are referring to.

Navigation Links Control

To configure the navigation links control on a Dashboard Page, as an example, add the configuration below in the "dashboard.json" file that is under the Clinical App. 

...

KeyInfo
name

Name of the display control 

showLinksList of links user would like to inherit from default links provided by product
  "home" // Enables link to navigate Home Page
 "visit"     // Enables link to navigate to current patient's Active Visit Page
 "registration"     // Enables link to navigate to current patient's Registration Page
 "inpatient"     // Enables link to navigate to current patient's Inpatient Page
 "enrolment"     // Enables link to navigate to current patient's Program Page
 

"visitAttribute     // Enables link to navigate to current patient's Visit Attributes Page ( second page of registration)

customLinksList of links that the user would like to add which are not provided by product
 translationKey : Text to display in the link
 

url: Url to navigate to

Obs To Obs Flow Sheet

To configure the Obs to Obs Flow Sheet on a Dashboard Page, as an example, add the configuration below in the "dashboard.json" file that is under the Clinical App. 

...

In the code at line "Specimen Collection Date" is groupByConcept for the Flowsheet.

Note:  Make sure that the extension file is copied to "/home/Username/.OpenMRS/bahmni_config/openmrs/treatmentRegimenExtension/" directory.

...

variabledescription
cultureResultObsValueInDescendingOrderVariable that holds the fully specified names of coded answers in the descending order
Bacteriology, Culture resultsQuestion concept fully specified name

 

 


 

Chronic Treatment Chart

To configure the Chronic Treatment Chart on a Dashboard Page, add the configuration below in the "dashboard.json" file that is under the Clinical App.

...

Note:  Make sure that the extension file is copied to "/home/Username/.OpenMRS/bahmni_config/openmrs/treatmentRegimenExtension/" directory.

 

 

Drug Order Details Control

Add the below config under drugOrder --> sections in app.json to see it on treatment page or else in dashboard.json --> sections to see it on dashboard.

...

KeyInfo
title

Indicates the title that will be displayed on the dashboard for the section

namethe name/id for the control that needs to be picked from the code
drugConceptSetDrug orders will be filtered upon the concepts specified as part of this concept set. If not specified, it will display all drug orders.

dashboardParams

indicates the configuration for the dashboard

showOnlyActiveSet this to "true" to display only active drug orders. If "false" or not configured anything will show all the drugs
showDetailsButtonConfiguration to display audit information when arrow sign is clicked. If set to false, the arrow button will not be displayed.

 

...

Bacteriology Results Control

Add the below config in dashboard.json --> sections to see it on dashboard.

...

KeyInfo
title

Indicates the title that will be displayed on the dashboard for the section

namethe name/id for the control that needs to be picked from the code
orderType 

dashboardParams

indicates the configuration for the dashboard

conceptNamesConcepts of observations to be chosen for display
  

 

...

 Admission Details Control

Add the below config  in dashboard.json --> sections to see it on dashboard.

...