charludo / ycms

Apache License 2.0
0 stars 0 forks source link

Fix timetravel bugs #129

Closed charludo closed 9 months ago

charludo commented 9 months ago

Short description

Fixes various timetravel bugs (see below).

In short: timetravelling works, as long as you just want to SEE. If you want to CHANGE things in the past or in the future..... Yeah I think this is not worth the effort.

Please check out any and all edge cases you can think of while keeping the above in mind πŸ˜…

Proposed changes

Side effects

Resolved issues

Fixes: #71, #92 (I guess...)

charludo commented 9 months ago
* When I time travel in ward view, then I switch to timeline mode, the time travel is cancelled and I'm back to the current time. I think this behavior is expected right? If so maybe disable the switch button when user starts time travel. It's unexpected for me that when I switch to timeline and I suddenly back to today.

Fair point. The reason this happens is that multiple redirects happen after clicking the switch, and the GET parameters get lost. I'm sure it can be fixed, but IDK if it is worth the trouble; deactivating the switch sounds like a good idea.

* Is it possible to focus on the date time travel bring me to in timeline mode? When I choose a date, I don't know if it succesfully bring me to the future or past, as it always focus me on today.

Similarly here, I'm sure it's possible, but the timeline has its own way of setting the date. Do you think this is worth trying? The laternative is just not showing the timetravel link in the timeline. After all, the timeline lets us see "all of time", and there's little point in timetravelling there πŸ˜„

charludo commented 9 months ago

Could you check if the new solution works for you?

noworneverev commented 9 months ago
* When I time travel in ward view, then I switch to timeline mode, the time travel is cancelled and I'm back to the current time. I think this behavior is expected right? If so maybe disable the switch button when user starts time travel. It's unexpected for me that when I switch to timeline and I suddenly back to today.

Fair point. The reason this happens is that multiple redirects happen after clicking the switch, and the GET parameters get lost. I'm sure it can be fixed, but IDK if it is worth the trouble; deactivating the switch sounds like a good idea.

Sorry I just found it's frustrated that I cannot click the button whenever I want, I prefer the version before this commitπŸ˜….

* Is it possible to focus on the date time travel bring me to in timeline mode? When I choose a date, I don't know if it succesfully bring me to the future or past, as it always focus me on today.

Similarly here, I'm sure it's possible, but the timeline has its own way of setting the date. Do you think this is worth trying? The laternative is just not showing the timetravel link in the timeline. After all, the timeline lets us see "all of time", and there's little point in timetravelling there πŸ˜„

I test the timeline, but it can only see the current time onward, I cannot see past stays in timeline.

charludo commented 9 months ago

I test the timeline, but it can only see the current time onward, I cannot see past stays in timeline.

Oh, right! Forgot about that.

Is this important enough to spend time on? Frankly, I thought the timetravel was a bit of a gimmick, and there's no practical usecase I can think of for any of the roles we have to need to be able to check all past stays at once (individual patient stays can of course be checked in the patient details, without timetravel).

If you want to, feel free to work on this (we actually have an issue, #92), but I will not be putting more time into the timetravel πŸ˜… And since this is its own feature (kind of), I don't think it's in scope for this PR.

charludo commented 9 months ago

I test the timeline, but it can only see the current time onward, I cannot see past stays in timeline.

Oh, right! Forgot about that.

Just to get back on this: It's not a bug, it's to speed up the loading time. Also, we would need to implement a way to lock past bed assignments from being changed retroactively, and filter all of them out before sending them to the solver. IMO it's just a lot of work for virtually no benefit.