public void saveWards(LocationForVTEAssessmentVoCollection wards) throws StaleObjectException { if(wards == null) throw new CodingRuntimeException("Cannot save a null Wards collection."); if(!wards.isValidated()) throw new CodingRuntimeException("Wards collection is not validated."); DomainFactory factory = getDomainFactory(); for(LocationForVTEAssessmentVo ward : wards) { if(ward == null) continue; Location doWard = LocationForVTEAssessmentVoAssembler.extractLocation(factory, ward); factory.save(doWard); } }
public ims.core.vo.LocationForVTEAssessmentVoCollection listWards(ims.core.resource.place.vo.LocationRefVo hospital) { if(hospital == null || hospital.getID_Location() == null) throw new CodingRuntimeException("Cannot list wards for a null Hospital Id."); return LocationForVTEAssessmentVoAssembler.createLocationForVTEAssessmentVoCollectionFromLocation(listLocationsByParentLocation(hospital)).sort(); }
public ims.core.vo.LocationForVTEAssessmentVoCollection listWards(LocationRefVo hospital) { if (hospital == null || hospital.getID_Location() == null) throw new CodingRuntimeException("Cannot list wards for a null Hospital Id."); return LocationForVTEAssessmentVoAssembler.createLocationForVTEAssessmentVoCollectionFromLocation(listLocationsByParentLocation(hospital)).sort(); }
public LocationForVTEAssessmentVoCollection listWardsForHospital(String name, LocationRefVo hospital) { List list; if(hospital==null) { list= listLocations(LocationType.WARD, Boolean.TRUE, name); } else { //http://jira/browse/WDEV-21222 OrganisationAndLocation impl = (OrganisationAndLocation)getDomainImpl(OrganisationAndLocationImpl.class); list = impl.listLocationsByParentLocation(LocationType.WARD, hospital, Boolean.TRUE,null, name); } return LocationForVTEAssessmentVoAssembler.createLocationForVTEAssessmentVoCollectionFromLocation(list).sort(); }