Calculating health info and displaying it in the dialog.