private List<BedDesignation> createBedDesignationList(PatientAdmissionSchedule patientAdmissionSchedule) {
List<BedDesignationInitializationWeight> initializationWeightList
= new ArrayList<BedDesignationInitializationWeight>(
patientAdmissionSchedule.getAdmissionPartList().size());
for (AdmissionPart admissionPart : patientAdmissionSchedule.getAdmissionPartList()) {
BedDesignation bedDesignation = new BedDesignation();
bedDesignation.setId(admissionPart.getId());
bedDesignation.setAdmissionPart(admissionPart);
int disallowedCount = 0;
for (Room room : patientAdmissionSchedule.getRoomList()) {
disallowedCount += (room.getCapacity() * room.countDisallowedAdmissionPart(admissionPart));
}
initializationWeightList.add(new BedDesignationInitializationWeight(bedDesignation,
bedDesignation.getAdmissionPart().getNightCount(), disallowedCount));
}
Collections.sort(initializationWeightList);
List<BedDesignation> bedDesignationList = new ArrayList<BedDesignation>(
patientAdmissionSchedule.getAdmissionPartList().size());
for (BedDesignationInitializationWeight bedDesignationInitializationWeight : initializationWeightList) {