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

项目:AvoinApotti    文件:Logic.java   
private DynamicGridRow addCategoryToGrid(DynamicGridRow parent, ProcedureCategory category)
{
    if (parent == null)
        throw new RuntimeException("Logic error - non null parameters expected");
    DynamicGridColumn mainCol = form.dyngrdMain().getColumns().getByIdentifier(MAIN_COLUMN);
    DynamicGridRow newRow = parent.getRows().newRow();
    newRow.setExpandedImage(form.getImages().Admin.CategoryEnabled16);
    newRow.setCollapsedImage(form.getImages().Admin.CategoryEnabled16);
    DynamicGridCell newCell = newRow.getCells().newCell(mainCol, DynamicCellType.ENUMERATION);

    if(category!=null)
    {
    newCell.getItems().newItem(category);
    newCell.setValue(category);
    }
    newCell.setAutoPostBack(true);
    return newRow;
}
项目:openMAXIMS    文件:Logic.java   
private int remainingCategory(DynamicGridRow rowCons)
{
    if (rowCons == null || rowCons.getRows() == null)
        return 0;

    ProcedureCategoryCollection allProcCat = LookupHelper.getProcedureCategory(domain.getLookupService());

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

    for (int i=0 ; i<rowCons.getRows().size(); i++)
    {
        DynamicGridColumn mainCol = form.dyngrdMain().getColumns().getByIdentifier(MAIN_COLUMN);
        DynamicGridCell dynamicGridCell = rowCons.getRows().get(i).getCells().get(mainCol);

        if (dynamicGridCell.getValue() instanceof ProcedureCategory)
        {
            allProcCat.remove((ProcedureCategory) dynamicGridCell.getValue());
        }
    }

    return allProcCat.size();
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow addCategoryToGrid(DynamicGridRow parent, ProcedureCategory category)
{
    if (parent == null)
        throw new RuntimeException("Logic error - non null parameters expected");
    DynamicGridColumn mainCol = form.dyngrdMain().getColumns().getByIdentifier(MAIN_COLUMN);
    DynamicGridRow newRow = parent.getRows().newRow();
    newRow.setExpandedImage(form.getImages().Admin.CategoryEnabled16);
    newRow.setCollapsedImage(form.getImages().Admin.CategoryEnabled16);
    DynamicGridCell newCell = newRow.getCells().newCell(mainCol, DynamicCellType.ENUMERATION);

    if(category!=null)
    {
    newCell.getItems().newItem(category);
    newCell.setValue(category);
    }
    newCell.setAutoPostBack(true);
    return newRow;
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow addCategoryToGrid(DynamicGridRow parent, ProcedureCategory category)
{
    if (parent == null)
        throw new RuntimeException("Logic error - non null parameters expected");
    DynamicGridColumn mainCol = form.dyngrdMain().getColumns().getByIdentifier(MAIN_COLUMN);
    DynamicGridRow newRow = parent.getRows().newRow();
    newRow.setExpandedImage(form.getImages().Admin.CategoryEnabled16);
    newRow.setCollapsedImage(form.getImages().Admin.CategoryEnabled16);
    DynamicGridCell newCell = newRow.getCells().newCell(mainCol, DynamicCellType.ENUMERATION);

    if(category!=null)
    {
    newCell.getItems().newItem(category);
    newCell.setValue(category);
    }
    newCell.setAutoPostBack(true);
    return newRow;
}
项目:openmaxims-linux    文件:Logic.java   
private DynamicGridRow addCategoryToGrid(DynamicGridRow parent, ProcedureCategory category)
{
    if (parent == null)
        throw new RuntimeException("Logic error - non null parameters expected");
    DynamicGridColumn mainCol = form.dyngrdMain().getColumns().getByIdentifier(MAIN_COLUMN);
    DynamicGridRow newRow = parent.getRows().newRow();
    newRow.setExpandedImage(form.getImages().Admin.CategoryEnabled16);
    newRow.setCollapsedImage(form.getImages().Admin.CategoryEnabled16);
    DynamicGridCell newCell = newRow.getCells().newCell(mainCol, DynamicCellType.ENUMERATION);

    if(category!=null)
    {
    newCell.getItems().newItem(category);
    newCell.setValue(category);
    }
    newCell.setAutoPostBack(true);
    return newRow;
}
项目:AvoinApotti    文件:ConsultantProcedureHotlistDialogImpl.java   
public ims.core.vo.ProcedureLiteVoCollection listProcedures(ProcedureCategory category, String procNameFilter, ims.core.vo.HcpLiteVo currUser)
{

    StringBuilder query = new StringBuilder(
            "select p1_1 from ConsultantProcedureCategory as c1_1 left join " +
            "c1_1.categoryProcedures as c2_1 left join c2_1.procedures as p1_1 " +
            "where (p1_1.isActive = 1 and c1_1.performingHCP.id = :Hcp_id");


    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();
    paramNames.add("Hcp_id");
    paramValues.add(currUser.getID_Hcp());

    if (category != null)
    {
        query.append(" and c2_1.category.id = :Category_id");
        paramNames.add("Category_id");
        paramValues.add(category.getID());

    }
    if (procNameFilter != null)
    {
        query.append(" and upper(p1_1.procedureName) like :nameFilter");   //wdev-13658
        paramNames.add("nameFilter");
        paramValues.add("%"+procNameFilter.toUpperCase()+"%");             //wdev-13658

    }
    query.append(" ) order by p1_1.procedureName asc ");


    List<?> procs = getDomainFactory().find(query.toString(),paramNames,paramValues);

    if (procs == null || procs.size() == 0)
        return null;
    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procs);
}
项目:openMAXIMS    文件:ConsultantProcedureHotlistDialogImpl.java   
public ims.core.vo.ProcedureLiteVoCollection listProcedures(ProcedureCategory category, String procNameFilter, ims.core.vo.HcpLiteVo currUser)
{

    StringBuilder query = new StringBuilder(
            "select p1_1 from ConsultantProcedureCategory as c1_1 left join " +
            "c1_1.categoryProcedures as c2_1 left join c2_1.procedures as p1_1 " +
            "where (p1_1.isActive = 1 and c1_1.performingHCP.id = :Hcp_id");


    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();
    paramNames.add("Hcp_id");
    paramValues.add(currUser.getID_Hcp());

    if (category != null)
    {
        query.append(" and c2_1.category.id = :Category_id");
        paramNames.add("Category_id");
        paramValues.add(category.getID());

    }
    if (procNameFilter != null)
    {
        query.append(" and upper(p1_1.procedureName) like :nameFilter");   //wdev-13658
        paramNames.add("nameFilter");
        paramValues.add("%"+procNameFilter.toUpperCase()+"%");             //wdev-13658

    }
    query.append(" ) order by p1_1.procedureName asc ");


    List<?> procs = getDomainFactory().find(query.toString(),paramNames,paramValues);

    if (procs == null || procs.size() == 0)
        return null;
    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procs);
}
项目:openMAXIMS    文件:ConsultantProcedureHotlistDialogImpl.java   
public ims.core.vo.ProcedureLiteVoCollection listProcedures(ProcedureCategory category, String procNameFilter, ims.core.vo.HcpLiteVo currUser)
{

    StringBuilder query = new StringBuilder(
            "select p1_1 from ConsultantProcedureCategory as c1_1 left join " +
            "c1_1.categoryProcedures as c2_1 left join c2_1.procedures as p1_1 " +
            "where (p1_1.isActive = 1 and c1_1.performingHCP.id = :Hcp_id");


    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();
    paramNames.add("Hcp_id");
    paramValues.add(currUser.getID_Hcp());

    if (category != null)
    {
        query.append(" and c2_1.category.id = :Category_id");
        paramNames.add("Category_id");
        paramValues.add(category.getID());

    }
    if (procNameFilter != null)
    {
        query.append(" and upper(p1_1.procedureName) like :nameFilter");   //wdev-13658
        paramNames.add("nameFilter");
        paramValues.add("%"+procNameFilter.toUpperCase()+"%");             //wdev-13658

    }
    query.append(" ) order by p1_1.procedureName asc ");


    List<?> procs = getDomainFactory().find(query.toString(),paramNames,paramValues);

    if (procs == null || procs.size() == 0)
        return null;
    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procs);
}
项目:openmaxims-linux    文件:ConsultantProcedureHotlistDialogImpl.java   
public ims.core.vo.ProcedureLiteVoCollection listProcedures(ProcedureCategory category, String procNameFilter, ims.core.vo.HcpLiteVo currUser)
{

    StringBuilder query = new StringBuilder(
            "select p1_1 from ConsultantProcedureCategory as c1_1 left join " +
            "c1_1.categoryProcedures as c2_1 left join c2_1.procedures as p1_1 " +
            "where (p1_1.isActive = 1 and c1_1.performingHCP.id = :Hcp_id");


    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();
    paramNames.add("Hcp_id");
    paramValues.add(currUser.getID_Hcp());

    if (category != null)
    {
        query.append(" and c2_1.category.id = :Category_id");
        paramNames.add("Category_id");
        paramValues.add(category.getID());

    }
    if (procNameFilter != null)
    {
        query.append(" and upper(p1_1.procedureName) like :nameFilter");   //wdev-13658
        paramNames.add("nameFilter");
        paramValues.add("%"+procNameFilter.toUpperCase()+"%");             //wdev-13658

    }
    query.append(" ) order by p1_1.procedureName asc ");


    List<?> procs = getDomainFactory().find(query.toString(),paramNames,paramValues);

    if (procs == null || procs.size() == 0)
        return null;
    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procs);
}