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

项目:AvoinApotti    文件:Logic.java   
private void setHrgGrid(grdListGrid grid, HrgConfigLiteVoCollection listHRGConfiguration)
{
    // Clear the grid
    grid.getRows().clear();

    // Terminate the execution if a null collection
    if (listHRGConfiguration == null)
        return;

    // Add a new row for each non null VO in the collection
    for (int i = 0; i < listHRGConfiguration.size(); i++)
    {
        HrgConfigLiteVo hrgConfiguration = listHRGConfiguration.get(i);

        // Skip null VOs in the collection
        if (hrgConfiguration == null)
            continue;

        // Create the row for the VO
        setGridRow(grid.getRows().newRow(), hrgConfiguration);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void setGridRow(grdListRow row, HrgConfigLiteVo hrgConfiguration)
{
    // Terminate the execution if a null collection
    if (hrgConfiguration == null)
        return;

    if (row == null)
        throw new CodingRuntimeException("Major Logical Error - Can not set data to a null row");


    // Set up the row with the VO value
    row.setValue(hrgConfiguration);

    // Set up the appearance of the row
    row.setColHRGCode(hrgConfiguration.getHRGCode());
    row.setColHRGDescription(hrgConfiguration.getHRGDescription());

    String cost = "� " + (hrgConfiguration.getCostPounds() == null ? "0." : hrgConfiguration.getCostPounds().toString() + ".") + (hrgConfiguration.getCostPence() == null ? "0" : hrgConfiguration.getCostPence().toString());
    row.setColCost(cost);
}
项目:openMAXIMS    文件:Logic.java   
private void setHrgGrid(grdListGrid grid, HrgConfigLiteVoCollection listHRGConfiguration)
{
    // Clear the grid
    grid.getRows().clear();

    // Terminate the execution if a null collection
    if (listHRGConfiguration == null)
        return;

    // Add a new row for each non null VO in the collection
    for (int i = 0; i < listHRGConfiguration.size(); i++)
    {
        HrgConfigLiteVo hrgConfiguration = listHRGConfiguration.get(i);

        // Skip null VOs in the collection
        if (hrgConfiguration == null)
            continue;

        // Create the row for the VO
        setGridRow(grid.getRows().newRow(), hrgConfiguration);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setGridRow(grdListRow row, HrgConfigLiteVo hrgConfiguration)
{
    // Terminate the execution if a null collection
    if (hrgConfiguration == null)
        return;

    if (row == null)
        throw new CodingRuntimeException("Major Logical Error - Can not set data to a null row");


    // Set up the row with the VO value
    row.setValue(hrgConfiguration);

    // Set up the appearance of the row
    row.setColHRGCode(hrgConfiguration.getHRGCode());
    row.setColHRGDescription(hrgConfiguration.getHRGDescription());

    String cost = "£ " + (hrgConfiguration.getCostPounds() == null ? "0." : hrgConfiguration.getCostPounds().toString() + ".") + (hrgConfiguration.getCostPence() == null ? "0" : hrgConfiguration.getCostPence().toString());
    row.setColCost(cost);
}
项目:openMAXIMS    文件:TaxonomyCodeAdminImpl.java   
public HrgConfigLiteVo saveHRG(HrgConfigLiteVo hrg) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException
{
    if (!hrg.isValidated())
    {
        throw new DomainRuntimeException("HRGConfigLiteVo has not been validated.");
    }

    DomainFactory factory = getDomainFactory();

    HrgConfig hrgDo = HrgConfigLiteVoAssembler.extractHrgConfig(factory, hrg);

    if (hrg.getID_HrgConfigIsNotNull())
    {
        //update
        factory.update(hrgDo);
    }
    else
    {
        //insert
        factory.save(hrgDo);
    }

    return HrgConfigLiteVoAssembler.create(hrgDo);
}
项目:openMAXIMS    文件:Logic.java   
private void setHrgGrid(grdListGrid grid, HrgConfigLiteVoCollection listHRGConfiguration)
{
    // Clear the grid
    grid.getRows().clear();

    // Terminate the execution if a null collection
    if (listHRGConfiguration == null)
        return;

    // Add a new row for each non null VO in the collection
    for (int i = 0; i < listHRGConfiguration.size(); i++)
    {
        HrgConfigLiteVo hrgConfiguration = listHRGConfiguration.get(i);

        // Skip null VOs in the collection
        if (hrgConfiguration == null)
            continue;

        // Create the row for the VO
        setGridRow(grid.getRows().newRow(), hrgConfiguration);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setGridRow(grdListRow row, HrgConfigLiteVo hrgConfiguration)
{
    // Terminate the execution if a null collection
    if (hrgConfiguration == null)
        return;

    if (row == null)
        throw new CodingRuntimeException("Major Logical Error - Can not set data to a null row");


    // Set up the row with the VO value
    row.setValue(hrgConfiguration);

    // Set up the appearance of the row
    row.setColHRGCode(hrgConfiguration.getHRGCode());
    row.setColHRGDescription(hrgConfiguration.getHRGDescription());

    String cost = "� " + (hrgConfiguration.getCostPounds() == null ? "0." : hrgConfiguration.getCostPounds().toString() + ".") + (hrgConfiguration.getCostPence() == null ? "0" : hrgConfiguration.getCostPence().toString());
    row.setColCost(cost);
}
项目:openmaxims-linux    文件:Logic.java   
private void setHrgGrid(grdListGrid grid, HrgConfigLiteVoCollection listHRGConfiguration)
{
    // Clear the grid
    grid.getRows().clear();

    // Terminate the execution if a null collection
    if (listHRGConfiguration == null)
        return;

    // Add a new row for each non null VO in the collection
    for (int i = 0; i < listHRGConfiguration.size(); i++)
    {
        HrgConfigLiteVo hrgConfiguration = listHRGConfiguration.get(i);

        // Skip null VOs in the collection
        if (hrgConfiguration == null)
            continue;

        // Create the row for the VO
        setGridRow(grid.getRows().newRow(), hrgConfiguration);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void setGridRow(grdListRow row, HrgConfigLiteVo hrgConfiguration)
{
    // Terminate the execution if a null collection
    if (hrgConfiguration == null)
        return;

    if (row == null)
        throw new CodingRuntimeException("Major Logical Error - Can not set data to a null row");


    // Set up the row with the VO value
    row.setValue(hrgConfiguration);

    // Set up the appearance of the row
    row.setColHRGCode(hrgConfiguration.getHRGCode());
    row.setColHRGDescription(hrgConfiguration.getHRGDescription());

    String cost = "£ " + (hrgConfiguration.getCostPounds() == null ? "0." : hrgConfiguration.getCostPounds().toString() + ".") + (hrgConfiguration.getCostPence() == null ? "0" : hrgConfiguration.getCostPence().toString());
    row.setColCost(cost);
}
项目:openMAXIMS    文件:TaxonomyCodeAdminImpl.java   
public HrgConfigLiteVo getHRGCode(String code)
{
    if(code == null || code.trim().length() == 0)
        return null;

    HrgConfigLiteVoCollection coll = HrgConfigLiteVoAssembler.createHrgConfigLiteVoCollectionFromHrgConfig(getDomainFactory().find("from HrgConfig hrg WHERE hrg.hRGCode = :HRGCode", new String[] {"HRGCode"}, new Object[] {code}));

    if (coll != null && coll.size()>0)
        return coll.get(0);

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private ReferralExternalCodingVo populateCodingItemsWithDescription(ReferralExternalCodingVo referralCodingVo)
{
    if(referralCodingVo == null || referralCodingVo.getCodingItems() == null)
        return null;

    for(ReferralExternalCodingItemVo item : referralCodingVo.getCodingItems())
    {
        if(item == null)
            continue;

        if(item.getID_ReferralCodingItem() == null || item.getItemDescription() == null)
        {
            if(item.getICD10() != null)
            {
                Icd10AmProcVo icd10Code = domain.getICD10(item.getICD10());
                item.setItemShortDescription(icd10Code != null ? icd10Code.getAscii_short_desc() : null);
                item.setItemDescription(icd10Code != null ? icd10Code.getAscii_desc() : null);
            }
            else if(item.getOPCS4() != null)
            {
                Opcs4Vo opcs4Code = domain.getOPCS4(item.getOPCS4());
                item.setItemShortDescription(opcs4Code != null ? opcs4Code.getOpname3() : null);
                item.setItemDescription(opcs4Code != null ? opcs4Code.getOpname4() : null);
            }
            else if(item.getHRG() != null)
            {
                HrgConfigLiteVo hrgCode = domain.getHRG(item.getHRG());
                item.setItemDescription(hrgCode != null ? hrgCode.getHRGDescription() : null);
            }
        }
    }

    return referralCodingVo;
}
项目:openMAXIMS    文件:ReferralExternalCodingImpl.java   
public HrgConfigLiteVo getHRG(String code)
{
    if(code == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String hqlList  = "select hrg from HrgConfig as hrg where hrg.hRGCode = :Code";
    List codesList = factory.find(hqlList, new String[] {"Code"}, new Object[] {code});

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

    return HrgConfigLiteVoAssembler.create((HrgConfig) codesList.get(0));
}