Index: TD_TreatmentAdjustmentsSetPoints/loader.py =================================================================== diff -u -r6f56b7d7d671e97678391e16a6a1fb08ab329b9e -r49bdede052d4f1e3288afadde2e181303733bff9 --- TD_TreatmentAdjustmentsSetPoints/loader.py (.../loader.py) (revision 6f56b7d7d671e97678391e16a6a1fb08ab329b9e) +++ TD_TreatmentAdjustmentsSetPoints/loader.py (.../loader.py) (revision 49bdede052d4f1e3288afadde2e181303733bff9) @@ -55,22 +55,29 @@ finds and creates widgets :return: none """ - self.tbSetPointsReqReset = self.find_widget(QtWidgets.QToolButton , 'tbSetPointsReqReset' ) self.lbSetPointsReqBloodFlowRate = self.find_widget(QtWidgets.QLabel , 'lbSetPointsReqBloodFlowRate' ) self.lbSetPointsReqDialysateFlowRate = self.find_widget(QtWidgets.QLabel , 'lbSetPointsReqDialysateFlowRate' ) self.lbSetPointsReqDialysateTemperature = self.find_widget(QtWidgets.QLabel , 'lbSetPointsReqDialysateTemperature' ) self.lbSetPointsReqAcidConcentrate = self.find_widget(QtWidgets.QLabel , 'lbSetPointsReqAcidConcentrate' ) self.lbSetPointsReqAcidConcentrateFactor = self.find_widget(QtWidgets.QLabel , 'lbSetPointsReqAcidConcentrateFactor' ) - self.lbSetPointsReqBicarbConcentrate = self.find_widget(QtWidgets.QLabel , 'lbSetPointsReqBicarbConcentrate' ) self.lbSetPointsReqTreatmentModality = self.find_widget(QtWidgets.QLabel , 'lbSetPointsReqTreatmentModality' ) self.lbSetPointsReqHepatitis = self.find_widget(QtWidgets.QLabel , 'lbSetPointsReqHepatitis' ) self.lbSetPointsReqSodium = self.find_widget(QtWidgets.QLabel , 'lbSetPointsReqSodium' ) self.lbSetPointsReqBicarbonate = self.find_widget(QtWidgets.QLabel , 'lbSetPointsReqBicarbonate' ) + self.cbAccepted = self.find_widget(QtWidgets.QCheckBox , 'cbAccepted' ) self.tbSetPointsRspSend = self.find_widget(QtWidgets.QToolButton , 'tbSetPointsRspSend' ) - self.tbSetPointsRspReset = self.find_widget(QtWidgets.QToolButton , 'tbSetPointsRspReset' ) - self.sbSetPointsRspRejectionReason = self.find_widget(QtWidgets.QSpinBox , 'sbSetPointsRspRejectionReason' ) + self.spnBloodFlowRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnBloodFlowRejectReason' ) + self.spnDialysateFlowRateRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnDialysateFlowRateRejectReason' ) + self.spnspnDialysateTempRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnspnDialysateTempRejectReason' ) + self.spnAcidConcentrateRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnAcidConcentrateRejectReason' ) + self.spnAcidConcentrateFactorRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnAcidConcentrateFactorRejectReason' ) + self.spnBicarbConcentrateRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnBicarbConcentrateRejectReason' ) + self.spnTreatmentModalityRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnTreatmentModalityRejectReason' ) + self.spnHepatitisRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnHepatitisRejectReason' ) + self.spnSodiumRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnSodiumRejectReason' ) + self.spnBicarbonateRejectReason = self.find_widget(QtWidgets.QSpinBox , 'spnBicarbonateRejectReason' ) self.tbBloodFlowRateRspSend = self.find_widget(QtWidgets.QToolButton , 'tbBloodFlowRateRspSend' ) self.tbBloodFlowRateRspReset = self.find_widget(QtWidgets.QToolButton , 'tbBloodFlowRateRspReset' ) @@ -93,10 +100,7 @@ initializes the widgets connections :return: none """ - self.tbSetPointsReqReset .clicked .connect(self.do_set_points_request_reset ) - self.tbSetPointsRspSend .clicked .connect(self.do_set_points_response_send ) - self.tbSetPointsRspReset .clicked .connect(self.do_set_points_response_reset ) self.tbBloodFlowRateRspSend .clicked .connect(self.do_blood_flow_rate_response_send ) self.tbBloodFlowRateRspReset .clicked .connect(self.do_blood_flow_rate_response_reset ) @@ -168,18 +172,32 @@ @Slot() def do_set_points_response_send(self): - self.td_interface.cmd_send_general_response( - message_id = MsgIds.MSG_ID_TD_TREATMENT_SET_POINTS_CHANGE_RESPONSE.value, - accepted = 1 if self.sbSetPointsRspRejectionReason.value() == 0 else 0, - reason = self.sbSetPointsRspRejectionReason.value(), - is_pure_data = False, - has_parameters = False, - ) + self.do_set_points_request_reset() + self.td_interface.td_set_points_adjustment_response(self.cbAccepted .isChecked(), + self.spnBloodFlowRejectReason .value(), + self.spnDialysateFlowRateRejectReason .value(), + self.spnspnDialysateTempRejectReason .value(), + self.spnAcidConcentrateRejectReason .value(), + self.spnAcidConcentrateFactorRejectReason .value(), + self.spnBicarbConcentrateRejectReason .value(), + self.spnTreatmentModalityRejectReason .value(), + self.spnHepatitisRejectReason .value(), + self.spnSodiumRejectReason .value(), + self.spnBicarbonateRejectReason .value()) @Slot() def do_set_points_response_reset(self): - self.sbSetPointsRspRejectionReason.setValue(0) + self.spnBloodFlowRejectReason .setValue(0) + self.spnDialysateFlowRateRejectReason .setValue(0) + self.spnspnDialysateTempRejectReason .setValue(0) + self.spnAcidConcentrateRejectReason .setValue(0) + self.spnAcidConcentrateFactorRejectReason.setValue(0) + self.spnBicarbConcentrateRejectReason .setValue(0) + self.spnTreatmentModalityRejectReason .setValue(0) + self.spnHepatitisRejectReason .setValue(0) + self.spnSodiumRejectReason .setValue(0) + self.spnBicarbonateRejectReason .setValue(0) @Slot()