Java 类ims.ocrr.vo.lookups.LookupHelper 实例源码

项目:AvoinApotti    文件:Logic.java   
private void populatehardcodedrowsgrid()
{

    ims.framework.cn.data.TreeNode[] rootNodes = LookupHelper.getSpecimenCollectionType(domain.getLookupService()).getRootNodes();
    for (int i = 0; i < rootNodes.length; i++)
    {
        SpecimenCollectionType spectype = (SpecimenCollectionType) rootNodes[i];
        grdSiteCollectionTypeRow row = form.grdSiteCollectionType().getRows().newRow();
        row.setColumnType(spectype.getText());
        row.setColumnSelect(false);
        row.setValue(spectype);


    }

}
项目:AvoinApotti    文件:Logic.java   
private void prePopulateListTypeTree()
{
    SpecimenCollectionMethodCollection collMethods = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService());
    ims.framework.cn.data.TreeNode[] parentNodes = collMethods.getRootNodes();
    for(int i=0;i<parentNodes.length;i++)
    {
        ims.framework.cn.data.TreeNode parentNode = parentNodes[i];
        TreeNode ctrlNode = form.lyrSpecColConfig().tabSpecCollectionConfig().treTypes().getNodes().add(parentNode,  ((SpecimenCollectionMethod)parentNode).getText());
        for(int p=0;p<parentNode.getChildren().length;p++)
        {
            ims.framework.cn.data.TreeNode childNode = parentNode.getChildren()[p];
            ctrlNode.getNodes().add(childNode,  ((SpecimenCollectionMethod)childNode).getText());   
        }
        ctrlNode.setExpanded(true);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void open() {
    form.grdCategory().getRows().clear();

    CategoryCollection lkpCollCategory = LookupHelper.getCategory(domain.getLookupService());
    ImportResultsConfigVo  voImportResultsConfig = domain.getImportResultsConfig();

    form.getLocalContext().setImportResultsConfigVo(voImportResultsConfig);

    if(lkpCollCategory!=null)
        for (int i = 0 ; i < lkpCollCategory.size() ; i++)
        {
            grdCategoryRow row = form.grdCategory().getRows().newRow();

            row.setColCategory(lkpCollCategory.get(i).getText());

            row.setValue(lkpCollCategory.get(i));
        }

    if(voImportResultsConfig!=null)
        for (int i = 0 ; i < voImportResultsConfig.getCategories().size() ; i++)
        {
            selectCategory(voImportResultsConfig.getCategories().get(i));
        }

}
项目:AvoinApotti    文件:Logic.java   
private void prePopulateOtherControls()
{
    SpecimenCollectionMethodCollection collTypes = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService());
    for (int i = 0; i < collTypes.size(); i++)
    {
        if (collTypes.get(i).equals(SpecimenCollectionMethod.OTHER))
        {
            for (int p = 0; p < collTypes.get(i).getChildren().length; p++)
                form.lyrDetails().tabPathDetails().lyrPathology().tabOther().cmbRequestedTypeOther().newRow((SpecimenCollectionMethod) collTypes.get(i).getChildren()[p], ((SpecimenCollectionMethod) collTypes.get(i).getChildren()[p]).getText());

            break;
        }
    }

    form.lyrDetails().tabPathDetails().lyrPathology().tabOther().dteCollectOther().setValue(new Date());
    form.lyrDetails().tabPathDetails().lyrPathology().tabOther().cmbRequestedTypeOther().setValue(SpecimenCollectionMethod.WARDCOLLECTION);
    form.lyrDetails().tabPathDetails().lyrPathology().tabOther().btnApplyOther().setEnabled(true);
}
项目:AvoinApotti    文件:Logic.java   
private void populateControls(SpecimenCollectionMethod value)
{
    if(value != null)
    {
        if (value.equals(SpecimenCollectionMethod.OUTPATIENT))
        {
            OutPatientDurationCollection collDuration = LookupHelper.getOutPatientDuration(domain.getLookupService());
            if (form.cmbValues().getValues().size() == 0)
            {
                for (int i = 0; i < collDuration.size(); i++)
                {
                    form.cmbValues().newRow(collDuration.get(i), collDuration.get(i).toString());
                }
            }
        }
        else if (value.equals(SpecimenCollectionMethod.INPATIENT))//WDEV-16964
        {
            form.dteDate().setValue(new Date());
            dateChanged();
        }

    }
}
项目:openMAXIMS    文件:Logic.java   
private void populatehardcodedrowsgrid()
{

    ims.framework.cn.data.TreeNode[] rootNodes = LookupHelper.getSpecimenCollectionType(domain.getLookupService()).getRootNodes();
    for (int i = 0; i < rootNodes.length; i++)
    {
        SpecimenCollectionType spectype = (SpecimenCollectionType) rootNodes[i];
        grdSiteCollectionTypeRow row = form.grdSiteCollectionType().getRows().newRow();
        row.setColumnType(spectype.getText());
        row.setColumnSelect(false);
        row.setValue(spectype);


    }

}
项目:openMAXIMS    文件:Logic.java   
private void prePopulateListTypeTree()
{
    SpecimenCollectionMethodCollection collMethods = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService());
    ims.framework.cn.data.TreeNode[] parentNodes = collMethods.getRootNodes();
    for(int i=0;i<parentNodes.length;i++)
    {
        ims.framework.cn.data.TreeNode parentNode = parentNodes[i];
        TreeNode ctrlNode = form.lyrSpecColConfig().tabSpecCollectionConfig().treTypes().getNodes().add(parentNode,  ((SpecimenCollectionMethod)parentNode).getText());
        for(int p=0;p<parentNode.getChildren().length;p++)
        {
            ims.framework.cn.data.TreeNode childNode = parentNode.getChildren()[p];
            ctrlNode.getNodes().add(childNode,  ((SpecimenCollectionMethod)childNode).getText());   
        }
        ctrlNode.setExpanded(true);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void open() {
    form.grdCategory().getRows().clear();

    CategoryCollection lkpCollCategory = LookupHelper.getCategory(domain.getLookupService());
    ImportResultsConfigVo  voImportResultsConfig = domain.getImportResultsConfig();

    form.getLocalContext().setImportResultsConfigVo(voImportResultsConfig);

    if(lkpCollCategory!=null)
        for (int i = 0 ; i < lkpCollCategory.size() ; i++)
        {
            grdCategoryRow row = form.grdCategory().getRows().newRow();

            row.setColCategory(lkpCollCategory.get(i).getText());

            row.setValue(lkpCollCategory.get(i));
        }

    if(voImportResultsConfig!=null)
        for (int i = 0 ; i < voImportResultsConfig.getCategories().size() ; i++)
        {
            selectCategory(voImportResultsConfig.getCategories().get(i));
        }

}
项目:openMAXIMS    文件:Logic.java   
private void prePopulateOtherControls()
{
    SpecimenCollectionMethodCollection collTypes = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService());
    for (int i = 0; i < collTypes.size(); i++)
    {
        if (collTypes.get(i).equals(SpecimenCollectionMethod.OTHER))
        {
            for (int p = 0; p < collTypes.get(i).getChildren().length; p++)
                form.lyrDetails().tabPathDetails().lyrPathology().tabOther().cmbRequestedTypeOther().newRow((SpecimenCollectionMethod) collTypes.get(i).getChildren()[p], ((SpecimenCollectionMethod) collTypes.get(i).getChildren()[p]).getText());

            break;
        }
    }

    form.lyrDetails().tabPathDetails().lyrPathology().tabOther().dteCollectOther().setValue(new Date());
    form.lyrDetails().tabPathDetails().lyrPathology().tabOther().cmbRequestedTypeOther().setValue(SpecimenCollectionMethod.WARDCOLLECTION);
    form.lyrDetails().tabPathDetails().lyrPathology().tabOther().btnApplyOther().setEnabled(true);
}
项目:openMAXIMS    文件:Logic.java   
private void populateControls(SpecimenCollectionMethod value)
{
    if(value != null)
    {
        if (value.equals(SpecimenCollectionMethod.OUTPATIENT))
        {
            OutPatientDurationCollection collDuration = LookupHelper.getOutPatientDuration(domain.getLookupService());
            if (form.cmbValues().getValues().size() == 0)
            {
                for (int i = 0; i < collDuration.size(); i++)
                {
                    form.cmbValues().newRow(collDuration.get(i), collDuration.get(i).toString());
                }
            }
        }
        else if (value.equals(SpecimenCollectionMethod.INPATIENT))//WDEV-16964
        {
            form.dteDate().setValue(new Date());
            dateChanged();
        }

    }
}
项目:openMAXIMS    文件:Logic.java   
private void populatehardcodedrowsgrid()
{

    ims.framework.cn.data.TreeNode[] rootNodes = LookupHelper.getSpecimenCollectionType(domain.getLookupService()).getRootNodes();
    for (int i = 0; i < rootNodes.length; i++)
    {
        SpecimenCollectionType spectype = (SpecimenCollectionType) rootNodes[i];
        grdSiteCollectionTypeRow row = form.grdSiteCollectionType().getRows().newRow();
        row.setColumnType(spectype.getText());
        row.setColumnSelect(false);
        row.setValue(spectype);


    }

}
项目:openMAXIMS    文件:Logic.java   
private void prePopulateListTypeTree()
{
    SpecimenCollectionMethodCollection collMethods = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService());
    ims.framework.cn.data.TreeNode[] parentNodes = collMethods.getRootNodes();
    for(int i=0;i<parentNodes.length;i++)
    {
        ims.framework.cn.data.TreeNode parentNode = parentNodes[i];
        TreeNode ctrlNode = form.lyrSpecColConfig().tabSpecCollectionConfig().treTypes().getNodes().add(parentNode,  ((SpecimenCollectionMethod)parentNode).getText());
        for(int p=0;p<parentNode.getChildren().length;p++)
        {
            ims.framework.cn.data.TreeNode childNode = parentNode.getChildren()[p];
            ctrlNode.getNodes().add(childNode,  ((SpecimenCollectionMethod)childNode).getText());   
        }
        ctrlNode.setExpanded(true);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void open() {
    form.grdCategory().getRows().clear();

    CategoryCollection lkpCollCategory = LookupHelper.getCategory(domain.getLookupService());
    ImportResultsConfigVo  voImportResultsConfig = domain.getImportResultsConfig();

    form.getLocalContext().setImportResultsConfigVo(voImportResultsConfig);

    if(lkpCollCategory!=null)
        for (int i = 0 ; i < lkpCollCategory.size() ; i++)
        {
            grdCategoryRow row = form.grdCategory().getRows().newRow();

            row.setColCategory(lkpCollCategory.get(i).getText());

            row.setValue(lkpCollCategory.get(i));
        }

    if(voImportResultsConfig!=null)
        for (int i = 0 ; i < voImportResultsConfig.getCategories().size() ; i++)
        {
            selectCategory(voImportResultsConfig.getCategories().get(i));
        }

}
项目:openMAXIMS    文件:Logic.java   
private void prePopulateOtherControls()
{
    SpecimenCollectionMethodCollection collTypes = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService());
    for (int i = 0; i < collTypes.size(); i++)
    {
        if (collTypes.get(i).equals(SpecimenCollectionMethod.OTHER))
        {
            for (int p = 0; p < collTypes.get(i).getChildren().length; p++)
                form.lyrDetails().tabPathDetails().lyrPathology().tabOther().cmbRequestedTypeOther().newRow((SpecimenCollectionMethod) collTypes.get(i).getChildren()[p], ((SpecimenCollectionMethod) collTypes.get(i).getChildren()[p]).getText());

            break;
        }
    }

    form.lyrDetails().tabPathDetails().lyrPathology().tabOther().dteCollectOther().setValue(new Date());
    form.lyrDetails().tabPathDetails().lyrPathology().tabOther().cmbRequestedTypeOther().setValue(SpecimenCollectionMethod.WARDCOLLECTION);
    form.lyrDetails().tabPathDetails().lyrPathology().tabOther().btnApplyOther().setEnabled(true);
}
项目:openMAXIMS    文件:Logic.java   
private void populateControls(SpecimenCollectionMethod value)
{
    if(value != null)
    {
        if (value.equals(SpecimenCollectionMethod.OUTPATIENT))
        {
            OutPatientDurationCollection collDuration = LookupHelper.getOutPatientDuration(domain.getLookupService());
            if (form.cmbValues().getValues().size() == 0)
            {
                for (int i = 0; i < collDuration.size(); i++)
                {
                    form.cmbValues().newRow(collDuration.get(i), collDuration.get(i).toString());
                }
            }
        }
        else if (value.equals(SpecimenCollectionMethod.INPATIENT))//WDEV-16964
        {
            form.dteDate().setValue(new Date());
            dateChanged();
        }

    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populatehardcodedrowsgrid()
{

    ims.framework.cn.data.TreeNode[] rootNodes = LookupHelper.getSpecimenCollectionType(domain.getLookupService()).getRootNodes();
    for (int i = 0; i < rootNodes.length; i++)
    {
        SpecimenCollectionType spectype = (SpecimenCollectionType) rootNodes[i];
        grdSiteCollectionTypeRow row = form.grdSiteCollectionType().getRows().newRow();
        row.setColumnType(spectype.getText());
        row.setColumnSelect(false);
        row.setValue(spectype);


    }

}
项目:openmaxims-linux    文件:Logic.java   
private void prePopulateListTypeTree()
{
    SpecimenCollectionMethodCollection collMethods = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService());
    ims.framework.cn.data.TreeNode[] parentNodes = collMethods.getRootNodes();
    for(int i=0;i<parentNodes.length;i++)
    {
        ims.framework.cn.data.TreeNode parentNode = parentNodes[i];
        TreeNode ctrlNode = form.lyrSpecColConfig().tabSpecCollectionConfig().treTypes().getNodes().add(parentNode,  ((SpecimenCollectionMethod)parentNode).getText());
        for(int p=0;p<parentNode.getChildren().length;p++)
        {
            ims.framework.cn.data.TreeNode childNode = parentNode.getChildren()[p];
            ctrlNode.getNodes().add(childNode,  ((SpecimenCollectionMethod)childNode).getText());   
        }
        ctrlNode.setExpanded(true);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void open() {
    form.grdCategory().getRows().clear();

    CategoryCollection lkpCollCategory = LookupHelper.getCategory(domain.getLookupService());
    ImportResultsConfigVo  voImportResultsConfig = domain.getImportResultsConfig();

    form.getLocalContext().setImportResultsConfigVo(voImportResultsConfig);

    if(lkpCollCategory!=null)
        for (int i = 0 ; i < lkpCollCategory.size() ; i++)
        {
            grdCategoryRow row = form.grdCategory().getRows().newRow();

            row.setColCategory(lkpCollCategory.get(i).getText());

            row.setValue(lkpCollCategory.get(i));
        }

    if(voImportResultsConfig!=null)
        for (int i = 0 ; i < voImportResultsConfig.getCategories().size() ; i++)
        {
            selectCategory(voImportResultsConfig.getCategories().get(i));
        }

}
项目:openmaxims-linux    文件:Logic.java   
private void prePopulateOtherControls()
{
    SpecimenCollectionMethodCollection collTypes = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService());
    for (int i = 0; i < collTypes.size(); i++)
    {
        if (collTypes.get(i).equals(SpecimenCollectionMethod.OTHER))
        {
            for (int p = 0; p < collTypes.get(i).getChildren().length; p++)
                form.lyrDetails().tabPathDetails().lyrPathology().tabOther().cmbRequestedTypeOther().newRow((SpecimenCollectionMethod) collTypes.get(i).getChildren()[p], ((SpecimenCollectionMethod) collTypes.get(i).getChildren()[p]).getText());

            break;
        }
    }

    form.lyrDetails().tabPathDetails().lyrPathology().tabOther().dteCollectOther().setValue(new Date());
    form.lyrDetails().tabPathDetails().lyrPathology().tabOther().cmbRequestedTypeOther().setValue(SpecimenCollectionMethod.WARDCOLLECTION);
    form.lyrDetails().tabPathDetails().lyrPathology().tabOther().btnApplyOther().setEnabled(true);
}
项目:openmaxims-linux    文件:Logic.java   
private void populateControls(SpecimenCollectionMethod value)
{
    if(value != null)
    {
        if (value.equals(SpecimenCollectionMethod.OUTPATIENT))
        {
            OutPatientDurationCollection collDuration = LookupHelper.getOutPatientDuration(domain.getLookupService());
            if (form.cmbValues().getValues().size() == 0)
            {
                for (int i = 0; i < collDuration.size(); i++)
                {
                    form.cmbValues().newRow(collDuration.get(i), collDuration.get(i).toString());
                }
            }
        }
        else if (value.equals(SpecimenCollectionMethod.INPATIENT))//WDEV-16964
        {
            form.dteDate().setValue(new Date());
            dateChanged();
        }

    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadTree(LookupInstanceCollection collSelected)
{
    ims.framework.cn.data.TreeNode[] nodes = null;
    if(form.getGlobalContext().Core.getSelectLookupType().getId() == SpecimenSite.TYPE_ID)
    {
        SpecimenSiteCollection collSites = LookupHelper.getSpecimenSite(domain.getLookupService());
        nodes = collSites.getRootNodes();
    }

    populateTree(nodes, null, collSelected);    
}
项目:AvoinApotti    文件:Logic.java   
private void bindHelpTextCol(grdTestHelpRow row, boolean addInstructToCollectItem)
{
    HelpTextCategoryCollection collHelpText = LookupHelper.getHelpTextCategory(domain.getLookupService());
    for (int i = 0; i < collHelpText.size(); i++)
    {
        if (!addInstructToCollectItem && collHelpText.get(i).equals(HelpTextCategory.INSTRUCTIONSTOCOLLECTOR))
            continue;

        row.getcolTitle().newRow(collHelpText.get(i), collHelpText.get(i).toString());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void prepopulateSpecimenGrid()
{
    SpecimenCollectionTimeCollection collCollectionTime = LookupHelper.getSpecimenCollectionTime(domain.getLookupService());
    form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().clear();
    GenForm.lyrSpecColConfigLayer.tabSpecCollectionConfigContainer.grdSpecimenCollectionRow row;
    SpecimenCollectionTime collectionTime;

    for (int i = 0; i < collCollectionTime.size(); i++)
    {
        collectionTime = collCollectionTime.get(i);
        row = form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().newRow();
        row.setcolTime(collectionTime);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateSpecimenCombo()
{
    SpecimenTypeCollection specimenTypes = LookupHelper.getSpecimenType(domain.getLookupService());

    for (int i = 0; specimenTypes != null && i < specimenTypes.size(); i++)
    {
        form.cmbSpecimenType().newRow(specimenTypes.get(i), specimenTypes.get(i).getText());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void bindCellToLookup(DynamicGridCell cell, DynamicGrid grid)
{
    if (cell == null || grid == null)
        throw new CodingRuntimeException("Coding Error - cell or grid is null (bindCellToLookup)");

    if (grid.equals(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().dyngrdOutPat()))
    {
        cell.getItems().newItem(SpecimenCollectionMethod.INPATIENT, SpecimenCollectionMethod.INPATIENT.getText());
        cell.getItems().newItem(SpecimenCollectionMethod.OUTPATIENT, SpecimenCollectionMethod.OUTPATIENT.getText());
    }
    else if (grid.equals(form.lyrDetails().tabPathDetails().lyrPathology().tabOther().dyngrdOther()))
    {
        SpecimenCollectionMethodCollection collMethods = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService());
        for (int i = 0; i < collMethods.size(); i++)
        {
            if (collMethods.get(i).equals(SpecimenCollectionMethod.OTHER))
            {
                for (int p = 0; p < collMethods.get(i).getChildren().length; p++)
                    cell.getItems().newItem(collMethods.get(i).getChildren()[p], (collMethods.get(i).getChildren()[p]).toString());

                break;
            }

        }
    }
    cell.setIdentifier(SpecimenCollectionMethod.class);
}
项目:AvoinApotti    文件:Logic.java   
private void populateCellFromLookup(DynamicGridCell cellDuration)
{
    OutPatientDurationCollection collDuration = form.getLocalContext().getOutpatientDurationLookupCollection();
    if (collDuration == null)
        collDuration = LookupHelper.getOutPatientDuration(domain.getLookupService());

    for (int i = 0; i < collDuration.size(); i++)
        cellDuration.getItems().newItem(collDuration.get(i), collDuration.get(i).toString());

}
项目:AvoinApotti    文件:Logic.java   
private void loadResultSpecimenTypes()
{
    form.grdResultSpecimenTypes().getRows().clear();
    ResultSpecimenTypesCollection collResTypes = LookupHelper.getResultSpecimenTypes(domain.getLookupService()); 

    for(int i=0;i<collResTypes.size(); i++)
    {
        grdResultSpecimenTypesRow row = form.grdResultSpecimenTypes().getRows().newRow();
        row.setColResSpecimenType(collResTypes.get(i));
    }
}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    clearInstanceControls();        

    form.grdList().getRows().clear();

    ResultSpecimenTypesVoCollection voCollResSpecTypes = domain.listResultSpecimenTypes();

    SpecimenTypeCollection collTypes = LookupHelper.getSpecimenType(domain.getLookupService()); 
    for(int i=0;i<collTypes.size(); i++)
    {
        grdListRow row = form.grdList().getRows().newRow();
        row.setColSpecimenType(collTypes.get(i));

        //if lookup is already used in persisted record set the value for the row
        if(voCollResSpecTypes != null)
        {
            for(ResultSpecimenTypesVo instance : voCollResSpecTypes)
            {
                if(instance.getSpecimenType().equals(collTypes.get(i)))
                    row.setValue(instance);
            }
        }
    }

    form.setMode(FormMode.VIEW);
}
项目:openMAXIMS    文件:Logic.java   
private void loadTree(LookupInstanceCollection collSelected)
{
    ims.framework.cn.data.TreeNode[] nodes = null;
    LookupService lookupService = domain.getLookupService();
    if(form.getGlobalContext().Core.getSelectLookupType().getId() == SpecimenSite.TYPE_ID)
    {
        SpecimenSiteCollection collSites = LookupHelper.getSpecimenSite(lookupService);
        nodes = collSites.getRootNodes();
    }
    else if (form.getGlobalContext().Core.getSelectLookupType().getId() == StructuredCodingComment.TYPE_ID)
    {
        engine.setCaption("Select Comments");
        StructuredCodingCommentCollection collComments = ims.clinical.vo.lookups.LookupHelper.getStructuredCodingComment(lookupService);
        nodes = collComments.getRootNodes();
    }
    else if (form.getGlobalContext().Core.getSelectLookupType().getId() == ReferralUrgency.TYPE_ID)
    {
        engine.setCaption("Select Referral Urgencies");
        ReferralUrgencyCollection collUrgencies = ims.RefMan.vo.lookups.LookupHelper.getReferralUrgency(lookupService);
        nodes = collUrgencies.getRootNodes();
    }
    else if (form.getGlobalContext().Core.getSelectLookupType().getId() == ProfileListType.TYPE_ID)
    {
        engine.setCaption("Select List Type(s)");
        ProfileListTypeCollection collListTypes = ims.scheduling.vo.lookups.LookupHelper.getProfileListType(lookupService);
        nodes = collListTypes.getRootNodes();
    }
    populateTree(nodes, null, collSelected);
    form.chkSelectAll().setValue(allNodesChecked());
}
项目:openMAXIMS    文件:Logic.java   
private void bindHelpTextCol(grdTestHelpRow row, boolean addInstructToCollectItem)
{
    HelpTextCategoryCollection collHelpText = LookupHelper.getHelpTextCategory(domain.getLookupService());
    for (int i = 0; i < collHelpText.size(); i++)
    {
        if (!addInstructToCollectItem && collHelpText.get(i).equals(HelpTextCategory.INSTRUCTIONSTOCOLLECTOR))
            continue;

        row.getcolTitle().newRow(collHelpText.get(i), collHelpText.get(i).toString());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void prepopulateSpecimenGrid()
{
    SpecimenCollectionTimeCollection collCollectionTime = LookupHelper.getSpecimenCollectionTime(domain.getLookupService());
    form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().clear();
    GenForm.lyrSpecColConfigLayer.tabSpecCollectionConfigContainer.grdSpecimenCollectionRow row;
    SpecimenCollectionTime collectionTime;

    for (int i = 0; i < collCollectionTime.size(); i++)
    {
        collectionTime = collCollectionTime.get(i);
        row = form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().newRow();
        row.setcolTime(collectionTime);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateSpecimenCombo()
{
    SpecimenTypeCollection specimenTypes = LookupHelper.getSpecimenType(domain.getLookupService());

    for (int i = 0; specimenTypes != null && i < specimenTypes.size(); i++)
    {
        form.cmbSpecimenType().newRow(specimenTypes.get(i), specimenTypes.get(i).getText());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void bindCellToLookup(DynamicGridCell cell, DynamicGrid grid)
{
    if (cell == null || grid == null)
        throw new CodingRuntimeException("Coding Error - cell or grid is null (bindCellToLookup)");

    if (grid.equals(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().dyngrdOutPat()))
    {
        cell.getItems().newItem(SpecimenCollectionMethod.INPATIENT, SpecimenCollectionMethod.INPATIENT.getText());
        cell.getItems().newItem(SpecimenCollectionMethod.OUTPATIENT, SpecimenCollectionMethod.OUTPATIENT.getText());
    }
    else if (grid.equals(form.lyrDetails().tabPathDetails().lyrPathology().tabOther().dyngrdOther()))
    {
        SpecimenCollectionMethodCollection collMethods = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService());
        for (int i = 0; i < collMethods.size(); i++)
        {
            if (collMethods.get(i).equals(SpecimenCollectionMethod.OTHER))
            {
                for (int p = 0; p < collMethods.get(i).getChildren().length; p++)
                    cell.getItems().newItem(collMethods.get(i).getChildren()[p], (collMethods.get(i).getChildren()[p]).toString());

                break;
            }

        }
    }
    cell.setIdentifier(SpecimenCollectionMethod.class);
}
项目:openMAXIMS    文件:Logic.java   
private void populateCellFromLookup(DynamicGridCell cellDuration)
{
    OutPatientDurationCollection collDuration = form.getLocalContext().getOutpatientDurationLookupCollection();
    if (collDuration == null)
        collDuration = LookupHelper.getOutPatientDuration(domain.getLookupService());

    for (int i = 0; i < collDuration.size(); i++)
        cellDuration.getItems().newItem(collDuration.get(i), collDuration.get(i).toString());

}
项目:openMAXIMS    文件:Logic.java   
private void loadResultSpecimenTypes()
{
    form.grdResultSpecimenTypes().getRows().clear();
    ResultSpecimenTypesCollection collResTypes = LookupHelper.getResultSpecimenTypes(domain.getLookupService()); 

    for(int i=0;i<collResTypes.size(); i++)
    {
        grdResultSpecimenTypesRow row = form.grdResultSpecimenTypes().getRows().newRow();
        row.setColResSpecimenType(collResTypes.get(i));
    }
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    clearInstanceControls();        

    form.grdList().getRows().clear();

    ResultSpecimenTypesVoCollection voCollResSpecTypes = domain.listResultSpecimenTypes();

    SpecimenTypeCollection collTypes = LookupHelper.getSpecimenType(domain.getLookupService()); 
    for(int i=0;i<collTypes.size(); i++)
    {
        grdListRow row = form.grdList().getRows().newRow();
        row.setColSpecimenType(collTypes.get(i));

        //if lookup is already used in persisted record set the value for the row
        if(voCollResSpecTypes != null)
        {
            for(ResultSpecimenTypesVo instance : voCollResSpecTypes)
            {
                if(instance.getSpecimenType().equals(collTypes.get(i)))
                    row.setValue(instance);
            }
        }
    }

    form.setMode(FormMode.VIEW);
}
项目:openMAXIMS    文件:Logic.java   
private void loadTree(LookupInstanceCollection collSelected)
{
    ims.framework.cn.data.TreeNode[] nodes = null;
    if(form.getGlobalContext().Core.getSelectLookupType().getId() == SpecimenSite.TYPE_ID)
    {
        SpecimenSiteCollection collSites = LookupHelper.getSpecimenSite(domain.getLookupService());
        nodes = collSites.getRootNodes();
    }

    populateTree(nodes, null, collSelected);    
}
项目:openMAXIMS    文件:Logic.java   
private void bindHelpTextCol(grdTestHelpRow row, boolean addInstructToCollectItem)
{
    HelpTextCategoryCollection collHelpText = LookupHelper.getHelpTextCategory(domain.getLookupService());
    for (int i = 0; i < collHelpText.size(); i++)
    {
        if (!addInstructToCollectItem && collHelpText.get(i).equals(HelpTextCategory.INSTRUCTIONSTOCOLLECTOR))
            continue;

        row.getcolTitle().newRow(collHelpText.get(i), collHelpText.get(i).toString());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void prepopulateSpecimenGrid()
{
    SpecimenCollectionTimeCollection collCollectionTime = LookupHelper.getSpecimenCollectionTime(domain.getLookupService());
    form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().clear();
    GenForm.lyrSpecColConfigLayer.tabSpecCollectionConfigContainer.grdSpecimenCollectionRow row;
    SpecimenCollectionTime collectionTime;

    for (int i = 0; i < collCollectionTime.size(); i++)
    {
        collectionTime = collCollectionTime.get(i);
        row = form.lyrSpecColConfig().tabSpecCollectionConfig().grdSpecimenCollection().getRows().newRow();
        row.setcolTime(collectionTime);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateSpecimenCombo()
{
    SpecimenTypeCollection specimenTypes = LookupHelper.getSpecimenType(domain.getLookupService());

    for (int i = 0; specimenTypes != null && i < specimenTypes.size(); i++)
    {
        form.cmbSpecimenType().newRow(specimenTypes.get(i), specimenTypes.get(i).getText());
    }
}