I’m developing an app for my office that displays both the real-time status of each exam room (Waiting, Ready, etc.) and the time elapsed since the latest status change for each room and patient.
While I’ve successfully implemented the front-end and the functionality to update room statuses, I need help implementing the feature that calculates and displays the duration since the last status change.
Are you letting the users change the status using the app interface as well? If that’s the case, it should be easy enough to add a current date/time value to a “Last Edit” field when an edit is submitted.