Contact Name instead of Contact ID in send mail

Contact Name instead of Contact ID in send mail

Hi
 
I created the following custom function, the issue not is in the mail in Nombre Paciente I am getting the name ID instead the string, how can I send the string name instead de number id?:

void  workflowspace. Completed_Tasks   ( string NombrePaciente   string EstadoTarea  )
if(input.EstadoTarea.matches("Completada"))
{
relatedTasks = zoho.crm.getRelatedRecords("Tasks","Contacts",input.NombrePaciente);
numRelatedTasks=relatedTasks.size();
if((numRelatedTasks  %  5)  ==  0)
{
//múltiplo de 5
//pasamos el ID del contacto a string
stringNombrePaciente=input.NombrePaciente.toString();
sendmail
[
from:zoho.adminuserid
to:zoho.adminuserid
subject:"El paciente " + stringNombrePaciente + " " + input.NombrePaciente + " tiene " + numRelatedTasks + " tratamientos completados"
message:"El paciente " + input.NombrePaciente + " tiene&nbsp;" + numRelatedTasks + " tratamientos Completados.<br>\n<br>\nNombre Paciente:&nbsp;<br>\nPertenece a:&nbsp;<br>\n<br type=\"_moz\">\n<br>"
content type:HTML
]
}
}