Java 类ims.core.vo.LocSiteLiteVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void loadData(TreeNode parentNode, OrgLiteVo organization)
{
    if (parentNode == null || organization == null)
        return;

    OrgLiteVoCollection organizations = domain.listOrganizationsByOrganization(organization);
    if (organization != null)
    {
        for (int x = 0; x < organizations.size(); x++)
        {
            add(parentNode, organizations.get(x));
        }
    }

    LocSiteLiteVoCollection locationSites = domain.listLocationSites(organization);
    if (locationSites != null)
    {
        for (int x = 0; x < locationSites.size(); x++)
        {
            // ----------------------------------------
            if (locationSites.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locationSites.get(x));
        }
    }
}
项目: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    文件:OrganisationAndLocationImpl.java   
public 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

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

    return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(list);
}
项目:AvoinApotti    文件:LocationStartupSelectionImpl.java   
public LocSiteLiteVoCollection listLocationSites(ims.core.resource.place.vo.OrganisationRefVo organization)
{           
    Organisation doOrganisation = (Organisation) getDomainFactory().getDomainObject(organization);
    LocSiteLiteVoCollection result = LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(doOrganisation.getLocationSites());

    if(result == null)
        return null;

    LocSiteLiteVoCollection activeLocationSites = new LocSiteLiteVoCollection();

    for(int x = 0; x < result.size(); x++)
    {
        LocSiteLiteVo locationSite = result.get(x);
        if(locationSite != null 
            && locationSite.getIsActive() != null && locationSite.getIsActive().booleanValue()
            && locationSite.getIsVirtualIsNotNull() && ! locationSite.getIsVirtual().booleanValue())//wdev-2730
            activeLocationSites.add(locationSite);
    }

    return activeLocationSites.sort();
}
项目:AvoinApotti    文件:Logic.java   
private void bindHospitalCombo() 
{
    form.cmbHospital().clear();
    LocSiteLiteVoCollection hospitals = domain.listHospitals();

    if(hospitals == null || hospitals.size() == 0)
        return;

    for(LocSiteLiteVo hospital : hospitals)
    {
        if(hospital == null)
            continue;

        form.cmbHospital().newRow(hospital, hospital.getName());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadData(TreeNode parentNode, OrgLiteVo organization)
{
    if (parentNode == null || organization == null)
        return;

    OrgLiteVoCollection organizations = domain.listOrganizationsByOrganization(organization);
    if (organization != null)
    {
        for (int x = 0; x < organizations.size(); x++)
        {
            add(parentNode, organizations.get(x));
        }
    }

    LocSiteLiteVoCollection locationSites = domain.listLocationSites(organization);
    if (locationSites != null)
    {
        for (int x = 0; x < locationSites.size(); x++)
        {
            // ----------------------------------------
            if (locationSites.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locationSites.get(x));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbHospitalTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    form.qmbHospital().clear();

    //WDEV-20064
    LocSiteLiteVoCollection voCollHosp = domain.listHospitals(value); 
    if (voCollHosp==null || voCollHosp.size() == 0)
    {
        return;
    }

    for (int i = 0; i < voCollHosp.size(); i++)
    {
        form.qmbHospital().newRow(voCollHosp.get(i), voCollHosp.get(i).getName());
    }

    if (voCollHosp.size() == 1)
        form.qmbHospital().setValue(voCollHosp.get(0));
    else
        form.qmbHospital().showOpened();

}
项目:openMAXIMS    文件:Logic.java   
private LocSiteLiteVoCollection getExistentHospitalsFromGrid() //WDEV-20064
{
    if (form.ctnDetails().grdHospitals().getRows().size()==0)
        return null;

    LocSiteLiteVoCollection collHosp = new LocSiteLiteVoCollection();

    for (int i=0;i<form.ctnDetails().grdHospitals().getRows().size();i++)
    {
        if (form.ctnDetails().grdHospitals().getRows().get(i).getColHospitals().getValue()==null)
            continue;

        collHosp.add((LocSiteLiteVo) form.ctnDetails().grdHospitals().getRows().get(i).getColHospitals().getValue());
    }

    return collHosp;
}
项目:openMAXIMS    文件: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);
}
项目:openMAXIMS    文件:WaitingListConfigurationImpl.java   
public LocSiteLiteVoCollection listHospitals(String name) //WDEV-20064
{
    DomainFactory factory = getDomainFactory();

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

    StringBuffer hql = new StringBuffer();

    hql.append(" select loc from LocSite as loc ");//WDEV-20064
    hql.append(" where loc.upperName like :LocName and loc.isActive = 1 and loc.isVirtual = 0 and loc.type = :Hospital ");
    hql.append(" order by loc.upperName asc");

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

    markers.add("Hospital");
    values.add(getDomLookup(LocationType.HOSP));

    return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(factory.find(hql.toString(), markers, values));
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public 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

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

    return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(list);
}
项目:openMAXIMS    文件:LocationStartupSelectionImpl.java   
public LocSiteLiteVoCollection listLocationSites(ims.core.resource.place.vo.OrganisationRefVo organization)
{           
    Organisation doOrganisation = (Organisation) getDomainFactory().getDomainObject(organization);
    LocSiteLiteVoCollection result = LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(doOrganisation.getLocationSites());

    if(result == null)
        return null;

    LocSiteLiteVoCollection activeLocationSites = new LocSiteLiteVoCollection();

    for(int x = 0; x < result.size(); x++)
    {
        LocSiteLiteVo locationSite = result.get(x);
        if(locationSite != null 
            && locationSite.getIsActive() != null && locationSite.getIsActive().booleanValue()
            && locationSite.getIsVirtualIsNotNull() && ! locationSite.getIsVirtual().booleanValue())//wdev-2730
            activeLocationSites.add(locationSite);
    }

    return activeLocationSites.sort();
}
项目:openMAXIMS    文件:Logic.java   
private void addCCAToCombo(OrgLiteVo orgLiteVo) 
{
    LocSiteLiteVoCollection coll = null;

    coll = domain.listCCAs(orgLiteVo); 

    if(coll == null)
        return;

    form.cmbCCA().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        LocSiteLiteVo vo = coll.get(i);
        if(vo != null)
        {
            form.cmbCCA().newRow(vo, vo.getName());
        }
    }
}
项目:openMAXIMS    文件:ClientAddressImpl.java   
public LocSiteLiteVoCollection listCCAs(OrgLiteVo lho)
{
    if (!lho.getID_OrganisationIsNotNull())
        return null;

    // WDEV-12550 - Added condition and parameters to filter only locations records of type CCA 
    StringBuffer hql = new StringBuffer();
    hql.append(" from LocSite as ls");
    hql.append(" where");
    hql.append(" ls.isActive =:active");
    hql.append(" and ls.isRIE is null");
    hql.append(" and ls.isVirtual =:virtual");
    hql.append(" and ls.type.id = :CCA");
    hql.append(" and ls.parentOrganisation.id =:lhoId order by ls.name asc");

    return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(getDomainFactory().find(hql.toString(), new String[] { "active", "virtual", "CCA", "lhoId" }, new Object[] { Boolean.TRUE, Boolean.FALSE, LocationType.CCA.getID(), lho.getID_Organisation() }));
}
项目:openMAXIMS    文件:Logic.java   
private void bindHospitalCombo() 
{
    form.cmbHospital().clear();
    LocSiteLiteVoCollection hospitals = domain.listHospitals();

    if(hospitals == null || hospitals.size() == 0)
        return;

    for(LocSiteLiteVo hospital : hospitals)
    {
        if(hospital == null)
            continue;

        form.cmbHospital().newRow(hospital, hospital.getName());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadData(TreeNode parentNode, OrgLiteVo organization)
{
    if (parentNode == null || organization == null)
        return;

    OrgLiteVoCollection organizations = domain.listOrganizationsByOrganization(organization);
    if (organization != null)
    {
        for (int x = 0; x < organizations.size(); x++)
        {
            add(parentNode, organizations.get(x));
        }
    }

    LocSiteLiteVoCollection locationSites = domain.listLocationSites(organization);
    if (locationSites != null)
    {
        for (int x = 0; x < locationSites.size(); x++)
        {
            // ----------------------------------------
            if (locationSites.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locationSites.get(x));
        }
    }
}
项目:openMAXIMS    文件: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);
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public 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

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

    return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(list);
}
项目:openMAXIMS    文件:LocationStartupSelectionImpl.java   
public LocSiteLiteVoCollection listLocationSites(ims.core.resource.place.vo.OrganisationRefVo organization)
{           
    Organisation doOrganisation = (Organisation) getDomainFactory().getDomainObject(organization);
    LocSiteLiteVoCollection result = LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(doOrganisation.getLocationSites());

    if(result == null)
        return null;

    LocSiteLiteVoCollection activeLocationSites = new LocSiteLiteVoCollection();

    for(int x = 0; x < result.size(); x++)
    {
        LocSiteLiteVo locationSite = result.get(x);
        if(locationSite != null 
            && locationSite.getIsActive() != null && locationSite.getIsActive().booleanValue()
            && locationSite.getIsVirtualIsNotNull() && ! locationSite.getIsVirtual().booleanValue())//wdev-2730
            activeLocationSites.add(locationSite);
    }

    return activeLocationSites.sort();
}
项目:openMAXIMS    文件:Logic.java   
private void bindHospitalCombo() 
{
    form.cmbHospital().clear();
    LocSiteLiteVoCollection hospitals = domain.listHospitals();

    if(hospitals == null || hospitals.size() == 0)
        return;

    for(LocSiteLiteVo hospital : hospitals)
    {
        if(hospital == null)
            continue;

        form.cmbHospital().newRow(hospital, hospital.getName());
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void loadData(TreeNode parentNode, OrgLiteVo organization)
{
    if (parentNode == null || organization == null)
        return;

    OrgLiteVoCollection organizations = domain.listOrganizationsByOrganization(organization);
    if (organization != null)
    {
        for (int x = 0; x < organizations.size(); x++)
        {
            add(parentNode, organizations.get(x));
        }
    }

    LocSiteLiteVoCollection locationSites = domain.listLocationSites(organization);
    if (locationSites != null)
    {
        for (int x = 0; x < locationSites.size(); x++)
        {
            // ----------------------------------------
            if (locationSites.get(x).getIsActive() == true)
                // ----------------------------------------
                add(parentNode, locationSites.get(x));
        }
    }
}
项目:openmaxims-linux    文件: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);
}
项目:openmaxims-linux    文件:OrganisationAndLocationImpl.java   
public 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

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

    return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(list);
}
项目:openmaxims-linux    文件:LocationStartupSelectionImpl.java   
public LocSiteLiteVoCollection listLocationSites(ims.core.resource.place.vo.OrganisationRefVo organization)
{           
    Organisation doOrganisation = (Organisation) getDomainFactory().getDomainObject(organization);
    LocSiteLiteVoCollection result = LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(doOrganisation.getLocationSites());

    if(result == null)
        return null;

    LocSiteLiteVoCollection activeLocationSites = new LocSiteLiteVoCollection();

    for(int x = 0; x < result.size(); x++)
    {
        LocSiteLiteVo locationSite = result.get(x);
        if(locationSite != null 
            && locationSite.getIsActive() != null && locationSite.getIsActive().booleanValue()
            && locationSite.getIsVirtualIsNotNull() && ! locationSite.getIsVirtual().booleanValue())//wdev-2730
            activeLocationSites.add(locationSite);
    }

    return activeLocationSites.sort();
}
项目:openmaxims-linux    文件:Logic.java   
private void bindHospitalCombo() 
{
    form.cmbHospital().clear();
    LocSiteLiteVoCollection hospitals = domain.listHospitals();

    if(hospitals == null || hospitals.size() == 0)
        return;

    for(LocSiteLiteVo hospital : hospitals)
    {
        if(hospital == null)
            continue;

        form.cmbHospital().newRow(hospital, hospital.getName());
    }
}
项目:AvoinApotti    文件:ChemotherapyDetailsImpl.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 + "%" );
    imsc.equal("isActive", true);
    List locations = imsc.find();
    if (locations!=null)
        return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(locations);
    else
        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;
}
项目:AvoinApotti    文件:Logic.java   
private boolean hasAllowedLocations(OrgLiteVo organization, IAppUser user)
{
    OrgLiteVoCollection organizationList = domain.listOrganizationsByOrganization(organization);
    LocSiteLiteVoCollection locationList = domain.listLocationSites(organization);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    // Test organizations
    if (organizationList != null)
    {
        for (int i = 0; i < organizationList.size(); i++)
        {
            if (hasAllowedLocations(organizationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void listHospitals(String value) 
{
    if (value == null || value.length() < 3)
    {
        engine.showMessage("Please enter at least 3 characters for search criteria");
        return;
    }

    LocSiteLiteVoCollection coll = null;

    coll = domain.listHospitals(value); 

    form.qmbLocation().setValue(null);
    form.qmbLocation().clear();
    if (coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
        {
            LocSiteLiteVo vo = coll.get(i);
            form.qmbLocation().newRow(vo, vo.getName());
        }

        if (coll.size() == 1)
        {
            form.qmbLocation().setValue(coll.get(0));
        }
        else if (coll.size() > 1)
        {
            form.qmbLocation().showOpened();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateHospitalCombo() 
{
    LocSiteLiteVoCollection hospitals = domain.listHospitals();

    if(hospitals == null || hospitals.size() == 0)
        return;

    for(LocSiteLiteVo hospital : hospitals)
    {
        if(hospital == null)
            continue;

        form.cmbHospital().newRow(hospital, hospital.getName());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void listHospitalSearch(String value)
{
    LocSiteLiteVoCollection coll = null;

    coll = domain.listHospital(value);

    form.ctnHospDetails().qmbHospital().setValue(null);
    form.ctnHospDetails().qmbHospital().clear();

    if (coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
        {
            LocSiteLiteVo vo = coll.get(i);
            form.ctnHospDetails().qmbHospital().newRow(vo, vo.getName());
        }
    }

    if (coll.size() == 1)
    {
        form.ctnHospDetails().qmbHospital().setValue(coll.get(0));
    }

    if (coll.size() > 1)
    {
        form.ctnHospDetails().qmbHospital().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateHospitalCombo()
{
    LocSiteLiteVoCollection hospitals = domain.listHospitals();

    if (hospitals == null || hospitals.size() == 0)
        return;

    for (LocSiteLiteVo hospital : hospitals)
    {
        if (hospital == null)
            continue;

        form.cmbHospital().newRow(hospital, hospital.getName());
    }
}
项目:AvoinApotti    文件:HospitalAtNightWorklistImpl.java   
public LocSiteLiteVoCollection listHospitals() 
{
    String query = "select h from HospitalAtNightCutOverPointsConfig as hc left join hc.hospital as h order by upper(h.name) asc";
    List<?> list = getDomainFactory().find(query);

    return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(list);
}
项目:openMAXIMS    文件:Logic.java   
private boolean hasAllowedLocations(OrgLiteVo organization, IAppUser user)
{
    OrgLiteVoCollection organizationList = domain.listOrganizationsByOrganization(organization);
    LocSiteLiteVoCollection locationList = domain.listLocationSites(organization);

    ILocationProvider locationProvider = engine.getLocationProvider();

    if (locationProvider != null && !locationProvider.shouldSelectLocation(user))
        return true;

    // Test locations
    if (locationList != null)
    {
        for (int i = 0; i < locationList.size(); i++)
        {
            if (locationProvider != null && locationProvider.locationIsAllowed(locationList.get(i), user))
                return true;

            if (hasAllowedLocations(locationList.get(i), user))
                return true;
        }
    }

    // Test organizations
    if (organizationList != null)
    {
        for (int i = 0; i < organizationList.size(); i++)
        {
            if (hasAllowedLocations(organizationList.get(i), user))
                return true;
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void listHospitals(String value) 
{
    if (value == null || value.length() < 3)
    {
        engine.showMessage("Please enter at least 3 characters for search criteria");
        return;
    }

    LocSiteLiteVoCollection coll = null;

    coll = domain.listHospitals(value); 

    form.qmbLocation().setValue(null);
    form.qmbLocation().clear();
    if (coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
        {
            LocSiteLiteVo vo = coll.get(i);
            form.qmbLocation().newRow(vo, vo.getName());
        }

        if (coll.size() == 1)
        {
            form.qmbLocation().setValue(coll.get(0));
        }
        else if (coll.size() > 1)
        {
            form.qmbLocation().showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadCCAs()
{
    LocSiteLiteVoCollection voColl = domain.listCCAs();
    form.cmbCCA().clear();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
        form.cmbCCA().newRow(voColl.get(i), voColl.get(i).getName());
}
项目:openMAXIMS    文件:Logic.java   
private void populateHospitalCombo() 
{
    LocSiteLiteVoCollection hospitals = domain.listHospitals();

    if(hospitals == null || hospitals.size() == 0)
        return;

    for(LocSiteLiteVo hospital : hospitals)
    {
        if(hospital == null)
            continue;

        form.cmbHospital().newRow(hospital, hospital.getName());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void listHospitalSearch(String value)
{
    LocSiteLiteVoCollection coll = null;

    coll = domain.listHospital(value);

    form.ctnHospDetails().qmbHospital().setValue(null);
    form.ctnHospDetails().qmbHospital().clear();

    if (coll != null)
    {
        for (int i = 0; i < coll.size(); i++)
        {
            LocSiteLiteVo vo = coll.get(i);
            form.ctnHospDetails().qmbHospital().newRow(vo, vo.getName());
        }
    }

    if (coll.size() == 1)
    {
        form.ctnHospDetails().qmbHospital().setValue(coll.get(0));
    }

    if (coll.size() > 1)
    {
        form.ctnHospDetails().qmbHospital().showOpened();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateHospitalCombo()
{
    LocSiteLiteVoCollection hospitals = domain.listHospitals();

    if (hospitals == null || hospitals.size() == 0)
        return;

    for (LocSiteLiteVo hospital : hospitals)
    {
        if (hospital == null)
            continue;

        form.cmbHospital().newRow(hospital, hospital.getName());
    }
}
项目:openMAXIMS    文件:HospitalAtNightWorklistImpl.java   
public LocSiteLiteVoCollection listHospitals() 
{
    String query = "select h from HospitalAtNightCutOverPointsConfig as hc left join hc.hospital as h order by h.upperName asc"; //WDEV-20219 upper(h.name)
    List<?> list = getDomainFactory().find(query);

    return LocSiteLiteVoAssembler.createLocSiteLiteVoCollectionFromLocSite(list);
}