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

项目:AvoinApotti    文件:Logic.java   
protected void onBtnSaveClick() throws PresentationLogicException 
{
    VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();
    if(form.intPeakFlowPre().getValue() == null && form.intPeakFlowPost().getValue()== null)
    {
        engine.showMessage("Either 'Peak Flow Pre' or 'Peak Flow Post' must be entered.");
        return;
    }
    VSLungFunctionTestVo voLungFunction = new VSLungFunctionTestVo();

    voLungFunction.setPeakFlowPre(form.intPeakFlowPre().getValue());
    voLungFunction.setPeakFlowPost(form.intPeakFlowPost().getValue());
    voLungFunction.setTimeInterval(form.intPKTimeInterval().getValue());

    voVitalSign.setLungFunctionTest(voLungFunction);

    String[] arrErrors = voVitalSign.validate();
    if(arrErrors == null)
    {
        try {
            domain.modifyPeakFlow(voVitalSign);
        } catch (StaleObjectException e) {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            refresh();
            return;
        }
    }
    else
    {
        engine.showErrors("Validation Errors", arrErrors);
        return; 
    }

    form.setMode(FormMode.VIEW);

    listPeakFlow();

    form.getLocalContext().setvitalSign(voVitalSign);
    displayRecord(form.getLocalContext().getvitalSign());

    dateIntervalStatus();
}
项目:openMAXIMS    文件:Logic.java   
protected void onBSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    VitalSignsVo voVitalSign = null;

    if (form.getLocalContext().getselectedVitalCapacity() == null)//insert
    {
        voVitalSign = new VitalSignsVo();
        voVitalSign.setAuthoringInformation(form.ctnDetails().customControlAuthoringInfo().getValue());
    }
    else//update
        voVitalSign = form.getLocalContext().getselectedVitalCapacity();

    if(form.ctnDetails().dteTaken().getValue() != null)
    {
        //WDEV-15978
        //if(form.ctnDetails().dteTaken().getValue().isGreaterThan(new Date()))
        if (new DateTime(form.ctnDetails().dteTaken().getValue(), form.ctnDetails().timTaken().getValue()).isGreaterThan(new DateTime()))
        {
            engine.showMessage("'Date/Time Taken' cannot be in the future."); //WDEV-18762
            return;
        }
    }


    voVitalSign.setVitalsTakenDateTime(new DateTime(form.ctnDetails().dteTaken().getValue(), form.ctnDetails().timTaken().getValue()));

    VSLungFunctionTestVo voLungFunction = new VSLungFunctionTestVo();

    voLungFunction.setTidalVolume(form.ctnDetails().intTidalVolume().getValue());
    voLungFunction.setVitalCapacity(form.ctnDetails().decVitalCapacity().getValue());

    voVitalSign.setLungFunctionTest(voLungFunction);

    voVitalSign.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voVitalSign.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    String[] arrErrors = voVitalSign.validate(getUIErrors()); //WDEV-15978

    if(arrErrors != null)
    {
        engine.showErrors(arrErrors);
        return;
    }
    if (!voVitalSign.getAuthoringInformationIsNotNull())
    {
        String[] errors=new String[1];
        errors[0]="AuthoringInformation is mandatory";
        engine.showErrors(errors);
        return;
    }
    try 
    {
        domain.saveVitalSign(voVitalSign);
    } 
    catch (StaleObjectException e1) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
    }

    open();
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnSaveClick() throws PresentationLogicException 
{
    VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();
    if(form.intPeakFlowPre().getValue() == null && form.intPeakFlowPost().getValue()== null)
    {
        engine.showMessage("Either 'Peak Flow Pre' or 'Peak Flow Post' must be entered.");
        return;
    }
    VSLungFunctionTestVo voLungFunction = new VSLungFunctionTestVo();

    voLungFunction.setPeakFlowPre(form.intPeakFlowPre().getValue());
    voLungFunction.setPeakFlowPost(form.intPeakFlowPost().getValue());
    voLungFunction.setTimeInterval(form.intPKTimeInterval().getValue());

    voVitalSign.setLungFunctionTest(voLungFunction);

    String[] arrErrors = voVitalSign.validate();
    if(arrErrors == null)
    {
        try {
            domain.modifyPeakFlow(voVitalSign);
        } catch (StaleObjectException e) {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            refresh();
            return;
        }
    }
    else
    {
        engine.showErrors("Validation Errors", arrErrors);
        return; 
    }

    form.setMode(FormMode.VIEW);

    listPeakFlow();

    form.getLocalContext().setvitalSign(voVitalSign);
    displayRecord(form.getLocalContext().getvitalSign());

    dateIntervalStatus();
}
项目:openMAXIMS    文件:Logic.java   
protected void onBSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    VitalSignsVo voVitalSign = null;

    if (form.getLocalContext().getselectedVitalCapacity() == null)//insert
    {
        voVitalSign = new VitalSignsVo();
        voVitalSign.setAuthoringInformation(form.ctnDetails().customControlAuthoringInfo().getValue());
    }
    else//update
        voVitalSign = form.getLocalContext().getselectedVitalCapacity();

    if(form.ctnDetails().dteTaken().getValue() != null)
    {
        //WDEV-15978
        //if(form.ctnDetails().dteTaken().getValue().isGreaterThan(new Date()))
        if (new DateTime(form.ctnDetails().dteTaken().getValue(), form.ctnDetails().timTaken().getValue()).isGreaterThan(new DateTime()))
        {
            engine.showMessage("'Date/Time Taken' can not be in the future");
            return;
        }
    }


    voVitalSign.setVitalsTakenDateTime(new DateTime(form.ctnDetails().dteTaken().getValue(), form.ctnDetails().timTaken().getValue()));

    VSLungFunctionTestVo voLungFunction = new VSLungFunctionTestVo();

    voLungFunction.setTidalVolume(form.ctnDetails().intTidalVolume().getValue());
    voLungFunction.setVitalCapacity(form.ctnDetails().decVitalCapacity().getValue());

    voVitalSign.setLungFunctionTest(voLungFunction);

    voVitalSign.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voVitalSign.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    String[] arrErrors = voVitalSign.validate(getUIErrors()); //WDEV-15978

    if(arrErrors != null)
    {
        engine.showErrors(arrErrors);
        return;
    }
    if (!voVitalSign.getAuthoringInformationIsNotNull())
    {
        String[] errors=new String[1];
        errors[0]="AuthoringInformation is mandatory";
        engine.showErrors(errors);
        return;
    }
    try 
    {
        domain.saveVitalSign(voVitalSign);
    } 
    catch (StaleObjectException e1) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
    }

    open();
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnSaveClick() throws PresentationLogicException 
{
    VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();
    if(form.intPeakFlowPre().getValue() == null && form.intPeakFlowPost().getValue()== null)
    {
        engine.showMessage("Either 'Peak Flow Pre' or 'Peak Flow Post' must be entered.");
        return;
    }
    VSLungFunctionTestVo voLungFunction = new VSLungFunctionTestVo();

    voLungFunction.setPeakFlowPre(form.intPeakFlowPre().getValue());
    voLungFunction.setPeakFlowPost(form.intPeakFlowPost().getValue());
    voLungFunction.setTimeInterval(form.intPKTimeInterval().getValue());

    voVitalSign.setLungFunctionTest(voLungFunction);

    String[] arrErrors = voVitalSign.validate();
    if(arrErrors == null)
    {
        try {
            domain.modifyPeakFlow(voVitalSign);
        } catch (StaleObjectException e) {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            refresh();
            return;
        }
    }
    else
    {
        engine.showErrors("Validation Errors", arrErrors);
        return; 
    }

    form.setMode(FormMode.VIEW);

    listPeakFlow();

    form.getLocalContext().setvitalSign(voVitalSign);
    displayRecord(form.getLocalContext().getvitalSign());

    dateIntervalStatus();
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    VitalSignsVo voVitalSign = null;

    if (form.getLocalContext().getselectedVitalCapacity() == null)//insert
    {
        voVitalSign = new VitalSignsVo();
        voVitalSign.setAuthoringInformation(form.ctnDetails().customControlAuthoringInfo().getValue());
    }
    else//update
        voVitalSign = form.getLocalContext().getselectedVitalCapacity();

    if(form.ctnDetails().dteTaken().getValue() != null)
    {
        //WDEV-15978
        //if(form.ctnDetails().dteTaken().getValue().isGreaterThan(new Date()))
        if (new DateTime(form.ctnDetails().dteTaken().getValue(), form.ctnDetails().timTaken().getValue()).isGreaterThan(new DateTime()))
        {
            engine.showMessage("'Date/Time Taken' can not be in the future");
            return;
        }
    }


    voVitalSign.setVitalsTakenDateTime(new DateTime(form.ctnDetails().dteTaken().getValue(), form.ctnDetails().timTaken().getValue()));

    VSLungFunctionTestVo voLungFunction = new VSLungFunctionTestVo();

    voLungFunction.setTidalVolume(form.ctnDetails().intTidalVolume().getValue());
    voLungFunction.setVitalCapacity(form.ctnDetails().decVitalCapacity().getValue());

    voVitalSign.setLungFunctionTest(voLungFunction);

    voVitalSign.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    voVitalSign.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    String[] arrErrors = voVitalSign.validate(getUIErrors()); //WDEV-15978

    if(arrErrors != null)
    {
        engine.showErrors(arrErrors);
        return;
    }
    if (!voVitalSign.getAuthoringInformationIsNotNull())
    {
        String[] errors=new String[1];
        errors[0]="AuthoringInformation is mandatory";
        engine.showErrors(errors);
        return;
    }
    try 
    {
        domain.saveVitalSign(voVitalSign);
    } 
    catch (StaleObjectException e1) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
    }

    open();
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnSaveClick() throws PresentationLogicException 
{
    VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();
    if(form.intPeakFlowPre().getValue() == null && form.intPeakFlowPost().getValue()== null)
    {
        engine.showMessage("Either 'Peak Flow Pre' or 'Peak Flow Post' must be entered.");
        return;
    }
    VSLungFunctionTestVo voLungFunction = new VSLungFunctionTestVo();

    voLungFunction.setPeakFlowPre(form.intPeakFlowPre().getValue());
    voLungFunction.setPeakFlowPost(form.intPeakFlowPost().getValue());
    voLungFunction.setTimeInterval(form.intPKTimeInterval().getValue());

    voVitalSign.setLungFunctionTest(voLungFunction);

    String[] arrErrors = voVitalSign.validate();
    if(arrErrors == null)
    {
        try {
            domain.modifyPeakFlow(voVitalSign);
        } catch (StaleObjectException e) {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            refresh();
            return;
        }
    }
    else
    {
        engine.showErrors("Validation Errors", arrErrors);
        return; 
    }

    form.setMode(FormMode.VIEW);

    listPeakFlow();

    form.getLocalContext().setvitalSign(voVitalSign);
    displayRecord(form.getLocalContext().getvitalSign());

    dateIntervalStatus();
}