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

项目:AvoinApotti    文件:ServiceImpl.java   
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer query = new StringBuffer("from Service s where s.upperName like :serviceName and s.isActive = :isActive");
    for (int i = 0; i < categoryCollection.size(); i++)
    {
        if (i == 0)
            query.append(" and s.serviceCategory.id in(");
        query.append(categoryCollection.get(i).getID());

        if (i < (categoryCollection.size() - 1))
            query.append(", ");
        else
            query.append(")");
    }
    List services = factory.find(query.toString(), new String[]{"serviceName", "isActive"}, new Object[]{"%" + name.toUpperCase() + "%", Boolean.TRUE});
    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(services).sort();
}
项目:openMAXIMS    文件:ServiceImpl.java   
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer query = new StringBuffer("from Service s where s.upperName like :serviceName and s.isActive = :isActive");
    for (int i = 0; i < categoryCollection.size(); i++)
    {
        if (i == 0)
            query.append(" and s.serviceCategory.id in(");
        query.append(categoryCollection.get(i).getID());

        if (i < (categoryCollection.size() - 1))
            query.append(", ");
        else
            query.append(")");
    }
    List services = factory.find(query.toString(), new String[]{"serviceName", "isActive"}, new Object[]{"%" + name.toUpperCase() + "%", Boolean.TRUE});
    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(services).sort();
}
项目:openMAXIMS    文件:ServiceImpl.java   
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer query = new StringBuffer("from Service s where s.upperName like :serviceName and s.isActive = :isActive");
    for (int i = 0; i < categoryCollection.size(); i++)
    {
        if (i == 0)
            query.append(" and s.serviceCategory.id in(");
        query.append(categoryCollection.get(i).getID());

        if (i < (categoryCollection.size() - 1))
            query.append(", ");
        else
            query.append(")");
    }
    List services = factory.find(query.toString(), new String[]{"serviceName", "isActive"}, new Object[]{"%" + name.toUpperCase() + "%", Boolean.TRUE});
    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(services).sort();
}
项目:openmaxims-linux    文件:ServiceImpl.java   
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer query = new StringBuffer("from Service s where s.upperName like :serviceName and s.isActive = :isActive");
    for (int i = 0; i < categoryCollection.size(); i++)
    {
        if (i == 0)
            query.append(" and s.serviceCategory.id in(");
        query.append(categoryCollection.get(i).getID());

        if (i < (categoryCollection.size() - 1))
            query.append(", ");
        else
            query.append(")");
    }
    List services = factory.find(query.toString(), new String[]{"serviceName", "isActive"}, new Object[]{"%" + name.toUpperCase() + "%", Boolean.TRUE});
    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(services).sort();
}
项目:AvoinApotti    文件:Logic.java   
private void loadServiceCombo()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);
    // WDEV-1913
    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.lyrProServices().tabServices().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.lyrProServices().tabServices().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());

}
项目:AvoinApotti    文件:SupportNetworkProfessionalServicesImpl.java   
public ServiceVoCollection listService(ServiceCategoryCollection excludedServices)
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Service s where s.isActive = :active");
    ArrayList paramNames = new ArrayList();
    ArrayList paramValues = new ArrayList();

    paramNames.add("active");
    paramValues.add(Boolean.TRUE);

    if (excludedServices != null)
    {
        int servicesSize = excludedServices.size();
        for (int i = 0; i < servicesSize; i++)
        {
            if (i == 0)
                hql.append(" and (");

            ServiceCategory serviceCategory = excludedServices.get(i);
            String serviceType = "serviceType" + Integer.toString(i);
            paramNames.add(serviceType);
            paramValues.add(new Integer(serviceCategory.getID()));

            hql.append("s.serviceCategory.id <> :" + serviceType);

            if (i == (servicesSize - 1))
                hql.append(")");
            else
                hql.append(" and ");
        }
    }
    hql.append(" order by UPPER(s.serviceName) asc  ");
    java.util.List services = factory.find(hql.toString(), paramNames, paramValues);

    return ServiceVoAssembler.createServiceVoCollectionFromService(services);
}
项目:AvoinApotti    文件:Logic.java   
private void loadServiceCombo()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);

    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.lyrSupportServices().tabPageServices().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.lyrSupportServices().tabPageServices().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());
}
项目:AvoinApotti    文件:SupportServicesImpl.java   
public ServiceVoCollection listService( ServiceCategoryCollection excludedServices) 
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Service s where s.isActive = :active");
    ArrayList paramNames = new ArrayList();
    ArrayList paramValues = new ArrayList();

    paramNames.add("active");
    paramValues.add(Boolean.TRUE);

    if (excludedServices != null)
    {
        int servicesSize = excludedServices.size();
        for (int i = 0; i < servicesSize; i++)
        {
            if (i == 0)
                hql.append(" and (");

            ServiceCategory serviceCategory = excludedServices.get(i);
            String serviceType = "serviceType" + Integer.toString(i);
            paramNames.add(serviceType);
            paramValues.add(new Integer(serviceCategory.getID()));

            hql.append("s.serviceCategory.id <> :" + serviceType);

            if (i == (servicesSize - 1))
                hql.append(")");
            else
                hql.append(" and ");
        }
    }
    //WDEV-18210
    hql.append(" order by UPPER(s.serviceName) asc");

    java.util.List services = factory.find(hql.toString(), paramNames, paramValues);

    return ServiceVoAssembler.createServiceVoCollectionFromService(services);
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbServiceTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbService().clear();

    ServiceCategoryCollection categories = new ServiceCategoryCollection();
    categories.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    categories.add(ServiceCategory.RADIOLOGY_MODALITY);

    //WDEV-2798 - search should filter the Services having the Categories as "Pathology Discipline" and Radiology "Modality"
    ServiceLiteVoCollection voCollService = domain.listActiveServiceLiteByNameAndCategories(value, categories);
    if (voCollService != null && voCollService.size() > 0)
    {
        for (int i = 0; i < voCollService.size(); i++)
        {
            form.qmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName().toString());
        }
        if (voCollService.size() == 1)
        {
            form.qmbService().setValue(voCollService.get(0));
            open();
        }
        else if (voCollService.size() > 1)
            form.qmbService().showOpened();
    }
    else
    {
        engine.showMessage("No matching records found");
        clearInstanceControls();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadServiceCombo()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);
    // WDEV-1913
    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.lyrProServices().tabServices().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.lyrProServices().tabServices().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());

}
项目:openMAXIMS    文件:SupportNetworkProfessionalServicesImpl.java   
public ServiceVoCollection listService(ServiceCategoryCollection excludedServices)
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Service s where s.isActive = :active");
    ArrayList paramNames = new ArrayList();
    ArrayList paramValues = new ArrayList();

    paramNames.add("active");
    paramValues.add(Boolean.TRUE);

    if (excludedServices != null)
    {
        int servicesSize = excludedServices.size();
        for (int i = 0; i < servicesSize; i++)
        {
            if (i == 0)
                hql.append(" and (");

            ServiceCategory serviceCategory = excludedServices.get(i);
            String serviceType = "serviceType" + Integer.toString(i);
            paramNames.add(serviceType);
            paramValues.add(new Integer(serviceCategory.getID()));

            hql.append("s.serviceCategory.id <> :" + serviceType);

            if (i == (servicesSize - 1))
                hql.append(")");
            else
                hql.append(" and ");
        }
    }
    hql.append(" order by s.upperName asc  "); //WDEV-20219 UPPER(s.serviceName)
    java.util.List services = factory.find(hql.toString(), paramNames, paramValues);

    return ServiceVoAssembler.createServiceVoCollectionFromService(services);
}
项目:openMAXIMS    文件:Logic.java   
private void loadServiceCombo()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);

    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.lyrSupportServices().tabPageServices().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.lyrSupportServices().tabPageServices().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());
}
项目:openMAXIMS    文件:SupportServicesImpl.java   
public ServiceVoCollection listService( ServiceCategoryCollection excludedServices) 
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Service s where s.isActive = :active");
    ArrayList paramNames = new ArrayList();
    ArrayList paramValues = new ArrayList();

    paramNames.add("active");
    paramValues.add(Boolean.TRUE);

    if (excludedServices != null)
    {
        int servicesSize = excludedServices.size();
        for (int i = 0; i < servicesSize; i++)
        {
            if (i == 0)
                hql.append(" and (");

            ServiceCategory serviceCategory = excludedServices.get(i);
            String serviceType = "serviceType" + Integer.toString(i);
            paramNames.add(serviceType);
            paramValues.add(new Integer(serviceCategory.getID()));

            hql.append("s.serviceCategory.id <> :" + serviceType);

            if (i == (servicesSize - 1))
                hql.append(")");
            else
                hql.append(" and ");
        }
    }
    //WDEV-18210
    hql.append(" order by s.upperName asc"); //WDEV-20219 UPPER(s.serviceName)

    java.util.List services = factory.find(hql.toString(), paramNames, paramValues);

    return ServiceVoAssembler.createServiceVoCollectionFromService(services);
}
项目:openMAXIMS    文件:Logic.java   
protected void onQmbServiceTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbService().clear();

    ServiceCategoryCollection categories = new ServiceCategoryCollection();
    categories.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    categories.add(ServiceCategory.RADIOLOGY_MODALITY);

    //WDEV-2798 - search should filter the Services having the Categories as "Pathology Discipline" and Radiology "Modality"
    ServiceLiteVoCollection voCollService = domain.listActiveServiceLiteByNameAndCategories(value, categories);
    if (voCollService != null && voCollService.size() > 0)
    {
        for (int i = 0; i < voCollService.size(); i++)
        {
            form.qmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName().toString());
        }
        if (voCollService.size() == 1)
        {
            form.qmbService().setValue(voCollService.get(0));
            open();
        }
        else if (voCollService.size() > 1)
            form.qmbService().showOpened();
    }
    else
    {
        engine.showMessage("No matching records found");
        clearInstanceControls();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadServiceCombo()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);
    // WDEV-1913
    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.lyrProServices().tabServices().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.lyrProServices().tabServices().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());

}
项目:openMAXIMS    文件:SupportNetworkProfessionalServicesImpl.java   
public ServiceVoCollection listService(ServiceCategoryCollection excludedServices)
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Service s where s.isActive = :active");
    ArrayList paramNames = new ArrayList();
    ArrayList paramValues = new ArrayList();

    paramNames.add("active");
    paramValues.add(Boolean.TRUE);

    if (excludedServices != null)
    {
        int servicesSize = excludedServices.size();
        for (int i = 0; i < servicesSize; i++)
        {
            if (i == 0)
                hql.append(" and (");

            ServiceCategory serviceCategory = excludedServices.get(i);
            String serviceType = "serviceType" + Integer.toString(i);
            paramNames.add(serviceType);
            paramValues.add(new Integer(serviceCategory.getID()));

            hql.append("s.serviceCategory.id <> :" + serviceType);

            if (i == (servicesSize - 1))
                hql.append(")");
            else
                hql.append(" and ");
        }
    }
    hql.append(" order by UPPER(s.serviceName) asc  ");
    java.util.List services = factory.find(hql.toString(), paramNames, paramValues);

    return ServiceVoAssembler.createServiceVoCollectionFromService(services);
}
项目:openMAXIMS    文件:Logic.java   
private void loadServiceCombo()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);

    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.lyrSupportServices().tabPageServices().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.lyrSupportServices().tabPageServices().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());
}
项目:openMAXIMS    文件:SupportServicesImpl.java   
public ServiceVoCollection listService( ServiceCategoryCollection excludedServices) 
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Service s where s.isActive = :active");
    ArrayList paramNames = new ArrayList();
    ArrayList paramValues = new ArrayList();

    paramNames.add("active");
    paramValues.add(Boolean.TRUE);

    if (excludedServices != null)
    {
        int servicesSize = excludedServices.size();
        for (int i = 0; i < servicesSize; i++)
        {
            if (i == 0)
                hql.append(" and (");

            ServiceCategory serviceCategory = excludedServices.get(i);
            String serviceType = "serviceType" + Integer.toString(i);
            paramNames.add(serviceType);
            paramValues.add(new Integer(serviceCategory.getID()));

            hql.append("s.serviceCategory.id <> :" + serviceType);

            if (i == (servicesSize - 1))
                hql.append(")");
            else
                hql.append(" and ");
        }
    }
    //WDEV-18210
    hql.append(" order by UPPER(s.serviceName) asc");

    java.util.List services = factory.find(hql.toString(), paramNames, paramValues);

    return ServiceVoAssembler.createServiceVoCollectionFromService(services);
}
项目:openMAXIMS    文件:Logic.java   
protected void onQmbServiceTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbService().clear();

    ServiceCategoryCollection categories = new ServiceCategoryCollection();
    categories.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    categories.add(ServiceCategory.RADIOLOGY_MODALITY);

    //WDEV-2798 - search should filter the Services having the Categories as "Pathology Discipline" and Radiology "Modality"
    ServiceLiteVoCollection voCollService = domain.listActiveServiceLiteByNameAndCategories(value, categories);
    if (voCollService != null && voCollService.size() > 0)
    {
        for (int i = 0; i < voCollService.size(); i++)
        {
            form.qmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName().toString());
        }
        if (voCollService.size() == 1)
        {
            form.qmbService().setValue(voCollService.get(0));
            open();
        }
        else if (voCollService.size() > 1)
            form.qmbService().showOpened();
    }
    else
    {
        engine.showMessage("No matching records found");
        clearInstanceControls();
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void loadServiceCombo()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);
    // WDEV-1913
    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.lyrProServices().tabServices().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.lyrProServices().tabServices().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());

}
项目:openmaxims-linux    文件:SupportNetworkProfessionalServicesImpl.java   
public ServiceVoCollection listService(ServiceCategoryCollection excludedServices)
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Service s where s.isActive = :active");
    ArrayList paramNames = new ArrayList();
    ArrayList paramValues = new ArrayList();

    paramNames.add("active");
    paramValues.add(Boolean.TRUE);

    if (excludedServices != null)
    {
        int servicesSize = excludedServices.size();
        for (int i = 0; i < servicesSize; i++)
        {
            if (i == 0)
                hql.append(" and (");

            ServiceCategory serviceCategory = excludedServices.get(i);
            String serviceType = "serviceType" + Integer.toString(i);
            paramNames.add(serviceType);
            paramValues.add(new Integer(serviceCategory.getID()));

            hql.append("s.serviceCategory.id <> :" + serviceType);

            if (i == (servicesSize - 1))
                hql.append(")");
            else
                hql.append(" and ");
        }
    }
    hql.append(" order by UPPER(s.serviceName) asc  ");
    java.util.List services = factory.find(hql.toString(), paramNames, paramValues);

    return ServiceVoAssembler.createServiceVoCollectionFromService(services);
}
项目:openmaxims-linux    文件:Logic.java   
private void loadServiceCombo()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);

    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.lyrSupportServices().tabPageServices().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.lyrSupportServices().tabPageServices().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());
}
项目:openmaxims-linux    文件:SupportServicesImpl.java   
public ServiceVoCollection listService( ServiceCategoryCollection excludedServices) 
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Service s where s.isActive = :active");
    ArrayList paramNames = new ArrayList();
    ArrayList paramValues = new ArrayList();

    paramNames.add("active");
    paramValues.add(Boolean.TRUE);

    if (excludedServices != null)
    {
        int servicesSize = excludedServices.size();
        for (int i = 0; i < servicesSize; i++)
        {
            if (i == 0)
                hql.append(" and (");

            ServiceCategory serviceCategory = excludedServices.get(i);
            String serviceType = "serviceType" + Integer.toString(i);
            paramNames.add(serviceType);
            paramValues.add(new Integer(serviceCategory.getID()));

            hql.append("s.serviceCategory.id <> :" + serviceType);

            if (i == (servicesSize - 1))
                hql.append(")");
            else
                hql.append(" and ");
        }
    }
    //WDEV-18210
    hql.append(" order by UPPER(s.serviceName) asc");

    java.util.List services = factory.find(hql.toString(), paramNames, paramValues);

    return ServiceVoAssembler.createServiceVoCollectionFromService(services);
}
项目:openmaxims-linux    文件:Logic.java   
protected void onQmbServiceTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbService().clear();

    ServiceCategoryCollection categories = new ServiceCategoryCollection();
    categories.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    categories.add(ServiceCategory.RADIOLOGY_MODALITY);

    //WDEV-2798 - search should filter the Services having the Categories as "Pathology Discipline" and Radiology "Modality"
    ServiceLiteVoCollection voCollService = domain.listActiveServiceLiteByNameAndCategories(value, categories);
    if (voCollService != null && voCollService.size() > 0)
    {
        for (int i = 0; i < voCollService.size(); i++)
        {
            form.qmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName().toString());
        }
        if (voCollService.size() == 1)
        {
            form.qmbService().setValue(voCollService.get(0));
            open();
        }
        else if (voCollService.size() > 1)
            form.qmbService().showOpened();
    }
    else
    {
        engine.showMessage("No matching records found");
        clearInstanceControls();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void listSupportCommunityServices()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);
    //WDEV-1913 
    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.ctnServiceDetail().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.ctnServiceDetail().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());

    form.grdDetails().getRows().clear();

    CommunityServiceVoCollection voColl = domain.listCommunityServicesByCareContext(form.getGlobalContext().Core.getCurrentCareContext(),Boolean.TRUE);
    CommunityServiceVo vo = null;   

    GenForm.grdDetailsRow row = null;
    if(voColl == null || voColl.size() == 0)
    {
        SupportNetworkServicesVoCollection voCollSns = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),Boolean.TRUE);

        if (voCollSns != null && voCollSns.size()>0)
        {
            //ask user if they want to copy in existing support network services records.
            form.getGlobalContext().Core.setYesNoDialogMessage("Do you want to copy the Support Network Services ?");
            engine.open(form.getForms().Core.YesNoDialog);
            return;
        }
    }

    for(int i=0;i<voColl.size();i++)
    {
        vo = voColl.get(i);
        row = form.grdDetails().getRows().newRow();
        if (vo.getServiceIsNotNull())
            row.setComunityService(vo.getService().getServiceName());
        row.setCurrentFrequency(vo.getCurrentFrequency());
        row.setRequested(vo.getIsDischargeServiceIsNotNull()?vo.getIsDischargeService().booleanValue():false); 
        row.setDischargeFrequency(vo.getDischargeFrequency());
        row.setInPlace(vo.getIsServiceInPlaceIsNotNull()?vo.getIsServiceInPlace().booleanValue():false);
        row.setConfirmDate(vo.getConfirmedDate());
        row.setValue(vo);
    }

    //set selection back
    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        //need to get timestamp from record retrieved from List call.
        GenForm.grdDetailsRow row1 = form.grdDetails().getRowByValue(form.getLocalContext().getSelectedRecord());
        if (row1 != null && row1.getValue() != null)
        {           

            form.grdDetails().setValue(form.getLocalContext().getSelectedRecord());
            populateInstanceControl(form.grdDetails().getValue());
        }
        else
            clearInstanceControls();
        form.getLocalContext().setSelectedRecord(form.grdDetails().getValue());
        updateControlsState();          
    }
    else        
        form.ctnServiceDetail().setCollapsed(true);

}
项目:AvoinApotti    文件:ServiceQuestionsImpl.java   
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection)
{
    return ((Service)getDomainImpl(ServiceImpl.class)).listActiveServiceLiteByNameAndCategories(name, categoryCollection);
}
项目:openMAXIMS    文件:Logic.java   
private void listSupportCommunityServices()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);
    //WDEV-1913 
    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.ctnServiceDetail().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.ctnServiceDetail().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());

    form.grdDetails().getRows().clear();

    CommunityServiceVoCollection voColl = domain.listCommunityServicesByCareContext(form.getGlobalContext().Core.getCurrentCareContext(),Boolean.TRUE);
    CommunityServiceVo vo = null;   

    GenForm.grdDetailsRow row = null;
    if(voColl == null || voColl.size() == 0)
    {
        SupportNetworkServicesVoCollection voCollSns = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),Boolean.TRUE);

        if (voCollSns != null && voCollSns.size()>0)
        {
            //ask user if they want to copy in existing support network services records.
            form.getGlobalContext().Core.setYesNoDialogMessage("Do you want to copy the Support Network Services ?");
            engine.open(form.getForms().Core.YesNoDialog);
            return;
        }
    }

    for(int i=0;i<voColl.size();i++)
    {
        vo = voColl.get(i);
        row = form.grdDetails().getRows().newRow();
        if (vo.getServiceIsNotNull())
            row.setComunityService(vo.getService().getServiceName());
        row.setCurrentFrequency(vo.getCurrentFrequency());
        row.setRequested(vo.getIsDischargeServiceIsNotNull()?vo.getIsDischargeService().booleanValue():false); 
        row.setDischargeFrequency(vo.getDischargeFrequency());
        row.setInPlace(vo.getIsServiceInPlaceIsNotNull()?vo.getIsServiceInPlace().booleanValue():false);
        row.setConfirmDate(vo.getConfirmedDate());
        row.setValue(vo);
    }

    //set selection back
    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        //need to get timestamp from record retrieved from List call.
        GenForm.grdDetailsRow row1 = form.grdDetails().getRowByValue(form.getLocalContext().getSelectedRecord());
        if (row1 != null && row1.getValue() != null)
        {           

            form.grdDetails().setValue(form.getLocalContext().getSelectedRecord());
            populateInstanceControl(form.grdDetails().getValue());
        }
        else
            clearInstanceControls();
        form.getLocalContext().setSelectedRecord(form.grdDetails().getValue());
        updateControlsState();          
    }
    else        
        form.ctnServiceDetail().setCollapsed(true);

}
项目:openMAXIMS    文件:ServiceQuestionsImpl.java   
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection)
{
    return ((Service)getDomainImpl(ServiceImpl.class)).listActiveServiceLiteByNameAndCategories(name, categoryCollection);
}
项目:openMAXIMS    文件:Logic.java   
private void listSupportCommunityServices()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);
    //WDEV-1913 
    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.ctnServiceDetail().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.ctnServiceDetail().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());

    form.grdDetails().getRows().clear();

    CommunityServiceVoCollection voColl = domain.listCommunityServicesByCareContext(form.getGlobalContext().Core.getCurrentCareContext(),Boolean.TRUE);
    CommunityServiceVo vo = null;   

    GenForm.grdDetailsRow row = null;
    if(voColl == null || voColl.size() == 0)
    {
        SupportNetworkServicesVoCollection voCollSns = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),Boolean.TRUE);

        if (voCollSns != null && voCollSns.size()>0)
        {
            //ask user if they want to copy in existing support network services records.
            form.getGlobalContext().Core.setYesNoDialogMessage("Do you want to copy the Support Network Services ?");
            engine.open(form.getForms().Core.YesNoDialog);
            return;
        }
    }

    for(int i=0;i<voColl.size();i++)
    {
        vo = voColl.get(i);
        row = form.grdDetails().getRows().newRow();
        if (vo.getServiceIsNotNull())
            row.setComunityService(vo.getService().getServiceName());
        row.setCurrentFrequency(vo.getCurrentFrequency());
        row.setRequested(vo.getIsDischargeServiceIsNotNull()?vo.getIsDischargeService().booleanValue():false); 
        row.setDischargeFrequency(vo.getDischargeFrequency());
        row.setInPlace(vo.getIsServiceInPlaceIsNotNull()?vo.getIsServiceInPlace().booleanValue():false);
        row.setConfirmDate(vo.getConfirmedDate());
        row.setValue(vo);
    }

    //set selection back
    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        //need to get timestamp from record retrieved from List call.
        GenForm.grdDetailsRow row1 = form.grdDetails().getRowByValue(form.getLocalContext().getSelectedRecord());
        if (row1 != null && row1.getValue() != null)
        {           

            form.grdDetails().setValue(form.getLocalContext().getSelectedRecord());
            populateInstanceControl(form.grdDetails().getValue());
        }
        else
            clearInstanceControls();
        form.getLocalContext().setSelectedRecord(form.grdDetails().getValue());
        updateControlsState();          
    }
    else        
        form.ctnServiceDetail().setCollapsed(true);

}
项目:openMAXIMS    文件:ServiceQuestionsImpl.java   
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection)
{
    return ((Service)getDomainImpl(ServiceImpl.class)).listActiveServiceLiteByNameAndCategories(name, categoryCollection);
}
项目:openmaxims-linux    文件:Logic.java   
private void listSupportCommunityServices()
{
    ServiceCategoryCollection excludedColl = new ServiceCategoryCollection();
    excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE);
    excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY);
    //WDEV-1913 
    ServiceVoCollection voCollService = domain.listService(excludedColl);
    form.ctnServiceDetail().cmbService().clear();

    for (int i = 0; i < voCollService.size(); i++)
        form.ctnServiceDetail().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName());

    form.grdDetails().getRows().clear();

    CommunityServiceVoCollection voColl = domain.listCommunityServicesByCareContext(form.getGlobalContext().Core.getCurrentCareContext(),Boolean.TRUE);
    CommunityServiceVo vo = null;   

    GenForm.grdDetailsRow row = null;
    if(voColl == null || voColl.size() == 0)
    {
        SupportNetworkServicesVoCollection voCollSns = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),Boolean.TRUE);

        if (voCollSns != null && voCollSns.size()>0)
        {
            //ask user if they want to copy in existing support network services records.
            form.getGlobalContext().Core.setYesNoDialogMessage("Do you want to copy the Support Network Services ?");
            engine.open(form.getForms().Core.YesNoDialog);
            return;
        }
    }

    for(int i=0;i<voColl.size();i++)
    {
        vo = voColl.get(i);
        row = form.grdDetails().getRows().newRow();
        if (vo.getServiceIsNotNull())
            row.setComunityService(vo.getService().getServiceName());
        row.setCurrentFrequency(vo.getCurrentFrequency());
        row.setRequested(vo.getIsDischargeServiceIsNotNull()?vo.getIsDischargeService().booleanValue():false); 
        row.setDischargeFrequency(vo.getDischargeFrequency());
        row.setInPlace(vo.getIsServiceInPlaceIsNotNull()?vo.getIsServiceInPlace().booleanValue():false);
        row.setConfirmDate(vo.getConfirmedDate());
        row.setValue(vo);
    }

    //set selection back
    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        //need to get timestamp from record retrieved from List call.
        GenForm.grdDetailsRow row1 = form.grdDetails().getRowByValue(form.getLocalContext().getSelectedRecord());
        if (row1 != null && row1.getValue() != null)
        {           

            form.grdDetails().setValue(form.getLocalContext().getSelectedRecord());
            populateInstanceControl(form.grdDetails().getValue());
        }
        else
            clearInstanceControls();
        form.getLocalContext().setSelectedRecord(form.grdDetails().getValue());
        updateControlsState();          
    }
    else        
        form.ctnServiceDetail().setCollapsed(true);

}
项目:openmaxims-linux    文件:ServiceQuestionsImpl.java   
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection)
{
    return ((Service)getDomainImpl(ServiceImpl.class)).listActiveServiceLiteByNameAndCategories(name, categoryCollection);
}