pez-globo / pufferfish-software

All software for the Pufferfish ventilator.
Apache License 2.0
0 stars 1 forks source link

Set Alarm Limits Screen's Apply Changes button is missing a confirmation dialogue #324

Closed ethanjli closed 3 years ago

ethanjli commented 3 years ago

When the Set Alarm Limits screen's "Apply Changes" button is clicked, it should bring up a confirmation dialogue displaying the changed alarm limits. This button should only be enabled if unsaved changes to alarm limits have been made. Maybe there should also be a "Discard Changes" button (enabled only if unsaved changes have been made, and which also brings up a confirmation dialogue displaying the unsaved changes to discard), just like the "Cancel" button of our modals for changing settings and alarm limits?

(this issue was created from https://github.com/pez-globo/pufferfish-software/pull/313#issuecomment-818406959 )

ethanjli commented 3 years ago

From basic testing, there's some confusing and inconsistent behavior from the quickstart screen: I can adjust FiO2 and flow rate settings, and they're applied when I press "Start Ventilation". I can also adjust SpO2 and HR alarm limits, but they're discarded when I press "Start Ventilation". The catch here is that in order for those changes on the alarm limits page to be used when I press "Start Ventilation", first I have to press "Apply Changes". This behavior is really counter-intuitive. To make it consistent, I've made the "Start Ventilation" button automatically apply/commit the AlarmLimitsStandby values when I press it (4ee0ee4). And we need to hide the "Apply Changes" button from the alarm limits screen in standby mode (I don't know how to do this).

ethanjli commented 3 years ago

Additionally, when the Set Alarms screen is opened from another screen (e.g. the dashboard), its values should be initialized to the current values in either AlarmLimits or AlarmLimitsRequest - so it shouldn't keep any unsaved changes which were to be discarded previously.