diff --git a/src/main/java/org/openelisglobal/samplebatchentry/controller/SampleBatchEntryController.java b/src/main/java/org/openelisglobal/samplebatchentry/controller/SampleBatchEntryController.java
index 1d473db097..8764572a0a 100644
--- a/src/main/java/org/openelisglobal/samplebatchentry/controller/SampleBatchEntryController.java
+++ b/src/main/java/org/openelisglobal/samplebatchentry/controller/SampleBatchEntryController.java
@@ -65,7 +65,7 @@ public class SampleBatchEntryController extends BaseController {
//
"sampleOrderItems.labNo",
//
- "sampleOrderItems.newRequesterName", "sampleOrderItems.referringSiteId",
+ "sampleOrderItems.newRequesterName", "sampleOrderItems.referringSiteId", "sampleOrderItems.referringSiteDepartmentId" ,
"form.sampleOrderItems.referringSiteName", "patientProperties.patientUpdateStatus", "currentDate",
"currentTime", "sampleOrderItems.receivedDateForDisplay", "sampleOrderItems.receivedTime", "sampleXML",
"sampleOrderItems.referringSiteId", "sampleOrderItems.referringSiteId",
@@ -112,6 +112,8 @@ public ModelAndView showSampleBatchEntry(HttpServletRequest request,
soi.setReceivedDateForDisplay(form.getSampleOrderItems().getReceivedDateForDisplay());
soi.setNewRequesterName(form.getSampleOrderItems().getNewRequesterName());
soi.setReferringSiteId(form.getFacilityID());
+ soi.setReferringSiteDepartmentId(form.getSampleOrderItems().getReferringSiteDepartmentId());
+
form.setSampleOrderItems(soi);
form.setLocalDBOnly(ConfigurationProperties.getInstance()
@@ -147,7 +149,13 @@ public ModelAndView showSampleBatchEntry(HttpServletRequest request,
} else if (!StringUtil.isNullorNill(form.getSampleOrderItems().getNewRequesterName())) {
facilityName = form.getSampleOrderItems().getNewRequesterName();
}
+ String departmentName = "";
+ if (!StringUtil.isNullorNill(form.getSampleOrderItems().getReferringSiteDepartmentId())) {
+ Organization organization = organizationService.get(form.getSampleOrderItems().getReferringSiteDepartmentId());
+ departmentName = organization.getOrganizationName();
+ }
request.setAttribute("facilityName", facilityName);
+ request.setAttribute("departmentName", departmentName);
form.setPatientSearch(new PatientSearch());
return findForward(form.getMethod(), form);
diff --git a/src/main/webapp/pages/samplebatchentry/routine/sampleBatchEntry.jsp b/src/main/webapp/pages/samplebatchentry/routine/sampleBatchEntry.jsp
index c4e6726414..9d4d13bafa 100644
--- a/src/main/webapp/pages/samplebatchentry/routine/sampleBatchEntry.jsp
+++ b/src/main/webapp/pages/samplebatchentry/routine/sampleBatchEntry.jsp
@@ -217,6 +217,15 @@ jQuery(document).ready(function () {
+
+
+
+
+
@@ -228,6 +237,15 @@ jQuery(document).ready(function () {
+
+
+
+