Clinical Module: Formatting Form ObsGroup for Display

Purpose

This functionality enables implementers to customize the formatting of various observation groups as they see fit for display on the screen. Regardless of where a specific observation group appears in the clinical module, it will consistently be formatted and presented in the same manner. Additionally, this feature includes support for internationalization, allowing for the adaptation of these formats to different languages.

What is obs group? why it is needed?

Obs Groups are logically grouped observations. It allows users to organise and present observations in a structured manner, particularly when multiple observations are related to a single event or encounter.

Screenshot

Obs Group 

Before Formatting

 

 

After formatting

 

Configuration

Sample configuration

Add to clinical/app.json for it to apply formatting on whole clinical module

 

"obsGroupDisplayFormat": {           "Surgeries and Procedures": {                 "displayObsFormat": {                     "translationKey": "SURGERIES_AND_PROCEDURES_MESSAGE_KEY",                     "concepts": ["Date of Operation", "Operative Procedure"]}             }  }

 

Key Field Table

key

Info

Mandatory

obsGroupDisplayFormat

Indicates the configuration for formatting observation groups. It consists of an object with keys corresponding to the concept names of the observation group.

Mandatory

displayObsFormat

It consist of `translationKey` and `concepts`

Mandatory

translationKey

The name or translation key (for internationalization) of the observation format.

Mandatory

concepts

Consist of a list of concept names whose values will be replaced in the translation message. These concepts should be part of the obs group.

Mandatory

Translation needs to be added for the translationKey in clinical locale json.

For example for the above scenario, Add to clinical/locale_en.json

"SURGERIES_AND_PROCEDURES_MESSAGE_KEY": "Operative Procedure {{OperativeProcedure}} conducted on {{DateofOperation}}"

Note: For placeholder, remove spaces and special characters if any in concept name. For example if the concept name is Date of Operation its placeholder should be DateofOperation. Similarly Chief complaint (text) as Chiefcomplainttext and so on.

 

Supported Behaviour

Scenario

Format Applied

Scenario 1: Custom formatting configuration is provided for the obs group concept name.

  • For FormsV2 Obs group i.e formNamespace is not null 

Custom Formatting in configuration will be applied

  • For FormsV1 Obs group i.e formNamespace is null

Base obs group of the form i.e obsGroupUuid is null

No Custom Formatting

Not a base obs group of the form

Custom Formatting in configuration will be applied

 

Scenario 2: Custom formatting configuration is unavailable for the specified obs group concept name, but it belongs to the `Concept Details` concept class.

 

 

The observations will be organised based on the concept's sorting weight and combined using a comma, irrespective of formV1 or formV2

 

For Tech Implementation details, see this JIRA ticket: https://bahmni.atlassian.net/browse/BAH-3557

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