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>
- ...
- 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 values = [{patientId : details.patientId}, {phoneNumber : details.phoneNumber}, {dateMissedLastAppointment : details.dateMissedLastAppointment}];
- var parsed = _.template(${'#patient-description-template'},values);
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement