Java 类ims.emergency.vo.EmergencyAttendanceForTriageLiteVo 实例源码

项目:AvoinApotti    文件:Logic.java   
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException 
{
    if(form.getLocalContext().getMessageBoxIdForOldEmergencyAttendanceIsNotNull() && form.getLocalContext().getMessageBoxIdForOldEmergencyAttendance().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());
            form.getLocalContext().setCurrentAttendance(null);

            populateScreenFromData();
            updateControlsState();
        }
        //WDEV-15951
        else if (DialogResult.NO.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)//WDEV-15868
        {
            form.getLocalContext().setHistoryMode(false);
            form.grdAttendanceHistory().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException 
{
    if(form.getLocalContext().getMessageBoxIdForOldEmergencyAttendanceIsNotNull() && form.getLocalContext().getMessageBoxIdForOldEmergencyAttendance().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            //form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());
            form.getLocalContext().setCurrentAttendance(null);

            populateScreenFromData();
            updateControlsState();
        }
        //WDEV-15951
        else if (DialogResult.NO.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)//WDEV-15868
        {
            form.getLocalContext().setHistoryMode(false);
            form.grdAttendanceHistory().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance());
        }

        //WDEV-17745
        form.getLocalContext().setCurrentEvent(EDAssessmentComponent.START_TIMER);
        form.fireCustomControlValueChanged();
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException 
{
    if(form.getLocalContext().getMessageBoxIdForOldEmergencyAttendanceIsNotNull() && form.getLocalContext().getMessageBoxIdForOldEmergencyAttendance().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
        {
            form.getLocalContext().setSelectedTriagePatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());
            form.getLocalContext().setCurrentAttendance(null);

            populateScreenFromData();
            updateControlsState();
        }
        else if (DialogResult.NO.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)//WDEV-15868
        {
            form.getLocalContext().setHistoryMode(false);
            form.grdAttendanceHistory().setValue(form.getLocalContext().getSelectedTriagePatient().getAttendance());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException 
{
    if(form.getLocalContext().getMessageBoxIdForOldEmergencyAttendanceIsNotNull() && form.getLocalContext().getMessageBoxIdForOldEmergencyAttendance().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());
            form.getLocalContext().setCurrentAttendance(null);

            populateScreenFromData();
            updateControlsState();
        }
        //WDEV-15951
        else if (DialogResult.NO.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)//WDEV-15868
        {
            form.getLocalContext().setHistoryMode(false);
            form.grdAttendanceHistory().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException 
{
    if(form.getLocalContext().getMessageBoxIdForOldEmergencyAttendanceIsNotNull() && form.getLocalContext().getMessageBoxIdForOldEmergencyAttendance().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
        {
            form.getLocalContext().setSelectedTriagePatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());
            form.getLocalContext().setCurrentAttendance(null);

            populateScreenFromData();
            updateControlsState();
        }
        else if (DialogResult.NO.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)//WDEV-15868
        {
            form.getLocalContext().setHistoryMode(false);
            form.grdAttendanceHistory().setValue(form.getLocalContext().getSelectedTriagePatient().getAttendance());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
    if (args != null && args.length > 0)
    {
        if (args[0] instanceof FormMode)
            form.setMode((FormMode) args[0]);
    }

    //WDEV-19284
    if (args != null && args.length > 1 && args[1]!=null && args[1] instanceof EmergencyAttendanceForTriageLiteVo)
    {
        form.getGlobalContext().Emergency.setAmbulanceDetails(domain.getEmergencyAttendanceAmbDet((EmergencyAttendanceForTriageLiteVo)args[1]));
        form.getLocalContext().setsaveOnDialog(true);
    }

    open(form.getGlobalContext().Emergency.getAmbulanceDetails());
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException 
{
    if(form.getLocalContext().getMessageBoxIdForOldEmergencyAttendanceIsNotNull() && form.getLocalContext().getMessageBoxIdForOldEmergencyAttendance().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());
            form.getLocalContext().setCurrentAttendance(null);

            populateScreenFromData();
            updateControlsState();
        }
        //WDEV-15951
        else if (DialogResult.NO.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)//WDEV-15868
        {
            form.getLocalContext().setHistoryMode(false);
            form.grdAttendanceHistory().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException 
{
    if(form.getLocalContext().getMessageBoxIdForOldEmergencyAttendanceIsNotNull() && form.getLocalContext().getMessageBoxIdForOldEmergencyAttendance().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            //form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());
            form.getLocalContext().setCurrentAttendance(null);

            populateScreenFromData();
            updateControlsState();
        }
        //WDEV-15951
        else if (DialogResult.NO.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)//WDEV-15868
        {
            form.getLocalContext().setHistoryMode(false);
            form.grdAttendanceHistory().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance());
        }

        //WDEV-17745
        form.getLocalContext().setCurrentEvent(EDAssessmentComponent.START_TIMER);
        form.fireCustomControlValueChanged();
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException 
{
    if(form.getLocalContext().getMessageBoxIdForOldEmergencyAttendanceIsNotNull() && form.getLocalContext().getMessageBoxIdForOldEmergencyAttendance().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
        {
            form.getLocalContext().setSelectedTriagePatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());
            form.getLocalContext().setCurrentAttendance(null);

            populateScreenFromData();
            updateControlsState();
        }
        else if (DialogResult.NO.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)//WDEV-15868
        {
            form.getLocalContext().setHistoryMode(false);
            form.grdAttendanceHistory().setValue(form.getLocalContext().getSelectedTriagePatient().getAttendance());
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException 
{
    if(form.getLocalContext().getMessageBoxIdForOldEmergencyAttendanceIsNotNull() && form.getLocalContext().getMessageBoxIdForOldEmergencyAttendance().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());
            form.getLocalContext().setCurrentAttendance(null);

            populateScreenFromData();
            updateControlsState();
        }
        //WDEV-15951
        else if (DialogResult.NO.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)//WDEV-15868
        {
            form.getLocalContext().setHistoryMode(false);
            form.grdAttendanceHistory().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance());
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException 
{
    if(form.getLocalContext().getMessageBoxIdForOldEmergencyAttendanceIsNotNull() && form.getLocalContext().getMessageBoxIdForOldEmergencyAttendance().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            //form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());
            form.getLocalContext().setCurrentAttendance(null);

            populateScreenFromData();
            updateControlsState();
        }
        //WDEV-15951
        else if (DialogResult.NO.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)//WDEV-15868
        {
            form.getLocalContext().setHistoryMode(false);
            form.grdAttendanceHistory().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance());
        }

        //WDEV-17745
        form.getLocalContext().setCurrentEvent(EDAssessmentComponent.START_TIMER);
        form.fireCustomControlValueChanged();
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException 
{
    if(form.getLocalContext().getMessageBoxIdForOldEmergencyAttendanceIsNotNull() && form.getLocalContext().getMessageBoxIdForOldEmergencyAttendance().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
        {
            form.getLocalContext().setSelectedTriagePatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());
            form.getLocalContext().setCurrentAttendance(null);

            populateScreenFromData();
            updateControlsState();
        }
        else if (DialogResult.NO.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)//WDEV-15868
        {
            form.getLocalContext().setHistoryMode(false);
            form.grdAttendanceHistory().setValue(form.getLocalContext().getSelectedTriagePatient().getAttendance());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void addEmergencyAttendanceRow(grdAttendanceHistoryRow row, EmergencyAttendanceForTriageVo emergencyAttendance) 
{
    if(row == null || emergencyAttendance == null)
        return;

    grdAttendanceHistoryRow childRow = row.getRows().newRow();
    childRow.setColID(emergencyAttendance.getID_EmergencyAttendance().toString() + (emergencyAttendance.getRegistrationDateTimeIsNotNull() ? " - " + emergencyAttendance.getRegistrationDateTime().toString() : ""));

    childRow.setValue((EmergencyAttendanceForTriageLiteVo) emergencyAttendance);
}
项目:AvoinApotti    文件:Logic.java   
private void selectedAttendanceHistory() 
{
    form.getLocalContext().setHistoryMode(false);



    if(form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
    {
        if (form.getLocalContext().getCurrentAttendance() == null) //WDEV-15951, wdev-16751
        {
            EmergencyAttendanceForTriageLiteVo attendance = domain.getEmergencyAttendance((EmergencyAttendanceRefVo) form.grdAttendanceHistory().getValue());

            if (attendance.getDischargeDateTime() == null)
            {
                form.getLocalContext().setCurrentAttendance(attendance);
            }
        }

        if(!form.grdAttendanceHistory().getValue().equals(form.getLocalContext().getCurrentAttendance()))
        {
            form.getLocalContext().setHistoryMode(true);
            form.getLocalContext().setMessageBoxIdForOldEmergencyAttendance(engine.showMessage("Do you wish to view the clinician details for the attendance on " + ((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()).getRegistrationDateTime(), "" , MessageButtons.YESNO, MessageIcon.QUESTION));
        }
        else
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());

            populateScreenFromData();
            updateControlsState();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void addEmergencyAttendanceRow(ims.emergency.forms.edassessmentcomponent.GenForm.grdAttendanceHistoryRow row,   EmergencyAttendanceForTriageVo emergencyAttendance) 
{
    if(row == null || emergencyAttendance == null)
        return;

    ims.emergency.forms.edassessmentcomponent.GenForm.grdAttendanceHistoryRow childRow = row.getRows().newRow();
    childRow.setColID(emergencyAttendance.getID_EmergencyAttendance().toString() + (emergencyAttendance.getRegistrationDateTimeIsNotNull() ? " - " + emergencyAttendance.getRegistrationDateTime().toString() : ""));

    childRow.setValue((EmergencyAttendanceForTriageLiteVo) emergencyAttendance);
}
项目:AvoinApotti    文件:Logic.java   
private void selectedAttendanceHistory() 
{
    form.getLocalContext().setHistoryMode(false);


    if(form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
    {

        if (form.getLocalContext().getCurrentAttendance() == null) //WDEV-15951, wdev-16751
        {
            EmergencyAttendanceForTriageLiteVo attendance = domain.getEmergencyAttendance((EmergencyAttendanceRefVo) form.grdAttendanceHistory().getValue());

            if (attendance.getDischargeDateTime() == null)
            {
                form.getLocalContext().setCurrentAttendance(attendance);
            }
        }


        if(!form.grdAttendanceHistory().getValue().equals(form.getLocalContext().getCurrentAttendance()))
        {
            form.getLocalContext().setHistoryMode(true);
            form.getLocalContext().setMessageBoxIdForOldEmergencyAttendance(engine.showMessage("Do you wish to view the clinician details for the attendance on " + ((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()).getRegistrationDateTime(), "" , MessageButtons.YESNO, MessageIcon.QUESTION));

            //WDEV-17745
            form.getLocalContext().setCurrentEvent(EDAssessmentComponent.STOP_TIMER);
            form.fireCustomControlValueChanged();

        }
        else
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.getGlobalContext().Emergency.setTracking(form.getLocalContext().getSelectedWaitingPatient()); //WDEV-17739
            //form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());

            populateScreenFromData();
            updateControlsState();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void refreshCoding()
{
    if (form.getLocalContext().getSelectedWaitingPatient()==null)
        return ;

    EmergencyAttendanceForTriageLiteVo emergencyattendanceToSave=populateDataFromScreen((EmergencyAttendanceForTriageLiteVo) form.getLocalContext().getSelectedWaitingPatient().getAttendance().clone());

    // Validate record
    String[] errors = emergencyattendanceToSave.validate();

    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return ;
    }

    try
    {
        domain.refreshCoding(emergencyattendanceToSave);
        return ;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return ;
    }
}
项目:AvoinApotti    文件:Logic.java   
private EmergencyAttendanceForTriageLiteVo populateDataFromScreen(EmergencyAttendanceForTriageLiteVo emergencyAttendance)
{
    emergencyAttendance.setMC(null);
    emergencyAttendance.setCOTA(null);
    emergencyAttendance.setPCG1(null);
    emergencyAttendance.setPCG2(null);
    emergencyAttendance.setHAR(null);
    emergencyAttendance.setPurchaser(null);
    emergencyAttendance.setSequenceNumber(null);

    return emergencyAttendance;
}
项目:AvoinApotti    文件:Logic.java   
private void addEmergencyAttendanceRow(grdAttendanceHistoryRow row, EmergencyAttendanceForTriageVo emergencyAttendance) 
{
    if(row == null || emergencyAttendance == null)
        return;

    grdAttendanceHistoryRow childRow = row.getRows().newRow();
    childRow.setColID(emergencyAttendance.getID_EmergencyAttendance().toString() + (emergencyAttendance.getRegistrationDateTimeIsNotNull() ? " - " + emergencyAttendance.getRegistrationDateTime().toString() : ""));
    childRow.setValue((EmergencyAttendanceForTriageLiteVo) emergencyAttendance);
}
项目:AvoinApotti    文件:Logic.java   
private void selectedAttendanceHistory() 
{
    form.getLocalContext().setHistoryMode(false);


    if(form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
    {
        if (form.getLocalContext().getCurrentAttendance() == null) //WDEV-15951, wdev-16751
        {
            EmergencyAttendanceForTriageLiteVo attendance = domain.getEmergencyAttendance((EmergencyAttendanceRefVo) form.grdAttendanceHistory().getValue());

            if (attendance.getDischargeDateTime() == null)
            {
                form.getLocalContext().setCurrentAttendance(attendance);
            }
        }

        if(!form.grdAttendanceHistory().getValue().equals(form.getLocalContext().getCurrentAttendance()))
        {
            form.getLocalContext().setHistoryMode(true);
            form.getLocalContext().setMessageBoxIdForOldEmergencyAttendance(engine.showMessage("Do you wish to view the triage details for the attendance on " + ((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()).getRegistrationDateTime(), "" , MessageButtons.YESNO, MessageIcon.QUESTION));
        }
        else
        {
            form.getLocalContext().setSelectedTriagePatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());

            populateScreenFromData();
            updateControlsState();
        }
    }
}
项目:AvoinApotti    文件:EDAssessmentComponentImpl.java   
public ims.emergency.vo.EmergencyAttendanceForTriageLiteVo getEmergencyAttendance(ims.core.admin.vo.EmergencyAttendanceRefVo attendanceRef)
{
    if(attendanceRef == null)
        throw new CodingRuntimeException("Cannot get Attendance on null Id.");

    return EmergencyAttendanceForTriageLiteVoAssembler.create((EmergencyAttendance) getDomainFactory().getDomainObject(EmergencyAttendance.class, attendanceRef.getID_EmergencyAttendance()));

}
项目:AvoinApotti    文件:EDAssessmentComponentImpl.java   
public void refreshCoding(EmergencyAttendanceForTriageLiteVo attendanceToSave) throws StaleObjectException
{
    // Check parameter to save
    if (attendanceToSave == null)
        throw new CodingRuntimeException("Can not save null record to data base.");

    if (!attendanceToSave.isValidated())
        throw new CodingRuntimeException("Can not save record not validated to data base.");

    // Extract domain object
    EmergencyAttendance domEmergencyAtt = EmergencyAttendanceForTriageLiteVoAssembler.extractEmergencyAttendance(getDomainFactory(), attendanceToSave);

    getDomainFactory().save(domEmergencyAtt);


    AttendanceRequiringContracting tempAttReqContracting = attendanceFoundInAttendanceReqContracting(attendanceToSave);
    if (tempAttReqContracting==null )
    {
        AttendanceRequiringContracting doAttendanceRequiringContracting=new AttendanceRequiringContracting();
        doAttendanceRequiringContracting.setPatient(domEmergencyAtt.getPatient());
        doAttendanceRequiringContracting.setAttendance(domEmergencyAtt);

        getDomainFactory().save(doAttendanceRequiringContracting);
    }
    else //if found, set the status to null
    {
        tempAttReqContracting.setStatus(null);
        getDomainFactory().save(tempAttReqContracting);
    }

    return;
}
项目:AvoinApotti    文件:TriageImpl.java   
public EmergencyAttendanceForTriageLiteVo getEmergencyAttendance(EmergencyAttendanceRefVo attendanceRef)
{
    if(attendanceRef == null)
        throw new CodingRuntimeException("Cannot get Attendance on null Id.");

    return EmergencyAttendanceForTriageLiteVoAssembler.create((EmergencyAttendance) getDomainFactory().getDomainObject(EmergencyAttendance.class, attendanceRef.getID_EmergencyAttendance()));
}
项目:AvoinApotti    文件:ClinicianAssessmentWorklistImpl.java   
public EmergencyAttendanceForTriageLiteVo getEmergencyAttendance(EmergencyAttendanceRefVo attendanceRef)
{
    if(attendanceRef == null)
        throw new CodingRuntimeException("Cannot get Attendance on null Id.");

    return EmergencyAttendanceForTriageLiteVoAssembler.create((EmergencyAttendance) getDomainFactory().getDomainObject(EmergencyAttendance.class, attendanceRef.getID_EmergencyAttendance()));
}
项目:openMAXIMS    文件:Logic.java   
private void addEmergencyAttendanceRow(grdAttendanceHistoryRow row, EmergencyAttendanceForTriageVo emergencyAttendance) 
{
    if(row == null || emergencyAttendance == null)
        return;

    grdAttendanceHistoryRow childRow = row.getRows().newRow();
    childRow.setColID(emergencyAttendance.getID_EmergencyAttendance().toString() + (emergencyAttendance.getRegistrationDateTimeIsNotNull() ? " - " + emergencyAttendance.getRegistrationDateTime().toString() : ""));

    childRow.setValue((EmergencyAttendanceForTriageLiteVo) emergencyAttendance);
}
项目:openMAXIMS    文件:Logic.java   
private void selectedAttendanceHistory() 
{
    form.getLocalContext().setHistoryMode(false);



    if(form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
    {
        if (form.getLocalContext().getCurrentAttendance() == null) //WDEV-15951, wdev-16751
        {
            EmergencyAttendanceForTriageLiteVo attendance = domain.getEmergencyAttendance((EmergencyAttendanceRefVo) form.grdAttendanceHistory().getValue());

            if (attendance.getDischargeDateTime() == null)
            {
                form.getLocalContext().setCurrentAttendance(attendance);
            }
        }

        if(!form.grdAttendanceHistory().getValue().equals(form.getLocalContext().getCurrentAttendance()))
        {
            form.getLocalContext().setHistoryMode(true);
            form.getLocalContext().setMessageBoxIdForOldEmergencyAttendance(engine.showMessage("Do you wish to view the clinician details for the attendance on " + ((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()).getRegistrationDateTime(), "" , MessageButtons.YESNO, MessageIcon.QUESTION));
        }
        else
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());

            populateScreenFromData();
            updateControlsState();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addEmergencyAttendanceRow(ims.emergency.forms.edassessmentcomponent.GenForm.grdAttendanceHistoryRow row,   EmergencyAttendanceForTriageVo emergencyAttendance) 
{
    if(row == null || emergencyAttendance == null)
        return;

    ims.emergency.forms.edassessmentcomponent.GenForm.grdAttendanceHistoryRow childRow = row.getRows().newRow();
    childRow.setColID((ConfigFlag.GEN.ED_USE_CUSTOM_ATTENDANCE_ID.getValue() && emergencyAttendance.getCustomID() != null ? emergencyAttendance.getCustomID() : emergencyAttendance.getID_EmergencyAttendance().toString()) + (emergencyAttendance.getRegistrationDateTimeIsNotNull() ? " - " + emergencyAttendance.getRegistrationDateTime().toString() : ""));

    //WDEV-19299
    PatientProblemForClinicianWorklistVo mainPresentingProblem = domain.getMainPresentingProblem(emergencyAttendance.getCareContext());
    childRow.setTooltip(mainPresentingProblem!=null ? "<b>Presenting Problem: </b>" +  mainPresentingProblem.getPatientProblem() : null );

    childRow.setValue((EmergencyAttendanceForTriageLiteVo) emergencyAttendance);
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onMessageBoxClosed(int messageBoxId, DialogResult result) throws PresentationLogicException 
{
    if(form.getLocalContext().getMessageBoxIdForOldEmergencyAttendanceIsNotNull() && form.getLocalContext().getMessageBoxIdForOldEmergencyAttendance().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            //form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());
            form.getGlobalContext().Emergency.setTriage(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails());     //wdev-18332
            form.getLocalContext().setCurrentAttendance(null);

            populateScreenFromData();
            updateControlsState();
        }
        //WDEV-15951
        else if (DialogResult.NO.equals(result) && form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)//WDEV-15868
        {
            form.getLocalContext().setHistoryMode(false);
            form.grdAttendanceHistory().setValue(form.getLocalContext().getSelectedWaitingPatient().getAttendance());
            form.getGlobalContext().Emergency.setTriage(form.getLocalContext().getSelectedWaitingPatient().getTriageDetails());     //wdev-18332
        }

        //WDEV-17745
        form.getLocalContext().setCurrentEvent(EDAssessmentComponent.START_TIMER);
        form.fireCustomControlValueChanged();
    }

    if (form.getLocalContext().getMessageBoxIdForNotCompletedTriageIsNotNull() && form.getLocalContext().getMessageBoxIdForNotCompletedTriage().equals(messageBoxId))
    {
        if(DialogResult.YES.equals(result))
        {
            movePatient();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void refreshCoding()
{
    if (form.getLocalContext().getSelectedWaitingPatient()==null)
        return ;

    EmergencyAttendanceForTriageLiteVo emergencyattendanceToSave=populateDataFromScreen((EmergencyAttendanceForTriageLiteVo) form.getLocalContext().getSelectedWaitingPatient().getAttendance().clone());

    // Validate record
    String[] errors = emergencyattendanceToSave.validate();

    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return ;
    }

    try
    {
        domain.refreshCoding(emergencyattendanceToSave);
        return ;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return ;
    }
}
项目:openMAXIMS    文件:Logic.java   
private EmergencyAttendanceForTriageLiteVo populateDataFromScreen(EmergencyAttendanceForTriageLiteVo emergencyAttendance)
{
    emergencyAttendance.setMC(null);
    emergencyAttendance.setCOTA(null);
    emergencyAttendance.setPCG1(null);
    emergencyAttendance.setPCG2(null);
    emergencyAttendance.setHAR(null);
    emergencyAttendance.setPurchaser(null);
    emergencyAttendance.setSequenceNumber(null);

    return emergencyAttendance;
}
项目:openMAXIMS    文件:Logic.java   
private void addEmergencyAttendanceRow(grdAttendanceHistoryRow row, EmergencyAttendanceForTriageVo emergencyAttendance) 
{
    if(row == null || emergencyAttendance == null)
        return;

    grdAttendanceHistoryRow childRow = row.getRows().newRow();
    childRow.setColID(emergencyAttendance.getID_EmergencyAttendance().toString() + (emergencyAttendance.getRegistrationDateTimeIsNotNull() ? " - " + emergencyAttendance.getRegistrationDateTime().toString() : ""));
    childRow.setValue((EmergencyAttendanceForTriageLiteVo) emergencyAttendance);
}
项目:openMAXIMS    文件:Logic.java   
private void selectedAttendanceHistory() 
{
    form.getLocalContext().setHistoryMode(false);


    if(form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
    {
        if (form.getLocalContext().getCurrentAttendance() == null) //WDEV-15951, wdev-16751
        {
            EmergencyAttendanceForTriageLiteVo attendance = domain.getEmergencyAttendance((EmergencyAttendanceRefVo) form.grdAttendanceHistory().getValue());

            if (attendance.getDischargeDateTime() == null)
            {
                form.getLocalContext().setCurrentAttendance(attendance);
            }
        }

        if(!form.grdAttendanceHistory().getValue().equals(form.getLocalContext().getCurrentAttendance()))
        {
            form.getLocalContext().setHistoryMode(true);
            form.getLocalContext().setMessageBoxIdForOldEmergencyAttendance(engine.showMessage("Do you wish to view the triage details for the attendance on " + ((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()).getRegistrationDateTime(), "" , MessageButtons.YESNO, MessageIcon.QUESTION));
        }
        else
        {
            form.getLocalContext().setSelectedTriagePatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());

            populateScreenFromData();
            updateControlsState();
        }
    }
}
项目:openMAXIMS    文件:EDAssessmentComponentImpl.java   
public ims.emergency.vo.EmergencyAttendanceForTriageLiteVo getEmergencyAttendance(ims.core.admin.vo.EmergencyAttendanceRefVo attendanceRef)
{
    if(attendanceRef == null)
        throw new CodingRuntimeException("Cannot get Attendance on null Id.");

    return EmergencyAttendanceForTriageLiteVoAssembler.create((EmergencyAttendance) getDomainFactory().getDomainObject(EmergencyAttendance.class, attendanceRef.getID_EmergencyAttendance()));

}
项目:openMAXIMS    文件:EDAssessmentComponentImpl.java   
public void refreshCoding(EmergencyAttendanceForTriageLiteVo attendanceToSave) throws StaleObjectException
{
    // Check parameter to save
    if (attendanceToSave == null)
        throw new CodingRuntimeException("Can not save null record to data base.");

    if (!attendanceToSave.isValidated())
        throw new CodingRuntimeException("Can not save record not validated to data base.");

    // Extract domain object
    EmergencyAttendance domEmergencyAtt = EmergencyAttendanceForTriageLiteVoAssembler.extractEmergencyAttendance(getDomainFactory(), attendanceToSave);

    getDomainFactory().save(domEmergencyAtt);


    AttendanceRequiringContracting tempAttReqContracting = attendanceFoundInAttendanceReqContracting(attendanceToSave);
    if (tempAttReqContracting==null )
    {
        AttendanceRequiringContracting doAttendanceRequiringContracting=new AttendanceRequiringContracting();
        doAttendanceRequiringContracting.setPatient(domEmergencyAtt.getPatient());
        doAttendanceRequiringContracting.setAttendance(domEmergencyAtt);

        getDomainFactory().save(doAttendanceRequiringContracting);
    }
    else //if found, set the status to null
    {
        tempAttReqContracting.setStatus(null);
        getDomainFactory().save(tempAttReqContracting);
    }

    return;
}
项目:openMAXIMS    文件:TriageImpl.java   
public EmergencyAttendanceForTriageLiteVo getEmergencyAttendance(EmergencyAttendanceRefVo attendanceRef)
{
    if(attendanceRef == null)
        throw new CodingRuntimeException("Cannot get Attendance on null Id.");

    return EmergencyAttendanceForTriageLiteVoAssembler.create((EmergencyAttendance) getDomainFactory().getDomainObject(EmergencyAttendance.class, attendanceRef.getID_EmergencyAttendance()));
}
项目:openMAXIMS    文件:ClinicianAssessmentWorklistImpl.java   
public EmergencyAttendanceForTriageLiteVo getEmergencyAttendance(EmergencyAttendanceRefVo attendanceRef)
{
    if(attendanceRef == null)
        throw new CodingRuntimeException("Cannot get Attendance on null Id.");

    return EmergencyAttendanceForTriageLiteVoAssembler.create((EmergencyAttendance) getDomainFactory().getDomainObject(EmergencyAttendance.class, attendanceRef.getID_EmergencyAttendance()));
}
项目:openMAXIMS    文件:Logic.java   
private void addEmergencyAttendanceRow(grdAttendanceHistoryRow row, EmergencyAttendanceForTriageVo emergencyAttendance) 
{
    if(row == null || emergencyAttendance == null)
        return;

    grdAttendanceHistoryRow childRow = row.getRows().newRow();
    childRow.setColID(emergencyAttendance.getID_EmergencyAttendance().toString() + (emergencyAttendance.getRegistrationDateTimeIsNotNull() ? " - " + emergencyAttendance.getRegistrationDateTime().toString() : ""));

    childRow.setValue((EmergencyAttendanceForTriageLiteVo) emergencyAttendance);
}
项目:openMAXIMS    文件:Logic.java   
private void selectedAttendanceHistory() 
{
    form.getLocalContext().setHistoryMode(false);



    if(form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
    {
        if (form.getLocalContext().getCurrentAttendance() == null) //WDEV-15951, wdev-16751
        {
            EmergencyAttendanceForTriageLiteVo attendance = domain.getEmergencyAttendance((EmergencyAttendanceRefVo) form.grdAttendanceHistory().getValue());

            if (attendance.getDischargeDateTime() == null)
            {
                form.getLocalContext().setCurrentAttendance(attendance);
            }
        }

        if(!form.grdAttendanceHistory().getValue().equals(form.getLocalContext().getCurrentAttendance()))
        {
            form.getLocalContext().setHistoryMode(true);
            form.getLocalContext().setMessageBoxIdForOldEmergencyAttendance(engine.showMessage("Do you wish to view the clinician details for the attendance on " + ((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()).getRegistrationDateTime(), "" , MessageButtons.YESNO, MessageIcon.QUESTION));
        }
        else
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());

            populateScreenFromData();
            updateControlsState();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addEmergencyAttendanceRow(ims.emergency.forms.edassessmentcomponent.GenForm.grdAttendanceHistoryRow row,   EmergencyAttendanceForTriageVo emergencyAttendance) 
{
    if(row == null || emergencyAttendance == null)
        return;

    ims.emergency.forms.edassessmentcomponent.GenForm.grdAttendanceHistoryRow childRow = row.getRows().newRow();
    childRow.setColID(emergencyAttendance.getID_EmergencyAttendance().toString() + (emergencyAttendance.getRegistrationDateTimeIsNotNull() ? " - " + emergencyAttendance.getRegistrationDateTime().toString() : ""));

    childRow.setValue((EmergencyAttendanceForTriageLiteVo) emergencyAttendance);
}
项目:openMAXIMS    文件:Logic.java   
private void selectedAttendanceHistory() 
{
    form.getLocalContext().setHistoryMode(false);


    if(form.grdAttendanceHistory().getValue() instanceof EmergencyAttendanceForTriageLiteVo)
    {

        if (form.getLocalContext().getCurrentAttendance() == null) //WDEV-15951, wdev-16751
        {
            EmergencyAttendanceForTriageLiteVo attendance = domain.getEmergencyAttendance((EmergencyAttendanceRefVo) form.grdAttendanceHistory().getValue());

            if (attendance.getDischargeDateTime() == null)
            {
                form.getLocalContext().setCurrentAttendance(attendance);
            }
        }


        if(!form.grdAttendanceHistory().getValue().equals(form.getLocalContext().getCurrentAttendance()))
        {
            form.getLocalContext().setHistoryMode(true);
            form.getLocalContext().setMessageBoxIdForOldEmergencyAttendance(engine.showMessage("Do you wish to view the clinician details for the attendance on " + ((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()).getRegistrationDateTime(), "" , MessageButtons.YESNO, MessageIcon.QUESTION));

            //WDEV-17745
            form.getLocalContext().setCurrentEvent(EDAssessmentComponent.STOP_TIMER);
            form.fireCustomControlValueChanged();

        }
        else
        {
            form.getLocalContext().setSelectedWaitingPatient(domain.geTrackingForTriageByAttendanceId((EmergencyAttendanceForTriageLiteVo) form.grdAttendanceHistory().getValue()));
            form.getGlobalContext().Emergency.setTracking(form.getLocalContext().getSelectedWaitingPatient()); //WDEV-17739
            //form.dyngrdPatients().setValue(form.getLocalContext().getSelectedWaitingPatient());

            populateScreenFromData();
            updateControlsState();
        }
    }
}