Index: simulator/plugins/recirculate/interface.ui =================================================================== diff -u --- simulator/plugins/recirculate/interface.ui (revision 0) +++ simulator/plugins/recirculate/interface.ui (revision 370f52c41992e2fbdc428376efb02b6f61e3b245) @@ -0,0 +1,235 @@ + + + ui_interface + + + + 0 + 0 + 427 + 112 + + + + Recirculate + + + + + + + 10 + + + + color: rgb(238, 238, 236); +background-color: rgb(173, 127, 168); + + + Recirculate + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + 10 + + + + 0 + + + 600 + + + 600 + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + + 10 + + + + color: rgb(238, 238, 236); +background-color: rgb(173, 127, 168); + + + Recirculate Timeout + + + Qt::AlignCenter + + + + + + + + 30 + 0 + + + + + 10 + + + + 600 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + CountDown + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 30 + 0 + + + + + 10 + + + + 600 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Total + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 10 + + + + 0 + + + 600 + + + 600 + + + Qt::Horizontal + + + + + + + + + + + + + sldTimeoutCountDown + valueChanged(int) + lblCurrent_2 + setNum(int) + + + 379 + 93 + + + 415 + 94 + + + + + sldTimeoutTotal + valueChanged(int) + lblTarget_2 + setNum(int) + + + 379 + 70 + + + 415 + 71 + + + + + Index: simulator/plugins/recirculate/loader.py =================================================================== diff -u --- simulator/plugins/recirculate/loader.py (revision 0) +++ simulator/plugins/recirculate/loader.py (revision 370f52c41992e2fbdc428376efb02b6f61e3b245) @@ -0,0 +1,67 @@ +""" +The Heparin ui loader class +""" +import os +from simulator.dynamicloader import DynamicLoader + +from PySide2 import QtWidgets +from PySide2.QtCore import Slot + +from dialin.ui.hd_simulator import HDSimulator +from dialin.ui.hd_simulator import TXStates + + +class Loader(DynamicLoader): + """ + The Saline Bolus ui loader class + """ + + btnAccept: QtWidgets.QPushButton + btnReject: QtWidgets.QPushButton + lblAction: QtWidgets.QLabel + spnRejectReason: QtWidgets.QSpinBox + sldTimeoutTotal: QtWidgets.QSlider + sldTimeoutCountDown: QtWidgets.QSlider + + requested_state: TXStates + + def __init__(self, hd_simulator: HDSimulator): + super().__init__(os.path.dirname(__file__), hd_simulator) + print(" ---------- ", self.hd_simulator) + self.requested_state = TXStates.RINSEBACK_STOP_INIT_STATE + + def _init_loader(self): + """ + finds and creates widgets + :return: none + """ + # rinseback data + self.sldTimeoutTotal = self.find_slider('sldTimeoutTotal') + self.sldTimeoutCountDown = self.find_slider('sldTimeoutCountDown') + + def _init_widgets(self): + """ + initializes the widgets' properties + :return: none + """ + pass + + def _init_connections(self): + """ + initializes the widgets connections + :return: + """ + self.sldTimeoutTotal.valueChanged.connect(self.do_data) + self.sldTimeoutCountDown.valueChanged.connect(self.do_data) + + @Slot() + def do_data(self): + """ + the slot which is called to send the data + by calling the denaliMessage API cmd_send_treatment_recirculate_data + :return: none + """ + timeout_total = self.sldTimeoutTotal.value() + timeout_countdown = self.sldTimeoutCountDown.value() + + self.hd_simulator.cmd_send_treatment_recirculate_data(timeout_total, timeout_countdown) Index: simulator/plugins/rinseback/interface.ui =================================================================== diff -u -r1779b6711f3791e8bf570e06ddb4c2e7d2a52e18 -r370f52c41992e2fbdc428376efb02b6f61e3b245 --- simulator/plugins/rinseback/interface.ui (.../interface.ui) (revision 1779b6711f3791e8bf570e06ddb4c2e7d2a52e18) +++ simulator/plugins/rinseback/interface.ui (.../interface.ui) (revision 370f52c41992e2fbdc428376efb02b6f61e3b245) @@ -6,27 +6,46 @@ 0 0 - 500 - 255 + 550 + 325 - 500 - 255 + 0 + 325 16777215 - 255 + 325 Rinseback - + + + + + 10 + + + + color: rgb(238, 238, 236); +background-color: rgb(174, 64, 194); + + + Rinseback + + + Qt::AlignCenter + + + + @@ -44,6 +63,12 @@ + + + 0 + 0 + + 10 @@ -240,7 +265,7 @@ - + 0 0 @@ -395,9 +420,157 @@ + + + + + + + 10 + + + + 0 + + + 120 + + + 120 + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + + 10 + + + + color: rgb(238, 238, 236); +background-color: rgb(174, 64, 194); + + + Rinseback Timeout + + + Qt::AlignCenter + + + + + + + + 30 + 0 + + + + + 10 + + + + 120 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + CountDown + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + sldCurrent + + + + + + + + 30 + 0 + + + + + 10 + + + + 120 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Total + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 10 + + + + 0 + + + 120 + + + 120 + + + Qt::Horizontal + + + + + - + Qt::Vertical @@ -410,25 +583,6 @@ - - - - - 10 - - - - color: rgb(238, 238, 236); -background-color: rgb(174, 64, 194); - - - Rinseback - - - Qt::AlignCenter - - - @@ -444,8 +598,8 @@ 182 - 469 - 184 + 538 + 188 @@ -460,8 +614,8 @@ 202 - 468 - 207 + 538 + 211 @@ -476,10 +630,42 @@ 225 - 487 - 226 + 538 + 237 + + sldTimeoutTotal + valueChanged(int) + lblTarget_2 + setNum(int) + + + 432 + 279 + + + 526 + 278 + + + + + sldTimeoutCountDown + valueChanged(int) + lblCurrent_2 + setNum(int) + + + 464 + 302 + + + 518 + 302 + + + Index: simulator/plugins/rinseback/loader.py =================================================================== diff -u -r1779b6711f3791e8bf570e06ddb4c2e7d2a52e18 -r370f52c41992e2fbdc428376efb02b6f61e3b245 --- simulator/plugins/rinseback/loader.py (.../loader.py) (revision 1779b6711f3791e8bf570e06ddb4c2e7d2a52e18) +++ simulator/plugins/rinseback/loader.py (.../loader.py) (revision 370f52c41992e2fbdc428376efb02b6f61e3b245) @@ -23,6 +23,8 @@ sldTarget: QtWidgets.QSlider sldCurrent: QtWidgets.QSlider sldRate: QtWidgets.QSlider + sldTimeoutTotal: QtWidgets.QSlider + sldTimeoutCountDown: QtWidgets.QSlider requested_state: TXStates @@ -45,6 +47,8 @@ self.sldTarget = self.find_slider('sldTarget') self.sldCurrent = self.find_slider('sldCurrent') self.sldRate = self.find_slider('sldRate') + self.sldTimeoutTotal = self.find_slider('sldTimeoutTotal') + self.sldTimeoutCountDown = self.find_slider('sldTimeoutCountDown') def _init_widgets(self): """ @@ -65,6 +69,8 @@ self.sldTarget.valueChanged.connect(self.do_data) self.sldCurrent.valueChanged.connect(self.do_data) self.sldRate.valueChanged.connect(self.do_data) + self.sldTimeoutTotal.valueChanged.connect(self.do_data) + self.sldTimeoutCountDown.valueChanged.connect(self.do_data) @Slot() def do_accept(self): @@ -101,4 +107,7 @@ target = self.sldTarget.value() current = self.sldCurrent.value() rate = self.sldRate.value() - self.hd_simulator.cmd_send_treatment_rinseback_data(target, current, rate) + timeout_total = self.sldTimeoutTotal.value() + timeout_countdown = self.sldTimeoutCountDown.value() + + self.hd_simulator.cmd_send_treatment_rinseback_data(target, current, rate, timeout_total, timeout_countdown) Index: simulator/plugins/treatmentstates/interface.ui =================================================================== diff -u -r1779b6711f3791e8bf570e06ddb4c2e7d2a52e18 -r370f52c41992e2fbdc428376efb02b6f61e3b245 --- simulator/plugins/treatmentstates/interface.ui (.../interface.ui) (revision 1779b6711f3791e8bf570e06ddb4c2e7d2a52e18) +++ simulator/plugins/treatmentstates/interface.ui (.../interface.ui) (revision 370f52c41992e2fbdc428376efb02b6f61e3b245) @@ -6,27 +6,15 @@ 0 0 - 518 - 531 + 526 + 618 Treatment States - - - 6 - - - 6 - - - 6 - - - 6 - - + + @@ -45,610 +33,869 @@ - - - - - 275 - 200 - + + + + reset - - - 8 - 50 - false - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QAbstractItemView::NoEditTriggers - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - true - - - false - - - true - - - 260 - - - true - - - 18 - - - 21 - - - - 0 - - - - - 1 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - 7 - - - - - Treatment States (subMode) - - - - - TREATMENT_START_STATE - - - - - TREATMENT_BLOOD_PRIME_STATE - - - - - TREATMENT_DIALYSIS_STATE - - - - - TREATMENT_STOP_STATE - - - - - TREATMENT_RINSEBACK_STATE - - - - - TREATMENT_RECIRC_STATE - - - - - TREATMENT_DIALYSIS_END_STATE - - - - - TREATMENT_END_STATE - - - - - - - 200 - 170 - - - - - 8 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QAbstractItemView::NoEditTriggers - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - false - - - true - - - 210 - - - 21 - - - - 0 - - - - - 1 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - UF States - - - - - UF_START_STATE - + + + + + + + 275 + 188 + + + + + 8 + 50 + false + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + true + + + false + + + true + + + 260 + + + true + + + 18 + + + 21 + + + + 0 + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + Treatment States (subMode) + + + + + TREATMENT_START_STATE + + + + + TREATMENT_BLOOD_PRIME_STATE + + + + + TREATMENT_DIALYSIS_STATE + + + + + TREATMENT_STOP_STATE + + + + + TREATMENT_RINSEBACK_STATE + + + + + TREATMENT_RECIRC_STATE + + + + + TREATMENT_END_STATE + + + - - - UF_PAUSED_STATE - + + + + + 0 + 51 + + + + + 16777215 + 51 + + + + + 8 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + true + + + 210 + + + 21 + + + + 0 + + + + + Blood Prime States + + + + + BLOOD_PRIME_RAMP_STATE + + + ItemIsSelectable|ItemIsEnabled + + + - - - UF_RUNNING_STATE - + + + + + 0 + 131 + + + + + 8 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + true + + + 210 + + + 21 + + + + 0 + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + UF States + + + + + UF_START_STATE + + + + + UF_PAUSED_STATE + + + + + UF_RUNNING_STATE + + + + + UF_OFF_STATE + + + + + UF_COMPLETED_STATE + + + - - - UF_OFF_STATE - - - - - UF_COMPLETED_STATE - - - - - - - - - 275 - 100 - - - - - 8 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QAbstractItemView::NoEditTriggers - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - false - - - true - - - 260 - - - 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 - + + + + 275 + 100 + + + + + 8 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + true + + + 260 + + + 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 + + + - - - SALINE_BOLUS_STATE_MAX_DELIVERED - + + + + + 225 + 155 + + + + + 8 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + true + + + 210 + + + 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 + + + - - - - - - - 225 - 155 - - - - - 8 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QAbstractItemView::NoEditTriggers - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - false - - - true - - - 210 - - - 21 - - - - 0 - - - - - 1 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - 5 - - - - - Heparin States - - - - - HEPARIN_STATE_OFF - - - ItemIsSelectable|ItemIsEnabled - - - - - HEPARIN_STATE_PAUSED - - - - - HEPARIN_STATE_INITIAL_BOLUS - - - - HEPARIN_STATE_DISPENSING - + + + + 275 + 130 + + + + + 8 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + true + + + 260 + + + 21 + + + + 0 + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + Rinseback States + + + + + RINSEBACK_STOP_INIT_STATE + + + ItemIsSelectable|ItemIsEnabled + + + + + RINSEBACK_RUN_STATE + + + + + RINSEBACK_PAUSED_STATE + + + + + RINSEBACK_STOP_STATE + + + + + RINSEBACK_RUN_ADDITIONAL_STATE + + + + + + + + 225 + 100 + + + + + 8 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + true + + + 210 + + + 21 + + + + 0 + + + + + 1 + + + + + Recirculate States + + + + + TREATMENT_RECIRC_RECIRC_STATE + + + ItemIsSelectable|ItemIsEnabled + + + + + TREATMENT_RECIRC_STOPPED_STATE + + + + - - HEPARIN_STATE_COMPLETED - + + + + 0 + 71 + + + + + 16777215 + 71 + + + + + 8 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + true + + + 260 + + + 21 + + + + 0 + + + + + 1 + + + + + Treatment End States + + + + + TREATMENT_END_WAIT_FOR_RINSEBACK_STATE + + + ItemIsSelectable|ItemIsEnabled + + + + + TREATMENT_END_PAUSED_STATE + + + - - - HEPARIN_STATE_EMPTY - + + + + + 0 + 71 + + + + + 16777215 + 71 + + + + + 8 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + true + + + 210 + + + 21 + + + + 0 + + + + + 1 + + + + + Treatment Stop States + + + + + TREATMENT_STOP_RECIRC_STATE + + + ItemIsSelectable|ItemIsEnabled + + + + + TREATMENT_STOP_NO_RECIRC_STATE + + + - + - - - - - 275 - 130 - + + + + Qt::Vertical - - - 8 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QAbstractItemView::NoEditTriggers - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - false - - - true - - - 260 - - - 21 - - - - 0 - - - - - 1 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - Rinseback States - - - - - RINSEBACK_STOP_INIT_STATE - - - ItemIsSelectable|ItemIsEnabled - - - - - RINSEBACK_RUN_STATE - - - - - RINSEBACK_PAUSED_STATE - - - - - RINSEBACK_STOP_STATE - - - - - RINSEBACK_RUN_ADDITIONAL_STATE - - - - - - - + - 225 - 100 + 20 + 3 - - - 8 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QAbstractItemView::NoEditTriggers - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - false - - - true - - - 210 - - - 21 - - - - 0 - - - - - 1 - - - - - Recirculate States - - - - - TREATMENT_RECIRC_RECIRC_STATE - - - ItemIsSelectable|ItemIsEnabled - - - - - TREATMENT_RECIRC_STOPPED_STATE - - - + Index: simulator/plugins/treatmentstates/loader.py =================================================================== diff -u -r1779b6711f3791e8bf570e06ddb4c2e7d2a52e18 -r370f52c41992e2fbdc428376efb02b6f61e3b245 --- simulator/plugins/treatmentstates/loader.py (.../loader.py) (revision 1779b6711f3791e8bf570e06ddb4c2e7d2a52e18) +++ simulator/plugins/treatmentstates/loader.py (.../loader.py) (revision 370f52c41992e2fbdc428376efb02b6f61e3b245) @@ -15,12 +15,17 @@ """ The Ultrafiltration ui loader """ + tbReset: QtWidgets.QToolButton + tblSubMode: QtWidgets.QTableWidget tblUFStates: QtWidgets.QTableWidget tblSalineStates: QtWidgets.QTableWidget tblHeparinStates: QtWidgets.QTableWidget tblRinsebackStates: QtWidgets.QTableWidget tblRecirculateStates: QtWidgets.QTableWidget + tblBloodPrimeStates: QtWidgets.QTableWidget + tblTreatmentEndStates: QtWidgets.QTableWidget + tblTreatmentStopStates: QtWidgets.QTableWidget def __init__(self, hd_simulator: HDSimulator): super().__init__(os.path.dirname(__file__), hd_simulator) @@ -31,38 +36,52 @@ finds and creates widgets :return: none """ + self.tbReset = self.find_tool_button('tbReset') + 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') self.tblRinsebackStates = self.find_table_widget('tblRinsebackStates') self.tblRecirculateStates = self.find_table_widget('tblRecirculateStates') + self.tblBloodPrimeStates = self.find_table_widget('tblBloodPrimeStates') + self.tblTreatmentEndStates = self.find_table_widget('tblTreatmentEndStates') + self.tblTreatmentStopStates = self.find_table_widget('tblTreatmentStopStates') def _init_connections(self): """ initializes the widgets connections :return: none """ + self.tbReset.clicked.connect(self._init_widgets) + 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) self.tblRinsebackStates.cellClicked.connect(self.do_treatment_states) self.tblRecirculateStates.cellClicked.connect(self.do_treatment_states) + self.tblBloodPrimeStates.cellClicked.connect(self.do_treatment_states) + self.tblTreatmentEndStates.cellClicked.connect(self.do_treatment_states) + self.tblTreatmentStopStates.cellClicked.connect(self.do_treatment_states) # apply/send the initial states # self.do_treatment_states() + @Slot() def _init_widgets(self): """ initializes the widgets' properties :return: none """ - self.tblSubMode.setCurrentCell(TXStates.TREATMENT_DIALYSIS_STATE, 0) + self.tblSubMode.setCurrentCell(TXStates.TREATMENT_START_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) - self.tblRinsebackStates.setCurrentCell(TXStates.HEPARIN_STATE_OFF, 0) - self.tblRecirculateStates.setCurrentCell(TXStates.TREATMENT_RECIRC_STOPPED_STATE, 0) + self.tblRinsebackStates.setCurrentCell(TXStates.RINSEBACK_STOP_INIT_STATE, 0) + self.tblRecirculateStates.setCurrentCell(TXStates.TREATMENT_RECIRC_RECIRC_STATE, 0) + self.tblBloodPrimeStates.setCurrentCell(TXStates.BLOOD_PRIME_RAMP_STATE, 0) + self.tblTreatmentEndStates.setCurrentCell(TXStates.TREATMENT_END_WAIT_FOR_RINSEBACK_STATE, 0) + self.tblTreatmentStopStates.setCurrentCell(TXStates.TREATMENT_STOP_RECIRC_STATE, 0) @Slot() def do_treatment_states(self): @@ -74,6 +93,19 @@ uf_state = int(self.tblUFStates.verticalHeaderItem(self.tblUFStates.currentRow()).text()) saline = int(self.tblSalineStates.verticalHeaderItem(self.tblSalineStates.currentRow()).text()) heparin = int(self.tblHeparinStates.verticalHeaderItem(self.tblHeparinStates.currentRow()).text()) - rinseback = int(self.tblHeparinStates.verticalHeaderItem(self.tblRinsebackStates.currentRow()).text()) - recirculate = int(self.tblHeparinStates.verticalHeaderItem(self.tblRecirculateStates.currentRow()).text()) - self.hd_simulator.cmd_set_treatment_states_data(sub_mode, uf_state, saline, heparin, rinseback, recirculate) + rinseback = int(self.tblRinsebackStates.verticalHeaderItem(self.tblRinsebackStates.currentRow()).text()) + recirculate = int(self.tblRecirculateStates.verticalHeaderItem(self.tblRecirculateStates.currentRow()).text()) + blood_prime = int(self.tblBloodPrimeStates.verticalHeaderItem(self.tblBloodPrimeStates.currentRow()).text()) + treatment_end = int(self.tblTreatmentEndStates.verticalHeaderItem(self.tblTreatmentEndStates.currentRow()).text()) + treatment_stop = int(self.tblTreatmentStopStates.verticalHeaderItem(self.tblTreatmentStopStates.currentRow()).text()) + self.hd_simulator.cmd_set_treatment_states_data( + sub_mode, + uf_state, + saline, + heparin, + rinseback, + recirculate, + blood_prime, + treatment_end, + treatment_stop + )