Fixes logic in confirm, create  and  appointment. Add documentation

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