Index: tst_main_treatment_heparin/test.py =================================================================== diff -u -r6bb43117bca2673c5de877f5b70b094da344418a -r5d6a0bb96d04a86cc10936ac3f303c28be3bb249 --- tst_main_treatment_heparin/test.py (.../test.py) (revision 6bb43117bca2673c5de877f5b70b094da344418a) +++ tst_main_treatment_heparin/test.py (.../test.py) (revision 5d6a0bb96d04a86cc10936ac3f303c28be3bb249) @@ -11,17 +11,17 @@ from configuration import config, utility from dialin.ui import utils from dialin.ui.hd_simulator import HDSimulator -from dialin.common.hd_defs import TreatmentStates, HeparinStates +from dialin.common.hd_defs import TreatmentStates, HeparinStates, BloodLeakZeroingStates HEPARIN_BUTTON_STATES = {0: "OFF", 1: "HEPARIN DELIVERY", 2: "RESUME DELIVERY", - 3: "HEPARIN DELIVERY", 4: "PAUSE DELIVERY", + 3: "HEPARIN DELIVERY", 4: "PAUSE HEPARIN", 5: "OFF", 6: "HEPARIN DELIVERY"} HEPARIN_STATE_MSGS = {"STATE_0_OFF_MESSAGE": "", "STATE_1_HEPARIN DELIVERY_MESSAGE": "Delivery Stopped", "STATE_2_RESUME DELIVERY_MESSAGE": "Delivery Paused", "STATE_3_HEPARIN DELIVERY_MESSAGE": "Bolus Active", - "STATE_4_PAUSE DELIVERY_MESSAGE": "Dispensing Active", + "STATE_4_PAUSE HEPARIN_MESSAGE": "Dispensing Active", "STATE_5_OFF_MESSAGE": "Maximum Cumulative Heparin Volume Delivered", "STATE_6_HEPARIN DELIVERY_MESSAGE": "Syringe Empty"} @@ -34,17 +34,28 @@ """ test.startSection("Verifying Heparin State 3 HEPARIN_INITIAL_BOLUS values") test.log("Verifying Heparin State 3 -> Heparin bolus is active") - hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_INITIAL_BOLUS.value, - rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, - treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, + uf_state=TreatmentStates.TREATMENT_START_STATE.value, + saline_state=TreatmentStates.TREATMENT_START_STATE.value, + heparin_state=HeparinStates.HEPARIN_STATE_INITIAL_BOLUS.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, + recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, + dialysis_state=TreatmentStates.TREATMENT_START_STATE.value, + bloodLeakZeoringState = BloodLeakZeroingStates.BLD_ZEROING_IDLE_STATE.value) mouseClick(waitForObject(names.o_treatmentHome_mouseArea_MouseArea_2)) test.compare(str(waitForObjectExists(names.o_treatment_text).text), config.TREATMENT_TEXT, utility.msg("Treatment title Text should be {}".format(config.TREATMENT_TEXT))) - mouseClick(waitForObject(names.o_trending_text)) - mouseClick(waitForObject(names.o_treatmentHome_mouseArea_MouseArea_2)) - test.compare(str(waitForObjectExists(names.o_trending_text).text), config.TRENDING_TEXT, utility.msg("Trending title Text should be {}".format(config.TRENDING_TEXT))) - mouseClick(waitForObject(names.o_main_settings_text)) - mouseClick(waitForObject(names.o_treatmentHome_mouseArea_MouseArea_2)) - test.compare(str(waitForObjectExists(names.o_main_settings_text).text), config.SETTINGS_TEXT, utility.msg("Trending title Text should be {}".format(config.SETTINGS_TEXT))) + + # TODO uncomment the following lines if Trending and Settings are visible in the TreatmentStack.qml' MainMenu + # mouseClick(waitForObject(names.o_trending_text)) + # mouseClick(waitForObject(names.o_treatmentHome_mouseArea_MouseArea_2)) + # test.compare(str(waitForObjectExists(names.o_trending_text).text), config.TRENDING_TEXT, utility.msg("Trending title Text should be {}".format(config.TRENDING_TEXT))) + # mouseClick(waitForObject(names.o_main_settings_text)) + # mouseClick(waitForObject(names.o_treatmentHome_mouseArea_MouseArea_2)) + # test.compare(str(waitForObjectExists(names.o_main_settings_text).text), config.SETTINGS_TEXT, utility.msg("Trending title Text should be {}".format(config.SETTINGS_TEXT))) + test.compare(str(waitForObjectExists(names.o_state1_heparin_delivery_text).text), config.HEPARIN_DELIVERY_TEXT, utility.msg("Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT))) test.compare((waitForObjectExists(names.o_state1_heparin_delivery_text)).enabled, False, utility.msg("Heparin Delivery should be disabled")) initial_bolus_text = waitForObjectExists(names.o_state3_heparin_state_initial_bolus_text).text @@ -53,7 +64,7 @@ for index in range(10): utils.waitForGUI(0.2) - hd_simulator.cmd_set_treatment_heparin_data(cumulative = config.HEPARIN_VALUES["Cumulative Value"][index]) + hd_simulator.cmd_set_treatment_heparin_data(cumulative = config.HEPARIN_VALUES["Cumulative Value"][index], required = config.HEPARIN_VALUES["Required Value"][index]) parameter_text = object.children(waitForObjectExists(names.o_volume_delivered_text)) test.compare((str(parameter_text[2].text)), str(config.HEPARIN_VALUES["Cumulative Value"][index]) , "parameter value should be "+str(config.HEPARIN_VALUES["Cumulative Value"][index])) test.endSection() @@ -66,9 +77,17 @@ HEPARIN STATE 4 -> HEPARIN_STATE_DISPENSING """ test.startSection("Verifying Heparin State ->2 HEPARIN_STATE_PAUSED") - hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_PAUSED.value, - rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, - treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, + uf_state=TreatmentStates.TREATMENT_START_STATE.value, + saline_state=TreatmentStates.TREATMENT_START_STATE.value, + heparin_state=HeparinStates.HEPARIN_STATE_PAUSED.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, + recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, + dialysis_state=TreatmentStates.TREATMENT_START_STATE.value, + bloodLeakZeoringState = BloodLeakZeroingStates.BLD_ZEROING_IDLE_STATE.value) hd_simulator.cmd_set_heparin_pause_resume_response(accepted=1, reason=0) test.compare(str(waitForObjectExists(names.o_state2_heparin_state_paused_text).text),config.HEPARIN_RESUME_DELIVERY_TEXT, utility.msg("Heparin Resume Delivery Text should be {}".format(config.HEPARIN_RESUME_DELIVERY_TEXT))) test.compare( waitForObjectExists(names.o_state2_heparin_state_paused_text).enabled, True, utility.msg("Resume Delivery Button is enabled")) @@ -80,9 +99,17 @@ test.endSection() test.startSection("Verifying Heparin State ->4 HEPARIN_STATE_DISPENSING") - hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_DISPENSING.value, - rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, - treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, + uf_state=TreatmentStates.TREATMENT_START_STATE.value, + saline_state=TreatmentStates.TREATMENT_START_STATE.value, + heparin_state=HeparinStates.HEPARIN_STATE_DISPENSING.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, + recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, + dialysis_state=TreatmentStates.TREATMENT_START_STATE.value, + bloodLeakZeoringState = BloodLeakZeroingStates.BLD_ZEROING_IDLE_STATE.value) test.compare(str(waitForObjectExists(names.o_state4_heparin_state_dispensing_text).text), config.HEPARIN_PAUSE_DELIVERY_TEXT, utility.msg("Heparin Pause Delivery Text should be {}".format(config.HEPARIN_PAUSE_DELIVERY_TEXT))) test.compare( waitForObjectExists(names.o_state4_heparin_state_dispensing_text).enabled , True, utility.msg("Pause Delivery Button is enabled")) mouseClick(waitForObject(names.o_state4_heparin_state_dispensing_text)) @@ -101,19 +128,35 @@ HEPARIN STATE 6 -> HEPARIN_STATE_EMPTY """ test.log("Verifying Heparin State 0 - HEPARIN_STATE_OFF") - hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_OFF.value, - rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, - treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, + uf_state=TreatmentStates.TREATMENT_START_STATE.value, + saline_state=TreatmentStates.TREATMENT_START_STATE.value, + heparin_state=HeparinStates.HEPARIN_STATE_OFF.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, + recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, + dialysis_state=TreatmentStates.TREATMENT_START_STATE.value, + bloodLeakZeoringState = BloodLeakZeroingStates.BLD_ZEROING_IDLE_STATE.value) test.compare(str(waitForObjectExists(names.o_state0_heparin_delivery_Off_text).text), config.HEPARIN_DELIVERY_OFF_TEXT, utility.msg("Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT))) test.compare((waitForObjectExists(names.o_state0_heparin_delivery_Off_text)).enabled, False, utility.msg("Heparin Delivery should be disabled")) test.log("Verifying Notification Message") test.compare(str(findObject(names.o_state0_heparin_delivery_Off_text).text ), config.HEPARIN_DELIVERY_OFF_TEXT, utility.msg("Notification Message should be {}".format(config.HEPARIN_DELIVERY_OFF_TEXT))) utils.waitForGUI(1) test.log("Verifying Heparin State 1 - HEPARIN_STATE_STOPPED") - hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_STOPPED.value, - rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, - treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, + uf_state=TreatmentStates.TREATMENT_START_STATE.value, + saline_state=TreatmentStates.TREATMENT_START_STATE.value, + heparin_state=HeparinStates.HEPARIN_STATE_STOPPED.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, + recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, + dialysis_state=TreatmentStates.TREATMENT_START_STATE.value, + bloodLeakZeoringState = BloodLeakZeroingStates.BLD_ZEROING_IDLE_STATE.value) test.compare(str(waitForObjectExists(names.o_state1_heparin_delivery_text).text), config.HEPARIN_DELIVERY_TEXT, utility.msg("Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT))) test.compare((waitForObjectExists(names.o_state1_heparin_delivery_text)).enabled, False, utility.msg("Heparin Delivery should be disabled")) test.log("Verifying Notification Message") @@ -124,19 +167,35 @@ heparin_pause_resume_states() test.log("Verifying Heparin State 5 - HEPARIN_STATE_COMPLETED") - hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_COMPLETED.value, - rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, - treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, + uf_state=TreatmentStates.TREATMENT_START_STATE.value, + saline_state=TreatmentStates.TREATMENT_START_STATE.value, + heparin_state=HeparinStates.HEPARIN_STATE_COMPLETED.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, + recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, + dialysis_state=TreatmentStates.TREATMENT_START_STATE.value, + bloodLeakZeoringState = BloodLeakZeroingStates.BLD_ZEROING_IDLE_STATE.value) test.compare(str(waitForObjectExists(names.o_state0_heparin_delivery_Off_text).text), config.HEPARIN_DELIVERY_OFF_TEXT, utility.msg("Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT))) test.compare((waitForObjectExists(names.o_state0_heparin_delivery_Off_text)).enabled, False, utility.msg("Heparin Delivery should be disabled")) test.log("Verifying Notification Message") test.compare(str(waitForObjectExists(names.o_state5_heparin_state_completed_text).text), config.HEPARIN_MAXIMUM_VOLUME_DELIVERED_TEXT, utility.msg("Notification Message should be {}".format(config.HEPARIN_MAXIMUM_VOLUME_DELIVERED_TEXT))) utils.waitForGUI(1) test.log("Verifying Heparin State 6 - HEPARIN_STATE_EMPTY") - hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_EMPTY.value, - rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, - treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, + uf_state=TreatmentStates.TREATMENT_START_STATE.value, + saline_state=TreatmentStates.TREATMENT_START_STATE.value, + heparin_state=HeparinStates.HEPARIN_STATE_EMPTY.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, + recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, + dialysis_state=TreatmentStates.TREATMENT_START_STATE.value, + bloodLeakZeoringState = BloodLeakZeroingStates.BLD_ZEROING_IDLE_STATE.value) test.compare(str(waitForObjectExists(names.o_state6_heparin_state_empty_text).text), config.HEPARIN_SYRINGE_EMPTY_TEXT, utility.msg("Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT))) test.compare((waitForObjectExists(names.o_state6_heparin_state_empty_text)).enabled, True, utility.msg("Heparin Delivery should be disabled")) test.log("Verifying Notification Message") @@ -149,7 +208,8 @@ Method to verify rejection messages """ test.startSection("Verifying Rejection Messages") - rejection_msg = waitForObjectExists(utility.rejection_msg(text=config.REJECTION_REASON[reason_id])) + names.o_heparin_rejection_textLabel["text"] = config.REJECTION_REASON[reason_id] + rejection_msg = waitForObjectExists(names.o_heparin_rejection_textLabel) test.compare(rejection_msg.text, config.REJECTION_REASON[reason_id], utility.msg("The rejection message should be {}".format(config.REJECTION_REASON[reason_id]))) test.endSection() @@ -161,9 +221,17 @@ test.startSection("Verifying test case scenario for rejection and acceptance in current state") for reason_id in range(1, (config.NUM_OF_REQUEST_REJECT_REASONS)): for state_id, state in HEPARIN_BUTTON_STATES.items(): - hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=state_id, - rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, - treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, + uf_state=TreatmentStates.TREATMENT_START_STATE.value, + saline_state=TreatmentStates.TREATMENT_START_STATE.value, + heparin_state=state_id, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, + recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, + dialysis_state=TreatmentStates.TREATMENT_START_STATE.value, + bloodLeakZeoringState = BloodLeakZeroingStates.BLD_ZEROING_IDLE_STATE.value) test.compare(str(waitForObjectExists(utility.expected_heparin_value(state)).text), state, utility.msg("{} text should be displayed".format(state))) hd_simulator.cmd_set_heparin_pause_resume_response(accepted=0, reason=reason_id) verify_the_rejection_msg(reason_id) @@ -176,9 +244,17 @@ hd_simulator.cmd_set_heparin_pause_resume_response(accepted=0, reason=reason_id+1) verify_the_rejection_msg(reason_id=reason_id+1) #changing the state - hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=state_id+1, - rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, - treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, + uf_state=TreatmentStates.TREATMENT_START_STATE.value, + saline_state=TreatmentStates.TREATMENT_START_STATE.value, + heparin_state=state_id+1, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, + recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, + dialysis_state=TreatmentStates.TREATMENT_START_STATE.value, + bloodLeakZeoringState = BloodLeakZeroingStates.BLD_ZEROING_IDLE_STATE.value) if state_id == 6: break else: