Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sharasridhar
Contributor III
Contributor III

Counting total visits between a time period

Hello,

Please help!!

I have two tables. One contains detailed summary of visits (including inpatient admissions) ever made to the hospital. Another table has the readmissions summary. I need to calculate the number of visits (observations, follow ups etc) between the previous inpatient admission discharge date and the readmission date. 

Readmissions table has fields: readmission_admit_date, previous_discharge_date, PatientID.

VisitSummary table has fields: PatientID, VisitID, VisitServiceDateTime. 

 

Visits between the previous discharge and readmission.

VisitServiceDateTime>previous_discharge_date
and VisitServiceDateTime<readmission_admit_date

 

How can I get this done? through Load Editor or by Set Analysis. I am open for any suggestion. 

2 Replies
JustinDallas
Specialist III
Specialist III

You might get more bites if you post a dummy inline table that mirrors the structure of your data.  Three things I don't leave home without, my license to drive, my license to carry, and a code sample mirroring the problem I'm trying to solve.

sharasridhar
Contributor III
Contributor III
Author

An Example to the datasets:

Visits:

VisitIDPatientIDServiceDateTime
V1P11/1/2020
V2P11/10/2020
V3P11/20/2020
V4P21/30/2020
V5P22/10/2020
V6P32/11/2020

 

Readmissions:

PatientIDreadmission_admit_dateprevious_discharge_date
P11/15/202012/25/2019
P22/15/20201/29/2020
P32/15/20202/12/2020

 

I need:

PatientIDTotalVisitsBetweenPrevDisch&Readmit
P12
P22
P30