diff --git a/openmrs/apps/command-palette/app.json b/openmrs/apps/command-palette/app.json new file mode 100644 index 000000000..183717848 --- /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", "ctrl+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..93c8b3deb --- /dev/null +++ b/openmrs/apps/command-palette/v2/extension.json @@ -0,0 +1,94 @@ +{ + "cmdPaletteNavRegistration": { + "id": "org.bahmni.commandpalette.nav.registration", + "extensionPointId": "org.bahmni.commandpalette.navItem", + "type": "link", + "translationKey": "COMMAND_PALETTE_NAV_REGISTRATION", + "url": "/bahmni-v2/registration/search", + "icon": "fa-registered", + "newTab": true, + "order": 1, + "requiredPrivilege": "app:registration" + }, + "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", + "order": 2, + "requiredPrivilege": "app:appointments" + }, + "cmdPaletteNavCreatePatient": { + "id": "org.bahmni.commandpalette.nav.createpatient", + "extensionPointId": "org.bahmni.commandpalette.navItem", + "type": "link", + "translationKey": "COMMAND_PALETTE_NAV_CREATE_PATIENT", + "url": "/bahmni-v2/registration/patient/new", + "icon": "fa-user-plus", + "order": 3, + "requiredPrivilege": "app:registration" + }, + "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", + "order": 4, + "requiredPrivilege": "app:adt" + }, + "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", + "order": 5, + "requiredPrivilege": "app:ot" + }, + "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", + "newTab": true, + "order": 6, + "requiredPrivilege": "app:admin" + }, + "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", + "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-v2/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-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 new file mode 100644 index 000000000..caf804cdc --- /dev/null +++ b/openmrs/i18n/command-palette/locale_en.json @@ -0,0 +1,11 @@ +{ + "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_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 new file mode 100644 index 000000000..d40fff21a --- /dev/null +++ b/openmrs/i18n/command-palette/locale_es.json @@ -0,0 +1,11 @@ +{ + "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_NAV_OPENMRS": "OpenMRS", + "COMMAND_PALETTE_NAV_BAHMNI_WIKI": "Bahmni Wiki", + "COMMAND_PALETTE_ACTION_REGISTRATION": "Registro", + "COMMAND_PALETTE_ACTION_CLINICAL": "Clínico" +}