public ims.core.vo.LocSiteLiteVo getCurrentHospital(ims.framework.interfaces.ILocation location) {
    if (location == null) return null;

    DomainFactory factory = getDomainFactory();

    Location currentHospital =
        getHospital((Location) factory.getDomainObject(Location.class, location.getID()));

    if (currentHospital instanceof LocSite)
      return LocSiteLiteVoAssembler.create((LocSite) currentHospital);

    return null;
  }
  public ims.core.vo.LocSiteLiteVoCollection listHospitals() {
    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer hql = new StringBuffer();

    hql.append(" select hosp from LocSite as hosp left join hosp.type as hosptype");
    hql.append(" where hosp.isActive = 1 and hosp.isVirtual = 0 and hosptype.id=:HospType");
    hql.append(" order by UPPER(hosp.name) asc");

    markers.add("HospType");
    values.add(LocationType.HOSP.getID());

    return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(
        factory.find(hql.toString(), markers, values));
  }