How to remove duplicate values in ealstic search

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

Your query looks good but the index name which should be probably clinicaldata.