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

项目:openMAXIMS    文件:Logic.java   
private void updateControlsState()
{
    form.ctnTimes().btnEdit().setVisible(form.recbrEmergencyAttendance().getValue() != null);
    form.getContextMenus().Emergency.getTimeAmendmentsPatientStatusMenuEDIT_PATIENT_STATUS_TIMESItem().setVisible(form.ctnTimes().grdPatientStatus().getValue() != null);
    form.getContextMenus().Emergency.getTimeAmendmentsPatientStatusMenuMARK_AS_RIEItem().setVisible(form.ctnTimes().grdPatientStatus().getValue() != null && form.ctnTimes().grdPatientStatus().getRows().size() > 1);
    form.getContextMenus().Emergency.getTimeAmendmentsSeenByHCPMenuEDI_SEEN_BY_HCP_TIMEItem().setVisible(form.ctnTimes().grdSeenHCP().getValue() instanceof SeenByHcpForEventHistoryVo);
    //form.getContextMenus().Emergency.getTimeAmendmentsSeenByHCPMenuSEEN_COMPLETE_HCPItem().setVisible(true);
    //form.getContextMenus().Emergency.getTimeAmendmentsSeenByHCPMenuREFER_TOItem().setVisible(true);
    form.getContextMenus().Emergency.getTimeAmendmentsSeenByHCPMenuEDIT_REFERRAL_TO_SPECIALTY_TIMEItem().setVisible(form.ctnTimes().grdSeenHCP().getValue() instanceof ReferralToSpecialtyTeamForEventHistoryVo);
    form.getContextMenus().Emergency.getTimeAmendmentsMovementTimesMenuEDIT_MOVOMENT_TIMEItem().setVisible(form.ctnTimes().grdMovementTimes().getValue() != null);
    form.getContextMenus().Emergency.getTimeAmendmentsCubicleAllocationMenuEDIT_CUBICLE_ALLOCATION_TIMEItem().setVisible(form.ctnTimes().grdCubicleAllocation().getValue() != null);
    form.getContextMenus().Emergency.getTimeAmendmentsDNWTimesMenuEDIT_DNW_TIMEItem().setVisible(form.ctnTimes().grdDNW().getValue() != null);
    form.getContextMenus().Emergency.getTimeAmendmentsSentToXrayMenuEDIT_SENT_TO_XRAY_TIMEItem().setVisible(form.ctnTimes().grdSentToXray().getValue() != null);
    form.getContextMenus().Emergency.getTimeAmendmentsTransferMenuEDIT_TRANSFER_TIMEItem().setVisible(form.ctnTimes().grdTransfer().getValue() != null);
    form.getContextMenus().Emergency.getTimeAmendmentsBedAvailabilityMenuEDIT_BED_AVAILABILITY_TIMEItem().setVisible(form.ctnTimes().grdBed().getValue() != null);
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onGrdSeenHCPSelectionChanged() throws PresentationLogicException
{
    form.getGlobalContext().Emergency.setAmendAttendanceSeenByTimes(null);
    form.getGlobalContext().Emergency.setAmendAttendanceReferralToSpecialtyTimes(null);

    if(form.ctnTimes().grdSeenHCP().getValue() instanceof SeenByHcpForEventHistoryVo)
    {
        form.getGlobalContext().Emergency.setAmendAttendanceSeenByTimes((SeenByHcpForEventHistoryVo) form.ctnTimes().grdSeenHCP().getValue());
    }
    else if(form.ctnTimes().grdSeenHCP().getValue() instanceof ReferralToSpecialtyTeamForEventHistoryVo)
    {
        form.getGlobalContext().Emergency.setAmendAttendanceReferralToSpecialtyTimes((ReferralToSpecialtyTeamForEventHistoryVo) form.ctnTimes().grdSeenHCP().getValue());
    }

    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(SeenByHcpForEventHistoryVo seenByCurrentRecord, ReferralToSpecialtyTeamForEventHistoryVo referralToSpecialtyCurrentRecord)
{
    clearScreen();

    if(seenByCurrentRecord == null && referralToSpecialtyCurrentRecord == null)
        return;

    if(seenByCurrentRecord != null)
    {
        form.txtSeenBy().setValue(getHCPName(seenByCurrentRecord));
        form.dtimAllocatedOn().setValue(seenByCurrentRecord.getAllocatedDateTime());
        form.dtimSeenTime().setValue(seenByCurrentRecord.getSeenDateTime());
        form.dtimCompletedTime().setValue(seenByCurrentRecord.getCompletedDateTime());
    }
    else if(referralToSpecialtyCurrentRecord != null)
    {
        form.txtSeenBy().setValue(getReferralToSpecialty(referralToSpecialtyCurrentRecord));
        form.dtimAllocatedOn().setValue(referralToSpecialtyCurrentRecord.getReferredDateTime());
        form.dtimSeenTime().setValue(referralToSpecialtyCurrentRecord.getSeenDateTime());
        form.dtimCompletedTime().setValue(referralToSpecialtyCurrentRecord.getCompletionDateTime());
    }
}
项目:openMAXIMS    文件:AmentAttendanceSeenByHCPTimesImpl.java   
public void save(SeenByHcpForEventHistoryVo seenBy, ReferralToSpecialtyTeamForEventHistoryVo referralToSpecialty) throws ims.domain.exceptions.StaleObjectException
{
    if(seenBy != null && !seenBy.isValidated())
        throw new CodingRuntimeException("SeenByHcpForEventHistoryVo is not validated.");

    if(referralToSpecialty != null && !referralToSpecialty.isValidated())
        throw new CodingRuntimeException("ReferralToSpecialtyTeamForEventHistoryVo is not validated.");

    DomainFactory factory = getDomainFactory();

    if(seenBy != null)
    {
        SeenByHCP doSeenBy = SeenByHcpForEventHistoryVoAssembler.extractSeenByHCP(factory, seenBy);
        factory.save(doSeenBy);
    }

    if(referralToSpecialty != null)
    {
        ReferralToSpecTeam doReferralToSpecialty = ReferralToSpecialtyTeamForEventHistoryVoAssembler.extractReferralToSpecTeam(factory, referralToSpecialty);
        factory.save(doReferralToSpecialty);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void addReferralRowToGrid(ReferralToSpecialtyTeamForEventHistoryVo referralToSpecialtyTeamForEventHistoryVo)
{
    //WDEV-16777
    if (referralToSpecialtyTeamForEventHistoryVo==null)
        return;

    grdAllocatedMedicRow newrow = form.grdAllocatedMedic().getRows().newRow();

    //WDEV-16777
    if (referralToSpecialtyTeamForEventHistoryVo.getTeamConsultant()!=null)
    {
        newrow.setColNurse(referralToSpecialtyTeamForEventHistoryVo.getTeamConsultant().getText()+ ", " + referralToSpecialtyTeamForEventHistoryVo.getSpecialty().getText());
    }
    else
    {
        newrow.setColNurse(referralToSpecialtyTeamForEventHistoryVo.getSpecialty().getText());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getReferredDateTimeIsNotNull())
    {
        newrow.setColAllocated(referralToSpecialtyTeamForEventHistoryVo.getReferredDateTime().toString());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getSeenDateTimeIsNotNull())
    {
        newrow.setColSeen(referralToSpecialtyTeamForEventHistoryVo.getSeenDateTime().toString());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getCompletionDateTimeIsNotNull())
    {
        newrow.setColCompleted(referralToSpecialtyTeamForEventHistoryVo.getCompletionDateTime().toString());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateSeenByHCPGrid()
{
    form.ctnTimes().grdSeenHCP().getRows().clear();

    if(form.recbrEmergencyAttendance().getValue() == null)
        return;

    SeenByHcpForEventHistoryVoCollection seenByHcp = domain.listSeenByHcp(form.recbrEmergencyAttendance().getValue().getCareContext());
    ReferralToSpecialtyTeamForEventHistoryVoCollection referralsToSpecialty = domain.listReferralsToSpecialty(form.recbrEmergencyAttendance().getValue().getCareContext());

    List<ValueObject> values = new ArrayList<ValueObject>();

    for (int i = 0; i < seenByHcp.size(); i++)
    {
        values.add(seenByHcp.get(i));
    }

    for (int i = 0; i < referralsToSpecialty.size(); i++)
    {
        values.add(referralsToSpecialty.get(i));
    }

    Collections.sort(values, new SeenByAndReferralToSpecialtyDateComparator(SortOrder.DESCENDING));

    for(int i = 0; i < values.size(); i++)
    {
        if(values.get(i) instanceof SeenByHcpForEventHistoryVo)
        {
            addSeenByHCPRowToGrid((SeenByHcpForEventHistoryVo) values.get(i));
        }
        else if(values.get(i) instanceof ReferralToSpecialtyTeamForEventHistoryVo)
        {
            addReferralRowToGrid((ReferralToSpecialtyTeamForEventHistoryVo) values.get(i));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
public int compare(ValueObject o1, ValueObject o2)
{
    DateTime date1 = null;
    DateTime date2 = null;

    if(o1 instanceof SeenByHcpForEventHistoryVo)
    {
        date1 = ((SeenByHcpForEventHistoryVo) o1).getSystemInformation().getCreationDateTime();
    }
    else if(o1 instanceof ReferralToSpecialtyTeamForEventHistoryVo)
    {
        date1 = ((ReferralToSpecialtyTeamForEventHistoryVo) o1).getSystemInformation().getCreationDateTime();
    }

    if(o2 instanceof SeenByHcpForEventHistoryVo)
    {
        date2 = ((SeenByHcpForEventHistoryVo) o2).getSystemInformation().getCreationDateTime();
    }
    else if(o2 instanceof ReferralToSpecialtyTeamForEventHistoryVo)
    {
        date2 = ((ReferralToSpecialtyTeamForEventHistoryVo) o2).getSystemInformation().getCreationDateTime();
    }

    if (date1 != null && date2 != null )
    {
        return order * date1.compareTo(date2);
    }
    if (date1 == null)
        return -1 * order;

    if (date2 == null)
        return order;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
private void addReferralRowToGrid(ReferralToSpecialtyTeamForEventHistoryVo referralToSpecialtyTeamForEventHistoryVo)
{
    if (referralToSpecialtyTeamForEventHistoryVo==null)
        return;

    grdSeenHCPRow newrow = form.ctnTimes().grdSeenHCP().getRows().newRow();

    if (referralToSpecialtyTeamForEventHistoryVo.getTeamConsultant()!=null)
    {
        newrow.setColNurse(referralToSpecialtyTeamForEventHistoryVo.getTeamConsultant().getText()+ ", " + referralToSpecialtyTeamForEventHistoryVo.getSpecialty().getText());
    }
    else
    {
        newrow.setColNurse(referralToSpecialtyTeamForEventHistoryVo.getSpecialty().getText());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getReferredDateTimeIsNotNull())
    {
        newrow.setColAllocated(referralToSpecialtyTeamForEventHistoryVo.getReferredDateTime().toString());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getSeenDateTimeIsNotNull())
    {
        newrow.setColSeen(referralToSpecialtyTeamForEventHistoryVo.getSeenDateTime().toString());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getCompletionDateTimeIsNotNull())
    {
        newrow.setColCompleted(referralToSpecialtyTeamForEventHistoryVo.getCompletionDateTime().toString());
    }

    newrow.setValue(referralToSpecialtyTeamForEventHistoryVo);
}
项目:openMAXIMS    文件:Logic.java   
private void addReferralRowToGrid(ReferralToSpecialtyTeamForEventHistoryVo referralToSpecialtyTeamForEventHistoryVo)
{
    //WDEV-16777
    if (referralToSpecialtyTeamForEventHistoryVo==null)
        return;

    grdAllocatedMedicRow newrow = form.grdAllocatedMedic().getRows().newRow();

    //WDEV-16777
    if (referralToSpecialtyTeamForEventHistoryVo.getTeamConsultant()!=null)
    {
        newrow.setColNurse(referralToSpecialtyTeamForEventHistoryVo.getTeamConsultant().getText()+ ", " + referralToSpecialtyTeamForEventHistoryVo.getSpecialty().getText());
    }
    else
    {
        newrow.setColNurse(referralToSpecialtyTeamForEventHistoryVo.getSpecialty().getText());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getReferredDateTimeIsNotNull())
    {
        newrow.setColAllocated(referralToSpecialtyTeamForEventHistoryVo.getReferredDateTime().toString());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getSeenDateTimeIsNotNull())
    {
        newrow.setColSeen(referralToSpecialtyTeamForEventHistoryVo.getSeenDateTime().toString());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getCompletionDateTimeIsNotNull())
    {
        newrow.setColCompleted(referralToSpecialtyTeamForEventHistoryVo.getCompletionDateTime().toString());
    }
}
项目:openMAXIMS    文件:Logic.java   
private String getReferralToSpecialty(ReferralToSpecialtyTeamForEventHistoryVo referralToSpecialtyCurrentRecord)
{
    if (referralToSpecialtyCurrentRecord.getTeamConsultant() != null)
        return referralToSpecialtyCurrentRecord.getTeamConsultant().getText()+ ", " + referralToSpecialtyCurrentRecord.getSpecialty().getText();

    return referralToSpecialtyCurrentRecord.getSpecialty().getText();
}
项目:openMAXIMS    文件:Logic.java   
private ReferralToSpecialtyTeamForEventHistoryVo populateReferralToSpecialtyDataFromScreen(ReferralToSpecialtyTeamForEventHistoryVo currentRecord)
{
    if(currentRecord == null)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.close(DialogResult.ABORT);
    }

    currentRecord.setReferredDateTime(form.dtimAllocatedOn().getValue());
    currentRecord.setSeenDateTime(form.dtimSeenTime().getValue());
    currentRecord.setCompletionDateTime(form.dtimCompletedTime().getValue());

    return currentRecord;
}
项目:openMAXIMS    文件:AmentAttendanceSeenByHCPTimesImpl.java   
public ReferralToSpecialtyTeamForEventHistoryVo getReferralToSpecialty(ReferralToSpecTeamRefVo referralToSpecialty)
{
    if(referralToSpecialty == null || referralToSpecialty.getID_ReferralToSpecTeam() == null)
        return null;

    ReferralToSpecTeam doReferral = (ReferralToSpecTeam) getDomainFactory().getDomainObject(ReferralToSpecTeam.class, referralToSpecialty.getID_ReferralToSpecTeam());

    return ReferralToSpecialtyTeamForEventHistoryVoAssembler.create(doReferral);
}
项目:openMAXIMS    文件:Logic.java   
private void addReferralRowToGrid(ReferralToSpecialtyTeamForEventHistoryVo referralToSpecialtyTeamForEventHistoryVo)
{
    //WDEV-16777
    if (referralToSpecialtyTeamForEventHistoryVo==null)
        return;

    grdAllocatedMedicRow newrow = form.grdAllocatedMedic().getRows().newRow();

    //WDEV-16777
    if (referralToSpecialtyTeamForEventHistoryVo.getTeamConsultant()!=null)
    {
        newrow.setColNurse(referralToSpecialtyTeamForEventHistoryVo.getTeamConsultant().getText()+ ", " + referralToSpecialtyTeamForEventHistoryVo.getSpecialty().getText());
    }
    else
    {
        newrow.setColNurse(referralToSpecialtyTeamForEventHistoryVo.getSpecialty().getText());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getReferredDateTimeIsNotNull())
    {
        newrow.setColAllocated(referralToSpecialtyTeamForEventHistoryVo.getReferredDateTime().toString());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getSeenDateTimeIsNotNull())
    {
        newrow.setColSeen(referralToSpecialtyTeamForEventHistoryVo.getSeenDateTime().toString());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getCompletionDateTimeIsNotNull())
    {
        newrow.setColCompleted(referralToSpecialtyTeamForEventHistoryVo.getCompletionDateTime().toString());
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void addReferralRowToGrid(ReferralToSpecialtyTeamForEventHistoryVo referralToSpecialtyTeamForEventHistoryVo)
{
    //WDEV-16777
    if (referralToSpecialtyTeamForEventHistoryVo==null)
        return;

    grdAllocatedMedicRow newrow = form.grdAllocatedMedic().getRows().newRow();

    //WDEV-16777
    if (referralToSpecialtyTeamForEventHistoryVo.getTeamConsultant()!=null)
    {
        newrow.setColNurse(referralToSpecialtyTeamForEventHistoryVo.getTeamConsultant().getText()+ ", " + referralToSpecialtyTeamForEventHistoryVo.getSpecialty().getText());
    }
    else
    {
        newrow.setColNurse(referralToSpecialtyTeamForEventHistoryVo.getSpecialty().getText());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getReferredDateTimeIsNotNull())
    {
        newrow.setColAllocated(referralToSpecialtyTeamForEventHistoryVo.getReferredDateTime().toString());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getSeenDateTimeIsNotNull())
    {
        newrow.setColSeen(referralToSpecialtyTeamForEventHistoryVo.getSeenDateTime().toString());
    }

    if (referralToSpecialtyTeamForEventHistoryVo.getCompletionDateTimeIsNotNull())
    {
        newrow.setColCompleted(referralToSpecialtyTeamForEventHistoryVo.getCompletionDateTime().toString());
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean save()
{
    SeenByHcpForEventHistoryVo seenBy = null;
    ReferralToSpecialtyTeamForEventHistoryVo referralToSpecialty = null;

    if(form.getLocalContext().getSeenByCurrentRecord() != null)
    {
        seenBy = populateSeenByDataFromScreen(form.getLocalContext().getSeenByCurrentRecord());
    }
    else if(form.getLocalContext().getReferralToSpecialtyCurrentRecord() != null)
    {
        referralToSpecialty = populateReferralToSpecialtyDataFromScreen(form.getLocalContext().getReferralToSpecialtyCurrentRecord());
    }

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

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

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

    try
    {
        domain.save(seenBy, referralToSpecialty);
    }
    catch (StaleObjectException e)
    {
        e.printStackTrace();
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.close(DialogResult.ABORT);
        return false;
    }

    return true;
}