Hi Sanford, I greatly appreciate the advice. Your logic with referencing the collection makes a lot more sense. This is has been a very helpful learning experience. I have attempted to implement the suggested change but am now getting a bit of a different error:
Could the error have anything to do with some of the characters being used for the Appointment Types?..such as '+' and '/'
#foreach ($appointmentItem in $appointment_cList) set( $todayCalObj =
#$date.toCalendar($date.toDate("yyyy-MM-dd HH:mm",$date.get('yyyy-MM-dd
#HH:mm'))) ) set( $nextAppt = $date.toCalendar($date.toDate("yyyy-MM-dd
#HH:mm",${appointmentItem.appointmentDateTime})) ) set( $inFuture = (
#$nextAppt.getTimeInMillis() - $todayCalObj.getTimeInMillis() ) /
#86400000 )
#if ( $inFuture > 1 && $inFuture < 2 &&
#set( $excludableAppointmentStatuses = ["Reschedule","Cancelled",“Rescheduled" ] )
#set( $excludableAppointmentTypes = ["Benefit Renewal","Clean and Check","Change of Insurance Consult","Complimentary Screening","Complimentary Screening/Demo","Demo Follow Up","Diagnostic and Warranty","Diagnostic Eval and Demo 3yrs +","Diagnostic Eval/HAC(Hearing Test)& Hearing Aid Check","Diagnostic Evaluation and Hearing Aid Evaluation","Diagnostic Evaluation(Hearing Test)","Earmold Fitting","Earmold Impression","Empire Plan Follow up","Final Denial Consult","Functional Gain Testing","HA Exchange","HAC 45 day trial","HAC+D-Hearing Aid Check & Demo 3 yrs +","HAC-Hearing Aid Check less than 3 yrs.","HAE-Hearing Aid Evaluation","HAE/HAF -Hearing Aid Evaluation & Fitting","HAF--Hearing Aid Fitting","Hearing Aid Adoption","Hearing Aid Consult Follow-Up","Hearing Aid Evaluation","Home Delivery/Dispense","Home Visit","Insurance Benefit Renewal Follow Up.","Insurance change follow up","Insurance consult f/u needs Demo","Insurance Consult Follow Up/Fitting Upon Authorization","Insurance Consult Initial W/WO Diagnostics","Insurance Final Denial Follow-Up","Insurance follow up after Dispense","Insurance Resubmit","Lost Device","New Patient Adult CAE","New Patient Pediatric CAE","Office Visit/Referral Consult","Payment","Replacement Pick up","Service/Repair","Tinnitus Evaluation","Warranty","Warranty and Demo over 3 years","Warranty and HAC less than 3 years"] )
#foreach( $appointmentItem in $appointment_cList )
#if(
!$excludableAppointmentStatuses.contains($appointmentItem.appointmentStatus) &&
!$excludableAppointmentTypes.contains($appointmentItem.appointmentType)
)
#set( $nextAppointment =
#$convert.parseDate(${appointmentItem.appointmentDateTime},
#'yyyy-MM-dd HH:mm') )
<p>$date.format('MM/dd/yyyy',$nextAppointment) at $date.format('hh:mm
a',$nextAppointment)<br /> <br>
#break else end
#end
Attempting to google '5000 lexical error' does not bring back many helpful returns. Thanks, again.
... View more