Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have an application in which I have a generic calendar table with 2 years and the purpose is to see all in-patients per hour. I used the function intervalmatch to match a patient's in-time and out-time to a ward to see if the patient's still in the ward per hour. It works fine but my problem is that the size of the application afterwards gets enourmous (approx 10 times as big). Is it suppose to be that way with Intervalmatch or have I missed something in my script or is there a more optimal way to do this? See the attached file for script.
The table the intervalmatch function residents to has approx 50 000 rows after load, and the table with the intervalmatch in it finds over 213 300 000 rows....
Kind regards
Mi
Looks like you're getting a cartesian product. It also looks like this isn't your actual script, as it appears that the only thing on the Timestamp table is field "time", and then you load field "tid" from it. So either this isn't the script, or I've missed something. Either way, I shouldn't try to solve the problem until I understand it.
However, I do have a sample application that might be of use to you, as it seems to be solving a similar problem, but without using an intervalmatch at all. In the example, we want to see whether PCs are being repaired or working on any particular date. That seems similar to me to seeing whether a patient is in or not in a particular ward in a particular hour. So perhaps it will be useful. Perhaps not.
Hi John,
John Witherspoon wrote:
Looks like you're getting a cartesian product. It also looks like this isn't your actual script, as it appears that the only thing on the Timestamp table is field "time", and then you load field "tid" from it. So either this isn't the script, or I've missed something.
It's not the entire script that I posted but with the part of the script where the "solution" for solving my question is included. I did a miss in changing all the fields of "tid" to "time". In the original script it's all the same.
However, I do have a sample application that might be of use to you, as it seems to be solving a similar problem, but without using an intervalmatch at all. In the example, we want to see whether PCs are being repaired or working on any particular date. That seems similar to me to seeing whether a patient is in or not in a particular ward in a particular hour. So perhaps it will be useful. Perhaps not.
In your example of PCs being repaired or working do you consider an end date for when it's working again or when it's being repaired?
Kind regards
Mi