I’ve created an Letter from the blanc letter template. I’ve used the mergefield: next appointment in it. (it’s a kind of appoinment confirmation letter)
When i create an an appointment with a patient in the appointment diary and after that , i open the confirmation letter an perform a merge with that patient, a wrong appoinment date and time appears in that letter.
When there’s only one appointment with that patient (his first) the correct appointment appears in the letter.
When there’s more than 1 appointment in the patient’s history; a wrong appointment is selected.