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

项目:AvoinApotti    文件:Logic.java   
private boolean checkExistingTime(DailyFluidBalanceVo voDaily, FluidBalanceInstanceVo voFluidBalInst)
{
    FluidBalanceInstanceVoCollection voFluidBalInstances = voDaily.getFluidBalanceInstances();
    boolean result = false;
    if(voFluidBalInstances != null)
    {
        for(int x=0; x<voFluidBalInstances.size(); x++)
        {
            FluidBalanceInstanceVo voFluidBalInstance = voFluidBalInstances.get(x);
            Time existingTime = voFluidBalInstance.getStartTime();
            Time newTime = voFluidBalInst.getStartTime();

            if(newTime.isLessOrEqualThan(existingTime))
            {
                result = true;
                break;
            }
        }
        return result;
    }   
    return result;
}
项目:AvoinApotti    文件:Logic.java   
private void populateDataFromScreen() 
{
    SignatoryShiftDetailsVo voChosenSignatoryShiftDetails = form.getGlobalContext().Core.getChosenSignatoryShiftDetailsVo();
    DailyFluidBalanceVo voDFB = form.getGlobalContext().Core.getCurrentDailyFluidBalanceVo();

    DateTime dtNow = new DateTime();
    voChosenSignatoryShiftDetails.setSignedOffBy(form.qmbConfirmed().getValue());
    voChosenSignatoryShiftDetails.setDateTimeSigned(dtNow);

    for (int i = 0 ; i < voDFB.getFluidBalanceInstances().size() ; i++)
    {
        if (voDFB.getFluidBalanceInstances().get(i).getSignatoryShiftIsNotNull() 
                && voDFB.getFluidBalanceInstances().get(i).getSignatoryShift().equals(voChosenSignatoryShiftDetails))
        {
            FluidBalanceInstanceVo voFluid = voDFB.getFluidBalanceInstances().get(i);

            voFluid.setConfirmingDateTime(dtNow);
            voFluid.setConfirmingHCP(form.qmbConfirmed().getValue());
            voFluid.setIsConfirmed(Boolean.TRUE);

            voDFB.getFluidBalanceInstances().set(i, voFluid);
        }
    }

    form.getLocalContext().setCurrentDailyFluidBalanceVo(voDFB);
}
项目:openMAXIMS    文件:Logic.java   
private boolean checkExistingTime(DailyFluidBalanceVo voDaily, FluidBalanceInstanceVo voFluidBalInst)
{
    FluidBalanceInstanceVoCollection voFluidBalInstances = voDaily.getFluidBalanceInstances();
    boolean result = false;
    if(voFluidBalInstances != null)
    {
        for(int x=0; x<voFluidBalInstances.size(); x++)
        {
            FluidBalanceInstanceVo voFluidBalInstance = voFluidBalInstances.get(x);
            Time existingTime = voFluidBalInstance.getStartTime();
            Time newTime = voFluidBalInst.getStartTime();

            if(newTime.isLessOrEqualThan(existingTime))
            {
                result = true;
                break;
            }
        }
        return result;
    }   
    return result;
}
项目:openMAXIMS    文件:Logic.java   
private void populateDataFromScreen() 
{
    SignatoryShiftDetailsVo voChosenSignatoryShiftDetails = form.getGlobalContext().Core.getChosenSignatoryShiftDetailsVo();
    DailyFluidBalanceVo voDFB = form.getGlobalContext().Core.getCurrentDailyFluidBalanceVo();

    DateTime dtNow = new DateTime();
    voChosenSignatoryShiftDetails.setSignedOffBy(form.qmbConfirmed().getValue());
    voChosenSignatoryShiftDetails.setDateTimeSigned(dtNow);

    for (int i = 0 ; i < voDFB.getFluidBalanceInstances().size() ; i++)
    {
        if (voDFB.getFluidBalanceInstances().get(i).getSignatoryShiftIsNotNull() 
                && voDFB.getFluidBalanceInstances().get(i).getSignatoryShift().equals(voChosenSignatoryShiftDetails))
        {
            FluidBalanceInstanceVo voFluid = voDFB.getFluidBalanceInstances().get(i);

            voFluid.setConfirmingDateTime(dtNow);
            voFluid.setConfirmingHCP(form.qmbConfirmed().getValue());
            voFluid.setIsConfirmed(Boolean.TRUE);

            voDFB.getFluidBalanceInstances().set(i, voFluid);
        }
    }

    form.getLocalContext().setCurrentDailyFluidBalanceVo(voDFB);
}
项目:openMAXIMS    文件:Logic.java   
private boolean checkExistingTime(DailyFluidBalanceVo voDaily, FluidBalanceInstanceVo voFluidBalInst)
{
    FluidBalanceInstanceVoCollection voFluidBalInstances = voDaily.getFluidBalanceInstances();
    boolean result = false;
    if(voFluidBalInstances != null)
    {
        for(int x=0; x<voFluidBalInstances.size(); x++)
        {
            FluidBalanceInstanceVo voFluidBalInstance = voFluidBalInstances.get(x);
            Time existingTime = voFluidBalInstance.getStartTime();
            Time newTime = voFluidBalInst.getStartTime();

            if(newTime.isLessOrEqualThan(existingTime))
            {
                result = true;
                break;
            }
        }
        return result;
    }   
    return result;
}
项目:openMAXIMS    文件:Logic.java   
private void populateDataFromScreen() 
{
    SignatoryShiftDetailsVo voChosenSignatoryShiftDetails = form.getGlobalContext().Core.getChosenSignatoryShiftDetailsVo();
    DailyFluidBalanceVo voDFB = form.getGlobalContext().Core.getCurrentDailyFluidBalanceVo();

    DateTime dtNow = new DateTime();
    voChosenSignatoryShiftDetails.setSignedOffBy(form.qmbConfirmed().getValue());
    voChosenSignatoryShiftDetails.setDateTimeSigned(dtNow);

    for (int i = 0 ; i < voDFB.getFluidBalanceInstances().size() ; i++)
    {
        if (voDFB.getFluidBalanceInstances().get(i).getSignatoryShiftIsNotNull() 
                && voDFB.getFluidBalanceInstances().get(i).getSignatoryShift().equals(voChosenSignatoryShiftDetails))
        {
            FluidBalanceInstanceVo voFluid = voDFB.getFluidBalanceInstances().get(i);

            voFluid.setConfirmingDateTime(dtNow);
            voFluid.setConfirmingHCP(form.qmbConfirmed().getValue());
            voFluid.setIsConfirmed(Boolean.TRUE);

            voDFB.getFluidBalanceInstances().set(i, voFluid);
        }
    }

    form.getLocalContext().setCurrentDailyFluidBalanceVo(voDFB);
}
项目:openmaxims-linux    文件:Logic.java   
private boolean checkExistingTime(DailyFluidBalanceVo voDaily, FluidBalanceInstanceVo voFluidBalInst)
{
    FluidBalanceInstanceVoCollection voFluidBalInstances = voDaily.getFluidBalanceInstances();
    boolean result = false;
    if(voFluidBalInstances != null)
    {
        for(int x=0; x<voFluidBalInstances.size(); x++)
        {
            FluidBalanceInstanceVo voFluidBalInstance = voFluidBalInstances.get(x);
            Time existingTime = voFluidBalInstance.getStartTime();
            Time newTime = voFluidBalInst.getStartTime();

            if(newTime.isLessOrEqualThan(existingTime))
            {
                result = true;
                break;
            }
        }
        return result;
    }   
    return result;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateDataFromScreen() 
{
    SignatoryShiftDetailsVo voChosenSignatoryShiftDetails = form.getGlobalContext().Core.getChosenSignatoryShiftDetailsVo();
    DailyFluidBalanceVo voDFB = form.getGlobalContext().Core.getCurrentDailyFluidBalanceVo();

    DateTime dtNow = new DateTime();
    voChosenSignatoryShiftDetails.setSignedOffBy(form.qmbConfirmed().getValue());
    voChosenSignatoryShiftDetails.setDateTimeSigned(dtNow);

    for (int i = 0 ; i < voDFB.getFluidBalanceInstances().size() ; i++)
    {
        if (voDFB.getFluidBalanceInstances().get(i).getSignatoryShiftIsNotNull() 
                && voDFB.getFluidBalanceInstances().get(i).getSignatoryShift().equals(voChosenSignatoryShiftDetails))
        {
            FluidBalanceInstanceVo voFluid = voDFB.getFluidBalanceInstances().get(i);

            voFluid.setConfirmingDateTime(dtNow);
            voFluid.setConfirmingHCP(form.qmbConfirmed().getValue());
            voFluid.setIsConfirmed(Boolean.TRUE);

            voDFB.getFluidBalanceInstances().set(i, voFluid);
        }
    }

    form.getLocalContext().setCurrentDailyFluidBalanceVo(voDFB);
}
项目:AvoinApotti    文件:Logic.java   
protected void onGrdBalanceSelectionChanged() throws ims.framework.exceptions.PresentationLogicException
{
    updateControlsState();

    ValueObject value = form.grdDetails().getValue();

    form.getLocalContext().setRIERecord(value instanceof DailyFluidBalanceVo ? (DailyFluidBalanceVo)value : null);
}
项目:AvoinApotti    文件:Logic.java   
private void updateFluid() 
{
    if (form.grdDetails().getValue() instanceof FluidBalanceInstanceVo)
    {
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceInstanceVo((FluidBalanceInstanceVo)form.grdDetails().getSelectedRow().getValue());
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo((DailyFluidBalanceVo)form.grdDetails().getSelectedRow().getParentRow().getParentRow().getValue());

        engine.open(form.getForms().Core.FluidBalanceDetails);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void confirmShift() 
{
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo)
    {
        form.getGlobalContext().Core.setChosenSignatoryShiftDetailsVo((SignatoryShiftDetailsVo)form.grdDetails().getSelectedRow().getValue());
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo((DailyFluidBalanceVo)form.grdDetails().getSelectedRow().getParentRow().getValue());

        engine.open(form.getForms().Core.FluidBalanceConfirm);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateGrid(DailyFluidBalanceVoCollection coll)
{
    form.grdDetails().getRows().clear();

    if (coll != null)
    {
        for (int i=0; i<coll.size(); i++)
        {
            DailyFluidBalanceVo bal = coll.get(i);
            displayParentAndItsChild(bal);
        }
    }
    form.grdDetails().expandAll();
}
项目:AvoinApotti    文件:Logic.java   
private String displayHeader(DailyFluidBalanceVo voDailyFluidBal)
{       
    if(voDailyFluidBal.getShiftDetailsIsNotNull())
    {
        ShiftDetailsVo voShift = voDailyFluidBal.getShiftDetails();
        String shiftHeader = voShift.getStartDateTime() + " - " + voShift.getEndDateTime();
        return shiftHeader;
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private boolean save() 
{
    populateDataFromScreen();

    DailyFluidBalanceVo voBalanace = form.getLocalContext().getCurrentDailyFluidBalanceVo();

    String[] errors = voBalanace.validate();
    if (errors != null)
    {
        engine.showErrors(errors);
        return false;
    }

    try
    {
        voBalanace = domain.saveDailyFluidBalance(voBalanace);
    }
    catch (StaleObjectException sox)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return false;
    } 
    catch (DomainInterfaceException e)
    {
        engine.showMessage(e.getMessage());
        return false;
    }

    form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo(voBalanace);

    return true;
}
项目:AvoinApotti    文件:HourlyFluidBalanceDetailsImpl.java   
public DailyFluidBalanceVo saveDailyFluidBalance(DailyFluidBalanceVo dfbVo) throws DomainInterfaceException, StaleObjectException 
{
    if (!dfbVo.isValidated())
        throw new DomainRuntimeException("FluidBalance details have not been validated!");

    DomainFactory factory = getDomainFactory();
    DailyFluidBalance domBalance = DailyFluidBalanceVoAssembler.extractDailyFluidBalance(factory, dfbVo);

    factory.save(domBalance);

    return (DailyFluidBalanceVoAssembler.create(domBalance));
}
项目:AvoinApotti    文件:VitalSignsVentilationChartDialogImpl.java   
public DailyFluidBalanceVo listFluidBalance(DateTime date, CareContextRefVo refCareContext)
{
    DomainFactory factory = getDomainFactory();
    String filter = " from DailyFluidBalance fb ";
    String andStr = " ";
    StringBuffer filterString = new StringBuffer();
    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();

    if (refCareContext != null)
    {
        filterString.append(" fb.careContext.id = :careContext ");
        markerNames.add("careContext");
        markerValues.add(refCareContext.getID_CareContext());
        andStr = " and ";
    }
    if(date != null)
    {
        filterString.append(andStr + " fb.shiftDetails.startDateTime = :dateFrom ");
        markerNames.add("dateFrom");
        markerValues.add(date.getJavaDate());
    }

    if(andStr.equals(" and "))
        filter += " where ";
    filter += filterString.toString();

    List dailyFluidList = factory.find(filter, markerNames, markerValues);
    if(dailyFluidList != null && dailyFluidList.size()>0)
        return DailyFluidBalanceVoAssembler.create((DailyFluidBalance) dailyFluidList.get(0));

    return null;
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdBalanceSelectionChanged() throws ims.framework.exceptions.PresentationLogicException
{
    updateControlsState();

    ValueObject value = form.grdDetails().getValue();

    form.getLocalContext().setRIERecord(value instanceof DailyFluidBalanceVo ? (DailyFluidBalanceVo)value : null);
}
项目:openMAXIMS    文件:Logic.java   
private void updateFluid() 
{
    if (form.grdDetails().getValue() instanceof FluidBalanceInstanceVo)
    {
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceInstanceVo((FluidBalanceInstanceVo)form.grdDetails().getSelectedRow().getValue());
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo((DailyFluidBalanceVo)form.grdDetails().getSelectedRow().getParentRow().getParentRow().getValue());

        engine.open(form.getForms().Core.FluidBalanceDetails);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void confirmShift() 
{
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo)
    {
        form.getGlobalContext().Core.setChosenSignatoryShiftDetailsVo((SignatoryShiftDetailsVo)form.grdDetails().getSelectedRow().getValue());
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo((DailyFluidBalanceVo)form.grdDetails().getSelectedRow().getParentRow().getValue());

        engine.open(form.getForms().Core.FluidBalanceConfirm);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateGrid(DailyFluidBalanceVoCollection coll)
{
    form.grdDetails().getRows().clear();

    if (coll != null)
    {
        for (int i=0; i<coll.size(); i++)
        {
            DailyFluidBalanceVo bal = coll.get(i);
            displayParentAndItsChild(bal);
        }
    }
    form.grdDetails().expandAll();
}
项目:openMAXIMS    文件:Logic.java   
private String displayHeader(DailyFluidBalanceVo voDailyFluidBal)
{       
    if(voDailyFluidBal.getShiftDetailsIsNotNull())
    {
        ShiftDetailsVo voShift = voDailyFluidBal.getShiftDetails();
        String shiftHeader = voShift.getStartDateTime() + " - " + voShift.getEndDateTime();
        return shiftHeader;
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private boolean save() 
{
    populateDataFromScreen();

    DailyFluidBalanceVo voBalanace = form.getLocalContext().getCurrentDailyFluidBalanceVo();

    String[] errors = voBalanace.validate();
    if (errors != null)
    {
        engine.showErrors(errors);
        return false;
    }

    try
    {
        voBalanace = domain.saveDailyFluidBalance(voBalanace);
    }
    catch (StaleObjectException sox)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return false;
    } 
    catch (DomainInterfaceException e)
    {
        engine.showMessage(e.getMessage());
        return false;
    }

    form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo(voBalanace);

    return true;
}
项目:openMAXIMS    文件:HourlyFluidBalanceDetailsImpl.java   
public DailyFluidBalanceVo saveDailyFluidBalance(DailyFluidBalanceVo dfbVo) throws DomainInterfaceException, StaleObjectException 
{
    if (!dfbVo.isValidated())
        throw new DomainRuntimeException("FluidBalance details have not been validated!");

    DomainFactory factory = getDomainFactory();
    DailyFluidBalance domBalance = DailyFluidBalanceVoAssembler.extractDailyFluidBalance(factory, dfbVo);

    factory.save(domBalance);

    return (DailyFluidBalanceVoAssembler.create(domBalance));
}
项目:openMAXIMS    文件:VitalSignsVentilationChartDialogImpl.java   
public DailyFluidBalanceVo listFluidBalance(DateTime date, CareContextRefVo refCareContext)
{
    DomainFactory factory = getDomainFactory();
    String filter = " from DailyFluidBalance fb ";
    String andStr = " ";
    StringBuffer filterString = new StringBuffer();
    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();

    if (refCareContext != null)
    {
        filterString.append(" fb.careContext.id = :careContext ");
        markerNames.add("careContext");
        markerValues.add(refCareContext.getID_CareContext());
        andStr = " and ";
    }
    if(date != null)
    {
        filterString.append(andStr + " fb.shiftDetails.startDateTime = :dateFrom ");
        markerNames.add("dateFrom");
        markerValues.add(date.getJavaDate());
    }

    if(andStr.equals(" and "))
        filter += " where ";
    filter += filterString.toString();

    List dailyFluidList = factory.find(filter, markerNames, markerValues);
    if(dailyFluidList != null && dailyFluidList.size()>0)
        return DailyFluidBalanceVoAssembler.create((DailyFluidBalance) dailyFluidList.get(0));

    return null;
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdBalanceSelectionChanged() throws ims.framework.exceptions.PresentationLogicException
{
    updateControlsState();

    ValueObject value = form.grdDetails().getValue();

    form.getLocalContext().setRIERecord(value instanceof DailyFluidBalanceVo ? (DailyFluidBalanceVo)value : null);
}
项目:openMAXIMS    文件:Logic.java   
private void updateFluid() 
{
    if (form.grdDetails().getValue() instanceof FluidBalanceInstanceVo)
    {
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceInstanceVo((FluidBalanceInstanceVo)form.grdDetails().getSelectedRow().getValue());
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo((DailyFluidBalanceVo)form.grdDetails().getSelectedRow().getParentRow().getParentRow().getValue());

        engine.open(form.getForms().Core.FluidBalanceDetails);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void confirmShift() 
{
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo)
    {
        form.getGlobalContext().Core.setChosenSignatoryShiftDetailsVo((SignatoryShiftDetailsVo)form.grdDetails().getSelectedRow().getValue());
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo((DailyFluidBalanceVo)form.grdDetails().getSelectedRow().getParentRow().getValue());

        engine.open(form.getForms().Core.FluidBalanceConfirm);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateGrid(DailyFluidBalanceVoCollection coll)
{
    form.grdDetails().getRows().clear();

    if (coll != null)
    {
        for (int i=0; i<coll.size(); i++)
        {
            DailyFluidBalanceVo bal = coll.get(i);
            displayParentAndItsChild(bal);
        }
    }
    form.grdDetails().expandAll();
}
项目:openMAXIMS    文件:Logic.java   
private String displayHeader(DailyFluidBalanceVo voDailyFluidBal)
{       
    if(voDailyFluidBal.getShiftDetailsIsNotNull())
    {
        ShiftDetailsVo voShift = voDailyFluidBal.getShiftDetails();
        String shiftHeader = voShift.getStartDateTime() + " - " + voShift.getEndDateTime();
        return shiftHeader;
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private boolean save() 
{
    populateDataFromScreen();

    DailyFluidBalanceVo voBalanace = form.getLocalContext().getCurrentDailyFluidBalanceVo();

    String[] errors = voBalanace.validate();
    if (errors != null)
    {
        engine.showErrors(errors);
        return false;
    }

    try
    {
        voBalanace = domain.saveDailyFluidBalance(voBalanace);
    }
    catch (StaleObjectException sox)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return false;
    } 
    catch (DomainInterfaceException e)
    {
        engine.showMessage(e.getMessage());
        return false;
    }

    form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo(voBalanace);

    return true;
}
项目:openMAXIMS    文件:HourlyFluidBalanceDetailsImpl.java   
public DailyFluidBalanceVo saveDailyFluidBalance(DailyFluidBalanceVo dfbVo) throws DomainInterfaceException, StaleObjectException 
{
    if (!dfbVo.isValidated())
        throw new DomainRuntimeException("FluidBalance details have not been validated!");

    DomainFactory factory = getDomainFactory();
    DailyFluidBalance domBalance = DailyFluidBalanceVoAssembler.extractDailyFluidBalance(factory, dfbVo);

    factory.save(domBalance);

    return (DailyFluidBalanceVoAssembler.create(domBalance));
}
项目:openMAXIMS    文件:VitalSignsVentilationChartDialogImpl.java   
public DailyFluidBalanceVo listFluidBalance(DateTime date, CareContextRefVo refCareContext)
{
    DomainFactory factory = getDomainFactory();
    String filter = " from DailyFluidBalance fb ";
    String andStr = " ";
    StringBuffer filterString = new StringBuffer();
    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();

    if (refCareContext != null)
    {
        filterString.append(" fb.careContext.id = :careContext ");
        markerNames.add("careContext");
        markerValues.add(refCareContext.getID_CareContext());
        andStr = " and ";
    }
    if(date != null)
    {
        filterString.append(andStr + " fb.shiftDetails.startDateTime = :dateFrom ");
        markerNames.add("dateFrom");
        markerValues.add(date.getJavaDate());
    }

    if(andStr.equals(" and "))
        filter += " where ";
    filter += filterString.toString();

    List dailyFluidList = factory.find(filter, markerNames, markerValues);
    if(dailyFluidList != null && dailyFluidList.size()>0)
        return DailyFluidBalanceVoAssembler.create((DailyFluidBalance) dailyFluidList.get(0));

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
protected void onGrdBalanceSelectionChanged() throws ims.framework.exceptions.PresentationLogicException
{
    updateControlsState();

    ValueObject value = form.grdDetails().getValue();

    form.getLocalContext().setRIERecord(value instanceof DailyFluidBalanceVo ? (DailyFluidBalanceVo)value : null);
}
项目:openmaxims-linux    文件:Logic.java   
private void updateFluid() 
{
    if (form.grdDetails().getValue() instanceof FluidBalanceInstanceVo)
    {
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceInstanceVo((FluidBalanceInstanceVo)form.grdDetails().getSelectedRow().getValue());
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo((DailyFluidBalanceVo)form.grdDetails().getSelectedRow().getParentRow().getParentRow().getValue());

        engine.open(form.getForms().Core.FluidBalanceDetails);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void confirmShift() 
{
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo)
    {
        form.getGlobalContext().Core.setChosenSignatoryShiftDetailsVo((SignatoryShiftDetailsVo)form.grdDetails().getSelectedRow().getValue());
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo((DailyFluidBalanceVo)form.grdDetails().getSelectedRow().getParentRow().getValue());

        engine.open(form.getForms().Core.FluidBalanceConfirm);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateGrid(DailyFluidBalanceVoCollection coll)
{
    form.grdDetails().getRows().clear();

    if (coll != null)
    {
        for (int i=0; i<coll.size(); i++)
        {
            DailyFluidBalanceVo bal = coll.get(i);
            displayParentAndItsChild(bal);
        }
    }
    form.grdDetails().expandAll();
}
项目:openmaxims-linux    文件:Logic.java   
private String displayHeader(DailyFluidBalanceVo voDailyFluidBal)
{       
    if(voDailyFluidBal.getShiftDetailsIsNotNull())
    {
        ShiftDetailsVo voShift = voDailyFluidBal.getShiftDetails();
        String shiftHeader = voShift.getStartDateTime() + " - " + voShift.getEndDateTime();
        return shiftHeader;
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean save() 
{
    populateDataFromScreen();

    DailyFluidBalanceVo voBalanace = form.getLocalContext().getCurrentDailyFluidBalanceVo();

    String[] errors = voBalanace.validate();
    if (errors != null)
    {
        engine.showErrors(errors);
        return false;
    }

    try
    {
        voBalanace = domain.saveDailyFluidBalance(voBalanace);
    }
    catch (StaleObjectException sox)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return false;
    } 
    catch (DomainInterfaceException e)
    {
        engine.showMessage(e.getMessage());
        return false;
    }

    form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo(voBalanace);

    return true;
}
项目:openmaxims-linux    文件:HourlyFluidBalanceDetailsImpl.java   
public DailyFluidBalanceVo saveDailyFluidBalance(DailyFluidBalanceVo dfbVo) throws DomainInterfaceException, StaleObjectException 
{
    if (!dfbVo.isValidated())
        throw new DomainRuntimeException("FluidBalance details have not been validated!");

    DomainFactory factory = getDomainFactory();
    DailyFluidBalance domBalance = DailyFluidBalanceVoAssembler.extractDailyFluidBalance(factory, dfbVo);

    factory.save(domBalance);

    return (DailyFluidBalanceVoAssembler.create(domBalance));
}
项目:openmaxims-linux    文件:VitalSignsVentilationChartDialogImpl.java   
public DailyFluidBalanceVo listFluidBalance(DateTime date, CareContextRefVo refCareContext)
{
    DomainFactory factory = getDomainFactory();
    String filter = " from DailyFluidBalance fb ";
    String andStr = " ";
    StringBuffer filterString = new StringBuffer();
    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();

    if (refCareContext != null)
    {
        filterString.append(" fb.careContext.id = :careContext ");
        markerNames.add("careContext");
        markerValues.add(refCareContext.getID_CareContext());
        andStr = " and ";
    }
    if(date != null)
    {
        filterString.append(andStr + " fb.shiftDetails.startDateTime = :dateFrom ");
        markerNames.add("dateFrom");
        markerValues.add(date.getJavaDate());
    }

    if(andStr.equals(" and "))
        filter += " where ";
    filter += filterString.toString();

    List dailyFluidList = factory.find(filter, markerNames, markerValues);
    if(dailyFluidList != null && dailyFluidList.size()>0)
        return DailyFluidBalanceVoAssembler.create((DailyFluidBalance) dailyFluidList.get(0));

    return null;
}