BBahmni 한국어 매뉴얼검색
한국어 번역 완료
한국어English

Custom Controls

Purpose

Configuration

Sample Configuration

Config
"customControl": {
            "type": "custom",
            "config": {
                "title": "Title of the Control",
                "template": "<directive-name></directive-name>"
            }
       }

Key Field Table

KeyInformationMandatory
typetype of the section or control.type should be "custom"Yes
configkeyInformationMandatory
titletitle to be displayedYes
templatethe directive to be used to show the controlYes

Bahmni allows implementers to create their own custom display control.

Custom Control on Visit Dashboard

The following configuration needs to be added in visit.json (openmrs/apps/clinical/visit.json) to display the custom display control in different visit tabs.

Consider the following example to configure the birth certificate:

"birthCertificate": {
    "title": "Birth Certificate",
    "printing": {
        "title": "Bahmni",
        "header": "Certificate",
        "logo": "../images/bahmniLogo.png"
    },
    "sections": {
        "Birth Certificate": {
            "type": "custom",
            "config": {
                "title": "Birth Certificate",
                "template": "<birth-certificate></birth-certificate>"
            }
        }
    }
}
KeyInformation
titleTitle of the visit tab.Y
printingAdd printing section to enable the print button on visit page.Y
title - Title in print out.
header - Header in print out.
logo - Logo to display in print out.
type"custom" (Required and should always be custom)Y
configconfiguration for the custom display control.
title - title of the custom directiveY
template - the directive which you want to show.Y

Custom control on Patient Dashboard

The following configuration needs to be added under sections in dashboard.json (openmrs/apps/clinical/dashboard.json) to display the custom display control in different dashboard tabs.

Consider the following example to configure the birth certificate:

"General": {
    "translationKey": "DASHBOARD_TAB_GENERAL_KEY",
    "sections": {
        "Birth Certificate": {
            "type": "custom",
            "config": {
                "title": "Birth Certificate",
                "template": "<birth-certificate></birth-certificate>"
            }
        }
    }
}
KeyInformationMandatory
type*"custom" (Required and should always be custom)Y
configkeyInformation
titletitle of the custom directiveY
templatethe directive which you want to showY

Bahmni provides customDisplayControl module which provides basic connection between the application and configuration.

You can add new directives as per your requirement in the "openmrs/apps/customDisplayControl/js/customControl.js" file. (Make sure you can create new custom directives only in the existing file)

New directives should be under the same module. ("bahmni.common.displaycontrol.custom"). The scope of the new directive will have patient, visitUuid and config.

Table of Contents

Table of Contents

관련 문서: Display Controls

하위 문서

원문 정보

Bahmni Wiki · CC BY-SA 4.0

원문 보기 ↗