on 2024 Oct 02 7:58 AM
HOW TO calculate the number of days between 2 labs?
HOW TO calculate the number of patients how did the 2 labs within 60 days?
USING THE LAB PERFORMED DATE&TIME
Yes, I already calculate the number of days between the two labs, but how to calculate the number of patient who did the 2 labs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, I don't know if you have resolved your problem. In any case, you could use a variable "Couple" where Couple is the concatenation of the 2 lab you search.
After that you could use your 60days measure where lab1+lab2 = "couple"...dunno if it help, without data samples can't answer correctly.
There not couple function because is not what i wrote. Could you first give us a simplified sample of your dataset ?
ex :
client number | nb days | lab 1 | lab2 |
xxx1 | 50 | structure 1 | structure 2 |
xxx2 | 30 | structure 2 | structure 2 |
xxx3 | 0 | structure 1 | - |
xxx4 | 100 | structure 1 | structure 4 |
... |
Is it something like that ?
So here it will be number([client number]) where ([nbdays]<=60)
or number([client number]) where ([nbdays]<=60 and [lab2]<>"-")
@SAR_22so, If I follow your data, you have a table organised like that :
Customer key | MRN - organization (Lab ?) | Performed Date/time | Status of the operation performed | other data and probably an "operation key"
So first, you need to know the order of each performed analyse with Rank(measure;[ranking_dims][;Top|Bottom][;reset_dims]) and put it in an object like OrderRanked
This rank give you a list from the first analyse to the last.
With number(operation key) in (customer key) you cound know how many performed analyse you have by customer.
With the [Performed Date/time] where(OrderRanked="1") you obtain the first date of your list.
After that, for each line you could calculate with datebetween() the first date and the date in the line.
You could also mark your customer whose answer your parameters (you stop the calcul when you find what you want)
User | Count |
---|---|
72 | |
9 | |
9 | |
8 | |
8 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.