Index: dialin/hd/treatment.py =================================================================== diff -u -r8c1ae1a592e02562ad9bded9ea2bd199fa80f4bf -r031c1f5827e4bd40bf1049ff1f653a7a18103bd8 --- dialin/hd/treatment.py (.../treatment.py) (revision 8c1ae1a592e02562ad9bded9ea2bd199fa80f4bf) +++ dialin/hd/treatment.py (.../treatment.py) (revision 031c1f5827e4bd40bf1049ff1f653a7a18103bd8) @@ -128,6 +128,7 @@ self.blood_prime_state = 0 self.treatment_end_state = 0 self.treatment_stop_state = 0 + self.dialysis_state = 0 # saline bolus status self.saline_bolus_max_vol = 0 self.saline_bolus_cum_vol = 0.0 @@ -146,7 +147,7 @@ self.recirc_countdown_secs = 0 # treatment stop status self.treatment_stop_timeout_secs = 0 - self.treatment_stop_timeout_coundown_secs = 0 + self.treatment_stop_timeout_countdown_secs = 0 self.current_treatment_param_dict = {} self.current_blood_flow = 0 @@ -197,7 +198,6 @@ # blood prime status self.blood_prime_tgt_vol = 0.0 self.blood_prime_cum_vol = 0.0 - self.blood_prime_ind_cum_vol = 0.0 # rinseback status self.rinseback_tgt_vol = 0.0 self.rinseback_cum_vol = 0.0 @@ -207,6 +207,9 @@ # re-circulation status self.recirc_timeout_secs = 0 self.recirc_countdown_secs = 0 + # treatment stop status + self.treatment_stop_timeout_secs = 0 + self.treatment_stop_timeout_countdown_secs = 0 def get_treatment_time_prescribed(self) -> int: """ @@ -408,6 +411,23 @@ """ return self.recirc_countdown_secs + def get_treatment_stop_timeout(self) -> int: + """ + Returns treatment stop timeout (in seconds) + + @return: The treatment stop timeout + """ + return self.treatment_stop_timeout_secs + + def get_treatment_stop_timeout_countdown(self) -> int: + """ + Returns treatment stop timeout countdown (in seconds) + + @return: The treatment stop timeout countdown + """ + return self.treatment_stop_timeout_countdown_secs + + def get_current_treatment_parameters(self) -> dict: """ Returns current treatment parameters in a dictionary @@ -617,7 +637,7 @@ self.recirc_timeout_secs = tmo[0] self.recirc_countdown_secs = cdn[0] - @publish(["treatment_stop_timeout_secs", "treatment_stop_timeout_coundown_secs"]) + @publish(["treatment_stop_timeout_secs", "treatment_stop_timeout_countdown_secs"]) def _handler_treatment_stop_timer_data_sync(self, message) -> None: """ Handles published treatment stop progress data messages. @@ -632,7 +652,7 @@ message['message'][MsgFieldPositions.START_POS_FIELD_2:MsgFieldPositions.END_POS_FIELD_2])) self.treatment_stop_timeout_secs = tmo[0] - self.treatment_stop_timeout_coundown_secs = cnd[0] + self.treatment_stop_timeout_countdown_secs = cnd[0] @publish(["accepted", "current_blood_flow", "current_dialysate_flow", "current_treatment_duration", "current_heparin_pre_stop", "current_saline_bolus_volume",