Implementing appointment code