Added status field to appointment query