Index: suite_leahi/shared/scripts/configuration/config.py =================================================================== diff -u -r0130028593cbcfc6ec7e97af4b4c48f26b96898b -r861179f9b370bbbf286228837d52489d184231dc --- suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 0130028593cbcfc6ec7e97af4b4c48f26b96898b) +++ suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 861179f9b370bbbf286228837d52489d184231dc) @@ -65,11 +65,10 @@ ALARM_REJECT_NOTIFICATION_TEMPLATE = "No Active Alarm List [{}]" #Create Rx -ACID_CONCENTRATE = ["1.0 K, 2.50 Ca, 1 Mg","2.0 K, 2.50 Ca, 1 Mg","3.0 K, 2.50 Ca, 1 Mg"] +ACID_CONCENTRATE = ["1.0 K, 2.50 Ca","2.0 K, 2.50 Ca","3.0 K, 2.50 Ca"] DIALYZER_TYPE = ["Diacap Pro 13H","Diacap Pro 16H", "Diacap Pro 19H", "Optiflux F160NRe", "Optiflux F180NRe", "Optiflux F200NRe","Optiflux F250NRe"] VITALS = ["OFF","5","10","15","20","30","60"] -BICARBONATE = ["Sodium Bicarbonate"] - +BICARBONATE = ["650 g","720 g","760 g", "900 g", "1100 g","1250 g"] #Heparin heparin_off = { "Heparin Type" :"OFF", "Dispensing Rate" :"OFF", Index: suite_leahi/shared/scripts/configuration/utility.py =================================================================== diff -u -r3b1585c8cf24c14498f1ebd55f571d09f55e472e -r861179f9b370bbbf286228837d52489d184231dc --- suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision 3b1585c8cf24c14498f1ebd55f571d09f55e472e) +++ suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision 861179f9b370bbbf286228837d52489d184231dc) @@ -89,15 +89,15 @@ target_value = target_value # Wait for all objects - parent_obj = squish.waitForObjectExists(obj) + parent_obj = squish.waitForObject(obj) # change range as per your screen count left_arrow = findObjectById(parent_obj, "_leftArrow") right_arrow =findObjectById(parent_obj, "_rightArrow") # Read current value (supports invisible text too) - current_value = round(float(squish.findObject(obj).value),1) + current_value = round(float(squish.waitForObject(obj).value), 1) # Determine direction while current_value != float(target_value): @@ -107,7 +107,7 @@ elif current_value > float(target_value): squish.mouseClick(squish.waitForObject(left_arrow)) - current_value = round(float(squish.findObject(obj).value),1) + current_value = round(float(squish.waitForObject(obj).value), 1) test.log(f"Updated value: {current_value}") @@ -132,46 +132,63 @@ test.startSection("Pre treatment parameters") navigation.navigation_pageIndicator_step(config.CREATERX) squish.mouseClick(squish.waitForObject(names.o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry)) - squish.waitForObject(names.o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry).text ="abcd" - set_value_based_on_target(names.o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster, 60) - set_value_based_on_target(names.o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster, 75) - set_value_based_on_target(names.o_PreTreatmentCreate_durationControl_ValueAdjuster, 75) - heparinValue =navigation.get_ini_value("/home/denali/Public/luis/config/configurations/Settings/System.conf", section ="Feature Configurations", key ="HeparinSyringePump") - if heparinValue == "1": - set_value_based_on_target(names.o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster, 0.4) - set_value_based_on_target(names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, 0.5) - set_value_based_on_target(names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, 60) + squish.waitForObject(names.o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry).text ="Patient ID" + parent_obj = squish.waitForObject(names.o_PreTreatmentCreate_leftColumn_Column) + blood_flow_rate = findObjectById(parent_obj, "_bloodFlowRate") + set_value_based_on_target(blood_flow_rate, 70) + dialysate_flow_rate = findObjectById(parent_obj, "_dialysateFlowRate") + set_value_based_on_target(dialysate_flow_rate, 50) + duration = findObjectById(parent_obj,"_duration") + set_value_based_on_target(duration, 60) + right_obj = squish.waitForObject(names.o_PreTreatmentCreate_rightColumn_Column) + ultrafiltration_volume = findObjectById(right_obj,"_ufVolume") + set_value_based_on_target(ultrafiltration_volume,0.20) + heparin_rx = findObjectById(right_obj,"_heparinRx") + heparin_right_arrow = findObjectById(heparin_rx, "_rightArrow") + squish.mouseClick(heparin_right_arrow) + heparin_obj = squish.waitForObject(names.o_LabelUnitValueAdjuster_LabelUnitValueAdjuster) + heparin_bolus = findObjectById(heparin_obj,"_heparinBolusVolume") + set_value_based_on_target(heparin_bolus, 0.2) + set_value_based_on_target(names.o_heparinDispensingRate_LabelUnitValueAdjuster,0.3) + set_value_based_on_target(names.o_heparinDeliveryDuration_LabelUnitValueAdjuster, 60) + squish.mouseClick(squish.waitForObject(names.o_confirmButton_ConfirmButton)) select_different_dropdown(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox,config.ACID_CONCENTRATE,2) - set_value_based_on_target(names.o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster,37.0) select_different_dropdown(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox,config.DIALYZER_TYPE,2) - set_value_based_on_target(names.o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster, 200) - set_value_based_on_target(names.o_PreTreatmentCreate_bpMeasurementIntervalControl_ValueAdjusterCustom,5.0) select_different_dropdown(names.o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox,config.BICARBONATE,0) - Validatebutton = setObjectText(obj = names.o_preTreatmentStack_Text, text =config.VALIDATE) - squish.mouseClick(squish.waitForObject(Validatebutton)) - td.td_Treatment_Parameters_Validation( vAccepted = 1, - vBloodFlowRateRejectReason = 0, - vDialysateFlowRateRejectReason = 0, - vTreatmentDurationRejectReason = 0, - vSalineBolusVolumeRejectReason = 0, - vHeparinStopTimeRejectReason = 0, - vHeparinTypeRejectReason = 0, - vAcidConcentrateRejectReason = 0, - vBicarbonateConcentrateRejectReason = 0, - vDialyzerTypeRejectReason = 0, - vBloodPressureMeasureIntervalRejectReason = 0, - vRinsebackFlowRateRejectReason = 0, - vRinsebackVolumeRejectReason = 0, - vArterialPressureLimitWindowRejectReason = 0, - vVenousPressureLimitWindowRejectReason = 0, - vVenousPressureLimitAsymtrcRejectReason = 0, - vTransmembranePressureLimitWindowRejectReason = 0, - vDialysateTempRejectReason = 0, - vHeparinDispensingRateRejectReason = 0, - vHeparinBolusVolumeRejectReason = 0 - ) - confirm = squish.waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton, 3000) - squish.mouseClick(confirm) + Nextbutton = setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) + squish.mouseClick(squish.waitForObject(Nextbutton)) + set_value_based_on_target(names.o_PreTreatmentCreate_sodium_LabelUnitValueAdjuster, 139) + set_value_based_on_target(names.o_PreTreatmentCreate_bicarbonate_LabelUnitValueAdjuster, 35) + set_value_based_on_target(names.o_PreTreatmentCreate_fluidBolusVolume_LabelUnitValueAdjuster,300) + set_value_based_on_target(names.o_PreTreatmentCreate_primeRinsebackVolume_LabelUnitValueAdjuster,310) + confirm_button = squish.waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton) + squish.mouseClick(confirm_button) + td.td_Treatment_Parameters_Validation( vAccepted = 1, + vTreatmentModalityRejectReason = 1, + vHDFTreatmentModeRejectReason = 0, + vBloodFlowRateRejectReason = 0, + vDialysateFlowRateRejectReason = 0, + vTreatmentDurationRejectReason = 0, + vHeparinDeliveryDurationRejectReason = 0, + vHeparinTypeRejectReason = 0, + vDryBicarbCartSizeRejectReason = 0, + vSodiumRejectReason = 0, + vBicarbonateRejectReason = 0, + vDialyzerTypeRejectReason = 0, + vFluidBolusVolumeRejectReason = 0, + vBloodPressureMeasureIntervalRejecteason = 0, + vRinsebackVolumeRejectReason = 0, + vHepatitusBStatusRejectReason = 0, + vAcidConcentrateIndextRejectReason = 0, + vSubstitutionFluidVolumeRejecteason = 0, + vHeparinBolusVolumeRejectReason = 0, + vHeparinDispensingRateRejecteason = 0, + vDialysateTempRejectReason = 0, + vAcidConcentrateConversionFactorRejectReason = 0, + vUFPreWeightRejectReason = 0, + vUFEstimatedTargetWeightRejectReason = 0, + vUFVolumeRejectReason = 0 + ) test.endSection() def findAllObjectsById(parent, target_id): Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -r84fec1666e63db5d9cf5ab57113c467376aca2d6 -r861179f9b370bbbf286228837d52489d184231dc --- suite_leahi/shared/scripts/names.py (.../names.py) (revision 84fec1666e63db5d9cf5ab57113c467376aca2d6) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision 861179f9b370bbbf286228837d52489d184231dc) @@ -234,7 +234,7 @@ o_PreTreatmentSampleStack_button_TouchRect = {"container": o_preTreatmentStack_PreTreatmentSampleStack_PreTreatmentWaterSample, "id": "_button", "type": "TouchRect", "unnamed": 1 } o_preTreatmentStack_repeater_Repeater = {"container": o_preTreatmentStack_PreTreatmentStack, "id": "repeater", "type": "Repeater", "unnamed": 1 } o_PreTreatmentCreate_bpMeasurementIntervalControl_ValueAdjusterCustom = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bpMeasurementIntervalControl", "type": "ValueAdjusterCustom", "unnamed": 1 } -o_notification_bar = {"container": o_Overlay, "objectName": "NotificationBar", "type": "NotificationBarSmall" } +o_notification_bar ={"container": mainTreatmentScreen, "objectName": "_notification", "type": "NotificationBarSmall"} o_treatmentHome_editButton_IconButton = {"container": mainTreatmentScreen, "id": "_editButton", "type": "IconButton", "unnamed": 1 } o_treatmentHome_treatmentPressures_TreatmentPressures = {"container": mainTreatmentScreen, "objectName": "treatmentPressures", "type": "TreatmentPressures" } o_valueAdjuster_ValueAdjuster = {"container": o_Overlay, "objectName": "_valueAdjuster", "type": "ValueAdjuster", } @@ -254,4 +254,33 @@ o_ufRate_LabelUnitText = {"container": o_Overlay, "objectName": "_ufRate", "type": "LabelUnitText" } o_newTreatmentDuration_LabelUnitText = {"container": o_Overlay, "objectName": "_newTreatmentDuration", "type": "LabelUnitText" } +#New design create Rx +o_createHDTreatment_TouchRect = {"container": o_standByScreen_MainHome, "id": "_createHDTreatment", "type": "TouchRect", "unnamed": 1 } +o_PreTreatmentCreate_leftColumn_Column = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_leftColumn", "type": "Column", "unnamed": 1 } +o_PreTreatmentCreate_rightColumn_Column = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_rightColumn", "type": "Column", "unnamed": 1 } +o_LabelUnitValueAdjuster_LabelUnitValueAdjuster = {"container": o_Overlay, "objectName": "_LabelUnitValueAdjuster", "type": "LabelUnitValueAdjuster" } +o_heparinDispensingRate_LabelUnitValueAdjuster = {"container": o_Overlay, "objectName": "_LabelUnitValueAdjuster", "id": "_heparinDispensingRate", "type": "LabelUnitValueAdjuster" } +o_heparinDeliveryDuration_LabelUnitValueAdjuster = {"container": o_Overlay, "objectName": "_LabelUnitValueAdjuster", "id": "_heparinDeliveryDuration", "type": "LabelUnitValueAdjuster" } +o_PreTreatmentCreate_leftColumn_Column_2 = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_leftColumn", "type": "Column", "unnamed": 1 } +o_PreTreatmentCreate_rightColumn_Column_2 = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_rightColumn", "type": "Column", "unnamed": 1 } +o_PreTreatmentCreate_sodium_LabelUnitValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_sodium", "objectName": "_LabelUnitValueAdjuster", "type": "LabelUnitValueAdjuster" } +o_PreTreatmentCreate_bicarbonate_LabelUnitValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bicarbonate", "objectName": "_LabelUnitValueAdjuster", "type": "LabelUnitValueAdjuster" } +o_PreTreatmentCreate_fluidBolusVolume_LabelUnitValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_fluidBolusVolume", "objectName": "_LabelUnitValueAdjuster", "type": "LabelUnitValueAdjuster" } +o_PreTreatmentCreate_primeRinsebackVolume_LabelUnitValueAdjuster= {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_primeRinsebackVolume", "objectName": "_LabelUnitValueAdjuster", "type": "LabelUnitValueAdjuster" } +o_PreTreatmentCreate_listView_ListView = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_listView", "type": "ListView", "unnamed": 1 } +o_createHDFTreatment_TouchRect = {"container": o_standByScreen_MainHome, "id": "_createHDFTreatment", "type": "TouchRect", "unnamed": 1 } +o_PreTreatmentCreate_hdfTreatmentMode_LabelUnitContainer = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_hdfTreatmentMode", "type": "LabelUnitContainer", "unnamed": 1 } +o_PreTreatmentCreate_treatmentModalityComboBox_BaseComboBox = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_treatmentModalityComboBox", "type": "BaseComboBox", "unnamed": 1 } +o_vitals_close_btn = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1 } +o_treatmentHome_1_Request_is_not_allowed_in_the_current_operating_mode_Text = {"container": mainTreatmentScreen, "text": "[1] Request is not allowed in the current operating mode", "type": "Text", "unnamed": 1, "visible": True} + + + + + + + + + + Index: suite_leahi/tst_edit_parameters/test.py =================================================================== diff -u -r3b1585c8cf24c14498f1ebd55f571d09f55e472e -r861179f9b370bbbf286228837d52489d184231dc --- suite_leahi/tst_edit_parameters/test.py (.../test.py) (revision 3b1585c8cf24c14498f1ebd55f571d09f55e472e) +++ suite_leahi/tst_edit_parameters/test.py (.../test.py) (revision 861179f9b370bbbf286228837d52489d184231dc) @@ -193,8 +193,10 @@ H2_arterial_long = 0 , H14_venous_long = 0 , tmp_pressure = 43 , + tmp_long = 0.0 , tmp_min = -640 , - tmp_max = 210) + tmp_max = 210, + barometric = 0.0 ) pressureEdit = waitForObject(names.o_treatmentHome_treatmentPressures_TreatmentPressures) pressureEditButton = utility.findObjectById(pressureEdit, "_editButton") @@ -208,11 +210,11 @@ tmpwindow_value = waitForObject(names.o_tmpWindow_LabelUnitValueAdjuster) tmp_value =tmpwindow_value.value test.log(str(tmp_value)) - utility.set_value_based_on_target(names.o_arterialWindow_LabelUnitValueAdjuster,80) + utility.set_value_based_on_target(names.o_arterialWindow_LabelUnitValueAdjuster,200) arterialwindow_value = waitForObject(names.o_arterialWindow_LabelUnitValueAdjuster) change_arterialwindow_value =arterialwindow_value.value test.log(str(change_arterialwindow_value)) - utility.set_value_based_on_target(names.o_venousWindow_LabelUnitValueAdjuster,60) + utility.set_value_based_on_target(names.o_venousWindow_LabelUnitValueAdjuster,140) venouswindow_value = waitForObject(names.o_venousWindow_LabelUnitValueAdjuster) change_venouswindow_value =venouswindow_value.value test.log(str(change_venouswindow_value)) @@ -225,21 +227,22 @@ payload = conversions.integer_to_bytearray(0) payload += conversions.integer_to_bytearray(1) td.cmd_send_general_response(message_id =MsgIds.MSG_ID_TD_PRESSURE_LIMITS_CHANGE_RESPONSE.value, - reason=0, + reason=1, accepted=1, is_pure_data = False, has_parameters = True, parameters_payload= payload) - rejectionReason = utility.get_object_from_names(names.o_notification_bar) - test.compare(rejectionReason.text, "[1] Request is not allowed in the current operating mode", "Rejection Reason text should be :" + str("[1] Request is not allowed in the current operating mode")) - + mouseClick(waitForObject(names.o_vitals_close_btn)) + rejectionReason = waitForObject(names.o_notification_bar).text + test.compare(rejectionReason, "[1] Request is not allowed in the current operating mode", "Rejection Reason text should be :" + str("[1] Request is not allowed in the current operating mode")) + mouseClick(pressureEditButton) # handle sent messages from UI mouseClick(waitForObject(names.o_confirmButton_TouchRect)) #rejection reason 0 payload = conversions.integer_to_bytearray(1) payload += conversions.integer_to_bytearray(0) - td.cmd_send_general_response(message_id =MsgIds.MSG_ID_TD_PRESSURE_LIMITS_CHANGE_RESPONSE.value, + td.cmd_send_general_response(message_id =MsgIds.MSG_ID_TD_PRESSURE_LIMIT_WIDEN_RESPONSE.value, reason=0, accepted=1, is_pure_data = False, @@ -636,7 +639,9 @@ utils.tstStart(__file__) startApplication(config.AUT_NAME) td.td_operation_mode(TDOpModes.MODE_STAN.value) - mouseClick(waitForObject(names.o_createTreatmentRect_TouchRect)) + hemodialysis = waitForObject(names.o_createHDTreatment_TouchRect) + hemodialysis_btn = utility.findChildByText(hemodialysis, "Hemodialysis") + mouseClick(hemodialysis_btn) td.td_operation_mode(TDOpModes.MODE_PRET.value) utility.verify_create_treatment_parameters() check_pressure_edit_maintreatment()