Fix logic in create appointment

Signed-off-by: Atanas Kerezov <kerezov.atanas@gmail.com>