@Override protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { initialise(); //If we have make a search before this one, our search criteria will be loaded into the criteria search elements. if (form.getGlobalContext().STHK.getPendingDischargesListFilterIsNotNull()) { refreshSearchCriteria(); } else { form.int1().setValue(24); form.cmbTime().setValue(TimeUnitsSecondsToMonths.HOURS); } }
private Date calculateFutureAppointmentDate() { if(form.intValue().getValue() == null || form.cmbUnit().getValue() == null) return null; Date futureDate = new Date(); if (form.cmbUnit().getValue().equals(TimeUnitsSecondsToMonths.DAYS)) futureDate.addDay(form.intValue().getValue()); if (form.cmbUnit().getValue().equals(TimeUnitsSecondsToMonths.WEEKS)) futureDate.addDay(form.intValue().getValue() * 7); if (form.cmbUnit().getValue().equals(TimeUnitsSecondsToMonths.MONTHS)) futureDate.addMonth(form.intValue().getValue()); return futureDate; }
public void open() { initialise(); //If we have make a search before this one, our search criteria will be loaded into the criteria search elements. if (form.getGlobalContext().STHK.getPendingDischargesListFilterIsNotNull()) { refreshSearchCriteria(); } else { form.int1().setValue(24); form.cmbTime().setValue(TimeUnitsSecondsToMonths.HOURS); form.chkConfirmed().setValue(true); } }
private Date calculateFutureAppointmentDate(Integer value , TimeUnitsSecondsToMonths unit) { if(value == null || unit == null) return null; Date futureDate = new Date(); if (unit.equals(TimeUnitsSecondsToMonths.DAYS)) futureDate.addDay(value); if (unit.equals(TimeUnitsSecondsToMonths.WEEKS)) futureDate.addDay(value * 7); if (unit.equals(TimeUnitsSecondsToMonths.MONTHS)) futureDate.addMonth(value); return futureDate; }
private Long getApptReqIn(Long value, TimeUnitsSecondsToMonths unitValue) { Long d= null; if (value!=null && unitValue!=null) { if (unitValue.equals(TimeUnitsSecondsToMonths.SECONDS)) d = value; if (unitValue.equals(TimeUnitsSecondsToMonths.MINUTES)) d = value * 60; if (unitValue.equals(TimeUnitsSecondsToMonths.HOURS)) d = value * 3600; if (unitValue.equals(TimeUnitsSecondsToMonths.DAYS)) d = value * 3600 * 24; if (unitValue.equals(TimeUnitsSecondsToMonths.WEEKS)) d = value * 3600 * 24 * 7; if (unitValue.equals(TimeUnitsSecondsToMonths.MONTHS)) d = value * 3600 * 24 * 7 * 30; } return d; }
private Date calculateAppointmentDate(Integer value , TimeUnitsSecondsToMonths unit) { if(value == null || unit == null) return null; Date futureDate = new Date(); if (unit.equals(TimeUnitsSecondsToMonths.DAYS)) futureDate.addDay(value); if (unit.equals(TimeUnitsSecondsToMonths.WEEKS)) futureDate.addDay(value * 7); if (unit.equals(TimeUnitsSecondsToMonths.MONTHS)) futureDate.addMonth(value); return futureDate; }
private Date calculatePastAppointmentDate(Integer value , TimeUnitsSecondsToMonths unit) { if(value == null || unit == null) return null; Date pastDate = new Date(); if (unit.equals(TimeUnitsSecondsToMonths.DAYS)) pastDate.addDay(- value); if (unit.equals(TimeUnitsSecondsToMonths.WEEKS)) pastDate.addDay(- (value * 7)); if (unit.equals(TimeUnitsSecondsToMonths.MONTHS)) pastDate.addMonth(- value); return pastDate; }
private Date calculateDate(Date offsetDate, Integer toBePlannedIn, TimeUnitsSecondsToMonths toBePlannedInUnit) { if (toBePlannedIn == null || toBePlannedInUnit == null) return null; if (TimeUnitsSecondsToMonths.DAYS.equals(toBePlannedInUnit)) { return offsetDate.addDay(toBePlannedIn); } else if (TimeUnitsSecondsToMonths.WEEKS.equals(toBePlannedInUnit)) { return offsetDate.addDay(7 * toBePlannedIn); } else if (TimeUnitsSecondsToMonths.MONTHS.equals(toBePlannedInUnit)) { return offsetDate.addMonth(toBePlannedIn); } return offsetDate; }
private Date calculateToDate(Integer rttBreachIn, TimeUnitsSecondsToMonths rttBreachInPeriod) { if (rttBreachIn == null || rttBreachInPeriod == null) return null; if (TimeUnitsSecondsToMonths.DAYS.equals(rttBreachInPeriod)) { return (new Date()).addDay(rttBreachIn); } else if (TimeUnitsSecondsToMonths.WEEKS.equals(rttBreachInPeriod)) { return (new Date()).addDay(7 * rttBreachIn); } else if (TimeUnitsSecondsToMonths.MONTHS.equals(rttBreachInPeriod)) { return (new Date()).addMonth(rttBreachIn); } return new Date(); }
/** * Initialize the form */ private void initialize() { // Clear global contexts (except persistent search criteria) & local contexts clearGlobalContexts(); clearLocalContexts(); PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()); form.lyrMain().tabPageSearchResults().grdElectiveList().setColumnIdentifierCaption(dispIdType.getIItemText()); populateHospitals(domain.listHospitals()); // Exclude the 'Seconds', 'Minutes', 'Hours' form.lyrMain().tabPageSearchCriteria().cmbRTTBreachPeriod().removeRow(TimeUnitsSecondsToMonths.SECONDS); form.lyrMain().tabPageSearchCriteria().cmbRTTBreachPeriod().removeRow(TimeUnitsSecondsToMonths.MINUTES); form.lyrMain().tabPageSearchCriteria().cmbRTTBreachPeriod().removeRow(TimeUnitsSecondsToMonths.HOURS); form.lyrMain().tabPageSearchCriteria().cmbPlannedDatePeriod().removeRow(TimeUnitsSecondsToMonths.SECONDS); form.lyrMain().tabPageSearchCriteria().cmbPlannedDatePeriod().removeRow(TimeUnitsSecondsToMonths.MINUTES); form.lyrMain().tabPageSearchCriteria().cmbPlannedDatePeriod().removeRow(TimeUnitsSecondsToMonths.HOURS); // Exclude 'LA - PreAssessment' anaesthetic type form.lyrMain().tabPageSearchCriteria().cmbAnaestheticType().removeRow(AnaestheticType.LA_PRE_ASSESSMENT); }
private void bindUnitCombo() { form.cmbUnit().clear(); TimeUnitsSecondsToMonthsCollection lookupCollection = LookupHelper.getTimeUnitsSecondsToMonths(this.domain.getLookupService()); for(int x = 0; x < lookupCollection.size(); x++) { if(TimeUnitsSecondsToMonths.SECONDS.equals(lookupCollection.get(x)) || TimeUnitsSecondsToMonths.MINUTES.equals(lookupCollection.get(x)) || TimeUnitsSecondsToMonths.HOURS.equals(lookupCollection.get(x))) continue; form.cmbUnit().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor()); } }
private void bindUnitCombos() { TimeUnitsSecondsToMonthsCollection lookupCollection = LookupHelper.getTimeUnitsSecondsToMonths(this.domain.getLookupService()); for(int x = 0; x < lookupCollection.size(); x++) { if(TimeUnitsSecondsToMonths.SECONDS.equals(lookupCollection.get(x)) || TimeUnitsSecondsToMonths.MINUTES.equals(lookupCollection.get(x)) || TimeUnitsSecondsToMonths.HOURS.equals(lookupCollection.get(x))) continue; form.lyrTabs().tabOPA().cmbScheduledFor().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor()); form.lyrTabs().tabOpaAndDiagnostics().cmbScheduledForLinked().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor()); form.lyrTabs().tabOpaAndDiagnostics().cmbScheduledForDiagnostic().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor()); } }
@Override protected void onCmbScheduledForValueChanged() throws PresentationLogicException { Integer value = form.lyrTabs().tabOPA().intScheduledFor().getValue(); TimeUnitsSecondsToMonths unit = form.lyrTabs().tabOPA().cmbScheduledFor().getValue(); form.lyrTabs().tabOPA().dteScheduledFor().setValue(calculateFutureAppointmentDate(value, unit)); }
@Override protected void onIntScheduledForValueChanged() throws PresentationLogicException { Integer value = form.lyrTabs().tabOPA().intScheduledFor().getValue(); TimeUnitsSecondsToMonths unit = form.lyrTabs().tabOPA().cmbScheduledFor().getValue(); form.lyrTabs().tabOPA().dteScheduledFor().setValue(calculateFutureAppointmentDate(value, unit)); }
@Override protected void onCmbScheduledForDiagnosticValueChanged() throws PresentationLogicException { Integer value = form.lyrTabs().tabOpaAndDiagnostics().intScheduledForDiagnostic().getValue(); TimeUnitsSecondsToMonths unit = form.lyrTabs().tabOpaAndDiagnostics().cmbScheduledForDiagnostic().getValue(); form.lyrTabs().tabOpaAndDiagnostics().dteScheduledForDiagnostic().setValue(calculateFutureAppointmentDate(value, unit)); }
@Override protected void onIntScheduledForDiagnosticValueChanged() throws PresentationLogicException { Integer value = form.lyrTabs().tabOpaAndDiagnostics().intScheduledForDiagnostic().getValue(); TimeUnitsSecondsToMonths unit = form.lyrTabs().tabOpaAndDiagnostics().cmbScheduledForDiagnostic().getValue(); form.lyrTabs().tabOpaAndDiagnostics().dteScheduledForDiagnostic().setValue(calculateFutureAppointmentDate(value, unit)); }
@Override protected void onCmbScheduledForLinkedValueChanged() throws PresentationLogicException { Integer value = form.lyrTabs().tabOpaAndDiagnostics().intScheduledForLinked().getValue(); TimeUnitsSecondsToMonths unit = form.lyrTabs().tabOpaAndDiagnostics().cmbScheduledForLinked().getValue(); form.lyrTabs().tabOpaAndDiagnostics().dteScheduledForLinked().setValue(calculateFutureAppointmentDate(value, unit)); }
@Override protected void onIntScheduledForLinkedValueChanged() throws PresentationLogicException { Integer value = form.lyrTabs().tabOpaAndDiagnostics().intScheduledForLinked().getValue(); TimeUnitsSecondsToMonths unit = form.lyrTabs().tabOpaAndDiagnostics().cmbScheduledForLinked().getValue(); form.lyrTabs().tabOpaAndDiagnostics().dteScheduledForLinked().setValue(calculateFutureAppointmentDate(value, unit)); }
private void bindUnitCombos() { TimeUnitsSecondsToMonthsCollection lookupCollection = LookupHelper.getTimeUnitsSecondsToMonths(this.domain.getLookupService()); for(int x = 0; x < lookupCollection.size(); x++) { if(TimeUnitsSecondsToMonths.SECONDS.equals(lookupCollection.get(x)) || TimeUnitsSecondsToMonths.MINUTES.equals(lookupCollection.get(x)) || TimeUnitsSecondsToMonths.HOURS.equals(lookupCollection.get(x))) continue; form.cmbDelayed().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor()); form.cmbTimeOnList().newRow(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor()); } }
private Date calculateApptDate() { Date date = form.getLocalContext().getApptDate(); if (Boolean.TRUE.equals(form.getLocalContext().getIsFromAppointmentOutcome())) { if (form.intValue().getValue() == null || form.cmbPeriod().getValue() == null) return null; if (form.getLocalContext().getPreviousApptDate() != null) date = (Date) form.getLocalContext().getPreviousApptDate().clone(); else date = new Date(); } if(date == null) return null; if(form.intValue().getValue() != null) { if(TimeUnitsSecondsToMonths.DAYS.equals(form.cmbPeriod().getValue())) { date.addDay(form.intValue().getValue()); } else if(TimeUnitsSecondsToMonths.WEEKS.equals(form.cmbPeriod().getValue())) { date.addDay(7 * form.intValue().getValue()); } else if(TimeUnitsSecondsToMonths.MONTHS.equals(form.cmbPeriod().getValue())) { date.addMonth(form.intValue().getValue()); } } return date; }
private PatientElectiveListDetailsVo populateDataFromMedicalTab(PatientElectiveListDetailsVo patientElectiveList) { if(patientElectiveList == null) return null; patientElectiveList = (PatientElectiveListDetailsVo) patientElectiveList.clone(); patientElectiveList.setWasPossibleDateGiven(form.ctnDetails().lyrWaitingListDetails().tabPageMedical().chkPatientDateGivenToPatientMedical().getValue()); patientElectiveList.setDateGivenToPatient(form.ctnDetails().lyrWaitingListDetails().tabPageMedical().dteDateGivemToPatientMedical().getValue()); patientElectiveList.setToBePlannedIn(form.ctnDetails().lyrWaitingListDetails().tabPageMedical().intPlanProcedureInMedical().getValue()); patientElectiveList.setToBePlannedInUnit(null); if( GroupPlanedProceduresMedicalEnumeration.rdoDaysPlannedMedical.equals(form.ctnDetails().lyrWaitingListDetails().tabPageMedical().GroupPlanedProceduresMedical().getValue())) patientElectiveList.setToBePlannedInUnit(TimeUnitsSecondsToMonths.DAYS); else if( GroupPlanedProceduresMedicalEnumeration.rdoMonthPlannedMedical.equals(form.ctnDetails().lyrWaitingListDetails().tabPageMedical().GroupPlanedProceduresMedical().getValue())) patientElectiveList.setToBePlannedInUnit(TimeUnitsSecondsToMonths.MONTHS); else if( GroupPlanedProceduresMedicalEnumeration.rdoWeeksPlannedMedical.equals(form.ctnDetails().lyrWaitingListDetails().tabPageMedical().GroupPlanedProceduresMedical().getValue())) patientElectiveList.setToBePlannedInUnit(TimeUnitsSecondsToMonths.WEEKS); patientElectiveList.setPlannedDate(form.ctnDetails().lyrWaitingListDetails().tabPageMedical().dteRequestedPlannedMedical().getValue()); if (patientElectiveList.getPlannedDate() == null) { if (patientElectiveList == null || patientElectiveList.getID_PatientElectiveList() == null) patientElectiveList.setPlannedDate(calculateDate(new Date(), patientElectiveList.getToBePlannedIn(), patientElectiveList.getToBePlannedInUnit())); else patientElectiveList.setPlannedDate(calculateDate(patientElectiveList.getSystemInformation().getCreationDateTime().getDate(), patientElectiveList.getToBePlannedIn(), patientElectiveList.getToBePlannedInUnit())); } if(form.ctnDetails().lyrWaitingListDetails().tabPageMedical().cmbPriorityMedical().getVisible() && form.ctnDetails().lyrWaitingListDetails().tabPageMedical().cmbPriorityMedical().isEnabled()) { patientElectiveList.setPriority(form.ctnDetails().lyrWaitingListDetails().tabPageMedical().cmbPriorityMedical().getValue()); } patientElectiveList.setResponsibleHCP(form.ctnDetails().lyrWaitingListDetails().tabPageMedical().ccResponsibleHCP().getValue() != null ? domain.getHCPByMedic((HcpRefVo) form.ctnDetails().lyrWaitingListDetails().tabPageMedical().ccResponsibleHCP().getValue()):null); //wdev-22465 return patientElectiveList; }
private void initialise() { form.cmbPlannedDateIn().removeRow(TimeUnitsSecondsToMonths.HOURS); form.cmbPlannedDateIn().removeRow(TimeUnitsSecondsToMonths.MINUTES); form.cmbPlannedDateIn().removeRow(TimeUnitsSecondsToMonths.SECONDS); form.cmbRTTBreachDateIn().removeRow(TimeUnitsSecondsToMonths.HOURS); form.cmbRTTBreachDateIn().removeRow(TimeUnitsSecondsToMonths.MINUTES); form.cmbRTTBreachDateIn().removeRow(TimeUnitsSecondsToMonths.SECONDS); createDynamicGridResults(); }
private void populateMedicalTabFromData(PatientElectiveListDetailsVo patientElectiveList) { if( ElectiveListReason.TREATMENT.equals(patientElectiveList.getElectiveListReason())) form.ctnDetails().lyrWaitingListDetails().tabPageMedical().GroupElectiveListReasonMedical().setValue(GroupElectiveListReasonMedicalEnumeration.rdoTreatmentMedical); else if( ElectiveListReason.DIAGNOSTIC.equals(patientElectiveList.getElectiveListReason())) form.ctnDetails().lyrWaitingListDetails().tabPageMedical().GroupElectiveListReasonMedical().setValue(GroupElectiveListReasonMedicalEnumeration.rdoDiagnosticMedical); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().chkPatientDateGivenToPatientMedical().setValue(patientElectiveList.getWasPossibleDateGiven()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().dteDateGivemToPatientMedical().setValue(patientElectiveList.getDateGivenToPatient()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().intPlanProcedureInMedical().setValue(patientElectiveList.getToBePlannedIn()); if( TimeUnitsSecondsToMonths.DAYS.equals(patientElectiveList.getToBePlannedInUnit())) form.ctnDetails().lyrWaitingListDetails().tabPageMedical().GroupPlanedProceduresMedical().setValue(GroupPlanedProceduresMedicalEnumeration.rdoDaysPlannedMedical); else if( TimeUnitsSecondsToMonths.WEEKS.equals(patientElectiveList.getToBePlannedInUnit())) form.ctnDetails().lyrWaitingListDetails().tabPageMedical().GroupPlanedProceduresMedical().setValue(GroupPlanedProceduresMedicalEnumeration.rdoWeeksPlannedMedical); else if( TimeUnitsSecondsToMonths.MONTHS.equals(patientElectiveList.getToBePlannedInUnit())) form.ctnDetails().lyrWaitingListDetails().tabPageMedical().GroupPlanedProceduresMedical().setValue(GroupPlanedProceduresMedicalEnumeration.rdoMonthPlannedMedical); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().dteRequestedPlannedMedical().setValue(patientElectiveList.getPlannedDate()); if(patientElectiveList.getHospital() != null) { form.ctnDetails().lyrWaitingListDetails().tabPageMedical().cmbHospital().newRow(patientElectiveList.getHospital(), patientElectiveList.getHospital().getName()); } form.ctnDetails().lyrWaitingListDetails().tabPageMedical().cmbHospital().setValue(patientElectiveList.getHospital()); if(patientElectiveList.getWard() != null) { form.ctnDetails().lyrWaitingListDetails().tabPageMedical().qmbWard().newRow(patientElectiveList.getWard(), patientElectiveList.getWard().getName()); } form.ctnDetails().lyrWaitingListDetails().tabPageMedical().qmbWard().setValue(patientElectiveList.getWard()); if( patientElectiveList.getPrimaryProcedureIsNotNull() ) { form.ctnDetails().lyrWaitingListDetails().tabPageMedical().qmbProcedureMedical().newRow(patientElectiveList.getPrimaryProcedure(), patientElectiveList.getPrimaryProcedure().getProcedureName()); } form.ctnDetails().lyrWaitingListDetails().tabPageMedical().qmbProcedureMedical().setValue(patientElectiveList.getPrimaryProcedure()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().cmbLateralityMedical().setValue(patientElectiveList.getProcLaterality()); form.getLocalContext().setShowSecondMedicalProcedure(patientElectiveList.getSecondaryProcedureIsNotNull() ? Boolean.TRUE:Boolean.FALSE); if( patientElectiveList.getSecondaryProcedureIsNotNull()) { form.ctnDetails().lyrWaitingListDetails().tabPageMedical().qmbProcedureSecondMedical().newRow(patientElectiveList.getSecondaryProcedure(), patientElectiveList.getSecondaryProcedure().getProcedureName()); } form.ctnDetails().lyrWaitingListDetails().tabPageMedical().qmbProcedureSecondMedical().setValue(patientElectiveList.getSecondaryProcedure()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().cmbLateralitySecondMedical().setValue(patientElectiveList.getSecondaryProcLaterality()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().txtdetailsMedical().setValue(patientElectiveList.getProcedureDescription()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().cmbPriorityMedical().setValue(patientElectiveList.getPriority()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().chkShortNoticeMedical().setValue(patientElectiveList.getAvailableAtShortNotice()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().intNumberOfDaysOfNoticeReqMedical().setValue(patientElectiveList.getAvailableAtShortNoticePeriod()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().intAnticipatedNightsMedical().setValue(patientElectiveList.getAnticipatedStay()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().ccResponsibleHCP().setValue(patientElectiveList.getResponsibleHCP()); //wdev-22582 if( patientElectiveList.getElectiveListIsNotNull()) { form.ctnDetails().lyrWaitingListDetails().tabPageMedical().qmbElectiveListMedical().newRow(patientElectiveList.getElectiveList(),patientElectiveList.getElectiveList().getWaitingListName()); } form.ctnDetails().lyrWaitingListDetails().tabPageMedical().qmbElectiveListMedical().setValue(patientElectiveList.getElectiveList()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().chkInterpreterRequiredMedical().setValue(patientElectiveList.getInterpretatorRequired()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().cmbInterpreterRequiredMedical().setValue(patientElectiveList.getLanguage()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().chkTransportRequiredNedical().setValue(patientElectiveList.getTransportRequired()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().cmbTransportRequiredMedical().setValue(patientElectiveList.getTransport()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().chkSpecialRequirementsMedical().setValue(patientElectiveList.getSpecialRequirements()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().txtSpecialRequirementsMedical().setValue(patientElectiveList.getSpecialRequirementsDetails()); form.ctnDetails().lyrWaitingListDetails().tabPageMedical().txtCommentMedical().setValue(patientElectiveList.getComments()); //wdev - 22310 form.ctnDetails().ccAuthoringHCP().setValue(patientElectiveList.getAuthoringInfo()); if( patientElectiveList.getRecordingUserIsNotNull()) { form.ctnDetails().ccRecordingMOS().setValue(patientElectiveList.getRecordingUser().getRecordingUser()); form.ctnDetails().dtimRecordingDateTime().setValue(patientElectiveList.getRecordingUser().getRecordingDateTime()); } //------------ }
private PatientElectiveListDetailsVo populateDataFromEndoscopyTab(PatientElectiveListDetailsVo patientElectiveList) { boolean isPlannedList = GroupElectiveListEnumeration.rdoSurveillance.equals(form.ctnDetails().GroupElectiveList().getValue()); if(isPlannedList) { patientElectiveList.setToBePlannedIn(form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().intPlannedProcedureInEndoscopy().getValue()); patientElectiveList.setToBePlannedInUnit(null); if( GroupPlanedProceduresEndoscopyEnumeration.rdoDaysEndoscopy.equals(form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().GroupPlanedProceduresEndoscopy().getValue())) patientElectiveList.setToBePlannedInUnit(TimeUnitsSecondsToMonths.DAYS); else if( GroupPlanedProceduresEndoscopyEnumeration.MonthsEndoscopy.equals(form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().GroupPlanedProceduresEndoscopy().getValue())) patientElectiveList.setToBePlannedInUnit(TimeUnitsSecondsToMonths.MONTHS); else if( GroupPlanedProceduresEndoscopyEnumeration.rdoWeeksEndoscopy.equals(form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().GroupPlanedProceduresEndoscopy().getValue())) patientElectiveList.setToBePlannedInUnit(TimeUnitsSecondsToMonths.WEEKS); patientElectiveList.setPlannedDate(form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().dteRequestedPlannedEndoscopy().getValue()); if (patientElectiveList.getPlannedDate() == null) { if (patientElectiveList == null || patientElectiveList.getID_PatientElectiveList() == null) patientElectiveList.setPlannedDate(calculateDate(new Date(), patientElectiveList.getToBePlannedIn(), patientElectiveList.getToBePlannedInUnit())); else patientElectiveList.setPlannedDate(calculateDate(patientElectiveList.getSystemInformation().getCreationDateTime().getDate(), patientElectiveList.getToBePlannedIn(), patientElectiveList.getToBePlannedInUnit())); } } else { patientElectiveList.setToBePlannedIn(null); patientElectiveList.setToBePlannedInUnit(null); patientElectiveList.setPlannedDate(null); } //WDEV-23075 ProcedureLiteVo procEnd = form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().qmbProcedureEndoscopy().getValue(); boolean isColonoscopy = procEnd != null && ProcedureEndoscopyType.COLONOSCOPY.equals(procEnd.getEndoscopyType()); if(isColonoscopy && GroupGeneralAnaestheticEnumeration.rdoNoGeneralAnaesthetic.equals(form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().GroupGeneralAnaesthetic().getValue())) { //wdev-22467 if( GroupPrecolonoscopyReqEnumeration.rdoYesPrecolonoscopyReq.equals(form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().GroupPrecolonoscopyReq().getValue() )) { patientElectiveList.setPreColonoscopyAssessmentRequired(YesNo.YES); } else if( GroupPrecolonoscopyReqEnumeration.rdoNoPrecolonoscopyReq.equals(form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().GroupPrecolonoscopyReq().getValue() )) { patientElectiveList.setPreColonoscopyAssessmentRequired(YesNo.NO); } //------------- } patientElectiveList.setResponsibleHCP(form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().ccResponsibleHCPEndoscopy().getValue() != null ? domain.getHCPByMedic((HcpRefVo) form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().ccResponsibleHCPEndoscopy().getValue()):null); //wdev-22465 return patientElectiveList; }
private PatientElectiveListDetailsVo populateDataFromSurgicalTab(PatientElectiveListDetailsVo patientElectiveList) { if(patientElectiveList == null) return null; patientElectiveList = (PatientElectiveListDetailsVo) patientElectiveList.clone(); patientElectiveList.setWasPossibleDateGiven(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().chkPatientDateGivenToPatient().getValue()); patientElectiveList.setDateGivenToPatient(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().dteDateGivenToPatient().getValue()); patientElectiveList.setToBePlannedIn(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().intPlanProcedureIn().getValue()); patientElectiveList.setToBePlannedInUnit(null); if(GroupPlanedProceduresSurgicalEnumeration.rdoDays.equals(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().GroupPlanedProceduresSurgical().getValue())) patientElectiveList.setToBePlannedInUnit(TimeUnitsSecondsToMonths.DAYS); else if(GroupPlanedProceduresSurgicalEnumeration.rdoMonth.equals(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().GroupPlanedProceduresSurgical().getValue())) patientElectiveList.setToBePlannedInUnit(TimeUnitsSecondsToMonths.MONTHS); else if(GroupPlanedProceduresSurgicalEnumeration.rdoWeeks.equals(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().GroupPlanedProceduresSurgical().getValue())) patientElectiveList.setToBePlannedInUnit(TimeUnitsSecondsToMonths.WEEKS); patientElectiveList.setPlannedDate(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().dteRequestedPlannedDateSurgical().getValue()); if (patientElectiveList.getPlannedDate() == null) { if (patientElectiveList == null || patientElectiveList.getID_PatientElectiveList() == null) patientElectiveList.setPlannedDate(calculateDate(new Date(), patientElectiveList.getToBePlannedIn(), patientElectiveList.getToBePlannedInUnit())); else patientElectiveList.setPlannedDate(calculateDate(patientElectiveList.getSystemInformation().getCreationDateTime().getDate(), patientElectiveList.getToBePlannedIn(), patientElectiveList.getToBePlannedInUnit())); } if(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbPriority().getVisible() && form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbPriority().isEnabled()) { patientElectiveList.setPriority(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbPriority().getValue()); } patientElectiveList.setResponsibleHCP(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().ccResponsibleHCPSUrgical().getValue() != null ? domain.getHCPByMedic((HcpRefVo) form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().ccResponsibleHCPSUrgical().getValue()):null); //wdev-22465 if( Boolean.TRUE.equals(form.getLocalContext().getIsVisibleSurgicalTheatreType())) { if( GroupDaySurgMainTheatreEnumeration.rdoMainTheatre.equals(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().GroupDaySurgMainTheatre().getValue())) { patientElectiveList.setRequiredTheatreType(TheatreType.INPATIENT); patientElectiveList.setHospital(null); } else if( GroupDaySurgMainTheatreEnumeration.rdoDaySurgery.equals(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().GroupDaySurgMainTheatre().getValue())) { patientElectiveList.setRequiredTheatreType(TheatreType.DAYCASE); patientElectiveList.setHospital(null); } else if( GroupDaySurgMainTheatreEnumeration.rdoPeripheralLocation.equals(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().GroupDaySurgMainTheatre().getValue())) { patientElectiveList.setHospital(form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().cmbPeripheralLocation().getValue()); patientElectiveList.setRequiredTheatreType(TheatreType.DAYCASE); } else patientElectiveList.setRequiredTheatreType(null); } else { if( form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().chkPreoperativeOvernightStay().getValue() || ( !form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().chkPreoperativeOvernightStay().getValue() && form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().intAnticipatedNights().getValue() != null && form.ctnDetails().lyrWaitingListDetails().tabPageSurgical().intAnticipatedNights().getValue().intValue() >= 1)) { patientElectiveList.setRequiredTheatreType(TheatreType.INPATIENT); } else patientElectiveList.setRequiredTheatreType(null); } return patientElectiveList; }