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

项目:AvoinApotti    文件:Logic.java   
private void populateQuerySpecialty(DynamicGridCell cell, String string) 
{
    cell.getItems().clear();

    LookupService lookup = domain.getLookupService();
    SpecialtyCollection collection = (SpecialtyCollection) lookup.getLookupCollection(Specialty.TYPE_ID,SpecialtyCollection.class, Specialty.class);

    if(collection != null)
    {
        for(int i=0; i<collection.size(); i++)
        {
            if(validTypedText(cell.getTypedText(), collection.get(i).getIItemText()) 
                    && specialtyNotOnScreen(collection.get(i), cell.getRow().getParent()))
            {
                DynamicGridCellItem newComboItem = cell.getItems().newItem(collection.get(i));
            }
        }
        if(collection.size() > 0)
        {
            cell.showOpened();
        }
    }   
}
项目:AvoinApotti    文件:Logic.java   
/**
 * 
 */
private void listSpecialties()
{
    SpecialtyCollection collSpecialties = LookupHelper.getSpecialty(domain.getLookupService());             
    if (collSpecialties != null)
    {
        form.grdSpecialty().getRows().clear();      
        GenForm.grdSpecialtyRow row;
        for (int i = 0; i < collSpecialties.size(); i++) 
        {
            row = form.grdSpecialty().getRows().newRow();
            row.setValue(collSpecialties.get(i));
            row.setcolSpecialty(collSpecialties.get(i).getText());
            row.setTooltipForcolSpecialty(collSpecialties.get(i).getText());
            row.setcolSpecialtyImage(form.getImages().Admin.Service);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void overlayExcludedSpecialties() 
{
    if (form.getLocalContext().getNoLetterIsRequiredInstance() == null) return;

    SpecialtyCollection lkpCollSpecialties = form.getLocalContext().getNoLetterIsRequiredInstance().getSpecialtiesIsNotNull() ? form.getLocalContext().getNoLetterIsRequiredInstance().getSpecialties() : null; 
    if (lkpCollSpecialties == null)
        return;

    for (int i = 0; i < lkpCollSpecialties.size(); i++) 
    {
        GenForm.grdSpecialtyRow row = form.grdSpecialty().getRowByValue(lkpCollSpecialties.get(i));
        if (row != null)
            row.setcolExclude(Yes.YES);
    }


}
项目:AvoinApotti    文件:Logic.java   
private void addSpecialitiesRow(DynamicGridRow pRow, SpecialtyCollection specialty)
{
    if (specialty == null)
        return;

    for (int i = 0; i < specialty.size(); i++)
    {
        Specialty spe = specialty.get(i);
        DynamicGridRow nRow = pRow.getRows().newRow();

        nRow.setIdentifier(SPECIALTY_ROW_IDENTIFIER);
        nRow.setCollapsedImage(form.getImages().Admin.Specialty01);
        nRow.setExpandedImage(form.getImages().Admin.Specialty01);

        DynamicGridCell nCell = nRow.getCells().newCell(getColumn(form.lyrMain().tabByCategory().dyngrdMapps(), COLUMN_NAME), DynamicCellType.ENUMERATION);
        nCell.setReadOnly(false);
        nCell.setAutoPostBack(true);
        nCell.getItems().newItem(spe);
        nCell.setValue(spe);
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * 
 */
private void listSpecialties() 
{
    SpecialtyCollection lkpCollSpecialties = LookupHelper.getSpecialty(domain.getLookupService());              
    if (lkpCollSpecialties != null)
    {
        form.grdSpecialty().getRows().clear();      
        for (int i = 0; i < lkpCollSpecialties.size(); i++) 
        {
            GenForm.grdSpecialtyRow specRow = form.grdSpecialty().getRows().newRow();
            specRow.setValue(lkpCollSpecialties.get(i));
            specRow.setcolSpecialtyImage(form.getImages().Admin.Service);
            specRow.setcolSpecialty(lkpCollSpecialties.get(i).getText());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void displayAllSpecialties() 
{
    if (form.getLocalContext().getSpecialties() == null) return;        
    SpecialtyCollection lkpCollSpecialties = form.getLocalContext().getSpecialties();

    TreeNode node = null;

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


}
项目:AvoinApotti    文件:Logic.java   
private void prepopulateSpecialties()
{
    //Specialty
    form.grdSpecialties().getRows().clear();

    SpecialtyCollection collSpec = LookupHelper.getSpecialty(domain.getLookupService());
    if(collSpec == null)
        return;

    for (int i=0;i<collSpec.size();i++)
    {
        Specialty specInst = collSpec.get(i);
        grdSpecialtiesRow row = form.grdSpecialties().getRows().newRow();
        row.setSpecialty(specInst);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateSpecialtiesGridFromData(SpecialtyCollection specialties, Specialty mainSpecialty)
{
    if(specialties == null)
        return;

    for(int i=0;i<form.grdSpecialties().getRows().size();i++)
    {
        if(specialties.contains(form.grdSpecialties().getRows().get(i).getSpecialty()))
            form.grdSpecialties().getRows().get(i).setSelect(true);
        else
            form.grdSpecialties().getRows().get(i).setSelect(false);

        if(mainSpecialty != null)
            if(form.grdSpecialties().getRows().get(i).getSpecialty().equals(mainSpecialty))
                form.grdSpecialties().getRows().get(i).setMain(true);
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Gets the hotlists associated with a given object name, based on the current ccitype
 * @param String
 * @return void
 */
private void populateHotlists(Integer cciID) 
{
    IHotlistShort[] collIHotlistShort = domain.listIHotlistShortsByCCI(cciID, form.getLocalContext().getcurrentCciType());

    if (collIHotlistShort != null)
    {
        form.getLocalContext().setIHotlistShorts(collIHotlistShort);
        SpecialtyCollection specialties = new SpecialtyCollection();

        // loop through results adding each associated specialty to a collection
        for (int i = 0; i < collIHotlistShort.length; i++ )
        {
            if (collIHotlistShort[i].getISpecialtyIsNotNull().booleanValue())
            {
                specialties.add(collIHotlistShort[i].getISpecialty());
            }

        }
        form.getGlobalContext().Core.setSpecialties(specialties);

        populateHotlistsTree(form.getGlobalContext().Core.getSpecialties());
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Lists all the specialties lookups in the grid. set row values to the relevant specialty. 
 * @param void
 * @return void
 */
private void populateListControl() 
{
    form.grdHotlists().getRows().clear();

    SpecialtyCollection lkpCollSpecialties = LookupHelper.getSpecialty(domain.getLookupService());
    if (lkpCollSpecialties != null)
    {
        for (int x=0; x < lkpCollSpecialties.size(); x++)
        {
            grdHotlistsRow row = form.grdHotlists().getRows().newRow();
            row.setColumnHotlist(lkpCollSpecialties.get(x).getText());
            row.setValue(lkpCollSpecialties.get(x));
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Loops through the global context specialties and ticks the relevant present checkboxes in the grid.
 * @param void
 * @return void
 */
private void checkPresentSpecialties() 
{
    if (form.getGlobalContext().Core.getSpecialtiesIsNotNull())
    {
        form.getLocalContext().setSavedButInactiveLookups(new SpecialtyCollection());

        // for each global context specialty, check the relevant box in the grid. 
        SpecialtyCollection voCollSpecialties = form.getGlobalContext().Core.getSpecialties();

        for ( int i = 0; i < voCollSpecialties.size(); i++ )
        {
            if ( ! voCollSpecialties.get(i).isActive())
                form.getLocalContext().getSavedButInactiveLookups().add(voCollSpecialties.get(i));

            for (int j = 0; j < form.grdHotlists().getRows().size(); j++ )
            {
                if ( form.grdHotlists().getRows().get(j).getValue().equals(voCollSpecialties.get(i)))
                {
                    form.grdHotlists().getRows().get(j).setColumnPresent(true);
                }
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Creates a collection of specialties from the grid and updates the global context. 
 * @param void
 * @return boolean
 */
private void updateGlobalContext() 
{
    SpecialtyCollection voCollSpecialties = new SpecialtyCollection();

    for ( int i = 0; i < form.grdHotlists().getRows().size(); i++ )
    {
        if ( form.grdHotlists().getRows().get(i).getColumnPresent() )
        {
            voCollSpecialties.add(form.grdHotlists().getRows().get(i).getValue());
        }
    }

    for (int j = 0 ; form.getLocalContext().getSavedButInactiveLookups() != null && j < form.getLocalContext().getSavedButInactiveLookups().size() ; j++)
        voCollSpecialties.add(form.getLocalContext().getSavedButInactiveLookups().get(j));

    form.getGlobalContext().Core.setSpecialties(voCollSpecialties);
}
项目:AvoinApotti    文件:Logic.java   
private void updateSpecialty()
{
    SpecialtyCollection lkpCollSpecialties = ims.core.vo.lookups.LookupHelper.getSpecialty(domain.getLookupService());
    SpecialtyCollection coll = new SpecialtyCollection();

    if (lkpCollSpecialties != null)
    {
        for (int i = 0; i < form.lyrConfig().tabSpecialties().treSpecialty().getNodes().size(); i++)
        {
            for (int x = 0; x < lkpCollSpecialties.size(); x++)
            {
                if (form.lyrConfig().tabSpecialties().treSpecialty().getNodes().get(i).getText().equals(lkpCollSpecialties.get(x).getText()))
                    coll.add(lkpCollSpecialties.get(x));
            }

        }
    }

    form.getGlobalContext().Core.setSpecialties(coll);
    engine.open(form.getForms().ClinicalAdmin.HotlistDialog);
}
项目:AvoinApotti    文件:Logic.java   
private void updateSpecialty()
{
    SpecialtyCollection lkpCollSpecialties = ims.core.vo.lookups.LookupHelper.getSpecialty(domain.getLookupService());
    SpecialtyCollection coll = new SpecialtyCollection();

    if (lkpCollSpecialties != null)
    {
        for (int i = 0; i < form.lyrTabs().tabSpecialties().grdSpecialty().getRows().size(); i++)
        {
            for (int x = 0; x < lkpCollSpecialties.size(); x++)
            {
                if (form.lyrTabs().tabSpecialties().grdSpecialty().getRows().get(i).getValue().equals(lkpCollSpecialties.get(x)))
                    coll.add(lkpCollSpecialties.get(x));
            }

        }
    }

    form.getGlobalContext().Core.setSpecialties(coll);
    engine.open(form.getForms().ClinicalAdmin.HotlistDialog);
}
项目:AvoinApotti    文件:Logic.java   
private void populateSpecialitiesScreenFromData(SpecialtyCollection spec)
{
    form.lyrDetails().tabSpecialties().grdSpecialities().getRows().clear();
    if (spec == null)
        return;
    for (int i=0 ; i<spec.size() ; i++)
    {
        Specialty specialty = spec.get(i);
        if (specialty != null)
        {
            grdSpecialitiesRow newRow = form.lyrDetails().tabSpecialties().grdSpecialities().getRows().newRow();
            newRow.setValue(specialty);
            newRow.setcolSpecialty(specialty.getText());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private SpecialtyCollection populateSpecialitiesDataFromScreen()
{
    Specialty[] specs = form.lyrDetails().tabSpecialties().grdSpecialities().getValues();
    if (specs == null)
        return null;
    SpecialtyCollection retVa = new SpecialtyCollection();
    for (int i = 0 ; i<specs.length ; i++)
    {
        if (specs[i] != null)
        {
            retVa.add(specs[i]);
        }
    }
    return retVa;

}
项目:AvoinApotti    文件:Logic.java   
private void populateSpecialtyCombo()
{
    form.cmbSpecialty().clear();

    SpecialtyCollection lookupCollection =domain.listSpecialties();

    if( lookupCollection != null && lookupCollection.size() > 0)
    {
        for( int i = 0; i < lookupCollection.size(); i++)
        {
            if( lookupCollection.get(i).isActive() == true ) 
            {   
                form.cmbSpecialty().newRow(lookupCollection.get(i), lookupCollection.get(i).getText(), lookupCollection.get(i).getImage(), lookupCollection.get(i).getTextColor());

            }
        }

    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateSpecialtyCombo()
{
    form.cmbSpecialty().clear();

    SpecialtyCollection lookupCollection =domain.listSpecialties();

    if( lookupCollection != null && lookupCollection.size() > 0)
    {
        for( int i = 0; i < lookupCollection.size(); i++)
        {
            if( lookupCollection.get(i).isActive() == true ) 
            {   
                form.cmbSpecialty().newRow(lookupCollection.get(i), lookupCollection.get(i).getText(), lookupCollection.get(i).getImage(), lookupCollection.get(i).getTextColor());

            }
        }

    }
}
项目:AvoinApotti    文件:TrackingAndAttendanceWorklistsImpl.java   
public SpecialtyCollection listSpecialties()
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select lookInst from Lookup as look left join look.instances as lookInst left join lookInst.mappings as mappings where (look.id = 621 and mappings.extSystem = 'MAXIMS' and mappings.extCode like 'EDREFER%' and lookInst.active = 1)");

    List<?> list = factory.find(hql.toString());

    if (list!=null && list.size()>0)
    {
        SpecialtyCollection coll = new SpecialtyCollection();

        for (int i=0;i<list.size();i++)
        {
            LookupInstance doLookInst=(LookupInstance)list.get(i);
            ims.core.vo.lookups.Specialty voLookup = new ims.core.vo.lookups.Specialty(doLookInst.getId(),doLookInst.getText(),doLookInst.isActive(),null,doLookInst.getImage(),doLookInst.getColor()); 
            coll.add(voLookup);
        }

        return coll;
    }

    return null;
}
项目:AvoinApotti    文件:EDReferralToSpecialtyDialogImpl.java   
public SpecialtyCollection listSpecialties()
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select lookInst from Lookup as look left join look.instances as lookInst left join lookInst.mappings as mappings where (look.id = 621 and mappings.extSystem = 'MAXIMS' and mappings.extCode like 'EDREFER%' and lookInst.active = 1)");

    List<?> list = factory.find(hql.toString());

    if (list!=null && list.size()>0)
    {
        SpecialtyCollection coll = new SpecialtyCollection();

        for (int i=0;i<list.size();i++)
        {
            LookupInstance doLookInst=(LookupInstance)list.get(i);
            ims.core.vo.lookups.Specialty voLookup = new ims.core.vo.lookups.Specialty(doLookInst.getId(),doLookInst.getText(),doLookInst.isActive(),null,doLookInst.getImage(),doLookInst.getColor()); 
            coll.add(voLookup);
        }

        return coll;
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void listSpecialties()
{
    form.treLeadCons().clear();
    SpecialtyCollection lkpCollSpecialties = LookupHelper.getSpecialty(domain.getLookupService());
    if (lkpCollSpecialties == null)
        return;

    for (int i=0; i < lkpCollSpecialties.size(); i++)
    {
        TreeNode nodeSpecialty=form.treLeadCons().getNodes().add(lkpCollSpecialties.get(i), lkpCollSpecialties.get(i).getText());   

        //put images for Specialty Node
        nodeSpecialty.setExpandedImage(form.getImages().Admin.Specialty01);
        nodeSpecialty.setCollapsedImage(form.getImages().Admin.Specialty01);
    }           
}
项目:AvoinApotti    文件:WorklistImpl.java   
/**
* listSpecialtiesForActivePathways
*/
public SpecialtyCollection listSpecialtiesForActivePathways()
{
    SpecialtyCollection specialtyInstances = new SpecialtyCollection();

    List specialties = getDomainFactory().find("select distinct pw.specialty from Pathway as pw where pw.status = :active", new String[] {"active"}, new Object[] {getDomLookup(PreActiveActiveInactiveStatus.ACTIVE)});
    if(specialties != null && specialties.size() > 0)
    {
        Iterator it = specialties.iterator();
        while(it.hasNext())
        {
            LookupInstance domInst = (LookupInstance) it.next();
            Specialty lookupInst =  assembleSpecialtyInstance(domInst);
            specialtyInstances.add(lookupInst);
        }
    }

    return specialtyInstances;
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * Creates a collection of specialties from the grid and updates the global context. 
 * @param void
 * @return boolean
 */
private void updateGlobalContext() 
{
    SpecialtyCollection voCollSpecialties = new SpecialtyCollection();

    for ( int i = 0; i < form.grdHotlists().getRows().size(); i++ )
    {
        if ( form.grdHotlists().getRows().get(i).getColumnPresent() )
        {
            voCollSpecialties.add(form.grdHotlists().getRows().get(i).getValue());
        }
    }

    for (int j = 0 ; form.getLocalContext().getSavedButInactiveLookups() != null && j < form.getLocalContext().getSavedButInactiveLookups().size() ; j++)
        voCollSpecialties.add(form.getLocalContext().getSavedButInactiveLookups().get(j));

    form.getGlobalContext().Core.setSpecialties(voCollSpecialties);
}
项目:openMAXIMS    文件:TrackingAndAttendanceWorklistsImpl.java   
public SpecialtyCollection listSpecialties()
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select lookInst from Lookup as look left join look.instances as lookInst left join lookInst.mappings as mappings where (look.id = 621 and mappings.extSystem = 'MAXIMS' and mappings.extCode like 'EDREFER%' and lookInst.active = 1)");

    List<?> list = factory.find(hql.toString());

    if (list!=null && list.size()>0)
    {
        SpecialtyCollection coll = new SpecialtyCollection();

        for (int i=0;i<list.size();i++)
        {
            LookupInstance doLookInst=(LookupInstance)list.get(i);
            ims.core.vo.lookups.Specialty voLookup = new ims.core.vo.lookups.Specialty(doLookInst.getId(),doLookInst.getText(),doLookInst.isActive(),null,doLookInst.getImage(),doLookInst.getColor()); 
            coll.add(voLookup);
        }

        return coll;
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void overlayExcludedSpecialties() 
{
    if (form.getLocalContext().getNoLetterIsRequiredInstance() == null) return;

    SpecialtyCollection lkpCollSpecialties = form.getLocalContext().getNoLetterIsRequiredInstance().getSpecialtiesIsNotNull() ? form.getLocalContext().getNoLetterIsRequiredInstance().getSpecialties() : null; 
    if (lkpCollSpecialties == null)
        return;

    for (int i = 0; i < lkpCollSpecialties.size(); i++) 
    {
        GenForm.grdSpecialtyRow row = form.grdSpecialty().getRowByValue(lkpCollSpecialties.get(i));
        if (row != null)
            row.setcolExclude(Yes.YES);
    }


}
项目:openmaxims-linux    文件:Logic.java   
private void populateSpecialitiesScreenFromData(SpecialtyCollection spec)
{
    form.lyrDetails().tabSpecialties().grdSpecialities().getRows().clear();
    if (spec == null)
        return;
    for (int i=0 ; i<spec.size() ; i++)
    {
        Specialty specialty = spec.get(i);
        if (specialty != null)
        {
            grdSpecialitiesRow newRow = form.lyrDetails().tabSpecialties().grdSpecialities().getRows().newRow();
            newRow.setValue(specialty);
            newRow.setcolSpecialty(specialty.getText());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addSpecialitiesRow(DynamicGridRow pRow, SpecialtyCollection specialty)
{
    if (specialty == null)
        return;

    for (int i = 0; i < specialty.size(); i++)
    {
        Specialty spe = specialty.get(i);
        DynamicGridRow nRow = pRow.getRows().newRow();

        nRow.setIdentifier(SPECIALTY_ROW_IDENTIFIER);
        nRow.setCollapsedImage(form.getImages().Admin.Specialty01);
        nRow.setExpandedImage(form.getImages().Admin.Specialty01);

        DynamicGridCell nCell = nRow.getCells().newCell(getColumn(form.lyrMain().tabByCategory().dyngrdMapps(), COLUMN_NAME), DynamicCellType.ENUMERATION);
        nCell.setReadOnly(false);
        nCell.setAutoPostBack(true);
        nCell.getItems().newItem(spe);
        nCell.setValue(spe);
    }
}
项目:openmaxims-linux    文件:EDReferralToSpecialtyDialogImpl.java   
public SpecialtyCollection listSpecialties()
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select lookInst from Lookup as look left join look.instances as lookInst left join lookInst.mappings as mappings where (look.id = 621 and mappings.extSystem = 'MAXIMS' and mappings.extCode like 'EDREFER%' and lookInst.active = 1)");

    List<?> list = factory.find(hql.toString());

    if (list!=null && list.size()>0)
    {
        SpecialtyCollection coll = new SpecialtyCollection();

        for (int i=0;i<list.size();i++)
        {
            LookupInstance doLookInst=(LookupInstance)list.get(i);
            ims.core.vo.lookups.Specialty voLookup = new ims.core.vo.lookups.Specialty(doLookInst.getId(),doLookInst.getText(),doLookInst.isActive(),null,doLookInst.getImage(),doLookInst.getColor()); 
            coll.add(voLookup);
        }

        return coll;
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void displayAllSpecialties() 
{
    if (form.getLocalContext().getSpecialties() == null) return;        
    SpecialtyCollection lkpCollSpecialties = form.getLocalContext().getSpecialties();

    TreeNode node = null;

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


}
项目:openMAXIMS    文件:Logic.java   
private void populateSpecialtyCombo()
{
    form.cmbSpecialty().clear();

    SpecialtyCollection lookupCollection =domain.listSpecialties();

    if( lookupCollection != null && lookupCollection.size() > 0)
    {
        for( int i = 0; i < lookupCollection.size(); i++)
        {
            if( lookupCollection.get(i).isActive() == true ) 
            {   
                form.cmbSpecialty().newRow(lookupCollection.get(i), lookupCollection.get(i).getText(), lookupCollection.get(i).getImage(), lookupCollection.get(i).getTextColor());

            }
        }

    }
}
项目:openmaxims-linux    文件:Logic.java   
private void displayAllSpecialties() 
{
    if (form.getLocalContext().getSpecialties() == null) return;        
    SpecialtyCollection lkpCollSpecialties = form.getLocalContext().getSpecialties();

    TreeNode node = null;

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


}
项目:openMAXIMS    文件:Logic.java   
private void prepopulateSpecialties()
{
    //Specialty
    form.grdSpecialties().getRows().clear();

    SpecialtyCollection collSpec = LookupHelper.getSpecialty(domain.getLookupService());
    if(collSpec == null)
        return;

    for (int i=0;i<collSpec.size();i++)
    {
        Specialty specInst = collSpec.get(i);
        grdSpecialtiesRow row = form.grdSpecialties().getRows().newRow();
        row.setSpecialty(specInst);
        row.setColBedsAllocatedReadOnly(true);
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Lists all the specialties lookups in the grid. set row values to the relevant specialty. 
 * @param void
 * @return void
 */
private void populateListControl() 
{
    form.grdHotlists().getRows().clear();

    SpecialtyCollection lkpCollSpecialties = LookupHelper.getSpecialty(domain.getLookupService());
    if (lkpCollSpecialties != null)
    {
        for (int x=0; x < lkpCollSpecialties.size(); x++)
        {
            grdHotlistsRow row = form.grdHotlists().getRows().newRow();
            row.setColumnHotlist(lkpCollSpecialties.get(x).getText());
            row.setValue(lkpCollSpecialties.get(x));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Creates a collection of specialties from the grid and updates the global context. 
 * @param void
 * @return boolean
 */
private void updateGlobalContext() 
{
    SpecialtyCollection voCollSpecialties = new SpecialtyCollection();

    for ( int i = 0; i < form.grdHotlists().getRows().size(); i++ )
    {
        if ( form.grdHotlists().getRows().get(i).getColumnPresent() )
        {
            voCollSpecialties.add(form.grdHotlists().getRows().get(i).getValue());
        }
    }

    for (int j = 0 ; form.getLocalContext().getSavedButInactiveLookups() != null && j < form.getLocalContext().getSavedButInactiveLookups().size() ; j++)
        voCollSpecialties.add(form.getLocalContext().getSavedButInactiveLookups().get(j));

    form.getGlobalContext().Core.setSpecialties(voCollSpecialties);
}
项目:openmaxims-linux    文件:Logic.java   
private void updateSpecialty()
{
    SpecialtyCollection lkpCollSpecialties = ims.core.vo.lookups.LookupHelper.getSpecialty(domain.getLookupService());
    SpecialtyCollection coll = new SpecialtyCollection();

    if (lkpCollSpecialties != null)
    {
        for (int i = 0; i < form.lyrConfig().tabSpecialties().treSpecialty().getNodes().size(); i++)
        {
            for (int x = 0; x < lkpCollSpecialties.size(); x++)
            {
                if (form.lyrConfig().tabSpecialties().treSpecialty().getNodes().get(i).getText().equals(lkpCollSpecialties.get(x).getText()))
                    coll.add(lkpCollSpecialties.get(x));
            }

        }
    }

    form.getGlobalContext().Core.setSpecialties(coll);
    engine.open(form.getForms().ClinicalAdmin.HotlistDialog);
}
项目:openmaxims-linux    文件:Logic.java   
private void listSpecialties()
{
    form.treLeadCons().clear();
    SpecialtyCollection lkpCollSpecialties = LookupHelper.getSpecialty(domain.getLookupService());
    if (lkpCollSpecialties == null)
        return;

    for (int i=0; i < lkpCollSpecialties.size(); i++)
    {
        TreeNode nodeSpecialty=form.treLeadCons().getNodes().add(lkpCollSpecialties.get(i), lkpCollSpecialties.get(i).getText());   

        //put images for Specialty Node
        nodeSpecialty.setExpandedImage(form.getImages().Admin.Specialty01);
        nodeSpecialty.setCollapsedImage(form.getImages().Admin.Specialty01);
    }           
}
项目:openMAXIMS    文件:Logic.java   
private void updateSpecialty()
{
    SpecialtyCollection lkpCollSpecialties = ims.core.vo.lookups.LookupHelper.getSpecialty(domain.getLookupService());
    SpecialtyCollection coll = new SpecialtyCollection();

    if (lkpCollSpecialties != null)
    {
        for (int i = 0; i < form.lyrTabs().tabSpecialties().grdSpecialty().getRows().size(); i++)
        {
            for (int x = 0; x < lkpCollSpecialties.size(); x++)
            {
                if (form.lyrTabs().tabSpecialties().grdSpecialty().getRows().get(i).getValue().equals(lkpCollSpecialties.get(x)))
                    coll.add(lkpCollSpecialties.get(x));
            }

        }
    }

    form.getGlobalContext().Core.setSpecialties(coll);
    engine.open(form.getForms().ClinicalAdmin.HotlistDialog);
}
项目:openMAXIMS    文件:Logic.java   
private void populateSpecialitiesScreenFromData(SpecialtyCollection spec)
{
    form.lyrDetails().tabSpecialties().grdSpecialities().getRows().clear();
    if (spec == null)
        return;
    for (int i=0 ; i<spec.size() ; i++)
    {
        Specialty specialty = spec.get(i);
        if (specialty != null)
        {
            grdSpecialitiesRow newRow = form.lyrDetails().tabSpecialties().grdSpecialities().getRows().newRow();
            newRow.setValue(specialty);
            newRow.setcolSpecialty(specialty.getText());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private SpecialtyCollection populateSpecialitiesDataFromScreen()
{
    Specialty[] specs = form.lyrDetails().tabSpecialties().grdSpecialities().getValues();
    if (specs == null)
        return null;
    SpecialtyCollection retVa = new SpecialtyCollection();
    for (int i = 0 ; i<specs.length ; i++)
    {
        if (specs[i] != null)
        {
            retVa.add(specs[i]);
        }
    }
    return retVa;

}
项目:openMAXIMS    文件:Logic.java   
private void populateSpecialtyCombo()
{
    form.cmbSpecialty().clear();

    SpecialtyCollection lookupCollection =domain.listSpecialties();

    if( lookupCollection != null && lookupCollection.size() > 0)
    {
        for( int i = 0; i < lookupCollection.size(); i++)
        {
            if( lookupCollection.get(i).isActive() == true ) 
            {   
                form.cmbSpecialty().newRow(lookupCollection.get(i), lookupCollection.get(i).getText(), lookupCollection.get(i).getImage(), lookupCollection.get(i).getTextColor());

            }
        }

    }
}