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

项目:AvoinApotti    文件:Logic.java   
private void cmbServiceValueChanged()
{
    form.ctnServiceDetail().cmbLocation().clear();
    //clearServicesReadOnlyDetails();

    if (form.ctnServiceDetail().cmbService().getValue() == null)
        return;

    LocShortVoCollection voCollLoc = domain.listLocations(form.ctnServiceDetail().cmbService().getValue());
    LocShortVo voLoc = null;

    if (voCollLoc == null)
        return;

    for (int i = 0; i < voCollLoc.size(); i++)
    {
        voLoc = voCollLoc.get(i);

        form.ctnServiceDetail().cmbLocation().newRow(voLoc, voLoc.getName());
    }

}
项目:AvoinApotti    文件:Logic.java   
private void cmbServiceValueChanged()
{
    form.lyrProServices().tabServices().cmbLocation().clear();
    clearServicesReadOnlyDetails();

    if (form.lyrProServices().tabServices().cmbService().getValue() == null)
        return;

    LocShortVoCollection voCollLoc = domain.listLocations(form.lyrProServices().tabServices().cmbService().getValue());
    LocShortVo voLoc = null;

    if (voCollLoc == null)
        return;

    for (int i = 0; i < voCollLoc.size(); i++)
    {
        voLoc = voCollLoc.get(i);

        form.lyrProServices().tabServices().cmbLocation().newRow(voLoc, voLoc.getName());
    }

}
项目:AvoinApotti    文件:SupportNetworkProfessionalServicesImpl.java   
public LocShortVoCollection listLocations(ServiceRefVo service)
{
    if (service == null)
        throw new CodingRuntimeException("Service was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hql = "from LocationService ls " + " where ls.service.id = :id and ls.isActive = :active";

    List services = factory.find(hql, new String[]{"id", "active"}, new Object[]{service.getID_Service(), Boolean.TRUE});
    LocShortVoCollection locs = new LocShortVoCollection();

    for (int i = 0; i < services.size(); i++)
    {
        LocationService doLocService = (LocationService) services.get(i);
        locs.add(LocShortVoAssembler.create(doLocService.getLocation()));
    }

    return locs.sort();
}
项目:AvoinApotti    文件:SupportServicesImpl.java   
public LocShortVoCollection listLocations(ServiceRefVo service) 
{
    if (service == null)
        throw new CodingRuntimeException("Service was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hql = "from LocationService ls " + " where ls.service.id = :id and ls.isActive = :active";

    List services = factory.find(hql, new String[]{"id", "active"}, new Object[]{service.getID_Service(), Boolean.TRUE});
    LocShortVoCollection locs = new LocShortVoCollection();

    for (int i = 0; i < services.size(); i++)
    {
        LocationService doLocService = (LocationService) services.get(i);
        locs.add(LocShortVoAssembler.create(doLocService.getLocation()));
    }

    return locs.sort();
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbWardTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    if (value != null)
    {
        form.qmbWard().clear();

        LocShortVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue(), value);

        for (int i = 0; i < voLocShortMapColl.size(); i++)
        {
            form.qmbWard().newRow(voLocShortMapColl.get(i), voLocShortMapColl.get(i).getName().toString());
        }

        if (voLocShortMapColl.size() == 1)
        {
            form.qmbWard().setValue(voLocShortMapColl.get(0));
        }
        else if (voLocShortMapColl.size() > 1)
        {
            form.qmbWard().showOpened();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbWardTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    LocationLiteVo voLocation = form.cmbHospital().getValue();
    LocShortVoCollection voColl = domain.listActiveWardsForHospital(voLocation, value);
    form.qmbWard().clear();
    for (int i = 0; i < voColl.size(); i++)
    {
        form.qmbWard().newRow(voColl.get(i).getID_Location(), voColl.get(i).getName());
    }

    int wardCollSize = form.qmbWard().getValues().size();
    if (wardCollSize == 1)
    {
        if (form.qmbWard().getValues().get(0) instanceof Integer)
            form.qmbWard().setValue((Integer) form.qmbWard().getValues().get(0));
    }
    else if (wardCollSize > 1)
    {
        form.qmbWard().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadTheatreCombo(LocationRefVo appointmentLocation)
{
    form.lyr1().tabCareRecord().cmbTheatre().clear();
    LocShortVoCollection collLocShortVo = domain.listTheatres(appointmentLocation);
    if (collLocShortVo != null)
    {
        for (LocShortVo item : collLocShortVo)
        {
            form.lyr1().tabCareRecord().cmbTheatre().newRow(item, item.getName());

            if (engine.getCurrentLocation() != null)
            {
                if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
                    form.lyr1().tabCareRecord().cmbTheatre().setValue(item);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadTheatreCombo()
{
    form.lyrMain().tabCareRecord().cmbTheatre().clear();
    LocShortVoCollection collLocShortVo = domain.listTheatres();
    if (collLocShortVo != null)
    {
        for (LocShortVo item : collLocShortVo)
        {
            form.lyrMain().tabCareRecord().cmbTheatre().newRow(item, item.getName());

            if (engine.getCurrentLocation() != null)
            {
                if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
                    form.lyrMain().tabCareRecord().cmbTheatre().setValue(item);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void cmbServiceValueChanged()
{
    form.ctnServiceDetail().cmbLocation().clear();
    //clearServicesReadOnlyDetails();

    if (form.ctnServiceDetail().cmbService().getValue() == null)
        return;

    LocShortVoCollection voCollLoc = domain.listLocations(form.ctnServiceDetail().cmbService().getValue());
    LocShortVo voLoc = null;

    if (voCollLoc == null)
        return;

    for (int i = 0; i < voCollLoc.size(); i++)
    {
        voLoc = voCollLoc.get(i);

        form.ctnServiceDetail().cmbLocation().newRow(voLoc, voLoc.getName());
    }

}
项目:openMAXIMS    文件:Logic.java   
private void cmbServiceValueChanged()
{
    form.lyrProServices().tabServices().cmbLocation().clear();
    clearServicesReadOnlyDetails();

    if (form.lyrProServices().tabServices().cmbService().getValue() == null)
        return;

    LocShortVoCollection voCollLoc = domain.listLocations(form.lyrProServices().tabServices().cmbService().getValue());
    LocShortVo voLoc = null;

    if (voCollLoc == null)
        return;

    for (int i = 0; i < voCollLoc.size(); i++)
    {
        voLoc = voCollLoc.get(i);

        form.lyrProServices().tabServices().cmbLocation().newRow(voLoc, voLoc.getName());
    }

}
项目:openMAXIMS    文件:SupportNetworkProfessionalServicesImpl.java   
public LocShortVoCollection listLocations(ServiceRefVo service)
{
    if (service == null)
        throw new CodingRuntimeException("Service was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hql = "from LocationService ls " + " where ls.service.id = :id and ls.isActive = :active";

    List services = factory.find(hql, new String[]{"id", "active"}, new Object[]{service.getID_Service(), Boolean.TRUE});
    LocShortVoCollection locs = new LocShortVoCollection();

    for (int i = 0; i < services.size(); i++)
    {
        LocationService doLocService = (LocationService) services.get(i);
        if (Boolean.TRUE.equals(doLocService.getLocation().isIsActive() && Boolean.FALSE.equals(doLocService.getLocation().isIsVirtual()))) //WDEV-19532 only add active, non-virtual locations
            locs.add(LocShortVoAssembler.create(doLocService.getLocation()));
    }

    return locs.sort();
}
项目:openMAXIMS    文件:SupportServicesImpl.java   
public LocShortVoCollection listLocations(ServiceRefVo service) 
{
    if (service == null)
        throw new CodingRuntimeException("Service was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hql = "from LocationService ls " + " where ls.service.id = :id and ls.isActive = :active";

    List services = factory.find(hql, new String[]{"id", "active"}, new Object[]{service.getID_Service(), Boolean.TRUE});
    LocShortVoCollection locs = new LocShortVoCollection();

    for (int i = 0; i < services.size(); i++)
    {
        LocationService doLocService = (LocationService) services.get(i);
        locs.add(LocShortVoAssembler.create(doLocService.getLocation()));
    }

    return locs.sort();
}
项目:openMAXIMS    文件:Logic.java   
private void populateCaseNoteFolderLocationByHospital(String value, LocationLiteVo hospital)
{
    form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().clear();
    LocShortVoCollection tempColl = null;

    tempColl = domain.getCaseNoteFolderLocationByParent(hospital, value, null);

    if( tempColl == null)
        return;

    for (LocShortVo loc : tempColl)
    {
        form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().newRow(loc, loc.getName());
    }

    if (tempColl.size() == 1)
    {
        form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().setValue(tempColl.get(0));
        setCaseNoteFolderLocation(form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().getValue(), false); //WDEV-20798
        //updateWardSelection();
    }
    else
    {
        form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().showOpened();
    }
}
项目:openMAXIMS    文件:Logic.java   
private LocShortVoCollection removeAddedLocations(LocShortVoCollection collTheatreLocFromDb, LocationLiteVoCollection collTheatreLocFormGrid)
{
    for (int i=0; i<collTheatreLocFormGrid.size();i++)
    {
        for (int j=0;collTheatreLocFromDb!=null && j<collTheatreLocFromDb.size();j++)
        {
            if (collTheatreLocFormGrid.get(i).getID_Location().equals(collTheatreLocFromDb.get(j).getID_Location()))
            {
                collTheatreLocFromDb.remove(collTheatreLocFromDb.get(j));
                break;
            }
        }
    }

    return collTheatreLocFromDb;

}
项目:openMAXIMS    文件:TheatreGroupImpl.java   
public LocShortVoCollection listTheatreLocations(ims.core.resource.place.vo.LocationRefVo locRef, String searchText, TheatreGroupRefVo theatreGroupToBeExcludedRef)
{
    OrganisationAndLocation impl = (OrganisationAndLocation)getDomainImpl(OrganisationAndLocationImpl.class);
    LocShortVoCollection collTheatreLoc = impl.getLocationByParent(locRef,searchText,LocationType.THEATRE);
    LocShortVoCollection collTheatreAlreadyUsed = getAlreadyUsedTheatreLocations(locRef, theatreGroupToBeExcludedRef);

    for (int i=0;collTheatreAlreadyUsed!=null && i<collTheatreAlreadyUsed.size(); i++)
    {
        LocShortVo theatreLocUsed = collTheatreAlreadyUsed.get(i);

        for (int j=0; collTheatreLoc!=null && j<collTheatreLoc.size();j++)
        {
            LocShortVo theatreLoc = collTheatreLoc.get(j);
            if (theatreLoc.equals(theatreLocUsed))
            {
                collTheatreLoc.remove(theatreLoc);
                break;
            }
        }
    }

    return collTheatreLoc;
}
项目:openMAXIMS    文件:TheatreGroupImpl.java   
private LocShortVoCollection getAlreadyUsedTheatreLocations(LocationRefVo parentLocationRef, TheatreGroupRefVo theatreGroupToBeExcludedRef)
{
    if (parentLocationRef==null )
    {
        throw new CodingRuntimeException("Cannot getTheatreLocations for null Hospital ");
    }

    DomainFactory factory = getDomainFactory();

    String hql = "select theatreloc from TheatreGroup as theatreGroup left join theatreGroup.hospital as hosp left join theatreGroup.theatreLocations as theatreloc where hosp.id = " +parentLocationRef.getID_Location() ;

    if (theatreGroupToBeExcludedRef!=null)
    {
        hql+= " and theatreGroup.id <> " + theatreGroupToBeExcludedRef.getID_TheatreGroup();
    }

    List list = factory.find(hql);

    return LocShortVoAssembler.createLocShortVoCollectionFromLocation(list);
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public LocShortVoCollection getLocationByParent(LocationRefVo locRef,String value, LocationType type1)
{
    int[] types;
    if( type1.equals(LocationType.CLINIC ))
    {
        types = new int[]{LocationType.CLINIC.getID(), LocationType.OUTPATIENT_DEPT.getID()};
    }
    else if( type1.equals(LocationType.THEATRE ))
    {
        types = new int[]{LocationType.THEATRE.getID(), LocationType.PROCEDURE_ROOM.getID()};
    }
    else
    {
        types = new int[]{type1.getID()};
    }
    String ids = getChildLocationsIdsForLocation(locRef.getBoId(),types,Boolean.TRUE, null, null, null, null, value,null);//http://jira/browse/WDEV-21774 Build 10.5.1
    List<Location> locations = getDomainFactory().find("select l from Location l where l.id in("+ids+")");
    return LocShortVoAssembler.createLocShortVoCollectionFromLocation(locations).sort(true);
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbWardTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    if (value != null)
    {
        form.qmbWard().clear();

        LocShortVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue(), value);

        for (int i = 0; i < voLocShortMapColl.size(); i++)
        {
            form.qmbWard().newRow(voLocShortMapColl.get(i), voLocShortMapColl.get(i).getName().toString());
        }

        if (voLocShortMapColl.size() == 1)
        {
            form.qmbWard().setValue(voLocShortMapColl.get(0));
        }
        else if (voLocShortMapColl.size() > 1)
        {
            form.qmbWard().showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onQmbWardTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    LocationLiteVo voLocation = form.cmbHospital().getValue();
    LocShortVoCollection voColl = domain.listActiveWardsForHospital(voLocation, value);
    form.qmbWard().clear();
    for (int i = 0; i < voColl.size(); i++)
    {
        form.qmbWard().newRow(voColl.get(i).getID_Location(), voColl.get(i).getName());
    }

    int wardCollSize = form.qmbWard().getValues().size();
    if (wardCollSize == 1)
    {
        if (form.qmbWard().getValues().get(0) instanceof Integer)
            form.qmbWard().setValue((Integer) form.qmbWard().getValues().get(0));
    }
    else if (wardCollSize > 1)
    {
        form.qmbWard().showOpened();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadTheatreCombo(LocationRefVo appointmentLocation)
{
    form.lyr1().tabCareRecord().cmbTheatre().clear();
    LocShortVoCollection collLocShortVo = domain.listTheatres(appointmentLocation);
    if (collLocShortVo != null)
    {
        for (LocShortVo item : collLocShortVo)
        {
            form.lyr1().tabCareRecord().cmbTheatre().newRow(item, item.getName());

            if (engine.getCurrentLocation() != null)
            {
                if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
                    form.lyr1().tabCareRecord().cmbTheatre().setValue(item);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadTheatreCombo()
{
    form.lyrMain().tabCareRecord().cmbTheatre().clear();
    LocShortVoCollection collLocShortVo = domain.listTheatres();
    if (collLocShortVo != null)
    {
        for (LocShortVo item : collLocShortVo)
        {
            form.lyrMain().tabCareRecord().cmbTheatre().newRow(item, item.getName());

            if (engine.getCurrentLocation() != null)
            {
                if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
                    form.lyrMain().tabCareRecord().cmbTheatre().setValue(item);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void cmbServiceValueChanged()
{
    form.ctnServiceDetail().cmbLocation().clear();
    //clearServicesReadOnlyDetails();

    if (form.ctnServiceDetail().cmbService().getValue() == null)
        return;

    LocShortVoCollection voCollLoc = domain.listLocations(form.ctnServiceDetail().cmbService().getValue());
    LocShortVo voLoc = null;

    if (voCollLoc == null)
        return;

    for (int i = 0; i < voCollLoc.size(); i++)
    {
        voLoc = voCollLoc.get(i);

        form.ctnServiceDetail().cmbLocation().newRow(voLoc, voLoc.getName());
    }

}
项目:openMAXIMS    文件:Logic.java   
private void cmbServiceValueChanged()
{
    form.lyrProServices().tabServices().cmbLocation().clear();
    clearServicesReadOnlyDetails();

    if (form.lyrProServices().tabServices().cmbService().getValue() == null)
        return;

    LocShortVoCollection voCollLoc = domain.listLocations(form.lyrProServices().tabServices().cmbService().getValue());
    LocShortVo voLoc = null;

    if (voCollLoc == null)
        return;

    for (int i = 0; i < voCollLoc.size(); i++)
    {
        voLoc = voCollLoc.get(i);

        form.lyrProServices().tabServices().cmbLocation().newRow(voLoc, voLoc.getName());
    }

}
项目:openMAXIMS    文件:SupportNetworkProfessionalServicesImpl.java   
public LocShortVoCollection listLocations(ServiceRefVo service)
{
    if (service == null)
        throw new CodingRuntimeException("Service was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hql = "from LocationService ls " + " where ls.service.id = :id and ls.isActive = :active";

    List services = factory.find(hql, new String[]{"id", "active"}, new Object[]{service.getID_Service(), Boolean.TRUE});
    LocShortVoCollection locs = new LocShortVoCollection();

    for (int i = 0; i < services.size(); i++)
    {
        LocationService doLocService = (LocationService) services.get(i);
        locs.add(LocShortVoAssembler.create(doLocService.getLocation()));
    }

    return locs.sort();
}
项目:openMAXIMS    文件:SupportServicesImpl.java   
public LocShortVoCollection listLocations(ServiceRefVo service) 
{
    if (service == null)
        throw new CodingRuntimeException("Service was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hql = "from LocationService ls " + " where ls.service.id = :id and ls.isActive = :active";

    List services = factory.find(hql, new String[]{"id", "active"}, new Object[]{service.getID_Service(), Boolean.TRUE});
    LocShortVoCollection locs = new LocShortVoCollection();

    for (int i = 0; i < services.size(); i++)
    {
        LocationService doLocService = (LocationService) services.get(i);
        locs.add(LocShortVoAssembler.create(doLocService.getLocation()));
    }

    return locs.sort();
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbWardTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    if (value != null)
    {
        form.qmbWard().clear();

        LocShortVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue(), value);

        for (int i = 0; i < voLocShortMapColl.size(); i++)
        {
            form.qmbWard().newRow(voLocShortMapColl.get(i), voLocShortMapColl.get(i).getName().toString());
        }

        if (voLocShortMapColl.size() == 1)
        {
            form.qmbWard().setValue(voLocShortMapColl.get(0));
        }
        else if (voLocShortMapColl.size() > 1)
        {
            form.qmbWard().showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onQmbWardTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    LocationLiteVo voLocation = form.cmbHospital().getValue();
    LocShortVoCollection voColl = domain.listActiveWardsForHospital(voLocation, value);
    form.qmbWard().clear();
    for (int i = 0; i < voColl.size(); i++)
    {
        form.qmbWard().newRow(voColl.get(i).getID_Location(), voColl.get(i).getName());
    }

    int wardCollSize = form.qmbWard().getValues().size();
    if (wardCollSize == 1)
    {
        if (form.qmbWard().getValues().get(0) instanceof Integer)
            form.qmbWard().setValue((Integer) form.qmbWard().getValues().get(0));
    }
    else if (wardCollSize > 1)
    {
        form.qmbWard().showOpened();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadTheatreCombo(LocationRefVo appointmentLocation)
{
    form.lyr1().tabCareRecord().cmbTheatre().clear();
    LocShortVoCollection collLocShortVo = domain.listTheatres(appointmentLocation);
    if (collLocShortVo != null)
    {
        for (LocShortVo item : collLocShortVo)
        {
            form.lyr1().tabCareRecord().cmbTheatre().newRow(item, item.getName());

            if (engine.getCurrentLocation() != null)
            {
                if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
                    form.lyr1().tabCareRecord().cmbTheatre().setValue(item);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadTheatreCombo()
{
    form.lyrMain().tabCareRecord().cmbTheatre().clear();
    LocShortVoCollection collLocShortVo = domain.listTheatres();
    if (collLocShortVo != null)
    {
        for (LocShortVo item : collLocShortVo)
        {
            form.lyrMain().tabCareRecord().cmbTheatre().newRow(item, item.getName());

            if (engine.getCurrentLocation() != null)
            {
                if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
                    form.lyrMain().tabCareRecord().cmbTheatre().setValue(item);
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void cmbServiceValueChanged()
{
    form.ctnServiceDetail().cmbLocation().clear();
    //clearServicesReadOnlyDetails();

    if (form.ctnServiceDetail().cmbService().getValue() == null)
        return;

    LocShortVoCollection voCollLoc = domain.listLocations(form.ctnServiceDetail().cmbService().getValue());
    LocShortVo voLoc = null;

    if (voCollLoc == null)
        return;

    for (int i = 0; i < voCollLoc.size(); i++)
    {
        voLoc = voCollLoc.get(i);

        form.ctnServiceDetail().cmbLocation().newRow(voLoc, voLoc.getName());
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void cmbServiceValueChanged()
{
    form.lyrProServices().tabServices().cmbLocation().clear();
    clearServicesReadOnlyDetails();

    if (form.lyrProServices().tabServices().cmbService().getValue() == null)
        return;

    LocShortVoCollection voCollLoc = domain.listLocations(form.lyrProServices().tabServices().cmbService().getValue());
    LocShortVo voLoc = null;

    if (voCollLoc == null)
        return;

    for (int i = 0; i < voCollLoc.size(); i++)
    {
        voLoc = voCollLoc.get(i);

        form.lyrProServices().tabServices().cmbLocation().newRow(voLoc, voLoc.getName());
    }

}
项目:openmaxims-linux    文件:SupportNetworkProfessionalServicesImpl.java   
public LocShortVoCollection listLocations(ServiceRefVo service)
{
    if (service == null)
        throw new CodingRuntimeException("Service was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hql = "from LocationService ls " + " where ls.service.id = :id and ls.isActive = :active";

    List services = factory.find(hql, new String[]{"id", "active"}, new Object[]{service.getID_Service(), Boolean.TRUE});
    LocShortVoCollection locs = new LocShortVoCollection();

    for (int i = 0; i < services.size(); i++)
    {
        LocationService doLocService = (LocationService) services.get(i);
        locs.add(LocShortVoAssembler.create(doLocService.getLocation()));
    }

    return locs.sort();
}
项目:openmaxims-linux    文件:SupportServicesImpl.java   
public LocShortVoCollection listLocations(ServiceRefVo service) 
{
    if (service == null)
        throw new CodingRuntimeException("Service was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hql = "from LocationService ls " + " where ls.service.id = :id and ls.isActive = :active";

    List services = factory.find(hql, new String[]{"id", "active"}, new Object[]{service.getID_Service(), Boolean.TRUE});
    LocShortVoCollection locs = new LocShortVoCollection();

    for (int i = 0; i < services.size(); i++)
    {
        LocationService doLocService = (LocationService) services.get(i);
        locs.add(LocShortVoAssembler.create(doLocService.getLocation()));
    }

    return locs.sort();
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onQmbWardTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    if (value != null)
    {
        form.qmbWard().clear();

        LocShortVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(form.cmbHospital().getValue(), value);

        for (int i = 0; i < voLocShortMapColl.size(); i++)
        {
            form.qmbWard().newRow(voLocShortMapColl.get(i), voLocShortMapColl.get(i).getName().toString());
        }

        if (voLocShortMapColl.size() == 1)
        {
            form.qmbWard().setValue(voLocShortMapColl.get(0));
        }
        else if (voLocShortMapColl.size() > 1)
        {
            form.qmbWard().showOpened();
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onQmbWardTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    LocationLiteVo voLocation = form.cmbHospital().getValue();
    LocShortVoCollection voColl = domain.listActiveWardsForHospital(voLocation, value);
    form.qmbWard().clear();
    for (int i = 0; i < voColl.size(); i++)
    {
        form.qmbWard().newRow(voColl.get(i).getID_Location(), voColl.get(i).getName());
    }

    int wardCollSize = form.qmbWard().getValues().size();
    if (wardCollSize == 1)
    {
        if (form.qmbWard().getValues().get(0) instanceof Integer)
            form.qmbWard().setValue((Integer) form.qmbWard().getValues().get(0));
    }
    else if (wardCollSize > 1)
    {
        form.qmbWard().showOpened();
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void loadTheatreCombo(LocationRefVo appointmentLocation)
{
    form.lyr1().tabCareRecord().cmbTheatre().clear();
    LocShortVoCollection collLocShortVo = domain.listTheatres(appointmentLocation);
    if (collLocShortVo != null)
    {
        for (LocShortVo item : collLocShortVo)
        {
            form.lyr1().tabCareRecord().cmbTheatre().newRow(item, item.getName());

            if (engine.getCurrentLocation() != null)
            {
                if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
                    form.lyr1().tabCareRecord().cmbTheatre().setValue(item);
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void loadTheatreCombo()
{
    form.lyrMain().tabCareRecord().cmbTheatre().clear();
    LocShortVoCollection collLocShortVo = domain.listTheatres();
    if (collLocShortVo != null)
    {
        for (LocShortVo item : collLocShortVo)
        {
            form.lyrMain().tabCareRecord().cmbTheatre().newRow(item, item.getName());

            if (engine.getCurrentLocation() != null)
            {
                if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
                    form.lyrMain().tabCareRecord().cmbTheatre().setValue(item);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{
    if (form.getGlobalContext().COE.getSupportNetworkMos() == null)
        return;

    LocShortVoCollection voColl = domain.listLocationsForMemberOfStaff(form.getGlobalContext().COE.getSupportNetworkMos());
    LocShortVo voItem = null;
    if(voColl != null)
    {
        for(int i=0;i<voColl.size();i++)
        {
            voItem = voColl.get(i);
            if(voItem != null)
            {
                GenForm.grdLocationsRow row = form.grdLocations().getRows().newRow();

                row.setLocation(voItem.getName());
                if(voItem.getAddress() != null)
                {
                    String strAddress = voItem.getAddress().toDisplayString();
                    row.setAddress(strAddress);
                    row.setPhone(voItem.getAddress().getPhone());
                }
                row.setValue(voItem);
            }
        }
    }   
}
项目:AvoinApotti    文件:Logic.java   
private void loadLocationsForMOS(boolean bUpdate) {
    if (!bUpdate)
        clearProfessionalReadOnlyDetails();

    MemberOfStaffShortVo voMosShort = form.ctnDetails().qmbRefferalTo().getValue();

    if (voMosShort != null)
    {

        LocShortVoCollection voLocShortVoColl = domain.listLocationsForMemberOfStaff(voMosShort);

        if (voLocShortVoColl != null)
        {
            for (int i = 0; i < voLocShortVoColl.size(); i++)
            {
                if ((voMosShort.getPrimaryLocationIsNotNull()) && (voMosShort.getPrimaryLocation().equals(voLocShortVoColl.get(i))))
                    form.ctnDetails().cmbLocation().newRow(voLocShortVoColl.get(i), voLocShortVoColl.get(i).getName(), Color.Green);
                else
                    form.ctnDetails().cmbLocation().newRow(voLocShortVoColl.get(i), voLocShortVoColl.get(i).getName(), Color.Black);
            }

            if (!bUpdate)
                form.ctnDetails().cmbLocation().showOpened();

        }
    }

}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{
    if (form.getGlobalContext().COE.getSupportNetworkMos() == null)
        return;

    LocShortVoCollection voColl = domain.listLocationsForMemberOfStaff(form.getGlobalContext().COE.getSupportNetworkMos());
    LocShortVo voItem = null;
    if(voColl != null)
    {
        for(int i=0;i<voColl.size();i++)
        {
            voItem = voColl.get(i);
            if(voItem != null)
            {
                GenForm.grdLocationsRow row = form.grdLocations().getRows().newRow();

                row.setLocation(voItem.getName());
                if(voItem.getAddress() != null)
                {
                    String strAddress = voItem.getAddress().toDisplayString();
                    row.setAddress(strAddress);
                    row.setPhone(voItem.getAddress().getPhone());
                }
                row.setValue(voItem);
            }
        }
    }   
}