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

项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData(EDPartialAdmissionVo edPartialAdmissionVo)
{
    if (edPartialAdmissionVo==null)
        return;

    form.dtimDecisionToAdmit().setValue(edPartialAdmissionVo.getDecisionToAdmitDateTime());
    form.cmbConsultant().setValue(edPartialAdmissionVo.getAdmittingConsultant());
    form.cmbSpecialty().setValue(edPartialAdmissionVo.getSpecialty());
    form.cmbBedAllocationType().setValue(edPartialAdmissionVo.getAllocatedBedType());
    form.txtBedAllocationNote().setValue(edPartialAdmissionVo.getAllocatedBedNote());
    form.dtimBedAllocated().setValue(edPartialAdmissionVo.getAllocatedDateTime());
    form.cmbBedAllocatedWard().setValue(edPartialAdmissionVo.getAllocatedWard());
    form.cmbAdmissionStatus().setValue(edPartialAdmissionVo.getAllocatedStatus());
    //form.cmbPatientStatus().setValue(null);
    //form.cmbRequestedBedType().setValue(null);
}
项目:AvoinApotti    文件:TransferDialogImpl.java   
public ims.emergency.vo.EDTransferVo saveEDTransfer(EDTransferVo record, EDPartialAdmissionVo partialadmis) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(record == null)
        throw new CodingRuntimeException("Cannot save a null EDTransfer record.");


    DomainFactory factory = getDomainFactory();
    EDTransfer doEDTransfer = EDTransferVoAssembler.extractEDTransfer(factory, record);

    factory.save(doEDTransfer);

    if( partialadmis != null )
    {
        partialadmis.setAllocatedStatus(AllocationStatus.CANCELLED_ADMISSION);
        EDPartialAdmission  doEDPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, partialadmis);
        factory.save(doEDPartialAdmission);
    }

    return EDTransferVoAssembler.create(doEDTransfer);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(EDPartialAdmissionVo edPartialAdmissionVo)
{
    if (edPartialAdmissionVo==null)
        return;


    form.dtimDecisionToAdmit().setValue(edPartialAdmissionVo.getDecisionToAdmitDateTime());
    form.ccConsultant().setValue(edPartialAdmissionVo.getAdmittingConsultant());
    form.cmbSpecialty().setValue(edPartialAdmissionVo.getSpecialty());

    form.dtimBedAllocated().setValue(edPartialAdmissionVo.getAllocatedDateTime());
    if (edPartialAdmissionVo.getAllocatedWard() != null) //WDEV-19336
    {   
        form.cmbBedAllocatedWard().newRow(edPartialAdmissionVo.getAllocatedWard(), edPartialAdmissionVo.getAllocatedWard().getName() != null ? edPartialAdmissionVo.getAllocatedWard().getName() : "");
        form.cmbBedAllocatedWard().setValue(edPartialAdmissionVo.getAllocatedWard());
    }
    form.cmbAdmissionStatus().setValue(edPartialAdmissionVo.getAllocatedStatus());
    form.ccAuthoringInfo().setValue(edPartialAdmissionVo.getAuthoringInfo());

    TrackingForEDPartialAdmissionVo currentTracking = form.getLocalContext().getCurrentTrackingForEdPartialAdmission();
    form.cmbPatientStatus().setValue(currentTracking!=null && currentTracking.getAttendanceIsNotNull() ? currentTracking.getAttendance().getPatientAttendanceStatus() : null);
    form.cmbAccomodationTypeRequested().setValue(edPartialAdmissionVo.getAccomodationRequestedType());
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
    if( args != null && args.length == 1 && args[0] != null && args[0] instanceof EDPartialAdmissionVo)
    {
        form.getLocalContext().setEDPartialAdmissionForTrackingVo((EDPartialAdmissionVo) args[0]);
    }
    else
        form.getLocalContext().setEDPartialAdmissionForTrackingVo(null);

    initialize();
    open();
    if(form.getLocalContext().getlcCurrentTrackingRecord() == null || 
               (form.getLocalContext().getlcCurrentTrackingRecordIsNotNull() && form.getLocalContext().getlcCurrentTrackingRecord().getCurrentTransferRecord() == null) ||
               (form.getLocalContext().getlcCurrentTrackingRecordIsNotNull() && form.getLocalContext().getlcCurrentTrackingRecord().getCurrentTransferRecordIsNotNull() &&  (form.getLocalContext().getlcCurrentTrackingRecord().getCurrentTransferRecord().getAcceptedDateTime() != null || Boolean.TRUE.equals(form.getLocalContext().getlcCurrentTrackingRecord().getCurrentTransferRecord().getNotAccepted()))))
    {
        newInstance();
    }       
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(EDPartialAdmissionVo edPartialAdmissionVo)
{
    if (edPartialAdmissionVo==null)
        return;

    form.dtimDecisionToAdmit().setValue(edPartialAdmissionVo.getDecisionToAdmitDateTime());
    form.cmbConsultant().setValue(edPartialAdmissionVo.getAdmittingConsultant());
    form.cmbSpecialty().setValue(edPartialAdmissionVo.getSpecialty());
    form.cmbBedAllocationType().setValue(edPartialAdmissionVo.getAllocatedBedType());
    form.txtBedAllocationNote().setValue(edPartialAdmissionVo.getAllocatedBedNote());
    form.dtimBedAllocated().setValue(edPartialAdmissionVo.getAllocatedDateTime());
    form.cmbBedAllocatedWard().setValue(edPartialAdmissionVo.getAllocatedWard());
    form.cmbAdmissionStatus().setValue(edPartialAdmissionVo.getAllocatedStatus());
    //form.cmbPatientStatus().setValue(null);
    //form.cmbRequestedBedType().setValue(null);
}
项目:openMAXIMS    文件:TransferDialogImpl.java   
public ims.emergency.vo.EDTransferVo saveEDTransfer(EDTransferVo record, EDPartialAdmissionVo partialadmis) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(record == null)
        throw new CodingRuntimeException("Cannot save a null EDTransfer record.");


    DomainFactory factory = getDomainFactory();
    EDTransfer doEDTransfer = EDTransferVoAssembler.extractEDTransfer(factory, record);

    factory.save(doEDTransfer);

    if( partialadmis != null )
    {
        partialadmis.setAllocatedStatus(AllocationStatus.CANCELLED_ADMISSION);
        EDPartialAdmission  doEDPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, partialadmis);
        factory.save(doEDPartialAdmission);
    }

    return EDTransferVoAssembler.create(doEDTransfer);
}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreenFromData(EDPartialAdmissionVo edPartialAdmissionVo)
{
    if (edPartialAdmissionVo==null)
        return;

    form.dtimDecisionToAdmit().setValue(edPartialAdmissionVo.getDecisionToAdmitDateTime());
    form.cmbConsultant().setValue(edPartialAdmissionVo.getAdmittingConsultant());
    form.cmbSpecialty().setValue(edPartialAdmissionVo.getSpecialty());
    form.cmbBedAllocationType().setValue(edPartialAdmissionVo.getAllocatedBedType());
    form.txtBedAllocationNote().setValue(edPartialAdmissionVo.getAllocatedBedNote());
    form.dtimBedAllocated().setValue(edPartialAdmissionVo.getAllocatedDateTime());
    form.cmbBedAllocatedWard().setValue(edPartialAdmissionVo.getAllocatedWard());
    form.cmbAdmissionStatus().setValue(edPartialAdmissionVo.getAllocatedStatus());
    //form.cmbPatientStatus().setValue(null);
    //form.cmbRequestedBedType().setValue(null);
}
项目:openmaxims-linux    文件:TransferDialogImpl.java   
public ims.emergency.vo.EDTransferVo saveEDTransfer(EDTransferVo record, EDPartialAdmissionVo partialadmis) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(record == null)
        throw new CodingRuntimeException("Cannot save a null EDTransfer record.");


    DomainFactory factory = getDomainFactory();
    EDTransfer doEDTransfer = EDTransferVoAssembler.extractEDTransfer(factory, record);

    factory.save(doEDTransfer);

    if( partialadmis != null )
    {
        partialadmis.setAllocatedStatus(AllocationStatus.CANCELLED_ADMISSION);
        EDPartialAdmission  doEDPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, partialadmis);
        factory.save(doEDPartialAdmission);
    }

    return EDTransferVoAssembler.create(doEDTransfer);
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
    if( args != null && args.length == 1 && args[0] != null && args[0] instanceof EDPartialAdmissionVo)
    {
        form.getLocalContext().setEDPartialAdmissionForTrackingVo((EDPartialAdmissionVo) args[0]);
    }
    else
        form.getLocalContext().setEDPartialAdmissionForTrackingVo(null);

    open();
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnNewTransferClick() throws PresentationLogicException 
{
    EDPartialAdmissionVo currentPartialAdm = domain.getTrackingWithEDPartialAdmission(form.getGlobalContext().Emergency.getTracking());

    if( currentPartialAdm != null && AllocationStatus.ACTIVE.equals(currentPartialAdm.getAllocatedStatus()))
    {
        form.getLocalContext().setlcCurrentPartialAdmission(currentPartialAdm);
        form.getLocalContext().setlcDTAWithTransferMessageId(engine.showMessage("A decision to admit record exists for this patient. If you proceed to Transfer the patient, the record will be cancelled on the ED system and the PAS system. Are you sure you want to continue?","Confirm Transfer" ,MessageButtons.YESNO, MessageIcon.QUESTION));
        return;
    }

    newInstance();  
}
项目:openMAXIMS    文件:TrackingImpl.java   
public TrackingWithPartialAdmissionVo cancelCurrentPartialAdmission(TrackingWithPartialAdmissionVo trWithPartialAdmission, EDPartialAdmissionVo partialAdmission) throws StaleObjectException, UniqueKeyViolationException
{
    if(trWithPartialAdmission == null || partialAdmission== null)
        throw new CodingRuntimeException("Cannot save a null tracking record.");

    if(!trWithPartialAdmission.isValidated() || !trWithPartialAdmission.isValidated())
        throw new CodingRuntimeException("tracking record is not validated.");

    DomainFactory factory = getDomainFactory();

    EDPartialAdmission doPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, partialAdmission);
    factory.save(doPartialAdmission);

    Tracking doTracking = TrackingWithPartialAdmissionVoAssembler.extractTracking(factory, trWithPartialAdmission);
    factory.save(doTracking);

    EDPartialAdmissionDialog dom = (EDPartialAdmissionDialog) getDomainImpl(EDPartialAdmissionDialogImpl.class);
    try
    {
        dom.triggerCancelPartialAdmission(trWithPartialAdmission.getAttendance(), trWithPartialAdmission.getCurrentPartialAdmission());
    }
    catch (DomainInterfaceException e)
    {
        e.printStackTrace();
    }

    return TrackingWithPartialAdmissionVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:TransferDialogImpl.java   
public EDPartialAdmissionVo getTrackingWithEDPartialAdmission(TrackingRefVo trackingRef)
{
    if(trackingRef == null || trackingRef.getID_Tracking() == null)
        throw new CodingRuntimeException("Cannot get Tracking record on null Tracking Id.");

    DomainFactory factory = getDomainFactory();
    Tracking doTracking = (Tracking) factory.getDomainObject(Tracking.class, trackingRef.getID_Tracking());

    EDPartialAdmission currentPartialAdm = null;
    if (doTracking != null)
        currentPartialAdm = doTracking.getCurrentPartialAdmission();

    return EDPartialAdmissionVoAssembler.create(currentPartialAdm);
}
项目:openMAXIMS    文件:TransferDialogImpl.java   
public EDPartialAdmissionVo cancelCurrentPartialAdmission(EDPartialAdmissionVo edPartialAdmissionVo,TrackingForTransferVo trackingRecord) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();
    if( edPartialAdmissionVo != null )
    {
        edPartialAdmissionVo.setAllocatedStatus(AllocationStatus.CANCELLED_ADMISSION);
        EDPartialAdmission  doEDPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, edPartialAdmissionVo);
        factory.save(doEDPartialAdmission);

        if (trackingRecord != null)
        {
            Tracking dotrackingRecord = TrackingForTransferVoAssembler.extractTracking(factory, trackingRecord);
            dotrackingRecord.setCurrentPartialAdmission(null);
            dotrackingRecord.setBedAvailability(null);          
            factory.save(dotrackingRecord);

            EDPartialAdmissionDialog dom = (EDPartialAdmissionDialog) getDomainImpl(EDPartialAdmissionDialogImpl.class);
            try
            {
                dom.triggerCancelPartialAdmission(trackingRecord.getAttendance(), edPartialAdmissionVo);
            }
            catch (DomainInterfaceException e)
            {
                e.printStackTrace();
            }
        }

        return EDPartialAdmissionVoAssembler.create(doEDPartialAdmission);
    }
    return null;
}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public EDPartialAdmissionVo cancelCurrentPartialAdmission(EDPartialAdmissionVo edPartialAdmissionVo, TrackingForReferalToSpecialtyVo trackingRecord) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();
    if( edPartialAdmissionVo != null )
    {
        edPartialAdmissionVo.setAllocatedStatus(AllocationStatus.CANCELLED_ADMISSION);
        EDPartialAdmission  doEDPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, edPartialAdmissionVo);
        factory.save(doEDPartialAdmission);

        if (trackingRecord != null)
        {
            Tracking dotrackingRecord = TrackingForReferalToSpecialtyVoAssembler.extractTracking(factory, trackingRecord);
            dotrackingRecord.setBedAvailability(null);
            dotrackingRecord.setCurrentPartialAdmission(null);
            factory.save(dotrackingRecord);

            EDPartialAdmissionDialog dom = (EDPartialAdmissionDialog) getDomainImpl(EDPartialAdmissionDialogImpl.class);
            try
            {
                dom.triggerCancelPartialAdmission(trackingRecord.getAttendance(), edPartialAdmissionVo);
            }
            catch (DomainInterfaceException e)
            {
                e.printStackTrace();
            }
        }

        return EDPartialAdmissionVoAssembler.create(doEDPartialAdmission);
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
    if( args != null && args.length == 1 && args[0] != null && args[0] instanceof EDPartialAdmissionVo)
    {
        form.getLocalContext().setEDPartialAdmissionForTrackingVo((EDPartialAdmissionVo) args[0]);
    }
    else
        form.getLocalContext().setEDPartialAdmissionForTrackingVo(null);

    open();
}
项目:openmaxims-linux    文件:Logic.java   
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
    if( args != null && args.length == 1 && args[0] != null && args[0] instanceof EDPartialAdmissionVo)
    {
        form.getLocalContext().setEDPartialAdmissionForTrackingVo((EDPartialAdmissionVo) args[0]);
    }
    else
        form.getLocalContext().setEDPartialAdmissionForTrackingVo(null);

    open();
}
项目:AvoinApotti    文件:Logic.java   
private boolean save()
{
    EDPartialAdmissionVo edPartialAdmissionToSave = populateDataFromScreen(form.getLocalContext().getCurrentEDPartialAdmission());

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

    /*
    // Check SOE
    if (edPartialAdmissionToSave.getID_ReferralToSpecTeamIsNotNull() && domain.isStale(edPartialAdmissionToSave))
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        if (form.getLocalContext().getSelectedReferralToSpecialtyIsNotNull())
        {
            form.getLocalContext().setSelectedReferralToSpecialty(domain.getReferralToSpecialty(form.getLocalContext().getSelectedReferralToSpecialty()));
        }
        if (form.getLocalContext().getTrackingForReferralIsNotNull())
        {
            form.getLocalContext().setTrackingForReferral(domain.getTrackingForReferral(form.getLocalContext().getTrackingForReferral()));
        }
        open();
        return false;
    }

     */
    TrackingForEDPartialAdmissionVo trackingToSave = null;

    // for a new EDPartialAdmissionVo set the current EdPartiqalAdmission in tracking and set Tracking.CurrentStatus
    if (edPartialAdmissionToSave.getID_EDPartialAdmission()==null)
    {
        trackingToSave = form.getLocalContext().getCurrentTrackingForEdPartialAdmission();

        //TrackingAttendanceStatusVo    trackingStatusToSave = populateTrackingAttendanceStatus(TrackingStatus.REFERRED_TO_OTHER_SPECIALITY);

        trackingToSave.setCurrentPartialAdmission(edPartialAdmissionToSave);
        //trackingToSave.setCurrentStatus(trackingStatusToSave);
    }

    try
    {
        if (trackingToSave != null )
        {
            String[] errors1 = trackingToSave.validate();

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


            form.getLocalContext().setCurrentEDPartialAdmission(domain.save(trackingToSave,null));

            form.getLocalContext().setCurrentTrackingForEdPartialAdmission(domain.getTrackingForEdPartialAdmission(trackingToSave));
        }
        else
            form.getLocalContext().setCurrentEDPartialAdmission(domain.save(null,edPartialAdmissionToSave));

    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());

        return false;
    }

    return true;

}
项目:openMAXIMS    文件:Logic.java   
private boolean save()
{
    EDPartialAdmissionVo edPartialAdmissionToSave = populateDataFromScreen(form.getLocalContext().getCurrentEDPartialAdmission());

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

    /*
    // Check SOE
    if (edPartialAdmissionToSave.getID_ReferralToSpecTeamIsNotNull() && domain.isStale(edPartialAdmissionToSave))
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        if (form.getLocalContext().getSelectedReferralToSpecialtyIsNotNull())
        {
            form.getLocalContext().setSelectedReferralToSpecialty(domain.getReferralToSpecialty(form.getLocalContext().getSelectedReferralToSpecialty()));
        }
        if (form.getLocalContext().getTrackingForReferralIsNotNull())
        {
            form.getLocalContext().setTrackingForReferral(domain.getTrackingForReferral(form.getLocalContext().getTrackingForReferral()));
        }
        open();
        return false;
    }

     */
    TrackingForEDPartialAdmissionVo trackingToSave = null;

    // for a new EDPartialAdmissionVo set the current EdPartiqalAdmission in tracking and set Tracking.CurrentStatus
    if (edPartialAdmissionToSave.getID_EDPartialAdmission()==null)
    {
        trackingToSave = form.getLocalContext().getCurrentTrackingForEdPartialAdmission();

        //TrackingAttendanceStatusVo    trackingStatusToSave = populateTrackingAttendanceStatus(TrackingStatus.REFERRED_TO_OTHER_SPECIALITY);

        trackingToSave.setCurrentPartialAdmission(edPartialAdmissionToSave);
        //trackingToSave.setCurrentStatus(trackingStatusToSave);
    }

    try
    {
        if (trackingToSave != null )
        {
            String[] errors1 = trackingToSave.validate();

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


            form.getLocalContext().setCurrentEDPartialAdmission(domain.save(trackingToSave,null));

            form.getLocalContext().setCurrentTrackingForEdPartialAdmission(domain.getTrackingForEdPartialAdmission(trackingToSave));
        }
        else
            form.getLocalContext().setCurrentEDPartialAdmission(domain.save(null,edPartialAdmissionToSave));

    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());

        return false;
    }

    return true;

}
项目:openmaxims-linux    文件:Logic.java   
private boolean save()
{
    EDPartialAdmissionVo edPartialAdmissionToSave = populateDataFromScreen(form.getLocalContext().getCurrentEDPartialAdmission());

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

    /*
    // Check SOE
    if (edPartialAdmissionToSave.getID_ReferralToSpecTeamIsNotNull() && domain.isStale(edPartialAdmissionToSave))
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        if (form.getLocalContext().getSelectedReferralToSpecialtyIsNotNull())
        {
            form.getLocalContext().setSelectedReferralToSpecialty(domain.getReferralToSpecialty(form.getLocalContext().getSelectedReferralToSpecialty()));
        }
        if (form.getLocalContext().getTrackingForReferralIsNotNull())
        {
            form.getLocalContext().setTrackingForReferral(domain.getTrackingForReferral(form.getLocalContext().getTrackingForReferral()));
        }
        open();
        return false;
    }

     */
    TrackingForEDPartialAdmissionVo trackingToSave = null;

    // for a new EDPartialAdmissionVo set the current EdPartiqalAdmission in tracking and set Tracking.CurrentStatus
    if (edPartialAdmissionToSave.getID_EDPartialAdmission()==null)
    {
        trackingToSave = form.getLocalContext().getCurrentTrackingForEdPartialAdmission();

        //TrackingAttendanceStatusVo    trackingStatusToSave = populateTrackingAttendanceStatus(TrackingStatus.REFERRED_TO_OTHER_SPECIALITY);

        trackingToSave.setCurrentPartialAdmission(edPartialAdmissionToSave);
        //trackingToSave.setCurrentStatus(trackingStatusToSave);
    }

    try
    {
        if (trackingToSave != null )
        {
            String[] errors1 = trackingToSave.validate();

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


            form.getLocalContext().setCurrentEDPartialAdmission(domain.save(trackingToSave,null));

            form.getLocalContext().setCurrentTrackingForEdPartialAdmission(domain.getTrackingForEdPartialAdmission(trackingToSave));
        }
        else
            form.getLocalContext().setCurrentEDPartialAdmission(domain.save(null,edPartialAdmissionToSave));

    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());

        return false;
    }

    return true;

}