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

项目:AvoinApotti    文件:Logic.java   
/**
 * 
 */
private void listClinics() 
{   
    ClinicVoCollection voCollClinics = domain.listClinics();        
    if (voCollClinics != null)
    {       
        form.grdClinic().getRows().clear();                     
        for (int i = 0; i < voCollClinics.size(); i++) 
        {
            GenForm.grdClinicRow clinicRow = form.grdClinic().getRows().newRow();               
            clinicRow.setcolClinic(voCollClinics.get(i).getClinicName());
            clinicRow.setValue(voCollClinics.get(i));
            clinicRow.setcolClinicImage(form.getImages().Admin.Location);               
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Retrieve the clinics from via the domain based on the search criteria and populate the tree with any results
 */
private void search()
{
    ClinicVoCollection clinics = domain.listClinicsByNameCodeLocation(form.cmbSearchLoc().getValue(), form.cmbSearchOutpatient().getValue(), form.txtSearchName().getValue(), form.txtSearchCode().getValue(), form.chkSearchAciveOnly().getValue());
    //wdev-12851
    clearrec();
    updateControlsState();
    //---------
    if (clinics == null || clinics.size() == 0)
    {

        engine.showMessage("No records were found that match your search criteria.", "No results", MessageButtons.OK, MessageIcon.INFORMATION);
    }
    populateClinicTree(clinics);

}
项目:AvoinApotti    文件:Logic.java   
/**
 * Populate the tree based on the ClinicVoCollection passed in as a paraemter
 * Clear the tree first of any details
 * @param ClinicVoCollection voClinicColl
 */
private void populateClinicTree(ClinicVoCollection voClinicColl)
{
    form.treClinics().clear();

    if (voClinicColl == null || voClinicColl.size() <= 0)
    {
        return;
    }

    createOrderedLocationNodes(voClinicColl); //WDEV-15426

    for (int i = 0; i < voClinicColl.size(); i++)
    {
        createClinicNode(voClinicColl.get(i));
    }

}
项目:openMAXIMS    文件:Logic.java   
/**
 * 
 */
private void listClinics() 
{   
    ClinicVoCollection voCollClinics = domain.listClinics();        
    if (voCollClinics != null)
    {       
        form.grdClinic().getRows().clear();                     
        for (int i = 0; i < voCollClinics.size(); i++) 
        {
            GenForm.grdClinicRow clinicRow = form.grdClinic().getRows().newRow();               
            clinicRow.setcolClinic(voCollClinics.get(i).getClinicName());
            clinicRow.setValue(voCollClinics.get(i));
            clinicRow.setcolClinicImage(form.getImages().Admin.Location);               
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Retrieve the clinics from via the domain based on the search criteria and populate the tree with any results
 */
private void search()
{
    ClinicVoCollection clinics = domain.listClinicsByNameCodeLocation(form.cmbSearchLoc().getValue(), form.cmbSearchOutpatient().getValue(), form.txtSearchName().getValue(), form.txtSearchCode().getValue(), form.chkSearchAciveOnly().getValue());
    //wdev-12851
    clearrec();
    updateControlsState();
    //---------
    if (clinics == null || clinics.size() == 0)
    {

        engine.showMessage("No records were found that match your search criteria.", "No results", MessageButtons.OK, MessageIcon.INFORMATION);
    }
    populateClinicTree(clinics);

}
项目:openMAXIMS    文件:Logic.java   
/**
 * Populate the tree based on the ClinicVoCollection passed in as a paraemter
 * Clear the tree first of any details
 * @param ClinicVoCollection voClinicColl
 */
private void populateClinicTree(ClinicVoCollection voClinicColl)
{
    form.treClinics().clear();

    if (voClinicColl == null || voClinicColl.size() <= 0)
    {
        return;
    }

    createOrderedLocationNodes(voClinicColl); //WDEV-15426

    for (int i = 0; i < voClinicColl.size(); i++)
    {
        createClinicNode(voClinicColl.get(i));
    }

}
项目:openMAXIMS    文件:Logic.java   
/**
 * 
 */
private void listClinics() 
{   
    ClinicVoCollection voCollClinics = domain.listClinics();        
    if (voCollClinics != null)
    {       
        form.grdClinic().getRows().clear();                     
        for (int i = 0; i < voCollClinics.size(); i++) 
        {
            GenForm.grdClinicRow clinicRow = form.grdClinic().getRows().newRow();               
            clinicRow.setcolClinic(voCollClinics.get(i).getClinicName());
            clinicRow.setValue(voCollClinics.get(i));
            clinicRow.setcolClinicImage(form.getImages().Admin.Location);               
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Retrieve the clinics from via the domain based on the search criteria and populate the tree with any results
 */
private void search()
{
    ClinicVoCollection clinics = domain.listClinicsByNameCodeLocation(form.cmbSearchLoc().getValue(), form.cmbSearchOutpatient().getValue(), form.txtSearchName().getValue(), form.txtSearchCode().getValue(), form.chkSearchAciveOnly().getValue());
    //wdev-12851
    clearrec();
    updateControlsState();
    //---------
    if (clinics == null || clinics.size() == 0)
    {

        engine.showMessage("No records were found that match your search criteria.", "No results", MessageButtons.OK, MessageIcon.INFORMATION);
    }
    populateClinicTree(clinics);

}
项目:openMAXIMS    文件:Logic.java   
/**
 * Populate the tree based on the ClinicVoCollection passed in as a paraemter
 * Clear the tree first of any details
 * @param ClinicVoCollection voClinicColl
 */
private void populateClinicTree(ClinicVoCollection voClinicColl)
{
    form.treClinics().clear();

    if (voClinicColl == null || voClinicColl.size() <= 0)
    {
        return;
    }

    createOrderedLocationNodes(voClinicColl); //WDEV-15426

    for (int i = 0; i < voClinicColl.size(); i++)
    {
        createClinicNode(voClinicColl.get(i));
    }

}
项目:openmaxims-linux    文件:Logic.java   
/**
 * 
 */
private void listClinics() 
{   
    ClinicVoCollection voCollClinics = domain.listClinics();        
    if (voCollClinics != null)
    {       
        form.grdClinic().getRows().clear();                     
        for (int i = 0; i < voCollClinics.size(); i++) 
        {
            GenForm.grdClinicRow clinicRow = form.grdClinic().getRows().newRow();               
            clinicRow.setcolClinic(voCollClinics.get(i).getClinicName());
            clinicRow.setValue(voCollClinics.get(i));
            clinicRow.setcolClinicImage(form.getImages().Admin.Location);               
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * Retrieve the clinics from via the domain based on the search criteria and populate the tree with any results
 */
private void search()
{
    ClinicVoCollection clinics = domain.listClinicsByNameCodeLocation(form.cmbSearchLoc().getValue(), form.cmbSearchOutpatient().getValue(), form.txtSearchName().getValue(), form.txtSearchCode().getValue(), form.chkSearchAciveOnly().getValue());
    //wdev-12851
    clearrec();
    updateControlsState();
    //---------
    if (clinics == null || clinics.size() == 0)
    {

        engine.showMessage("No records were found that match your search criteria.", "No results", MessageButtons.OK, MessageIcon.INFORMATION);
    }
    populateClinicTree(clinics);

}
项目:openmaxims-linux    文件:Logic.java   
/**
 * Populate the tree based on the ClinicVoCollection passed in as a paraemter
 * Clear the tree first of any details
 * @param ClinicVoCollection voClinicColl
 */
private void populateClinicTree(ClinicVoCollection voClinicColl)
{
    form.treClinics().clear();

    if (voClinicColl == null || voClinicColl.size() <= 0)
    {
        return;
    }

    createOrderedLocationNodes(voClinicColl); //WDEV-15426

    for (int i = 0; i < voClinicColl.size(); i++)
    {
        createClinicNode(voClinicColl.get(i));
    }

}
项目:AvoinApotti    文件:ChemotherapyDetailsImpl.java   
public String getCCOClinicName(String strClinicCode) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql2 = new StringBuffer();
    hql2.append("select clin from Clinic clin left join clin.codeMappings as tax left join tax.taxonomyName as taxTyp where taxTyp = :taxonomyType and tax.taxonomyCode = '" + strClinicCode + "'");
    ClinicVoCollection voClinics = ClinicVoAssembler.createClinicVoCollectionFromClinic(factory.find(hql2.toString(),new String[]{"taxonomyType"},new Object[]{getDomLookup(TaxonomyType.PAS)}));
    if (voClinics != null && voClinics.size() > 0)
        return voClinics.get(0).getClinicName();
    else
        return null;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * 
 */
private void listClinics() 
{
    ClinicVoCollection voCollClinics = domain.listClinics();
    GenForm.grdClinicRow row;
    for (int i=0; i < voCollClinics.size(); i++)
    {
        row = form.grdClinic().getRows().newRow();
        row.setcolClinic(voCollClinics.get(i).getClinicName());
        row.setTooltipForcolClinic(voCollClinics.get(i).getClinicName());
        row.setValue(voCollClinics.get(i));
        row.setcolClinicImage(form.getImages().Admin.Location);
    }       
}
项目:AvoinApotti    文件:Logic.java   
private void createOrderedLocationNodes(ClinicVoCollection voClinicColl)
{
    if (voClinicColl == null)
        return;

    LocationLiteVoCollection locations = new LocationLiteVoCollection();

    for (int i = 0; i < voClinicColl.size(); i++)
    {
        LocationLiteVo loc = voClinicColl.get(i).getClinicLocation();

        if (loc != null)
        {
            locations.add(loc);
        }
    }

    locations.sort(); //sort the locations collection

    for (int i = 0; i < locations.size(); i++)
    {
        TreeNode nodeLoc = form.treClinics().getNodeByValue(locations.get(i));

        // If location does not exist add it
        if (nodeLoc == null)
        {
            nodeLoc = form.treClinics().getNodes().add(locations.get(i), locations.get(i).getName());
            nodeLoc.setCollapsedImage(form.getImages().Core.Home);
            nodeLoc.setExpandedImage(form.getImages().Core.Home);
            nodeLoc.setExpanded(true);
        }
    }
}
项目:openMAXIMS    文件:ChemotherapyDetailsImpl.java   
public String getCCOClinicName(String strClinicCode) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql2 = new StringBuffer();
    hql2.append("select clin from Clinic clin left join clin.codeMappings as tax left join tax.taxonomyName as taxTyp where taxTyp = :taxonomyType and tax.taxonomyCode = '" + strClinicCode + "'");
    ClinicVoCollection voClinics = ClinicVoAssembler.createClinicVoCollectionFromClinic(factory.find(hql2.toString(),new String[]{"taxonomyType"},new Object[]{getDomLookup(TaxonomyType.PAS)}));
    if (voClinics != null && voClinics.size() > 0)
        return voClinics.get(0).getClinicName();
    else
        return null;
}
项目:openMAXIMS    文件:Logic.java   
/**
 * 
 */
private void listClinics() 
{
    ClinicVoCollection voCollClinics = domain.listClinics();
    GenForm.grdClinicRow row;
    for (int i=0; i < voCollClinics.size(); i++)
    {
        row = form.grdClinic().getRows().newRow();
        row.setcolClinic(voCollClinics.get(i).getClinicName());
        row.setTooltipForcolClinic(voCollClinics.get(i).getClinicName());
        row.setValue(voCollClinics.get(i));
        row.setcolClinicImage(form.getImages().Admin.Location);
    }       
}
项目:openMAXIMS    文件:Logic.java   
private void createOrderedLocationNodes(ClinicVoCollection voClinicColl)
{
    if (voClinicColl == null)
        return;

    LocationLiteVoCollection locations = new LocationLiteVoCollection();

    for (int i = 0; i < voClinicColl.size(); i++)
    {
        LocationLiteVo loc = voClinicColl.get(i).getClinicLocation();

        if (loc != null)
        {
            locations.add(loc);
        }
    }

    locations.sort(); //sort the locations collection

    for (int i = 0; i < locations.size(); i++)
    {
        TreeNode nodeLoc = form.treClinics().getNodeByValue(locations.get(i));

        // If location does not exist add it
        if (nodeLoc == null)
        {
            nodeLoc = form.treClinics().getNodes().add(locations.get(i), locations.get(i).getName());
            nodeLoc.setCollapsedImage(form.getImages().Core.Home);
            nodeLoc.setExpandedImage(form.getImages().Core.Home);
            nodeLoc.setExpanded(true);
        }
    }
}
项目:openMAXIMS    文件:ChemotherapyDetailsImpl.java   
public String getCCOClinicName(String strClinicCode) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql2 = new StringBuffer();
    hql2.append("select clin from Clinic clin left join clin.codeMappings as tax left join tax.taxonomyName as taxTyp where taxTyp = :taxonomyType and tax.taxonomyCode = '" + strClinicCode + "'");
    ClinicVoCollection voClinics = ClinicVoAssembler.createClinicVoCollectionFromClinic(factory.find(hql2.toString(),new String[]{"taxonomyType"},new Object[]{getDomLookup(TaxonomyType.PAS)}));
    if (voClinics != null && voClinics.size() > 0)
        return voClinics.get(0).getClinicName();
    else
        return null;
}
项目:openMAXIMS    文件:Logic.java   
/**
 * 
 */
private void listClinics() 
{
    ClinicVoCollection voCollClinics = domain.listClinics();
    GenForm.grdClinicRow row;
    for (int i=0; i < voCollClinics.size(); i++)
    {
        row = form.grdClinic().getRows().newRow();
        row.setcolClinic(voCollClinics.get(i).getClinicName());
        row.setTooltipForcolClinic(voCollClinics.get(i).getClinicName());
        row.setValue(voCollClinics.get(i));
        row.setcolClinicImage(form.getImages().Admin.Location);
    }       
}
项目:openMAXIMS    文件:Logic.java   
private void createOrderedLocationNodes(ClinicVoCollection voClinicColl)
{
    if (voClinicColl == null)
        return;

    LocationLiteVoCollection locations = new LocationLiteVoCollection();

    for (int i = 0; i < voClinicColl.size(); i++)
    {
        LocationLiteVo loc = voClinicColl.get(i).getClinicLocation();

        if (loc != null)
        {
            locations.add(loc);
        }
    }

    locations.sort(); //sort the locations collection

    for (int i = 0; i < locations.size(); i++)
    {
        TreeNode nodeLoc = form.treClinics().getNodeByValue(locations.get(i));

        // If location does not exist add it
        if (nodeLoc == null)
        {
            nodeLoc = form.treClinics().getNodes().add(locations.get(i), locations.get(i).getName());
            nodeLoc.setCollapsedImage(form.getImages().Core.Home);
            nodeLoc.setExpandedImage(form.getImages().Core.Home);
            nodeLoc.setExpanded(true);
        }
    }
}
项目:openmaxims-linux    文件:ChemotherapyDetailsImpl.java   
public String getCCOClinicName(String strClinicCode) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql2 = new StringBuffer();
    hql2.append("select clin from Clinic clin left join clin.codeMappings as tax left join tax.taxonomyName as taxTyp where taxTyp = :taxonomyType and tax.taxonomyCode = '" + strClinicCode + "'");
    ClinicVoCollection voClinics = ClinicVoAssembler.createClinicVoCollectionFromClinic(factory.find(hql2.toString(),new String[]{"taxonomyType"},new Object[]{getDomLookup(TaxonomyType.PAS)}));
    if (voClinics != null && voClinics.size() > 0)
        return voClinics.get(0).getClinicName();
    else
        return null;
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * 
 */
private void listClinics() 
{
    ClinicVoCollection voCollClinics = domain.listClinics();
    GenForm.grdClinicRow row;
    for (int i=0; i < voCollClinics.size(); i++)
    {
        row = form.grdClinic().getRows().newRow();
        row.setcolClinic(voCollClinics.get(i).getClinicName());
        row.setTooltipForcolClinic(voCollClinics.get(i).getClinicName());
        row.setValue(voCollClinics.get(i));
        row.setcolClinicImage(form.getImages().Admin.Location);
    }       
}
项目:openmaxims-linux    文件:Logic.java   
private void createOrderedLocationNodes(ClinicVoCollection voClinicColl)
{
    if (voClinicColl == null)
        return;

    LocationLiteVoCollection locations = new LocationLiteVoCollection();

    for (int i = 0; i < voClinicColl.size(); i++)
    {
        LocationLiteVo loc = voClinicColl.get(i).getClinicLocation();

        if (loc != null)
        {
            locations.add(loc);
        }
    }

    locations.sort(); //sort the locations collection

    for (int i = 0; i < locations.size(); i++)
    {
        TreeNode nodeLoc = form.treClinics().getNodeByValue(locations.get(i));

        // If location does not exist add it
        if (nodeLoc == null)
        {
            nodeLoc = form.treClinics().getNodes().add(locations.get(i), locations.get(i).getName());
            nodeLoc.setCollapsedImage(form.getImages().Core.Home);
            nodeLoc.setExpandedImage(form.getImages().Core.Home);
            nodeLoc.setExpanded(true);
        }
    }
}
项目:AvoinApotti    文件:UserProfileImpl.java   
public ClinicVoCollection listClinics() 
{
    DomainFactory factory = getDomainFactory();
    return ClinicVoAssembler.createClinicVoCollectionFromClinic(factory.listDomainObjects(Clinic.class));
}
项目:AvoinApotti    文件:NoLetterRequiredAdminImpl.java   
public ClinicVoCollection listClinics()
{
    DomainFactory factory = getDomainFactory();
    return ClinicVoAssembler.createClinicVoCollectionFromClinic(factory.listDomainObjects(Clinic.class));
}
项目:AvoinApotti    文件:ClinicAdminImpl.java   
public ClinicVoCollection listClinicsByNameCodeLocation(LocationRefVo voLocRef, LocationRefVo outpatientDepartment, String strClinicName, String strClinicCode, Boolean bActiveOnly)
{
    if(voLocRef == null && strClinicName == null && strClinicCode == null)
        throw new CodingRuntimeException("No parameters set for listClinicsByNameCodeLocation method");

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String prepend = " where ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin left join clin.codeMappings as codeMappings ");
    if (voLocRef != null)
    {
        hql.append(prepend + " clin.clinicLocation.id = :idLocation ");
        names.add("idLocation");
        values.add(voLocRef.getID_Location());
        prepend = " and ";
    }

    //WDEV-11914 - start here
    if (outpatientDepartment != null && outpatientDepartment.getID_LocationIsNotNull())
    {
        hql.append(prepend + " clin.outpatientDept.id = :idOutpatientDept ");
        names.add("idOutpatientDept");
        values.add(outpatientDepartment.getID_Location());
        prepend = " and ";
    }
    //WDEV-11914 - ends here

    //upperName max 20
    if(strClinicName != null && strClinicName.length()>19)
        strClinicName = strClinicName.substring(0,20);

    if (strClinicName != null && strClinicName.length() > 0)
    {
        hql.append(prepend +  " clin.upperName like :ClinicName");
        names.add("ClinicName");
        values.add(strClinicName.toUpperCase() + "%");
        prepend = " and ";
    }
    if (strClinicCode != null && strClinicCode.length() > 0)
    {
        hql.append(prepend +  " codeMappings.taxonomyCode like :taxonomyCode");
        names.add("taxonomyCode");
        values.add(strClinicCode + "%");
        prepend = " and ";
    }
    if (bActiveOnly != null && bActiveOnly)
    {
        hql.append(prepend + " clin.isActive like :Active");
        names.add("Active");
        values.add(Boolean.TRUE);
    }

    hql.append(" order by clin.upperName asc"); //WDEV-15426

    List clinics = factory.find(hql.toString(), names, values, 1000);
    return ClinicVoAssembler.createClinicVoCollectionFromClinic(clinics);
}
项目:openMAXIMS    文件:UserProfileImpl.java   
public ClinicVoCollection listClinics() 
{
    DomainFactory factory = getDomainFactory();
    return ClinicVoAssembler.createClinicVoCollectionFromClinic(factory.listDomainObjects(Clinic.class));
}
项目:openMAXIMS    文件:NoLetterRequiredAdminImpl.java   
public ClinicVoCollection listClinics()
{
    DomainFactory factory = getDomainFactory();
    return ClinicVoAssembler.createClinicVoCollectionFromClinic(factory.listDomainObjects(Clinic.class));
}
项目:openMAXIMS    文件:ClinicAdminImpl.java   
public ClinicVoCollection listClinicsByNameCodeLocation(LocationRefVo voLocRef, LocationRefVo outpatientDepartment, String strClinicName, String strClinicCode, Boolean bActiveOnly)
{
    if(voLocRef == null && strClinicName == null && strClinicCode == null)
        throw new CodingRuntimeException("No parameters set for listClinicsByNameCodeLocation method");

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String prepend = " where ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin left join clin.codeMappings as codeMappings ");
    if (voLocRef != null)
    {
        hql.append(prepend + " clin.clinicLocation.id = :idLocation ");
        names.add("idLocation");
        values.add(voLocRef.getID_Location());
        prepend = " and ";
    }

    //WDEV-11914 - start here
    if (outpatientDepartment != null && outpatientDepartment.getID_LocationIsNotNull())
    {
        hql.append(prepend + " clin.outpatientDept.id = :idOutpatientDept ");
        names.add("idOutpatientDept");
        values.add(outpatientDepartment.getID_Location());
        prepend = " and ";
    }
    //WDEV-11914 - ends here

    //upperName max 20
    if(strClinicName != null && strClinicName.length()>19)
        strClinicName = strClinicName.substring(0,20);

    if (strClinicName != null && strClinicName.length() > 0)
    {
        hql.append(prepend +  " clin.upperName like :ClinicName");
        names.add("ClinicName");
        values.add(strClinicName.toUpperCase() + "%");
        prepend = " and ";
    }
    if (strClinicCode != null && strClinicCode.length() > 0)
    {
        hql.append(prepend +  " codeMappings.taxonomyCode like :taxonomyCode");
        names.add("taxonomyCode");
        values.add(strClinicCode + "%");
        prepend = " and ";
    }
    if (bActiveOnly != null && bActiveOnly)
    {
        hql.append(prepend + " clin.isActive like :Active");
        names.add("Active");
        values.add(Boolean.TRUE);
    }

    hql.append(" order by clin.upperName asc"); //WDEV-15426

    List clinics = factory.find(hql.toString(), names, values, 1000);
    return ClinicVoAssembler.createClinicVoCollectionFromClinic(clinics);
}
项目:openMAXIMS    文件:UserProfileImpl.java   
public ClinicVoCollection listClinics() 
{
    DomainFactory factory = getDomainFactory();
    return ClinicVoAssembler.createClinicVoCollectionFromClinic(factory.listDomainObjects(Clinic.class));
}
项目:openMAXIMS    文件:NoLetterRequiredAdminImpl.java   
public ClinicVoCollection listClinics()
{
    DomainFactory factory = getDomainFactory();
    return ClinicVoAssembler.createClinicVoCollectionFromClinic(factory.listDomainObjects(Clinic.class));
}
项目:openMAXIMS    文件:ClinicAdminImpl.java   
public ClinicVoCollection listClinicsByNameCodeLocation(LocationRefVo voLocRef, LocationRefVo outpatientDepartment, String strClinicName, String strClinicCode, Boolean bActiveOnly)
{
    if(voLocRef == null && strClinicName == null && strClinicCode == null)
        throw new CodingRuntimeException("No parameters set for listClinicsByNameCodeLocation method");

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String prepend = " where ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin left join clin.codeMappings as codeMappings ");
    if (voLocRef != null)
    {
        hql.append(prepend + " clin.clinicLocation.id = :idLocation ");
        names.add("idLocation");
        values.add(voLocRef.getID_Location());
        prepend = " and ";
    }

    //WDEV-11914 - start here
    if (outpatientDepartment != null && outpatientDepartment.getID_LocationIsNotNull())
    {
        hql.append(prepend + " clin.outpatientDept.id = :idOutpatientDept ");
        names.add("idOutpatientDept");
        values.add(outpatientDepartment.getID_Location());
        prepend = " and ";
    }
    //WDEV-11914 - ends here

    //upperName max 20
    if(strClinicName != null && strClinicName.length()>19)
        strClinicName = strClinicName.substring(0,20);

    if (strClinicName != null && strClinicName.length() > 0)
    {
        hql.append(prepend +  " clin.upperName like :ClinicName");
        names.add("ClinicName");
        values.add(strClinicName.toUpperCase() + "%");
        prepend = " and ";
    }
    if (strClinicCode != null && strClinicCode.length() > 0)
    {
        hql.append(prepend +  " codeMappings.taxonomyCode like :taxonomyCode");
        names.add("taxonomyCode");
        values.add(strClinicCode + "%");
        prepend = " and ";
    }
    if (bActiveOnly != null && bActiveOnly)
    {
        hql.append(prepend + " clin.isActive like :Active");
        names.add("Active");
        values.add(Boolean.TRUE);
    }

    hql.append(" order by clin.upperName asc"); //WDEV-15426

    List clinics = factory.find(hql.toString(), names, values, 1000);
    return ClinicVoAssembler.createClinicVoCollectionFromClinic(clinics);
}
项目:openmaxims-linux    文件:UserProfileImpl.java   
public ClinicVoCollection listClinics() 
{
    DomainFactory factory = getDomainFactory();
    return ClinicVoAssembler.createClinicVoCollectionFromClinic(factory.listDomainObjects(Clinic.class));
}
项目:openmaxims-linux    文件:NoLetterRequiredAdminImpl.java   
public ClinicVoCollection listClinics()
{
    DomainFactory factory = getDomainFactory();
    return ClinicVoAssembler.createClinicVoCollectionFromClinic(factory.listDomainObjects(Clinic.class));
}
项目:openmaxims-linux    文件:ClinicAdminImpl.java   
public ClinicVoCollection listClinicsByNameCodeLocation(LocationRefVo voLocRef, LocationRefVo outpatientDepartment, String strClinicName, String strClinicCode, Boolean bActiveOnly)
{
    if(voLocRef == null && strClinicName == null && strClinicCode == null)
        throw new CodingRuntimeException("No parameters set for listClinicsByNameCodeLocation method");

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String prepend = " where ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin left join clin.codeMappings as codeMappings ");
    if (voLocRef != null)
    {
        hql.append(prepend + " clin.clinicLocation.id = :idLocation ");
        names.add("idLocation");
        values.add(voLocRef.getID_Location());
        prepend = " and ";
    }

    //WDEV-11914 - start here
    if (outpatientDepartment != null && outpatientDepartment.getID_LocationIsNotNull())
    {
        hql.append(prepend + " clin.outpatientDept.id = :idOutpatientDept ");
        names.add("idOutpatientDept");
        values.add(outpatientDepartment.getID_Location());
        prepend = " and ";
    }
    //WDEV-11914 - ends here

    //upperName max 20
    if(strClinicName != null && strClinicName.length()>19)
        strClinicName = strClinicName.substring(0,20);

    if (strClinicName != null && strClinicName.length() > 0)
    {
        hql.append(prepend +  " clin.upperName like :ClinicName");
        names.add("ClinicName");
        values.add(strClinicName.toUpperCase() + "%");
        prepend = " and ";
    }
    if (strClinicCode != null && strClinicCode.length() > 0)
    {
        hql.append(prepend +  " codeMappings.taxonomyCode like :taxonomyCode");
        names.add("taxonomyCode");
        values.add(strClinicCode + "%");
        prepend = " and ";
    }
    if (bActiveOnly != null && bActiveOnly)
    {
        hql.append(prepend + " clin.isActive like :Active");
        names.add("Active");
        values.add(Boolean.TRUE);
    }

    hql.append(" order by clin.upperName asc"); //WDEV-15426

    List clinics = factory.find(hql.toString(), names, values, 1000);
    return ClinicVoAssembler.createClinicVoCollectionFromClinic(clinics);
}