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

项目:AvoinApotti    文件:Logic.java   
private void saveInactiveRecord() 
{
    PatientMedicationVo voMed = form.grdMedication().getValue();
    voMed.setIsDiscontinued(Boolean.TRUE);
    voMed.setIsDiscontinuedDate(new Date());
    voMed.setIsDiscontinuedHcp((Hcp)domain.getHcpUser());

    //-------wdev-14628
    if( form.getGlobalContext().Clinical.getReasonIsNotNull())
    {
        ReasonVo tempVo = form.getGlobalContext().Clinical.getReason();
        LookupInstVo inst = null;
        if( tempVo.getInstanceLookupIdIsNotNull())
            inst = LookupHelper.getMedicationDoseReasonStoppedInstance(this.domain.getLookupService(),tempVo.getInstanceLookupId());

        if( inst != null)
            voMed.setIsDiscontinuedReason((MedicationDoseReasonStopped) inst);

        voMed.setIsDiscontinuedReasonText(tempVo.getComment());
    }
    //----------------
    String[] errors = voMed.validate();

    if (errors != null)
    {
        engine.showErrors(errors);
        return;
    }   

    try 
    {
        form.getLocalContext().setRecord(domain.saveMedicationOnAdmission(voMed));
        if (isDialog())
        {
            form.getGlobalContext().Clinical.setDialogFormName(engine.getFormName());
        }
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
    }
    //form.setMode(FormMode.VIEW);
    open();
}
项目:AvoinApotti    文件:Logic.java   
private void inactivateInstance()
{
    //form.getGlobalContext().Core.setYesNoDialogMessage("Are you sure you wish to make this record inactive");
    //engine.open(form.getForms().Core.YesNoDialog);
    engine.open(form.getForms().Clinical.ReasonDialog, new Object[]{MedicationDoseReasonStopped.TYPE_ID});
}
项目:openMAXIMS    文件:Logic.java   
private void saveInactiveRecord() 
{
    PatientMedicationVo voMed = form.grdMedication().getValue();
    voMed.setIsDiscontinued(Boolean.TRUE);
    voMed.setIsDiscontinuedDate(new Date());
    voMed.setIsDiscontinuedHcp((Hcp)domain.getHcpUser());

    //-------wdev-14628
    if( form.getGlobalContext().Clinical.getReasonIsNotNull())
    {
        ReasonVo tempVo = form.getGlobalContext().Clinical.getReason();
        LookupInstVo inst = null;
        if( tempVo.getInstanceLookupIdIsNotNull())
            inst = LookupHelper.getMedicationDoseReasonStoppedInstance(this.domain.getLookupService(),tempVo.getInstanceLookupId());

        if( inst != null)
            voMed.setIsDiscontinuedReason((MedicationDoseReasonStopped) inst);

        voMed.setIsDiscontinuedReasonText(tempVo.getComment());
    }
    //----------------
    String[] errors = voMed.validate();

    if (errors != null)
    {
        engine.showErrors(errors);
        return;
    }   

    try 
    {
        form.getLocalContext().setRecord(domain.saveMedicationOnAdmission(voMed));
        if (isDialog())
        {
            form.getGlobalContext().Clinical.setDialogFormName(engine.getFormName());
        }
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
    }
    //form.setMode(FormMode.VIEW);
    open();
}
项目:openMAXIMS    文件:Logic.java   
private void inactivateInstance()
{
    //form.getGlobalContext().Core.setYesNoDialogMessage("Are you sure you wish to make this record inactive");
    //engine.open(form.getForms().Core.YesNoDialog);
    engine.open(form.getForms().Clinical.ReasonDialog, new Object[]{MedicationDoseReasonStopped.TYPE_ID});
}
项目:openMAXIMS    文件:Logic.java   
private void saveInactiveRecord() 
{
    PatientMedicationVo voMed = form.grdMedication().getValue();
    voMed.setIsDiscontinued(Boolean.TRUE);
    voMed.setIsDiscontinuedDate(new Date());
    voMed.setIsDiscontinuedHcp((Hcp)domain.getHcpUser());

    //-------wdev-14628
    if( form.getGlobalContext().Clinical.getReasonIsNotNull())
    {
        ReasonVo tempVo = form.getGlobalContext().Clinical.getReason();
        LookupInstVo inst = null;
        if( tempVo.getInstanceLookupIdIsNotNull())
            inst = LookupHelper.getMedicationDoseReasonStoppedInstance(this.domain.getLookupService(),tempVo.getInstanceLookupId());

        if( inst != null)
            voMed.setIsDiscontinuedReason((MedicationDoseReasonStopped) inst);

        voMed.setIsDiscontinuedReasonText(tempVo.getComment());
    }
    //----------------
    String[] errors = voMed.validate();

    if (errors != null)
    {
        engine.showErrors(errors);
        return;
    }   

    try 
    {
        form.getLocalContext().setRecord(domain.saveMedicationOnAdmission(voMed));
        if (isDialog())
        {
            form.getGlobalContext().Clinical.setDialogFormName(engine.getFormName());
        }
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
    }
    //form.setMode(FormMode.VIEW);
    open();
}
项目:openMAXIMS    文件:Logic.java   
private void inactivateInstance()
{
    //form.getGlobalContext().Core.setYesNoDialogMessage("Are you sure you wish to make this record inactive");
    //engine.open(form.getForms().Core.YesNoDialog);
    engine.open(form.getForms().Clinical.ReasonDialog, new Object[]{MedicationDoseReasonStopped.TYPE_ID});
}
项目:openmaxims-linux    文件:Logic.java   
private void saveInactiveRecord() 
{
    PatientMedicationVo voMed = form.grdMedication().getValue();
    voMed.setIsDiscontinued(Boolean.TRUE);
    voMed.setIsDiscontinuedDate(new Date());
    voMed.setIsDiscontinuedHcp((Hcp)domain.getHcpUser());

    //-------wdev-14628
    if( form.getGlobalContext().Clinical.getReasonIsNotNull())
    {
        ReasonVo tempVo = form.getGlobalContext().Clinical.getReason();
        LookupInstVo inst = null;
        if( tempVo.getInstanceLookupIdIsNotNull())
            inst = LookupHelper.getMedicationDoseReasonStoppedInstance(this.domain.getLookupService(),tempVo.getInstanceLookupId());

        if( inst != null)
            voMed.setIsDiscontinuedReason((MedicationDoseReasonStopped) inst);

        voMed.setIsDiscontinuedReasonText(tempVo.getComment());
    }
    //----------------
    String[] errors = voMed.validate();

    if (errors != null)
    {
        engine.showErrors(errors);
        return;
    }   

    try 
    {
        form.getLocalContext().setRecord(domain.saveMedicationOnAdmission(voMed));
        if (isDialog())
        {
            form.getGlobalContext().Clinical.setDialogFormName(engine.getFormName());
        }
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
    }
    //form.setMode(FormMode.VIEW);
    open();
}
项目:openmaxims-linux    文件:Logic.java   
private void inactivateInstance()
{
    //form.getGlobalContext().Core.setYesNoDialogMessage("Are you sure you wish to make this record inactive");
    //engine.open(form.getForms().Core.YesNoDialog);
    engine.open(form.getForms().Clinical.ReasonDialog, new Object[]{MedicationDoseReasonStopped.TYPE_ID});
}