diff --git a/omod/src/main/java/org/openmrs/module/registrationapp/page/controller/FindPatientPageController.java b/omod/src/main/java/org/openmrs/module/registrationapp/page/controller/FindPatientPageController.java index bf7c6a74..56c0f3fc 100644 --- a/omod/src/main/java/org/openmrs/module/registrationapp/page/controller/FindPatientPageController.java +++ b/omod/src/main/java/org/openmrs/module/registrationapp/page/controller/FindPatientPageController.java @@ -2,11 +2,11 @@ import org.apache.commons.lang.StringUtils; +import org.codehaus.jackson.JsonNode; import org.joda.time.DateTime; import org.joda.time.Days; import org.openmrs.Encounter; import org.openmrs.EncounterType; -import org.openmrs.GlobalProperty; import org.openmrs.Location; import org.openmrs.api.EncounterService; import org.openmrs.api.context.Context; @@ -65,6 +65,12 @@ public void controller(UiSessionContext uiSessionContext, model.addAttribute("appId", null); } + JsonNode columnConfig = null; + if (app.getConfig() != null) { + columnConfig = app.getConfig().get("patientSearchColumnConfig"); + } + model.addAttribute("patientSearchColumnConfig", columnConfig); + List includeFragments = appFrameworkService.getExtensionsForCurrentUser(RegistrationAppConstants.FIND_PATIENT_FRAGMENTS_EXTENSION_POINT); Collections.sort(includeFragments); model.addAttribute("includeFragments", includeFragments); diff --git a/omod/src/main/webapp/pages/findPatient.gsp b/omod/src/main/webapp/pages/findPatient.gsp index aa054686..8ac2afbf 100644 --- a/omod/src/main/webapp/pages/findPatient.gsp +++ b/omod/src/main/webapp/pages/findPatient.gsp @@ -45,11 +45,13 @@ ${ ui.includeFragment("uicommons", "validationMessages")}

${ ui.message("coreapps.searchPatientHeading") }

- ${ ui.includeFragment("coreapps", "patientsearch/patientSearchWidget", - [ afterSelectedUrl: afterSelectedUrl, - rowSelectionHandler: "selectPatientHandler", - initialSearchFromParameter: "search", - showLastViewedPatients: 'false' ])} + ${ ui.includeFragment("coreapps", "patientsearch/patientSearchWidget", [ + afterSelectedUrl: afterSelectedUrl, + rowSelectionHandler: "selectPatientHandler", + initialSearchFromParameter: "search", + showLastViewedPatients: 'false', + columnConfig: patientSearchColumnConfig + ])}