Skip to content

Commit

Permalink
BAH-4057 | Add. Provider Notification Config (#37)
Browse files Browse the repository at this point in the history
* [Rahul] | BAH-4057 | Add. Provider Notification Config

* BAH-4057 | Fix. medication_administration Column Name In Notification Query
  • Loading branch information
rahu1ramesh authored Aug 6, 2024
1 parent 78577df commit fc8b786
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 1 deletion.
41 changes: 41 additions & 0 deletions masterdata/configuration/globalproperties/gp_clinical.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<config>
<globalProperties>
<globalProperty>
<property>emrapi.sqlSearch.emergencyMedicationToAcknowledge</property>
<value>
SELECT DISTINCT
primaryIdentifier.identifier as identifier,
concat(pn.given_name,' ', pn.family_name) as name,
p.gender as gender,
p.uuid as patient_uuid,
p.birthdate as date_of_birth,
ma.uuid as medication_administration_uuid,
ma.administered_date_time,
dg.name as administered_drug_name,
ma.dose as administered_dose,
cnd.name as administered_dose_units,
cnr.name as administered_route,
map.uuid as medication_administration_performer_uuid,
v.uuid as visit_uuid
FROM medication_administration_performer map
join provider pr on pr.provider_id = map.actor_id
join medication_administration ma on map.medication_administration_id=ma.medication_administration_id
join drug dg on dg.drug_id = ma.drug_id
join ipd_slot slot on ma.medication_administration_id = slot.medication_administration_id
join ipd_schedule schedule on schedule.schedule_id = slot.schedule_id
join visit v on v.visit_id = schedule.visit_id
JOIN (SELECT pri.patient_id, pri.identifier FROM patient_identifier pri
join patient_identifier_type pit on pri.identifier_type = pit.patient_identifier_type_id and pri.preferred = 1
join global_property gp on gp.property="bahmni.primaryIdentifierType" and gp.property_value=pit.uuid) primaryIdentifier ON ma.patient_id = primaryIdentifier.patient_id
join concept_name cn on cn.concept_id = map.performer_function and cn.concept_name_type = "FULLY_SPECIFIED" and cn.locale='en'
join concept_name cnd on cnd.concept_id = ma.dose_units and cnd.concept_name_type = "FULLY_SPECIFIED" and cnd.locale='en'
join concept_name cnr on cnr.concept_id = ma.route and cnr.concept_name_type = "FULLY_SPECIFIED" and cnr.locale='en'
join person_name pn on ma.patient_id = pn.person_id and pn.voided = 0 and pn.preferred = 1
join patient_identifier pi on ma.patient_id = pi.patient_id
join person p on p.person_id = ma.patient_id and p.voided = 0
WHERE cn.concept_name_type="FULLY_SPECIFIED" and cn.name="Witness" and pr.uuid = ${provider_uuid};
</value>
<description>SQL query to get the list of emergency medications to be acknowledged</description>
</globalProperty>
</globalProperties>
</config>
1 change: 1 addition & 0 deletions openmrs/apps/clinical/customQueues/notifications.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mfe-next-ui-provider-notifications></mfe-next-ui-provider-notifications>
13 changes: 13 additions & 0 deletions openmrs/apps/clinical/extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@
"order": 1,
"requiredPrivilege": "app:clinical"
},
"bahmniClinicalPatientsCustomNotifications": {
"id": "bahmni.clinical.patients.custom.notifications",
"extensionPointId": "org.bahmni.patient.search",
"type": "config",
"extensionParams": {
"translationKey": "MODULE_LABEL_NOTIFICATIONS_KEY",
"templateUrl": "/bahmni_config/openmrs/apps/clinical/customQueues/notifications.html",
"view": "custom"
},
"label": "Notifications",
"order": 4,
"requiredPrivilege": "app:clinical"
},
"bahmniClinicalPatientsSearchActivePatientsForPrograms": {
"id": "bahmni.clinical.patients.search.activePatients",
"extensionPointId": "org.bahmni.patient.search",
Expand Down
2 changes: 1 addition & 1 deletion openmrs/i18n/clinical/locale_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"MODULE_LABEL_ACTIVE_PATIENTS_BY_LOCATION": "PatientsByLocation",
"MODULE_LABEL_OPD_1_KEY": "OPD-1",
"MODULE_LABEL_ALL_KEY": "All",

"MODULE_LABEL_NOTIFICATIONS_KEY": "Notifications",
"DASHBOARD_TITLE_LAB_RESULTS_KEY": "Lab Results",
"DASHBOARD_TITLE_LAB_ORDERS_DISPLAY_CONTROL_KEY": "Lab Orders Fulfillment",
"DASHBOARD_TITLE_PACS_KEY": "Pacs",
Expand Down

0 comments on commit fc8b786

Please sign in to comment.