From 4f802508fc7e2f09dde71f4f935bdc7aa84ca195 Mon Sep 17 00:00:00 2001 From: Lingeswaran Subramaniyam Date: Thu, 4 Jun 2026 22:51:49 +0530 Subject: [PATCH 1/2] BAH-4754 command paletted changes --- openmrs/apps/command-palette/app.json | 39 +++++++++ .../apps/command-palette/v2/extension.json | 85 +++++++++++++++++++ openmrs/i18n/command-palette/locale_en.json | 9 ++ openmrs/i18n/command-palette/locale_es.json | 9 ++ 4 files changed, 142 insertions(+) create mode 100644 openmrs/apps/command-palette/app.json create mode 100644 openmrs/apps/command-palette/v2/extension.json create mode 100644 openmrs/i18n/command-palette/locale_en.json create mode 100644 openmrs/i18n/command-palette/locale_es.json diff --git a/openmrs/apps/command-palette/app.json b/openmrs/apps/command-palette/app.json new file mode 100644 index 000000000..dad6474fe --- /dev/null +++ b/openmrs/apps/command-palette/app.json @@ -0,0 +1,39 @@ +{ + "id": "bahmni.commandPalette", + "extensionPoints": [ + { + "id": "org.bahmni.commandpalette.navItem", + "description": "Command Palette Navigation Items" + }, + { + "id": "org.bahmni.commandpalette.patientAction", + "description": "Command Palette Patient Actions — rendered as action buttons after patient search" + } + ], + "commandPalette": { + "trigger": { + "type": "combination", + "keys": "cmd+k" + }, + "searchAnnotations": [ + { + "prefix": "@phone", + "label": "Phone", + "searchType": "patientAttribute", + "fieldType": "person", + "fieldsToSearch": ["phoneNumber"] + }, + { + "prefix": "@email", + "label": "Email", + "searchType": "patientAttribute", + "fieldType": "person", + "fieldsToSearch": ["email"] + } + ], + "patientFields": { + "primaryFields": ["name", "identifier"], + "additionalFields": ["age", "gender"] + } + } +} diff --git a/openmrs/apps/command-palette/v2/extension.json b/openmrs/apps/command-palette/v2/extension.json new file mode 100644 index 000000000..334568418 --- /dev/null +++ b/openmrs/apps/command-palette/v2/extension.json @@ -0,0 +1,85 @@ +{ + "cmdPaletteNavRegistration": { + "id": "org.bahmni.commandpalette.nav.registration", + "extensionPointId": "org.bahmni.commandpalette.navItem", + "translationKey": "COMMAND_PALETTE_NAV_REGISTRATION", + "url": "/bahmni-new/registration/search", + "icon": "fa-registered", + "newTab": true, + "order": 1, + "requiredPrivilege": "app:registration" + }, + "cmdPaletteNavAppointments": { + "id": "org.bahmni.commandpalette.nav.appointments", + "extensionPointId": "org.bahmni.commandpalette.navItem", + "translationKey": "COMMAND_PALETTE_NAV_APPOINTMENTS", + "url": "/appointments/", + "icon": "fa-calendar-alt", + "order": 2, + "requiredPrivilege": "app:appointments" + }, + "cmdPaletteNavCreatePatient": { + "id": "org.bahmni.commandpalette.nav.createpatient", + "extensionPointId": "org.bahmni.commandpalette.navItem", + "translationKey": "COMMAND_PALETTE_NAV_CREATE_PATIENT", + "url": "/bahmni-new/registration/patient/new", + "icon": "fa-user-plus", + "order": 3, + "requiredPrivilege": "app:registration" + }, + "cmdPaletteNavBedManagement": { + "id": "org.bahmni.commandpalette.nav.bedmanagement", + "extensionPointId": "org.bahmni.commandpalette.navItem", + "translationKey": "COMMAND_PALETTE_NAV_BED_MANAGEMENT", + "url": "/bahmni/bedmanagement/", + "icon": "fa-bed", + "order": 4, + "requiredPrivilege": "app:adt" + }, + "cmdPaletteNavOT": { + "id": "org.bahmni.commandpalette.nav.ot", + "extensionPointId": "org.bahmni.commandpalette.navItem", + "translationKey": "COMMAND_PALETTE_NAV_OT", + "url": "/bahmni/ot/", + "icon": "fa-hospital-o", + "order": 5, + "requiredPrivilege": "app:ot" + }, + "cmdPaletteNavOpenMRS": { + "id": "org.bahmni.commandpalette.nav.openmrs", + "extensionPointId": "org.bahmni.commandpalette.navItem", + "label": "OpenMRS", + "url": "/openmrs", + "icon": "fa-external-link", + "newTab": true, + "order": 6, + "requiredPrivilege": "app:admin" + }, + "cmdPaletteNavBahmniWiki": { + "id": "org.bahmni.commandpalette.nav.bahmniwiki", + "extensionPointId": "org.bahmni.commandpalette.navItem", + "label": "Bahmni Wiki", + "url": "https://bahmni.atlassian.net/wiki/spaces/BAH/overview", + "icon": "fa-book", + "newTab": true, + "order": 7 + }, + "cmdPaletteActionRegistration": { + "id": "org.bahmni.commandpalette.action.registration", + "extensionPointId": "org.bahmni.commandpalette.patientAction", + "translationKey": "COMMAND_PALETTE_ACTION_REGISTRATION", + "icon": "fa-clipboard-list", + "pathTemplate": "/bahmni-new/registration/patient/{{patientUuid}}", + "order": 1, + "requiredPrivilege": "app:registration" + }, + "cmdPaletteActionClinical": { + "id": "org.bahmni.commandpalette.action.clinical", + "extensionPointId": "org.bahmni.commandpalette.patientAction", + "translationKey": "COMMAND_PALETTE_ACTION_CLINICAL", + "icon": "fa-stethoscope", + "pathTemplate": "/bahmni-new/clinical/{{patientUuid}}", + "order": 2, + "requiredPrivilege": "app:clinical" + } +} diff --git a/openmrs/i18n/command-palette/locale_en.json b/openmrs/i18n/command-palette/locale_en.json new file mode 100644 index 000000000..96cc15ca3 --- /dev/null +++ b/openmrs/i18n/command-palette/locale_en.json @@ -0,0 +1,9 @@ +{ + "COMMAND_PALETTE_NAV_REGISTRATION": "Go to Registration", + "COMMAND_PALETTE_NAV_CREATE_PATIENT": "Create New Patient", + "COMMAND_PALETTE_NAV_APPOINTMENTS": "Go to Appointments", + "COMMAND_PALETTE_NAV_BED_MANAGEMENT": "Bed Management", + "COMMAND_PALETTE_NAV_OT": "Operating Theatre", + "COMMAND_PALETTE_ACTION_REGISTRATION": "Registration", + "COMMAND_PALETTE_ACTION_CLINICAL": "Clinical" +} diff --git a/openmrs/i18n/command-palette/locale_es.json b/openmrs/i18n/command-palette/locale_es.json new file mode 100644 index 000000000..2dd595cee --- /dev/null +++ b/openmrs/i18n/command-palette/locale_es.json @@ -0,0 +1,9 @@ +{ + "COMMAND_PALETTE_NAV_REGISTRATION": "Ir a Registro", + "COMMAND_PALETTE_NAV_CREATE_PATIENT": "Crear Nuevo Paciente", + "COMMAND_PALETTE_NAV_APPOINTMENTS": "Ir a Citas", + "COMMAND_PALETTE_NAV_BED_MANAGEMENT": "Gestión de Camas", + "COMMAND_PALETTE_NAV_OT": "Quirófano", + "COMMAND_PALETTE_ACTION_REGISTRATION": "Registro", + "COMMAND_PALETTE_ACTION_CLINICAL": "Clínico" +} From 4876a171a3cfc1740b1c7f5ebe4f51204b026eda Mon Sep 17 00:00:00 2001 From: Lingeswaran Subramaniyam Date: Sun, 21 Jun 2026 22:16:13 +0530 Subject: [PATCH 2/2] BAH-4754 code review changes --- openmrs/apps/command-palette/app.json | 2 +- openmrs/apps/command-palette/v2/extension.json | 17 +++++++++++++---- openmrs/i18n/command-palette/locale_en.json | 2 ++ openmrs/i18n/command-palette/locale_es.json | 2 ++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/openmrs/apps/command-palette/app.json b/openmrs/apps/command-palette/app.json index dad6474fe..183717848 100644 --- a/openmrs/apps/command-palette/app.json +++ b/openmrs/apps/command-palette/app.json @@ -13,7 +13,7 @@ "commandPalette": { "trigger": { "type": "combination", - "keys": "cmd+k" + "keys": ["cmd+k", "ctrl+k"] }, "searchAnnotations": [ { diff --git a/openmrs/apps/command-palette/v2/extension.json b/openmrs/apps/command-palette/v2/extension.json index 334568418..93c8b3deb 100644 --- a/openmrs/apps/command-palette/v2/extension.json +++ b/openmrs/apps/command-palette/v2/extension.json @@ -2,8 +2,9 @@ "cmdPaletteNavRegistration": { "id": "org.bahmni.commandpalette.nav.registration", "extensionPointId": "org.bahmni.commandpalette.navItem", + "type": "link", "translationKey": "COMMAND_PALETTE_NAV_REGISTRATION", - "url": "/bahmni-new/registration/search", + "url": "/bahmni-v2/registration/search", "icon": "fa-registered", "newTab": true, "order": 1, @@ -12,6 +13,7 @@ "cmdPaletteNavAppointments": { "id": "org.bahmni.commandpalette.nav.appointments", "extensionPointId": "org.bahmni.commandpalette.navItem", + "type": "link", "translationKey": "COMMAND_PALETTE_NAV_APPOINTMENTS", "url": "/appointments/", "icon": "fa-calendar-alt", @@ -21,8 +23,9 @@ "cmdPaletteNavCreatePatient": { "id": "org.bahmni.commandpalette.nav.createpatient", "extensionPointId": "org.bahmni.commandpalette.navItem", + "type": "link", "translationKey": "COMMAND_PALETTE_NAV_CREATE_PATIENT", - "url": "/bahmni-new/registration/patient/new", + "url": "/bahmni-v2/registration/patient/new", "icon": "fa-user-plus", "order": 3, "requiredPrivilege": "app:registration" @@ -30,6 +33,7 @@ "cmdPaletteNavBedManagement": { "id": "org.bahmni.commandpalette.nav.bedmanagement", "extensionPointId": "org.bahmni.commandpalette.navItem", + "type": "link", "translationKey": "COMMAND_PALETTE_NAV_BED_MANAGEMENT", "url": "/bahmni/bedmanagement/", "icon": "fa-bed", @@ -39,6 +43,7 @@ "cmdPaletteNavOT": { "id": "org.bahmni.commandpalette.nav.ot", "extensionPointId": "org.bahmni.commandpalette.navItem", + "type": "link", "translationKey": "COMMAND_PALETTE_NAV_OT", "url": "/bahmni/ot/", "icon": "fa-hospital-o", @@ -48,6 +53,8 @@ "cmdPaletteNavOpenMRS": { "id": "org.bahmni.commandpalette.nav.openmrs", "extensionPointId": "org.bahmni.commandpalette.navItem", + "type": "link", + "translationKey": "COMMAND_PALETTE_NAV_OPENMRS", "label": "OpenMRS", "url": "/openmrs", "icon": "fa-external-link", @@ -58,6 +65,8 @@ "cmdPaletteNavBahmniWiki": { "id": "org.bahmni.commandpalette.nav.bahmniwiki", "extensionPointId": "org.bahmni.commandpalette.navItem", + "type": "link", + "translationKey": "COMMAND_PALETTE_NAV_BAHMNI_WIKI", "label": "Bahmni Wiki", "url": "https://bahmni.atlassian.net/wiki/spaces/BAH/overview", "icon": "fa-book", @@ -69,7 +78,7 @@ "extensionPointId": "org.bahmni.commandpalette.patientAction", "translationKey": "COMMAND_PALETTE_ACTION_REGISTRATION", "icon": "fa-clipboard-list", - "pathTemplate": "/bahmni-new/registration/patient/{{patientUuid}}", + "pathTemplate": "/bahmni-v2/registration/patient/{{patientUuid}}", "order": 1, "requiredPrivilege": "app:registration" }, @@ -78,7 +87,7 @@ "extensionPointId": "org.bahmni.commandpalette.patientAction", "translationKey": "COMMAND_PALETTE_ACTION_CLINICAL", "icon": "fa-stethoscope", - "pathTemplate": "/bahmni-new/clinical/{{patientUuid}}", + "pathTemplate": "/bahmni-v2/clinical/{{patientUuid}}", "order": 2, "requiredPrivilege": "app:clinical" } diff --git a/openmrs/i18n/command-palette/locale_en.json b/openmrs/i18n/command-palette/locale_en.json index 96cc15ca3..caf804cdc 100644 --- a/openmrs/i18n/command-palette/locale_en.json +++ b/openmrs/i18n/command-palette/locale_en.json @@ -4,6 +4,8 @@ "COMMAND_PALETTE_NAV_APPOINTMENTS": "Go to Appointments", "COMMAND_PALETTE_NAV_BED_MANAGEMENT": "Bed Management", "COMMAND_PALETTE_NAV_OT": "Operating Theatre", + "COMMAND_PALETTE_NAV_OPENMRS": "OpenMRS", + "COMMAND_PALETTE_NAV_BAHMNI_WIKI": "Bahmni Wiki", "COMMAND_PALETTE_ACTION_REGISTRATION": "Registration", "COMMAND_PALETTE_ACTION_CLINICAL": "Clinical" } diff --git a/openmrs/i18n/command-palette/locale_es.json b/openmrs/i18n/command-palette/locale_es.json index 2dd595cee..d40fff21a 100644 --- a/openmrs/i18n/command-palette/locale_es.json +++ b/openmrs/i18n/command-palette/locale_es.json @@ -4,6 +4,8 @@ "COMMAND_PALETTE_NAV_APPOINTMENTS": "Ir a Citas", "COMMAND_PALETTE_NAV_BED_MANAGEMENT": "Gestión de Camas", "COMMAND_PALETTE_NAV_OT": "Quirófano", + "COMMAND_PALETTE_NAV_OPENMRS": "OpenMRS", + "COMMAND_PALETTE_NAV_BAHMNI_WIKI": "Bahmni Wiki", "COMMAND_PALETTE_ACTION_REGISTRATION": "Registro", "COMMAND_PALETTE_ACTION_CLINICAL": "Clínico" }