moce patches
This commit is contained in:
parent
2c0dc760d9
commit
5665d68db0
37 changed files with 1472 additions and 570 deletions
31
patches/patient-monitor-simulation-v0.6.1-compile-fix.patch
Normal file
31
patches/patient-monitor-simulation-v0.6.1-compile-fix.patch
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
--- a/src/ui.rs
|
||||
+++ b/src/ui.rs
|
||||
@@ -136,6 +136,13 @@
|
||||
window
|
||||
}
|
||||
|
||||
+/// Map an Admin NIBP measurement interval to its dropdown selection.
|
||||
+/// The touchscreen alarm menus do not expose scheduling controls.
|
||||
+fn nibp_interval_index(minutes: i32) -> u32 {
|
||||
+ const INTERVALS: [i32; 7] = [1, 3, 5, 10, 20, 30, 60];
|
||||
+ INTERVALS.iter().position(|&value| value == minutes).unwrap_or(2) as u32
|
||||
+}
|
||||
+
|
||||
fn create_admin(app: &Application, params: SharedParams,
|
||||
simulator: Rc<RefCell<Simulator>>,
|
||||
monitor: &ApplicationWindow,
|
||||
@@ -837,6 +844,14 @@
|
||||
assert_eq!(stepped_hr_limit(None, 60, 1), 60);
|
||||
assert_eq!(stepped_hr_limit(None, 100, -1), 100);
|
||||
}
|
||||
+
|
||||
+ #[test]
|
||||
+ fn nibp_interval_dropdown_supports_every_admin_interval() {
|
||||
+ for (index, minutes) in [1, 3, 5, 10, 20, 30, 60].into_iter().enumerate() {
|
||||
+ assert_eq!(nibp_interval_index(minutes), index as u32);
|
||||
+ }
|
||||
+ assert_eq!(nibp_interval_index(999), 2); // 5-minute fallback
|
||||
+ }
|
||||
}
|
||||
|
||||
/// Touchscreen alarm controls for a numerical value. The two bounds are
|
||||
Loading…
Reference in a new issue