added fields to social_history and visit models
fixed minor things including scopes for patient model