Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I am planning to develop a dynamic patient cohort builder which allows users to define patient cohort by including and excluding some medical conditions. For example, users might need to find patients who have diabetes and hypertension, but no cancer. First, users select diabetes and hypertension in disease list box, other medical conditions for these selected patients should show up and allow users to exclude. I would like to show these patients in a straight table and do some other operations. Can this be done in Qlikview?
Thanks.
Longmatch
ID | PatientID | Disease |
1 | 1 | Diabetes |
2 | 1 | Cancer |
3 | 1 | Hypertension |
4 | 2 | Diabetes |
5 | 2 | CVD |
6 | 2 | Depression |
7 | 3 | Diabetes |
8 | 3 | Cancer |
9 | 4 | CVD |
10 | 4 | COPD |
11 | 5 | CHF |
12 | 5 | Diabetes |
13 | 5 | COPD |
14 | 5 | ASTHMA |
15 | 5 | Depression |
16 | 6 | COPD |
17 | 6 | CVD |
18 | 7 | HTN |
19 | 7 | CRF |
20 | 7 | DEMENTIA |
21 | 8 | HIV |
22 | 8 | CHF |
23 | 8 | Asthma |
24 | 9 | Autism |
I was able to get exclusion part to work by referencing this post. Alternate state and dynamic Set analysis string were used. The dynamic set analysis string based upon Disease (NOT state) works fine with all other list boxes except the Disease (Inherited state). If this problem is fixed, this problem will be solved. The sample project was attached for your reference. Thanks
Hi,
despite your linked post disapproving of the QV inbuilt AND-mode in List Boxes I think you should give it a try:
tabPatients:
LOAD Distinct
PatientID,
Disease
FROM [https://community.qlik.com/thread/289798] (html, codepage is 1252, embedded labels, table is @1);
hope this helps
regards
Marco
Thank you very much for your time and efforts, Macro. It works fine for the first step - selecting the patients with certain conditions(depression and diabetes) and list other conditions. Is this possible to exclude certain conditions for selected patients like Asthma (PatientID 5)? Can this method be used in a complicated data model? Thanks again.
can you describe what combination of deseases you would like to select or exclude and which result you would expect based on your sample data?
For example, I would selected Depression and Diabetes (patientID 1,2,3,5) and exclude Cancer (patientID 1,3). The cohort should be patients with Patient ID 2 and 5. The sample project is attached.
patientID 1,2,3,5 means you're looking for patients having either Depression OR Diabetes, while you initially asked for one disease AND some other.
Please clarify
Sorry about the confusion. I need OR in the first list box not AND. The same thing in the second listbox.