Java 类ims.core.vo.lookups.LocationType 实例源码

项目:AvoinApotti    文件:OcsIfInboundImpl.java   
private Location getHospital(Location doLocation)
{
    if(doLocation == null)
        return null;

    if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return doLocation;

    while(doLocation.getParentLocation() != null) 
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return doLocation;
    }       
    return null;
}
项目:AvoinApotti    文件:HospitalAtNightPatientDetailImpl.java   
private Location getHospital(Location doLocation)
{
    if(doLocation == null)
        return null;

    if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return doLocation;

    while(doLocation.getParentLocation() != null) 
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return doLocation;
    }

    return null;
}
项目:AvoinApotti    文件:ImagingEventsImpl.java   
/**
    * list Location Site
    */
    public ims.core.vo.LocSiteLiteVoCollection listLocSite(String locationName)
    {
        String location = locationName != null ? locationName.toUpperCase() + "%" : "%%";

        StringBuffer hql = new StringBuffer();
        hql.append(" from LocSite as ls");
        hql.append(" where");
        hql.append(" ls.upperName like :locationName");
        hql.append(" and ls.isActive =:active");
        hql.append(" and ls.isRIE is null");
        hql.append(" and ls.isVirtual =:virtual");//wdev-2730
        hql.append(" and ls.type.id != " + LocationType.SURGERY.getID());

        List list = getDomainFactory().find(hql.toString(), new String[]{"locationName", "active", "virtual"}, new Object[]{location, Boolean.TRUE, Boolean.FALSE});

        return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(list);

//      OrganisationAndLocation orgLocImpl = (OrganisationAndLocation) getDomainImpl(OrganisationAndLocationImpl.class);
//      return orgLocImpl.listLocSite(locationName);
    }
项目:AvoinApotti    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }
}
项目:AvoinApotti    文件:VTERiskAssessmentWorklistImpl.java   
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));
}
项目:AvoinApotti    文件:Logic.java   
protected void onCmbHospitalValueChanged() throws PresentationLogicException
{
    form.cmbWard().clear();
    form.grdReport().getRows().clear();
    if (form.cmbHospital().getValue() == null)
        return;

    if (form.cmbHospital().getValue().getType() != null)
    {
        if (form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
        {
            fillWardListCombo();
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void fillWardListCombo()
{
    LocMostVo filter = new LocMostVo();
    filter.setType(LocationType.WARD);
    filter.setParentLocation(form.cmbHospital().getValue());
    filter.setIsActive(Boolean.TRUE);
    filter.setIsVirtual(Boolean.FALSE);


    LocMostVoCollection voColl = domain.listLocations(filter);
    for (int i = 0; i < voColl.size(); i++)
    {
        LocMostVo ward = voColl.get(i);
        form.cmbWard().newRow(ward, ward.getName());
    }

}
项目:AvoinApotti    文件:Logic.java   
private void fillHospitalListCombo()
{
    LocMostVo locationFilter = new LocMostVo();
    locationFilter.setType(LocationType.HOSP);
    locationFilter.setIsActive(Boolean.TRUE);
    // Wards are used in 2 different tabs so if wards already retrieved dont
    // hit DB
    LocMostVoCollection voCollHospitals = null;
    voCollHospitals = domain.listLocations(locationFilter);
    if (voCollHospitals != null)
    {
        for (int i = 0; i < voCollHospitals.size(); i++)
        {
            form.cmbHospital().newRow(voCollHospitals.get(i), voCollHospitals.get(i).getName());
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void fillWardListCombo()
{
    form.imbRefresh().setEnabled(false);
    LocMostVo filter = new LocMostVo();
    filter.setType(LocationType.WARD);
    filter.setIsActive(Boolean.TRUE);
    filter.setParentLocation(form.cmbHospital().getValue());

    LocMostVoCollection voColl = domain.listLocations(filter);
    for (int i = 0; i < voColl.size(); i++)
    {
        LocMostVo ward = voColl.get(i);
        form.cmbWard().newRow(ward, ward.getName());
    }

}
项目:AvoinApotti    文件:DementiaWorklistImpl.java   
private Location getHospital(Location doLocation)
{
    if (doLocation == null)
        return null;

    if (doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return doLocation;

    while (doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();
        if (doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return doLocation;
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void initialize()
{
    loadHospitals();

    if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null)
    {
        // Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo) engine.getCurrentLocation());

        if (voLoc != null && LocationType.WARD.equals(voLoc.getType()))
        {
            form.cmbHospital().setValue(voLoc.getParentLocation());
            form.qmbWard().newRow(voLoc, voLoc.getName());
            form.qmbWard().setValue(voLoc);
        }
    }

    loadAlerts();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));
    initializeDynamicGrid();
    updateControlsState();

}
项目:AvoinApotti    文件:Logic.java   
private void initialise()
{

    form.Tranfers().setValue(GenForm.TranfersEnumeration.rdoPendingTransfers);
    initializeDynamicGrid(true);
    loadHospitals();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));

    if (form.cmbCurrentHosp().getValue() == null && engine.getCurrentLocation() != null)
    {
        // Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo) engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull() && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbCurrentHosp().setValue(voLoc.getParentLocation());

            form.qmbCurrentWard().newRow(voLoc, voLoc.getName());
            form.qmbCurrentWard().setValue(voLoc);
        }
    }

    loadAlerts();
}
项目:AvoinApotti    文件:HospitalAtNightWorklistImpl.java   
private Location getHospital(Location doLocation)
{
    if(doLocation == null)
        return null;

    if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return doLocation;

    while(doLocation.getParentLocation() != null) 
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return doLocation;
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void initialize() 
{
    loadAlerts();
    initializeDynamicGrid();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));

    loadHospitals();
    if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null)
    {
        //Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull()
            && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbHospital().setValue(voLoc.getParentLocation());

            form.qmbWard().newRow(voLoc, voLoc.getName());
            form.qmbWard().setValue(voLoc);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{
    loadHospitals();
    if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null)
    {
        //Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull()
            && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbHospital().setValue(voLoc.getParentLocation());

            form.qmbWard().newRow(voLoc, voLoc.getName());
            form.qmbWard().setValue(voLoc);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void initialise()
{
    clearControls();
    //Load the list of active hospitals in order to fill the current hospital combo.
    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));

    loadHospitals();
    if (form.cmbCurrentHospital().getValue() == null && engine.getCurrentLocation() != null)

    {
        //Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull()
            && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbCurrentHospital().setValue(voLoc.getParentLocation());

            form.cmbCurrentWard().newRow(voLoc, voLoc.getName());
            form.cmbCurrentWard().setValue(voLoc);
        }
    }


}
项目:AvoinApotti    文件:Logic.java   
private void initialize()
{
    form.getLocalContext().setbTimerOn(false);

    clearControls();
    loadHospitals();

    form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));

    if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null)
    {
        // Try and load the logged in location as a ward
        LocMostVo voLoc = domain.getLocation((LocationRefVo) engine.getCurrentLocation());
        if (voLoc != null && voLoc.getTypeIsNotNull() && voLoc.getType().equals(LocationType.WARD))
        {
            form.cmbHospital().setValue(voLoc.getParentLocation());

            form.qmbWard().newRow(voLoc, voLoc.getName());
            form.qmbWard().setValue(voLoc);
        }
    }

    loadAlerts();

    setWatchDefaultButtonState();
}
项目:AvoinApotti    文件:InpatientClinicalCodingWorklistImpl.java   
private Location getHospital(Location doLocation)
{
    if(doLocation == null)
        return null;

    if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return doLocation;

    while(doLocation.getParentLocation() != null) 
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return doLocation;
    }

    return null;
}
项目:AvoinApotti    文件:BedInfoDialogImpl.java   
private Location getHospital(Location doLocation)
{
    if(doLocation == null)
        return null;

    if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return doLocation;

    while(doLocation.getParentLocation() != null) 
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return doLocation;
    }

    return null;
}
项目:AvoinApotti    文件:WardDataViewImpl.java   
private Location getHospital(Location doLocation)
{
    if(doLocation == null)
        return null;

    if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return doLocation;

    while(doLocation.getParentLocation() != null) 
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return doLocation;
    }

    return null;
}
项目:AvoinApotti    文件:WardViewImpl.java   
private Location getHospital(Location doLocation)
{
    if(doLocation == null)
        return null;

    if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return doLocation;

    while(doLocation.getParentLocation() != null) 
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return doLocation;
    }

    return null;
}
项目:AvoinApotti    文件:EmergencyHelper.java   
private Location getHospital(Location doLocation)
{
    if(doLocation == null)
        return null;

    if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return doLocation;

    while(doLocation.getParentLocation() != null) 
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return doLocation;
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void populateLocationCombo()
{
    form.cmbLocation().clear();

    if (form.cmbHospital().getValue() == null)
        return;

    if (form.cmbHospital().getValue().getType() != null && form.cmbHospital().getValue().getType().equals(LocationType.HOSP))
    {
        LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue());

        if (voLocShortMapColl != null)
        {
            for (int i = 0; i < voLocShortMapColl.size(); i++)
            {
                LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
                form.cmbLocation().newRow(voLocShortMap, voLocShortMap.getName());
            }
        }
    }

}
项目:AvoinApotti    文件:SessionManagementImpl.java   
private LocationLiteVo getHospital(Location doLocation)
{
    if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
    {
        return LocShortMappingsVoAssembler.create((LocSite) doLocation);
    }

    while (doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();

        if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        {
            return LocShortMappingsVoAssembler.create((LocSite) doLocation);
        }
    }

    return null;
}
项目:AvoinApotti    文件:BatchPrintingImpl.java   
public LocSiteLiteVoCollection listHospitals(String name) 
{
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    String hql = "select ls from LocSite as ls left join ls.codeMappings as t left join t.taxonomyName as tn where tn =:taxonomyType and ls.isActive = 1 and ls.type !=:SurgeryType and ls.isRIE is null and ls.isVirtual = 0";
    markers.add("SurgeryType");
    values.add(getDomLookup(LocationType.SURGERY));
    markers.add("taxonomyType");
    values.add(getDomLookup(TaxonomyType.PATH));

    if(name != null)
    {
        hql += " and ls.upperName like :locationName";
        markers.add("locationName");
        values.add(name.toUpperCase() + "%");
    }

    List list = getDomainFactory().find(hql, markers, values);

    return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(list);
}
项目:AvoinApotti    文件:WaitingListConfigurationImpl.java   
public LocationLiteVoCollection listHospitals(String name)
{
    DomainFactory factory = getDomainFactory();

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

    StringBuffer hql = new StringBuffer();

    hql.append(" select loc from Location as loc ");
    hql.append(" where loc.upperName like :LocName and loc.isActive = 1 and loc.isVirtual = 0 and loc.type <> :surgery ");
    hql.append(" order by loc.upperName asc");

    markers.add("LocName");
    values.add(name.toUpperCase()+"%");

    markers.add("surgery");
    values.add(getDomLookup(LocationType.SURGERY));

    return LocationLiteVoAssembler.createLocationLiteVoCollectionFromLocation(factory.find(hql.toString(), markers, values));
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
private void buildLocationsList(Location location, ArrayList<Location> listItems, LocationType type, Boolean isActive, Boolean referringHospital, Boolean treatingHosp, String name)
{
    Iterator it = location.getLocations().iterator();
    while(it.hasNext())
    {
        Location doLocation = (Location) it.next();
        if(doLocation.getType().equals(getDomLookup(type)) 
            && doLocation.isIsActive().equals(isActive) 
            && (referringHospital == null || doLocation.isReferringHospital().equals(referringHospital)) 
            && (treatingHosp == null || doLocation.isTreatingHosp().equals(treatingHosp)) 
            && (name == null || name.equals("%") || doLocation.getUpperName().indexOf(name.toUpperCase()) > -1)
            && doLocation.isIsVirtual().equals(Boolean.FALSE)) //wdev-2730
        {
            listItems.add(doLocation);
        }

        buildLocationsList(doLocation, listItems, type, isActive, referringHospital, treatingHosp, name);
    }
}
项目:AvoinApotti    文件:TheatreAdmissionImpl.java   
public LocShortMappingsVo getBookingApptSessionLocation(Integer apptId) 
{
    if (apptId == null)
        return null;
    DomainFactory factory = getDomainFactory();     

    ArrayList<String> marques = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    marques.add("id");
    values.add(apptId); 
    marques.add("locTypeWardID");
    values.add(LocationType.WARD.getID());

    String query = " select sessionLocation from Booking_Appointment as apptDetails left join apptDetails.session as sessionDetails left join sessionDetails.schLocation as sessionLocation left join sessionLocation.type as locationType where ( apptDetails.id = :id and sessionLocation.isActive = 1 and locationType.id = :locTypeWardID ) ";
    List<?> sessionLoc = factory.find(query, marques, values);

    if(sessionLoc != null && sessionLoc.size() > 0 && sessionLoc.get(0) instanceof Location)
        return LocShortMappingsVoAssembler.create((Location) sessionLoc.get(0));

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void populateWardCombo()
{
    form.cmbWard().clear();

    LocShortMappingsVoCollection activeWards = null;
    activeWards = domain.listActiveWardsForHospital(form.cmbHospital().getValue());
    if (activeWards != null)
    {
        for (int i = 0; i < activeWards.size(); i++)
        {
            LocShortMappingsVo activeWard = activeWards.get(i);
            form.cmbWard().newRow(activeWard, activeWard.getName());
        }
    }

    if (form.getLocalContext().getPasEventLocationIsNotNull())
    {
        LocMostVo location = form.getLocalContext().getPasEventLocation();

        if (location != null && LocationType.WARD.equals(location.getType()))
            form.cmbWard().setValue(location);
    }
}
项目:AvoinApotti    文件:WardSpecimenCollectionImpl.java   
private LocShortMappingsVo getHospital(Location doLocation)
{
    if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
    {
        return LocShortMappingsVoAssembler.create((LocSite) doLocation);
    }

    while (doLocation.getParentLocation() != null)
    {
        doLocation = doLocation.getParentLocation();

        if (doLocation instanceof LocSite && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        {
            return LocShortMappingsVoAssembler.create((LocSite) doLocation);
        }
    }

    return null;
}
项目:AvoinApotti    文件:NewResultsOutpatientTabComponentImpl.java   
private Location getHospital(Location doLocation)
{
    if(doLocation == null)
        return null;

    if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return doLocation;

    while(doLocation.getParentLocation() != null) 
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return doLocation;
    }

    return null;
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
/**
* Gets the Active Hospital mapping for a particular location by walking up the Location tree until it hits a Hospital.
* http://jira/browse/WDEV-11637
*/

public String getActiveHospitalCodeForLoc(LocShortMappingsVo loc,TaxonomyType taxonomyType) {
    DomainFactory factory = getDomainFactory();
    Location location = (Location)factory.getDomainObject(loc);
    if (location==null)
        return null;

    while (location!=null&&
            (location.isIsActive()&&location.getType()!=null&&!location.getType().equals(getDomLookup(LocationType.HOSP)))
            )
    {
        location=location.getParentLocation();
    }
    if(location!=null)
        return location.getExtCode(taxonomyType.getID());
    return null;
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
public String getPracticeNationalCodeForSurgery(LocationRefVo surgery)
{
    DomainFactory factory = getDomainFactory();
    if (surgery==null)
        return null;

     LocSite loc=(LocSite)factory.getDomainObject(surgery);//(Organisation.class, id));
     if (loc!=null&&
             loc.getType()!=null&&
             loc.getType().equals(getDomLookup(LocationType.SURGERY))&&
             loc.getParentOrganisation()!=null)
     {
         return loc.getParentOrganisation().getMappingValueOfType(getDomLookup(TaxonomyType.NAT_LOC_CODE));
     }
     else 
     {
         return null;
     }

}
项目:AvoinApotti    文件:EDDepartmentTypeConfigImpl.java   
public ims.core.vo.LocationLiteVoCollection getLocations()
{

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();

    hql.append(" select l1_1 from Location as l1_1 left join l1_1.type as l2_1 where (l2_1.id = :idloctype and l1_1.isActive = 1) order by upper(l1_1.name) asc ");

    List<?> list = factory.find(hql.toString(), new String[] { "idloctype" }, new Object[] { LocationType.ANE.getID() });

    if ( list != null && list.size() > 0)
    {
        LocationLiteVoCollection tempColl = LocationLiteVoAssembler.createLocationLiteVoCollectionFromLocation(list);
        return tempColl;
    }
    return null;
}
项目:AvoinApotti    文件:OrdersRequiringAuthorisationImpl.java   
private Location getHospital(Location doLocation)
{
    if(doLocation == null)
        return null;

    if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return doLocation;

    while(doLocation.getParentLocation() != null) 
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return doLocation;
    }

    return null;
}
项目:AvoinApotti    文件:NewResultsImpl.java   
private LocationLiteVoCollection listLocations(String name, LocationType locType)
{
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    String hql = "from Location loc where (loc.type.id = :typeId";
    names.add("typeId");
    values.add(new Integer(locType.getId()));

    if (name != null)
    {
        hql += " and loc.upperName like :name ";
        names.add("name");
        values.add(name.toUpperCase() + "%");
    }
    hql += (" and loc.isVirtual =:virtual) order by loc.upperName asc");
    names.add("virtual");
    values.add(Boolean.FALSE);

    List<?> l = this.getDomainFactory().find(hql, names, values);
    return LocationLiteVoAssembler.createLocationLiteVoCollectionFromLocation(l);
}
项目:AvoinApotti    文件:Logic.java   
private void loadLocation()
{
    form.cmbDepartment().clear();

    LocationLiteVoCollection voColl = domain.listLocation(LocationType.PATHOLOGYLABORATORY, Boolean.TRUE);
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        LocationLiteVo voLocation = voColl.get(i);
        form.cmbDepartment().newRow(voLocation, voLocation.getName());

        //WDEV-2847
        if(engine.getCurrentLocation() != null)
        {
            if (engine.getCurrentLocation().getID() == voLocation.getID_Location().intValue())
                form.cmbDepartment().setValue(voLocation);
        }
    }

    setDefaultDepartmentValue();
}
项目:AvoinApotti    文件:Logic.java   
private void loadLocation()
{
    form.cmbDepartment().clear();

    LocationLiteVoCollection voColl = domain.listLocation(LocationType.CLINICALIMAGINGDEPARTMENT, Boolean.TRUE);
    int currentLocId;
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        LocationLiteVo voLocation = voColl.get(i);
        form.cmbDepartment().newRow(voLocation, voLocation.getName());

        //WDEV-2847
        if(engine.getCurrentLocation() != null)
        {
            if (engine.getCurrentLocation().getID() == voLocation.getID_Location().intValue())
                form.cmbDepartment().setValue(voLocation);
        }
    }

    setDefaultDepartmentValue();
}
项目:AvoinApotti    文件:VTERiskAssessmentWorklistImpl.java   
private Location getHospital(Location doLocation)
{
    if(doLocation == null)
        return null;

    if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
        return doLocation;

    while(doLocation.getParentLocation() != null) 
    {
        doLocation = doLocation.getParentLocation();
        if(doLocation instanceof Location && doLocation.getType().equals(getDomLookup(LocationType.HOSP)))
            return doLocation;
    }

    return null;
}
项目:AvoinApotti    文件:RadioTherapyDetailsImpl.java   
public LocSiteLiteVoCollection listHospitals(String locationName)
{
    DomainFactory factory = getDomainFactory();
    IMSCriteria imsc = new IMSCriteria(LocSite.class, factory);
    imsc.equal("type", getDomLookup(LocationType.HOSP));
    imsc.like("name", locationName + "%");
    List<?> locations = imsc.find();
    if (locations != null)
        return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(locations);
    else
        return null;
}