Index: simulator/plugins/__init__.py
===================================================================
diff -u -r6a5824cc32716947513b4a5adca54a9e513c0c5c -rc13dc6ba2410716a3f1c446e564085aeb9114a60
--- simulator/plugins/__init__.py (.../__init__.py) (revision 6a5824cc32716947513b4a5adca54a9e513c0c5c)
+++ simulator/plugins/__init__.py (.../__init__.py) (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -1 +1,7 @@
+from .ultrafiltration.loader import Ultrafiltration
+from .inlinebloodpressures.loader import InlineBloodPressures
+from .salinebolus.loader import SalineBolus
+from .treatmentstates.loader import TreatmentStates
+from .treatmentranges.loader import TreatmentRanges
+from .heparin.loader import Heparin
+
Fisheye: Tag c13dc6ba2410716a3f1c446e564085aeb9114a60 refers to a dead (removed) revision in file `simulator/plugins/heparin/heparin.py'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag c13dc6ba2410716a3f1c446e564085aeb9114a60 refers to a dead (removed) revision in file `simulator/plugins/heparin/heparin.ui'.
Fisheye: No comparison available. Pass `N' to diff?
Index: simulator/plugins/heparin/interface.ui
===================================================================
diff -u
--- simulator/plugins/heparin/interface.ui (revision 0)
+++ simulator/plugins/heparin/interface.ui (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -0,0 +1,383 @@
+
+
+ ui_salinebolus
+
+
+
+ 0
+ 0
+ 493
+ 228
+
+
+
+ Heparin
+
+
+ -
+
+
-
+
+
-
+
+
+
+ 10
+
+
+
+ Accept
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ background-color: rgb(242, 94, 155);
+
+
+ Heparin Adjustment
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 0
+
+
+
+
+ 10
+
+
+
+ mL
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
-
+
+ 100
+
+
+ -
+
+ 200
+
+
+ -
+
+ 300
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 0
+
+
+
+
+ 10
+
+
+
+ reason
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Plain
+
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Reject
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ background-color: rgb(242, 94, 155);
+
+
+ Heaprin Data
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Cumulative
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldCumulative
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Max
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 300
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ background-color: rgb(191, 64, 108);
+color: rgb(238, 238, 236);
+
+
+ Heparin Delivery
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+ sldCumulative
+ valueChanged(int)
+ lblCumulative
+ setNum(int)
+
+
+ 445
+ 209
+
+
+ 481
+ 210
+
+
+
+
+
Index: simulator/plugins/heparin/loader.py
===================================================================
diff -u
--- simulator/plugins/heparin/loader.py (revision 0)
+++ simulator/plugins/heparin/loader.py (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -0,0 +1,97 @@
+"""
+The Heparin ui loader class
+"""
+from runtimewidget import RunTimeWidget
+from PySide2 import QtWidgets
+from PySide2.QtCore import Slot
+from dialin.squish import denaliMessages
+from dialin.squish.denaliMessages import txStates
+
+
+class Heparin(RunTimeWidget):
+ """
+ The Saline Bolus ui loader class
+ """
+
+ btnAccept: QtWidgets.QPushButton
+ btnReject: QtWidgets.QPushButton
+ lblAction: QtWidgets.QLabel
+ spnRejectReason: QtWidgets.QSpinBox
+ cmbAcceptTarget: QtWidgets.QComboBox
+ sldCumulative: QtWidgets.QSlider
+
+ requested_state: txStates
+
+ def __init__(self):
+ super().__init__("plugins/heparin/interface.ui")
+ self.requested_state = txStates.HEPARIN_STATE_PAUSED
+ self.initialize()
+ self.init_widgets()
+ self.init_connections()
+
+ def initialize(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ # saline adjustment
+ self.btnAccept = self.find_button('btnAccept')
+ self.btnReject = self.find_button('btnReject')
+ self.lblAction = self.find_label('lblAction')
+ self.spnRejectReason = self.find_spinbox('spnRejectReason')
+ self.cmbAcceptTarget = self.find_combobox('cmbAcceptTarget')
+ # saline data
+ self.sldCumulative = self.find_slider('sldCumulative')
+
+ def init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ pass
+
+ def init_connections(self):
+ """
+ initializes the widgets connections
+ :return:
+ """
+ # saline adjustment
+ self.btnAccept.clicked.connect(self.do_accept)
+ self.btnReject.clicked.connect(self.do_reject)
+ # saline data
+ self.sldCumulative.valueChanged.connect(self.do_data)
+
+ @Slot()
+ def do_accept(self):
+ """
+ the slot for accept button
+ :return: none
+ """
+ # toggle the requested state
+ if self.requested_state == txStates.HEPARIN_STATE_DISPENSING:
+ self.requested_state = txStates.HEPARIN_STATE_PAUSED
+ else:
+ self.requested_state = txStates.HEPARIN_STATE_DISPENSING
+
+ target = self.cmbAcceptTarget.currentText()
+ denaliMessages.setHeparinResponse(True, 0, self.requested_state)
+ self.lblAction.setText('Accepted ' + target)
+
+ @Slot()
+ def do_reject(self):
+ """
+ the slot for accept saline bolus button
+ :return: none
+ """
+ reason = self.spnRejectReason.value()
+ denaliMessages.setSalineBolusResponse(False, reason, 0, self.requested_state)
+ self.lblAction.setText('Rejected ' + "{}".format(reason))
+
+ @Slot()
+ def do_data(self, value):
+ """
+ the slot which is called to send the data
+ by calling the denaliMessage API setTreatmentHeparinData
+ :return: none
+ """
+ denaliMessages.setTreatmentHeparinData(value)
Fisheye: Tag c13dc6ba2410716a3f1c446e564085aeb9114a60 refers to a dead (removed) revision in file `simulator/plugins/inlinebloodpressures/inlinebloodpressures.py'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag c13dc6ba2410716a3f1c446e564085aeb9114a60 refers to a dead (removed) revision in file `simulator/plugins/inlinebloodpressures/inlinebloodpressures.ui'.
Fisheye: No comparison available. Pass `N' to diff?
Index: simulator/plugins/inlinebloodpressures/interface.ui
===================================================================
diff -u
--- simulator/plugins/inlinebloodpressures/interface.ui (revision 0)
+++ simulator/plugins/inlinebloodpressures/interface.ui (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -0,0 +1,684 @@
+
+
+ ui_inlinebloodpressures
+
+
+
+ 0
+ 0
+ 692
+ 151
+
+
+
+ In-Line Blood Pressures
+
+
+ -
+
+
+
+ 10
+
+
+
+ background-color: rgb(164, 0, 0);
+color: rgb(238, 238, 236);
+
+
+ In-Line Blood Pressures
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ QLayout::SetFixedSize
+
+
-
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ 10
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ Low
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ 10
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ High
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+ Value
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldVenousValue
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ background-color: rgb(229, 156, 156);
+
+
+ Venous Limit (mmHg)
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ High
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ 10
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+ Value
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldArterialValue
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ Low
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ 10
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ background-color: rgb(229, 156, 156);
+
+
+ Arterial Limit (mmHg)
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ QLayout::SetFixedSize
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ background-color: rgb(229, 156, 156);
+
+
+ Adjustment
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Confirm
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Reject
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 0
+
+
+
+
+ 10
+
+
+
+ reason
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Plain
+
+
+
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+ sldArterialValue
+ valueChanged(int)
+ lblArterialValue
+ setNum(int)
+
+
+ 138
+ 122
+
+
+ 214
+ 128
+
+
+
+
+ sldVenousValue
+ valueChanged(int)
+ lblVenousValue
+ setNum(int)
+
+
+ 304
+ 124
+
+
+ 443
+ 127
+
+
+
+
+
Index: simulator/plugins/inlinebloodpressures/loader.py
===================================================================
diff -u
--- simulator/plugins/inlinebloodpressures/loader.py (revision 0)
+++ simulator/plugins/inlinebloodpressures/loader.py (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -0,0 +1,164 @@
+"""
+The In-Line Blood Pressure ui class
+"""
+
+from runtimewidget import RunTimeWidget
+from PySide2 import QtWidgets
+from PySide2.QtCore import QObject, Slot
+from dialin.squish import denaliMessages
+from dialin.squish.denaliMessages import txStates, EResponse
+from dialin.common import Ranges
+
+
+class InlineBloodPressures(RunTimeWidget):
+ """
+ The In-Line Blood Pressure ui class
+ """
+ btnAVPressuresAccept: QtWidgets.QPushButton
+ btnAVPressuresReject: QtWidgets.QPushButton
+
+ lblArterialTitle: QtWidgets.QLabel
+ lblVenousTitle: QtWidgets.QLabel
+ lblAVPressuresAction: QtWidgets.QLabel
+ lblArterialLimitLow: QtWidgets.QLabel
+ lblArterialLimitHigh: QtWidgets.QLabel
+ lblVenousLimitLow: QtWidgets.QLabel
+ lblVenousLimitHigh: QtWidgets.QLabel
+
+ spnAVPressuresRejectReason: QtWidgets.QSpinBox
+ spnArterialLimitLow: QtWidgets.QSpinBox
+ spnArterialLimitHigh: QtWidgets.QSpinBox
+ spnVenousLimitLow: QtWidgets.QSpinBox
+ spnVenousLimitHigh: QtWidgets.QSpinBox
+
+ sldArterialValue: QtWidgets.QSlider
+ sldVenousValue: QtWidgets.QSlider
+
+ def __init__(self):
+ super().__init__("plugins/inlinebloodpressures/interface.ui")
+ self.saline_requested_state = txStates.SALINE_BOLUS_STATE_IDLE
+ self.initialize()
+ self.init_widgets()
+ self.init_connections()
+
+ def initialize(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ 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.btnAVPressuresAccept = self.find_button('btnAVPressuresAccept')
+ self.btnAVPressuresReject = self.find_button('btnAVPressuresReject')
+
+ 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')
+
+ self.sldArterialValue = self.find_slider('sldArterialValue')
+ self.sldVenousValue = self.find_slider('sldVenousValue')
+
+ def init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ self.lblArterialTitle.setText(
+ f"{self.lblArterialTitle.text()} [{Ranges.ARTERIAL_PRESSURE_MINIMUM},{Ranges.ARTERIAL_PRESSURE_MAXIMUM}]"
+ )
+ self.lblVenousTitle.setText(
+ f"{self.lblVenousTitle.text()} [{Ranges.VENOUS_PRESSURE_MINIMUM},{Ranges.VENOUS_PRESSURE_MAXIMUM}]"
+ )
+
+ self.lblArterialLimitLow.setText(f"{Ranges.ARTERIAL_PRESSURE_LOW_MIN}\n{Ranges.ARTERIAL_PRESSURE_LOW_MAX}")
+ self.lblArterialLimitHigh.setText(f"{Ranges.ARTERIAL_PRESSURE_HIGH_MIN}\n{Ranges.ARTERIAL_PRESSURE_HIGH_MAX}")
+ self.lblVenousLimitLow.setText(f"{Ranges.VENOUS_PRESSURE_LOW_MIN}\n{Ranges.VENOUS_PRESSURE_LOW_MAX}")
+ self.lblVenousLimitHigh.setText(f"{Ranges.VENOUS_PRESSURE_HIGH_MIN}\n{Ranges.VENOUS_PRESSURE_HIGH_MAX}")
+
+ self.sldArterialValue.setMinimum(Ranges.ARTERIAL_PRESSURE_MINIMUM)
+ self.sldArterialValue.setMaximum(Ranges.ARTERIAL_PRESSURE_MAXIMUM)
+ self.sldArterialValue.setValue(0)
+ self.sldVenousValue.setMinimum(Ranges.VENOUS_PRESSURE_MINIMUM)
+ self.sldVenousValue.setMaximum(Ranges.VENOUS_PRESSURE_MAXIMUM)
+ self.sldVenousValue.setValue(0)
+
+ self.spnArterialLimitLow.setMinimum(Ranges.ARTERIAL_PRESSURE_LOW_MIN)
+ self.spnArterialLimitLow.setMaximum(Ranges.ARTERIAL_PRESSURE_LOW_MAX)
+ self.spnArterialLimitLow.setValue(Ranges.ARTERIAL_PRESSURE_LOW_DEF)
+
+ self.spnArterialLimitHigh.setMinimum(Ranges.ARTERIAL_PRESSURE_HIGH_MIN)
+ self.spnArterialLimitHigh.setMaximum(Ranges.ARTERIAL_PRESSURE_HIGH_MAX)
+ self.spnArterialLimitHigh.setValue(Ranges.ARTERIAL_PRESSURE_HIGH_DEF)
+
+ self.spnVenousLimitLow.setMinimum(Ranges.VENOUS_PRESSURE_LOW_MIN)
+ self.spnVenousLimitLow.setMaximum(Ranges.VENOUS_PRESSURE_LOW_MAX)
+ self.spnVenousLimitLow.setValue(Ranges.VENOUS_PRESSURE_LOW_DEF)
+
+ self.spnVenousLimitHigh.setMinimum(Ranges.VENOUS_PRESSURE_HIGH_MIN)
+ self.spnVenousLimitHigh.setMaximum(Ranges.VENOUS_PRESSURE_HIGH_MAX)
+ self.spnVenousLimitHigh.setValue(Ranges.VENOUS_PRESSURE_HIGH_DEF)
+
+ def init_connections(self):
+ """
+ initializes the widgets connections
+ :return: none
+ """
+ # sending the CANBus message when slider value changed
+ self.sldArterialValue.valueChanged.connect(self.do_pressures_data)
+ self.sldVenousValue.valueChanged.connect(self.do_pressures_data)
+
+ # 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)
+
+ @Slot()
+ def do_pressures_data(self):
+ """
+ sends the pressures values message with given value on the screen
+ :return: none
+ """
+ denaliMessages.setPressureOcclusionData(
+ 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))
Index: simulator/plugins/salinebolus/interface.ui
===================================================================
diff -u
--- simulator/plugins/salinebolus/interface.ui (revision 0)
+++ simulator/plugins/salinebolus/interface.ui (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -0,0 +1,650 @@
+
+
+ ui_salinebolus
+
+
+
+ 0
+ 0
+ 493
+ 317
+
+
+
+ Saline Bolus
+
+
+ -
+
+
-
+
+
-
+
+
+
+ 10
+
+
+
+ Accept
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ background-color: rgb(233, 185, 110);
+
+
+ Saline Bolus Adjustment
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 0
+
+
+
+
+ 10
+
+
+
+ mL
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
-
+
+ 100
+
+
+ -
+
+ 200
+
+
+ -
+
+ 300
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 0
+
+
+
+
+ 10
+
+
+
+ reason
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Plain
+
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Reject
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 75
+ 0
+
+
+
+
+ 10
+
+
+
+ Cumulative
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldSalineCumulative
+
+
+
+ -
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ background-color: rgb(233, 185, 110);
+
+
+ Saline Bolus Data
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Max
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Max
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Volume
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldSalineVolume
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 300
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 75
+ 0
+
+
+
+
+ 10
+
+
+
+ Target
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ sldSalineTarget
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Max
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 1000
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 300
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 300
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 300
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 1000
+
+
+ Qt::Horizontal
+
+
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ background-color: rgb(193, 125, 17);
+color: rgb(238, 238, 236);
+
+
+ Saline Bolus
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+ sldSalineTarget
+ valueChanged(int)
+ lblSalineTarget
+ setNum(int)
+
+
+ 433
+ 198
+
+
+ 474
+ 200
+
+
+
+
+ sldSalineVolume
+ valueChanged(int)
+ lblSalineVolume
+ setNum(int)
+
+
+ 398
+ 247
+
+
+ 476
+ 245
+
+
+
+
+ sldSalineCumulative
+ valueChanged(int)
+ lblSalineCumulative
+ setNum(int)
+
+
+ 392
+ 293
+
+
+ 472
+ 294
+
+
+
+
+
Index: simulator/plugins/salinebolus/loader.py
===================================================================
diff -u
--- simulator/plugins/salinebolus/loader.py (revision 0)
+++ simulator/plugins/salinebolus/loader.py (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -0,0 +1,106 @@
+"""
+The Saline Bolus ui loader class
+"""
+from runtimewidget import RunTimeWidget
+from PySide2 import QtWidgets
+from PySide2.QtCore import Slot
+from dialin.squish import denaliMessages
+from dialin.squish.denaliMessages import txStates, EResponse
+
+
+class SalineBolus(RunTimeWidget):
+ """
+ The Saline Bolus ui loader class
+ """
+
+ btnSalineAccept: QtWidgets.QPushButton
+ btnSalineReject: QtWidgets.QPushButton
+ lblSalineAction: QtWidgets.QLabel
+ spnSalineRejectReason: QtWidgets.QSpinBox
+ cmbSalineAcceptTarget: QtWidgets.QComboBox
+ sldSalineTarget: QtWidgets.QSlider
+ sldSalineCumulative: QtWidgets.QSlider
+ sldSalineVolume: QtWidgets.QSlider
+
+ saline_requested_state: txStates
+
+ def __init__(self):
+ super().__init__("plugins/salinebolus/interface.ui")
+ self.saline_requested_state = txStates.SALINE_BOLUS_STATE_IDLE
+ self.initialize()
+ self.init_widgets()
+ self.init_connections()
+
+ def initialize(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ # saline adjustment
+ self.btnSalineAccept = self.find_button('btnSalineAccept')
+ self.btnSalineReject = self.find_button('btnSalineReject')
+ self.lblSalineAction = self.find_label('lblSalineAction')
+ self.spnSalineRejectReason = self.find_spinbox('spnSalineRejectReason')
+ self.cmbSalineAcceptTarget = self.find_combobox('cmbSalineAcceptTarget')
+ # saline data
+ self.sldSalineTarget = self.find_slider('sldSalineTarget')
+ self.sldSalineCumulative = self.find_slider('sldSalineCumulative')
+ self.sldSalineVolume = self.find_slider('sldSalineVolume')
+
+ def init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ pass
+
+ def init_connections(self):
+ """
+ initializes the widgets connections
+ :return:
+ """
+ # saline adjustment
+ self.btnSalineAccept.clicked.connect(self.do_sb_accept)
+ self.btnSalineReject.clicked.connect(self.do_sb_reject)
+ # saline data
+ self.sldSalineTarget.valueChanged.connect(self.do_saline_data)
+ self.sldSalineCumulative.valueChanged.connect(self.do_saline_data)
+ self.sldSalineVolume.valueChanged.connect(self.do_saline_data)
+
+ @Slot()
+ def do_sb_accept(self):
+ """
+ the slot for accept saline bolus button
+ :return: none
+ """
+ # toggle the saline requested state
+ if self.saline_requested_state == txStates.SALINE_BOLUS_STATE_IN_PROGRESS:
+ self.saline_requested_state = txStates.SALINE_BOLUS_STATE_IDLE
+ else:
+ self.saline_requested_state = txStates.SALINE_BOLUS_STATE_IN_PROGRESS
+
+ target = self.cmbSalineAcceptTarget.currentText()
+ denaliMessages.setSalineBolusResponse(True, 0, target, self.saline_requested_state)
+ self.lblSalineAction.setText('Accepted ' + target)
+
+ @Slot()
+ def do_sb_reject(self):
+ """
+ the slot for accept saline bolus button
+ :return: none
+ """
+ reason = self.spnSalineRejectReason.value()
+ denaliMessages.setSalineBolusResponse(False, reason, 0, self.saline_requested_state)
+ self.lblSalineAction.setText('Rejected ' + "{}".format(reason))
+
+
+ @Slot()
+ def do_saline_data(self):
+ """
+ the slot which is called to send the saline bolus data
+ by calling the denaliMessage API setTreatmentSalineBolusData
+ :return: none
+ """
+ denaliMessages.setTreatmentSalineBolusData(self.sldSalineTarget.value(),
+ self.sldSalineCumulative.value(),
+ self.sldSalineVolume.value())
Fisheye: Tag c13dc6ba2410716a3f1c446e564085aeb9114a60 refers to a dead (removed) revision in file `simulator/plugins/salinebolus/salinebolus.py'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag c13dc6ba2410716a3f1c446e564085aeb9114a60 refers to a dead (removed) revision in file `simulator/plugins/salinebolus/salinebolus.ui'.
Fisheye: No comparison available. Pass `N' to diff?
Index: simulator/plugins/treatmentranges/interface.ui
===================================================================
diff -u
--- simulator/plugins/treatmentranges/interface.ui (revision 0)
+++ simulator/plugins/treatmentranges/interface.ui (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -0,0 +1,727 @@
+
+
+ ui_treatmentranges
+
+
+
+ 0
+ 0
+ 658
+ 174
+
+
+
+ Ranges
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Turn Treatment ranges broadcast message Automatic send Off/On
+
+
+ Broad cast
+
+
+ true
+
+
+
+ -
+
+
-
+
+
+
+ 10
+
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
-
+
+
+
+ 10
+
+
+
+ background-color: rgb(173, 127, 168);
+
+
+ Ultrafiltration (mL)
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ 8000
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ 8000
+
+
+ 8000
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Min
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ spnUFVolumeMin
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Max
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ spnUFVolumeMax
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 8000
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ Value
+
+
+ horizontalSlider_2
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ 100
+
+
+ 600
+
+
+ 50
+
+
+ 600
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Max
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ spnDialysateMax
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ background-color: rgb(173, 127, 168);
+
+
+ Dialysate (mL/min)
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 600
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 100
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ 100
+
+
+ 600
+
+
+ 50
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Min
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ spnDialysateMin
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ Value
+
+
+ horizontalSlider_3
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ 480
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ background-color: rgb(173, 127, 168);
+
+
+ Duration (min)
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ 480
+
+
+ 480
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Max
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ spnDurationMax
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 480
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Min
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ spnDurationMin
+
+
+
+ -
+
+
+ 480
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+ Value
+
+
+ sldDurationValue
+
+
+
+ -
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Qt::Vertical
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ background-color: rgb(117, 80, 123);
+color: rgb(238, 238, 236);
+
+
+ Treatment Ranges
+
+
+ Qt::AlignCenter
+
+
+
+
+
+
+
+
+ sldDurationValue
+ valueChanged(int)
+ label_18
+ setNum(int)
+
+
+ 143
+ 125
+
+
+ 191
+ 130
+
+
+
+
+ horizontalSlider_2
+ valueChanged(int)
+ label
+ setNum(int)
+
+
+ 352
+ 128
+
+
+ 404
+ 125
+
+
+
+
+ horizontalSlider_3
+ valueChanged(int)
+ label_2
+ setNum(int)
+
+
+ 564
+ 130
+
+
+ 636
+ 130
+
+
+
+
+
Index: simulator/plugins/treatmentranges/loader.py
===================================================================
diff -u
--- simulator/plugins/treatmentranges/loader.py (revision 0)
+++ simulator/plugins/treatmentranges/loader.py (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -0,0 +1,90 @@
+"""
+ The Treatment Ranges ui loader
+"""
+from runtimewidget import RunTimeWidget
+from PySide2 import QtWidgets
+from PySide2.QtCore import QTimer
+from PySide2.QtCore import Slot
+from dialin.squish import denaliMessages
+from dialin.squish.denaliMessages import txStates, EResponse
+
+
+class TreatmentRanges(RunTimeWidget):
+ """
+ The Treatment Ranges ui loader
+ """
+ timer: QTimer
+
+ chkRangesBroadcast: QtWidgets.QCheckBox
+ spnDurationMin: QtWidgets.QSpinBox
+ spnDurationMax: QtWidgets.QSpinBox
+ spnDialysateMin: QtWidgets.QSpinBox
+ spnDialysateMax: QtWidgets.QSpinBox
+ spnUFVolumeMin: QtWidgets.QSpinBox
+ spnUFVolumeMax: QtWidgets.QSpinBox
+ sldDurationValue: QtWidgets.QSlider
+
+ def __init__(self):
+ super().__init__("plugins/treatmentranges/interface.ui")
+ self.initialize()
+ self.init_widgets()
+ self.init_connections()
+
+ def initialize(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ self.spnDurationMin = self.find_spinbox('spnDurationMin')
+ self.spnDurationMax = self.find_spinbox('spnDurationMax')
+ self.sldDurationValue = self.find_slider('sldDurationValue')
+ self.spnUFVolumeMin = self.find_spinbox('spnUFVolumeMin')
+ self.spnUFVolumeMax = self.find_spinbox('spnUFVolumeMax')
+ self.spnDialysateMin = self.find_spinbox('spnDialysateMin')
+ self.spnDialysateMax = self.find_spinbox('spnDialysateMax')
+ self.chkRangesBroadcast = self.find_checkbox('chkRangesBroadcast')
+
+ def init_connections(self):
+ """
+ initializes the widgets connections
+ :return: none
+ """
+ self.timer.timeout.connect(self.do_ranges_data)
+ self.sldDurationValue.valueChanged.connect(self.do_duration_data)
+
+ def init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ self.timer = QTimer()
+ self.timer.start(1000)
+
+ @Slot()
+ def do_duration_data(self, value):
+ """
+ sends the duration message
+ :return: none
+ """
+ denaliMessages.setTreatmentTime(self.spnDurationMax.value() * 60, value)
+
+ @Slot()
+ def do_ranges_data(self):
+ """
+ sends the treatment ranges message with given value on the screen
+ :return: none
+ """
+ if self.chkRangesBroadcast.isChecked():
+ duration_min = self.spnDurationMin.value()
+ duration_max = self.spnDurationMax.value()
+ self.sldDurationValue.setMinimum(duration_min * 60)
+ self.sldDurationValue.setMaximum(duration_max * 60)
+
+ denaliMessages.setTreatmentParamRanges(
+ duration_min,
+ duration_max,
+ self.spnUFVolumeMin.value(),
+ self.spnUFVolumeMax.value(),
+ self.spnDialysateMin.value(),
+ self.spnDialysateMax.value()
+ )
Fisheye: Tag c13dc6ba2410716a3f1c446e564085aeb9114a60 refers to a dead (removed) revision in file `simulator/plugins/treatmentranges/treatmentranges.py'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag c13dc6ba2410716a3f1c446e564085aeb9114a60 refers to a dead (removed) revision in file `simulator/plugins/treatmentranges/treatmentranges.ui'.
Fisheye: No comparison available. Pass `N' to diff?
Index: simulator/plugins/treatmentstates/interface.ui
===================================================================
diff -u
--- simulator/plugins/treatmentstates/interface.ui (revision 0)
+++ simulator/plugins/treatmentstates/interface.ui (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -0,0 +1,464 @@
+
+
+ ui_treatmentstates
+
+
+
+ 0
+ 0
+ 674
+ 466
+
+
+
+ States
+
+
+ -
+
+
+
+ 10
+
+
+
+ background-color: rgb(245, 121, 0);
+color: rgb(238, 238, 236);
+
+
+ Treatment States
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 325
+ 265
+
+
+
+
+ 8
+
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+ QAbstractItemView::SingleSelection
+
+
+ QAbstractItemView::SelectRows
+
+
+ true
+
+
+ 300
+
+
+ true
+
+
+ 18
+
+
+ 21
+
+
+
+ 0
+
+
+
+
+ 1
+
+
+
+
+ 2
+
+
+
+
+ 3
+
+
+
+
+ 4
+
+
+
+
+ 5
+
+
+
+
+ 6
+
+
+
+
+ 7
+
+
+
+
+ 8
+
+
+
+
+ 9
+
+
+
+
+ 10
+
+
+
+
+ Treatment States (subMode)
+
+
+ -
+
+ TREATMENT_START_STATE
+
+
+ -
+
+ TREATMENT_DIALYSIS_STATE
+
+
+ -
+
+ TREATMENT_STOP_STATE
+
+
+ -
+
+ TREATMENT_RINSEBACK_STATE
+
+
+ -
+
+ TREATMENT_RINSEBACK_PAUSE_STATE
+
+
+ -
+
+ TREATMENT_RECIRC_SETUP_STATE
+
+
+ -
+
+ TREATMENT_RECIRC_STATE
+
+
+ -
+
+ TREATMENT_RECIRC_PAUSE_STATE
+
+
+ -
+
+ TREATMENT_RECIRC_STOP_STATE
+
+
+ -
+
+ TREATMENT_DIALYSIS_END_STATE
+
+
+ -
+
+ TREATMENT_END_STATE
+
+
+
+
+ -
+
+
+
+ 325
+ 225
+
+
+
+
+ 8
+
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+ QAbstractItemView::SingleSelection
+
+
+ QAbstractItemView::SelectRows
+
+
+ true
+
+
+ 300
+
+
+ 21
+
+
+
+ 0
+
+
+
+
+ 1
+
+
+
+
+ 2
+
+
+
+
+ 3
+
+
+
+
+ 4
+
+
+
+
+ UF States
+
+
+ -
+
+ UF_START_STATE
+
+
+ -
+
+ UF_PAUSED_STATE
+
+
+ -
+
+ UF_RUNNING_STATE
+
+
+ -
+
+ UF_OFF_STATE
+
+
+ -
+
+ UF_COMPLETED_STATE
+
+
+
+
+ -
+
+
+
+ 310
+ 100
+
+
+
+
+ 8
+
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+ QAbstractItemView::SingleSelection
+
+
+ QAbstractItemView::SelectRows
+
+
+ true
+
+
+ 300
+
+
+ 21
+
+
+
+ 0
+
+
+
+
+ 1
+
+
+
+
+ 2
+
+
+
+
+ 3
+
+
+
+
+ Saline States
+
+
+ -
+
+ SALINE_BOLUS_STATE_IDLE
+
+
+ ItemIsSelectable|ItemIsEnabled
+
+
+ -
+
+ SALINE_BOLUS_STATE_WAIT_FOR_PUMPS_STOP
+
+
+ -
+
+ SALINE_BOLUS_STATE_IN_PROGRESS
+
+
+ -
+
+ SALINE_BOLUS_STATE_MAX_DELIVERED
+
+
+
+
+ -
+
+
+
+ 325
+ 155
+
+
+
+
+ 8
+
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+ QAbstractItemView::SingleSelection
+
+
+ QAbstractItemView::SelectRows
+
+
+ true
+
+
+ 300
+
+
+ 21
+
+
+
+ 0
+
+
+
+
+ 1
+
+
+
+
+ 2
+
+
+
+
+ 3
+
+
+
+
+ 4
+
+
+
+
+ 5
+
+
+
+
+ Heparin States
+
+
+ -
+
+ HEPARIN_STATE_OFF
+
+
+ ItemIsSelectable|ItemIsEnabled
+
+
+ -
+
+ HEPARIN_STATE_PAUSED
+
+
+ -
+
+ HEPARIN_STATE_INITIAL_BOLUS
+
+
+ -
+
+ HEPARIN_STATE_DISPENSING
+
+
+ -
+
+ HEPARIN_STATE_COMPLETED
+
+
+ -
+
+ HEPARIN_STATE_EMPTY
+
+
+
+
+
+
+
+
+
Index: simulator/plugins/treatmentstates/loader.py
===================================================================
diff -u
--- simulator/plugins/treatmentstates/loader.py (revision 0)
+++ simulator/plugins/treatmentstates/loader.py (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -0,0 +1,69 @@
+"""
+ The Ultrafiltration ui loader
+"""
+from runtimewidget import RunTimeWidget
+from PySide2 import QtWidgets
+from PySide2.QtCore import Slot
+from dialin.squish import denaliMessages
+from dialin.squish.denaliMessages import txStates, EResponse
+
+
+class TreatmentStates(RunTimeWidget):
+ """
+ The Ultrafiltration ui loader
+ """
+ tblSubMode: QtWidgets.QTableWidget
+ tblUFStates: QtWidgets.QTableWidget
+ tblSalineStates: QtWidgets.QTableWidget
+ tblHeparinStates: QtWidgets.QTableWidget
+
+ def __init__(self):
+ super().__init__("plugins/treatmentstates/interface.ui")
+ self.initialize()
+ self.init_widgets()
+ self.init_connections()
+
+ # apply/send the initial states
+ self.do_treatment_states()
+
+ def initialize(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ self.tblSubMode = self.find_table_widget('tblSubMode')
+ self.tblUFStates = self.find_table_widget('tblUFStates')
+ self.tblSalineStates = self.find_table_widget('tblSalineStates')
+ self.tblHeparinStates = self.find_table_widget('tblHeparinStates')
+
+ def init_connections(self):
+ """
+ initializes the widgets connections
+ :return: none
+ """
+ self.tblSubMode.cellClicked.connect(self.do_treatment_states)
+ self.tblUFStates.cellClicked.connect(self.do_treatment_states)
+ self.tblSalineStates.cellClicked.connect(self.do_treatment_states)
+ self.tblHeparinStates.cellClicked.connect(self.do_treatment_states)
+
+ def init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ self.tblSubMode.setCurrentCell(txStates.TREATMENT_DIALYSIS_STATE, 0)
+ self.tblUFStates.setCurrentCell(txStates.UF_OFF_STATE, 0)
+ self.tblSalineStates.setCurrentCell(txStates.SALINE_BOLUS_STATE_IDLE, 0)
+ self.tblHeparinStates.setCurrentCell(txStates.HEPARIN_STATE_OFF, 0)
+
+ @Slot()
+ def do_treatment_states(self):
+ """
+ the slot for saline bolus state change
+ :return: none
+ """
+ sub_mode = self.tblSubMode.verticalHeaderItem(self.tblSubMode.currentRow()).text()
+ uf_state = self.tblUFStates.verticalHeaderItem(self.tblUFStates.currentRow()).text()
+ saline = self.tblSalineStates.verticalHeaderItem(self.tblSalineStates.currentRow()).text()
+ heparin = self.tblHeparinStates.verticalHeaderItem(self.tblHeparinStates.currentRow()).text()
+ denaliMessages.setTreatmentStatesData(sub_mode, uf_state, saline, heparin)
Fisheye: Tag c13dc6ba2410716a3f1c446e564085aeb9114a60 refers to a dead (removed) revision in file `simulator/plugins/treatmentstates/treatmentstates.py'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag c13dc6ba2410716a3f1c446e564085aeb9114a60 refers to a dead (removed) revision in file `simulator/plugins/treatmentstates/treatmentstates.ui'.
Fisheye: No comparison available. Pass `N' to diff?
Index: simulator/plugins/ultrafiltration/interface.ui
===================================================================
diff -u
--- simulator/plugins/ultrafiltration/interface.ui (revision 0)
+++ simulator/plugins/ultrafiltration/interface.ui (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -0,0 +1,748 @@
+
+
+ ui_ultrafiltration
+
+
+
+ 0
+ 0
+ 960
+ 344
+
+
+
+ Ultrafiltration
+
+
+ -
+
+
-
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Plain
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 0
+
+
+
+
+ 10
+
+
+
+ reason
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ background-color: rgb(114, 159, 207);
+
+
+ UF Resume
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Resume
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Reject
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 10
+
+
+
+ Reject
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ background-color: rgb(114, 159, 207);
+
+
+ UF Pause
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Plain
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 0
+
+
+
+
+ 10
+
+
+
+ reason
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Pause
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 0
+
+
+
+
+ 10
+
+
+
+ reason
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ background-color: rgb(114, 159, 207);
+
+
+ UF Edit Volume
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Reject
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Plain
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Next
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
-
+
+
+
+ 10
+
+
+
+ Confirm
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 0
+
+
+
+
+ 10
+
+
+
+ reason
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ background-color: rgb(114, 159, 207);
+
+
+ UF Confirm Volume
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Reject
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Duration
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Plain
+
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Rate
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ background-color: rgb(114, 159, 207);
+
+
+ UF delivered Volume
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Max
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 8000
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 8000
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Volume
+
+
+ Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft
+
+
+ sldUfVolume
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ background-color: rgb(52, 101, 164);
+color: rgb(238, 238, 236);
+
+
+ Ultrafiltration
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+
+
+ sldUfVolume
+ valueChanged(int)
+ lblSalineTarget_2
+ setNum(int)
+
+
+ 830
+ 316
+
+
+ 944
+ 325
+
+
+
+
+
Index: simulator/plugins/ultrafiltration/loader.py
===================================================================
diff -u
--- simulator/plugins/ultrafiltration/loader.py (revision 0)
+++ simulator/plugins/ultrafiltration/loader.py (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -0,0 +1,148 @@
+"""
+ The Ultrafiltration ui loader
+"""
+from runtimewidget import RunTimeWidget
+from PySide2 import QtWidgets
+from PySide2.QtCore import Slot
+from dialin.squish import denaliMessages
+from dialin.squish.denaliMessages import txStates, EResponse
+
+
+class Ultrafiltration(RunTimeWidget):
+ """
+ The Ultrafiltration ui loader
+ """
+
+ # components
+ btnUfPauseAccept: QtWidgets.QPushButton
+ btnUfPauseReject: QtWidgets.QPushButton
+ btnUfResumeAccept: QtWidgets.QPushButton
+ btnUfResumeReject: QtWidgets.QPushButton
+ btnUfEditAccept: QtWidgets.QPushButton
+ btnUfEditReject: QtWidgets.QPushButton
+
+ lblUfPauseAction: QtWidgets.QLabel
+ lblUfResumeAction: QtWidgets.QLabel
+ lblUfEditAction: QtWidgets.QLabel
+
+ spnUfPauseRejectReason: QtWidgets.QSpinBox
+ spnUfEditRejectReason: QtWidgets.QSpinBox
+ spnUfResumeRejectReason: QtWidgets.QSpinBox
+ sldUfVolume: QtWidgets.QSlider
+
+ def __init__(self):
+ super().__init__("plugins/ultrafiltration/interface.ui")
+ self.initialize()
+ self.init_widgets()
+ self.init_connections()
+
+ def initialize(self):
+ """
+ finds and creates widgets
+ :return: none
+ """
+ self.btnUfPauseAccept = self.find_button('btnUfPauseAccept')
+ self.btnUfPauseReject = self.find_button('btnUfPauseReject')
+ self.btnUfResumeAccept = self.find_button('btnUfResumeAccept')
+ self.btnUfResumeReject = self.find_button('btnUfResumeReject')
+ self.btnUfEditAccept = self.find_button('btnUfEditAccept')
+ self.btnUfEditReject = self.find_button('btnUfEditReject')
+ self.lblUfPauseAction = self.find_label('lblUfPauseAction')
+ self.lblUfResumeAction = self.find_label('lblUfResumeAction')
+ self.lblUfEditAction = self.find_label('lblUfEditAction')
+ self.spnUfPauseRejectReason = self.find_spinbox('spnUfPauseRejectReason')
+ self.spnUfResumeRejectReason = self.find_spinbox('spnUfResumeRejectReason')
+ self.spnUfEditRejectReason = self.find_spinbox('spnUfEditRejectReason')
+ self.sldUfVolume = self.find_slider('sldUfVolume')
+
+ def init_widgets(self):
+ """
+ initializes the widgets' properties
+ :return: none
+ """
+ pass
+
+ def init_connections(self):
+ """
+ initializes the widgets connections
+ :return: none
+ """
+ self.btnUfPauseAccept.clicked.connect(self.do_uf_pause_accept)
+ self.btnUfPauseReject.clicked.connect(self.do_uf_pause_reject)
+ self.btnUfResumeAccept.clicked.connect(self.do_uf_resume_accept)
+ self.btnUfResumeReject.clicked.connect(self.do_uf_resume_reject)
+ self.btnUfEditAccept.clicked.connect(self.do_uf_edit_accept)
+ self.btnUfEditReject.clicked.connect(self.do_uf_edit_reject)
+ self.sldUfVolume.valueChanged.connect(self.do_uf_volume_data)
+
+ @Slot()
+ def do_uf_pause_accept(self):
+ """
+ the slot for accept ultrafiltration pause button
+ :return: none
+ """
+ denaliMessages.setTreatmentAdjustUltrafiltrationStateResponse(
+ EResponse.Accepted, 0, txStates.UF_PAUSED_STATE)
+ self.lblUfPauseAction.setText('Accepted ')
+
+ @Slot()
+ def do_uf_pause_reject(self):
+ """
+ the slot for reject ultrafiltration pause button
+ :return: none
+ """
+ reason = self.spnUfPauseRejectReason.value()
+ denaliMessages.setTreatmentAdjustUltrafiltrationStateResponse(
+ EResponse.Rejected, reason, txStates.UF_RUNNING_STATE)
+ self.lblUfPauseAction.setText('Rejected ' + "{}".format(reason))
+
+ @Slot()
+ def do_uf_resume_accept(self):
+ """
+ the slot for accept ultrafiltration resume accept
+ :return: none
+ """
+ denaliMessages.setTreatmentAdjustUltrafiltrationStateResponse(
+ EResponse.Accepted, 0, txStates.UF_RUNNING_STATE)
+ self.lblUfResumeAction.setText('Accepted ')
+
+ @Slot()
+ def do_uf_resume_reject(self):
+ """
+ the slot for reject ultrafiltration resume button
+ :return: none
+ """
+ reason = self.spnUfResumeRejectReason.value()
+ denaliMessages.setTreatmentAdjustUltrafiltrationStateResponse(
+ EResponse.Rejected, reason, txStates.UF_PAUSED_STATE)
+ self.lblUfResumeAction.setText('Rejected ' + "{}".format(reason))
+
+ @Slot()
+ def do_uf_edit_accept(self):
+ """
+ the slot for accept ultrafiltration next button
+ :return: none
+ """
+ denaliMessages.setTreatmentAdjustUltrafiltrationEditResponse(
+ EResponse.Accepted, 0, 2500, 60, 0, 10, 0, 10)
+ self.lblUfEditAction.setText('Accepted ')
+
+ @Slot()
+ def do_uf_edit_reject(self):
+ """
+ the slot for reject ultrafiltration next button
+ :return: none
+ """
+ reason = self.spnUfEditRejectReason.value()
+ denaliMessages.setTreatmentAdjustUltrafiltrationEditResponse(
+ EResponse.Rejected, reason, 2500, 60, 0, 10, 0, 10)
+ self.lblUfEditAction.setText('Rejected ' + "{}".format(reason))
+
+ @Slot()
+ def do_uf_volume_data(self):
+ """
+ sends the ultrafiltration delivered volume message
+ :return: none
+ """
+ denaliMessages.setTreatmentUltrafiltration(self.sldUfVolume.value(), 0, 0, 0, 0, 0, 0)
+
Fisheye: Tag c13dc6ba2410716a3f1c446e564085aeb9114a60 refers to a dead (removed) revision in file `simulator/plugins/ultrafiltration/ultrafiltration.py'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag c13dc6ba2410716a3f1c446e564085aeb9114a60 refers to a dead (removed) revision in file `simulator/plugins/ultrafiltration/ultrafiltration.ui'.
Fisheye: No comparison available. Pass `N' to diff?
Index: simulator/run.py
===================================================================
diff -u -r057afac3dea8ab1243550d0e36cd3ec6eacb993f -rc13dc6ba2410716a3f1c446e564085aeb9114a60
--- simulator/run.py (.../run.py) (revision 057afac3dea8ab1243550d0e36cd3ec6eacb993f)
+++ simulator/run.py (.../run.py) (revision c13dc6ba2410716a3f1c446e564085aeb9114a60)
@@ -3,30 +3,24 @@
# import project classes
# import names
-from dialin.squish import utils, denaliMessages
+from dialin.squish import utils
from dialin.squish.denaliMessages import txStates
# Import PySide2 classes
from PySide2 import QtCore, QtWidgets
from PySide2.QtCore import Qt
from runtimewidget import RunTimeWidget
+# later it's planed to load all the classes in plugin folder dynamically
+# so used * in here to load all
+from plugins import *
-from plugins.ultrafiltration.ultrafiltration import Ultrafiltration
-from plugins.inlinebloodpressures.inlinebloodpressures import InlineBloodPressures
-from plugins.salinebolus.salinebolus import SalineBolus
-from plugins.treatmentstates.treatmentstates import TreatmentStates
-from plugins.treatmentranges.treatmentranges import TreatmentRanges
-from plugins.heparin.heparin import Heparin
-
class Simulator(RunTimeWidget):
"""
The simulator class which loads the ui file dynamically and initializes the objects
and can be eventually shown.
Note: this class is growing fast and seems like needs to be multiple classes
"""
- # global variables declarations
-
mdiArea: QtWidgets.QMdiArea
obj_ultrafiltration: Ultrafiltration
@@ -112,24 +106,10 @@
self.wgt_heparin = self.obj_heparin.window
self.sub_heparin = self.mdiArea.addSubWindow(self.wgt_heparin)
- self.sub_ultrafiltration.setWindowFlags(Qt.WindowMinimizeButtonHint)
- self.sub_ultrafiltration.setVisible(False)
+ for sub in self.mdiArea.subWindowList():
+ sub.setWindowFlags(Qt.WindowMinimizeButtonHint | Qt.WindowTitleHint)
+ sub.setVisible(False)
- self.sub_inlinebloodpressures.setWindowFlags(Qt.WindowMinimizeButtonHint)
- self.sub_inlinebloodpressures.setVisible(False)
-
- self.sub_salinebolus.setWindowFlags(Qt.WindowMinimizeButtonHint)
- self.sub_salinebolus.setVisible(False)
-
- self.sub_treatmentstates.setWindowFlags(Qt.WindowMinimizeButtonHint)
- self.sub_treatmentstates.setVisible(False)
-
- self.sub_treatmentranges.setWindowFlags(Qt.WindowMinimizeButtonHint)
- self.sub_treatmentranges.setVisible(False)
-
- self.sub_heparin.setWindowFlags(Qt.WindowMinimizeButtonHint)
- self.sub_heparin.setVisible(False)
-
def init_connections(self):
"""
initializes the widgets connections