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

Configure Custom Patient Attribute with Icon

Purpose and Benefits

This feature allows healthcare professionals to configure a custom attribute for new patients during the registration process. This attribute can be represented as an icon based on configuration, which can enable the identification of patients with specific requirements or medical needs, improving the visual representation of patient data and aiding in the efficient recognition of key patient characteristics.

Patient DashboardClinical Patient SearchADT Page
Screenshot 2024-04-09 at 8.54.40 AM.pngScreenshot 2024-04-09 at 8.55.11 AM.pngScreenshot 2024-04-09 at 8.53.53 AM.png

Steps to Configure Custom Patient Attribute

This example demonstrates how to create a new patient attribute called "kid".

Create a Custom Person Attribute

Define a new custom person attribute named kid of type java.lang.Boolean using either of the following methods:

  1. Liquibase Changeset:Create a new changeset to add the custom attribute type "kid".
  2. Define the attribute with the specified properties, including name, format, and other attributes.sql select count(*) from person_attribute_type where name = 'kid'; Add person_attribute_type 'kid' INSERT INTO person_attribute_type (name, description, format, searchable, creator, date_created, retired, sort_weight, uuid) VALUES ('kid', 'Kid', 'java.lang.Boolean', '0', 1, curdate(), 0, 8, uuid()); ]]>
<changeSet id="ICON_ATTRIBUTE_TYPE_202404151317" author="BAHMNI">
    <preConditions onFail="MARK_RAN">
        <sqlCheck expectedResult="0">
            select count(*) from person_attribute_type where name = 'kid';
        </sqlCheck>
    </preConditions>
    <comment>Add person_attribute_type 'kid'</comment>
    <sql>
        INSERT INTO person_attribute_type (name, description, format, searchable, creator, date_created, retired, sort_weight, uuid)
        VALUES ('kid', 'Kid', 'java.lang.Boolean', '0', 1, curdate(), 0, 8, uuid());
    </sql>
</changeSet>

Through Initializer:

  • Add the custom attribute in a CSV file located at masterdata/configuration/personattributetypes/personAttributeTypes.csv.
  • Specify the attribute's properties, such as name, format, and other configurations.
    Uuid,Void/Retire,Name,Description,Format,Foreign uuid,Searchable,_order:1000
    ,,kid,Kid,java.lang.Boolean,,,

Configure Icon and Style

Add the following configuration to the relevant app.json files (clinical, adt, or ipd) of the config module:

"config" : {
  ....
  "iconAttribute": {
      "attrName": "kid",
      "attrValue": "true",
      "icon": "fa fa-solid fa-child",
      "iconStyle": "{'background-color': '#F58C35'}"
  },
  ...
}

Key Fields

KeyValueMandatory
attrNameName of the custom attribute typeYes
attrValueCondition that triggers the iconYes
iconFontAwesome icon class for visual representation of the attribute.Yes
iconStyleCustom CSS styling for the icon, such as background color.No

Update Search and Queue Configurations

Note

The search query that fetches patient details is implementation-specific. If you want to display the custom attribute on patient search pages, you need to modify the search query to include the relevant custom attribute details.

  1. Add a left outer join clause in search queries:sql
    LEFT OUTER JOIN person_attribute patt ON patt.person_id = p.person_id AND patt.person_attribute_type_id = ( SELECT person_attribute_type_id FROM person_attribute_type WHERE name="kid" ) AND patt.voided = 0
  2. Include the custom attribute in the select statement:sql
    IF(patt.value = "true", "true", "false") AS kid
원문 정보

Bahmni Wiki · CC BY-SA 4.0

원문 보기 ↗