Advertisement
Guest User

Untitled

a guest
Dec 12th, 2012
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ...
  2. <script id="patient-description-template" type="text/template">
  3.     <div class="patient-description">
  4.         <spring:message code='appointment.Appointment.create.patientId'/>{{- patientId}}<br/>
  5.         <spring:message code='appointment.Appointment.create.patientPhoneNumber'/>{{- phoneNumber}}<br/>
  6.         <spring:message code='appointment.Appointment.create.patientMissedMeeting'/>{{- dateMissedLastAppointment}}<br/>
  7.     </div>
  8. </script>
  9. ...
  10. var patientDescriptionTemplate = _.template($j('#patient-description-template').html()); // THIS
  11. function updatePatient(formFieldId, patientObj, isPageLoad) {
  12.         if(patientObj!=null){
  13.                 addPatientLink(patientObj);
  14.                 DWRAppointmentService.getPatientDescription(patientObj.patientId, function(details){
  15.                         if(!details){
  16.                                 document.getElementById('patientDataCell').innerHTML = "";
  17.                                 return;
  18.                         }
  19.                         if(!details.phoneNumber)
  20.                             details.phoneNumber = "<spring:message code='appointment.Appointment.create.patientNoPhoneNumber'/>";;
  21.                         if(!details.dateMissedLastAppointment)
  22.                                 details.dateMissedLastAppointment = "<spring:message code='appointment.Appointment.create.patientNotMissedLastAppointment'/>";;
  23.                 var evaluated = patientDescriptionTemplate(details); // THIS
  24.                 // now need to display this somewhere
  25.                 });
  26.         }
  27.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement