Hello all;
This is more of a strategic question and/or technical one as I have hit a wall on this.
In essence I have the following information for example:
Visitno Room Bed InDate
1234 1 1 JAN 1, 2011
1234 1 1 JAN 2, 2011
1234 5 2 JAN 3, 2011
1234 5 2 JAN 4, 2011
1234 5 2 JAN 5, 2011
...
1234 5 2 JAN 10, 2011
1234 1 1 JAN 11, 2011
1234 1 1 JAN 12, 2011
I am attempting to compress this information so that it reads:
Visitno Room Bed InDate LastDate
1234 1 1 JAN 1, 2011 JAN 2, 2011
1234 5 2 JAN 3, 2011 JAN 10, 2011
1234 1 1 JAN 11, 2011 JAN 12, 2011
I have a program that largely works 99% of the time, but in certain case scenarios (such as above) the same patient ends up back in the same bed in the same room on the same floor if the patient is here long enough and it leads to erroneous output so that it would read:
Visitno Room Bed InDate LastDate
1234 1 1 JAN 1, 2011 JAN 12, 2011
1234 5 2 JAN 3, 2011 JAN 10, 2011
Any guidance would be great!
Lawrence