if (hasEquipment == 1) {
boolean alreadyRequired = (Integer.parseInt(requiredPatientEquipmentTokens[j]) == 1);
// Official spec: if equipment is required
// then a duplicate preffered constraint should be ignored
if (!alreadyRequired) {
PreferredPatientEquipment preferredPatientEquipment = new PreferredPatientEquipment();
preferredPatientEquipment.setId(preferredPatientEquipmentId);
preferredPatientEquipment.setPatient(patient);
preferredPatientEquipment.setEquipment(indexToEquipmentMap.get(j));
preferredPatientEquipmentOfPatientList.add(preferredPatientEquipment);
preferredPatientEquipmentList.add(preferredPatientEquipment);
preferredPatientEquipmentId++;
}
} else if (hasEquipment != 0) {