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

项目:AvoinApotti    文件:Logic.java   
private void fillReactionCombo()
{
    form.ctnAllergy().cmbAllergyReaction().clear();

    AllergenType type = form.ctnAllergy().cmbAllergyType().getValue();
    if(type != null)
    {
        AllergenTypeReactionsCollection reactionsColl = domain.listAllergenTypeReactions(type);
        if(reactionsColl != null)
        {
            for (int i = 0; i < reactionsColl.size(); i++)
            {
                if(reactionsColl.get(i).getReaction()!= null)
                    form.ctnAllergy().cmbAllergyReaction().newRow(reactionsColl.get(i).getReaction(), reactionsColl.get(i).getReaction().toString());
            }
            if (reactionsColl.size() == 1)
                form.ctnAllergy().cmbAllergyReaction().setValue(reactionsColl.get(0).getReaction());
        }
    }

    form.ctnAllergy().cmbAllergyReaction().getValues();

}
项目:AvoinApotti    文件:Logic.java   
private void fillReactionCombo()
{
    form.ctnDetails().cmbReaction().clear();


    AllergenType type = form.ctnDetails().cmbType().getValue();
    if(type != null)
    {
        AllergenTypeReactionsCollection reactionsColl = domain.listAllergenTypeReactions(type);
        if(reactionsColl != null)
        {
            for (int i = 0; i < reactionsColl.size(); i++)
            {
                if(reactionsColl.get(i).getReaction()!= null)
                    form.ctnDetails().cmbReaction().newRow(reactionsColl.get(i).getReaction(), reactionsColl.get(i).getReaction().toString());
            }
            if (reactionsColl.size() == 1)
                form.ctnDetails().cmbReaction().setValue(reactionsColl.get(0).getReaction());
        }
    }

    form.ctnDetails().cmbReaction().getValues();

}
项目:openMAXIMS    文件:Logic.java   
private void fillReactionCombo()
{
    form.ctnAllergy().cmbAllergyReaction().clear();

    AllergenType type = form.ctnAllergy().cmbAllergyType().getValue();
    if(type != null)
    {
        AllergenTypeReactionsCollection reactionsColl = domain.listAllergenTypeReactions(type);
        if(reactionsColl != null)
        {
            for (int i = 0; i < reactionsColl.size(); i++)
            {
                if(reactionsColl.get(i).getReaction()!= null)
                    form.ctnAllergy().cmbAllergyReaction().newRow(reactionsColl.get(i).getReaction(), reactionsColl.get(i).getReaction().toString());
            }
            if (reactionsColl.size() == 1)
                form.ctnAllergy().cmbAllergyReaction().setValue(reactionsColl.get(0).getReaction());
        }
    }

    form.ctnAllergy().cmbAllergyReaction().getValues();

}
项目:openMAXIMS    文件:Logic.java   
private void fillReactionCombo()
{
    form.ctnDetails().cmbReaction().clear();


    AllergenType type = form.ctnDetails().cmbType().getValue();
    if(type != null)
    {
        AllergenTypeReactionsCollection reactionsColl = domain.listAllergenTypeReactions(type);
        if(reactionsColl != null)
        {
            for (int i = 0; i < reactionsColl.size(); i++)
            {
                if(reactionsColl.get(i).getReaction()!= null)
                    form.ctnDetails().cmbReaction().newRow(reactionsColl.get(i).getReaction(), reactionsColl.get(i).getReaction().toString());
            }
            if (reactionsColl.size() == 1)
                form.ctnDetails().cmbReaction().setValue(reactionsColl.get(0).getReaction());
        }
    }

    form.ctnDetails().cmbReaction().getValues();

}
项目:openMAXIMS    文件:Logic.java   
private void fillReactionCombo()
{
    form.ctnAllergy().cmbAllergyReaction().clear();

    AllergenType type = form.ctnAllergy().cmbAllergyType().getValue();
    if(type != null)
    {
        AllergenTypeReactionsCollection reactionsColl = domain.listAllergenTypeReactions(type);
        if(reactionsColl != null)
        {
            for (int i = 0; i < reactionsColl.size(); i++)
            {
                if(reactionsColl.get(i).getReaction()!= null)
                    form.ctnAllergy().cmbAllergyReaction().newRow(reactionsColl.get(i).getReaction(), reactionsColl.get(i).getReaction().toString());
            }
            if (reactionsColl.size() == 1)
                form.ctnAllergy().cmbAllergyReaction().setValue(reactionsColl.get(0).getReaction());
        }
    }

    form.ctnAllergy().cmbAllergyReaction().getValues();

}
项目:openMAXIMS    文件:Logic.java   
private void fillReactionCombo()
{
    form.ctnDetails().cmbReaction().clear();


    AllergenType type = form.ctnDetails().cmbType().getValue();
    if(type != null)
    {
        AllergenTypeReactionsCollection reactionsColl = domain.listAllergenTypeReactions(type);
        if(reactionsColl != null)
        {
            for (int i = 0; i < reactionsColl.size(); i++)
            {
                if(reactionsColl.get(i).getReaction()!= null)
                    form.ctnDetails().cmbReaction().newRow(reactionsColl.get(i).getReaction(), reactionsColl.get(i).getReaction().toString());
            }
            if (reactionsColl.size() == 1)
                form.ctnDetails().cmbReaction().setValue(reactionsColl.get(0).getReaction());
        }
    }

    form.ctnDetails().cmbReaction().getValues();

}
项目:openmaxims-linux    文件:Logic.java   
private void fillReactionCombo()
{
    form.ctnAllergy().cmbAllergyReaction().clear();

    AllergenType type = form.ctnAllergy().cmbAllergyType().getValue();
    if(type != null)
    {
        AllergenTypeReactionsCollection reactionsColl = domain.listAllergenTypeReactions(type);
        if(reactionsColl != null)
        {
            for (int i = 0; i < reactionsColl.size(); i++)
            {
                if(reactionsColl.get(i).getReaction()!= null)
                    form.ctnAllergy().cmbAllergyReaction().newRow(reactionsColl.get(i).getReaction(), reactionsColl.get(i).getReaction().toString());
            }
            if (reactionsColl.size() == 1)
                form.ctnAllergy().cmbAllergyReaction().setValue(reactionsColl.get(0).getReaction());
        }
    }

    form.ctnAllergy().cmbAllergyReaction().getValues();

}
项目:openmaxims-linux    文件:Logic.java   
private void fillReactionCombo()
{
    form.ctnDetails().cmbReaction().clear();


    AllergenType type = form.ctnDetails().cmbType().getValue();
    if(type != null)
    {
        AllergenTypeReactionsCollection reactionsColl = domain.listAllergenTypeReactions(type);
        if(reactionsColl != null)
        {
            for (int i = 0; i < reactionsColl.size(); i++)
            {
                if(reactionsColl.get(i).getReaction()!= null)
                    form.ctnDetails().cmbReaction().newRow(reactionsColl.get(i).getReaction(), reactionsColl.get(i).getReaction().toString());
            }
            if (reactionsColl.size() == 1)
                form.ctnDetails().cmbReaction().setValue(reactionsColl.get(0).getReaction());
        }
    }

    form.ctnDetails().cmbReaction().getValues();

}
项目:AvoinApotti    文件:Logic.java   
private void populateAllergenType()
{
    form.grdAllergenType().getRows().clear();
    AllergenTypeCollection sColl2 = LookupHelper.getAllergenType(domain.getLookupService());
    for (int i = 0; i < sColl2.size(); i++)
    {
        AllergenType allergenType = sColl2.get(i);
        GenForm.grdAllergenTypeRow row = form.grdAllergenType().getRows().newRow();
        row.setcolAllergenType(allergenType.getText());
        row.setValue(allergenType);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void listAllergenReactions(AllergenType allergenType)
{
    AllergenTypeReactionsCollection voCollAllergenTypeReactions = domain.listAllergenTypeReactions(allergenType);

    if (voCollAllergenTypeReactions == null)
        return;

    for (int i = 0; i < voCollAllergenTypeReactions.size(); i++)
    {
        AllergenTypeReactions reaction = voCollAllergenTypeReactions.get(i);
        GenForm.grdAllergenReactionsRow row = form.grdAllergenReactions().getRowByValue(reaction.getReaction());
        if (row != null)
            row.setcolSelected(true);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateAllergenType()
{
    form.grdAllergenType().getRows().clear();
    AllergenTypeCollection sColl2 = LookupHelper.getAllergenType(domain.getLookupService());
    for (int i = 0; i < sColl2.size(); i++)
    {
        AllergenType allergenType = sColl2.get(i);
        GenForm.grdAllergenTypeRow row = form.grdAllergenType().getRows().newRow();
        row.setcolAllergenType(allergenType.getText());
        row.setValue(allergenType);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void listAllergenReactions(AllergenType allergenType)
{
    AllergenTypeReactionsCollection voCollAllergenTypeReactions = domain.listAllergenTypeReactions(allergenType);

    if (voCollAllergenTypeReactions == null)
        return;

    for (int i = 0; i < voCollAllergenTypeReactions.size(); i++)
    {
        AllergenTypeReactions reaction = voCollAllergenTypeReactions.get(i);
        GenForm.grdAllergenReactionsRow row = form.grdAllergenReactions().getRowByValue(reaction.getReaction());
        if (row != null)
            row.setcolSelected(true);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateAllergenType()
{
    form.grdAllergenType().getRows().clear();
    AllergenTypeCollection sColl2 = LookupHelper.getAllergenType(domain.getLookupService());
    for (int i = 0; i < sColl2.size(); i++)
    {
        AllergenType allergenType = sColl2.get(i);
        GenForm.grdAllergenTypeRow row = form.grdAllergenType().getRows().newRow();
        row.setcolAllergenType(allergenType.getText());
        row.setValue(allergenType);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void listAllergenReactions(AllergenType allergenType)
{
    AllergenTypeReactionsCollection voCollAllergenTypeReactions = domain.listAllergenTypeReactions(allergenType);

    if (voCollAllergenTypeReactions == null)
        return;

    for (int i = 0; i < voCollAllergenTypeReactions.size(); i++)
    {
        AllergenTypeReactions reaction = voCollAllergenTypeReactions.get(i);
        GenForm.grdAllergenReactionsRow row = form.grdAllergenReactions().getRowByValue(reaction.getReaction());
        if (row != null)
            row.setcolSelected(true);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateAllergenType()
{
    form.grdAllergenType().getRows().clear();
    AllergenTypeCollection sColl2 = LookupHelper.getAllergenType(domain.getLookupService());
    for (int i = 0; i < sColl2.size(); i++)
    {
        AllergenType allergenType = sColl2.get(i);
        GenForm.grdAllergenTypeRow row = form.grdAllergenType().getRows().newRow();
        row.setcolAllergenType(allergenType.getText());
        row.setValue(allergenType);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void listAllergenReactions(AllergenType allergenType)
{
    AllergenTypeReactionsCollection voCollAllergenTypeReactions = domain.listAllergenTypeReactions(allergenType);

    if (voCollAllergenTypeReactions == null)
        return;

    for (int i = 0; i < voCollAllergenTypeReactions.size(); i++)
    {
        AllergenTypeReactions reaction = voCollAllergenTypeReactions.get(i);
        GenForm.grdAllergenReactionsRow row = form.grdAllergenReactions().getRowByValue(reaction.getReaction());
        if (row != null)
            row.setcolSelected(true);
    }
}
项目:AvoinApotti    文件:NursingNotesComponentImpl.java   
public AllergenVoCollection listAllergens(String filter,String ignored) throws DomainInterfaceException
{
    if(filter == null)
        return null;

    filter = filter.trim().toUpperCase();

    if(filter == null || filter.length() == 0)
        return null;

    DomainFactory factory = getDomainFactory();
    Connection conection = factory.getJdbcConnection();

    StringBuffer sql = new StringBuffer();

    sql.append("select a.id, a.allergenna, type.id , type.text from core_allergen a LEFT OUTER JOIN core_allergen_keywords k ON a.id = k.id LEFT OUTER JOIN applookup_instance type ON a.lkp_allergenty = type.id where (k.keyword like ? or a.allergenna like ?) and a.isactive = 1 ");

    if (ignored != null && ignored.trim().length() > 0)
    {
        sql.append(" and a.id not in ("+ignored+")");
    }

    sql.append(" order by upper(a.allergenna)");

    AllergenVoCollection allergenColl = new AllergenVoCollection();
    PreparedStatement ps;
    try 
    {
        ps = conection.prepareCall(sql.toString());
        ps.setString(1, filter + "%");
        ps.setString(2, filter + "%");

        ResultSet rs = ps.executeQuery();

        while( rs.next() )
        {
            AllergenVo vo = new AllergenVo();
            vo.setID_Allergen(Integer.valueOf(rs.getString(1)));
            vo.setAllergenName(rs.getString(2));
            vo.setAllergenType((rs.getString(3) != null && rs.getString(4) != null) ? new AllergenType(Integer.valueOf(rs.getString(3)), rs.getString(4), true) : null);
            allergenColl.add(vo);
        }
    }
    catch (SQLException e) 
    {
        e.printStackTrace();
    }

    return allergenColl;
}
项目:openMAXIMS    文件:NursingNotesComponentImpl.java   
public AllergenVoCollection listAllergens(String filter,String ignored) throws DomainInterfaceException
{
    if(filter == null)
        return null;

    filter = filter.trim().toUpperCase();

    if(filter == null || filter.length() == 0)
        return null;

    DomainFactory factory = getDomainFactory();
    Connection conection = factory.getJdbcConnection();

    StringBuffer sql = new StringBuffer();

    sql.append("select a.id, a.allergenna, type.id , type.text from core_allergen a LEFT OUTER JOIN core_allergen_keywords k ON a.id = k.id LEFT OUTER JOIN applookup_instance type ON a.lkp_allergenty = type.id where (k.keyword like ? or a.allergenna like ?) and a.isactive = 1 ");

    if (ignored != null && ignored.trim().length() > 0)
    {
        sql.append(" and a.id not in ("+ignored+")");
    }

    sql.append(" order by upper(a.allergenna)");

    AllergenVoCollection allergenColl = new AllergenVoCollection();
    PreparedStatement ps;
    try 
    {
        ps = conection.prepareCall(sql.toString());
        ps.setString(1, filter + "%");
        ps.setString(2, filter + "%");

        ResultSet rs = ps.executeQuery();

        while( rs.next() )
        {
            AllergenVo vo = new AllergenVo();
            vo.setID_Allergen(Integer.valueOf(rs.getString(1)));
            vo.setAllergenName(rs.getString(2));
            vo.setAllergenType((rs.getString(3) != null && rs.getString(4) != null) ? new AllergenType(Integer.valueOf(rs.getString(3)), rs.getString(4), true) : null);
            allergenColl.add(vo);
        }
    }
    catch (SQLException e) 
    {
        e.printStackTrace();
    }

    return allergenColl;
}
项目:openMAXIMS    文件:NursingNotesComponentImpl.java   
public AllergenVoCollection listAllergens(String filter,String ignored) throws DomainInterfaceException
{
    if(filter == null)
        return null;

    filter = filter.trim().toUpperCase();

    if(filter == null || filter.length() == 0)
        return null;

    DomainFactory factory = getDomainFactory();
    Connection conection = factory.getJdbcConnection();

    StringBuffer sql = new StringBuffer();

    sql.append("select a.id, a.allergenna, type.id , type.text from core_allergen a LEFT OUTER JOIN core_allergen_keywords k ON a.id = k.id LEFT OUTER JOIN applookup_instance type ON a.lkp_allergenty = type.id where (k.keyword like ? or a.allergenna like ?) and a.isactive = 1 ");

    if (ignored != null && ignored.trim().length() > 0)
    {
        sql.append(" and a.id not in ("+ignored+")");
    }

    sql.append(" order by upper(a.allergenna)");

    AllergenVoCollection allergenColl = new AllergenVoCollection();
    PreparedStatement ps;
    try 
    {
        ps = conection.prepareCall(sql.toString());
        ps.setString(1, filter + "%");
        ps.setString(2, filter + "%");

        ResultSet rs = ps.executeQuery();

        while( rs.next() )
        {
            AllergenVo vo = new AllergenVo();
            vo.setID_Allergen(Integer.valueOf(rs.getString(1)));
            vo.setAllergenName(rs.getString(2));
            vo.setAllergenType((rs.getString(3) != null && rs.getString(4) != null) ? new AllergenType(Integer.valueOf(rs.getString(3)), rs.getString(4), true) : null);
            allergenColl.add(vo);
        }
    }
    catch (SQLException e) 
    {
        e.printStackTrace();
    }

    return allergenColl;
}