Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
detmawin
Contributor III
Contributor III

Visit Type within 6 Months

I am trying to get the first patient with a new patient visit type within 6 month of the physician or follow up visit.   If a patient has a new patient visit and has no other activities (physician or  follow up visit types) within 6 months then a new patient visit type is needed.

If the patient has only a new patient visit, I can take the first value.  But if a patient has a new patient visit, then a physician or follow up visit past six months, I am not sure how to grab this date.  I attached a spreadsheet of sample data.

Thank you

Labels (1)
1 Solution

Accepted Solutions
Dalton_Ruer
Support
Support

That is a very common thing to do and the answer is to use the PREVIOUS command inside your LOAD script. 

Check out this blog post I created about something very similar that had to do with READMISSIONS to read and see the logic and code behind it: http://qlikdork.com/2016/07/visualizing-readmissions/

The Qlik Help for the PREVIOUS function is pretty thorough if you need to check it out more: https://help.qlik.com/en-US/sense/September2019/Subsystems/Hub/Content/Sense_Hub/Scripting/InterReco...

View solution in original post

1 Reply
Dalton_Ruer
Support
Support

That is a very common thing to do and the answer is to use the PREVIOUS command inside your LOAD script. 

Check out this blog post I created about something very similar that had to do with READMISSIONS to read and see the logic and code behind it: http://qlikdork.com/2016/07/visualizing-readmissions/

The Qlik Help for the PREVIOUS function is pretty thorough if you need to check it out more: https://help.qlik.com/en-US/sense/September2019/Subsystems/Hub/Content/Sense_Hub/Scripting/InterReco...