I haven't tested, but did you mean:

```javascript
loggedInUser.isPWD = !_.isEmpty(data.profile.patient);
```

Also, I think you can remove the comment above this line, it's explicit by itself :)