# Kibana /elastic analytics use case

**URL:** https://discuss.elastic.co/t/kibana-elastic-analytics-use-case/226225
**Category:** Kibana
**Created:** [April 2, 2020, 2:04pm UTC](https://discuss.elastic.co/t/kibana-elastic-analytics-use-case/226225 "2020-04-02T14:04:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rpc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rpc/32/63295_2.png) [@rpc](https://discuss.elastic.co/u/rpc)
#### Post date: [April 2, 2020, 2:04pm UTC](https://discuss.elastic.co/t/kibana-elastic-analytics-use-case/226225/1 "2020-04-02T14:04:59Z")

</div>

Hi we are looking if there is any of the existing elastic /kibana feature or products the will help us achieve the below use case

1. find the patients in the patient\_hie\_\* index pattern that doesnt exist in other index patterns like patient\_pdn\_\* ,patient\_xyz\_8
2. find the patients in the patient\_hie\_\* index pattern that does exist in other index patterns like patient\_pdn\_\* ,patient\_xyz\_8

once we have the documents/patients from the above 2 queries

can we also do a comparision between the medication history of the above patients which is in different indexes drug\_hist\_hie\_\* ,drug\_hist\_pdn\ __,drug\_hist\_xyz\__ etc..,

can this be done using the kiban visualize or aggregation pipelines from dev tools ?

I read and tried the pipeline aggregation and bool query from dev tools and aggregations in teh visualize to do this but no luck ,  
but I am not 100% sure about all the elasticsearch /kibana capabilities , which is why I am trying to see if any one solved this kind of problems using kibana /elastic analytics capabilities

---

<div class="post-metadata">

### Author: ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)
#### Post date: [April 3, 2020, 9:18am UTC](https://discuss.elastic.co/t/kibana-elastic-analytics-use-case/226225/2 "2020-04-03T09:18:19Z")

</div>

Hi Pranaychandra ravi

I've got a question about your data structure, is a patient stored in patient\_hie\_\* different to in patient\_pdn\_\* ? does a patient record have a property like this that you could use to build term queries?

`property: ['hie','pdn']`

thx & best,  
Matthias

---

<div class="post-metadata">

### Author: ![rpc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rpc/32/63295_2.png) [@rpc](https://discuss.elastic.co/u/rpc)
#### Post date: [April 6, 2020, 2:04pm UTC](https://discuss.elastic.co/t/kibana-elastic-analytics-use-case/226225/3 "2020-04-06T14:04:26Z")

</div>

Mat  
yes there is a source field ,it is not a list and we store the source name there

-Pranay

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 4, 2020, 2:04pm UTC](https://discuss.elastic.co/t/kibana-elastic-analytics-use-case/226225/4 "2020-05-04T14:04:28Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
