Java 类ims.clinical.vo.DementiaVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private boolean save() 
{
    // TODO Auto-generated method stub
    if(form.getLocalContext().getselectedDementiaIsNotNull() && form.cmbReason().getValue()!=null )
    {
        DementiaVo dementiaToSave = populateDataFromScreen((DementiaVo) form.getLocalContext().getselectedDementia().clone());      

        String[] errors = dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
        try
        {
            domain.saveDementia(dementiaToSave);
        }
        catch (Exception e)
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());          
            engine.close(DialogResult.CANCEL);//wdev-16364
            return false;
        }
    }
    return true;
}
项目:AvoinApotti    文件:Logic.java   
private boolean save() 
{
    // TODO Auto-generated method stub
    if(form.getLocalContext().getselectedDementiaIsNotNull())
    {
        DementiaVo dementiaToSave = populateDataFromScreen((DementiaVo) form.getLocalContext().getselectedDementia().clone());      

        String[] errors = null;//dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
        try
        {
            domain.saveDementia(dementiaToSave);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            engine.close(DialogResult.CANCEL);
            return false;
        }
    }
    return true;
}
项目:AvoinApotti    文件:Logic.java   
public void initialize(DementiaVo voDementia, FormMode formMode, DementiaAssessAndInvestigateVo voAMTS)
{
    form.getLocalContext().setSelectedRecord(voDementia);
    form.getLocalContext().setinFollowUpMode(false);
    form.getLocalContext().setSelectedAMTSRecord(null);
    if (voAMTS != null)
    {
        form.getLocalContext().setSelectedAMTSRecord(voAMTS);
        form.getLocalContext().setinFollowUpMode(true);
    }

    populateQuestions();
    hideShowBottomQuestionsBasedOnThreshold(false);
    initializeAuthoringControls(null);

    form.setMode(formMode);

    open();
}
项目:openMAXIMS    文件:Logic.java   
/**
 * 
 */
private boolean save()
{
    try
    {
        DementiaVo dementiaToSave = populateDataFromScreen((DementiaVo) form.getLocalContext().getselectedDementia().clone());

        String[] errors = dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }

        form.getLocalContext().setselectedDementia(domain.saveDementia(dementiaToSave,form.getForms().Clinical.DementiaAssessmentFINDComponent));//WDEV-16247

        return true;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getLocalContext().setSelectedEvent(DementiaEventEnumeration.SOE);
        form.fireCustomControlValueChanged();
        return false;
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean save() 
{
    // TODO Auto-generated method stub
    if(form.getLocalContext().getselectedDementiaIsNotNull() && form.cmbReason().getValue()!=null )
    {
        DementiaVo dementiaToSave = populateDataFromScreen((DementiaVo) form.getLocalContext().getselectedDementia().clone());      

        String[] errors = dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
        try
        {
            domain.saveDementia(dementiaToSave);
        }
        catch (Exception e)
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());          
            engine.close(DialogResult.CANCEL);//wdev-16364
            return false;
        }
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean save() 
{
    // TODO Auto-generated method stub
    if(form.getLocalContext().getselectedDementiaIsNotNull())
    {
        DementiaVo dementiaToSave = populateDataFromScreen((DementiaVo) form.getLocalContext().getselectedDementia().clone());      

        String[] errors = null;//dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
        try
        {
            domain.saveDementia(dementiaToSave);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            engine.close(DialogResult.CANCEL);
            return false;
        }
    }
    return true;
}
项目:openMAXIMS    文件:DementiaAssessmentFormImpl.java   
public DementiaVo getDementiaForPatient(PatientRefVo patient)
{
    if (patient == null || patient.getID_Patient() == null)
        return null;

    String query = "SELECT dem FROM Dementia AS dem LEFT JOIN dem.patient AS pat LEFT JOIN dem.currentWorklistStatus AS curStatus LEFT JOIN curStatus.status AS status WHERE pat.id = :PAT_ID AND (dem.isRIE is null OR dem.isRIE = 0) AND status.id <> :EXCLUDED";

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("PAT_ID");
    paramValues.add(patient.getID_Patient());

    paramNames.add("EXCLUDED");
    paramValues.add(DementiaWorklistStatus.EXCLUDED.getID());

    return DementiaVoAssembler.create((Dementia) getDomainFactory().findFirst(query, paramNames, paramValues));
}
项目:openMAXIMS    文件:Logic.java   
private boolean save() 
{
    // TODO Auto-generated method stub
    if(form.getLocalContext().getselectedDementiaIsNotNull() && form.cmbReason().getValue()!=null )
    {
        DementiaVo dementiaToSave = populateDataFromScreen((DementiaVo) form.getLocalContext().getselectedDementia().clone());      

        String[] errors = dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
        try
        {
            domain.saveDementia(dementiaToSave);
        }
        catch (Exception e)
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());          
            engine.close(DialogResult.CANCEL);//wdev-16364
            return false;
        }
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean save() 
{
    // TODO Auto-generated method stub
    if(form.getLocalContext().getselectedDementiaIsNotNull())
    {
        DementiaVo dementiaToSave = populateDataFromScreen((DementiaVo) form.getLocalContext().getselectedDementia().clone());      

        String[] errors = null;//dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
        try
        {
            domain.saveDementia(dementiaToSave);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            engine.close(DialogResult.CANCEL);
            return false;
        }
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
public void initialize(DementiaVo voDementia, FormMode formMode, DementiaAssessAndInvestigateVo voAMTS)
{
    form.getLocalContext().setSelectedRecord(voDementia);
    form.getLocalContext().setinFollowUpMode(false);
    form.getLocalContext().setSelectedAMTSRecord(null);
    if (voAMTS != null)
    {
        form.getLocalContext().setSelectedAMTSRecord(voAMTS);
        form.getLocalContext().setinFollowUpMode(true);
    }

    populateQuestions();
    hideShowBottomQuestionsBasedOnThreshold(false);
    initializeAuthoringControls(null);

    form.setMode(formMode);

    open();
}
项目:openmaxims-linux    文件:Logic.java   
private boolean save() 
{
    // TODO Auto-generated method stub
    if(form.getLocalContext().getselectedDementiaIsNotNull() && form.cmbReason().getValue()!=null )
    {
        DementiaVo dementiaToSave = populateDataFromScreen((DementiaVo) form.getLocalContext().getselectedDementia().clone());      

        String[] errors = dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
        try
        {
            domain.saveDementia(dementiaToSave);
        }
        catch (Exception e)
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());          
            engine.close(DialogResult.CANCEL);//wdev-16364
            return false;
        }
    }
    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean save() 
{
    // TODO Auto-generated method stub
    if(form.getLocalContext().getselectedDementiaIsNotNull())
    {
        DementiaVo dementiaToSave = populateDataFromScreen((DementiaVo) form.getLocalContext().getselectedDementia().clone());      

        String[] errors = null;//dementiaToSave.validate(getUIErrors());
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
        try
        {
            domain.saveDementia(dementiaToSave);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            engine.close(DialogResult.CANCEL);
            return false;
        }
    }
    return true;
}
项目:openmaxims-linux    文件:Logic.java   
public void initialize(DementiaVo voDementia, FormMode formMode, DementiaAssessAndInvestigateVo voAMTS)
{
    form.getLocalContext().setSelectedRecord(voDementia);
    form.getLocalContext().setinFollowUpMode(false);
    form.getLocalContext().setSelectedAMTSRecord(null);
    if (voAMTS != null)
    {
        form.getLocalContext().setSelectedAMTSRecord(voAMTS);
        form.getLocalContext().setinFollowUpMode(true);
    }

    populateQuestions();
    hideShowBottomQuestionsBasedOnThreshold(false);
    initializeAuthoringControls(null);

    form.setMode(formMode);

    open();
}
项目:AvoinApotti    文件:Logic.java   
private boolean save()
{
    DementiaVo dementiaToSave = populateDataFromScreen((DementiaVo) form.getLocalContext().getselectedDementia().clone());

    String[] errors = dementiaToSave.validate(getUIErrors());
    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    // Check SOE
    // if (surgicalAuditOpDetToSave.getID_SurgicalAuditOperationDetailIsNotNull() && domain.isStale(surgicalAuditOpDetToSave))
    // {
    // engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
    // form.getLocalContext().setSelectedEvent(DementiaEventEnumeration.CANCEL);
    // form.fireCustomControlValueChanged();
    // return false;

    // }

    try
    {
        form.getLocalContext().setselectedDementia(domain.saveDementia(dementiaToSave,form.getForms().Clinical.DementiaAssessmentFINDComponent));//WDEV-16247
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getLocalContext().setSelectedEvent(DementiaEventEnumeration.SOE);
        form.fireCustomControlValueChanged();
        return false;
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
public void initialize(DementiaVo dementiaVo, FormMode formMode, Boolean isParentFormDialog)
{
    clearAllControls();

    populateHelpIcon();
    initializeAuthoringControls();
    form.getLocalContext().setselectedDementia(dementiaVo);
    form.getLocalContext().setisParentFormDialog(isParentFormDialog);
    populateScreenFromData(dementiaVo.getStepOneFind());

    form.setMode(formMode);
}
项目:AvoinApotti    文件:Logic.java   
private DementiaVo populateDataFromScreen(DementiaVo dementiaVo)
{
    dementiaVo.setIsExcludedFromWorklist(Boolean.TRUE);

    DementiaWorklistStatusVo currentWorkListStatus = new DementiaWorklistStatusVo();        
    currentWorkListStatus.setStatus(ims.core.vo.lookups.DementiaWorklistStatus.EXCLUDED);
    currentWorkListStatus.setReasonForExclusion(form.cmbReason().getValue());

    AuthoringInformationVo voAuthor = new AuthoringInformationVo();
    voAuthor.setAuthoringDateTime(new DateTime());
    if (domain.getHcpUser() != null)
        voAuthor.setAuthoringHcp((HcpLiteVo) domain.getHcpLiteUser());

    currentWorkListStatus.setAuthoringInformation(voAuthor);

    dementiaVo.setCurrentWorklistStatus(currentWorkListStatus);
    dementiaVo.setIsExcludedFromWorklist(Boolean.TRUE);

    DementiaWorklistStatusVoCollection  historyWorkListStatusColl = dementiaVo.getHistoricalWorklistStatus();

    if(!form.getLocalContext().getselectedDementia().getHistoricalWorklistStatusIsNotNull())
    {
        historyWorkListStatusColl.add(currentWorkListStatus);
        dementiaVo.setHistoricalWorklistStatus(historyWorkListStatusColl);  
    }
    else if(!form.getLocalContext().getselectedDementia().getHistoricalWorklistStatus().contains(currentWorkListStatus))
    {
        historyWorkListStatusColl.add(currentWorkListStatus);
        dementiaVo.setHistoricalWorklistStatus(historyWorkListStatusColl);          
    }


    return dementiaVo;
}
项目:AvoinApotti    文件:DementiaAssessmentFormImpl.java   
public ims.clinical.vo.DementiaVo getDementia(ims.core.clinical.vo.DementiaRefVo dementiaRef)
{
    if (dementiaRef == null || dementiaRef.getID_Dementia()== null)
    {
        throw new CodingRuntimeException("Cannot get DementiaVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    Dementia domainDementia = (Dementia) factory.getDomainObject(Dementia.class, dementiaRef.getID_Dementia());

    return DementiaVoAssembler.create(domainDementia);
}
项目:AvoinApotti    文件:DementiaWorklistImpl.java   
public DementiaVo rieDementiaRecord(DementiaVo voDementia, FormName formName, Integer patientId, Integer contactId, Integer careContextId, String rieMessage) throws DomainInterfaceException, StaleObjectException
{
    //RIE the AMTS record
    if (voDementia.getStepOneFindIsNotNull())
        markAsRie(voDementia.getStepOneFind(), formName, patientId, contactId, careContextId, rieMessage);

    //RIE AMTS and its Comment 
    if (voDementia.getStepTwoAssessIsNotNull())
    {
        if (voDementia.getStepTwoAssess().getStepTwoAssessNoteIsNotNull())
            markAsRie(voDementia.getStepTwoAssess().getStepTwoAssessNote(), formName, patientId, contactId, careContextId, rieMessage);

        markAsRie(voDementia.getStepTwoAssess(), formName, patientId, contactId, careContextId, rieMessage);
    }

    //RIE HistoricalWorklistStatus records 
    for (int i = 0 ; i < voDementia.getHistoricalWorklistStatus().size() ; i ++)
        markAsRie(voDementia.getHistoricalWorklistStatus().get(i), formName, patientId, contactId, careContextId, rieMessage);

//  //RIE CurrentWorklistStatus 
//  markAsRie(voDementia.getCurrentWorklistStatus(), formName, patientId, contactId, careContextId, rieMessage);

    //RIE Dementia
    markAsRie(voDementia, formName, patientId, contactId, careContextId, rieMessage);

    return null;
}
项目:AvoinApotti    文件:DementiaWorklistImpl.java   
public DementiaVo getDementia(DementiaRefVo dementiaRef)
{
    if (dementiaRef == null || dementiaRef.getID_Dementia()== null)
    {
        throw new CodingRuntimeException("Cannot get DementiaVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    Dementia domainDementia = (Dementia) factory.getDomainObject(Dementia.class, dementiaRef.getID_Dementia());

    return DementiaVoAssembler.create(domainDementia);
}
项目:AvoinApotti    文件:DementiaAssessmentAMTSComponentImpl.java   
public DementiaVo saveDementia(DementiaVo voDementia) throws DomainInterfaceException, StaleObjectException
{
    if(voDementia == null)
        throw new CodingRuntimeException("DementiaVo is null");

    if(!voDementia.isValidated())
        throw new CodingRuntimeException("DementiaVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    Dementia doD = DementiaVoAssembler.extractDementia(factory, voDementia);

    factory.save(doD);
    return DementiaVoAssembler.create(doD);
}
项目:AvoinApotti    文件:DementiaCorrectCompletionDateStep1DialogImpl.java   
public DementiaVo getDementia(DementiaRefVo dementiaRef) 
{
    if (dementiaRef == null || dementiaRef.getID_Dementia()== null)
    {
        throw new CodingRuntimeException("Cannot get DementiaVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    Dementia domainDementia = (Dementia) factory.getDomainObject(Dementia.class, dementiaRef.getID_Dementia());

    return DementiaVoAssembler.create(domainDementia);
}
项目:openMAXIMS    文件:Logic.java   
/**
 * 
 * @param dementia
 */
private void populateScreenFromData(DementiaVo dementia)
{
    clearAllControls();

    if (dementia == null || dementia.getStepOneFind() == null)
        return;

    // Set Authoring information value
    populateAuthoringControls(dementia.getStepOneFind().getAuthoringInformation());

    // Set Question 1 value
    boolean answerQuestion1 = YesNo.YES.equals(dementia.getStepOneFind().getHasFormalDiagnosisOfDementia());
    form.GroupQuestion1().setValue(answerQuestion1 ? GroupQuestion1Enumeration.rdoQuestion1Yes : GroupQuestion1Enumeration.rdoQuestion1No);

    // Set Query 2 value
    if (!answerQuestion1)
    {
        form.GroupQuestion2a().setValue(YesNo.YES.equals(dementia.getStepOneFind().getCAMSAcuteOnset()) ? GroupQuestion2aEnumeration.rdoQuestion2aYes : GroupQuestion2aEnumeration.rdoQuestion2aNo);
        form.GroupQuestion2b().setValue(YesNo.YES.equals(dementia.getStepOneFind().getCAMSInattention()) ? GroupQuestion2bEnumeration.rdoQuestion2bYes : GroupQuestion2bEnumeration.rdoQuestion2bNo);
        form.GroupQuestion2c().setValue(YesNo.YES.equals(dementia.getStepOneFind().getCAMSDisorganisedThinking()) ? GroupQuestion2cEnumeration.rdoQuestion2cYes : GroupQuestion2cEnumeration.rdoQuestion2cNo);
        form.GroupQuestion2d().setValue(YesNo.YES.equals(dementia.getStepOneFind().getCAMSAlteredLevel()) ? GroupQuestion2dEnumeration.rdoQuestion2dYes : GroupQuestion2dEnumeration.rdoQuestion2dNo);

        boolean answerQuestionDC = YesNo.YES.equals(dementia.getStepOneFind().getDeliriumConfirmed());
        form.GroupQuestion2DC().setValue(answerQuestionDC ? GroupQuestion2DCEnumeration.rdoQuestion2DCYes : GroupQuestion2DCEnumeration.rdoQuestion2DCNo);

        // Set Query 3 value
        if (!answerQuestionDC)
        {
            form.GroupQuestion3().setValue(YesNo.YES.equals(dementia.getStepOneFind().getAwarenessQuestion()) ? GroupQuestion3Enumeration.rdoQuestion3Yes : GroupQuestion3Enumeration.rdoQuestion3No);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private DementiaVo populateDataFromScreen(DementiaVo dementiaVo)
{
    dementiaVo.setIsExcludedFromWorklist(Boolean.TRUE);

    DementiaWorklistStatusVo currentWorkListStatus = new DementiaWorklistStatusVo();        
    currentWorkListStatus.setStatus(ims.core.vo.lookups.DementiaWorklistStatus.EXCLUDED);
    currentWorkListStatus.setReasonForExclusion(form.cmbReason().getValue());

    dementiaVo.getPatient().setDementiaWorklistStatus(null);
    dementiaVo.getPatient().setDementiaBreachDateTime(null);

    AuthoringInformationVo voAuthor = new AuthoringInformationVo();
    voAuthor.setAuthoringDateTime(new DateTime());
    if (domain.getHcpUser() != null)
        voAuthor.setAuthoringHcp((HcpLiteVo) domain.getHcpLiteUser());

    currentWorkListStatus.setAuthoringInformation(voAuthor);

    dementiaVo.setCurrentWorklistStatus(currentWorkListStatus);
    dementiaVo.setIsExcludedFromWorklist(Boolean.TRUE);

    DementiaWorklistStatusVoCollection  historyWorkListStatusColl = dementiaVo.getHistoricalWorklistStatus();

    if(!form.getLocalContext().getselectedDementia().getHistoricalWorklistStatusIsNotNull())
    {
        historyWorkListStatusColl.add(currentWorkListStatus);
        dementiaVo.setHistoricalWorklistStatus(historyWorkListStatusColl);  
    }
    else if(!form.getLocalContext().getselectedDementia().getHistoricalWorklistStatus().contains(currentWorkListStatus))
    {
        historyWorkListStatusColl.add(currentWorkListStatus);
        dementiaVo.setHistoricalWorklistStatus(historyWorkListStatusColl);          
    }


    return dementiaVo;
}
项目:openMAXIMS    文件:Logic.java   
private void recbrDementiaAMTSValueChanged()
    {
        form.ccDementiaAssessment().clearControls();
        if( form.recbrDementiaAMTS().getValue() != null )
        {
            DementiaVo tempVo  = domain.getDementiaVo(form.recbrDementiaAMTS().getValue().getDementia());
            if( tempVo != null )
            {
                if( form.recbrDementiaAMTS().getValue().getIsStepTwo().equals(Boolean.TRUE))
                {
                    form.ccDementiaAssessment().initialize(Boolean.FALSE);
                    form.ccDementiaAssessment().setValue(tempVo, tempVo.getStepTwoAssess());
                    form.ccDementiaAssessment().setMode(FormMode.VIEW);
//                  form.ccDementiaAssessment().initialize(tempVo, FormMode.VIEW, null);
                }
                else
                {
                    form.ccDementiaAssessment().initialize(Boolean.TRUE);
                    form.ccDementiaAssessment().setValue(tempVo, form.recbrDementiaAMTS().getValue().getDementiaAndInvestigate());
                    form.ccDementiaAssessment().setMode(FormMode.VIEW);
//                  form.ccDementiaAssessment().initialize(tempVo, FormMode.VIEW, form.recbrDementiaAMTS().getValue().getDementiaAndInvestigate());
                }
            }
        }
        else 
        {
            form.ccDementiaAssessment().initialize(Boolean.FALSE);
            form.ccDementiaAssessment().setValue(null, null);
            form.ccDementiaAssessment().setMode(FormMode.VIEW);
//          form.ccDementiaAssessment().initialize(null, FormMode.VIEW, null);
        }

        form.ccDementiaAssessment().hideNewEditAndRieButtons();
    }
项目:openMAXIMS    文件:Logic.java   
public void setValue(DementiaVo dementia, DementiaAssessAndInvestigateVo assessment)
{
    form.getLocalContext().setSelectedRecord(dementia);
    form.getLocalContext().setSelectedAMTSRecord(assessment);

    // Populate screen with Dementia record and Follow Up Assessment
    populateScreenFromData(dementia, assessment);
}
项目:openMAXIMS    文件:DementiaWorklistImpl.java   
public DementiaVo rieDementiaRecord(DementiaVo voDementia, FormName formName, Integer patientId, Integer contactId, Integer careContextId, String rieMessage) throws DomainInterfaceException, StaleObjectException
{
    //RIE the AMTS record
    if (voDementia.getStepOneFindIsNotNull())
        markAsRie(voDementia.getStepOneFind(), formName, patientId, contactId, careContextId, rieMessage);

    //RIE AMTS and its Comment 
    if (voDementia.getStepTwoAssessIsNotNull())
    {
        if (voDementia.getStepTwoAssess().getStepTwoAssessNoteIsNotNull())
            markAsRie(voDementia.getStepTwoAssess().getStepTwoAssessNote(), formName, patientId, contactId, careContextId, rieMessage);

        markAsRie(voDementia.getStepTwoAssess(), formName, patientId, contactId, careContextId, rieMessage);
    }

    //RIE HistoricalWorklistStatus records 
    for (int i = 0 ; i < voDementia.getHistoricalWorklistStatus().size() ; i ++)
        markAsRie(voDementia.getHistoricalWorklistStatus().get(i), formName, patientId, contactId, careContextId, rieMessage);

//  //RIE CurrentWorklistStatus 
//  markAsRie(voDementia.getCurrentWorklistStatus(), formName, patientId, contactId, careContextId, rieMessage);

    //RIE Dementia
    markAsRie(voDementia, formName, patientId, contactId, careContextId, rieMessage);

    return null;
}
项目:openMAXIMS    文件:DementiaWorklistImpl.java   
public DementiaVo getDementia(DementiaRefVo dementiaRef)
{
    if (dementiaRef == null || dementiaRef.getID_Dementia()== null)
    {
        throw new CodingRuntimeException("Cannot get DementiaVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    Dementia domainDementia = (Dementia) factory.getDomainObject(Dementia.class, dementiaRef.getID_Dementia());

    return DementiaVoAssembler.create(domainDementia);
}
项目:openMAXIMS    文件:DementiaAssessmentAMTSComponentImpl.java   
public DementiaVo saveDementia(DementiaVo voDementia) throws DomainInterfaceException, StaleObjectException
{
    if(voDementia == null)
        throw new CodingRuntimeException("DementiaVo is null");

    if(!voDementia.isValidated())
        throw new CodingRuntimeException("DementiaVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    Dementia doD = DementiaVoAssembler.extractDementia(factory, voDementia);

    factory.save(doD);
    return DementiaVoAssembler.create(doD);
}
项目:openMAXIMS    文件:DementiaCorrectCompletionDateStep1DialogImpl.java   
public DementiaVo getDementia(DementiaRefVo dementiaRef) 
{
    if (dementiaRef == null || dementiaRef.getID_Dementia()== null)
    {
        throw new CodingRuntimeException("Cannot get DementiaVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    Dementia domainDementia = (Dementia) factory.getDomainObject(Dementia.class, dementiaRef.getID_Dementia());

    return DementiaVoAssembler.create(domainDementia);
}
项目:openMAXIMS    文件:Logic.java   
private boolean save()
{
    DementiaVo dementiaToSave = populateDataFromScreen((DementiaVo) form.getLocalContext().getselectedDementia().clone());

    String[] errors = dementiaToSave.validate(getUIErrors());
    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    // Check SOE
    // if (surgicalAuditOpDetToSave.getID_SurgicalAuditOperationDetailIsNotNull() && domain.isStale(surgicalAuditOpDetToSave))
    // {
    // engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
    // form.getLocalContext().setSelectedEvent(DementiaEventEnumeration.CANCEL);
    // form.fireCustomControlValueChanged();
    // return false;

    // }

    try
    {
        form.getLocalContext().setselectedDementia(domain.saveDementia(dementiaToSave,form.getForms().Clinical.DementiaAssessmentFINDComponent));//WDEV-16247
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getLocalContext().setSelectedEvent(DementiaEventEnumeration.SOE);
        form.fireCustomControlValueChanged();
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
public void initialize(DementiaVo dementiaVo, FormMode formMode, Boolean isParentFormDialog)
{
    clearAllControls();

    populateHelpIcon();
    initializeAuthoringControls();
    form.getLocalContext().setselectedDementia(dementiaVo);
    form.getLocalContext().setisParentFormDialog(isParentFormDialog);
    populateScreenFromData(dementiaVo.getStepOneFind());

    form.setMode(formMode);
}
项目:openMAXIMS    文件:Logic.java   
private DementiaVo populateDataFromScreen(DementiaVo dementiaVo)
{
    dementiaVo.setIsExcludedFromWorklist(Boolean.TRUE);

    DementiaWorklistStatusVo currentWorkListStatus = new DementiaWorklistStatusVo();        
    currentWorkListStatus.setStatus(ims.core.vo.lookups.DementiaWorklistStatus.EXCLUDED);
    currentWorkListStatus.setReasonForExclusion(form.cmbReason().getValue());

    AuthoringInformationVo voAuthor = new AuthoringInformationVo();
    voAuthor.setAuthoringDateTime(new DateTime());
    if (domain.getHcpUser() != null)
        voAuthor.setAuthoringHcp((HcpLiteVo) domain.getHcpLiteUser());

    currentWorkListStatus.setAuthoringInformation(voAuthor);

    dementiaVo.setCurrentWorklistStatus(currentWorkListStatus);
    dementiaVo.setIsExcludedFromWorklist(Boolean.TRUE);

    DementiaWorklistStatusVoCollection  historyWorkListStatusColl = dementiaVo.getHistoricalWorklistStatus();

    if(!form.getLocalContext().getselectedDementia().getHistoricalWorklistStatusIsNotNull())
    {
        historyWorkListStatusColl.add(currentWorkListStatus);
        dementiaVo.setHistoricalWorklistStatus(historyWorkListStatusColl);  
    }
    else if(!form.getLocalContext().getselectedDementia().getHistoricalWorklistStatus().contains(currentWorkListStatus))
    {
        historyWorkListStatusColl.add(currentWorkListStatus);
        dementiaVo.setHistoricalWorklistStatus(historyWorkListStatusColl);          
    }


    return dementiaVo;
}
项目:openMAXIMS    文件:DementiaAssessmentFormImpl.java   
public ims.clinical.vo.DementiaVo getDementia(ims.core.clinical.vo.DementiaRefVo dementiaRef)
{
    if (dementiaRef == null || dementiaRef.getID_Dementia()== null)
    {
        throw new CodingRuntimeException("Cannot get DementiaVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    Dementia domainDementia = (Dementia) factory.getDomainObject(Dementia.class, dementiaRef.getID_Dementia());

    return DementiaVoAssembler.create(domainDementia);
}
项目:openMAXIMS    文件:DementiaWorklistImpl.java   
public DementiaVo rieDementiaRecord(DementiaVo voDementia, FormName formName, Integer patientId, Integer contactId, Integer careContextId, String rieMessage) throws DomainInterfaceException, StaleObjectException
{
    //RIE the AMTS record
    if (voDementia.getStepOneFindIsNotNull())
        markAsRie(voDementia.getStepOneFind(), formName, patientId, contactId, careContextId, rieMessage);

    //RIE AMTS and its Comment 
    if (voDementia.getStepTwoAssessIsNotNull())
    {
        if (voDementia.getStepTwoAssess().getStepTwoAssessNoteIsNotNull())
            markAsRie(voDementia.getStepTwoAssess().getStepTwoAssessNote(), formName, patientId, contactId, careContextId, rieMessage);

        markAsRie(voDementia.getStepTwoAssess(), formName, patientId, contactId, careContextId, rieMessage);
    }

    //RIE HistoricalWorklistStatus records 
    for (int i = 0 ; i < voDementia.getHistoricalWorklistStatus().size() ; i ++)
        markAsRie(voDementia.getHistoricalWorklistStatus().get(i), formName, patientId, contactId, careContextId, rieMessage);

//  //RIE CurrentWorklistStatus 
//  markAsRie(voDementia.getCurrentWorklistStatus(), formName, patientId, contactId, careContextId, rieMessage);

    //RIE Dementia
    markAsRie(voDementia, formName, patientId, contactId, careContextId, rieMessage);

    return null;
}
项目:openMAXIMS    文件:DementiaWorklistImpl.java   
public DementiaVo getDementia(DementiaRefVo dementiaRef)
{
    if (dementiaRef == null || dementiaRef.getID_Dementia()== null)
    {
        throw new CodingRuntimeException("Cannot get DementiaVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    Dementia domainDementia = (Dementia) factory.getDomainObject(Dementia.class, dementiaRef.getID_Dementia());

    return DementiaVoAssembler.create(domainDementia);
}
项目:openMAXIMS    文件:DementiaAssessmentAMTSComponentImpl.java   
public DementiaVo saveDementia(DementiaVo voDementia) throws DomainInterfaceException, StaleObjectException
{
    if(voDementia == null)
        throw new CodingRuntimeException("DementiaVo is null");

    if(!voDementia.isValidated())
        throw new CodingRuntimeException("DementiaVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    Dementia doD = DementiaVoAssembler.extractDementia(factory, voDementia);

    factory.save(doD);
    return DementiaVoAssembler.create(doD);
}
项目:openMAXIMS    文件:DementiaCorrectCompletionDateStep1DialogImpl.java   
public DementiaVo getDementia(DementiaRefVo dementiaRef) 
{
    if (dementiaRef == null || dementiaRef.getID_Dementia()== null)
    {
        throw new CodingRuntimeException("Cannot get DementiaVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    Dementia domainDementia = (Dementia) factory.getDomainObject(Dementia.class, dementiaRef.getID_Dementia());

    return DementiaVoAssembler.create(domainDementia);
}
项目:openmaxims-linux    文件:Logic.java   
private boolean save()
{
    DementiaVo dementiaToSave = populateDataFromScreen((DementiaVo) form.getLocalContext().getselectedDementia().clone());

    String[] errors = dementiaToSave.validate(getUIErrors());
    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    // Check SOE
    // if (surgicalAuditOpDetToSave.getID_SurgicalAuditOperationDetailIsNotNull() && domain.isStale(surgicalAuditOpDetToSave))
    // {
    // engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
    // form.getLocalContext().setSelectedEvent(DementiaEventEnumeration.CANCEL);
    // form.fireCustomControlValueChanged();
    // return false;

    // }

    try
    {
        form.getLocalContext().setselectedDementia(domain.saveDementia(dementiaToSave,form.getForms().Clinical.DementiaAssessmentFINDComponent));//WDEV-16247
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        form.getLocalContext().setSelectedEvent(DementiaEventEnumeration.SOE);
        form.fireCustomControlValueChanged();
        return false;
    }

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
public void initialize(DementiaVo dementiaVo, FormMode formMode, Boolean isParentFormDialog)
{
    clearAllControls();

    populateHelpIcon();
    initializeAuthoringControls();
    form.getLocalContext().setselectedDementia(dementiaVo);
    form.getLocalContext().setisParentFormDialog(isParentFormDialog);
    populateScreenFromData(dementiaVo.getStepOneFind());

    form.setMode(formMode);
}
项目:openmaxims-linux    文件:Logic.java   
private DementiaVo populateDataFromScreen(DementiaVo dementiaVo)
{
    dementiaVo.setIsExcludedFromWorklist(Boolean.TRUE);

    DementiaWorklistStatusVo currentWorkListStatus = new DementiaWorklistStatusVo();        
    currentWorkListStatus.setStatus(ims.core.vo.lookups.DementiaWorklistStatus.EXCLUDED);
    currentWorkListStatus.setReasonForExclusion(form.cmbReason().getValue());

    AuthoringInformationVo voAuthor = new AuthoringInformationVo();
    voAuthor.setAuthoringDateTime(new DateTime());
    if (domain.getHcpUser() != null)
        voAuthor.setAuthoringHcp((HcpLiteVo) domain.getHcpLiteUser());

    currentWorkListStatus.setAuthoringInformation(voAuthor);

    dementiaVo.setCurrentWorklistStatus(currentWorkListStatus);
    dementiaVo.setIsExcludedFromWorklist(Boolean.TRUE);

    DementiaWorklistStatusVoCollection  historyWorkListStatusColl = dementiaVo.getHistoricalWorklistStatus();

    if(!form.getLocalContext().getselectedDementia().getHistoricalWorklistStatusIsNotNull())
    {
        historyWorkListStatusColl.add(currentWorkListStatus);
        dementiaVo.setHistoricalWorklistStatus(historyWorkListStatusColl);  
    }
    else if(!form.getLocalContext().getselectedDementia().getHistoricalWorklistStatus().contains(currentWorkListStatus))
    {
        historyWorkListStatusColl.add(currentWorkListStatus);
        dementiaVo.setHistoricalWorklistStatus(historyWorkListStatusColl);          
    }


    return dementiaVo;
}