Index: simulator/plugins/createtreatment/interface.ui
===================================================================
diff -u -r15118be5139122e2129f00482d173d58503b338e -rdb5d7914d3c89371d7ce7e79dcd78626d1f06ee8
--- simulator/plugins/createtreatment/interface.ui (.../interface.ui) (revision 15118be5139122e2129f00482d173d58503b338e)
+++ simulator/plugins/createtreatment/interface.ui (.../interface.ui) (revision db5d7914d3c89371d7ce7e79dcd78626d1f06ee8)
@@ -6,51 +6,20 @@
0
0
- 295
- 115
+ 770
+ 240
-
-
- 295
- 115
-
-
-
-
- 295
- 115
-
-
Create Treatment
- -
-
-
-
- 10
-
-
-
- color: rgb(238, 238, 236);
-background-color: rgb(78, 154, 6);
-
-
- Create Treatment
-
-
- Qt::AlignCenter
-
-
-
-
-
-
-
+
-
+
-
+
0
0
@@ -60,52 +29,114 @@
10
-
- QFrame::StyledPanel
+
+
+ -
+
+
+
+ 10
+
-
- QFrame::Plain
-
-
+ Accept
- -
-
+
-
+
-
+
0
0
+
+
+ 50
+ 0
+
+
10
+
+ reason
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
- -
-
+
-
+
10
- Accept
+ Reject
- -
-
+
-
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(115, 210, 22);
+
+
+ Create/Start
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
0
0
+
+
+ 10
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Plain
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
50
@@ -125,8 +156,8 @@
- -
-
+
-
+
10
@@ -137,8 +168,80 @@
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Volume
+
+
+ Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing
+
+
+ sldUFVolume
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ Start
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ Max
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
-
-
+
10
@@ -149,17 +252,167 @@
background-color: rgb(115, 210, 22);
- Begin
+ Ultrafiltration
Qt::AlignCenter
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 8000
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ 8000
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 0
+
+
+
+
+ 10
+
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Plain
+
+
+
+
+
+
+ -
+
+
+
+ 10
+
+
+
+ color: rgb(238, 238, 236);
+background-color: rgb(78, 154, 6);
+
+
+ Create Treatment
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+ btnCreateAccept
+ btnCreateReject
+ spnCreateRejectReason
+ btnUFVolumeAccept
+ btnUFVolumeReject
+ spnUFVolumeRejectReason
+
-
+
+
+ sldUFVolume
+ valueChanged(int)
+ lblUFVolumeTarget
+ setNum(int)
+
+
+ 684
+ 191
+
+
+ 733
+ 193
+
+
+
+
Index: simulator/plugins/createtreatment/loader.py
===================================================================
diff -u -rf921975179b1c1ad61d841b9db5976c00432fdcc -rdb5d7914d3c89371d7ce7e79dcd78626d1f06ee8
--- simulator/plugins/createtreatment/loader.py (.../loader.py) (revision f921975179b1c1ad61d841b9db5976c00432fdcc)
+++ simulator/plugins/createtreatment/loader.py (.../loader.py) (revision db5d7914d3c89371d7ce7e79dcd78626d1f06ee8)
@@ -13,11 +13,17 @@
The Saline Bolus ui loader class
"""
- btnAccept: QtWidgets.QPushButton
- btnReject: QtWidgets.QPushButton
- lblAction: QtWidgets.QLabel
- spnRejectReason: QtWidgets.QSpinBox
+ btnCreateAccept: QtWidgets.QPushButton
+ btnCreateReject: QtWidgets.QPushButton
+ lblCreateAction: QtWidgets.QLabel
+ spnCreateRejectReason: QtWidgets.QSpinBox
+ btnUFVolumeAccept: QtWidgets.QPushButton
+ btnUFVolumeReject: QtWidgets.QPushButton
+ lblUFVolumeAction: QtWidgets.QLabel
+ spnUFVolumeRejectReason: QtWidgets.QSpinBox
+ sldUFVolume: QtWidgets.QSlider
+
def __init__(self):
super().__init__(os.path.dirname(__file__))
@@ -27,11 +33,17 @@
: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.btnCreateAccept = self.find_button('btnCreateAccept')
+ self.btnCreateReject = self.find_button('btnCreateReject')
+ self.lblCreateAction = self.find_label('lblCreateAction')
+ self.spnCreateRejectReason = self.find_spinbox('spnCreateRejectReason')
+ self.btnUFVolumeAccept = self.find_button('btnUFVolumeAccept')
+ self.btnUFVolumeReject = self.find_button('btnUFVolumeReject')
+ self.lblUFVolumeAction = self.find_label('lblUFVolumeAction')
+ self.spnUFVolumeRejectReason = self.find_spinbox('spnUFVolumeRejectReason')
+ self.sldUFVolume = self.find_slider('sldUFVolume')
+
def _init_widgets(self):
"""
initializes the widgets' properties
@@ -44,29 +56,52 @@
initializes the widgets connections
:return:
"""
- self.btnAccept.clicked.connect(self.do_accept)
- self.btnReject.clicked.connect(self.do_reject)
+ self.btnCreateAccept.clicked.connect(self.do_create_accept)
+ self.btnCreateReject.clicked.connect(self.do_create_reject)
+ self.btnUFVolumeAccept.clicked.connect(self.do_uf_volume_accept)
+ self.btnUFVolumeReject.clicked.connect(self.do_uf_volume_reject)
@Slot()
- def do_accept(self):
+ def do_create_accept(self):
"""
the slot for accept button
:return: none
"""
self.hd_simulator.cmd_send_start_treatment_response(1, 0)
- self.lblAction.setText('Accepted ')
+ self.lblCreateAction.setText('Accepted ')
@Slot()
- def do_reject(self):
+ def do_create_reject(self):
"""
the slot for accept saline bolus button
:return: none
"""
- reason = self.spnRejectReason.value()
- denaliMessages.setHeparinResponse(False, reason, self.requested_state)
- self.lblAction.setText('Rejected ' + "{}".format(reason))
+ reason = self.spnCreateRejectReason.value()
+ self.hd_simulator.cmd_send_start_treatment_response(False, 0)
+ self.lblCreateAction.setText('Rejected ' + "{}".format(reason))
@Slot()
+ def do_uf_volume_accept(self):
+ """
+ the slot for accept button
+ :return: none
+ """
+ volume = self.sldUFVolume.value()
+ self.hd_simulator.cmd_send_uf_treatment_response(True, 0, volume)
+ self.lblCreateAction.setText('Accepted ')
+
+ @Slot()
+ def do_uf_volume_reject(self):
+ """
+ the slot for accept saline bolus button
+ :return: none
+ """
+ reason = self.spnUFVolumeRejectReason.value()
+ volume = self.sldUFVolume.value()
+ self.hd_simulator.cmd_send_uf_treatment_response(False, reason, volume)
+ self.lblCreateAction.setText('Rejected ' + "{}".format(reason))
+
+ @Slot()
def do_data(self, value):
"""
the slot which is called to send the data