Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- <script id="patient-description-template" type="text/template">
- <div class="patient-description">
- <spring:message code='appointment.Appointment.create.patientId'/>{{- patientId}}<br/>
- <spring:message code='appointment.Appointment.create.patientPhoneNumber'/>{{- phoneNumber}}<br/>
- <spring:message code='appointment.Appointment.create.patientMissedMeeting'/>{{- dateMissedLastAppointment}}<br/>
- </div>
- </script>
- ...
- var patientDescriptionTemplate = _.template($j('#patient-description-template').html()); // THIS
- function updatePatient(formFieldId, patientObj, isPageLoad) {
- if(patientObj!=null){
- addPatientLink(patientObj);
- DWRAppointmentService.getPatientDescription(patientObj.patientId, function(details){
- if(!details){
- document.getElementById('patientDataCell').innerHTML = "";
- return;
- }
- if(!details.phoneNumber)
- details.phoneNumber = "<spring:message code='appointment.Appointment.create.patientNoPhoneNumber'/>";;
- if(!details.dateMissedLastAppointment)
- details.dateMissedLastAppointment = "<spring:message code='appointment.Appointment.create.patientNotMissedLastAppointment'/>";;
- var evaluated = patientDescriptionTemplate(details); // THIS
- // now need to display this somewhere
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement