%
if (status == "Submitted" ||
(typeof(appointmentRequestDetailCode) !== 'undefined' && typeof(appointmentRequestDetailCode) !== 'null' && appointmentRequestDetailCode.length > 0) ||
(status == "Cancelled" && (typeof(appointmentRequestDetailCode) === 'undefined' || typeof(appointmentRequestDetailCode) === 'null' || appointmentRequestDetailCode.length === 0))) {
%>
<%
if (status != "Not Booked" || !secondRequestSubmitted) {
%>
Status changed to <%= status %>.
<%
} else {
%>
2nd Attempt Submitted on <%= formatDate(new Date(lastUpdatedDate)) %> at <%= formatTime(new Date(lastUpdatedDate)) %>
<%
}
%>
<%
if (status == "Submitted") {
%>
This appointment request has been submitted. After review by the clinic, updated information will be available here.
<%
} else if (appointmentRequestDetailCode !== undefined && appointmentRequestDetailCode !== 'null' && appointmentRequestDetailCode.length > 0) {
%>
<% if (status == 'Not Booked') { %>
<%= appointmentRequestDetailCode[0].detailCode.veteranMessage.replace('%s', lastUpdatedDate).replace('%s', '') %>
<% } else { %>
<%= appointmentRequestDetailCode[0].detailCode.veteranMessage.replace('%s', appointmentDate).replace('%s', appointmentTime) %>
<% } %>
<% if (status == 'Booked') { %>
Facility: <%= facility.name %>
Provider: <%= providerName + (providerPersonClass == '' ? '' : ' (' + providerPersonClass + ')') %>
Appointment: <%= appointmentDate %> <%= appointmentTime %>
Click here to view booked appointments
Appointments
<% } %>
<% } else { %>
Your request to cancel this appointment has been sent.
<% } %>
<%
}
%>