Integration Points

About Integration Points 

When getting the data for appointments, if users would want to display additional information per appointment from other modules in Bahmni.

This can be made possible by extending the interface ''AppointmentResponseExtension'' and implementing the run method which takes appointment as input and returns a map of attributes. The returned map values are added to the appointments additional information

How to set up 

This extension code should be added in the implementation specific omods.

1. Add appointments module as required module in the  omod/src/main/resources/config.xml


2. Add appointments module dependency in the pom.xml


3. Implement extension point

public class PatientBedDetails implements AppointmentResponseExtension {
   public Map<String, String> run(Appointment appointment) {
       Map<String, String> additionalInfo = new HashMap<>();
       BedManagementService bedManagementService = Context.getService(BedManagementService.class);
       BedDetails bedDetails = bedManagementService.getBedAssignmentDetailsByPatient(appointment.getPatient());
       if(bedDetails!= null) {
           additionalInfo.put("LOCATION_KEY", bedDetails.getPhysicalLocation().getName());
           additionalInfo.put("BED_NUMBER_KEY", bedDetails.getBedNumber());
       return additionalInfo;


  1. In the code above , you can use any service to fetch the relevant data from the database
  2. As an Example we taken bedDetails. You can use relevant model, as per the use case, to get the data.

On This Page

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