Java 类ims.core.vo.lookups.SourceOfReferral 实例源码

项目:AvoinApotti    文件:Logic.java   
private void showExtraUIControls_ElectiveList()
{
    form.lblPatientStatus().setVisible(true);
    form.cmbPatientStatus().setVisible(true);

    form.lblAntStay().setVisible(true);
    form.intAntStay().setVisible(true);

    form.lblReferralSource().setVisible(true);
    form.cmbSourceOfReferral().setVisible(true);

    boolean consultantSelected = SourceOfReferral.CONSULTANT.equals(form.cmbSourceOfReferral().getValue());
    boolean tciTabFunctionality = Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue()) && form.lyrAdmission().tabTCI().isVisible();

    form.ccReferringConsultant().setVisible(consultantSelected && tciTabFunctionality);
    form.lblReferringConsultant().setVisible(consultantSelected && tciTabFunctionality);
}
项目:AvoinApotti    文件:Logic.java   
private void bindCmbSourceOfReferralLookup()
{
    form.cmbSourceOfReferral().clear();

    SourceOfReferralCollection lookupCollection = LookupHelper.getSourceOfReferral(this.domain.getLookupService());
    for(int x = 0; x < lookupCollection.size(); x++)
    {
        if(SourceOfReferral.CONSULTANT.equals(lookupCollection.get(x))
            && ! ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO")) //wdev-13472
        {
            //DONT add consultant if its not WAITING tab
            //IF its WAITING tab, only add if its EmergencyAdmission
            if(!form.lyrAdmission().tabWaiting().isVisible() 
                || (form.lyrAdmission().tabWaiting().isVisible() 
                    && (form.getLocalContext().getIsEmergencyAdmissionTab() == null 
                        || (form.getLocalContext().getIsEmergencyAdmissionTabIsNotNull() 
                            && !form.getLocalContext().getIsEmergencyAdmissionTab()))))
                    continue;
        }

        form.cmbSourceOfReferral().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateReferralControls(PASReferralVo referral)
{
    if (referral == null)
        return;

    form.lyrMain().tabPageReferral().txtCaseSheet().setValue(referral.getDetails());
    form.lyrMain().tabPageReferral().txtComments().setValue(referral.getReferralDetails());
    form.lyrMain().tabPageReferral().txtDateFirstSeen().setValue(referral.getFirstApptDateIsNotNull() ? referral.getFirstApptDate().toString() : "");
    form.lyrMain().tabPageReferral().txtDateGPReferral().setValue(referral.getOriginalReferralDateIsNotNull() ? referral.getOriginalReferralDate().toString() : null);
    form.lyrMain().tabPageReferral().txtDateRecieved().setValue(referral.getReferralReceivedDateIsNotNull() ? referral.getReferralReceivedDate().toString() : null);
    form.lyrMain().tabPageReferral().txtDateReferral().setValue(referral.getDateOfReferralIsNotNull() ? referral.getDateOfReferral().toString() : null);
    form.lyrMain().tabPageReferral().txtOrganisation().setValue(referral.getReferralLocation());

    if (referral.getSourceOfReferralIsNotNull()
        && referral.getSourceOfReferral().equals(SourceOfReferral.GP))
        form.lyrMain().tabPageReferral().txtReferredBy().setValue(referral.getReferringGPIsNotNull() && referral.getReferringGP().getNameIsNotNull() ? referral.getReferringGP().getName().toString() : null);
    else
        form.lyrMain().tabPageReferral().txtReferredBy().setValue(referral.getReferringClinicianIsNotNull() ? referral.getReferringClinician().getName().toString() : null);

    form.lyrMain().tabPageReferral().txtReferredTo().setValue(referral.getReferredToIsNotNull() && referral.getReferredTo().getName() != null ? referral.getReferredTo().getName().toString() : null);

}
项目:openMAXIMS    文件:Logic.java   
private CareSpellRepatriationVo createCareSpell(PatientRefVo patient, PasEventRepatriationVo pasEvent, DateTime startDateTime, HcpLiteVo hcp, LocationRefVo location, ServiceLiteVo service, SourceOfReferral sourceOfReferral)
{
    CareSpellRepatriationVo careSpell = new CareSpellRepatriationVo();

    careSpell.setPatient(patient);
    careSpell.setStartDate(startDateTime.getDate());
    careSpell.setEndDate(null);

    CareSpellStatusHistoryVo firstStatus = new CareSpellStatusHistoryVo();
    firstStatus.setStatus(ProblemGroupStatus.OPEN);
    firstStatus.setStatusDateTime(startDateTime);

    careSpell.setCurrentStatus(firstStatus);
    careSpell.setStatusHistory(new CareSpellStatusHistoryVoCollection());
    careSpell.getStatusHistory().add(firstStatus);

    careSpell.setEpisodes(new EpisodeOfCareRepatriationVoCollection());
    careSpell.getEpisodes().add(createEpisodeOfCare(patient, careSpell, pasEvent, startDateTime, hcp, location, service, sourceOfReferral));

    return careSpell;
}
项目:openMAXIMS    文件:Logic.java   
private EpisodeOfCareRepatriationVo createEpisodeOfCare(PatientRefVo patient, CareSpellRefVo careSpell, PasEventRepatriationVo pasEvent, DateTime startDateTime, HcpLiteVo hcp, LocationRefVo location, ServiceLiteVo service, SourceOfReferral sourceOfReferral)
{
    EpisodeOfCareRepatriationVo episodeOfCare = new EpisodeOfCareRepatriationVo();

    episodeOfCare.setCareSpell(careSpell);
    episodeOfCare.setResponsibleHCP(hcp);       
    episodeOfCare.setSpecialty(service != null ? service.getSpecialty() : null);
    episodeOfCare.setRelationship(CareSpelltoEpisodeRelationship.PRIMARY);
    episodeOfCare.setStartDate(startDateTime.getDate());
    episodeOfCare.setEndDate(null);

    EpisodeOfCareStatusHistoryVo firstStatus = new EpisodeOfCareStatusHistoryVo();
    firstStatus.setStatus(EpisodeOfCareStatus.OPEN);
    firstStatus.setStatusDateTime(startDateTime);

    episodeOfCare.setCurrentStatus(firstStatus);
    episodeOfCare.setStatusHistory(new EpisodeOfCareStatusHistoryVoCollection());
    episodeOfCare.getStatusHistory().add(firstStatus);

    episodeOfCare.setCareContexts(new CareContextRepatriationVoCollection());
    episodeOfCare.getCareContexts().add(createCareContext(patient, episodeOfCare, pasEvent, startDateTime, hcp, location, service, sourceOfReferral));

    return episodeOfCare;
}
项目:openMAXIMS    文件:Logic.java   
private CareContextRepatriationVo createCareContext(PatientRefVo patient, EpisodeOfCareRefVo episodeOfCare, PasEventRepatriationVo pasEvent, DateTime startDateTime, HcpLiteVo hcp, LocationRefVo location, ServiceLiteVo service, SourceOfReferral sourceOfReferral)
{
    CareContextRepatriationVo careContext = new CareContextRepatriationVo();

    careContext.setPasEvent(pasEvent);
    careContext.setContext(ContextType.REFERRAL);
    careContext.setEpisodeOfCare(episodeOfCare);
    careContext.setStartDateTime(startDateTime);
    careContext.setEndDateTime(null);
    careContext.setResponsibleHCP(hcp);

    CareContextStatusHistoryVo firstStatus = new CareContextStatusHistoryVo();
    firstStatus.setStatus(CareContextStatus.OPEN);
    firstStatus.setStatusDateTime(startDateTime);

    careContext.setCurrentStatus(firstStatus);
    careContext.setStatusHistory(new CareContextStatusHistoryVoCollection());
    careContext.getStatusHistory().add(firstStatus);

    return careContext;
}
项目:openMAXIMS    文件:Logic.java   
private PasEventRepatriationVo createPasEvent(PatientRefVo patient, DateTime eventDateTime, MedicRefVo consultant, LocationRefVo location, ServiceLiteVo service, SourceOfReferral sourceOfReferral)
{
    if (patient == null || patient.getID_Patient() == null)
        throw new IllegalArgumentException("'patient' - argument cannot be null or not saved into database.");

    if (eventDateTime == null)
        throw new IllegalArgumentException("'eventDateTime' - cannot be null or not saved into database.");

    PasEventRepatriationVo pasEvent = new PasEventRepatriationVo();

    // Prepare random seed
    Random rand = new Random(System.currentTimeMillis());

    pasEvent.setEventDateTime(eventDateTime);
    pasEvent.setPatient(patient);
    pasEvent.setPasEventId(patient.getID_Patient().toString() + eventDateTime.toString(DateTimeFormat.ISO) + "_" + (new DateTime()).toString(DateTimeFormat.ISO) + "_" + rand.nextInt(1000000000));
    pasEvent.setConsultant(consultant);
    pasEvent.setLocation(location);
    pasEvent.setSpecialty(service != null ? service.getSpecialty() : null);
    pasEvent.setSourceOfReferral(sourceOfReferral);
    pasEvent.setEventType(PasEventType.EMERGENCY);
    pasEvent.setService(service); //WDEV-20900

    return pasEvent;
}
项目:openMAXIMS    文件:Logic.java   
private void allowEditEmergencyAdmission()
    {
        form.setMode(FormMode.EDIT);
        form.ctn1().cmbSourceOfAdmission().setEnabled(true);
        form.ctn1().cmbMethodOfAdmission().setEnabled(true);
//      form.ctn1().dtimAdmission().setEnabled(true);
//      form.ctn1().dteEstDischargeDate().setEnabled(true);
//      form.ctn1().chkChaplain().setEnabled(true);
//      form.ctn1().chkMaternity().setEnabled(true);
        //form.ctn1().txtReasonForAdmission().setEnabled(true);
        form.ctn1().cmbSourceOfReferral().setEnabled(true);
        if(form.ctn1().cmbSourceOfAdmission().getValue()!=null
                &&SourceOfReferral.CONSULTANT.getID()==  form.ctn1().cmbSourceOfAdmission().getValue().getID())
        {
            form.ctn1().ccReferringConsultant().setEnabled(true);
        }
        form.ctn1().btnAdmissionDetailsSave().setVisible(true);
        form.ctn1().btnAdmissionDetailsCancel().setVisible(true);
        form.ctn1().btnEditAdmissionDetails().setVisible(false);
        enableStayButtons(false);       
    }
项目:openMAXIMS    文件:AdminEventImpl.java   
/**
 * WDEV-20636
 * isCancerReferral method will return true if urgency is 2WW or Consultant Upgrade
 * or if source of referral is National Screening for Cancer
 */
public Boolean isCancerReferral(CatsReferralRefVo referral) 
{
    DomainFactory factory = getDomainFactory();

    CatsReferral domRef = (CatsReferral)factory.getDomainObject(CatsReferral.class, referral.getID_CatsReferral());

    if (domRef != null && (domRef.getUrgency() != null  && domRef.getUrgency().getId() == ReferralUrgency.TWO_WEEK_WAIT.getID())
                    ||  (domRef.getUrgency() != null  && domRef.getUrgency().getId() == ReferralUrgency.CONSULTANT_UPGRADE.getID())
                    ||  (domRef.getReferralDetails()  != null && domRef.getReferralDetails().getReferrerType() != null 
                    && domRef.getReferralDetails().getReferrerType().getId() == SourceOfReferral.NATIONAL_SCREENING.getID()))
    {
        return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState()
{
    if(form.getLocalContext().getCatsReferral() == null)
        return;

    ReferralUrgency currentUrgency = form.getLocalContext().getCatsReferral().getUrgency();
    SourceOfReferral sourceOfReferral = form.getLocalContext().getCatsReferral().getReferralDetails() != null ? form.getLocalContext().getCatsReferral().getReferralDetails().getReferrerType() : null;

    form.btnDowngradeUrgency().setVisible(engine.hasRight(AppRight.REFERRALS_CAN_PERFORM_DOWNGRADE) && FormMode.EDIT.equals(form.getMode()) && ReferralUrgency.TWO_WEEK_WAIT.equals(currentUrgency));
    form.btnConsultantUprade().setVisible(engine.hasRight(AppRight.REFERRALS_CAN_PERFORM_CONSULTANT_UPGRADE) && FormMode.EDIT.equals(form.getMode()) && !ReferralUrgency.TWO_WEEK_WAIT.equals(currentUrgency) && !SourceOfReferral.NATIONAL_SCREENING.equals(sourceOfReferral) && !ReferralUrgency.CONSULTANT_UPGRADE.equals(currentUrgency));

    form.cmbUrgency().setVisible(FormMode.EDIT.equals(form.getMode()));
    form.cmbUrgency().setEnabled((!ReferralUrgency.TWO_WEEK_WAIT.equals(currentUrgency) || Boolean.TRUE.equals(form.getLocalContext().getIsDowngradeUrgency())) && !Boolean.TRUE.equals(form.getLocalContext().getIsConsultantUpgrade()));
    form.btnConsultantUprade().setEnabled(!Boolean.TRUE.equals(form.getLocalContext().getIsConsultantUpgrade()) && Boolean.TRUE.equals(form.getLocalContext().getIsConsultantUpgradeActive()));
    form.btnDowngradeUrgency().setEnabled(!Boolean.TRUE.equals(form.getLocalContext().getIsDowngradeUrgency()));

    form.lblConsultantUpgradeDate().setVisible(FormMode.EDIT.equals(form.getMode()) && Boolean.TRUE.equals(form.getLocalContext().getIsConsultantUpgrade()));
    form.dteConsultantUpgrade().setVisible(FormMode.EDIT.equals(form.getMode()) && Boolean.TRUE.equals(form.getLocalContext().getIsConsultantUpgrade()));
}
项目:openMAXIMS    文件:Logic.java   
private ReferralSourceUrgencyVo getSourceReferralUrgencyVo(SourceOfReferral srcOfReferral, ReferralSourceUrgencyVoCollection  referralSrcUrgencyColl)
{
    if( srcOfReferral != null 
            && referralSrcUrgencyColl != null 
            && referralSrcUrgencyColl.size() > 0)
    {
        for (int i = 0; i < referralSrcUrgencyColl.size(); i++)
        {
            ReferralSourceUrgencyVo referralSrcUrgencyVo = referralSrcUrgencyColl.get(i); 
            if( referralSrcUrgencyVo != null 
                    && srcOfReferral!= null 
                    && srcOfReferral.equals(referralSrcUrgencyVo.getSourceOfReferral()))
                return referralSrcUrgencyVo;
        }
    }
    return null;
}
项目:openMAXIMS    文件:ReferralTriageImpl.java   
private void setCatsReferralWhenServiceIsChanged(CatsReferralForReferralTriageVo catsReferral, CatsReferral doCatsReferral, boolean hasRTTClockImpactChangedToTrue)
{
    ContractConfigRefVo contract = new ContractConfigRefVo(doCatsReferral.getContract().getId(), doCatsReferral.getContract().getVersion());    
    ContractConfigForReferralDetailsComponentVo contractConfig = getContractConfig(contract);

    ServiceRefVo service = new ServiceRefVo(doCatsReferral.getReferralDetails().getService().getId(), doCatsReferral.getReferralDetails().getService().getVersion());
    Integer daysToRttBreachDate = getDaysToRttBreachDateByService(contractConfig, service);

    Date end18WW = calculateKPI(doCatsReferral, contractConfig, daysToRttBreachDate);
    doCatsReferral.getReferralDetails().setEnd18WW(end18WW != null ? end18WW.getDate() : null);

    Date endDateKPI = getEndDateKPI(catsReferral);
    doCatsReferral.getReferralDetails().setEndDateKPI(endDateKPI != null ? endDateKPI.getDate() : null);

    boolean rTTClockImpact = !Boolean.TRUE.equals(doCatsReferral.isIsEmergencyReferral()) && !SourceOfReferral.NATIONAL_SCREENING.equals(catsReferral.getReferralDetails().getReferrerType()) && catsReferral.getReferralDetails().getService() != null && Boolean.TRUE.equals(catsReferral.getReferralDetails().getService().getIsSubjectToRTTClock()) && contactIsNotDiagnosticOrDiagnosticTriage(contractConfig);
    doCatsReferral.setRTTClockImpact(rTTClockImpact);

    setClockWhenServiceIsChanged(doCatsReferral, contractConfig, daysToRttBreachDate, rTTClockImpact, hasRTTClockImpactChangedToTrue);
}
项目:openMAXIMS    文件:Logic.java   
private void populateInitiatedFromByConsultant() //WDEV-22303 Renamed to populateInitiatedFrom
{
    form.cmbInitiatedFrom().clear();
    ReferralInitiatedFromCollection tempVoColl =  ims.RefMan.vo.lookups.LookupHelper.getReferralInitiatedFrom(domain.getLookupService());

    if( form.cmbSOR().getValue() != null && form.cmbSOR().getValue().equals(SourceOfReferral.CONSULTANT))
    {

        if(tempVoColl != null)
            for(int i = 0;i < tempVoColl.size();i++ )
            {
                if( tempVoColl.get(i) != null 
                        && (tempVoColl.get(i).equals(ReferralInitiatedFrom.A_AND_E) 
                         || tempVoColl.get(i).equals(ReferralInitiatedFrom.DOMICILIARY)
                         || tempVoColl.get(i).equals(ReferralInitiatedFrom.EMERGENCY)
                         || tempVoColl.get(i).equals(ReferralInitiatedFrom.OTHER) //WDEV-22303
                    ))
                {
                    form.cmbInitiatedFrom().newRow((ReferralInitiatedFrom)tempVoColl.get(i),tempVoColl.get(i).getText());
                }

            }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateInitiatedFromByOther() //WDEV-22303 Renamed to populateInitiatedFrom
{
    form.cmbInitiatedFrom().clear();
    ReferralInitiatedFromCollection tempVoColl =  ims.RefMan.vo.lookups.LookupHelper.getReferralInitiatedFrom(domain.getLookupService());
    if (SourceOfReferral.AHP.equals(form.cmbSOR().getValue()))
    {
        if(tempVoColl != null)
        {   
            tempVoColl.remove(ReferralInitiatedFrom.A_AND_E);
            tempVoColl.remove(ReferralInitiatedFrom.DOMICILIARY);
            tempVoColl.remove(ReferralInitiatedFrom.EMERGENCY);

            for(int i = 0;i < tempVoColl.size();i++ )
            {
                form.cmbInitiatedFrom().newRow(tempVoColl.get(i),tempVoColl.get(i).getText());                  
            }
        }   
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onCcConsultantValueChanged()throws PresentationLogicException
{
    form.fireCustomControlValueChanged(); 

    if(form.qmbService().getValue() == null)
    {
        form.ccConsultant().clear();
    }

    if(SourceOfReferral.CONSULTANT.equals(form.cmbSOR().getValue()))
    {
        clearReferrerDetails();

        form.chkRespConsultant().setValue(form.ccConsultant().getValue() != null);

        form.ctnReferringConsultant().ccReferringConsultant().setValue(form.ccConsultant().getValue());
        referringConsultantValueChanged();
    }

    updateControlState(false);
}
项目:openMAXIMS    文件:Logic.java   
private boolean appointmentsPastFirstApptKPIDateWereSelected()
{
    if (form.getLocalContext().getSelectedAppointments() != null)
    {
        Date kpiDate = form.getLocalContext().getReferral() != null
        && form.getLocalContext().getReferral().getReferralLetterDetail() != null ? form.getLocalContext().getReferral().getReferralLetterDetail().getEndDateKPI() : null; //wdev-21286

        if (kpiDate == null 
                ||  (form.getLocalContext().getReferralIsNotNull() //wdev-21286
                        && form.getLocalContext().getReferral().getReferralLetterDetailIsNotNull()
                        && form.getLocalContext().getReferral().getReferralLetterDetail().getReferrerTypeIsNotNull()
                        && SourceOfReferral.ED.equals(form.getLocalContext().getReferral().getReferralLetterDetail().getReferrerType()) ))
            return false;

        for (int i = 0; i < form.getLocalContext().getSelectedAppointments().size(); i++)
        {
            Booking_AppointmentVo appointment = form.getLocalContext().getSelectedAppointments().get(i);

            if (appointment.getAppointmentDate() != null
                    && appointment.getAppointmentDate().getDate().after(kpiDate.getDate()))
                return true;
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void showExtraUIControls_ElectiveList()
{
    form.lblPatientStatus().setVisible(true);
    form.cmbPatientStatus().setVisible(true);

    form.lblAntStay().setVisible(true);
    form.intAntStay().setVisible(true);

    form.lblReferralSource().setVisible(true);
    form.cmbSourceOfReferral().setVisible(true);

    boolean consultantSelected = SourceOfReferral.CONSULTANT.equals(form.cmbSourceOfReferral().getValue());
    boolean tciTabFunctionality = Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue()) && form.lyrAdmission().tabTCI().isVisible();

    form.ccReferringConsultant().setVisible(consultantSelected && tciTabFunctionality);
    form.lblReferringConsultant().setVisible(consultantSelected && tciTabFunctionality);
}
项目:openMAXIMS    文件:Logic.java   
private void bindCmbSourceOfReferralLookup()
{
    form.cmbSourceOfReferral().clear();

    SourceOfReferralCollection lookupCollection = LookupHelper.getSourceOfReferral(this.domain.getLookupService());
    for(int x = 0; x < lookupCollection.size(); x++)
    {
        if(SourceOfReferral.CONSULTANT.equals(lookupCollection.get(x))
            && ! ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO")) //wdev-13472
        {
            //DONT add consultant if its not WAITING tab
            //IF its WAITING tab, only add if its EmergencyAdmission
            if(!form.lyrAdmission().tabWaiting().isVisible() 
                || (form.lyrAdmission().tabWaiting().isVisible() 
                    && (form.getLocalContext().getIsEmergencyAdmissionTab() == null 
                        || (form.getLocalContext().getIsEmergencyAdmissionTabIsNotNull() 
                            && !form.getLocalContext().getIsEmergencyAdmissionTab()))))
                    continue;
        }

        form.cmbSourceOfReferral().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
    }
}
项目:openMAXIMS    文件:PatientJourneyImpl.java   
/**
* WDEV-18474
        * saveCancerPathway
        */
public void saveCancerPathway(PatientPathwayJourneyRefVo journey, Date cancerPathwayDate) throws StaleObjectException
{
    if (journey == null || cancerPathwayDate == null)
        return;

    DomainFactory factory = getDomainFactory();

    PatientPathwayJourney domJourney = (PatientPathwayJourney)factory.getDomainObject(PatientPathwayJourney.class, journey.getID_PatientPathwayJourney());
    domJourney.setIsCancerPathway(true);
    domJourney.setCancerPathwayDate(cancerPathwayDate.getDate());
    factory.save(domJourney);

    // We now need to  check the referral type for the associated CatsReferral.  If it is GP, then we want the 62 day target in scope
    ArrayList<String> labels = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    labels.add("journey");
    values.add(domJourney); 
    String query = " select cat.referralDetails from CatsReferral cat where cat.journey = :journey ";

    List<?> referralDetails = factory.find(query, labels, values);
    if (referralDetails != null && referralDetails.size() > 0)
    {
        // There should be just one!
        ReferralLetterDetails domRefLetter = (ReferralLetterDetails) referralDetails.get(0);
        if (domRefLetter != null && domRefLetter.getReferrerType() != null &&
                domRefLetter.getReferrerType().getId() == SourceOfReferral.GP.getId())
        {
            // Find the Target 62Day
            HL7PathwayIf hl7Impl = (HL7PathwayIf) getDomainImpl(HL7PathwayIfImpl.class);
            try 
            {
                TargetRefVo target = hl7Impl.getTargetByTaxonomyMap(TaxonomyType.PAS, "62D");
                hl7Impl.bringTargetIntoScopeWithoutEvent(target, journey, cancerPathwayDate);

            }
            catch (DomainInterfaceException e) 
            {
                super.createSystemLogEntry(SystemLogType.APPLICATION, SystemLogLevel.WARNING, e.getMessage());
                return;
            }
        }       
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void showExtraUIControls_ElectiveList()
{
    form.lblPatientStatus().setVisible(true);
    form.cmbPatientStatus().setVisible(true);

    form.lblAntStay().setVisible(true);
    form.intAntStay().setVisible(true);

    form.lblReferralSource().setVisible(true);
    form.cmbSourceOfReferral().setVisible(true);

    boolean consultantSelected = SourceOfReferral.CONSULTANT.equals(form.cmbSourceOfReferral().getValue());
    boolean tciTabFunctionality = Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue()) && form.lyrAdmission().tabTCI().isVisible();

    form.ccReferringConsultant().setVisible(consultantSelected && tciTabFunctionality);
    form.lblReferringConsultant().setVisible(consultantSelected && tciTabFunctionality);
}
项目:openmaxims-linux    文件:Logic.java   
private void bindCmbSourceOfReferralLookup()
{
    form.cmbSourceOfReferral().clear();

    SourceOfReferralCollection lookupCollection = LookupHelper.getSourceOfReferral(this.domain.getLookupService());
    for(int x = 0; x < lookupCollection.size(); x++)
    {
        if(SourceOfReferral.CONSULTANT.equals(lookupCollection.get(x))
            && ! ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO")) //wdev-13472
        {
            //DONT add consultant if its not WAITING tab
            //IF its WAITING tab, only add if its EmergencyAdmission
            if(!form.lyrAdmission().tabWaiting().isVisible() 
                || (form.lyrAdmission().tabWaiting().isVisible() 
                    && (form.getLocalContext().getIsEmergencyAdmissionTab() == null 
                        || (form.getLocalContext().getIsEmergencyAdmissionTabIsNotNull() 
                            && !form.getLocalContext().getIsEmergencyAdmissionTab()))))
                    continue;
        }

        form.cmbSourceOfReferral().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void showExtraUIControls()
{
    if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO"))
    {
        form.lblAntStay().setVisible(true);
        form.intAntStay().setVisible(true);
        form.lblCaseComment().setVisible(true);
        form.txtCaseComment().setVisible(true);
        form.txtCaseComment().setEnabled(false);
        form.lblUpdateCasefolder().setVisible(true);
        form.CaseFolderYesNo().setVisible(true);

        form.lblReferralSource().setVisible(true);
        form.cmbSourceOfReferral().setVisible(true);
        form.lblPatientStatus().setVisible(true);
        form.cmbPatientStatus().setVisible(true);
    }

    boolean isLayoutCCO = ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO");
    boolean isLayoutWhinston = ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("WST");
    boolean consultantSelected = SourceOfReferral.CONSULTANT.equals(form.cmbSourceOfReferral().getValue());

    form.ccReferringConsultant().setVisible(consultantSelected && (isLayoutCCO || (isLayoutWhinston && form.lyrAdmission().tabWaiting().isVisible())));
    form.lblReferringConsultant().setVisible(consultantSelected && (isLayoutCCO || (isLayoutWhinston && form.lyrAdmission().tabWaiting().isVisible())));
    form.ccReferringConsultant().isRequired(consultantSelected && (isLayoutCCO || (isLayoutWhinston && form.lyrAdmission().tabWaiting().isVisible()))); //?


    if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO") || ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("WST")) //WDEV-15999
    {
        if (!(SourceOfReferral.CONSULTANT.equals(form.cmbSourceOfReferral().getValue())))
        {
            form.ccReferringConsultant().clear();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onReferrerTypeSelectionChanged() throws ims.framework.exceptions.PresentationLogicException
{
    setHCPInformationToNull();

    // WDEV-17709
    form.chkPatientsGp().setValue(null);

    if (form.getGlobalContext().Core.getPatientShort().getID_PatientIsNotNull())
        form.getGlobalContext().RefMan.setPatientsGP(domain.getPatientGP(form.getGlobalContext().Core.getPatientShort().getID_Patient()));

    updateControlState();

    form.getGlobalContext().RefMan.setReferralTransfer(form.getLocalContext().getTransferInfo());
    if (form.cmbSOR().getValue() != null
        && form.cmbSOR().getValue().equals(SourceOfReferral.TRANSFER))
        engine.open(form.getForms().RefMan.ReferralTransferDialog);
    else if (form.cmbSOR().getValue()==null || !SourceOfReferral.TRANSFER.equals(form.cmbSOR().getValue()))
    {
        form.getLocalContext().setTransferInfo(null);
        form.getGlobalContext().RefMan.setReferralTransfer(null);
    }

    if (form.cmbSOR().getValue()==null || !SourceOfReferral.CONSULTANT.equals(form.cmbSOR().getValue()))
    {
        form.ccReferringConsultant().setValue(null);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addReferralRow(PASReferralVo referral) 
{
    if(referral == null)
        return;

    String displayedText = "";

    if(referral.getReferralTypeIsNotNull())
        displayedText += referral.getReferralType().getText();

    if(referral.getDetailsIsNotNull())
        displayedText += " - " + referral.getDetails();

    if (referral.getSourceOfReferralIsNotNull()
        && referral.getSourceOfReferral().equals(SourceOfReferral.GP))
        displayedText += " - " + (referral.getReferringGPIsNotNull() && referral.getReferringGP().getNameIsNotNull() ? referral.getReferringGP().getName().toString() : "");
    else
        displayedText += " - " + (referral.getReferringClinicianIsNotNull() ? referral.getReferringClinician().getName().toString() : "");

    if(referral.getReferralReceivedDateIsNotNull())
        displayedText += " - " + referral.getReferralReceivedDate();

    if(referral.getOriginalReferralDateIsNotNull())
        displayedText += " - " + referral.getOriginalReferralDate();

    form.recbrPASReferrals().newRow(referral, displayedText);
}
项目:openMAXIMS    文件:Logic.java   
protected void OnBtnDischargeDetailsEdit() throws PresentationLogicException
{
    LocationLiteVo previousWard = form.ctn1().cmbWard().getValue();
    populateWardCombo(form.ctn1().cmbHospital().getValue());
    form.ctn1().cmbWard().setValue(previousWard);
    form.setMode(FormMode.EDIT);
    enableHistoricalInpatientEpisodesActions(false);
    form.getLocalContext().setSelectedInpatientEpisode(null);
    form.grdCurrentAdmissionDetails().setValue(null);
    updateControlsAddEpisode();
    if(Boolean.TRUE.equals(form.ctn1().chkTreatmentDefferred().getValue()))
    {
        form.ctn1().cmbTreatmentDeferredReason().setEnabled(true);
    }
    else
    {
        form.ctn1().cmbTreatmentDeferredReason().setEnabled(false);
    }
    if(form.ctn1().cmbSourceOfReferral().getValue() != null
            &&SourceOfReferral.CONSULTANT.getID() == form.ctn1().cmbSourceOfReferral().getValue().getID())
    {
        form.ctn1().ccReferringConsultant().setEnabled(true);
    }
    else
    {
        form.ctn1().ccReferringConsultant().setEnabled(false);
    }
    enableStayButtons(false);       
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onCmbSourceOfReferralValueChanged()throws PresentationLogicException {
    if(form.ctn1().cmbSourceOfReferral().getValue()!=null
            &&SourceOfReferral.CONSULTANT.getID()== form.ctn1().cmbSourceOfReferral().getValue().getID())
    {
        form.ctn1().ccReferringConsultant().setEnabled(true);
    }
    else
    {
        form.ctn1().ccReferringConsultant().setValue(null);
        form.ctn1().ccReferringConsultant().setEnabled(false);
    }

}
项目:openMAXIMS    文件:Logic.java   
private void showExtraUIControls_ElectiveList()
{
    boolean consultantSelected = SourceOfReferral.CONSULTANT.equals(form.cmbSourceOfReferral().getValue());
    boolean tciTabFunctionality = Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue()) && form.lyrAdmission().tabTCI().isVisible();

    form.ccReferringConsultant().setVisible(consultantSelected && tciTabFunctionality);
    form.lblReferringConsultant().setVisible(consultantSelected && tciTabFunctionality);


    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
private void bindCmbUrgencyLookup(CatsReferralForChangeUrgencyVo catsReferral)
{
    form.getLocalContext().setSourceOfReferralConfiguration(domain.getSourceOfReferralConfigVoColl());
    form.getLocalContext().setCatsReferral(domain.getCatsReferral(form.getGlobalContext().RefMan.getCatsReferral()));

    form.cmbUrgency().clear();

    if (form.getLocalContext().getCatsReferral().getUrgency() != null)
    {
        SourceOfReferral srcOfReferral = form.getLocalContext().getCatsReferral().getReferralDetails().getReferrerType();
        if( srcOfReferral != null)
        {
            ReferralSourceUrgencyVo referralSrcUrgencyVo = getSourceReferralUrgencyVo(srcOfReferral, form.getLocalContext().getSourceOfReferralConfiguration());
            if( referralSrcUrgencyVo != null
                    && referralSrcUrgencyVo.getUrgencyIsNotNull()
                    && referralSrcUrgencyVo.getUrgency().size() > 0)
            {
                for (int h = 0; h < referralSrcUrgencyVo.getUrgency().size(); h++ )
                {
                    if(referralSrcUrgencyVo.getUrgency().get(h) == null || !referralSrcUrgencyVo.getUrgency().get(h).isActive())
                        continue;

                    if (referralSrcUrgencyVo.getUrgency().get(h).getID() != form.getLocalContext().getCatsReferral().getUrgency().getID()
                            && ! (ReferralUrgency.TWO_WEEK_WAIT.equals(referralSrcUrgencyVo.getUrgency().get(h)) 
                                    || ReferralUrgency.CONSULTANT_UPGRADE.equals(referralSrcUrgencyVo.getUrgency().get(h)) 
                                    || ReferralUrgency.NATIONAL_SCREENING.equals(referralSrcUrgencyVo.getUrgency().get(h))))
                    {
                        form.cmbUrgency().newRow(referralSrcUrgencyVo.getUrgency().get(h), referralSrcUrgencyVo.getUrgency().get(h).getText());
                    }
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateUrgencyCombo()
{
    form.cmbUrgency().clear();

    SourceOfReferral sourceofreferral = SourceOfReferral.REQUEST_FOR_SERVICE;

    if (sourceofreferral != null)
    {
        if (!SourceOfReferral.TRANSFER_OF_CARE.equals(sourceofreferral))
        {
            ReferralSourceUrgencyVo tempSourceVo = getSourceReferralUrgencyVo(sourceofreferral, domain.getSourceOfReferralConfigVoColl());
            if (tempSourceVo != null)
            {

                if (tempSourceVo.getUrgencyIsNotNull() && tempSourceVo.getUrgency().size() > 0)
                {
                    for (int h = 0; h < tempSourceVo.getUrgency().size(); h++)
                    {
                        form.cmbUrgency().newRow(tempSourceVo.getUrgency().get(h), tempSourceVo.getUrgency().get(h).getText());
                    }
                }
            }
        }
        // WDEV-20797

        else
        {
            if (form.getLocalContext().getParentCatsReferral().getUrgency() != null)
            {
                form.cmbUrgency().newRow(form.getLocalContext().getParentCatsReferral().getUrgency(), form.getLocalContext().getParentCatsReferral().getUrgency().getText());
                form.cmbUrgency().setValue(form.getLocalContext().getParentCatsReferral().getUrgency());
            }
        }
        // WDEV-20797 ends here

    }
}
项目:openMAXIMS    文件:Logic.java   
private ReferralSourceUrgencyVo getSourceReferralUrgencyVo(ims.core.vo.lookups.SourceOfReferral sourceLkp, ReferralSourceUrgencyVoCollection  sourceColl)
{
    if( sourceLkp != null && sourceColl != null && sourceColl.size() > 0)
    {
        for(int i = 0; i < sourceColl.size();i++)
        {
            ReferralSourceUrgencyVo tempVo = sourceColl.get(i); 
            if( tempVo != null && sourceLkp!= null && sourceLkp.equals(tempVo.getSourceOfReferral()))
                return tempVo;
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void updateERODDetails()
{
    boolean viewModeOnly = Boolean.TRUE.equals(form.getLocalContext().getViewModeOnly());
    boolean editModeERODDetails = FormMode.EDIT.equals(form.getLocalContext().getERODFormMode());
    boolean viewModeERODDetails = FormMode.VIEW.equals(form.getLocalContext().getERODFormMode());

    boolean editModeTCIDetails = FormMode.EDIT.equals(form.getLocalContext().getTCIFormMode());
    boolean editModeRequestDetails = FormMode.EDIT.equals(form.getLocalContext().getRequestFormMode());

    form.ctnDetails().dteEarliestDateOffered().setEnabled(editModeERODDetails);
    form.ctnDetails().chkEXTDelay().setEnabled(editModeERODDetails);
    form.ctnDetails().dteSecondDateOffered().setEnabled(editModeERODDetails);
    form.ctnDetails().txtSecondDateOffered().setEnabled(editModeERODDetails && !form.ctnDetails().chkEXTDelay().getValue());
    form.ctnDetails().dtePatientAvailableFromDate().setEnabled(editModeERODDetails);
    form.ctnDetails().cmbERODReason().setEnabled(editModeERODDetails);
    form.ctnDetails().txtERODComment().setEnabled(editModeERODDetails);
    form.ctnDetails().dteERODDateOfOffer().setEnabled(editModeERODDetails);

    boolean sourceOfReferralNationalScreening = form.getLocalContext().getPatientElectiveList() != null && form.getLocalContext().getPatientElectiveList().getReferral() != null && form.getLocalContext().getPatientElectiveList().getReferral().getReferralDetails() != null &&  SourceOfReferral.NATIONAL_SCREENING.equals(form.getLocalContext().getPatientElectiveList().getReferral().getReferralDetails().getReferrerType());
    boolean referralUrgencyOrSourceOfReferral = form.getLocalContext().getPatientElectiveList() != null && form.getLocalContext().getPatientElectiveList().getReferral() != null && (ReferralUrgency.TWO_WEEK_WAIT.equals(form.getLocalContext().getPatientElectiveList().getReferral().getUrgency()) || ReferralUrgency.CONSULTANT_UPGRADE.equals(form.getLocalContext().getPatientElectiveList().getReferral().getUrgency()) || sourceOfReferralNationalScreening );
    boolean preAssessmentCompletionExemptService = form.getLocalContext().getPatientElectiveList() != null && form.getLocalContext().getPatientElectiveList().getReferral() != null && form.getLocalContext().getPatientElectiveList().getReferral().getReferralDetails() != null && form.getLocalContext().getPatientElectiveList().getReferral().getReferralDetails().getService() != null && Boolean.TRUE.equals(form.getLocalContext().getPatientElectiveList().getReferral().getReferralDetails().getService().getIsPreAssessmentCompletionExempt());

    form.ctnDetails().btnAddEROD().setVisible(!viewModeOnly && form.getLocalContext().getPatientElectiveList() != null && (form.getLocalContext().getPatientElectiveList().getEROD() == null || (form.getLocalContext().getPatientElectiveList().getEROD() != null && Boolean.FALSE.equals(form.getLocalContext().getPatientElectiveList().getEROD().getIsActive()))) && (WaitingListStatus.REQUIRES_TCI.equals(form.getLocalContext().getPatientElectiveList().getElectiveListStatus().getElectiveListStatus()) || WaitingListStatus.TCI_GIVEN.equals(form.getLocalContext().getPatientElectiveList().getElectiveListStatus().getElectiveListStatus()) || (Boolean.TRUE.equals(form.getLocalContext().getPatientElectiveList().getPreAssessmentRequired()) && preAssessmentCompletionExemptService && referralUrgencyOrSourceOfReferral)) && viewModeERODDetails && !editModeRequestDetails && !editModeTCIDetails);
    form.ctnDetails().btnEditEROD().setVisible(!viewModeOnly && viewModeERODDetails && form.getLocalContext().getPatientElectiveList().getEROD() != null && !editModeRequestDetails && !editModeTCIDetails);
    form.ctnDetails().btnRecordERODInError().setVisible(!viewModeOnly && viewModeERODDetails && form.getLocalContext().getPatientElectiveList().getEROD() != null && !editModeRequestDetails && !editModeTCIDetails);

    form.ctnDetails().btnSaveEROD().setVisible(editModeERODDetails);
    form.ctnDetails().btnCancelEROD().setVisible(editModeERODDetails);
}
项目:openMAXIMS    文件:Logic.java   
private ReferralSourceUrgencyVo getSourceReferralUrgencyVo(ims.core.vo.lookups.SourceOfReferral sourceLkp, ReferralSourceUrgencyVoCollection  sourceColl)
{
    if( sourceLkp != null && sourceColl != null && sourceColl.size() > 0)
    {
        for(int i = 0; i < sourceColl.size();i++)
        {
            ReferralSourceUrgencyVo tempVo = sourceColl.get(i); 
            if( tempVo != null && sourceLkp!= null && sourceLkp.equals(tempVo.getSourceOfReferral()))
                return tempVo;
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isSORSelfandDirectReferralandUrgEmer(CatsReferralWizardVo voRefWizard) 
{   
    if(voRefWizard == null)
        return false;
        return (SourceOfReferral.SELF.equals(voRefWizard.getReferralDetails().getReferrerType())
                && Boolean.TRUE.equals(voRefWizard.getReferralDetails().getService().getDirectSelfReferralsAccepted())
                && ReferralUrgency.EMERGENCY.equals(voRefWizard.getUrgency()));
}
项目:openMAXIMS    文件:Logic.java   
private boolean isNationalScreeningAndNoLetterRequired(CatsReferralWizardVo record)
{
    if(record == null)
        return false;

    return record.getReferralDetails() != null && SourceOfReferral.NATIONAL_SCREENING.equals(record.getReferralDetails().getReferrerType()) && hasCancerTypeNoLetterRequired(record.getCancerType());
}
项目:openMAXIMS    文件:Logic.java   
private boolean isSORSelfandDirectReferralandUrgEmer(CatsReferralWizardVo voRefWizard) 
{   
    if(voRefWizard == null)
        return false;

    return voRefWizard.getReferralDetails() != null && SourceOfReferral.SELF.equals(voRefWizard.getReferralDetails().getReferrerType())
                && voRefWizard.getReferralDetails().getService() != null && Boolean.TRUE.equals(voRefWizard.getReferralDetails().getService().getDirectSelfReferralsAccepted())
                && ReferralUrgency.EMERGENCY.equals(voRefWizard.getUrgency());
}
项目:openMAXIMS    文件:Logic.java   
private boolean isNotSelfReferralAndHasEmergencyUrgency(CatsReferralWizardVo voRefWizard) 
{   
    if(voRefWizard == null || !Boolean.TRUE.equals(voRefWizard.getHasReferralLetter()))
        return false;

    return ReferralUrgency.EMERGENCY.equals(voRefWizard.getUrgency()) && voRefWizard.getReferralDetails() != null && !SourceOfReferral.SELF.equals(voRefWizard.getReferralDetails().getReferrerType()); 
}
项目:openMAXIMS    文件:Logic.java   
private ReferralSourceUrgencyVo getSourceReferralUrgencyVo(ims.core.vo.lookups.SourceOfReferral sourceLkp, ReferralSourceUrgencyVoCollection  sourceColl)
{
    if( sourceLkp != null && sourceColl != null && sourceColl.size() > 0)
    {
        for(int i = 0; i < sourceColl.size();i++)
        {
            ReferralSourceUrgencyVo tempVo = sourceColl.get(i); 
            if( tempVo != null && sourceLkp!= null && sourceLkp.equals(tempVo.getSourceOfReferral()))
                return tempVo;
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isNationalScreeningAndNoLetterRequired(CatsReferralWizardVo voRefWizard, ReferralLetterDetailsVo referralDetailsVo)
{
    if(voRefWizard == null)
        return false;

    return referralDetailsVo != null && SourceOfReferral.NATIONAL_SCREENING.equals(referralDetailsVo.getReferrerType()) && hasCancerTypeNoLetterRequired(voRefWizard.getCancerType());
}
项目:openMAXIMS    文件:Logic.java   
private String getReferralChangeUrgencyMessage(CatsReferralWizardVo voCats)
{
    if (voCats == null || voCats.getReferralDetails() == null)
        return null;
    StringBuilder sb = new StringBuilder();
    sb.append("Are you sure that you want to change this to an emergency referral?");
    if (SourceOfReferral.SELF.equals(voCats.getReferralDetails().getReferrerType()))
    {   
        if ((voCats.getReferralDetails().getEnd18WWIsNotNull() && Boolean.TRUE.equals(voCats.getRTTClockImpact())) || Boolean.TRUE.equals(voCats.getHasPatientJourneyLinked()))  
            sb.append("\nThis action will remove all RTT related information and set the referral's status to accepted.");
        else
            sb.append("\nThis action will set the referral's status to accepted.");
    }
    else
    {
        if (voCats.getReferralDetails().getDateReferralReceivedIsNotNull() && Boolean.TRUE.equals(voCats.getHasReferralLetter()))
        {
            if ((voCats.getReferralDetails().getEnd18WWIsNotNull() && Boolean.TRUE.equals(voCats.getRTTClockImpact())) ||  Boolean.TRUE.equals(voCats.getHasPatientJourneyLinked()))  
                sb.append("\nThis action will remove all RTT related information and set the referral's status to accepted.");
            else
                sb.append("\nThis action will set the referral's status to accepted.");
        }
        else if ((voCats.getReferralDetails().getEnd18WWIsNotNull() && Boolean.TRUE.equals(voCats.getRTTClockImpact())) ||  Boolean.TRUE.equals(voCats.getHasPatientJourneyLinked()))  
            sb.append("\nThis action will remove all RTT related information.");

    }
    return sb.toString();
}
项目:openMAXIMS    文件:Logic.java   
private boolean isSORSelfandDirectReferralandUrgEmer(CatsReferralWizardVo voRefWizard, ReferralLetterDetailsVo referralDetailsVo) 
{   
    if(voRefWizard == null || referralDetailsVo == null)
        return false;

    return voRefWizard.getReferralDetails() != null && SourceOfReferral.SELF.equals(voRefWizard.getReferralDetails().getReferrerType())
                && referralDetailsVo.getService() != null && Boolean.TRUE.equals(referralDetailsVo.getService().getDirectSelfReferralsAccepted())
                && ReferralUrgency.EMERGENCY.equals(voRefWizard.getUrgency());
}