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

项目:AvoinApotti    文件:Logic.java   
@SuppressWarnings("unused")
private boolean isInpatientEpisodeonTransefrOutList(InpatientEpisodeRefVo voInpatEpis)
{
    if(voInpatEpis == null)
        throw new CodingRuntimeException("voInpatEpis is null in method isInpatientEpisodeonTransefrOutList");

    PendingTransfersLiteVoCollection voCollTransfersOut = form.getLocalContext().getTransfersOut();
    if(voCollTransfersOut == null)
        return false;

    for(PendingTransfersLiteVo voTransferOut : voCollTransfersOut)
    {
        if(voTransferOut.getInpatientEpisodeIsNotNull() && voTransferOut.getInpatientEpisode().equals(voInpatEpis))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private PendingTransfersLiteVo isInpatientEpisodeonTransferOutList(InpatientEpisodeRefVo voInpatEpis)
{
    if (voInpatEpis == null)
        return null;

    PendingTransfersLiteVoCollection voCollTransfersOut = form.getGlobalContext().Core.getADTTransfersOut();
    if (voCollTransfersOut == null)
        return null;

    for (PendingTransfersLiteVo voTransferOut : voCollTransfersOut)
    {
        if (voTransferOut.getInpatientEpisodeIsNotNull() && voTransferOut.getInpatientEpisode().equals(voInpatEpis))
            return voTransferOut;
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isInpatientEpisodeonTransefrOutList(InpatientEpisodeRefVo voInpatEpis)
{
    if(voInpatEpis == null)
        throw new CodingRuntimeException("voInpatEpis is null in method isInpatientEpisodeonTransefrOutList");

    PendingTransfersLiteVoCollection voCollTransfersOut = form.getLocalContext().getTransfersOut();
    if(voCollTransfersOut == null)
        return false;

    for(PendingTransfersLiteVo voTransferOut : voCollTransfersOut)
    {
        if(voTransferOut.getInpatientEpisodeIsNotNull() && voTransferOut.getInpatientEpisode().equals(voInpatEpis))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
@SuppressWarnings("unused")
private boolean isInpatientEpisodeonTransefrOutList(InpatientEpisodeRefVo voInpatEpis)
{
    if(voInpatEpis == null)
        throw new CodingRuntimeException("voInpatEpis is null in method isInpatientEpisodeonTransefrOutList");

    PendingTransfersLiteVoCollection voCollTransfersOut = form.getLocalContext().getTransfersOut();
    if(voCollTransfersOut == null)
        return false;

    for(PendingTransfersLiteVo voTransferOut : voCollTransfersOut)
    {
        if(voTransferOut.getInpatientEpisodeIsNotNull() && voTransferOut.getInpatientEpisode().equals(voInpatEpis))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private PendingTransfersLiteVo isInpatientEpisodeonTransferOutList(InpatientEpisodeRefVo voInpatEpis)
{
    if (ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS") && form.getGlobalContext().Core.getADTPendingTransferIsNotNull())
        return form.getGlobalContext().Core.getADTPendingTransfer();

    if (voInpatEpis == null)
        return null;

    PendingTransfersLiteVoCollection voCollTransfersOut = form.getGlobalContext().Core.getADTTransfersOut();
    if (voCollTransfersOut == null)
        return null;

    for (PendingTransfersLiteVo voTransferOut : voCollTransfersOut)
    {
        if (voTransferOut.getInpatientEpisodeIsNotNull() && voTransferOut.getInpatientEpisode().equals(voInpatEpis))
            return voTransferOut;
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private PendingTransfersLiteVo populatePendingTransferOnAcceptFromScreen(PendingTransfersLiteVo value)
{
    if (value == null)
        return null;

    if (value.getPatientStatus() == null )
        value.setPatientStatus(value.getInpatientEpisode().getPasEvent().getPatient().getPatientCategory() != null ? value.getInpatientEpisode().getPasEvent().getPatient().getPatientCategory() : PatientStatus.NHS);
    value.setWardType(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbWardType().getValue());
    value.setService(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().qmbInService().getValue());
    value.setSpecialty(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbInSpecialty().getValue());
    value.setTransferRequestDateTime(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().dtimTransfer().getValue());
    value.setCurrentStatus(TransferStatus.TRANSFERRED);

    if (form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().getValue() instanceof MedicVo)
    {       
        value.setConsultant((MedicVo)form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().getValue());
    }
    return value;
}
项目:openMAXIMS    文件:Logic.java   
private PendingTransfersLiteVo populatePendingTransferDataFromScreen(PendingTransfersLiteVo selectedPendingTransfer)
{
    if (selectedPendingTransfer == null)
        return null;
    selectedPendingTransfer.setPatientStatus(form.cmbPatientStatus().getValue());
    selectedPendingTransfer.setWardType(form.cmbWardType().getValue());
    selectedPendingTransfer.setService(form.qmbService().getValue());
    selectedPendingTransfer.setSpecialty(form.cmbSpecialty().getValue());
    selectedPendingTransfer.setTransferRequestDateTime(form.dtimTransferAccept().getValue());
    selectedPendingTransfer.setCurrentStatus(TransferStatus.TRANSFERRED);

    if (form.ccConsultant().getValue() instanceof MedicVo)
    {       
        selectedPendingTransfer.setConsultant((MedicVo)form.ccConsultant().getValue());
    }

    return selectedPendingTransfer;
}
项目:openMAXIMS    文件:Logic.java   
private boolean populateDataFromScreen(PendingTransfersLiteVo adtPendingTransfer)
{
    if (adtPendingTransfer == null)
        return false;

    if (validateUI())
    {   
        if (adtPendingTransfer.getCancellationReasonDetails() == null)
            adtPendingTransfer.setCancellationReasonDetails(new TransferCancellationReasonDetailsVo());
        adtPendingTransfer.getCancellationReasonDetails().setCancellationComments(form.txtComment().getValue());
        adtPendingTransfer.getCancellationReasonDetails().setCancellationReason(form.cmbCancellationReason().getValue());

        String[] validationErrors = adtPendingTransfer.validate();
        if (validationErrors != null)
        {
            engine.showErrors(validationErrors);
            return false;
        }
        form.getGlobalContext().Core.setADTPendingTransfer(adtPendingTransfer);
        return true;
    }
    return  false;
}
项目:openMAXIMS    文件:Logic.java   
private void open(Object[] args) throws FormOpenException
{
    if (args != null && args.length > 0 && args[0] instanceof PendingTransfersRefVo)
    {   
        PendingTransfersLiteVo voTransferForEdit = domain.getPendingTransfer((PendingTransfersRefVo)args[0]);
        if (voTransferForEdit == null)
        {   
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            engine.close(DialogResult.ABORT);
            return;             
        }   

        form.getLocalContext().setCurrentPendingTransfer(voTransferForEdit);
        populateScreenFromData(voTransferForEdit);
    }
    else
      throw new FormOpenException("The screen was not initialized correctly or the transfer record selected is invalid.");
}
项目:openMAXIMS    文件:Logic.java   
private boolean save()
{
    PendingTransfersLiteVo voPendingTransferToSave = populateDataFromScreen((PendingTransfersLiteVo)form.getLocalContext().getCurrentPendingTransfer().clone());
    String[] errors = voPendingTransferToSave.validate(validateUiRules());
    if (errors != null)
    {   
        engine.showErrors(errors);
        return false;
    }
    try {
        domain.savePendingTransfer(voPendingTransferToSave);
    } 
    catch (DomainInterfaceException e)
    {
        engine.showMessage(e.getMessage());
        engine.close(DialogResult.ABORT);
        return false;
    }
    catch (StaleObjectException ex)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.close(DialogResult.ABORT);
        return false;
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private PendingTransfersLiteVo populateDataFromScreen(PendingTransfersLiteVo voTransf)
{
    if (voTransf == null)
        return null;
    voTransf.setDestinationWard(form.qmbWard().getValue());
    voTransf.setBedAvailableDateTime(form.dtimBedAvailable().getValue());
    voTransf.setTransferRequestDateTime(form.dtimTransfReq().getValue());
    voTransf.setTransferReason(form.cmbTransferReason().getValue());
    voTransf.setTransferComment(form.txtTransfComment().getValue());
    voTransf.setWardType(form.cmbWardType().getValue());
    voTransf.setService(form.qmbService().getValue());
    voTransf.setSpecialty(form.cmbSpecialty().getValue());
    voTransf.setPatientStatus(form.cmbPatientCategory().getValue());
    voTransf.setConsultant(form.ccConsultant().getValue());

    return voTransf;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isInpatientEpisodeonTransefrOutList(InpatientEpisodeRefVo voInpatEpis)
{
    if(voInpatEpis == null)
        return false;

    PendingTransfersLiteVoCollection voCollTransfersOut = form.getLocalContext().getTransfersOut();
    if(voCollTransfersOut == null)
        return false;

    for(PendingTransfersLiteVo voTransferOut : voCollTransfersOut)
    {
        if(voTransferOut.getInpatientEpisodeIsNotNull() && voTransferOut.getInpatientEpisode().equals(voInpatEpis))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:BedInfoDialogImpl.java   
private BayTimesAdmissionBreachedVo populateBayTimesBreachedRecord(PendingTransfersLiteVo voTransfer, BedSpaceStateLiteVo voBedSpaceStateLite, AdmissionReasonVo admissionReasonVo)
{
    BayTimesAdmissionBreachedVo voBreach = new BayTimesAdmissionBreachedVo();

    voBreach.setAdmissionDateTime(voTransfer.getTransferRequestDateTime());
    voBreach.setWard(voTransfer.getDestinationWard());
    if (voBedSpaceStateLite != null)
        voBreach.setBay(voBedSpaceStateLite.getBay());
    Object mosUser = getHcpLiteUser();
    if (mosUser != null)
        voBreach.setMemberOfStaff(((HcpLiteVo) mosUser).getMos());
    voBreach.setReasonForAdmissionOutOfOpeningHours(admissionReasonVo.getReasonForAdmissionOutOfOpeningHours());
    voBreach.setReasonForAdmissionOutOfOpeningHoursComment(admissionReasonVo.getReasonForAdmissionOohComment());

    return voBreach;
}
项目:openMAXIMS    文件:Logic.java   
@SuppressWarnings("unused")
private boolean isInpatientEpisodeonTransefrOutList(InpatientEpisodeRefVo voInpatEpis)
{
    if(voInpatEpis == null)
        throw new CodingRuntimeException("voInpatEpis is null in method isInpatientEpisodeonTransefrOutList");

    PendingTransfersLiteVoCollection voCollTransfersOut = form.getLocalContext().getTransfersOut();
    if(voCollTransfersOut == null)
        return false;

    for(PendingTransfersLiteVo voTransferOut : voCollTransfersOut)
    {
        if(voTransferOut.getInpatientEpisodeIsNotNull() && voTransferOut.getInpatientEpisode().equals(voInpatEpis))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private PendingTransfersLiteVo isInpatientEpisodeonTransferOutList(InpatientEpisodeRefVo voInpatEpis)
{
    if (voInpatEpis == null)
        return null;

    PendingTransfersLiteVoCollection voCollTransfersOut = form.getGlobalContext().Core.getADTTransfersOut();
    if (voCollTransfersOut == null)
        return null;

    for (PendingTransfersLiteVo voTransferOut : voCollTransfersOut)
    {
        if (voTransferOut.getInpatientEpisodeIsNotNull() && voTransferOut.getInpatientEpisode().equals(voInpatEpis))
            return voTransferOut;
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isInpatientEpisodeonTransefrOutList(InpatientEpisodeRefVo voInpatEpis)
{
    if(voInpatEpis == null)
        throw new CodingRuntimeException("voInpatEpis is null in method isInpatientEpisodeonTransefrOutList");

    PendingTransfersLiteVoCollection voCollTransfersOut = form.getLocalContext().getTransfersOut();
    if(voCollTransfersOut == null)
        return false;

    for(PendingTransfersLiteVo voTransferOut : voCollTransfersOut)
    {
        if(voTransferOut.getInpatientEpisodeIsNotNull() && voTransferOut.getInpatientEpisode().equals(voInpatEpis))
            return true;
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
@SuppressWarnings("unused")
private boolean isInpatientEpisodeonTransefrOutList(InpatientEpisodeRefVo voInpatEpis)
{
    if(voInpatEpis == null)
        throw new CodingRuntimeException("voInpatEpis is null in method isInpatientEpisodeonTransefrOutList");

    PendingTransfersLiteVoCollection voCollTransfersOut = form.getLocalContext().getTransfersOut();
    if(voCollTransfersOut == null)
        return false;

    for(PendingTransfersLiteVo voTransferOut : voCollTransfersOut)
    {
        if(voTransferOut.getInpatientEpisodeIsNotNull() && voTransferOut.getInpatientEpisode().equals(voInpatEpis))
            return true;
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private PendingTransfersLiteVo isInpatientEpisodeonTransferOutList(InpatientEpisodeRefVo voInpatEpis)
{
    if (voInpatEpis == null)
        return null;

    PendingTransfersLiteVoCollection voCollTransfersOut = form.getGlobalContext().Core.getADTTransfersOut();
    if (voCollTransfersOut == null)
        return null;

    for (PendingTransfersLiteVo voTransferOut : voCollTransfersOut)
    {
        if (voTransferOut.getInpatientEpisodeIsNotNull() && voTransferOut.getInpatientEpisode().equals(voInpatEpis))
            return voTransferOut;
    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean isInpatientEpisodeonTransefrOutList(InpatientEpisodeRefVo voInpatEpis)
{
    if(voInpatEpis == null)
        throw new CodingRuntimeException("voInpatEpis is null in method isInpatientEpisodeonTransefrOutList");

    PendingTransfersLiteVoCollection voCollTransfersOut = form.getLocalContext().getTransfersOut();
    if(voCollTransfersOut == null)
        return false;

    for(PendingTransfersLiteVo voTransferOut : voCollTransfersOut)
    {
        if(voTransferOut.getInpatientEpisodeIsNotNull() && voTransferOut.getInpatientEpisode().equals(voInpatEpis))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void populateTransferInListFromData()
{   
    enableTransferInControls(false);

    form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getRows().clear();

    PendingTransfersLiteVoCollection voCollTransfersIn = form.getGlobalContext().Core.getADTTransfersIn();
    if (voCollTransfersIn == null)
        return;

    for (PendingTransfersLiteVo voTransfer : voCollTransfersIn)
    {
        grdTransferInRow tRow = form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getRows().newRow();
        tRow.setColName(voTransfer.getPatientString());

        if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getConsultantIsNotNull())
            tRow.setColConsultant(voTransfer.getInpatientEpisode().getPasEvent().getConsultant().getIMosName());

        if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getSpecialtyIsNotNull())
            tRow.setColSpecialty(voTransfer.getInpatientEpisode().getPasEvent().getSpecialty().getText());

        if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getLocationIsNotNull())
            tRow.setColWard(voTransfer.getInpatientEpisode().getPasEvent().getLocation().getName());

        if (voTransfer.getTransferRequestDateTimeIsNotNull())
            tRow.setColRequestDate(voTransfer.getTransferRequestDateTime().toString());

        tRow.setValue(voTransfer);
    }

    if (form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getRows().size() == 0)
        form.lyrDetail().tabTransfer().btnCancelTransfer().setVisible(false);
    else
        form.lyrDetail().tabTransfer().btnCancelTransfer().setEnabled(false);
}
项目:AvoinApotti    文件:Logic.java   
protected void setCareContextIfApplicable(DynamicGridRow row)
{
    if(row.getIdentifier() instanceof PASEventRefVo)
        form.getGlobalContext().Core.setCurrentCareContext( domain.getCareContextForPasEvent((PASEventRefVo) row.getIdentifier())); 
    else if(row.getIdentifier() instanceof PendingTransfersLiteVo)
    {
        if(((PendingTransfersLiteVo)row.getIdentifier()).getInpatientEpisodeIsNotNull())
            form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextForPasEvent(((PendingTransfersLiteVo)row.getIdentifier()).getInpatientEpisode().getPasEvent()));
    }
    else if(row.getIdentifier() instanceof PendingTransfersLiteVo)
    {
        if(((PendingTransfersLiteVo)row.getIdentifier()).getInpatientEpisodeIsNotNull())
            form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextForPasEvent(((PendingTransfersLiteVo)row.getIdentifier()).getInpatientEpisode().getPasEvent()));
    }
    else if(row.getIdentifier() instanceof InpatientEpisodeLiteVo)
    {
        form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextForPasEvent(((InpatientEpisodeLiteVo)row.getIdentifier()).getPasEvent()));
    }
    else if(row.getIdentifier() instanceof PendingElectiveAdmissionAdmitVo)
    {
        form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextForPasEvent(((PendingElectiveAdmissionAdmitVo)row.getIdentifier()).getPasEvent()));
    }
    else
        form.getGlobalContext().Core.setCurrentCareContext(null);

    resetPIDBarText();//WDEV-14476 

}
项目:AvoinApotti    文件:BedInfoDialogImpl.java   
public void saveTransferOut(PendingTransfersLiteVo pendingTransfer) throws StaleObjectException, DomainInterfaceException
{
    if(pendingTransfer == null)
        throw new CodingRuntimeException("pendingTransfer is null in method saveTransferOut");
    if(!pendingTransfer.isValidated())
        throw new CodingRuntimeException("pendingTransfer has not been validated in method saveTransferOut");

    //WDEV-9192
    if(pendingTransfer.getInpatientEpisodeIsNotNull())
    {
        String currentTransfer = "";
        if(pendingTransfer.getID_PendingTransfers() != null)
            currentTransfer = " and pt.id <> '" +  pendingTransfer.getID_PendingTransfers() + "'";

        List existingPTs = getDomainFactory().find("from PendingTransfers pt where pt.inpatientEpisode.id = '" + pendingTransfer.getInpatientEpisode().getID_InpatientEpisode() + "'" + currentTransfer);
        if(existingPTs != null && existingPTs.size() > 0)
            throw new DomainInterfaceException("Patient already has a transfer pending, the screen will be refreshed");
    }

    //WDEV-10421
    PendingTransfers doTransfer = PendingTransfersLiteVoAssembler.extractPendingTransfers(getDomainFactory(), pendingTransfer);
    //get the admission detail record and update its history for transfers
    AdmissionDetail doAdmissionDetail = populateTransferHistory(doTransfer, TRANSFEROUT, null);

    try
    {
        getDomainFactory().save(doTransfer);    
        if(doAdmissionDetail != null)
            getDomainFactory().save(doAdmissionDetail); 
    }
    catch (IllegalArgumentException e)
    {
        //where object has been deleted - this happens when a transfer in has been deleted (transfer complete) and this user has the old pending transfer record and is trying to update it
        throw new DomainInterfaceException("Patient's transfer has already been processed, the screen will be refreshed");
    }
}
项目:AvoinApotti    文件:BedInfoDialogImpl.java   
public PendingTransfersLiteVo getPendingTransferForInpatient(InpatientEpisodeRefVo inpatEpis)
{
    if (inpatEpis == null || inpatEpis.getID_InpatientEpisode() == null)
        throw new CodingRuntimeException("inpatEpis is null or id not provided in method getPendingTransferForInpatient");

    List transfers = getDomainFactory().find("from PendingTransfers pTrans where pTrans.inpatientEpisode.id = " + inpatEpis.getID_InpatientEpisode());
    if(transfers != null && transfers.size() == 1)
        return PendingTransfersLiteVoAssembler.create((PendingTransfers) transfers.get(0));

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void populateTransferInListFromData()
{   
    enableTransferInControls(false);

    form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getRows().clear();

    PendingTransfersLiteVoCollection voCollTransfersIn = form.getGlobalContext().Core.getADTTransfersIn();
    if (voCollTransfersIn == null)
        return;

    for (PendingTransfersLiteVo voTransfer : voCollTransfersIn)
    {
        grdTransferInRow tRow = form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getRows().newRow();
        tRow.setColName(voTransfer.getPatientString());

        if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getConsultantIsNotNull())
            tRow.setColConsultant(voTransfer.getInpatientEpisode().getPasEvent().getConsultant().getIMosName());

        if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getSpecialtyIsNotNull())
            tRow.setColSpecialty(voTransfer.getInpatientEpisode().getPasEvent().getSpecialty().getText());

        if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getLocationIsNotNull())
            tRow.setColWard(voTransfer.getInpatientEpisode().getPasEvent().getLocation().getName());

        if (voTransfer.getTransferRequestDateTimeIsNotNull())
            tRow.setColRequestDate(voTransfer.getTransferRequestDateTime().toString());

        tRow.setValue(voTransfer);
    }

    if (form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getRows().size() == 0)
        form.lyrDetail().tabTransfer().btnCancelTransfer().setVisible(false);
    else
        form.lyrDetail().tabTransfer().btnCancelTransfer().setEnabled(false);
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onGrdTransferInSelEctionChanged() throws PresentationLogicException 
{
    PendingTransfersLiteVo gridValue = form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getValue();
    boolean patientIsNotNull =gridValue!= null && gridValue.getInpatientEpisodeIsNotNull() && gridValue.getInpatientEpisode().getPasEventIsNotNull();

    if(patientIsNotNull)//WDEV-22851
        form.getLocalContext().setIsCaseNoteFolderVisible(domain.isCaseNoteFolderLocation(gridValue.getInpatientEpisode().getPasEvent().getPatient()));
    updateTransferInBedMaintenanceControls();
    enableTransferInControls(true);
    clearBedAllocationValidationContexts();
    populateTransferInTabFromData();
    updateCaseNoteFolderControl();//WDEV-22851
}
项目:openMAXIMS    文件:Logic.java   
private void updateTransferInBedMaintenanceControls()
{
    if (ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS"))
    {
        PendingTransfersLiteVo transf = form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getValue();

        form.lyrDetail().tabTransfer().lyrTransfer().tabIn().lblAllocateBedTransf().setVisible(transf != null && transf.getInpatientEpisodeIsNotNull() && transf.getInpatientEpisode().getBedIsNotNull());
        form.lyrDetail().tabTransfer().lyrTransfer().tabIn().chkAllocateSourceBed().setVisible(transf != null && transf.getInpatientEpisodeIsNotNull() && transf.getInpatientEpisode().getBedIsNotNull());          
    }   
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    form.getLocalContext().setSelectedPendingTransfer(form.getGlobalContext().Core.getADTPendingTransfer());
    PendingTransfersLiteVo selectedPendingTransfer = form.getLocalContext().getSelectedPendingTransfer();

    if(selectedPendingTransfer != null && selectedPendingTransfer.getInpatientEpisodeIsNotNull() && selectedPendingTransfer.getInpatientEpisode().getPasEventIsNotNull())//WDEV-22851
        form.getLocalContext().setIsCaseNoteFolderLocation(domain.isCaseNoteFolderLocation(selectedPendingTransfer.getInpatientEpisode().getPasEvent().getPatient()));
    populateScreenFromData(selectedPendingTransfer);
    updateControlsState();

}
项目:openMAXIMS    文件:Logic.java   
private void recordBedReadyDetails(Object selectedVIEW)
{
    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof WardViewPatientListVo;      
    boolean hasPendingTransfer = isWardViewPatient && ((WardViewPatientListVo)form.dyngrdPatients().getValue()).getPendingTransfer() != null;

    if (isWardViewPatient && hasPendingTransfer)
    {
        PendingTransfersLiteVo pendingTransfVo = domain.getPendingTransferLite(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getPendingTransfer());
        form.getGlobalContext().Core.setADTPendingTransfer(pendingTransfVo);            
        boolean bedReadyReadOnlyMode = form.getLocalContext().getSelectedVIEW().equals(ims.core.forms.wardviewpatientsummarycomponent.Logic.ROW_TRANSFER_OUT) ? Boolean.TRUE : Boolean.FALSE;
        engine.open(form.getForms().Core.BedReadyDetailsDialog, new Object[]{bedReadyReadOnlyMode});
    }

}
项目:openMAXIMS    文件:Logic.java   
private void acceptTransferNoBed()
{
    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof WardViewPatientListVo;
    boolean hasInpatientEpisode = isWardViewPatient && ((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisode() != null;

    form.getGlobalContext().Core.setSelectedBedSpaceState(null);
    if (isWardViewPatient && hasInpatientEpisode)
    {   
        PendingTransfersLiteVo pendingTransf = domain.getPendingTransferLite(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getPendingTransfer());
        form.getGlobalContext().Core.setADTPendingTransfer(pendingTransf);          
        engine.open(form.getForms().Core.AcceptTransferToWardDlg, "Accept Transfer to Ward");
    }
}
项目:openMAXIMS    文件:Logic.java   
private void cancelTransfer()
{
    boolean isWardViewPatient = form.dyngrdPatients().getValue() instanceof WardViewPatientListVo;
    boolean hasInpatientEpisode = isWardViewPatient && ((WardViewPatientListVo)form.dyngrdPatients().getValue()).getInpatientEpisode() != null;
    boolean hasPendingTransfer = isWardViewPatient && ((WardViewPatientListVo)form.dyngrdPatients().getValue()).getPendingTransfer() != null;

    if (isWardViewPatient && hasPendingTransfer)
    {
        PendingTransfersLiteVo pendingTransfVo = domain.getPendingTransferLite(((WardViewPatientListVo)form.dyngrdPatients().getValue()).getPendingTransfer());
        form.getGlobalContext().Core.setADTPendingTransfer(pendingTransfVo);            
        engine.open(form.getForms().Core.TransferCancellation);
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void setCareContextIfApplicable(DynamicGridRow row)
{
    if(row.getIdentifier() instanceof PASEventRefVo)
        form.getGlobalContext().Core.setCurrentCareContext( domain.getCareContextForPasEvent((PASEventRefVo) row.getIdentifier())); 
    else if(row.getIdentifier() instanceof PendingTransfersLiteVo)
    {
        if(((PendingTransfersLiteVo)row.getIdentifier()).getInpatientEpisodeIsNotNull())
            form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextForPasEvent(((PendingTransfersLiteVo)row.getIdentifier()).getInpatientEpisode().getPasEvent()));
    }
    else if(row.getIdentifier() instanceof PendingTransfersLiteVo)
    {
        if(((PendingTransfersLiteVo)row.getIdentifier()).getInpatientEpisodeIsNotNull())
            form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextForPasEvent(((PendingTransfersLiteVo)row.getIdentifier()).getInpatientEpisode().getPasEvent()));
    }
    else if(row.getIdentifier() instanceof InpatientEpisodeLiteVo)
    {
        form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextForPasEvent(((InpatientEpisodeLiteVo)row.getIdentifier()).getPasEvent()));
    }
    else if(row.getIdentifier() instanceof PendingElectiveAdmissionAdmitVo)
    {
        form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextForPasEvent(((PendingElectiveAdmissionAdmitVo)row.getIdentifier()).getPasEvent()));
    }
    else
        form.getGlobalContext().Core.setCurrentCareContext(null);

    resetPIDBarText();//WDEV-14476 

}
项目:openMAXIMS    文件:WardViewPatientListImpl.java   
public PendingTransfersLiteVo getPendingTransferLite(PendingTransfersRefVo transfer)
{
    if (transfer == null || transfer.getID_PendingTransfers() == null)
        return null;

    return PendingTransfersLiteVoAssembler.create((PendingTransfers) getDomainFactory().getDomainObject(PendingTransfers.class, transfer.getID_PendingTransfers()));
}
项目:openMAXIMS    文件:WardViewPatientListImpl.java   
public void updatePendingTransfer(PendingTransfersLiteVo pendingTransf) throws StaleObjectException
{
    if(pendingTransf == null)
        throw new CodingRuntimeException("pendingTransfer is null in method updatePendingTransfer");

    PendingTransfers doTransfer = PendingTransfersLiteVoAssembler.extractPendingTransfers(getDomainFactory(), pendingTransf);

    getDomainFactory().save(doTransfer);        
}
项目:openMAXIMS    文件:BedInfoDialogImpl.java   
public void cancelTransfer(PendingTransfersLiteVo voTransfer, LocationRefVo voCancellingFromWard) throws StaleObjectException, ForeignKeyViolationException
{       
    if (voTransfer == null || voTransfer.getID_PendingTransfers() == null)
        throw new CodingRuntimeException("voTransfer is null or id not provided in method cancelTransfer");

    //WDEV-10421 - get the admission detail record and update its history for transfers
    PendingTransfers doPending = (PendingTransfers) getDomainFactory().getDomainObject(voTransfer);

    if (doPending == null || doPending.getVersion() > voTransfer.getVersion_PendingTransfers()) //WDEV-20326
        throw new StaleObjectException(doPending, "This transfer has been processed by another user");

    AdmissionDetail doAdmissionDetail = populateTransferHistory(doPending, TRANSFERCANCEL, voCancellingFromWard, voTransfer.getCancellationReasonDetails());

    // WDEV-19774 - Trigger creation of A26 Cancel Pending Transfer HL7 message
    InpatientEpisodeVo inpatEpisodeVo = InpatientEpisodeVoAssembler.create(doPending.getInpatientEpisode());
    if(inpatEpisodeVo.getPasEvent()!=null)
    {
        ADT adtimpl = (ADT) getDomainImpl(ADTImpl.class);
        adtimpl.triggerCancelPendingTransferEvent(inpatEpisodeVo.getPasEvent());
    } //WDEV-19974

    getDomainFactory().delete("from PendingTransfers p where p.id = '" + voTransfer.getID_PendingTransfers() + "'");

    //WDEV-10421
    if(doAdmissionDetail != null)
        getDomainFactory().save(doAdmissionDetail);
}
项目:openMAXIMS    文件:BedInfoDialogImpl.java   
public PendingTransfersLiteVo getPendingTransferForInpatient(InpatientEpisodeRefVo inpatEpis)
{
    if (inpatEpis == null || inpatEpis.getID_InpatientEpisode() == null)
        return null;

    List<?> transfers = getDomainFactory().find("from PendingTransfers pTrans WHERE pTrans.inpatientEpisode.id = " + inpatEpis.getID_InpatientEpisode() + " AND pTrans.currentStatus.id = " + TransferStatus.PENDING.getId());
    if(transfers != null && transfers.size() == 1)
        return PendingTransfersLiteVoAssembler.create((PendingTransfers) transfers.get(0));

    return null;
}
项目:openMAXIMS    文件:AcceptTransferToWardDlgImpl.java   
public ims.core.vo.CareContextShortVo saveTransferIn(ims.core.vo.BedSpaceStateLiteVo voOldBedSpaceStateLite, ims.core.vo.InPatientEpisodeADTVo voInpatientEpisode, ims.core.vo.PendingTransfersLiteVo voPending, ims.core.vo.HomeLeaveVo voHL ,PatientCaseNoteTransferVoCollection collPatientCaseNoteTransfer) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException
{
    PendingTransfersLiteVo transferVo = getPendingTransfer(voPending);
    if (transferVo == null || (transferVo.getVersion_PendingTransfers()  > voPending.getVersion_PendingTransfers()))
        throw new DomainInterfaceException("This transfer has been already processed");

     BedInfoDialog impl = (BedInfoDialog) getDomainImpl(BedInfoDialogImpl.class);
     return impl.saveTransferIn(voOldBedSpaceStateLite, voInpatientEpisode, voPending, voHL, null, null, collPatientCaseNoteTransfer);
}
项目:openMAXIMS    文件:WardDataViewImpl.java   
public PendingTransfersLiteVo getPendingTransfer(PendingTransfersRefVo pendingTransferRef)
{
    if (pendingTransferRef == null)
        return null;
    DomainFactory factory = getDomainFactory();

    PendingTransfers doPendingTransfer = (PendingTransfers) factory.getDomainObject(PendingTransfers.class, pendingTransferRef.getID_PendingTransfers());
    if (doPendingTransfer != null && TransferStatus.PENDING.getID() == doPendingTransfer.getCurrentStatus().getId())
        return PendingTransfersLiteVoAssembler.create(doPendingTransfer);

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void populateTransferInListFromData()
{   
    enableTransferInControls(false);

    form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getRows().clear();

    PendingTransfersLiteVoCollection voCollTransfersIn = form.getGlobalContext().Core.getADTTransfersIn();
    if (voCollTransfersIn == null)
        return;

    for (PendingTransfersLiteVo voTransfer : voCollTransfersIn)
    {
        grdTransferInRow tRow = form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getRows().newRow();
        tRow.setColName(voTransfer.getPatientString());

        if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getConsultantIsNotNull())
            tRow.setColConsultant(voTransfer.getInpatientEpisode().getPasEvent().getConsultant().getIMosName());

        if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getSpecialtyIsNotNull())
            tRow.setColSpecialty(voTransfer.getInpatientEpisode().getPasEvent().getSpecialty().getText());

        if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getLocationIsNotNull())
            tRow.setColWard(voTransfer.getInpatientEpisode().getPasEvent().getLocation().getName());

        if (voTransfer.getTransferRequestDateTimeIsNotNull())
            tRow.setColRequestDate(voTransfer.getTransferRequestDateTime().toString());

        tRow.setValue(voTransfer);
    }

    if (form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getRows().size() == 0)
        form.lyrDetail().tabTransfer().btnCancelTransfer().setVisible(false);
    else
        form.lyrDetail().tabTransfer().btnCancelTransfer().setEnabled(false);
}
项目:openMAXIMS    文件:Logic.java   
protected void setCareContextIfApplicable(DynamicGridRow row)
{
    if(row.getIdentifier() instanceof PASEventRefVo)
        form.getGlobalContext().Core.setCurrentCareContext( domain.getCareContextForPasEvent((PASEventRefVo) row.getIdentifier())); 
    else if(row.getIdentifier() instanceof PendingTransfersLiteVo)
    {
        if(((PendingTransfersLiteVo)row.getIdentifier()).getInpatientEpisodeIsNotNull())
            form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextForPasEvent(((PendingTransfersLiteVo)row.getIdentifier()).getInpatientEpisode().getPasEvent()));
    }
    else if(row.getIdentifier() instanceof PendingTransfersLiteVo)
    {
        if(((PendingTransfersLiteVo)row.getIdentifier()).getInpatientEpisodeIsNotNull())
            form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextForPasEvent(((PendingTransfersLiteVo)row.getIdentifier()).getInpatientEpisode().getPasEvent()));
    }
    else if(row.getIdentifier() instanceof InpatientEpisodeLiteVo)
    {
        form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextForPasEvent(((InpatientEpisodeLiteVo)row.getIdentifier()).getPasEvent()));
    }
    else if(row.getIdentifier() instanceof PendingElectiveAdmissionAdmitVo)
    {
        form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextForPasEvent(((PendingElectiveAdmissionAdmitVo)row.getIdentifier()).getPasEvent()));
    }
    else
        form.getGlobalContext().Core.setCurrentCareContext(null);

    resetPIDBarText();//WDEV-14476 

}
项目:openMAXIMS    文件:BedInfoDialogImpl.java   
public void saveTransferOut(PendingTransfersLiteVo pendingTransfer) throws StaleObjectException, DomainInterfaceException
{
    if(pendingTransfer == null)
        throw new CodingRuntimeException("pendingTransfer is null in method saveTransferOut");
    if(!pendingTransfer.isValidated())
        throw new CodingRuntimeException("pendingTransfer has not been validated in method saveTransferOut");

    //WDEV-9192
    if(pendingTransfer.getInpatientEpisodeIsNotNull())
    {
        String currentTransfer = "";
        if(pendingTransfer.getID_PendingTransfers() != null)
            currentTransfer = " and pt.id <> '" +  pendingTransfer.getID_PendingTransfers() + "'";

        List existingPTs = getDomainFactory().find("from PendingTransfers pt where pt.inpatientEpisode.id = '" + pendingTransfer.getInpatientEpisode().getID_InpatientEpisode() + "'" + currentTransfer);
        if(existingPTs != null && existingPTs.size() > 0)
            throw new DomainInterfaceException("Patient already has a transfer pending, the screen will be refreshed");
    }

    //WDEV-10421
    PendingTransfers doTransfer = PendingTransfersLiteVoAssembler.extractPendingTransfers(getDomainFactory(), pendingTransfer);
    //get the admission detail record and update its history for transfers
    AdmissionDetail doAdmissionDetail = populateTransferHistory(doTransfer, TRANSFEROUT, null);

    try
    {
        getDomainFactory().save(doTransfer);    
        if(doAdmissionDetail != null)
            getDomainFactory().save(doAdmissionDetail); 
    }
    catch (IllegalArgumentException e)
    {
        //where object has been deleted - this happens when a transfer in has been deleted (transfer complete) and this user has the old pending transfer record and is trying to update it
        throw new DomainInterfaceException("Patient's transfer has already been processed, the screen will be refreshed");
    }
}