Index: simulator/Simulator.ui
===================================================================
diff -u -rc678a6653939736267d5301b524f32ff5d9cf4c5 -rb4e6b92304a715cba0c33fe101922ceee4174465
--- simulator/Simulator.ui (.../Simulator.ui) (revision c678a6653939736267d5301b524f32ff5d9cf4c5)
+++ simulator/Simulator.ui (.../Simulator.ui) (revision b4e6b92304a715cba0c33fe101922ceee4174465)
@@ -7,7 +7,7 @@
0
0
831
- 911
+ 928
@@ -61,7 +61,7 @@
- 50
+ 30
0
@@ -104,7 +104,7 @@
- 50
+ 30
0
@@ -156,6 +156,12 @@
0
+
+
+ 30
+ 0
+
+
10
@@ -237,6 +243,12 @@
0
+
+
+ 30
+ 0
+
+
10
@@ -321,6 +333,12 @@
0
+
+
+ 30
+ 0
+
+
10
@@ -336,6 +354,12 @@
-
+
+
+ 30
+ 0
+
+
10
@@ -876,7 +900,7 @@
-
-
-
+
-
@@ -888,10 +912,34 @@
- -
-
+
-
+
+
+
+ 10
+
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Qt::Horizontal
+
+
+
+ -
+
-
-
+
10
@@ -901,17 +949,17 @@
background-color: rgb(173, 127, 168);
- Dialysate
+ Ultrafiltration (mL)
Qt::AlignCenter
- -
-
+
-
+
-
+
0
0
@@ -921,37 +969,31 @@
10
-
- Range
+
+ 8000
- -
-
+
-
+
-
+
0
0
-
-
- 50
- 0
-
-
10
-
- mL/min
+
+ 8000
- -
-
+
-
+
0
@@ -964,110 +1006,103 @@
- 600
+ Min
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
- -
-
+
-
+
0
0
-
-
- 50
- 0
-
-
10
- mL/min
+ Max
-
-
- -
-
-
-
- 0
- 0
-
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- 10
-
-
-
- 100
-
-
- 600
-
-
- 50
-
- -
-
+
-
+
-
+
0
0
+
+
+ 30
+ 0
+
+
10
-
- 100
+
+ 0
-
- 600
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
- 50
-
- -
-
+
-
+
0
0
+
+
+ 30
+ 0
+
+
10
- Min
+ 8000
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
- -
-
+
-
+
+
+ Qt::Horizontal
+
+
+
+
+
+ -
+
+
-
+
-
+
0
0
@@ -1077,41 +1112,40 @@
10
-
- Max
+
+ 480
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
- -
-
+
-
+
0
0
+
+
+ 30
+ 0
+
+
10
- 100
+ 0
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- -
-
-
-
+
10
@@ -1121,69 +1155,81 @@
background-color: rgb(173, 127, 168);
- Ultrafiltration
+ Duration (min)
Qt::AlignCenter
- -
-
+
-
+
+
+
+ 0
+ 0
+
+
10
-
- Range
+
+ 480
- -
-
+
-
+
0
0
-
-
- 50
- 0
-
-
10
- mL
+ Max
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
- -
-
+
-
+
-
+
0
0
+
+
+ 30
+ 0
+
+
10
-
- 8000
+
+ 480
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
-
-
+
0
@@ -1203,10 +1249,21 @@
- -
-
+
-
+
+
+ Qt::Horizontal
+
+
+
+
+
+ -
+
+
-
+
-
+
0
0
@@ -1216,40 +1273,40 @@
10
+
+ background-color: rgb(117, 80, 123);
+color: rgb(238, 238, 236);
+
- 8000
+ Treatment Ranges
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+ Qt::AlignCenter
- -
-
+
-
+
-
+
0
0
-
-
- 50
- 0
-
+
+ Turn Treatment ranges broadcast message Automatic send Off/On
-
-
- 10
-
-
- mL
+
+
+
+ -
+
-
-
+
0
@@ -1261,13 +1318,19 @@
10
+
+ 100
+
- 8000
+ 600
+
+ 50
+
-
-
+
0
@@ -1287,45 +1350,8 @@
- -
-
-
-
- 0
- 0
-
-
-
-
- 10
-
-
-
- 0
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
-
-
- -
-
-
-
- 10
-
-
-
- Qt::Horizontal
-
-
-
- -
-
-
-
+
10
@@ -1335,48 +1361,42 @@
background-color: rgb(173, 127, 168);
- Duration
+ Dialysate (mL/min)
Qt::AlignCenter
- -
-
-
-
- 10
-
-
-
- Range
-
-
-
- -
-
+
-
+
0
0
+
+
+ 30
+ 0
+
+
10
- 480
+ 600
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
+
0
@@ -1385,7 +1405,7 @@
- 50
+ 30
0
@@ -1395,12 +1415,15 @@
- min
+ 100
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
-
-
+
0
@@ -1412,55 +1435,19 @@
10
+
+ 100
+
- 480
+ 600
-
-
- -
-
-
-
- 0
- 0
-
+
+ 50
-
-
- 50
- 0
-
-
-
-
- 10
-
-
-
- min
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 10
-
-
-
- 480
-
-
-
-
-
+
0
@@ -1480,81 +1467,15 @@
- -
-
-
-
- 0
- 0
-
+
-
+
+
+ Qt::Horizontal
-
-
- 10
-
-
-
- Max
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 10
-
-
-
- 0
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
-
- 10
-
-
-
- Qt::Vertical
-
-
-
- -
-
-
-
- 10
-
-
-
- background-color: rgb(117, 80, 123);
-color: rgb(238, 238, 236);
-
-
- Treatment Ranges
-
-
- Qt::AlignCenter
-
-
-
-
@@ -2023,7 +1944,7 @@
- 50
+ 30
0
@@ -2084,6 +2005,12 @@
0
+
+
+ 30
+ 0
+
+
10
@@ -2327,59 +2254,32 @@
-
-
-
-
+
-
+
-
+
0
0
-
-
- 50
- 0
-
-
10
-
- mmHg
+
+ 10
- -
-
-
- Qt::Vertical
-
-
- QSizePolicy::Preferred
-
-
+
-
+
+
- 20
- 40
+ 30
+ 0
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 10
-
-
0
@@ -2396,57 +2296,27 @@
0
-
-
- 10
-
+
+
+ 30
+ 0
+
-
- Min
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
-
- 0
- 0
-
-
10
- 0
+ Low
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
- -
-
-
-
- 0
- 0
-
-
-
-
- 10
-
-
-
-
-
-
+
0
@@ -2458,6 +2328,9 @@
10
+
+ 10
+
-
@@ -2468,21 +2341,50 @@
0
+
+
+ 30
+ 0
+
+
10
- Max
+ High
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+ -
+
+
+
+ 30
+ 0
+
+
+
+ Value
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
-
-
+
0
@@ -2498,15 +2400,15 @@
background-color: rgb(229, 156, 156);
- Venous
+ Venous Limit (mmHg)
Qt::AlignCenter
- -
-
+
-
+
0
@@ -2515,7 +2417,7 @@
- 50
+ 30
0
@@ -2525,111 +2427,102 @@
- mmHg
+ 0
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
- -
-
+
-
+
0
0
+
+
+ 30
+ 0
+
+
10
- Range
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- -
-
-
0
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
- -
-
-
- Value
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
-
-
-
-
+
-
+
0
0
+
+
+ 30
+ 0
+
+
10
- Range
+ High
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
- -
-
+
-
+
-
+
0
0
+
+
+ 30
+ 0
+
+
10
-
-
- -
-
-
-
- 0
- 0
-
+
+ 0
-
-
- 10
-
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
- -
-
+
-
+
-
+
0
0
@@ -2639,16 +2532,13 @@
10
-
- Max
+
+ 10
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
- -
-
+
-
+
0
@@ -2657,22 +2547,20 @@
- 50
+ 30
0
-
-
- 10
-
-
- mmHg
+ Value
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
-
-
+
0
@@ -2681,7 +2569,7 @@
- 50
+ 30
0
@@ -2691,40 +2579,6 @@
- mmHg
-
-
-
- -
-
-
- Qt::Vertical
-
-
- QSizePolicy::Preferred
-
-
-
- 20
- 40
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 10
-
-
-
0
@@ -2740,23 +2594,29 @@
0
+
+
+ 30
+ 0
+
+
10
- Min
+ Low
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
- -
-
+
-
+
-
+
0
0
@@ -2766,19 +2626,20 @@
10
-
- background-color: rgb(229, 156, 156);
+
+ 10
-
- Arterial
+
+
+ -
+
+
+ Qt::Horizontal
-
- Qt::AlignCenter
-
- -
-
+
-
+
0
@@ -2790,33 +2651,25 @@
10
-
- 0
+
+ background-color: rgb(229, 156, 156);
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
- Value
+ Arterial Limit (mmHg)
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+ Qt::AlignCenter
- -
-
-
- Qt::Horizontal
+
-
+
+
+
+ 30
+ 0
+
-
-
- -
-
0
@@ -2978,7 +2831,7 @@
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
@@ -3092,9 +2945,9 @@
- sldArterialPressureValue
+ sldArterialValue
valueChanged(int)
- lblArterialPressureValue
+ lblArterialValue
setNum(int)
@@ -3108,9 +2961,9 @@
- sldVenousPressureValue
+ sldVenousValue
valueChanged(int)
- label_63
+ lblVenousValue
setNum(int)
Index: simulator/run.py
===================================================================
diff -u -rc678a6653939736267d5301b524f32ff5d9cf4c5 -rb4e6b92304a715cba0c33fe101922ceee4174465
--- simulator/run.py (.../run.py) (revision c678a6653939736267d5301b524f32ff5d9cf4c5)
+++ simulator/run.py (.../run.py) (revision b4e6b92304a715cba0c33fe101922ceee4174465)
@@ -1,4 +1,3 @@
-
# import system modules
import sys
@@ -81,11 +80,20 @@
"""
convenient method of find_child for QComboBox
:param name: (str) name of the QComboBox Object
- :return: (QPushButton) reference to the QComboBox
+ :return: (QComboBox) reference to the QComboBox
"""
child = self.__find_child(QtWidgets.QComboBox, name)
return child
+ def find_checkox(self, name: str) -> QtWidgets.QCheckBox:
+ """
+ convenient method of find_child for QCheckBox
+ :param name: (str) name of the QCheckBox Object
+ :return: (QCheckBox) reference to the QComboBox
+ """
+ child = self.__find_child(QtWidgets.QCheckBox, name)
+ return child
+
def find_spinbox(self, name: str) -> QtWidgets.QSpinBox:
"""
convenient method of find_child for QSpinBox
@@ -123,7 +131,8 @@
# global variables declarations
ui_file_name = "Simulator.ui"
timer: QTimer
-
+ # checkbox
+ chkRangesBroadcast: QtWidgets.QCheckBox
# pushbutton
btnSalineAccept: QtWidgets.QPushButton
btnSalineReject: QtWidgets.QPushButton
@@ -133,39 +142,45 @@
btnUfResumeReject: QtWidgets.QPushButton
btnUfEditAccept: QtWidgets.QPushButton
btnUfEditReject: QtWidgets.QPushButton
+ btnAVPressuresAccept: QtWidgets.QPushButton
+ btnAVPressuresReject: QtWidgets.QPushButton
# label
lblSalineAction: QtWidgets.QLabel
lblUfPauseAction: QtWidgets.QLabel
lblUfResumeAction: QtWidgets.QLabel
lblUfEditAction: QtWidgets.QLabel
- lblArterialMin: QtWidgets.QLabel
- lblArterialMax: QtWidgets.QLabel
- lblVenousMin: QtWidgets.QLabel
- lblVenousMax: QtWidgets.QLabel
+ lblArterialTitle: QtWidgets.QLabel
+ lblVenousTitle: QtWidgets.QLabel
+ lblAVPressuresAction: QtWidgets.QLabel
+ lblArterialLimitLow: QtWidgets.QLabel
+ lblArterialLimitHigh: QtWidgets.QLabel
+ lblVenousLimitLow: QtWidgets.QLabel
+ lblVenousLimitHigh: QtWidgets.QLabel
# spinbox
spnSalineRejectReason: QtWidgets.QSpinBox
spnUfPauseRejectReason: QtWidgets.QSpinBox
spnUfResumeRejectReason: QtWidgets.QSpinBox
spnUfEditRejectReason: QtWidgets.QSpinBox
+ spnAVPressuresRejectReason: QtWidgets.QSpinBox
spnDurationMin: QtWidgets.QSpinBox
spnDurationMax: QtWidgets.QSpinBox
spnUFVolumeMin: QtWidgets.QSpinBox
spnUFVolumeMax: QtWidgets.QSpinBox
spnDialysateMin: QtWidgets.QSpinBox
spnDialysateMax: QtWidgets.QSpinBox
- spnArterialMin: QtWidgets.QSpinBox
- spnArterialMax: QtWidgets.QSpinBox
- spnVenousMin: QtWidgets.QSpinBox
- spnVenousMax: QtWidgets.QSpinBox
+ spnArterialLimitLow: QtWidgets.QSpinBox
+ spnArterialLimitHigh: QtWidgets.QSpinBox
+ spnVenousLimitLow: QtWidgets.QSpinBox
+ spnVenousLimitHigh: QtWidgets.QSpinBox
# combobox
cmbSalineAcceptTarget: QtWidgets.QComboBox
# sliders
sldSalineTarget: QtWidgets.QSlider
sldSalineCumulative: QtWidgets.QSlider
sldSalineVolume: QtWidgets.QSlider
sldUfVolume: QtWidgets.QSlider
- sldArterialPressureValue: QtWidgets.QSlider
- sldVenousPressureValue: QtWidgets.QSlider
+ sldArterialValue: QtWidgets.QSlider
+ sldVenousValue: QtWidgets.QSlider
# tables
tblSalineSubMode: QtWidgets.QTableWidget
tblSalineUFStates: QtWidgets.QTableWidget
@@ -190,6 +205,7 @@
self.spnUFVolumeMax = self.find_spinbox('spnUFVolumeMax')
self.spnDialysateMin = self.find_spinbox('spnDialysateMin')
self.spnDialysateMax = self.find_spinbox('spnDialysateMax')
+ self.chkRangesBroadcast = self.find_checkox('chkRangesBroadcast')
self.timer = QTimer()
self.timer.start(1000)
self.timer.timeout.connect(self.do_ranges_data)
@@ -265,99 +281,87 @@
sets up the treatment pressures
:return: none
"""
- arterial_pressure_minimum = -300
- arterial_pressure_lower_bound = -300
- arterial_pressure_upper_bound = +100
- arterial_pressure_maximum = +200
+ arterial_pressure_minimum = -400
+ arterial_pressure_maximum = +600
+ arterial_pressure_low_min = -300
+ arterial_pressure_low_def = -300
+ arterial_pressure_low_max = +200
+ arterial_pressure_high_min = -300
+ arterial_pressure_high_def = +100
+ arterial_pressure_high_max = +200
venous_pressure_minimum = -100
- venous_pressure_lower_bound = -100
- venous_pressure_upper_bound = +400
- venous_pressure_maximum = +600
+ venous_pressure_maximum = +700
+ venous_pressure_low_min = -100
+ venous_pressure_low_def = -100
+ venous_pressure_low_max = +600
+ venous_pressure_high_min = +100
+ venous_pressure_high_def = +400
+ venous_pressure_high_max = +600
- self.lblArterialMin = self.find_label('lblArterialMin')
- self.lblArterialMax = self.find_label('lblArterialMax')
- self.lblVenousMin = self.find_label('lblVenousMin')
- self.lblVenousMax = self.find_label('lblVenousMax')
- self.spnArterialMin = self.find_spinbox('spnArterialMin')
- self.spnArterialMax = self.find_spinbox('spnArterialMax')
- self.spnVenousMin = self.find_spinbox('spnVenousMin')
- self.spnVenousMax = self.find_spinbox('spnVenousMax')
- self.sldArterialPressureValue = self.find_slider('sldArterialPressureValue')
- self.sldVenousPressureValue = self.find_slider('sldVenousPressureValue')
+ self.lblArterialTitle = self.find_label('lblArterialTitle')
+ self.lblVenousTitle = self.find_label('lblVenousTitle')
+ self.lblArterialLimitLow = self.find_label('lblArterialLimitLow')
+ self.lblArterialLimitHigh = self.find_label('lblArterialLimitHigh')
+ self.lblVenousLimitLow = self.find_label('lblVenousLimitLow')
+ self.lblVenousLimitHigh = self.find_label('lblVenousLimitHigh')
+ self.lblAVPressuresAction = self.find_label('lblAVPressuresAction')
- self.lblArterialMin.setNum(arterial_pressure_minimum)
- self.lblArterialMax.setNum(arterial_pressure_maximum)
- self.lblVenousMin.setNum(venous_pressure_minimum)
- self.lblVenousMax.setNum(venous_pressure_maximum)
+ self.btnAVPressuresAccept = self.find_button('btnAVPressuresAccept')
+ self.btnAVPressuresReject = self.find_button('btnAVPressuresReject')
- @Slot()
- def do_set_arterial_min(arterial_min):
- """
- set the acceptable arterial min value change
- :param arterial_min: arterial pressure min
- :return: none
- """
- self.sldArterialPressureValue.setMinimum(arterial_min)
- if self.sldArterialPressureValue.value() < arterial_min:
- self.sldArterialPressureValue.setValue(arterial_min)
+ self.spnArterialLimitLow = self.find_spinbox('spnArterialLimitLow')
+ self.spnArterialLimitHigh = self.find_spinbox('spnArterialLimitHigh')
+ self.spnVenousLimitLow = self.find_spinbox('spnVenousLimitLow')
+ self.spnVenousLimitHigh = self.find_spinbox('spnVenousLimitHigh')
+ self.spnAVPressuresRejectReason = self.find_spinbox('spnAVPressuresRejectReason')
- @Slot()
- def do_set_arterial_max(arterial_max):
- """
- set the acceptable arterial max value change
- :param arterial_max: arterial pressure max
- :return: none
- """
- self.sldArterialPressureValue.setMaximum(arterial_max)
- if self.sldArterialPressureValue.value() > arterial_max:
- self.sldArterialPressureValue.setValue(arterial_max)
+ self.sldArterialValue = self.find_slider('sldArterialValue')
+ self.sldVenousValue = self.find_slider('sldVenousValue')
- @Slot()
- def do_set_venous_min(venous_min):
- """
- set the acceptable venous min value change
- :param venous_min: venous pressure min
- :return: none
- """
- self.sldVenousPressureValue.setMinimum(venous_min)
- if self.sldVenousPressureValue.value() < venous_min:
- self.sldVenousPressureValue.setValue(venous_min)
+ self.lblArterialTitle.setText(
+ f"{self.lblArterialTitle.text()} [{arterial_pressure_minimum},{arterial_pressure_maximum}]"
+ )
+ self.lblVenousTitle.setText(
+ f"{self.lblVenousTitle.text()} [{venous_pressure_minimum},{venous_pressure_maximum}]"
+ )
- @Slot()
- def do_set_venous_max(venous_max):
- """
- set the acceptable venous max value change
- :param venous_max: venous pressure max
- :return: none
- """
- self.sldVenousPressureValue.setMaximum(venous_max)
- if self.sldVenousPressureValue.value() > venous_max:
- self.sldVenousPressureValue.setValue(venous_max)
+ self.lblArterialLimitLow.setText(f"{arterial_pressure_low_min}\n{arterial_pressure_low_max}")
+ self.lblArterialLimitHigh.setText(f"{arterial_pressure_high_min}\n{arterial_pressure_high_max}")
+ self.lblVenousLimitLow.setText(f"{venous_pressure_low_min}\n{venous_pressure_low_max}")
+ self.lblVenousLimitHigh.setText(f"{venous_pressure_high_min}\n{venous_pressure_high_max}")
- self.sldArterialPressureValue.valueChanged.connect(self.do_pressures_data)
- self.sldVenousPressureValue.valueChanged.connect(self.do_pressures_data)
+ # sending the CANBus message when slider value changed
+ self.sldArterialValue.valueChanged.connect(self.do_pressures_data)
+ self.sldVenousValue.valueChanged.connect(self.do_pressures_data)
- self.spnArterialMin.valueChanged.connect(do_set_arterial_min)
- self.spnArterialMax.valueChanged.connect(do_set_arterial_max)
+ # sending the CANBus message when accepted or rejected
+ self.btnAVPressuresAccept.clicked.connect(self.do_pressures_limits_accept)
+ self.btnAVPressuresReject.clicked.connect(self.do_pressures_limits_reject)
- self.spnVenousMin.valueChanged.connect(do_set_venous_min)
- self.spnVenousMax.valueChanged.connect(do_set_venous_max)
+ self.sldArterialValue.setMinimum(arterial_pressure_minimum)
+ self.sldArterialValue.setMaximum(arterial_pressure_maximum)
+ self.sldArterialValue.setValue(0)
+ self.sldVenousValue.setMinimum(venous_pressure_minimum)
+ self.sldVenousValue.setMaximum(venous_pressure_maximum)
+ self.sldVenousValue.setValue(0)
- self.spnArterialMin.setMinimum(arterial_pressure_minimum)
- self.spnArterialMin.setMaximum(arterial_pressure_maximum)
- self.spnArterialMin.setValue(arterial_pressure_lower_bound)
- self.spnArterialMax.setMinimum(arterial_pressure_minimum)
- self.spnArterialMax.setMaximum(arterial_pressure_maximum)
- self.spnArterialMax.setValue(arterial_pressure_upper_bound)
+ self.spnArterialLimitLow.setMinimum(arterial_pressure_low_min)
+ self.spnArterialLimitLow.setMaximum(arterial_pressure_low_max)
+ self.spnArterialLimitLow.setValue(arterial_pressure_low_def)
- self.spnVenousMin.setMinimum(venous_pressure_minimum)
- self.spnVenousMin.setMaximum(venous_pressure_maximum)
- self.spnVenousMin.setValue(venous_pressure_lower_bound)
- self.spnVenousMax.setMinimum(venous_pressure_minimum)
- self.spnVenousMax.setMaximum(venous_pressure_maximum)
- self.spnVenousMax.setValue(venous_pressure_upper_bound)
+ self.spnArterialLimitHigh.setMinimum(arterial_pressure_high_min)
+ self.spnArterialLimitHigh.setMaximum(arterial_pressure_high_max)
+ self.spnArterialLimitHigh.setValue(arterial_pressure_high_def)
+ self.spnVenousLimitLow.setMinimum(venous_pressure_low_min)
+ self.spnVenousLimitLow.setMaximum(venous_pressure_low_max)
+ self.spnVenousLimitLow.setValue(venous_pressure_low_def)
+
+ self.spnVenousLimitHigh.setMinimum(venous_pressure_high_min)
+ self.spnVenousLimitHigh.setMaximum(venous_pressure_high_max)
+ self.spnVenousLimitHigh.setValue(venous_pressure_high_def)
+
@Slot()
def do_sb_accept(self):
"""
@@ -483,14 +487,15 @@
sends the treatment ranges message with given value on the screen
:return: none
"""
- denaliMessages.setTreatmentParamRanges(
- self.spnDurationMin.value(),
- self.spnDurationMax.value(),
- self.spnUFVolumeMin.value(),
- self.spnUFVolumeMax.value(),
- self.spnDialysateMin.value(),
- self.spnDialysateMax.value()
- )
+ if self.chkRangesBroadcast.isChecked():
+ denaliMessages.setTreatmentParamRanges(
+ self.spnDurationMin.value(),
+ self.spnDurationMax.value(),
+ self.spnUFVolumeMin.value(),
+ self.spnUFVolumeMax.value(),
+ self.spnDialysateMin.value(),
+ self.spnDialysateMax.value()
+ )
@Slot()
def do_pressures_data(self):
@@ -499,11 +504,43 @@
:return: none
"""
denaliMessages.setPressureOcclusionData(
- self.sldArterialPressureValue.value(),
- self.sldVenousPressureValue.value(),
+ self.sldArterialValue.value(),
+ self.sldVenousValue.value(),
0, 0, 0
)
+ @Slot()
+ def do_pressures_limits_accept(self):
+ """
+ sends the pressures values message with given value on the screen
+ :return: none
+ """
+ # vAccepted, vReason, vArterialLow, vArterialHigh, vVenousLow, vVenousHigh
+ denaliMessages.sendTreatmentAdjustPressuresLimitsResponse(
+ EResponse.Accepted, 0,
+ self.spnArterialLimitLow.value(),
+ self.spnArterialLimitHigh.value(),
+ self.spnVenousLimitLow.value(),
+ self.spnVenousLimitHigh.value()
+ )
+ self.lblAVPressuresAction.setText('Accepted ')
+
+ @Slot()
+ def do_pressures_limits_reject(self):
+ """
+ sends the pressures values message with given value on the screen
+ :return: none
+ """
+ reason = self.spnAVPressuresRejectReason.value()
+ denaliMessages.sendTreatmentAdjustPressuresLimitsResponse(
+ EResponse.Rejected, reason,
+ self.spnArterialLimitLow.value(),
+ self.spnArterialLimitHigh.value(),
+ self.spnVenousLimitLow.value(),
+ self.spnVenousLimitHigh.value()
+ )
+ self.lblAVPressuresAction.setText('Rejected ' + "{}".format(reason))
+
def initialize(self):
"""
initializes the class by calling it's initializer methods to make objects ready