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

项目:AvoinApotti    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private ClinicLiteVoCollection listClinicsByName(String clinicName) throws CodingRuntimeException
{
    // Leave throws so that clinics are not cleared when an invalid search is made
    if (clinicName == null || clinicName.trim().length() < 3)
        throw new CodingRuntimeException("Clinic name search must be at least 3 characters long");


    // Build filtering VO
    ClinicLiteVo filterVo = new ClinicLiteVo();
    filterVo.setClinicName(clinicName);

    // Retrieve the clinics (list from domain)
    try
    {
        return domain.listClinics(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void populateQueryClinics(DynamicGridCell cell, String textTyped) 
{
    cell.getItems().clear();
    ClinicLiteVoCollection clinicsColl = domain.listClinics(textTyped);

    if(clinicsColl != null)
    {
        for(int i=0; i<clinicsColl.size(); i++)
        {
            if(clinicNotOnScreen(clinicsColl.get(i), cell.getRow().getParent()))
            {
                DynamicGridCellItem newComboItem = cell.getItems().newItem(clinicsColl.get(i));
            }
        }

        if(clinicsColl.size() > 0)
        {
            cell.showOpened();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private ClinicLiteVoCollection listClinicsByName(String clinicName) throws CodingRuntimeException
{
    // Leave throws so that clinics are not cleared when an invalid search is made
    if (clinicName == null || clinicName.trim().length() < 3)
        throw new CodingRuntimeException("Clinic name search must be at least 3 characters long");


    // Build filtering VO
    ClinicLiteVo filterVo = new ClinicLiteVo();
    filterVo.setClinicName(clinicName);

    // Retrieve the clinics (list from domain)
    try
    {
        return domain.listClinics(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }

}
项目:AvoinApotti    文件:Logic.java   
/**
 * 
 */
private void displayAllClinics()
{                           
    if (form.getLocalContext().getClinics() == null) return;        
    ClinicLiteVoCollection voCollClinics = form.getLocalContext().getClinics();

    TreeNode node = null;

    form.treAssociate().clear();                                        
    for(int i=0;i<voCollClinics.size();i++)
    {
        node = form.treAssociate().getNodes().add(voCollClinics.get(i), voCollClinics.get(i).getClinicName());
        node.setCheckBoxVisible(form.getMode().equals(FormMode.EDIT));
        node.setCollapsedImage(form.getImages().Admin.Location);
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbClinicTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    if(!(form.lyrLetterCreate().tabClinicList().cmbLocation().getValue() instanceof ILocation))
        return;

    ClinicLiteVoCollection clinics = domain.listClinicsforLocation(form.lyrLetterCreate().tabClinicList().cmbLocation().getValue().getID(), value);

    form.lyrLetterCreate().tabClinicList().qmbClinic().clear();

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

    for(int i=0; i<clinics.size(); i++)
    {
        ClinicLiteVo clinic = clinics.get(i);

        if(clinic == null)
            continue;

        form.lyrLetterCreate().tabClinicList().qmbClinic().newRow(clinic, clinic.getClinicName());
    }

    if(clinics.size() > 0)
        form.lyrLetterCreate().tabClinicList().qmbClinic().showOpened();
}
项目:AvoinApotti    文件:Logic.java   
private void loadClinicsbyLocation(ILocation iLocation, String strClinicName)
{
    form.qmbClinic().clear();

    if (iLocation != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(iLocation, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:AvoinApotti    文件:OutpatientListImpl.java   
public ClinicLiteVoCollection listClinicsforLocation(LocationRefVo voLocRef, String strClinicName)
{
    //WDEV-15039
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    String prepend = " where clin.isActive = 1 and ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin ");
    if (voLocRef != null)
    {
        hql.append(prepend + " clin.clinicLocation.id = :idLocation ");
        names.add("idLocation");
        values.add(voLocRef.getID_Location());
        prepend = " and ";
    }       
    if (strClinicName != null && strClinicName.length() > 0)
    {
        hql.append(prepend + " (upper(clin.clinicName) like :clinName) ");
        names.add("clinName");
        values.add("%" + strClinicName.toUpperCase() + "%");
    }
    List clinics = factory.find(hql.toString(), names, values, 1000);
    return ClinicLiteVoAssembler.createClinicLiteVoCollectionFromClinic(clinics).sort(true);

}
项目:AvoinApotti    文件:ClinicAdminImpl.java   
public ClinicLiteVoCollection listClinicsForLocationByClinicName(LocationRefVo refLocationVo, String strClinicName)
{
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String prepend = " where ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin ");
    if (refLocationVo != null)
    {
        hql.append(prepend + " clin.clinicLocation.id = :idLocation ");
        names.add("idLocation");
        values.add(refLocationVo.getID_Location());
        prepend = " and ";
    }       
    if (strClinicName != null && strClinicName.length() > 0)
    {
        hql.append(prepend + " (upper(clin.clinicName) like :clinName) ");
        names.add("clinName");
        values.add("%" + strClinicName.toUpperCase() + "%");
    }
    List clinics = factory.find(hql.toString(), names, values, 1000);
    return ClinicLiteVoAssembler.createClinicLiteVoCollectionFromClinic(clinics).sort(true);
}
项目:openMAXIMS    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private ClinicLiteVoCollection listClinicsByName(String clinicName) throws CodingRuntimeException
{
    // Leave throws so that clinics are not cleared when an invalid search is made
    if (clinicName == null || clinicName.trim().length() < 3)
        throw new CodingRuntimeException("Clinic name search must be at least 3 characters long");


    // Build filtering VO
    ClinicLiteVo filterVo = new ClinicLiteVo();
    filterVo.setClinicName(clinicName);

    // Retrieve the clinics (list from domain)
    try
    {
        return domain.listClinics(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateQueryClinics(DynamicGridCell cell, String textTyped) 
{
    cell.getItems().clear();
    ClinicLiteVoCollection clinicsColl = domain.listClinics(textTyped);

    if(clinicsColl != null)
    {
        for(int i=0; i<clinicsColl.size(); i++)
        {
            if(clinicNotOnScreen(clinicsColl.get(i), cell.getRow().getParent()))
            {
                DynamicGridCellItem newComboItem = cell.getItems().newItem(clinicsColl.get(i));
            }
        }

        if(clinicsColl.size() > 0)
        {
            cell.showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private ClinicLiteVoCollection listClinicsByName(String clinicName) throws CodingRuntimeException
{
    // Leave throws so that clinics are not cleared when an invalid search is made
    if (clinicName == null || clinicName.trim().length() < 3)
        throw new CodingRuntimeException("Clinic name search must be at least 3 characters long");


    // Build filtering VO
    ClinicLiteVo filterVo = new ClinicLiteVo();
    filterVo.setClinicName(clinicName);

    // Retrieve the clinics (list from domain)
    try
    {
        return domain.listClinics(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }

}
项目:openMAXIMS    文件:Logic.java   
/**
 * 
 */
private void displayAllClinics()
{                           
    if (form.getLocalContext().getClinics() == null) return;        
    ClinicLiteVoCollection voCollClinics = form.getLocalContext().getClinics();

    TreeNode node = null;

    form.treAssociate().clear();                                        
    for(int i=0;i<voCollClinics.size();i++)
    {
        node = form.treAssociate().getNodes().add(voCollClinics.get(i), voCollClinics.get(i).getClinicName());
        node.setCheckBoxVisible(form.getMode().equals(FormMode.EDIT));
        node.setCollapsedImage(form.getImages().Admin.Location);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    form.qmbClinic().clear();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                if (Boolean.TRUE.equals(voClinicLiteColl.get(i).getIsActive())) //WDEV-19978
                {
                 form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
                }
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbClinicTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    if(!(form.lyrLetterCreate().tabClinicList().cmbLocation().getValue() instanceof ILocation))
        return;

    ClinicLiteVoCollection clinics = domain.listClinicsforLocation(form.lyrLetterCreate().tabClinicList().cmbLocation().getValue().getID(), value);

    form.lyrLetterCreate().tabClinicList().qmbClinic().clear();

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

    for(int i=0; i<clinics.size(); i++)
    {
        ClinicLiteVo clinic = clinics.get(i);

        if(clinic == null)
            continue;

        form.lyrLetterCreate().tabClinicList().qmbClinic().newRow(clinic, clinic.getClinicName());
    }

    if(clinics.size() > 0)
        form.lyrLetterCreate().tabClinicList().qmbClinic().showOpened();
}
项目:openMAXIMS    文件:Logic.java   
private void loadClinicsbyLocation(ILocation iLocation, String strClinicName)
{
    form.qmbClinic().clear();

    if (iLocation != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(iLocation, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:openMAXIMS    文件:OutpatientListImpl.java   
public ClinicLiteVoCollection listClinicsforLocation(LocationRefVo voLocRef, String strClinicName)
{
    //WDEV-15039
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    String prepend = " where clin.isActive = 1 and ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin ");
    if (voLocRef != null)
    {
        hql.append(prepend + " clin.clinicLocation.id = :idLocation ");
        names.add("idLocation");
        values.add(voLocRef.getID_Location());
        prepend = " and ";
    }       
    if (strClinicName != null && strClinicName.length() > 0)
    {
        hql.append(prepend + " (upper(clin.clinicName) like :clinName) ");
        names.add("clinName");
        values.add("%" + strClinicName.toUpperCase() + "%");
    }
    List clinics = factory.find(hql.toString(), names, values, 1000);
    return ClinicLiteVoAssembler.createClinicLiteVoCollectionFromClinic(clinics).sort(true);

}
项目:openMAXIMS    文件:ClinicAdminImpl.java   
public ClinicLiteVoCollection listClinicsForLocationByClinicName(LocationRefVo refLocationVo, String strClinicName)
{
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String prepend = " where ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin ");
    if (refLocationVo != null)
    {
        hql.append(prepend + " clin.clinicLocation.id = :idLocation ");
        names.add("idLocation");
        values.add(refLocationVo.getID_Location());
        prepend = " and ";
    }       
    if (strClinicName != null && strClinicName.length() > 0)
    {
        hql.append(prepend + " (clin.upperName like :clinName) "); //WDEV-20219
        names.add("clinName");
        values.add("%" + strClinicName.toUpperCase() + "%");
    }
    List clinics = factory.find(hql.toString(), names, values, 1000);
    return ClinicLiteVoAssembler.createClinicLiteVoCollectionFromClinic(clinics).sort(true);
}
项目:openMAXIMS    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private ClinicLiteVoCollection listClinicsByName(String clinicName) throws CodingRuntimeException
{
    // Leave throws so that clinics are not cleared when an invalid search is made
    if (clinicName == null || clinicName.trim().length() < 3)
        throw new CodingRuntimeException("Clinic name search must be at least 3 characters long");


    // Build filtering VO
    ClinicLiteVo filterVo = new ClinicLiteVo();
    filterVo.setClinicName(clinicName);

    // Retrieve the clinics (list from domain)
    try
    {
        return domain.listClinics(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateQueryClinics(DynamicGridCell cell, String textTyped) 
{
    cell.getItems().clear();
    ClinicLiteVoCollection clinicsColl = domain.listClinics(textTyped);

    if(clinicsColl != null)
    {
        for(int i=0; i<clinicsColl.size(); i++)
        {
            if(clinicNotOnScreen(clinicsColl.get(i), cell.getRow().getParent()))
            {
                DynamicGridCellItem newComboItem = cell.getItems().newItem(clinicsColl.get(i));
            }
        }

        if(clinicsColl.size() > 0)
        {
            cell.showOpened();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private ClinicLiteVoCollection listClinicsByName(String clinicName) throws CodingRuntimeException
{
    // Leave throws so that clinics are not cleared when an invalid search is made
    if (clinicName == null || clinicName.trim().length() < 3)
        throw new CodingRuntimeException("Clinic name search must be at least 3 characters long");


    // Build filtering VO
    ClinicLiteVo filterVo = new ClinicLiteVo();
    filterVo.setClinicName(clinicName);

    // Retrieve the clinics (list from domain)
    try
    {
        return domain.listClinics(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }

}
项目:openMAXIMS    文件:Logic.java   
/**
 * 
 */
private void displayAllClinics()
{                           
    if (form.getLocalContext().getClinics() == null) return;        
    ClinicLiteVoCollection voCollClinics = form.getLocalContext().getClinics();

    TreeNode node = null;

    form.treAssociate().clear();                                        
    for(int i=0;i<voCollClinics.size();i++)
    {
        node = form.treAssociate().getNodes().add(voCollClinics.get(i), voCollClinics.get(i).getClinicName());
        node.setCheckBoxVisible(form.getMode().equals(FormMode.EDIT));
        node.setCollapsedImage(form.getImages().Admin.Location);
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbClinicTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    if(!(form.lyrLetterCreate().tabClinicList().cmbLocation().getValue() instanceof ILocation))
        return;

    ClinicLiteVoCollection clinics = domain.listClinicsforLocation(form.lyrLetterCreate().tabClinicList().cmbLocation().getValue().getID(), value);

    form.lyrLetterCreate().tabClinicList().qmbClinic().clear();

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

    for(int i=0; i<clinics.size(); i++)
    {
        ClinicLiteVo clinic = clinics.get(i);

        if(clinic == null)
            continue;

        form.lyrLetterCreate().tabClinicList().qmbClinic().newRow(clinic, clinic.getClinicName());
    }

    if(clinics.size() > 0)
        form.lyrLetterCreate().tabClinicList().qmbClinic().showOpened();
}
项目:openMAXIMS    文件:Logic.java   
private void loadClinicsbyLocation(ILocation iLocation, String strClinicName)
{
    form.qmbClinic().clear();

    if (iLocation != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(iLocation, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:openMAXIMS    文件:OutpatientListImpl.java   
public ClinicLiteVoCollection listClinicsforLocation(LocationRefVo voLocRef, String strClinicName)
{
    //WDEV-15039
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    String prepend = " where clin.isActive = 1 and ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin ");
    if (voLocRef != null)
    {
        hql.append(prepend + " clin.clinicLocation.id = :idLocation ");
        names.add("idLocation");
        values.add(voLocRef.getID_Location());
        prepend = " and ";
    }       
    if (strClinicName != null && strClinicName.length() > 0)
    {
        hql.append(prepend + " (upper(clin.clinicName) like :clinName) ");
        names.add("clinName");
        values.add("%" + strClinicName.toUpperCase() + "%");
    }
    List clinics = factory.find(hql.toString(), names, values, 1000);
    return ClinicLiteVoAssembler.createClinicLiteVoCollectionFromClinic(clinics).sort(true);

}
项目:openMAXIMS    文件:ClinicAdminImpl.java   
public ClinicLiteVoCollection listClinicsForLocationByClinicName(LocationRefVo refLocationVo, String strClinicName)
{
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String prepend = " where ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin ");
    if (refLocationVo != null)
    {
        hql.append(prepend + " clin.clinicLocation.id = :idLocation ");
        names.add("idLocation");
        values.add(refLocationVo.getID_Location());
        prepend = " and ";
    }       
    if (strClinicName != null && strClinicName.length() > 0)
    {
        hql.append(prepend + " (upper(clin.clinicName) like :clinName) ");
        names.add("clinName");
        values.add("%" + strClinicName.toUpperCase() + "%");
    }
    List clinics = factory.find(hql.toString(), names, values, 1000);
    return ClinicLiteVoAssembler.createClinicLiteVoCollectionFromClinic(clinics).sort(true);
}
项目:openmaxims-linux    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
private ClinicLiteVoCollection listClinicsByName(String clinicName) throws CodingRuntimeException
{
    // Leave throws so that clinics are not cleared when an invalid search is made
    if (clinicName == null || clinicName.trim().length() < 3)
        throw new CodingRuntimeException("Clinic name search must be at least 3 characters long");


    // Build filtering VO
    ClinicLiteVo filterVo = new ClinicLiteVo();
    filterVo.setClinicName(clinicName);

    // Retrieve the clinics (list from domain)
    try
    {
        return domain.listClinics(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void loadClinicsbyLocation(LocationLiteVo voLocLite, String strClinicName)
{
    clearClinicCombo();

    if (voLocLite != null)
    {
        ClinicLiteVoCollection voClinicLiteColl = domain.listClinicsforLocation(voLocLite, strClinicName);

        if (voClinicLiteColl != null)
        {
            for (int i = 0; i < voClinicLiteColl.size(); i++)
            {
                form.qmbClinic().newRow(voClinicLiteColl.get(i), voClinicLiteColl.get(i).getClinicName());
            }
            if (voClinicLiteColl.size() == 1)
                form.qmbClinic().setValue(voClinicLiteColl.get(0));
            else if (voClinicLiteColl.size() > 1)
                form.qmbClinic().showOpened();
        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void populateQueryClinics(DynamicGridCell cell, String textTyped) 
{
    cell.getItems().clear();
    ClinicLiteVoCollection clinicsColl = domain.listClinics(textTyped);

    if(clinicsColl != null)
    {
        for(int i=0; i<clinicsColl.size(); i++)
        {
            if(clinicNotOnScreen(clinicsColl.get(i), cell.getRow().getParent()))
            {
                DynamicGridCellItem newComboItem = cell.getItems().newItem(clinicsColl.get(i));
            }
        }

        if(clinicsColl.size() > 0)
        {
            cell.showOpened();
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private ClinicLiteVoCollection listClinicsByName(String clinicName) throws CodingRuntimeException
{
    // Leave throws so that clinics are not cleared when an invalid search is made
    if (clinicName == null || clinicName.trim().length() < 3)
        throw new CodingRuntimeException("Clinic name search must be at least 3 characters long");


    // Build filtering VO
    ClinicLiteVo filterVo = new ClinicLiteVo();
    filterVo.setClinicName(clinicName);

    // Retrieve the clinics (list from domain)
    try
    {
        return domain.listClinics(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }

}
项目:openmaxims-linux    文件:Logic.java   
/**
 * 
 */
private void displayAllClinics()
{                           
    if (form.getLocalContext().getClinics() == null) return;        
    ClinicLiteVoCollection voCollClinics = form.getLocalContext().getClinics();

    TreeNode node = null;

    form.treAssociate().clear();                                        
    for(int i=0;i<voCollClinics.size();i++)
    {
        node = form.treAssociate().getNodes().add(voCollClinics.get(i), voCollClinics.get(i).getClinicName());
        node.setCheckBoxVisible(form.getMode().equals(FormMode.EDIT));
        node.setCollapsedImage(form.getImages().Admin.Location);
    }
}