Index: shared/scripts/configuration/config.py =================================================================== diff -u -r9f356820bd80a1b81b55dd5a1221a77a8cd6d27a -rba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438 --- shared/scripts/configuration/config.py (.../config.py) (revision 9f356820bd80a1b81b55dd5a1221a77a8cd6d27a) +++ shared/scripts/configuration/config.py (.../config.py) (revision ba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438) @@ -20,6 +20,29 @@ COMMON_PATH = os.environ['HOME']+"/Projects" +#instructions_imagelocation +INSTRUCTION_CONF_LOCATION = "/home/denali/Projects/application/resources/settings/Instructions/Instructions.conf" +IMAGE_LOCATION = "file:///home/denali/Projects/application/resources/settings/Instructions/" +EXPECTED_IMAGE_LOCATION = "/home/denali/Projects/application/resources/settings/Instructions/" +SERVICE_CONF_LOCATION = os.environ['HOME']+"/Projects/application/resources/settings/Service.conf" +TREATMENT_LOG_LOCATION = '/home/denali/Desktop/sd-card/treatment/*.log' + +ACCEPTED = True +REJECTED = False +ENABLED = True +DISABLED = False +CURRENT_COLOR = '#000000' +COMPLETE_COLOR= '#4290ec' +ENABLED_COLOR = '#fcfcfc' +INCOMPLETE_COLOR = '#607a91' +OUT_OF_RANGE_COLOR = "#c53b33" + +COLOR_CODES = {"Aqua": "#81ffff", "Blue": "#017dea", "Blue 2": "#1090d5", "Green": "#29fd2d", "Grey": "#d3d3d3", + "Lavender": "#db98f5", "Light Blue": "#acd7f1", "Light Teal": "#29f1da","Lime": "#b7fc36", + "Magenta":"#fd28fd", "Orange": "#f2721c", "Peach":"#f1979a", "Red": "#c53b33", "Rose":"#fc178d", + "Slate blue":"#7f7ffa", "Violet": "#6435c9", "White": "#ffffff", "Yellow": "#fcfc4d"} + + #create custom treatment HIGHER_VALUE_OF_BLOOD_FLOW_RATE = 500 LOWER_VALUE_OF_BLOOD_FLOW_RATE = 100 @@ -35,321 +58,24 @@ VENOUS_VALUE_570 = 570 POSITIVE_BUFFER = 10 NEGATIVE_BUFFER = -10 +PATIENT_ID = "demopatientid" +HEPARIN_TYPE = "UFH 1,000 IU/mL" +ACID_CONCENTRATE = ["Fres. Naturalyte", "08-1251-1", "08-2251-0", "08-3251-9"] +BICARBONATE_CONCENTRATE = "Fres. Centrisol" +DIALYZER_TYPE = ["BB Diacap Pro 13H", "BB Diacap Pro 16H", "BB Diacap Pro 19H", "F Optiflux F160NRe", "F Optiflux F180NRe"] +TREATMENT_UNHIGHLIGHTED_COLOR = "#000000" +TREATMENT_HIGHLIGHTED_COLOR = "#135088" + +OPERATIONAL_PARAMETERS = {"Heparin Type": HEPARIN_TYPE, "Acid Concentrate": "Fres. Naturalyte", + "Bicarbonate Concentrate": BICARBONATE_CONCENTRATE, "Dialyzer Type": "BB Diacap Pro 16H"} -ALARM_ID_AND_MESSAGES = { - 1: "Stuck button POST failure.\nStop or Off button detected to be pressed for at least 1 second during test shortly after power up.", - 2: "HD FPGA POST failure.", - 3: "DG FPGA POST failure.", - 4: "HD Watchdog POST failure.", - 5: "DG Watchdog POST failure.", - 6: "UI communication POST failure.\nUI failed to communicate within a reasonable time after power up.", - 7: "Real-time clock configuration error.", - 8: "HD accelerometer failed POST.", - 9: "DG accelerometer failed POST." , - 10: "RTC or MCU timer inaccurate.", - 11: "DG heaters failed POST.", - 12: "HD firmware image integrity POST test failed.", - 13: "DG firmware image integrity POST test failed.", - 14: "HD blood flow invalid calibration.", - 15: "HD dialysate flow invalid calibration.", - 16: "HD alarm audio failed POST.", - 17: "HD UI POST failed.", - 18: "DG load cells invalid calibration record.", - 19: "DG flow sensors invalid calibration record.", - 20: "DG conductivity sensors invalid calibration record.", - 21: "DG drain line volume invalid calibration record.", - 22: "DG reservoirs invalid calibration record.", - 23: "DG acid concentrate calibration record.", - 24: "DG bicarb concentrate calibration record.", - 25: "DG accelerometer invalid calibration record.", - 26: "HD accelerometer invalid calibration record.", - 27: "HD blood flow invalid calibration record.", - 28: "HD dialyzer flow invalid calibration record.", - 29: "HD heparin force sensor invalid calibration record.", - 30: "HD Software fault.\nSoftware found itself in an unexpected state.", - 31: "Blood pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running.", - 32: "Blood pump failed motor off check.\nMeasured speed while commanded off.", - 33: "Blood pump failed motor direction check.\nMeasured vs commanded.", - 34: "Blood pump failed rotor speed check.\nMismatch with rotor and motor speeds.", - 35: "Dialysis inlet pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running.", - 36: "Dialysis inlet pump failed motor off check.\nMeasured speed while commanded off.", - 37: "Dialysis inlet pump failed motor direction check.\nMeasured vs commanded.", - 38: "Dialysis inlet pump failed rotor speed check.\nMismatch with rotor and motor speeds.", - 39: "Dialysis outlet pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running.", - 40: "Dialysis outlet pump failed motor off check.\nMeasured speed while commanded off.", - 41: "Dialysis outlet pump failed motor direction check.\nMeasured vs commanded.", - 42: "Dialysis outlet pump failed rotor speed check.\nMismatch with rotor and motor speeds.", - 43: "Watchdog expired error.\nWatchdog was not \"pet\" within the appropriate time.", - 44: "User interface communication timeout.", - 45: "Too many bad CRCs detected on received system messages.", - 46: "System message that required acknowledgment was not acknowledged.", - 47: "Ultrafiltration rate is too high error during treatment.", - 48: "Ultrafiltration volume accuracy error during treatment.", - 49: "HD FPGA communication down for too long.", - 50: "FPGA not accepting commanded valve states.", - 51: "Blood pump failed motor speed check.\nMeasured vs commanded.", - 52: "Dialysate inlet pump failed motor speed check.\nMeasured vs commanded.", - 53: "Dialysate outlet pump failed motor speed check.\nMeasured vs commanded.", - 54: "HD critical data integrity check failed.", - 55: "DG critical data integrity check failed.", - 56: "HD accelerometer error (no readings or FPGA reports error).", - 57: "DG accelerometer error (no readings or FPGA reports error).", - 58: "HD valve homing failed.", - 59: "HD valve transition time out.", - 60: "HD valve not functional.", - 61: "HD valve current out of range.", - 62: "HD valve position out of target.", - 63: "FPGA reports failure reading arterial pressure sensor.", - 64: "FPGA reports failure reading venous pressure sensor.", - 65: "HD requests DG command with invalid parameter fault.", - 66: "HD blood leak sensor set point set failure.", - 67: "HD blood pump occlusion self-test failure alarm.", - 68: "HD active reservoir recirculation out of range.", - 69: "HD blood leak sensor invalid calibration record.", - 70: "HD arterial pressure self-test failure alarm." , - 71: "HD venous pressure self-test failure alarm.", - 72: "HD blood flow meter status check self-test failure alarm.", - 73: "HD dialysate flow meter status check self-test failure alarm.", - 74: "HD blood leak detector self-test failure alarm.", - 75: "HD syringe pump self-test failure alarm.", - 76: "HD monitored voltage is out of range.", - 77: "DG monitored voltage is out of range.", - 78: "HD syringe pump direction (from encoder) error.", - 79: "HD syringe pump direction (from controller) error.", - 80: "HD syringe pump fault reported by FPGA.", - 81: "HD syringe pump over travel error.", - 82: "HD syringe pump DAC write failure.", - 83: "HD syringe pump is running while the BP is off.", - 84: "HD venous pressure sensor not being read.", - 85: "HD pump track latch opened alarm.", - 86: "HD BP occlusion sensor not being read.", - 87: "DG heating invalid calibration record.", - 88: "DG concentrate pumps hall sensor out of range.", - 89: "HD BP occlusion sensor error.", - 90: "This alarm ID is available for use.", - 91: "HD No dialysate flow data receive in the last 3 seconds.", - 92: "DG conductivity sensor bad status.", - 93: "This alarm ID is available for use.", - 94: "This alarm ID is available for use.", - 95: "This alarm ID is available for use.", - 96: "Inlet water temperature in high range.", - 97: "Fill conductivity out of range.", - 98: "HD battery communication fault.", - 99: "HD syringe pump stall alarm.", - 100: "HD no cartridge self-test timeout.", - 101: "HD dry self-test timeout.", - 102: "Real-time clock communication error.", - 103: "HD non-volatile calibration group invalid record CRC.", - 104: "Air trap level sensors reporting illegal combination of air/fluid.", - 105: "DG non-volatile system group invalid record CRC.", - 106: "DG inlet water conductivity is greater than threshold.", - 107: "HD reports DG restarted fault.", - 108: "HD syringe pump ADC error.", - 109: "HD syringe pump volume check error.", - 110: "HD syringe pump speed check error.", - 111: "HD syringe pump not stopped in off state error.", - 112: "HD blood leak detector fault.", - 113: "HD arterial air bubble detector self-test failure.", - 114: "HD venous air bubble detector self-test failure.", - 115: "DG temperature sensor out of range.", - 116: "DG temperature sensor ADC out of range.", - 117: "DG primary heater internal temperature out of range.", - 118: "DG primary heater cold junction temperature out of range.", - 119: "DG trimmer heater internal temperature out of range.", - 120: "DG trimmer heater cold junction temperature out of range.", - 121: "DG main primary heater voltage out of range.", - 122: "DG small primary heater voltage out of range.", - 123: "DG trimmer heater voltage out of range.", - 124: "HD end of treatment alarm (high priority).", - 125: "Blood sitting too long after treatment stopped by user alarm (>5 min).", - 126: "HD blood leak detected alarm.", - 127: "Venous pressure too low during treatment." , - 128: "HD venous air bubble detected alarm.", - 129: "HD venous air bubble detected rinseback alarm.", - 130: "Venous pressure too high during treatment.", - 131: "Arterial pressure too low during treatment.", - 132: "Arterial pressure too high during treatment.", - 133: "DG fluid leak detected alarm.", - 134: "HD fluid leak detected alarm." , - 135: "HD experienced large acceleration.", - 136: "DG experienced large acceleration.", - 137: "HD tilt exceeds maximum.", - 138: "DG tilt exceeds maximum.", - 139: "HD AC power lost alarm.", - 140: "Dialysate generator communication timeout.", - 141: "Air trap fill timeout during treatment.", - 142: "Blood pump occlusion detected.", - 143: "DG dialysate temperature sensors drift timeout.", - 144: "DG software configuration record invalid CRC.", - 145: "Concentrate conductivity after adding acid out of range alarm.", - 146: "Dialysate conductivity out of range.", - 147: "Wait for the DG to produce dialysate.", - 148: "Inlet water temperature too high.", - 149: "Alarm ID available for use.", - 150: "Inlet water conductivity in high range.", - 151: "Inlet water conductivity in low range.", - 152: "Inlet water pressure in low range.", - 153: "HD prime completed high priority alarm.", - 154: "EEPROM operations (read, write, erase) failure.", - 155: "DG software configuration record invalid CRC.", - 156: "HW usage data (treatment time in HD and total consumed water in DG) failure.", - 157: "DG chemical disinfect prime acid line timeout.", - 158: "Inlet water temperature is in the low range.", - 159: "Dialysate inlet pump failed flow vs motor speed check.", - 160: "Blood pump rotor speed too high.", - 161: "This alarm ID is available for use.", - 162: "This alarm ID is available for use.", - 163: "HD sees primary load cell for reservoir 1 change too much too fast.", - 164: "HD sees primary load cell for reservoir 2 change too much too fast.", - 165: "HD in treatment rinseback operation timeout.", - 166: "HD in treatment re-circ sub-mode for too long.", - 167: "HD cartridge door opened alarm.", - 168: "HD active reservoir depletion timeout.", - 169: "Dialysate flow rate out of range.", - 170: "HD syringe empty alarm.", - 171: "HD syringe pump occlusion alarm.", - 172: "HD syringe pump not enough Heparin alarm.", - 173: "HD arterial air bubble detected alarm.", - 174: "HD arterial air bubble detected rinseback alarm.", - 175: "HD pump direction status error.", - 176: "HD active reservoir is full during treatment and DG not ready to switch reservoirs.", - 177: "DG software fault.\nSoftware found itself in an unexpected state.", - 178: "HD communication timeout.", - 179: "DG FPGA communication down for too long.", - 180: "DG load cell ADC error.", - 181: "DG load cells weight out of range for tare.", - 182: "DG load cells invalid calibration.", - 183: "DG invalid load cell value.", - 184: "Inlet or Outlet UV reactor not healthy.", - 185: "DG fan RPM out of range.", - 186: "DG concentrate pump fault.", - 187: "DG concentrate pump CP1 speed control error.", - 188: "DG concentrate pump CP2 speed control error.", - 189: "DG drain pump RPM out of range.", - 190: "DG drain pump off fault.", - 191: "DG flow rate out of upper range.", - 192: "DG flow rate out of lower range.", - 193: "RO pump flow rate out of range.", - 194: "DG RO pump duty cycle out of range.", - 195: "DG RO pump pressure out of range.", - 196: "DG temperature sensor error flag fault.", - 197: "DG temperature sensors ADC fault.", - 198: "DG heaters cold junction temperature out of range.", - 199: "DG heaters fault.", - 200: "DG thermistors/sensors temperature out of range.", - 201: "Inlet water quality is bad (temperature, conductivity, pressure).", - 202: "Inlet water pressure fault.", - 203: "Pressure sensor fault.", - 204: "RO rejection ratio out of range.", - 205: "Conductivity sensor fault.", - 206: "DG dialysate fill runs out of time.", - 207: "DG flow meter check failure alarm.", - 208: "DG primary heater on with no flow time out.", - 209: "DG drain circulation line timeout.", - 210: "HD battery pack detected an error.", - 211: "Blood sitting too long warning (>4 min).", - 212: "HD end of treatment alarm (user not acting to end treatment).", - 213: "HD prime completed medium priority alarm.", - 214: "HD Saline bolus volume check failure.", - 215: "HD rinseback volume check failure.", - 216: "HD end treatment sub-mode timeout alarm.", - 217: "HD blood prime volume check failure.", - 218: "HD syringe detected alarm.", - 219: "HD syringe pump syringe removed alarm.", - 220: "HD battery pack SOC is too low.", - 221: "HD Saline bag is empty.", - 222: "HD dialysate temperature too high alarm.", - 223: "HD dialysate temperature too low alarm.", - 224: "Treatment stopped by user action.", - 225: "HD end of treatment warning.", - 226: "HD prime completed low priority alarm.", - 227: "HD prime out of time alarm.", - 228: "HD time out on prime sub-mode purge air state.", - 229: "HD prime dialysate dialyzer time out alarm.", - 230: "HD prime dialysate bypass time out alarm.", - 231: "HD pre-treatment mode dry self-tests failure.", - 232: "HD pre-treatment mode wet self-tests failure.", - 233: "RTC battery low.", - 234: "RTC (i.e read time) or RAM operations failure (read or write).", - 235: "HD in treatment stopped sub-mode after rinseback completed (no escalation).", - 236: "HD needs new cartridge to be installed.", - 237: "HD prime saline dialyzer time out alarm.", - 238: "HD no cartridge loaded or installed improperly alarm.", - 239: "HD fail to remove cartridge alarm.", - 240: "Bicarb conductivity out of range during bicarb pump check alarm.", - 241: "DG reservoir drain time out.", - 242: "DG reservoir fill time out.", - 243: "DG reservoir leak time out.", - 244: "DG temperature sensors difference out of range.", - 245: "DG heat disinfect target temperature time out (could not reach to temperature).", - 246: "DG heat disinfect inlet pressure and temperature sensors out of range.", - 247: "DG heat disinfect inlet conductivity and temperature out of range.", - 248: "DG chemical disinfect could not reach to target temperature.", - 249: "DG chemical disinfect inlet pressure and temperature sensors out of range.", - 250: "DG chemical disinfect inlet conductivity and temperature out of range.", - 251: "HD invalid system record.", - 252: "HD invalid service record.", - 253: "DG invalid system record.", - 254: "DG invalid service record.", - 255: "HD and UI software builds are not compatible.", - 256: "HD and DG software builds are not compatible.", - 257: "DG FPGA power out timeout.", - 258: "HD FPGA power out timeout.", - 259: "HD temperatures out of range.", - 260: "UI POST Application Integrity (Sha256Sum) failure.", - 261: "UI POST CANBus failure.", - 262: "UI POST Display failure.", - 263: "UI POST Touch failure.", - 264: "UI POST SD-Card failure.", - 265: "UI POST RTC failure.", - 266: "UI POST WiFi failure.", - 267: "UI POST Bluetooth failure.", - 268: "UI POST Ethernet failure.", - 269: "UI POST Sound failure.", - 270: "HD POST Safety Shutdown failure.", - 271: "DG POST Safety Shutdown failure.", - 272: "HD Fan RPM out of range.", - 273: "HD measured blood pump flow rate is out of range.", - 274: "HD measured dialysate inlet pump flow rate is out of range.", - 275: "HD arterial pressure sensor is reading out of range.", - 276: "HD venous pressure sensor is reading out of range.", - 277: "HD BP occlusion sensor is reading out of range.", - 278: "HD active reservoir weight out of range.", - 279: "DG dialysate drain time out.", - 280: "HD arterial pressure sensor read timeout error.", - 281: "Acid concentration bottle low volume alarm.", - 282: "Bicarbonate concentration bottle low volume alarm.", - 283: "DG load cells weight out of range.", - 284: "DG load cells primary/back up drift out of range.", - 285: "HD treatment recirculate timeout warning.", - 286: "HD treatment rinseback complete timeout warning.", - 287: "HD processor clock speed checks against FPGA clock failure.", - 288: "DG trimmer heater on with flow timeout.", - 289: "DG dialysate or concentrate caps not closed." - } - -ALARM_PRIORITIES = {1: "LOW", 2: "MEDIUM", 3: "HIGH"} +#Alarm List NUM_OF_ALARM_PRIORITIES = 4 # Total number of alarm priorities -ACCEPTED = True -REJECTED = False -ALARM_LIST_TITLE = "Alarm list" - NUM_OF_REQUEST_REJECT_REASONS = 43 NUM_OF_MSG_ID = 289 -UNDEFINED_ALARM_ID_MSG = "ALARM_ID_UNDEFINED" -ALARM_TITLE = "Alarm" - - ALARM_ID_NO_ALARM = 0 ALARM_ID_OUT_OF_RANGE = 290 -ALARM_PRIORITY_OPTIONS = { - 0 : 'ALARM_PRIORITY_NONE' , - 1 : 'ALARM_PRIORITY_LOW' , - 2 : 'ALARM_PRIORITY_MEDIUM', - 3 : 'ALARM_PRIORITY_HIGH', -} - # alarm colors ALARMS_COLORS_HEADER = { "ALARM_PRIORITY_NONE" : "#438feb", @@ -386,38 +112,11 @@ ALARM_BUTTONS_RINSEBACK_RESUME_END = ALARM_BUTTONS_RESUME_RINSEBACK_END ALARM_BUTTONS_END_RESUME_RINSEBACK = ALARM_BUTTONS_RESUME_RINSEBACK_END -CURRENT_COLOR = '#000000' -COMPLETE_COLOR= '#4290ec' -ENABLED_COLOR = '#fcfcfc' -INCOMPLETE_COLOR = '#607a91' -OUT_OF_RANGE_COLOR = "#c53b33" - #standby mode -BLOOD_PRIMING_TEXT = "Blood Priming" -LIQUID_UNIT = "mL" -BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" SALINE_BOLUS_CUMULATIVE = 300 -SALINE_UNIT = "mL" - UF_MINIMUM_VALUE = 0 UF_MAXIMUM_VALUE = 600 -ULTRAFILTRATION_PAUSED_TEXT = "Ultrafiltration Paused" -RESUME_TEXT = "RESUME ULTRAFILTRATION" -EDIT_TEXT = "EDIT ULTRAFILTRATION VOLUME" -TITLE_TEXT = "ULTRAFILTRATION VOLUME (L)" -#main treatment pressure -PRESSURE_TITLE = "PRESSURES" -ARTERIAL_TITLE = "Arterial" -VENOUS_TITLE = "Venous" -VENOUS_UOM = "mmHg" -ARTERIAL_UOM = "mmHg" -LOW_TEXT = "LOW" -HIGH_TEXT = "HIGH" -ACCEPTED = True -REJECTED = False -NUM_OF_REQUEST_REJECT_REASONS = 43 - #pressure PRESSURE_STEPS = 10 ARTERIAL_PRESSURE_MINIMUM = -400 @@ -445,47 +144,24 @@ BLOOD_FLOW_MAXIMUM_VALUE = 500 DIALYSATE_FLOW_MINIMUM_VALUE = 0 DIALYSATE_FLOW_MAXIMUM_VALUE = 0 # Seems to be bug. need change -FLOW_UNIT = "mL/min" -BLOOD_FLOW_TEXT = "blood" -DIALYSATE_FLOW_TEXT = "dialysate" +DIALYSATE_FLOW_BUFFER = 50 +DIALYSATE_FLOW_SLIDER_WIDTH_BUFFER = 60 #main treatment screen -VITALS_TITLE = "VITALS" -OUT_OF_RANGE_COLOR = "#c53b33" -IN_RANGE_COLOR = "#fcfcfc" SYSTOLIC_LOWER_LIMIT = 60 SYSTOLIC_UPPER_LIMIT = 250 DIASTOLIC_LOWER_LIMIT = 40 DIASTOLIC_UPPER_LIMIT = 200 HEART_RATE_LOWER_LIMIT = 40 HEART_RATE_UPPER_LIMIT = 180 -HEART_RATE_TITLE = "Heart Rate" -BLOOD_PRESSURE_TITLE = "Blood Pressure" -BLOOD_PRESSURE_UNIT = "mmHg" -HEART_RATE_UNIT = "BPM" BLOOD_PRIMING_RANGE = 300 BLOOD_PRIMING_TARGET_MAXIMUM = 300 -#tst_treatment_monitoring -FLOWS_TEXT = "FLOWS" -BLOOD_UNIT = "mL/min" -DIALYSATE_TEXT = "Dialysate" -BLOOD_TEXT = "Blood" -VITALS_TEXT = "VITALS" -BLOOD_PRESSURE_TEXT = "mmHg" -HEARTRATE_UNIT = "BPM" -PRESSURE_TEXT = "PRESSURE (mmHg)" -ARTEREAL_TEXT = "Arterial" -VENOUS_TEXT = "Venous" -TIME_DURATION_TEXT = "Time Remaining" -ULTRAFILTERATION_TEXT = "ULTRAFILTRATION VOLUME (L)" -SALINE_BOLUS = "SALINE BOLUS" -VOLUME_DELIVERED = "Volume Delivered" -CUMULATIVE_DELIVERED = "Cumulative Delivered" -HEPARIN_TEXT = "HEPARIN" -VOLUME_DELIVERED = "Volume Delivered" +#tst_pretreatment_screens +NUM_OF_PRETREATMENT_BULLETS = len(PRE_TREATMENT_SCREENS) #patient id +KEYBOARD_SWITCH = ["ABC", "&123"] PATIENT_ID_COMBINATION = { "qwerty" : "qwerty", "sampleid" : "sampleid", @@ -497,7 +173,6 @@ "5432@qwerty" : "5432qwerty" } -KEYBOARD_SWITCH = ["ABC", "&123"] #dictionary consist of custom treatment values CREATE_CUSTOM_TREATMENT = { @@ -517,7 +192,6 @@ "Rinseback Rate" : 100, "Venous Pressure Limit High" : 590, "Venous Pressure Limit Low": 560 - } #dictionary consist of slider values of treatment parameters @@ -574,9 +248,6 @@ 9 : {"uf_maximum" : 290, "uf_minimum" : 125}, } -#tst_pretreatment_screens -NUM_OF_PRETREATMENT_BULLETS = len(PRE_TREATMENT_SCREENS) - #dictionary contains saline cumulative and saline delivered value #key : saline cumulative value. #value: saline delivered value @@ -596,30 +267,6 @@ } -#tst_pretreatment_screens color palettes -CURRENT_COLOR = '#000000' -COMPLETE_COLOR= '#4290ec' -ENABLED_COLOR = '#fcfcfc' -INCOMPLETE_COLOR = '#607a91' - -#pre-treatment_priming -NOT_VISIBLE = False -VISIBLE = True -FOCUS = True -NOT_IN_FOCUS = False -TIME_OUT_DURATION_300 = 300 -TIME_OUT_DURATION_200 = 200 -TIME_OUT_DURATION_100 = 100 -COUNT_DOWN_TIME_100 = 100 -MINIMUM_COUNTDOWN_TIME = 0 -ENABLED = True -DISABLED = False -CONSUMABLE_SELF_TEST_BICARB_PUMP_CHECK_STATE = 3 - -#Filter Flush -ACCEPTED = True -REJECTED = False - # pretreatment_patient_connection SYSTOLIC_PRESSSURE_120 = 120 SYSTOLIC_PRESSSURE_113 = 113 @@ -648,12 +295,6 @@ HEART_RATE_VAL_110 = 110 HEART_RATE_VAL_181 = 181 HEART_RATE_VAL_200 = 200 -SYSTOLIC_LOWER_LIMIT = 60 -SYSTOLIC_UPPER_LIMIT = 250 -DIASTOLIC_LOWER_LIMIT = 40 -DIASTOLIC_UPPER_LIMIT = 200 -HEART_RATE_LOWER_LIMIT = 40 -HEART_RATE_UPPER_LIMIT = 180 UF_MINIMUM_SLIDER_WIDTH = -2 UF_MAXIMUM_SLIDER_WIDTH = 638.00 UF_VALID_RANGE = 700 @@ -673,94 +314,8 @@ "OPTION_12" : {"uf_maximum" : 1250, "uf_minimum" : 0}, } -RESET_BINARY = "0" -SET_BINARY = "1" #Message binaries appending with for easy identification -ACK_REQ_STATUS = 'Ack Req' -ACK_BAK_STATUS = 'Ack Bak' -#Setting -CLEAR_ALARM_CONDITION_TEXT = "Clear Alarm Condition" -EXPORT_TEXT ="Export" -DEVICE_SETTINGS_TEXT = "Device Settings" -DEVICE_SETTINGS_SCREEN_PARAMETER = ["Information", "Volume And Brightness", "Wi-Fi", "Bluetooth Cuff", "Dialysate Generator Settings", "Services"] -SettingsHome_Treatment_Text = "Treatment" -SettingsHome_Manager_Text = "Manager" -SettingsHome_Settings_Text = "Settings" - -#Information - -INFORMATION_TITLES = ["Information", "Versions"] -INFORMATION_PARAMETERS = ["Information", "UI Version", "HD Version", "HD FPGA Version", "HD Serial Number", "DG Version", "DG FPGA Version", "DG Serial Number"] -SERIVCES_TITLE = "Services" -SERVICES_PARAMETERS = ["HD Last Service Date", "HD Next Service Date", "DG Last Service Date", "DG Next Service Date"] - -ENABLED = True -DISABLED = False - -KEYBOARD_SWITCH = ["ABC", "&123"] - #create custom treatment -PATIENT_ID = "demopatientid" -TREATMENT_TITLE = "Create a Custom Treatment" -HEPARIN_TYPE = "UFH 1,000 IU/mL" -ACID_CONCENTRATE = ["Fres. Naturalyte", "08-1251-1", "08-2251-0", "08-3251-9"] -BICARBONATE_CONCENTRATE = "Fres. Centrisol" -DIALYZER_TYPE = ["BB Diacap Pro 13H", "BB Diacap Pro 16H", "BB Diacap Pro 19H", "F Optiflux F160NRe", "F Optiflux F180NRe"] -CONFIRM_TREATMENT_TITLE = "Confirm Treatment" -PRESCRIPTION_TITLE = "PRESCRIPTION" -OPERATING_PARAMETERS_TITLE = "OPERATING PARAMETERS" -COLOR_CODES = {"Aqua": "#81ffff", "Blue": "#017dea", "Blue 2": "#1090d5", "Green": "#29fd2d", "Grey": "#d3d3d3", - "Lavender": "#db98f5", "Light Blue": "#acd7f1", "Light Teal": "#29f1da","Lime": "#b7fc36", - "Magenta":"#fd28fd", "Orange": "#f2721c", "Peach":"#f1979a", "Red": "#c53b33", "Rose":"#fc178d", - "Slate blue":"#7f7ffa", "Violet": "#6435c9", "White": "#ffffff", "Yellow": "#fcfc4d"} - -CURRENT_COLOR = '#000000' -COMPLETE_COLOR= '#4290ec' -ENABLED_COLOR = '#fcfcfc' -INCOMPLETE_COLOR = '#607a91' -PATIENT_ID_TEXT = "Patient ID" -PATIENT_ID = "demopatientid" -BLOOD_FLOW_RATE = "Blood Flow Rate" -DIALYSATE_FLOW_RATE = "Dialysate Flow Rate" -DURATION = "Duration" -HEPARIN_DISPENSING_RATE = "Heparin Dispensing Rate" -HEPARIN_BOLUS_VOLUME = "Heparin Bolus Volume" -HEPARIN_STOP_TIME = "Heparin Stop Time" -SALINE_BOLUS_VOLUME = "Saline Bolus Volume" -HEPARIN_TYPE_TITLE = "Heparin Type" -SALINE_BOLUS_TITLE = "Saline Bolus" -ACID_CONCENTRATE_TITLE = "Acid Concentrate" -BICARBONATE_CONCENTRATE_TITLE = "Bicarbonate Concentrate" -DIALYZER_TYPE_TITLE = "Dialyzer Type" -DIALYSATE_TEMPERATURE = "Dialysate Temperature" -BLOOD_PRESSURE_MEASUREMENT_INTERVAL = "Blood Pressure Measurement Interval" -RINSEBACK_FLOW_RATE = "Rinseback Flow Rate" - -CREATE_TREATMENT_PARAMETERS = ["Blood Flow Rate", "Dialysate Flow Rate", "Duration","Heparin Dispensing Rate", - "Heparin Bolus Volume","Heparin Stop Time", "Saline Bolus", "Dialysate Temperature", - "Blood Pressure Measurement Interval", "Rinseback Flow Rate"] -TREATMENT_UNHIGHLIGHTED_COLOR = "#000000" -TREATMENT_HIGHLIGHTED_COLOR = "#135088" -OFF_TEXT = "OFF" -BACK_TEXT = "BACK" -CONTINUE_TEXT = "CONTINUE" - -PRESCRIPTION_DETAILS = { - "Blood Flow Rate": "mL/min", "Dialysate Flow Rate": "mL/min", - "Duration": "min", "Heparin Dispensing Rate": "mL/hr", - "Heparin Bolus Volume": "mL", "Heparin Stop Time": "min", - "Saline Bolus Volume": "mL", - "Dialysate Temperature": "°C", "Arterial Pressure Limit Low": "mmHg", - "Arterial Pressure Limit High": "mmHg","Blood Pressure Measure Interval":"min", - "Rinseback Rate" : "mL/min", "Venous Pressure Limit High": "mmHg", - "Venous Pressure Limit Low": "mmHg" -} - -OPERATIONAL_PARAMETERS = {"Heparin Type": HEPARIN_TYPE, "Acid Concentrate": "Fres. Naturalyte", - "Bicarbonate Concentrate": BICARBONATE_CONCENTRATE, "Dialyzer Type": "BB Diacap Pro 16H"} - - -#create custom treatment HIGHER_VALUE_OF_BLOOD_FLOW_RATE = 500 LOWER_VALUE_OF_BLOOD_FLOW_RATE = 100 STEP_VALUE_OF_BLOOD_FLOW_RATE = 25 @@ -776,126 +331,7 @@ POSITIVE_BUFFER = 10 NEGATIVE_BUFFER = -10 -#dictionary consist of custom treatment values -CREATE_CUSTOM_TREATMENT = { - "Blood Flow Rate": 250, - "Dialysate Flow Rate": 400, - "Duration": 270, - "Heparin Dispensing Rate": 0.5, - "Heparin Bolus Volume": 1, - "Heparin Stop Time": 100, - "Saline Bolus Volume": 200, - "Dialysate Temperature": 37, - "Blood Pressure Measurement Interval": 40, - "Rinseback Flow Rate": 100, - "Arterial Pressure Limit Low" : -30, - "Arterial Pressure Limit High" : 0, - "Blood Pressure Measure Interval" : 40, - "Rinseback Rate" : 100, - "Venous Pressure Limit High" : 590, - "Venous Pressure Limit Low": 560 - -} -#dictionary consist of slider values of treatment parameters -CREATE_TREATMENT_PARAMETER_RANGE = { - "Blood Flow Rate": [100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 475, 500], - "Dialysate Flow Rate": [100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600], - "Duration": [60, 75, 90, 105, 120, 135, 150, 165, 180, 195, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, 390, 405, 420, 435, 450, 465, 480], - "Heparin Dispensing Rate": [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 0], - "Heparin Bolus Volume": [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 0], - "Heparin Stop Time": [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 0], - "Saline Bolus Volume": [100, 200, 300], - "Dialysate Temperature": [35.0, 35.5, 36.0, 36.5, 37.0], - "Blood Pressure Measurement Interval": [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 0], - "Rinseback Flow Rate": [50, 75, 100, 125, 150], -} - -#dictionary consist of slider minimum value, slider buffer value, width buffer of slider -CREATE_TREATMENT_SLIDER_VALUES = { - - "blood_flow_rate" : [100, 25, 46], - "dialysate_flow_rate" : [100, 50, 75], - "duration" : [60, 15, 26.6], - "heparin_dispensing_rate" : [0, 0.1, 75], - "heparin_bolus_volume" : [0, 0.1, 37], - "heparin_stop_time" : [0, 10, 15.9], - "saline_bolus" : [100, 100, 375], - "dialysate_temperature" : [35, 0.5, 187.5], - "arterial_pressure_limit_high" : [20, 10, 11.931], - "blood_pressure_measurement_interval" : [0, 5, 62], - "rinseback_flow_rate" : [50, 25, 187], -} - -# pretreatment_patient_connection -SYSTOLIC_PRESSSURE_120 = 120 -SYSTOLIC_PRESSSURE_113 = 113 -SYSTOLIC_PRESSSURE_150 = 150 -SYSTOLIC_PRESSSURE_175 = 175 -SYSTOLIC_PRESSSURE_200 = 200 -SYSTOLIC_PRESSSURE_200 = 200 -SYSTOLIC_PRESSSURE_251 = 251 -SYSTOLIC_PRESSSURE_59 = 59 -SYSTOLIC_PRESSSURE_15 = 15 -DIASTOLIC_PRESSSURE_25 = 25 -DIASTOLIC_PRESSSURE_39 = 39 -DIASTOLIC_PRESSSURE_74 = 74 -DIASTOLIC_PRESSSURE_80 = 80 -DIASTOLIC_PRESSSURE_85 = 85 -DIASTOLIC_PRESSSURE_60 = 60 -DIASTOLIC_PRESSSURE_150 = 150 -DIASTOLIC_PRESSSURE_200 = 200 -DIASTOLIC_PRESSSURE_201 = 201 -HEART_RATE_VAL_39 = 39 -HEART_RATE_VAL_60 = 60 -HEART_RATE_VAL_70 = 70 -HEART_RATE_VAL_85 = 85 -HEART_RATE_VAL_100 = 100 -HEART_RATE_VAL_101 = 101 -HEART_RATE_VAL_110 = 110 -HEART_RATE_VAL_181 = 181 -HEART_RATE_VAL_200 = 200 -SYSTOLIC_LOWER_LIMIT = 60 -SYSTOLIC_UPPER_LIMIT = 250 -DIASTOLIC_LOWER_LIMIT = 40 -DIASTOLIC_UPPER_LIMIT = 200 -HEART_RATE_LOWER_LIMIT = 40 -HEART_RATE_UPPER_LIMIT = 180 - -# pretreatment_patient_connection -DIASTOLIC_TEXT = "diastolic" -SYSTOLIC_TEXT = "systolic" -OUT_OF_RANGE_COLOR = "#c53b33" -IN_RANGE_COLOR = "#fcfcfc" -HEART_RATE_TITLE = "Heart Rate" -BLOOD_PRESSURE_TITLE = "Blood Pressure" -BLOOD_PRESSURE_UNIT = "mmHg" -HEART_RATE_UNIT = "BPM" -PATIENT_CONNECTION_TEXT = "Patient Connection" -UF_VOLUME_TEXT = "Ultrafiltration Volume (L)" -UF_TITLE_TEXT = "Ultrafiltration Setup" -BP_HR_TEXT = "BP/HR" -SKIP_TEXT = "SKIP" -TUTORIAL_TEXT = { - 0 : "Wash your hands and establish vascular access per your clinic's instructions.", - 1 : "Pinch arterial clamp and venous clamp on located on the cartridge patient lines.", - 2 : "Remove arterial and venous shunt.", - 3 : "Connect arterial and venous cartridge lines to your patient access lines." -} - -PRE_TREATMENT_SCREENS = ["Create" , "Sample" , "Consumables" , "Disposables" , "Prime" , "Ultrafiltration" , "BP/HR" , "Connection" , "Start"] - -CREATE_TREATMENT_BUTTON_ACTIVE = "100 3800 4 01000000 " - -BLOOD_PRIMING_TEXT = "Blood Priming" -SALINE_UNIT = "mL" -BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" - -#instructions_imagelocation -INSTRUCTION_CONF_LOCATION = "/home/denali/Projects/application/resources/settings/Instructions/Instructions.conf" -IMAGE_LOCATION = "file:///home/denali/Projects/application/resources/settings/Instructions/" -EXPECTED_IMAGE_LOCATION = "/home/denali/Projects/application/resources/settings/Instructions/" - #create custom treatment HIGHER_VALUE_OF_BLOOD_FLOW_RATE = 500 LOWER_VALUE_OF_BLOOD_FLOW_RATE = 100 @@ -912,797 +348,66 @@ POSITIVE_BUFFER = 10 NEGATIVE_BUFFER = -10 -ALARM_ID_AND_MESSAGES = { - 1: "Stuck button POST failure.\nStop or Off button detected to be pressed for at least 1 second during test shortly after power up.", - 2: "HD FPGA POST failure.", - 3: "DG FPGA POST failure.", - 4: "HD Watchdog POST failure.", - 5: "DG Watchdog POST failure.", - 6: "UI communication POST failure.\nUI failed to communicate within a reasonable time after power up.", - 7: "Real-time clock configuration error.", - 8: "HD accelerometer failed POST.", - 9: "DG accelerometer failed POST." , - 10: "RTC or MCU timer inaccurate.", - 11: "DG heaters failed POST.", - 12: "HD firmware image integrity POST test failed.", - 13: "DG firmware image integrity POST test failed.", - 14: "HD blood flow invalid calibration.", - 15: "HD dialysate flow invalid calibration.", - 16: "HD alarm audio failed POST.", - 17: "HD UI POST failed.", - 18: "DG load cells invalid calibration record.", - 19: "DG flow sensors invalid calibration record.", - 20: "DG conductivity sensors invalid calibration record.", - 21: "DG drain line volume invalid calibration record.", - 22: "DG reservoirs invalid calibration record.", - 23: "DG acid concentrate calibration record.", - 24: "DG bicarb concentrate calibration record.", - 25: "DG accelerometer invalid calibration record.", - 26: "HD accelerometer invalid calibration record.", - 27: "HD blood flow invalid calibration record.", - 28: "HD dialyzer flow invalid calibration record.", - 29: "HD heparin force sensor invalid calibration record.", - 30: "HD Software fault.\nSoftware found itself in an unexpected state.", - 31: "Blood pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running.", - 32: "Blood pump failed motor off check.\nMeasured speed while commanded off.", - 33: "Blood pump failed motor direction check.\nMeasured vs commanded.", - 34: "Blood pump failed rotor speed check.\nMismatch with rotor and motor speeds.", - 35: "Dialysis inlet pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running.", - 36: "Dialysis inlet pump failed motor off check.\nMeasured speed while commanded off.", - 37: "Dialysis inlet pump failed motor direction check.\nMeasured vs commanded.", - 38: "Dialysis inlet pump failed rotor speed check.\nMismatch with rotor and motor speeds.", - 39: "Dialysis outlet pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running.", - 40: "Dialysis outlet pump failed motor off check.\nMeasured speed while commanded off.", - 41: "Dialysis outlet pump failed motor direction check.\nMeasured vs commanded.", - 42: "Dialysis outlet pump failed rotor speed check.\nMismatch with rotor and motor speeds.", - 43: "Watchdog expired error.\nWatchdog was not \"pet\" within the appropriate time.", - 44: "User interface communication timeout.", - 45: "Too many bad CRCs detected on received system messages.", - 46: "System message that required acknowledgment was not acknowledged.", - 47: "Ultrafiltration rate is too high error during treatment.", - 48: "Ultrafiltration volume accuracy error during treatment.", - 49: "HD FPGA communication down for too long.", - 50: "FPGA not accepting commanded valve states.", - 51: "Blood pump failed motor speed check.\nMeasured vs commanded.", - 52: "Dialysate inlet pump failed motor speed check.\nMeasured vs commanded.", - 53: "Dialysate outlet pump failed motor speed check.\nMeasured vs commanded.", - 54: "HD critical data integrity check failed.", - 55: "DG critical data integrity check failed.", - 56: "HD accelerometer error (no readings or FPGA reports error).", - 57: "DG accelerometer error (no readings or FPGA reports error).", - 58: "HD valve homing failed.", - 59: "HD valve transition time out.", - 60: "HD valve not functional.", - 61: "HD valve current out of range.", - 62: "HD valve position out of target.", - 63: "FPGA reports failure reading arterial pressure sensor.", - 64: "FPGA reports failure reading venous pressure sensor.", - 65: "HD requests DG command with invalid parameter fault.", - 66: "HD blood leak sensor set point set failure.", - 67: "HD blood pump occlusion self-test failure alarm.", - 68: "HD active reservoir recirculation out of range.", - 69: "HD blood leak sensor invalid calibration record.", - 70: "HD arterial pressure self-test failure alarm." , - 71: "HD venous pressure self-test failure alarm.", - 72: "HD blood flow meter status check self-test failure alarm.", - 73: "HD dialysate flow meter status check self-test failure alarm.", - 74: "HD blood leak detector self-test failure alarm.", - 75: "HD syringe pump self-test failure alarm.", - 76: "HD monitored voltage is out of range.", - 77: "DG monitored voltage is out of range.", - 78: "HD syringe pump direction (from encoder) error.", - 79: "HD syringe pump direction (from controller) error.", - 80: "HD syringe pump fault reported by FPGA.", - 81: "HD syringe pump over travel error.", - 82: "HD syringe pump DAC write failure.", - 83: "HD syringe pump is running while the BP is off.", - 84: "HD venous pressure sensor not being read.", - 85: "HD pump track latch opened alarm.", - 86: "HD BP occlusion sensor not being read.", - 87: "DG heating invalid calibration record.", - 88: "DG concentrate pumps hall sensor out of range.", - 89: "HD BP occlusion sensor error.", - 90: "This alarm ID is available for use.", - 91: "HD No dialysate flow data receive in the last 3 seconds.", - 92: "DG conductivity sensor bad status.", - 93: "This alarm ID is available for use.", - 94: "This alarm ID is available for use.", - 95: "This alarm ID is available for use.", - 96: "Inlet water temperature in high range.", - 97: "Fill conductivity out of range.", - 98: "HD battery communication fault.", - 99: "HD syringe pump stall alarm.", - 100: "HD no cartridge self-test timeout.", - 101: "HD dry self-test timeout.", - 102: "Real-time clock communication error.", - 103: "HD non-volatile calibration group invalid record CRC.", - 104: "Air trap level sensors reporting illegal combination of air/fluid.", - 105: "DG non-volatile system group invalid record CRC.", - 106: "DG inlet water conductivity is greater than threshold.", - 107: "HD reports DG restarted fault.", - 108: "HD syringe pump ADC error.", - 109: "HD syringe pump volume check error.", - 110: "HD syringe pump speed check error.", - 111: "HD syringe pump not stopped in off state error.", - 112: "HD blood leak detector fault.", - 113: "HD arterial air bubble detector self-test failure.", - 114: "HD venous air bubble detector self-test failure.", - 115: "DG temperature sensor out of range.", - 116: "DG temperature sensor ADC out of range.", - 117: "DG primary heater internal temperature out of range.", - 118: "DG primary heater cold junction temperature out of range.", - 119: "DG trimmer heater internal temperature out of range.", - 120: "DG trimmer heater cold junction temperature out of range.", - 121: "DG main primary heater voltage out of range.", - 122: "DG small primary heater voltage out of range.", - 123: "DG trimmer heater voltage out of range.", - 124: "HD end of treatment alarm (high priority).", - 125: "Blood sitting too long after treatment stopped by user alarm (>5 min).", - 126: "HD blood leak detected alarm.", - 127: "Venous pressure too low during treatment." , - 128: "HD venous air bubble detected alarm.", - 129: "HD venous air bubble detected rinseback alarm.", - 130: "Venous pressure too high during treatment.", - 131: "Arterial pressure too low during treatment.", - 132: "Arterial pressure too high during treatment.", - 133: "DG fluid leak detected alarm.", - 134: "HD fluid leak detected alarm." , - 135: "HD experienced large acceleration.", - 136: "DG experienced large acceleration.", - 137: "HD tilt exceeds maximum.", - 138: "DG tilt exceeds maximum.", - 139: "HD AC power lost alarm.", - 140: "Dialysate generator communication timeout.", - 141: "Air trap fill timeout during treatment.", - 142: "Blood pump occlusion detected.", - 143: "DG dialysate temperature sensors drift timeout.", - 144: "DG software configuration record invalid CRC.", - 145: "Concentrate conductivity after adding acid out of range alarm.", - 146: "Dialysate conductivity out of range.", - 147: "Wait for the DG to produce dialysate.", - 148: "Inlet water temperature too high.", - 149: "Alarm ID available for use.", - 150: "Inlet water conductivity in high range.", - 151: "Inlet water conductivity in low range.", - 152: "Inlet water pressure in low range.", - 153: "HD prime completed high priority alarm.", - 154: "EEPROM operations (read, write, erase) failure.", - 155: "DG software configuration record invalid CRC.", - 156: "HW usage data (treatment time in HD and total consumed water in DG) failure.", - 157: "DG chemical disinfect prime acid line timeout.", - 158: "Inlet water temperature is in the low range.", - 159: "Dialysate inlet pump failed flow vs motor speed check.", - 160: "Blood pump rotor speed too high.", - 161: "This alarm ID is available for use.", - 162: "This alarm ID is available for use.", - 163: "HD sees primary load cell for reservoir 1 change too much too fast.", - 164: "HD sees primary load cell for reservoir 2 change too much too fast.", - 165: "HD in treatment rinseback operation timeout.", - 166: "HD in treatment re-circ sub-mode for too long.", - 167: "HD cartridge door opened alarm.", - 168: "HD active reservoir depletion timeout.", - 169: "Dialysate flow rate out of range.", - 170: "HD syringe empty alarm.", - 171: "HD syringe pump occlusion alarm.", - 172: "HD syringe pump not enough Heparin alarm.", - 173: "HD arterial air bubble detected alarm.", - 174: "HD arterial air bubble detected rinseback alarm.", - 175: "HD pump direction status error.", - 176: "HD active reservoir is full during treatment and DG not ready to switch reservoirs.", - 177: "DG software fault.\nSoftware found itself in an unexpected state.", - 178: "HD communication timeout.", - 179: "DG FPGA communication down for too long.", - 180: "DG load cell ADC error.", - 181: "DG load cells weight out of range for tare.", - 182: "DG load cells invalid calibration.", - 183: "DG invalid load cell value.", - 184: "Inlet or Outlet UV reactor not healthy.", - 185: "DG fan RPM out of range.", - 186: "DG concentrate pump fault.", - 187: "DG concentrate pump CP1 speed control error.", - 188: "DG concentrate pump CP2 speed control error.", - 189: "DG drain pump RPM out of range.", - 190: "DG drain pump off fault.", - 191: "DG flow rate out of upper range.", - 192: "DG flow rate out of lower range.", - 193: "RO pump flow rate out of range.", - 194: "DG RO pump duty cycle out of range.", - 195: "DG RO pump pressure out of range.", - 196: "DG temperature sensor error flag fault.", - 197: "DG temperature sensors ADC fault.", - 198: "DG heaters cold junction temperature out of range.", - 199: "DG heaters fault.", - 200: "DG thermistors/sensors temperature out of range.", - 201: "Inlet water quality is bad (temperature, conductivity, pressure).", - 202: "Inlet water pressure fault.", - 203: "Pressure sensor fault.", - 204: "RO rejection ratio out of range.", - 205: "Conductivity sensor fault.", - 206: "DG dialysate fill runs out of time.", - 207: "DG flow meter check failure alarm.", - 208: "DG primary heater on with no flow time out.", - 209: "DG drain circulation line timeout.", - 210: "HD battery pack detected an error.", - 211: "Blood sitting too long warning (>4 min).", - 212: "HD end of treatment alarm (user not acting to end treatment).", - 213: "HD prime completed medium priority alarm.", - 214: "HD Saline bolus volume check failure.", - 215: "HD rinseback volume check failure.", - 216: "HD end treatment sub-mode timeout alarm.", - 217: "HD blood prime volume check failure.", - 218: "HD syringe detected alarm.", - 219: "HD syringe pump syringe removed alarm.", - 220: "HD battery pack SOC is too low.", - 221: "HD Saline bag is empty.", - 222: "HD dialysate temperature too high alarm.", - 223: "HD dialysate temperature too low alarm.", - 224: "Treatment stopped by user action.", - 225: "HD end of treatment warning.", - 226: "HD prime completed low priority alarm.", - 227: "HD prime out of time alarm.", - 228: "HD time out on prime sub-mode purge air state.", - 229: "HD prime dialysate dialyzer time out alarm.", - 230: "HD prime dialysate bypass time out alarm.", - 231: "HD pre-treatment mode dry self-tests failure.", - 232: "HD pre-treatment mode wet self-tests failure.", - 233: "RTC battery low.", - 234: "RTC (i.e read time) or RAM operations failure (read or write).", - 235: "HD in treatment stopped sub-mode after rinseback completed (no escalation).", - 236: "HD needs new cartridge to be installed.", - 237: "HD prime saline dialyzer time out alarm.", - 238: "HD no cartridge loaded or installed improperly alarm.", - 239: "HD fail to remove cartridge alarm.", - 240: "Bicarb conductivity out of range during bicarb pump check alarm.", - 241: "DG reservoir drain time out.", - 242: "DG reservoir fill time out.", - 243: "DG reservoir leak time out.", - 244: "DG temperature sensors difference out of range.", - 245: "DG heat disinfect target temperature time out (could not reach to temperature).", - 246: "DG heat disinfect inlet pressure and temperature sensors out of range.", - 247: "DG heat disinfect inlet conductivity and temperature out of range.", - 248: "DG chemical disinfect could not reach to target temperature.", - 249: "DG chemical disinfect inlet pressure and temperature sensors out of range.", - 250: "DG chemical disinfect inlet conductivity and temperature out of range.", - 251: "HD invalid system record.", - 252: "HD invalid service record.", - 253: "DG invalid system record.", - 254: "DG invalid service record.", - 255: "HD and UI software builds are not compatible.", - 256: "HD and DG software builds are not compatible.", - 257: "DG FPGA power out timeout.", - 258: "HD FPGA power out timeout.", - 259: "HD temperatures out of range.", - 260: "UI POST Application Integrity (Sha256Sum) failure.", - 261: "UI POST CANBus failure.", - 262: "UI POST Display failure.", - 263: "UI POST Touch failure.", - 264: "UI POST SD-Card failure.", - 265: "UI POST RTC failure.", - 266: "UI POST WiFi failure.", - 267: "UI POST Bluetooth failure.", - 268: "UI POST Ethernet failure.", - 269: "UI POST Sound failure.", - 270: "HD POST Safety Shutdown failure.", - 271: "DG POST Safety Shutdown failure.", - 272: "HD Fan RPM out of range.", - 273: "HD measured blood pump flow rate is out of range.", - 274: "HD measured dialysate inlet pump flow rate is out of range.", - 275: "HD arterial pressure sensor is reading out of range.", - 276: "HD venous pressure sensor is reading out of range.", - 277: "HD BP occlusion sensor is reading out of range.", - 278: "HD active reservoir weight out of range.", - 279: "DG dialysate drain time out.", - 280: "HD arterial pressure sensor read timeout error.", - 281: "Acid concentration bottle low volume alarm.", - 282: "Bicarbonate concentration bottle low volume alarm.", - 283: "DG load cells weight out of range.", - 284: "DG load cells primary/back up drift out of range.", - 285: "HD treatment recirculate timeout warning.", - 286: "HD treatment rinseback complete timeout warning.", - 287: "HD processor clock speed checks against FPGA clock failure.", - 288: "DG trimmer heater on with flow timeout.", - 289: "DG dialysate or concentrate caps not closed." - } -ALARM_PRIORITIES = {1: "LOW", 2: "MEDIUM", 3: "HIGH"} -NUM_OF_ALARM_PRIORITIES = 4 # Total number of alarm priorities -ACCEPTED = True -REJECTED = False -ALARM_LIST_TITLE = "Alarm list" - - -NUM_OF_REQUEST_REJECT_REASONS = 43 -NUM_OF_MSG_ID = 289 -UNDEFINED_ALARM_ID_MSG = "ALARM_ID_UNDEFINED" -ALARM_TITLE = "Alarm" - - -ALARM_ID_NO_ALARM = 0 -ALARM_ID_OUT_OF_RANGE = 290 - -ALARM_PRIORITY_OPTIONS = { - 0 : 'ALARM_PRIORITY_NONE' , - 1 : 'ALARM_PRIORITY_LOW' , - 2 : 'ALARM_PRIORITY_MEDIUM', - 3 : 'ALARM_PRIORITY_HIGH', -} - -# alarm colors -ALARMS_COLORS_HEADER = { - "ALARM_PRIORITY_NONE" : "#438feb", - "ALARM_PRIORITY_LOW" : "#db8f00", - "ALARM_PRIORITY_MEDIUM" : "#db8f00", - "ALARM_PRIORITY_HIGH" : "#831913" -} - -ALARMS_COLORS_BODY = { - "ALARM_PRIORITY_NONE" : "#254670", - "ALARM_PRIORITY_LOW" : "#f5a623", - "ALARM_PRIORITY_MEDIUM" : "#f5a623", - "ALARM_PRIORITY_HIGH" : "#c53b33" -} - -ALARM_MUTE_FLAG = 0B0000001000000000 -ALARM_UNMUTE_FLAG = 0B0000000000000000 - -ALARM_BUTTONS_OK = 0B0000000010111000 - -ALARM_BUTTONS_RESUME = 0B0000000000110000 -ALARM_BUTTONS_RESUME_RINSEBACK = 0B0000000000100000 -ALARM_BUTTONS_RESUME_END = 0B0000000000010000 - -ALARM_BUTTONS_RINSEBACK = 0B0000000000101000 -ALARM_BUTTONS_RINSEBACK_RESUME = ALARM_BUTTONS_RESUME_RINSEBACK -ALARM_BUTTONS_RINSEBACK_END = 0B0000000000001000 - -ALARM_BUTTONS_END = 0B0000000000011000 -ALARM_BUTTONS_END_RESUME = ALARM_BUTTONS_RESUME_END -ALARM_BUTTONS_END_RINSEBACK = ALARM_BUTTONS_RINSEBACK_END - -ALARM_BUTTONS_RESUME_RINSEBACK_END = 0B0000000000000000 -ALARM_BUTTONS_RINSEBACK_RESUME_END = ALARM_BUTTONS_RESUME_RINSEBACK_END -ALARM_BUTTONS_END_RESUME_RINSEBACK = ALARM_BUTTONS_RESUME_RINSEBACK_END - -CURRENT_COLOR = '#000000' -COMPLETE_COLOR= '#4290ec' -ENABLED_COLOR = '#fcfcfc' -INCOMPLETE_COLOR = '#607a91' -OUT_OF_RANGE_COLOR = "#c53b33" - -#standby mode -GOODMORNING_START_TIME_SEC = 0 -GOODEVENING_START_TIME_SEC = 43200 -BLOOD_PRIMING_TEXT = "Blood Priming" -LIQUID_UNIT = "mL" -BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" -SALINE_BOLUS_CUMULATIVE = 300 -SALINE_UNIT = "mL" - -UF_MINIMUM_VALUE = 0 -UF_MAXIMUM_VALUE = 600 -ULTRAFILTRATION_PAUSED_TEXT = "Ultrafiltration Paused" -RESUME_TEXT = "RESUME ULTRAFILTRATION" -EDIT_TEXT = "EDIT ULTRAFILTRATION VOLUME" -TITLE_TEXT = "ULTRAFILTRATION VOLUME (L)" - -#main treatment pressure -PRESSURE_TITLE = "PRESSURES" -ARTERIAL_TITLE = "Arterial" -VENOUS_TITLE = "Venous" -VENOUS_UOM = "mmHg" -ARTERIAL_UOM = "mmHg" -LOW_TEXT = "LOW" -HIGH_TEXT = "HIGH" -ACCEPTED = True -REJECTED = False -NUM_OF_REQUEST_REJECT_REASONS = 43 - -#pressure -PRESSURE_STEPS = 10 -ARTERIAL_PRESSURE_MINIMUM = -400 -ARTERIAL_PRESSURE_MAXIMUM = +600 -ARTERIAL_PRESSURE_LOW_MIN = -300 -ARTERIAL_PRESSURE_LOW_DEF = -300 -ARTERIAL_PRESSURE_LOW_MAX = +200 -ARTERIAL_PRESSURE_HIGH_MIN = -300 -ARTERIAL_PRESSURE_HIGH_DEF = +100 -ARTERIAL_PRESSURE_HIGH_MAX = +200 - -VENOUS_PRESSURE_MINIMUM = -100 -VENOUS_PRESSURE_MAXIMUM = +700 -VENOUS_PRESSURE_LOW_MIN = -100 -VENOUS_PRESSURE_LOW_DEF = -100 -VENOUS_PRESSURE_LOW_MAX = +600 -VENOUS_PRESSURE_HIGH_MIN = +100 -VENOUS_PRESSURE_HIGH_DEF = +400 -VENOUS_PRESSURE_HIGH_MAX = +600 - -#main_treatment_flows -BLOOD_FLOW_MINIMUM_VALUE = 100 -BLOOD_FLOW_BUFFER = 25 -FLOW_SLIDER_WIDTH_BUFFER = 37 - -DIALYSATE_FLOW_MINIMUM_VALUE = 100 -DIALYSATE_FLOW_BUFFER = 50 -DIALYSATE_FLOW_SLIDER_WIDTH_BUFFER = 60 - -BLOOD_FLOW_MAXIMUM_VALUE = 500 -DIALYSATE_FLOW_MINIMUM_VALUE = 100 -DIALYSATE_FLOW_MAXIMUM_VALUE = 600 -FLOW_UNIT = "mL/min" -BLOOD_FLOW_TEXT = "blood" -DIALYSATE_FLOW_TEXT = "dialysate" - -#main treatment screen -VITALS_TITLE = "VITALS" -OUT_OF_RANGE_COLOR = "#c53b33" -IN_RANGE_COLOR = "#fcfcfc" -SYSTOLIC_LOWER_LIMIT = 60 -SYSTOLIC_UPPER_LIMIT = 250 -DIASTOLIC_LOWER_LIMIT = 40 -DIASTOLIC_UPPER_LIMIT = 200 -HEART_RATE_LOWER_LIMIT = 40 -HEART_RATE_UPPER_LIMIT = 180 -HEART_RATE_TITLE = "Heart Rate" -BLOOD_PRESSURE_TITLE = "Blood Pressure" -BLOOD_PRESSURE_UNIT = "mmHg" -HEART_RATE_UNIT = "BPM" -BLOOD_PRIMING_RANGE = 300 -BLOOD_PRIMING_TARGET_MAXIMUM = 300 - - -#tst_treatment_monitoring -FLOWS_TEXT = "FLOWS" -BLOOD_UNIT = "mL/min" -DIALYSATE_TEXT = "Dialysate" -BLOOD_TEXT = "Blood" -VITALS_TEXT = "VITALS" -BLOOD_PRESSURE_TEXT = "mmHg" -HEARTRATE_UNIT = "BPM" -PRESSURE_TEXT = "PRESSURE (mmHg)" -ARTEREAL_TEXT = "Arterial" -VENOUS_TEXT = "Venous" -TIME_DURATION_TEXT = "Time Remaining" -ULTRAFILTERATION_TEXT = "ULTRAFILTRATION VOLUME (L)" -SALINE_BOLUS = "SALINE BOLUS" -VOLUME_DELIVERED = "Volume Delivered" -CUMULATIVE_DELIVERED = "Cumulative Delivered" -HEPARIN_TEXT = "HEPARIN" -VOLUME_DELIVERED = "Volume Delivered" - -#patient id -PATIENT_ID = { - "qwerty" : "qwerty", - "sampleid" : "sampleid", - "abcdefghijklmnop" : "abcdefghijklmnop", - "patientid" : "patientid", - "username" : "username", - "sA@MpLE#123" : "sAMpLE123", - "A@BH&321" : "ABH321", - "5432@qwerty" : "5432qwerty" -} - -KEYBOARD_SWITCH = ["ABC", "&123"] - - -#main-treatment heparin -HEPARIN_UNIT = "mL" -HEPARIN_DELIVERY_TEXT = "HEPARIN DELIVERY" -HEPARIN_DELIVERY_OFF_TEXT = "OFF" -HEPARIN_STOP_TEXT = "Delivery Stopped" -HEPARIN_RESUME_DELIVERY_TEXT = "RESUME DELIVERY" -HEPARIN_BOLUS_ACTIVE_TEXT = "Bolus Active" -HEPARIN_PAUSE_DELIVERY_TEXT = "PAUSE DELIVERY" -HEPARIN_MAXIMUM_VOLUME_DELIVERED_TEXT = "Maximum Cumulative Heparin Volume Delivered" -HEPARIN_SYRINGE_EMPTY_TEXT = "Syringe Empty" - -#Time_Duration -CREATE_TREATMENT_PARAMETERS = ["Blood Flow Rate", "Dialysate Flow Rate", "Duration","Heparin Dispensing Rate", - "Heparin Bolus Volume","Heparin Stop Time", "Saline Bolus","Dialysate Temperature","Blood Pressure Measurement Interval", - "Rinseback Flow Rate"] -TREATMENT_PAUSED_TEXT = "Treatment Paused" - -#dictionary consist of custom treatment values -CREATE_CUSTOM_TREATMENT = { - "Blood Flow Rate": 250, - "Dialysate Flow Rate": 400, - "Duration": 270, - "Heparin Dispensing Rate": 0.5, - "Heparin Bolus Volume": 1, - "Heparin Stop Time": 100, - "Saline Bolus Volume": 200, - "Dialysate Temperature": 37, - "Blood Pressure Measurement Interval": 40, - "Rinseback Flow Rate": 100, - "Arterial Pressure Limit Low" : -30, - "Arterial Pressure Limit High" : 0, - "Blood Pressure Measure Interval" : 40, - "Rinseback Rate" : 100, - "Venous Pressure Limit High" : 590, - "Venous Pressure Limit Low": 560 - -} - -#dictionary consist of slider values of treatment parameters -CREATE_TREATMENT_PARAMETER_RANGE = { - "Blood Flow Rate": [100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 475, 500], - "Dialysate Flow Rate": [100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600], - "Duration": [60, 75, 90, 105, 120, 135, 150, 165, 180, 195, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, 390, 405, 420, 435, 450, 465, 480], - "Heparin Dispensing Rate": [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 0], - "Heparin Bolus Volume": [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 0], - "Heparin Stop Time": [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 0], - "Saline Bolus Volume": [100, 200, 300], - "Dialysate Temperature": [35.0, 35.5, 36.0, 36.5, 37.0], - "Blood Pressure Measurement Interval": [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 0], - "Rinseback Flow Rate": [50, 75, 100, 125, 150], -} - -#dictionary consist of slider minimum value, slider buffer value, width buffer of slider -CREATE_TREATMENT_SLIDER_VALUES = { - - "blood_flow_rate" : [100, 25, 46], - "dialysate_flow_rate" : [100, 50, 75], - "duration" : [60, 15, 26.6], - "heparin_dispensing_rate" : [0, 0.1, 75], - "heparin_bolus_volume" : [0, 0.1, 37], - "heparin_stop_time" : [0, 10, 15.9], - "saline_bolus" : [100, 100, 375], - "dialysate_temperature" : [35, 0.5, 187.5], - "arterial_pressure_limit_high" : [20, 10, 11.931], - "blood_pressure_measurement_interval" : [0, 5, 62], - "rinseback_flow_rate" : [50, 25, 187], -} - -#ultrafilteration volume based on flow parameters. Python list contains Rotational speed, Motor speed, -# MC speed, MC current and PWM. -TREATMENT_ULTRAFILTRATION_FLOW_PARAMETERS = { - 0 : [100, 1, 1, 1, 1, 1, 1], - 1 : [550, 24, 32, 425, 85, 18, 36], - 2 : [80, 125, 187, 257, 530, 458, 985], - 3 : [100, 0, 0, 0, 0, 0, 0], - 4 : [220, 1.45, 1.45, 1.45, 1.45, 1.45, 1.45], - } - -#dictionary contains uf maximum and minimum value's to set. -TREATMENT_ULTRAFILTRATION_TESTING_OPTION = { - 0 : {"uf_maximum" : 600, "uf_minimum" : 0}, - 1 : {"uf_maximum" : 500, "uf_minimum" : 0}, - 2 : {"uf_maximum" : 550, "uf_minimum" : 0}, - 3 : {"uf_maximum" : 300, "uf_minimum" : 0}, - 4 : {"uf_maximum" : 280, "uf_minimum" : 0}, - 5 : {"uf_maximum" : 765, "uf_minimum" : 500}, - 6 : {"uf_maximum" : 680, "uf_minimum" : 450}, - 7 : {"uf_maximum" : 480, "uf_minimum" : 380}, - 8 : {"uf_maximum" : 390, "uf_minimum" : 675}, - 9 : {"uf_maximum" : 290, "uf_minimum" : 125}, - } - -#tst_pretreatment_screens -PRE_TREATMENT_SCREENS = ["Create" , "Sample" , "Consumables" , "Disposables" , "Prime" , "Ultrafiltration" , "BP/HR" , "Connection" , "Start"] -NUM_OF_PRETREATMENT_BULLETS = len(PRE_TREATMENT_SCREENS) - - -#dictionary contains saline cumulative and saline delivered value -#key : saline cumulative value. -#value: saline delivered value -SALINE_BOLUS_VALUES = { - 0 : 0, - 1.0 : 1.0, - 125.56 : 100.56, - 165.87 : 145.87, - 220.65 : 220.65, - 325.25 : 300.25, - 400.86 : 380.86, - 500.00 : 500.25, - 634.76 : 634.76, - 823.65 : 800.65, - 999.99 : 999.99, - 1000 : 1000 -} - - -#tst_pretreatment_screens color palettes -CURRENT_COLOR = '#000000' -COMPLETE_COLOR= '#4290ec' -ENABLED_COLOR = '#fcfcfc' -INCOMPLETE_COLOR = '#607a91' - -CONSUMABLE_SELF_TEST_TEXT = "Consumables Self Test" -BICARB_PUMP_CHECK_TEXT = "BiCarb Pump Check" -ACID_PUMP_CHECK_TEXT = "Acid Pump Check" -SELF_TEST_COMPLETE_TEXT = "Self Test Complete!" - - #pre-treatment_priming NOT_VISIBLE = False VISIBLE = True FOCUS = True NOT_IN_FOCUS = False -BUSY = "Busy" -CHECK = "Check" -BEGIN_PRIME_TITLE = "Begin Prime" -PRIMING_TITLE = "Priming" -SYSTEM_SELF_TEST_TITLE = "System Self Test" -FILTER_FLUSH_TITLE = "Filter Flush" TIME_OUT_DURATION_300 = 300 TIME_OUT_DURATION_200 = 200 TIME_OUT_DURATION_100 = 100 COUNT_DOWN_TIME_100 = 100 MINIMUM_COUNTDOWN_TIME = 0 -ENABLED = True -DISABLED = False CONSUMABLE_SELF_TEST_BICARB_PUMP_CHECK_STATE = 3 -LOOD_PRIMING_TEXT = "Blood Priming" -SALINE_UNIT = "mL" -BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" - -#Pre-Treatment Disposables -NEXT_BUTTON_TEXT = "NEXT" -BACK_BUTTON_TEXT = "BACK" -ENABLED = True -DISABLED = False -CONFIRM_BUTTON_TEXT = "CONFIRM" - -#Filter Flush - - -#Pre_treatment_water_sample -SAMPLE_TEXT = "Sample" -CREATE_TEXT = "Create" -NEXT_BUTTON_TEXT = "NEXT" -WATER_SAMPLE_BUTTON_TEXT = "WATER SAMPLE" -BACK_BUTTON_TEXT = "BACK" -PASS_TEXT = "PASS" -FAIL_TEXT = "FAIL" -OK_TEXT = "OK" - -# pretreatment_patient_connection -SYSTOLIC_PRESSSURE_120 = 120 -SYSTOLIC_PRESSSURE_113 = 113 -SYSTOLIC_PRESSSURE_150 = 150 -SYSTOLIC_PRESSSURE_175 = 175 -SYSTOLIC_PRESSSURE_200 = 200 -SYSTOLIC_PRESSSURE_200 = 200 -SYSTOLIC_PRESSSURE_251 = 251 -SYSTOLIC_PRESSSURE_59 = 59 -SYSTOLIC_PRESSSURE_15 = 15 -DIASTOLIC_PRESSSURE_25 = 25 -DIASTOLIC_PRESSSURE_39 = 39 -DIASTOLIC_PRESSSURE_74 = 74 -DIASTOLIC_PRESSSURE_80 = 80 -DIASTOLIC_PRESSSURE_85 = 85 -DIASTOLIC_PRESSSURE_60 = 60 -DIASTOLIC_PRESSSURE_150 = 150 -DIASTOLIC_PRESSSURE_200 = 200 -DIASTOLIC_PRESSSURE_201 = 201 -HEART_RATE_VAL_39 = 39 -HEART_RATE_VAL_60 = 60 -HEART_RATE_VAL_70 = 70 -HEART_RATE_VAL_85 = 85 -HEART_RATE_VAL_100 = 100 -HEART_RATE_VAL_101 = 101 -HEART_RATE_VAL_110 = 110 -HEART_RATE_VAL_181 = 181 -HEART_RATE_VAL_200 = 200 -SYSTOLIC_LOWER_LIMIT = 60 -SYSTOLIC_UPPER_LIMIT = 250 -DIASTOLIC_LOWER_LIMIT = 40 -DIASTOLIC_UPPER_LIMIT = 200 -HEART_RATE_LOWER_LIMIT = 40 -HEART_RATE_UPPER_LIMIT = 180 -UF_MINIMUM_SLIDER_WIDTH = -2 -UF_MAXIMUM_SLIDER_WIDTH = 638.00 -UF_VALID_RANGE = 700 -TRAINING_INDICATOR_SCREEN = 4 -TREATMENT_ULTRAFILTERATION_TESTING_OPTION = { - "OPTION_1" : {"uf_maximum" : 800, "uf_minimum" : 0}, - "OPTION_2" : {"uf_maximum" : 500, "uf_minimum" : 0}, - "OPTION_3" : {"uf_maximum" : 550, "uf_minimum" : 0}, - "OPTION_4" : {"uf_maximum" : 300, "uf_minimum" : 0}, - "OPTION_5" : {"uf_maximum" : 280, "uf_minimum" : 0}, - "OPTION_6" : {"uf_maximum" : 765, "uf_minimum" : 0}, - "OPTION_7" : {"uf_maximum" : 680, "uf_minimum" : 0}, - "OPTION_8" : {"uf_maximum" : 1500, "uf_minimum" : 0}, - "OPTION_9" : {"uf_maximum" : 390, "uf_minimum" : 0}, - "OPTION_10" : {"uf_maximum" : 800, "uf_minimum" : 0}, - "OPTION_11" : {"uf_maximum" : 1000, "uf_minimum" : 0}, - "OPTION_12" : {"uf_maximum" : 1250, "uf_minimum" : 0}, - } - -#Setting -CLEAR_ALARM_CONDITION_TEXT = "Clear Alarm Condition" -EXPORT_TEXT ="Export" -DEVICE_SETTINGS_TEXT = "Device Settings" -DEVICE_SETTINGS_SCREEN_PARAMETER = ["Information", "Volume And Brightness", "Wi-Fi", "Bluetooth Cuff", "Dialysate Generator Settings", "Services"] -SettingsHome_Treatment_Text = "Treatment" -SettingsHome_Manager_Text = "Manager" -SettingsHome_Settings_Text = "Settings" - -#Information - -INFORMATION_TITLES = ["Information", "Versions"] -INFORMATION_PARAMETERS = ["Information", "UI Version", "HD Version", "HD FPGA Version", "HD Serial Number", "DG Version", "DG FPGA Version", "DG Serial Number"] -SERIVCES_TITLE = "Services" -SERVICES_PARAMETERS = ["HD Last Service Date", "HD Next Service Date", "DG Last Service Date", "DG Next Service Date"] - -ENABLED = True -DISABLED = False - #services -CONFIRM_TEXT = "CONFIRM" -SHUTDOWN_TEXT = "SHUTDOWN" -OUT_OF_RANGE_COLOR = "#c53b33" -IN_RANGE_COLOR = "#fcfcfc" -SERVICE_CONF_LOCATION = os.environ['HOME']+"/Projects/application/resources/settings/Service.conf" VALID = True INVALID = False - -#post-treatment -PATIENT_DISCONNECTION_TEXT = "Patient Disconnection" -REVIEW_TEXT = "Review" -EXPORT_TEXT = "Export" -PATIENT_DISCONNECTION_CONFIRM_BUTTON_TEXT = "CONFIRM" -DISPOSABLE_TEXT = "Disposables" -NEXT_TEXT = "NEXT" -BACK_TEXT = "BACK" -CONFIRM_TEXT = "CONFIRM" -DISPOSABLES_REMOVAL_TEXT = "Disposables Removal" -INCOMPLETE_COLOR_POST_TREATMENT = '#fcfcfc' - #post treatment review - -TREATMENT_LOG_LOCATION = '/home/denali/Desktop/sd-card/treatment/*.log' -VISIBLE = True ACID_CONCENTRATE_POST = ["Fres. Naturalyte", "08-1251-1", "08-2251-0", "08-3251-9", "08-3251-9"] - -ENABLED = True -DISABLED = False - BRIGHTNESS_MIN_VAL = 20 BRIGHTNESS_MAX_VAL = 100 VOLUME_MIN_VAL = 20 VOLUME_MAX_VAL = 100 #dictionary consist of review parameters values of post treatment POST_TREATMENT_REVIEW_PARAMETER_RANGE = { - "Patient ID": ["abcd", "xyz", "qwerty", "dghjf", "cdtys"], - "Heparin Stop": [0, 101, 205, 307, 470], - "Device ID": [1234, 1234, 1234, 1234, 1234], - "Heparin Delivered Volume": [10.1, 10.5, 15.4, 18.9, 20.0], - "Blood Flow Rate": [100, 125, 150, 175, 500], - "Treatment Start DateTime": [1623382321, 1623382321, 1623382321, 1623382321, 1623382321], - "Dialysate Flow Rate": [100, 150, 200, 250, 600], - "Treatment End DateTime": [1623382321, 1623382321, 1623382321, 1623382321, 1623382321], - "Treatment Duration": [60, 75, 90, 105, 330, 480], - "Water Sample Test Result": [0, 1, 1, 1, 1], - "Actual Treatment Duration": [2, 6, 14, 67, 100], - "Dialysate Volume Used": [4.0, 6.0, 54.0, 67.0, 81.0], - "Acid ConcentrateType": [0, 1, 2, 3, 3], - "Prescribed UF Volume": [0.3, 0.5, 0.6, 10.0, 0.8, 5.8, 6.4], - "Bicarbonate Concentrate Type": [0, 0, 0, 0, 0], - "Target UF Volume": [10.1, 10.5, 15.4, 18.9, 20.0], - "Potassium Concentration": [60, 75, 90, 105, 330, 465, 480], - "Actual UF Volume": [0.3, 0.5, 0.6, 10.0, 0.8, 5.8, 6.4], - "Calcium Concentration": [3, 56, 100, 154, 67], - "Prescribed UF Rate": [0.1, 0.55, 0.9, 5.1, 6.7], - "Bicarbonate Concentration": [14, 50, 67, 156, 1], - "Target UF Rate": [0.2, 0.56, 0.45, 2.56, 10.93], - "Sodium Concentration": [4, 6, 54, 67, 81, 100], - "Actual UF Rate": [0.5, 0.6, 10.0, 0.8, 5.8, 6.4], - "Dialysate Temperature": [35.0, 35.5, 36.0, 36.5, 37.0], - "Saline Bolus Volume": [300, 250, 200, 150, 300], - "Dialyzer Type": [0, 1, 2, 3, 4], - "Average Blood Flow": [54.3, 67.3, 65.89, 75.89, 48.76], - "Heparin Type": [0, 0, 0, 0, 0], - "Average Dialysate Flow": [0.6, 0.5, 5.8, 6.4, 10.0, 0.8], - "Average Dialysate Temp": [35.0, 35.5, 36.0, 36.5, 37.0], - "Heparin Bolus Volume": [0.0, 0.1, 1.5, 1.6, 2.0], - "Average Arterial Pressure": [0.0, 11.56, 154.46, 225.57, 300.0], - "Heparin Dispense Rate": [0.0, 0.1, 0.2, 0.9, 1.0], - "Average Venous Pressure": [20.0, 101.45, 394.56, 447.45, 600.00], - - + "Patient ID": ["abcd", "xyz"], + "Heparin Stop": [0, 101], + "Device ID": [1234, 1234], + "Heparin Delivered Volume": [10.1, 10.5], + "Blood Flow Rate": [100, 125], + "Treatment Start DateTime": [1654519251, 1623382321], + "Dialysate Flow Rate": [100, 150], + "Treatment End DateTime": [1654519251, 1623382321], + "Treatment Duration": [70, 75], + "Water Sample Test Result": [0, 1], + "Actual Treatment Duration": [62, 126], + "Dialysate Volume Used": [4.0, 6.0], + "Acid ConcentrateType": [0, 1], + "Prescribed UF Volume": [0.3, 0.5], + "Bicarbonate Concentrate Type": [0, 0], + "Target UF Volume": [10.1, 10.5], + "Potassium Concentration": [60, 75], + "Actual UF Volume": [0.3, 0.5], + "Calcium Concentration": [3, 56], + "Prescribed UF Rate": [0.1, 0.55], + "Bicarbonate Concentration": [14, 50], + "Target UF Rate": [0.2, 0.56], + "Sodium Concentration": [4, 6], + "Actual UF Rate": [0.5, 0.6], + "Dialysate Temperature": [35.0, 35.5], + "Saline Bolus Volume": [300, 250], + "Dialyzer Type": [0, 1], + "Average Blood Flow": [54.3, 67.3], + "Heparin Type": [0, 0], + "Average Dialysate Flow": [0.6, 0.5], + "Average Dialysate Temp": [35.0, 35.5], + "Heparin Bolus Volume": [0.0, 0.1], + "Average Arterial Pressure": [0.0, 11.56], + "Heparin Dispense Rate": [0.0, 0.1], + "Average Venous Pressure": [20.0, 101.45], } Index: shared/scripts/configuration/strings.py =================================================================== diff -u -r8977e6f10ea8a1b5807f963a1b98dc11ea2d181f -rba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438 --- shared/scripts/configuration/strings.py (.../strings.py) (revision 8977e6f10ea8a1b5807f963a1b98dc11ea2d181f) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision ba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438) @@ -6,16 +6,515 @@ # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # -# @file utils.py +# @file strings.py # # @author (last) Joseph varghese # @date (last) 18-Jan-2022 # ############################################################################ +PRE_TREATMENT_SCREENS = ["Create" , "Sample" , "Consumables" , "Disposables" , "Prime" , "Ultrafiltration" , "BP/HR" , "Connection" , "Start"] +POST_TREATMENT_SCREENS = ["Disconnection", "Review", "Disposables", "Disinfection"] -#post-treatment +# dictionary of rejection reason from application source code. +# message location -> denali-> Headers-> common-> MsgDefs.h +REJECTION_REASON = { + 0: "No Active Alarm List", + 1: "REQUEST_REJECT_REASON_NOT_ALLOWED_IN_CURRENT_MODE", # Request is not allowed in the current operating mode + 2: "REQUEST_REJECT_REASON_TIMEOUT_WAITING_FOR_USER_CONFIRM", # Validated request was not confirmed by user in reasonable time + 3: "REQUEST_REJECT_REASON_NOT_IN_TREATMENT_MODE", # Request is not allowed if not in treatment mode + 4: "REQUEST_REJECT_REASON_INVALID_TREATMENT_STATE", # Request is not allowed in current treatment state + 5: "REQUEST_REJECT_REASON_TREATMENT_TOO_CLOSE_TO_FINISHED", # Request is not allowed so near end of treatment + 6: "REQUEST_REJECT_REASON_TREATMENT_TIME_OUT_OF_RANGE", # Treatment duration is out of range + 7: "REQUEST_REJECT_REASON_TREATMENT_TIME_LESS_THAN_CURRENT", # Treatment time change is less than currently elapsed treatment time + 8: "REQUEST_REJECT_REASON_BLOOD_FLOW_OUT_OF_RANGE", # Blood flow is out of range + 9: "REQUEST_REJECT_REASON_DIAL_FLOW_OUT_OF_RANGE", # Dialysate flow is out of range + 10: "REQUEST_REJECT_REASON_DIAL_VOLUME_OUT_OF_RANGE", # Dialysate flow rate or treatment duration causes dialysate volume to exceed limit + 11: "REQUEST_REJECT_REASON_UF_VOLUME_OUT_OF_RANGE", # Ultrafiltration volume is out of range + 12: "REQUEST_REJECT_REASON_UF_RATE_OUT_OF_RANGE", # Ultrafiltration rate is out of range + 13: "REQUEST_REJECT_REASON_TREATMENT_TIME_LESS_THAN_MINIMUM", # Treatment time change is less than minimum treatment time + 14: "REQUEST_REJECT_REASON_UF_NOT_IN_PROGESS", # Ultrafiltration is not currently in progress + 15: "REQUEST_REJECT_REASON_UF_NOT_PAUSED", # Ultrafiltration is not currently paused + 16: "REQUEST_REJECT_REASON_SALINE_BOLUS_IN_PROGRESS", # A saline bolus is in progress + 17: "REQUEST_REJECT_REASON_PARAM_OUT_OF_RANGE", # A treatment parameter is out of range + 18: "REQUEST_REJECT_REASON_HEPARIN_PRESTOP_EXCEEDS_DURATION", # The Heparin pre-stop setting is greater than the treatment duration + 19: "REQUEST_REJECT_REASON_ARTERIAL_PRESSURE_LOW_VS_HIGH", # Arterial pressure low and high alarm limits are not inconsistent + 20: "REQUEST_REJECT_REASON_VENOUS_PRESSURE_LOW_VS_HIGH", # Venous pressure low and high alarm limits are inconsistent + 21: "REQUEST_REJECT_REASON_SALINE_MAX_VOLUME_REACHED", # Saline bolus volume maximum has been reached - no more saline allowed + 22: "REQUEST_REJECT_REASON_SALINE_BOLUS_NOT_IN_PROGRESS", # A saline bolus is not in progress + 23: "REQUEST_REJECT_REASON_ACTION_DISABLED_IN_CURRENT_STATE", # Requested user action is disabled in current state + 24: "REQUEST_REJECT_REASON_ALARM_IS_ACTIVE", # Requested user action not allowed while alarm is active + 25: "REQUEST_REJECT_REASON_INVALID_COMMAND", # Requested user action invalid + 26: "REQUEST_REJECT_REASON_TREATMENT_IS_COMPLETED", # The treatment has been completed + 27: "REQUEST_REJECT_REASON_ADDL_RINSEBACK_MAX_VOLUME_REACHED", # Rinseback additional volume maximum has been reached - no more additional rinsebacks allowed + 28: "REQUEST_REJECT_REASON_UF_VOLUME_NOT_SET", # Ultrafiltration volume is not set yet + 29: "REQUEST_REJECT_REASON_NO_PATIENT_CONNECTION_CONFIRM", # The user has not confirmed patient connection + 30: "REQUEST_REJECT_REASON_HEPARIN_PAUSE_INVALID_IN_THIS_STATE", # Heparin cannot be paused if not currently deliverying Heparin + 31: "REQUEST_REJECT_REASON_HEPARIN_NOT_PAUSED", # Heparin cannot be resumed if not paused + 32: "REQUEST_REJECT_REASON_DG_COMM_LOST", # Treatment cannot initiate if DG comm is lost + 33: "REQUEST_REJECT_REASON_DRAIN_NOT_COMPLETE", # Post-treatment reservoirs drain not complete + 34: "REQUEST_REJECT_REASON_DG_NOT_IN_STANDBY_IDLE_STATE", # Treatment cannot initiate if DG is not in standby idle state + 35: "REQUEST_REJECT_REASON_INVALID_REQUEST_FORMAT", # Request message not formatted properly + 36: "REQUEST_REJECT_REASON_INVALID_DATE_OR_TIME", # Given date/time is invalid + 37: "REQUEST_REJECT_REASON____AVAILABLE_1", # Not used - available for use + 38: "REQUEST_REJECT_REASON_BATTERY_IS_NOT_CHARGED", # Battery does not have enough charge to start treatment + 39: "REQUEST_REJECT_REASON_RINSEBACK_NOT_COMPLETED", # Cannot move on to recirculate without completing full rinseback. + 40: "REQUEST_REJECT_REASON_RESERVOIR_ONE_IS_NOT_READY", # Reservoir one fill is not complete + 41: "REQUEST_REJECT_REASON_PUMP_TRACK_NOT_CLOSED", # Pump track is not ready / closed + 42: "REQUEST_REJECT_REASON_DOOR_NOT_CLOSED", # Door is not closed + 43: "REQUEST_REJECT_REASON_SYRINGE_NOT_PRESENT", # Syringe is not present + } +ALARM_ID_AND_MESSAGES = { + 1: "Stuck button POST failure.\nStop or Off button detected to be pressed for at least 1 second during test shortly after power up.", + 2: "HD FPGA POST failure.", + 3: "DG FPGA POST failure.", + 4: "HD Watchdog POST failure.", + 5: "DG Watchdog POST failure.", + 6: "UI communication POST failure.\nUI failed to communicate within a reasonable time after power up.", + 7: "Real-time clock configuration error.", + 8: "HD accelerometer failed POST.", + 9: "DG accelerometer failed POST." , + 10: "RTC or MCU timer inaccurate.", + 11: "DG heaters failed POST.", + 12: "HD firmware image integrity POST test failed.", + 13: "DG firmware image integrity POST test failed.", + 14: "HD blood flow invalid calibration.", + 15: "HD dialysate flow invalid calibration.", + 16: "HD alarm audio failed POST.", + 17: "HD UI POST failed.", + 18: "DG load cells invalid calibration record.", + 19: "DG flow sensors invalid calibration record.", + 20: "DG conductivity sensors invalid calibration record.", + 21: "DG drain line volume invalid calibration record.", + 22: "DG reservoirs invalid calibration record.", + 23: "DG acid concentrate calibration record.", + 24: "DG bicarb concentrate calibration record.", + 25: "DG accelerometer invalid calibration record.", + 26: "HD accelerometer invalid calibration record.", + 27: "HD blood flow invalid calibration record.", + 28: "HD dialyzer flow invalid calibration record.", + 29: "HD heparin force sensor invalid calibration record.", + 30: "HD Software fault.\nSoftware found itself in an unexpected state.", + 31: "Blood pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running.", + 32: "Blood pump failed motor off check.\nMeasured speed while commanded off.", + 33: "Blood pump failed motor direction check.\nMeasured vs commanded.", + 34: "Blood pump failed rotor speed check.\nMismatch with rotor and motor speeds.", + 35: "Dialysis inlet pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running.", + 36: "Dialysis inlet pump failed motor off check.\nMeasured speed while commanded off.", + 37: "Dialysis inlet pump failed motor direction check.\nMeasured vs commanded.", + 38: "Dialysis inlet pump failed rotor speed check.\nMismatch with rotor and motor speeds.", + 39: "Dialysis outlet pump failed motor controller current check.\nToo high when pump should be off or out of range when pump should be running.", + 40: "Dialysis outlet pump failed motor off check.\nMeasured speed while commanded off.", + 41: "Dialysis outlet pump failed motor direction check.\nMeasured vs commanded.", + 42: "Dialysis outlet pump failed rotor speed check.\nMismatch with rotor and motor speeds.", + 43: "Watchdog expired error.\nWatchdog was not \"pet\" within the appropriate time.", + 44: "User interface communication timeout.", + 45: "Too many bad CRCs detected on received system messages.", + 46: "System message that required acknowledgment was not acknowledged.", + 47: "Ultrafiltration rate is too high error during treatment.", + 48: "Ultrafiltration volume accuracy error during treatment.", + 49: "HD FPGA communication down for too long.", + 50: "FPGA not accepting commanded valve states.", + 51: "Blood pump failed motor speed check.\nMeasured vs commanded.", + 52: "Dialysate inlet pump failed motor speed check.\nMeasured vs commanded.", + 53: "Dialysate outlet pump failed motor speed check.\nMeasured vs commanded.", + 54: "HD critical data integrity check failed.", + 55: "DG critical data integrity check failed.", + 56: "HD accelerometer error (no readings or FPGA reports error).", + 57: "DG accelerometer error (no readings or FPGA reports error).", + 58: "HD valve homing failed.", + 59: "HD valve transition time out.", + 60: "HD valve not functional.", + 61: "HD valve current out of range.", + 62: "HD valve position out of target.", + 63: "FPGA reports failure reading arterial pressure sensor.", + 64: "FPGA reports failure reading venous pressure sensor.", + 65: "HD requests DG command with invalid parameter fault.", + 66: "HD blood leak sensor set point set failure.", + 67: "HD blood pump occlusion self-test failure alarm.", + 68: "HD active reservoir recirculation out of range.", + 69: "HD blood leak sensor invalid calibration record.", + 70: "HD arterial pressure self-test failure alarm." , + 71: "HD venous pressure self-test failure alarm.", + 72: "HD blood flow meter status check self-test failure alarm.", + 73: "HD dialysate flow meter status check self-test failure alarm.", + 74: "HD blood leak detector self-test failure alarm.", + 75: "HD syringe pump self-test failure alarm.", + 76: "HD monitored voltage is out of range.", + 77: "DG monitored voltage is out of range.", + 78: "HD syringe pump direction (from encoder) error.", + 79: "HD syringe pump direction (from controller) error.", + 80: "HD syringe pump fault reported by FPGA.", + 81: "HD syringe pump over travel error.", + 82: "HD syringe pump DAC write failure.", + 83: "HD syringe pump is running while the BP is off.", + 84: "HD venous pressure sensor not being read.", + 85: "HD pump track latch opened alarm.", + 86: "HD BP occlusion sensor not being read.", + 87: "DG heating invalid calibration record.", + 88: "DG concentrate pumps hall sensor out of range.", + 89: "HD BP occlusion sensor error.", + 90: "This alarm ID is available for use.", + 91: "HD No dialysate flow data receive in the last 3 seconds.", + 92: "DG conductivity sensor bad status.", + 93: "This alarm ID is available for use.", + 94: "This alarm ID is available for use.", + 95: "This alarm ID is available for use.", + 96: "Inlet water temperature in high range.", + 97: "Fill conductivity out of range.", + 98: "HD battery communication fault.", + 99: "HD syringe pump stall alarm.", + 100: "HD no cartridge self-test timeout.", + 101: "HD dry self-test timeout.", + 102: "Real-time clock communication error.", + 103: "HD non-volatile calibration group invalid record CRC.", + 104: "Air trap level sensors reporting illegal combination of air/fluid.", + 105: "DG non-volatile system group invalid record CRC.", + 106: "DG inlet water conductivity is greater than threshold.", + 107: "HD reports DG restarted fault.", + 108: "HD syringe pump ADC error.", + 109: "HD syringe pump volume check error.", + 110: "HD syringe pump speed check error.", + 111: "HD syringe pump not stopped in off state error.", + 112: "HD blood leak detector fault.", + 113: "HD arterial air bubble detector self-test failure.", + 114: "HD venous air bubble detector self-test failure.", + 115: "DG temperature sensor out of range.", + 116: "DG temperature sensor ADC out of range.", + 117: "DG primary heater internal temperature out of range.", + 118: "DG primary heater cold junction temperature out of range.", + 119: "DG trimmer heater internal temperature out of range.", + 120: "DG trimmer heater cold junction temperature out of range.", + 121: "DG main primary heater voltage out of range.", + 122: "DG small primary heater voltage out of range.", + 123: "DG trimmer heater voltage out of range.", + 124: "HD end of treatment alarm (high priority).", + 125: "Blood sitting too long after treatment stopped by user alarm (>5 min).", + 126: "HD blood leak detected alarm.", + 127: "Venous pressure too low during treatment." , + 128: "HD venous air bubble detected alarm.", + 129: "HD venous air bubble detected rinseback alarm.", + 130: "Venous pressure too high during treatment.", + 131: "Arterial pressure too low during treatment.", + 132: "Arterial pressure too high during treatment.", + 133: "DG fluid leak detected alarm.", + 134: "HD fluid leak detected alarm." , + 135: "HD experienced large acceleration.", + 136: "DG experienced large acceleration.", + 137: "HD tilt exceeds maximum.", + 138: "DG tilt exceeds maximum.", + 139: "HD AC power lost alarm.", + 140: "Dialysate generator communication timeout.", + 141: "Air trap fill timeout during treatment.", + 142: "Blood pump occlusion detected.", + 143: "DG dialysate temperature sensors drift timeout.", + 144: "DG software configuration record invalid CRC.", + 145: "Concentrate conductivity after adding acid out of range alarm.", + 146: "Dialysate conductivity out of range.", + 147: "Wait for the DG to produce dialysate.", + 148: "Inlet water temperature too high.", + 149: "Alarm ID available for use.", + 150: "Inlet water conductivity in high range.", + 151: "Inlet water conductivity in low range.", + 152: "Inlet water pressure in low range.", + 153: "HD prime completed high priority alarm.", + 154: "EEPROM operations (read, write, erase) failure.", + 155: "DG software configuration record invalid CRC.", + 156: "HW usage data (treatment time in HD and total consumed water in DG) failure.", + 157: "DG chemical disinfect prime acid line timeout.", + 158: "Inlet water temperature is in the low range.", + 159: "Dialysate inlet pump failed flow vs motor speed check.", + 160: "Blood pump rotor speed too high.", + 161: "This alarm ID is available for use.", + 162: "This alarm ID is available for use.", + 163: "HD sees primary load cell for reservoir 1 change too much too fast.", + 164: "HD sees primary load cell for reservoir 2 change too much too fast.", + 165: "HD in treatment rinseback operation timeout.", + 166: "HD in treatment re-circ sub-mode for too long.", + 167: "HD cartridge door opened alarm.", + 168: "HD active reservoir depletion timeout.", + 169: "Dialysate flow rate out of range.", + 170: "HD syringe empty alarm.", + 171: "HD syringe pump occlusion alarm.", + 172: "HD syringe pump not enough Heparin alarm.", + 173: "HD arterial air bubble detected alarm.", + 174: "HD arterial air bubble detected rinseback alarm.", + 175: "HD pump direction status error.", + 176: "HD active reservoir is full during treatment and DG not ready to switch reservoirs.", + 177: "DG software fault.\nSoftware found itself in an unexpected state.", + 178: "HD communication timeout.", + 179: "DG FPGA communication down for too long.", + 180: "DG load cell ADC error.", + 181: "DG load cells weight out of range for tare.", + 182: "DG load cells invalid calibration.", + 183: "DG invalid load cell value.", + 184: "Inlet or Outlet UV reactor not healthy.", + 185: "DG fan RPM out of range.", + 186: "DG concentrate pump fault.", + 187: "DG concentrate pump CP1 speed control error.", + 188: "DG concentrate pump CP2 speed control error.", + 189: "DG drain pump RPM out of range.", + 190: "DG drain pump off fault.", + 191: "DG flow rate out of upper range.", + 192: "DG flow rate out of lower range.", + 193: "RO pump flow rate out of range.", + 194: "DG RO pump duty cycle out of range.", + 195: "DG RO pump pressure out of range.", + 196: "DG temperature sensor error flag fault.", + 197: "DG temperature sensors ADC fault.", + 198: "DG heaters cold junction temperature out of range.", + 199: "DG heaters fault.", + 200: "DG thermistors/sensors temperature out of range.", + 201: "Inlet water quality is bad (temperature, conductivity, pressure).", + 202: "Inlet water pressure fault.", + 203: "Pressure sensor fault.", + 204: "RO rejection ratio out of range.", + 205: "Conductivity sensor fault.", + 206: "DG dialysate fill runs out of time.", + 207: "DG flow meter check failure alarm.", + 208: "DG primary heater on with no flow time out.", + 209: "DG drain circulation line timeout.", + 210: "HD battery pack detected an error.", + 211: "Blood sitting too long warning (>4 min).", + 212: "HD end of treatment alarm (user not acting to end treatment).", + 213: "HD prime completed medium priority alarm.", + 214: "HD Saline bolus volume check failure.", + 215: "HD rinseback volume check failure.", + 216: "HD end treatment sub-mode timeout alarm.", + 217: "HD blood prime volume check failure.", + 218: "HD syringe detected alarm.", + 219: "HD syringe pump syringe removed alarm.", + 220: "HD battery pack SOC is too low.", + 221: "HD Saline bag is empty.", + 222: "HD dialysate temperature too high alarm.", + 223: "HD dialysate temperature too low alarm.", + 224: "Treatment stopped by user action.", + 225: "HD end of treatment warning.", + 226: "HD prime completed low priority alarm.", + 227: "HD prime out of time alarm.", + 228: "HD time out on prime sub-mode purge air state.", + 229: "HD prime dialysate dialyzer time out alarm.", + 230: "HD prime dialysate bypass time out alarm.", + 231: "HD pre-treatment mode dry self-tests failure.", + 232: "HD pre-treatment mode wet self-tests failure.", + 233: "RTC battery low.", + 234: "RTC (i.e read time) or RAM operations failure (read or write).", + 235: "HD in treatment stopped sub-mode after rinseback completed (no escalation).", + 236: "HD needs new cartridge to be installed.", + 237: "HD prime saline dialyzer time out alarm.", + 238: "HD no cartridge loaded or installed improperly alarm.", + 239: "HD fail to remove cartridge alarm.", + 240: "Bicarb conductivity out of range during bicarb pump check alarm.", + 241: "DG reservoir drain time out.", + 242: "DG reservoir fill time out.", + 243: "DG reservoir leak time out.", + 244: "DG temperature sensors difference out of range.", + 245: "DG heat disinfect target temperature time out (could not reach to temperature).", + 246: "DG heat disinfect inlet pressure and temperature sensors out of range.", + 247: "DG heat disinfect inlet conductivity and temperature out of range.", + 248: "DG chemical disinfect could not reach to target temperature.", + 249: "DG chemical disinfect inlet pressure and temperature sensors out of range.", + 250: "DG chemical disinfect inlet conductivity and temperature out of range.", + 251: "HD invalid system record.", + 252: "HD invalid service record.", + 253: "DG invalid system record.", + 254: "DG invalid service record.", + 255: "HD and UI software builds are not compatible.", + 256: "HD and DG software builds are not compatible.", + 257: "DG FPGA power out timeout.", + 258: "HD FPGA power out timeout.", + 259: "HD temperatures out of range.", + 260: "UI POST Application Integrity (Sha256Sum) failure.", + 261: "UI POST CANBus failure.", + 262: "UI POST Display failure.", + 263: "UI POST Touch failure.", + 264: "UI POST SD-Card failure.", + 265: "UI POST RTC failure.", + 266: "UI POST WiFi failure.", + 267: "UI POST Bluetooth failure.", + 268: "UI POST Ethernet failure.", + 269: "UI POST Sound failure.", + 270: "HD POST Safety Shutdown failure.", + 271: "DG POST Safety Shutdown failure.", + 272: "HD Fan RPM out of range.", + 273: "HD measured blood pump flow rate is out of range.", + 274: "HD measured dialysate inlet pump flow rate is out of range.", + 275: "HD arterial pressure sensor is reading out of range.", + 276: "HD venous pressure sensor is reading out of range.", + 277: "HD BP occlusion sensor is reading out of range.", + 278: "HD active reservoir weight out of range.", + 279: "DG dialysate drain time out.", + 280: "HD arterial pressure sensor read timeout error.", + 281: "Acid concentration bottle low volume alarm.", + 282: "Bicarbonate concentration bottle low volume alarm.", + 283: "DG load cells weight out of range.", + 284: "DG load cells primary/back up drift out of range.", + 285: "HD treatment recirculate timeout warning.", + 286: "HD treatment rinseback complete timeout warning.", + 287: "HD processor clock speed checks against FPGA clock failure.", + 288: "DG trimmer heater on with flow timeout.", + 289: "DG dialysate or concentrate caps not closed." + } + +#Alarm List +UNDEFINED_ALARM_ID_MSG = "ALARM_ID_UNDEFINED" +ALARM_TITLE = "Alarm" +ALARM_LIST_TITLE = "Alarm list" +ALARM_PRIORITIES = {1: "LOW", 2: "MEDIUM", 3: "HIGH"} +ALARM_PRIORITY_OPTIONS = { + 0 : 'ALARM_PRIORITY_NONE' , + 1 : 'ALARM_PRIORITY_LOW' , + 2 : 'ALARM_PRIORITY_MEDIUM', + 3 : 'ALARM_PRIORITY_HIGH', +} + +#main-treatment heparin +HEPARIN_TEXT = "HEPARIN" +HEPARIN_UNIT = "mL" +HEPARIN_DELIVERY_TEXT = "HEPARIN DELIVERY" +HEPARIN_DELIVERY_OFF_TEXT = "OFF" +HEPARIN_STOP_TEXT = "Delivery Stopped" +HEPARIN_RESUME_DELIVERY_TEXT = "RESUME DELIVERY" +HEPARIN_BOLUS_ACTIVE_TEXT = "Bolus Active" +HEPARIN_BOLUS_DISPENSING_TEXT = "Dispensing Active" +HEPARIN_PAUSE_DELIVERY_TEXT = "PAUSE DELIVERY" +HEPARIN_MAXIMUM_VOLUME_DELIVERED_TEXT = "Maximum Cumulative Heparin Volume Delivered" +HEPARIN_SYRINGE_EMPTY_TEXT = "Syringe Empty" +HEPARIN_DISPENSING_RATE = "Heparin Dispensing Rate" +HEPARIN_BOLUS_VOLUME = "Heparin Bolus Volume" +HEPARIN_STOP_TIME = "Heparin Stop Time" +HEPARIN_TYPE_TITLE = "Heparin Type" + +#Setting +EXPORT_TEXT ="Export" +DEVICE_SETTINGS_TEXT = "Device Settings" +DEVICE_SETTINGS_SCREEN_PARAMETER = ["Information", "Volume And Brightness", "Wi-Fi", "Bluetooth Cuff", "Dialysate Generator Settings", "Services"] +SettingsHome_Treatment_Text = "Treatment" +SettingsHome_Manager_Text = "Manager" +SettingsHome_Settings_Text = "Settings" + +#UF treatment +LIQUID_UNIT = "mL" +ULTRAFILTRATION_PAUSED_TEXT = "Ultrafiltration Paused" +RESUME_TEXT = "RESUME ULTRAFILTRATION" +EDIT_TEXT = "EDIT ULTRAFILTRATION VOLUME" +TITLE_TEXT = "ULTRAFILTRATION VOLUME (L)" + +#create custom treatment +TREATMENT_TITLE = "Create a Custom Treatment" +CONFIRM_TREATMENT_TITLE = "Confirm Treatment" +PRESCRIPTION_TITLE = "PRESCRIPTION" +OPERATING_PARAMETERS_TITLE = "OPERATING PARAMETERS" +PATIENT_ID_TEXT = "Patient ID" +BLOOD_FLOW_RATE = "Blood Flow Rate" +DIALYSATE_FLOW_RATE = "Dialysate Flow Rate" +DURATION = "Duration" +SALINE_BOLUS_VOLUME = "Saline Bolus Volume" +SALINE_BOLUS_TITLE = "Saline Bolus" +ACID_CONCENTRATE_TITLE = "Acid Concentrate" +BICARBONATE_CONCENTRATE_TITLE = "Bicarbonate Concentrate" +DIALYZER_TYPE_TITLE = "Dialyzer Type" +DIALYSATE_TEMPERATURE = "Dialysate Temperature" +BLOOD_PRESSURE_MEASUREMENT_INTERVAL = "Blood Pressure Measurement Interval" +RINSEBACK_FLOW_RATE = "Rinseback Flow Rate" +OFF_TEXT = "OFF" +CONTINUE_TEXT = "CONTINUE" +CREATE_TREATMENT_PARAMETERS = ["Blood Flow Rate", "Dialysate Flow Rate", "Duration","Heparin Dispensing Rate", + "Heparin Bolus Volume","Heparin Stop Time", "Saline Bolus", "Dialysate Temperature", + "Blood Pressure Measurement Interval", "Rinseback Flow Rate"] +PRESCRIPTION_DETAILS = { + "Blood Flow Rate": "mL/min", "Dialysate Flow Rate": "mL/min", + "Duration": "min", "Heparin Dispensing Rate": "mL/hr", + "Heparin Bolus Volume": "mL", "Heparin Stop Time": "min", + "Saline Bolus Volume": "mL", + "Dialysate Temperature": "°C", "Arterial Pressure Limit Low": "mmHg", + "Arterial Pressure Limit High": "mmHg","Blood Pressure Measure Interval":"min", + "Rinseback Rate" : "mL/min", "Venous Pressure Limit High": "mmHg", + "Venous Pressure Limit Low": "mmHg" +} + +#Time_Duration +TREATMENT_PAUSED_TEXT = "Treatment Paused" + +#pre-treatment +CONSUMABLE_SELF_TEST_TEXT = "Consumables Self Test" +BICARB_PUMP_CHECK_TEXT = "BiCarb Pump Check" +ACID_PUMP_CHECK_TEXT = "Acid Pump Check" +SELF_TEST_COMPLETE_TEXT = "Self Test Complete!" +BUSY = "Busy" +CHECK = "Check" +BEGIN_PRIME_TITLE = "Begin Prime" +PRIMING_TITLE = "Priming" +SYSTEM_SELF_TEST_TITLE = "System Self Test" +FILTER_FLUSH_TITLE = "Filter Flush" +SALINE_UNIT = "mL" +BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" +BLOOD_PRIMING_TEXT = "Blood Priming" + +#Pre-Treatment Disposables +NEXT_BUTTON_TEXT = "NEXT" +BACK_BUTTON_TEXT = "BACK" +CONFIRM_BUTTON_TEXT = "CONFIRM" + +#Pre_treatment_water_sample +SAMPLE_TEXT = "Sample" +CREATE_TEXT = "Create" +WATER_SAMPLE_BUTTON_TEXT = "WATER SAMPLE" +PASS_TEXT = "PASS" +FAIL_TEXT = "FAIL" +OK_TEXT = "OK" + +#Vitals +SYSTOLIC_TEXT = "systolic" +DIASTOLIC_TEXT = "diastolic" +#priming +TEST_DRY_STEPS = ["Used Cartridge Check", "Occlusion Sensors Check", "Pressure Sensors Check", "Syringe Pump Check"] +PRIMING_STEPS = ["Blood Circuit Priming", "Dialysate Circuit Priming", "Wet Self Tests"] +SELF_TEST_COMPLETION_MSG = "Self Test Complete!" +PRIMING_COMPLETE_MSG = "Priming Complete!" + +#main treatment pressure +PRESSURE_TITLE = "PRESSURES" +ARTERIAL_TITLE = "Arterial" +VENOUS_TITLE = "Venous" +VENOUS_UOM = "mmHg" +ARTERIAL_UOM = "mmHg" +LOW_TEXT = "LOW" +HIGH_TEXT = "HIGH" + +#main_treatment_flows +FLOW_UNIT = "mL/min" +BLOOD_FLOW_TEXT = "blood" +DIALYSATE_FLOW_TEXT = "dialysate" + +#main treatment screen +VITALS_TITLE = "VITALS" +IN_RANGE_COLOR = "#fcfcfc" +HEART_RATE_TITLE = "Heart Rate" +BLOOD_PRESSURE_TITLE = "Blood Pressure" +BLOOD_PRESSURE_UNIT = "mmHg" +HEART_RATE_UNIT = "BPM" + +#tst_treatment_monitoring +FLOWS_TEXT = "FLOWS" +BLOOD_UNIT = "mL/min" +DIALYSATE_TEXT = "Dialysate" +BLOOD_TEXT = "Blood" +VITALS_TEXT = "VITALS" +BLOOD_PRESSURE_TEXT = "mmHg" +HEARTRATE_UNIT = "BPM" +PRESSURE_TEXT = "PRESSURE (mmHg)" +ARTEREAL_TEXT = "Arterial" +VENOUS_TEXT = "Venous" +TIME_DURATION_TEXT = "Time Remaining" +ULTRAFILTERATION_TEXT = "ULTRAFILTRATION VOLUME (L)" +SALINE_BOLUS = "SALINE BOLUS" +VOLUME_DELIVERED = "Volume Delivered" +CUMULATIVE_DELIVERED = "Cumulative Delivered" +VOLUME_DELIVERED = "Volume Delivered" + +#post-treatment PATIENT_DISCONNECTION_TEXT = "Patient Disconnection" REVIEW_TEXT = "Review" EXPORT_TEXT = "Export" @@ -25,16 +524,9 @@ BACK_TEXT = "BACK" CONFIRM_TEXT = "CONFIRM" DISPOSABLES_REMOVAL_TEXT = "Disposables Removal" -POST_TREATMENT_SCREENS = ["Disconnection", "Review", "Disposables", "Disinfection"] #post treatment review -HEPARIN_TYPE = "UFH 1,000 IU/mL" -ACID_CONCENTRATE = ["Fres. Naturalyte", "08-1251-1", "08-2251-0", "08-3251-9", "08-3251-9"] -BICARBONATE_CONCENTRATE = "Fres. Centrisol" -DIALYZER_TYPE = ["BB Diacap Pro 13H", "BB Diacap Pro 16H", "BB Diacap Pro 19H", "F Optiflux F160NRe", "F Optiflux F180NRe"] - TREATMENT_REVIEW_TITLE_TEXT = "Treatment Review" - POST_TREATMENT_REVIEW_SCREEN_UNITS = { "Patient ID" : "", "Heparin Stop" : "min", @@ -74,6 +566,33 @@ "Average Venous Pressure" : "mmHg", } +#Information +INFORMATION_TITLES = ["Information", "Versions"] +INFORMATION_PARAMETERS = ["Information", "UI Version", "HD Version", "HD FPGA Version", "HD Serial Number", "DG Version", "DG FPGA Version", "DG Serial Number"] +SERIVCES_TITLE = "Services" +SERVICES_PARAMETERS = ["HD Last Service Date", "HD Next Service Date", "DG Last Service Date", "DG Next Service Date"] +#volume and brightness +VOLUME_AND_BRIGHTNESS_TEXT = "Volume And Brightness" +BRIGHTNESS_TEXT = "Brightness" +ALARM_VOLUME_TEXT = "Alarm Volume" +UNIT_OF_VOLUME_AND_BRIGHTNESS = "%" - +#services +SHUTDOWN_TEXT = "SHUTDOWN" + +# pretreatment_patient_connection +ACK_REQ_STATUS = 'Ack Req' +ACK_BAK_STATUS = 'Ack Bak' +PATIENT_CONNECTION_TEXT = "Patient Connection" +UF_VOLUME_TEXT = "Ultrafiltration Volume (L)" +UF_TITLE_TEXT = "Ultrafiltration Setup" +BP_HR_TEXT = "BP/HR" +SKIP_TEXT = "SKIP" +TUTORIAL_TEXT = { + 0 : "Wash your hands and establish vascular access per your clinic's instructions.", + 1 : "Pinch arterial clamp and venous clamp on located on the cartridge patient lines.", + 2 : "Remove arterial and venous shunt.", + 3 : "Connect arterial and venous cartridge lines to your patient access lines." +} + Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r5c9825f73e3d8daf6070b64d2c54cf8da61cbef4 -rba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 5c9825f73e3d8daf6070b64d2c54cf8da61cbef4) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision ba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438) @@ -11,18 +11,17 @@ # ############################################################################ +import builtins import csv import glob import math -import object import names -import sys -import builtins -import names +import object import os -import test -import time +import sys import squish +import time +import test from builtins import format from builtins import int as pyInt @@ -41,43 +40,6 @@ def color_verification(exp_val = "Red", act_val = "#c53b33"): test.compare(config.COLOR_CODES[color_name],(act_val.color[name])) - -def verify_page_step_indicator(screen_obj, post_treatment_step): - """ - Method to verify the Page Step indicators [the object on top of the screen which indicates the steps passed, current, remained] - @param post_treatment_step : (int) indicates the Current post-treatment step - """ - test.startSection("verification of page step indicators") - for page in range(config.NUM_OF_POST_TREATMENT_BULLETS): - bullet_children = object.children(squish.waitForObjectExists(get_bullet_object(screen_obj, page))) - bullet_circle_color = bullet_children[0].color.name - #test.log() - bullet_border_color = bullet_children[0].border.color.name - step_title = squish.waitForObjectExists(get_text_object(screen_obj, config.POST_TREATMENT_SCREENS[page])) - #To verify the step indicators of the completed post treatment screens - if page < post_treatment_step: - test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current) - test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) - test.compare(bullet_circle_color, config.CURRENT_COLOR) - test.compare(bullet_border_color,config.COMPLETE_COLOR) - test.compare(step_title.color.name,config.ENABLED_COLOR) - #To verify the step indicators of the current post treatment screen - elif page == post_treatment_step: - test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current,) - test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) - test.compare(bullet_circle_color,config.CURRENT_COLOR) - test.compare(bullet_border_color,config.COLOR) - test.compare(step_title.color.name,config.ENABLED_COLOR_ONE) - test.verify(step_title.font.bold) - #To verify the step indicators of the remaining post treatment screens - else: - test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current,) - test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete,) - test.compare(step_title.color.name,config.COLOR) - test.compare(bullet_circle_color,config.CURRENT_COLOR) - test.compare(bullet_border_color,config.COLOR) - test.endSection() - def get_text_object(screen_obj, txt): """ @@ -139,50 +101,26 @@ return False + def pressure_pop_up_text_obj(text): names.o_pop_up_pressure_text_obj["text"] = text return names.o_pop_up_pressure_text_obj + def pressure_text_obj(text): names.o_pressure_text_obj["text"] = text return names.o_pressure_text_obj + def get_current_date_and_time(date_format='%Y/%b/%d - %H:%M'): date = datetime.now() return str(date.strftime(date_format)) -def enter_keypad_value(entry): - """ - Method to enter user desired - value using keypad - @param entry: (str) User expected value - """ - test.startSection("Entering {}".format(entry)) - for value in entry: - value = pyInt(value) - key_val = squish.waitForObject(keypad_input(value)) - squish.mouseClick(key_val) - utils.waitForGUI(1) - test.endSection() -def erase_entered_value(input_field): - """ - Method to erase the entered value - @param input_field - (obj) object of input field - """ - test.startSection("Erasing value") - input_field= squish.waitForObject(input_field) - entered_value = str(input_field.text) - for value in range(len(entered_value)+1): - utils.waitForGUI(1) - squish.mouseClick(squish.waitForObjectExists(names.o_back_space_key)) - - test.compare(str(input_field.text), "", "Input field should be empty") - test.endSection() - def vitals_reading_obj(reading): names.o_vitals_reading["text"] = reading return names.o_vitals_reading + def scroll_to_zone(zone=None, screen_object=None, direction = None): """ @@ -214,34 +152,6 @@ raise LookupError("zone object is not in view to the user after trying 100 times") -def pressure_pop_up_text_obj(text): - names.o_pop_up_pressure_text_obj["text"] = text - return names.o_pop_up_pressure_text_obj - -def pressure_text_obj(text): - names.o_pressure_text_obj["text"] = text - return names.o_pressure_text_obj - -def get_current_date_and_time(): - - date_format='%Y/%b/%d - %H:%M' - date = datetime.now() - return str(date.strftime(date_format)) - -def enter_keypad_value(entry): - """ - Method to enter user desired - value using keypad - @param entry: (str) User expected value - """ - test.startSection("Entering {}".format(entry)) - for value in entry: - value = pyInt(value) - key_val = squish.waitForObject(keypad_input(value)) - squish.mouseClick(key_val) - utils.waitForGUI(0.1) - test.endSection() - def erase_entered_value(input_field): """ Method to erase the entered value @@ -257,65 +167,21 @@ test.compare(str(input_field.text), "", "Input field should be empty") test.endSection() -def vitals_reading_obj(reading): - names.o_vitals_reading["text"] = reading - return names.o_vitals_reading -def keypad_input(key_value): - names.o_keypad_input["text"] = key_value - return names.o_keypad_input - def get_alarm_id_obj(id): names.o_alarm_id["text"] = id return names.o_alarm_id + def get_alarm_msg_obj(msg): names.o_alarm_message["text"] = msg return names.o_alarm_message + def rejection_msg(text): names.o_rejection_msg["text"] = text return names.o_rejection_msg - -def verify_page_step_indicator(screen_obj, pre_treatment_step): - """ - Method to verify the Page Step indicators [the object on top of the screen which indicates the steps passed, current, remained] - @param pre_treatment_step : indicates the Current pre-treatment step - """ - test.startSection("verification of page step indicators") - for page in range(len(config.PRE_TREATMENT_SCREENS)): - bullet_children = object.children(squish.waitForObjectExists(get_bullet_object(screen_obj, page))) - bullet_circle_color = bullet_children[0].color.name - bullet_border_color = bullet_children[0].border.color.name - step_title = squish.waitForObjectExists(get_text_object(screen_obj, config.PRE_TREATMENT_SCREENS[page])) - - if page < pre_treatment_step: - test.log("To verify the step indicator of the completed pre-treatment screen " + config.PRE_TREATMENT_SCREENS[page]) - test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) - test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current) - test.compare(bullet_circle_color, config.COMPLETE_COLOR, " the bullet color must be " + str(config.COMPLETE_COLOR)) - test.compare(bullet_border_color, config.COMPLETE_COLOR," the bullet border color must be " + str(config.COMPLETE_COLOR)) - test.compare(step_title.color.name, config.ENABLED_COLOR, " the text color must be " + str(config.ENABLED_COLOR)) - - elif page == pre_treatment_step: - test.log("To verify the step indicators of the current pre-treatment screen " + config.PRE_TREATMENT_SCREENS[page]) - test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current) - test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) - test.compare(bullet_circle_color,config.CURRENT_COLOR," the bullet color must be " + str(config.CURRENT_COLOR)) - test.compare(bullet_border_color,config.COMPLETE_COLOR, " the bullet border color must be " + str(config.COMPLETE_COLOR)) - test.compare(step_title.color.name,config.ENABLED_COLOR, " the text color must be " + str(config.ENABLED_COLOR)) - test.verify(step_title.font.bold, " the current text must be in bold") - - else: - test.log("To verify the step indicators of the remaining pre-treatment screen " + config.PRE_TREATMENT_SCREENS[page]) - test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current,) - test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete,) - test.compare(step_title.color.name,config.INCOMPLETE_COLOR, " the text color must be " + str(config.INCOMPLETE_COLOR)) - test.compare(bullet_circle_color,config.CURRENT_COLOR," the bullet color must be " + str(config.CURRENT_COLOR)) - test.compare(bullet_border_color,config.INCOMPLETE_COLOR, " the bullet border color must be " + str(config.INCOMPLETE_COLOR)) - test.endSection() - def set_arterial_ranges_min_val(art_low): """ @@ -467,6 +333,7 @@ test.compare(ven_max, ven_high, "Actual Venous range maximum value: {} is equal to Expected value: {}".format(ven_max, ven_high)) test.endSection() + #Methods for create custom treatment def set_venous_ranges_min_val(ven_low): """ @@ -519,6 +386,7 @@ "Actual Venous range minimum value: {} is equal to Expected value: {}".format(ven_min, ven_low)) test.endSection() + def scroll_to_value_on_pop_up(value=None, container=None): """ scroll to the to the value if object is hidden @@ -548,284 +416,7 @@ names.o_heparin_value["text"] = val return names.o_heparin_value -def get_alarm_id_obj(id): - names.o_alarm_id["text"] = id - return names.o_alarm_id - -def get_alarm_msg_obj(msg): - names.o_alarm_message["text"] = msg - return names.o_alarm_message - -def rejection_msg(text): - names.o_rejection_msg["text"] = text - return names.o_rejection_msg -def verify_page_step_indicator(screen_obj, pre_treatment_step): - """ - Method to verify the Page Step indicators [the object on top of the screen which indicates the steps passed, current, remained] - @param pre_treatment_step : indicates the Current pre-treatment step - """ - test.startSection("verification of page step indicators") - for page in range(config.NUM_OF_PRETREATMENT_BULLETS): - bullet_children = object.children(squish.waitForObjectExists(get_bullet_object(screen_obj, page))) - bullet_circle_color = bullet_children[0].color.name - bullet_border_color = bullet_children[0].border.color.name - step_title = squish.waitForObjectExists(get_text_object(screen_obj, config.PRE_TREATMENT_SCREENS[page])) - - if page < pre_treatment_step: - test.log("To verify the step indicator of the completed pre-treatment screen " + config.PRE_TREATMENT_SCREENS[page]) - test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) - test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current) - test.compare(bullet_circle_color, config.COMPLETE_COLOR, " the bullet color must be " + str(config.COMPLETE_COLOR)) - test.compare(bullet_border_color, config.COMPLETE_COLOR," the bullet border color must be " + str(config.COMPLETE_COLOR)) - test.compare(step_title.color.name, config.ENABLED_COLOR, " the text color must be " + str(config.ENABLED_COLOR)) - - elif page == pre_treatment_step: - test.log("To verify the step indicators of the current pre-treatment screen " + config.PRE_TREATMENT_SCREENS[page]) - test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current) - test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) - test.compare(bullet_circle_color,config.CURRENT_COLOR," the bullet color must be " + str(config.CURRENT_COLOR)) - test.compare(bullet_border_color,config.COMPLETE_COLOR, " the bullet border color must be " + str(config.COMPLETE_COLOR)) - test.compare(step_title.color.name,config.ENABLED_COLOR, " the text color must be " + str(config.ENABLED_COLOR)) - test.verify(step_title.font.bold, " the current text must be in bold") - - else: - test.log("To verify the step indicators of the remaining pre-treatment screen " + config.PRE_TREATMENT_SCREENS[page]) - test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current,) - test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete,) - test.compare(step_title.color.name,config.INCOMPLETE_COLOR, " the text color must be " + str(config.INCOMPLETE_COLOR)) - test.compare(bullet_circle_color,config.CURRENT_COLOR," the bullet color must be " + str(config.CURRENT_COLOR)) - test.compare(bullet_border_color,config.INCOMPLETE_COLOR, " the bullet border color must be " + str(config.INCOMPLETE_COLOR)) - test.endSection() - - -def set_arterial_ranges_min_val(art_low): - """ - Method to set the Arterial range maximum value to user expected value - @param art_low - (int) user expected value - """ - test.startSection("Set Arterial range minimum value to {}".format(art_low)) - arterial_min = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery) - arterial_min = pyInt(arterial_min.minimum) - arterial_max = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery) - arterial_max = pyInt(arterial_max.maximum) - low_handler_parent = object.parent(squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery)) - low_handler_children = object.children(low_handler_parent) - low_handler = low_handler_children[-2] - width = pyInt(low_handler.width) - 8 - height = pyInt(low_handler.height)- 10 - if arterial_min == art_low: - test.passes("Arterial range minimum is already set to {}".format(art_low)) - elif arterial_min < art_low: - while arterial_min != art_low: - squish.mouseDrag(low_handler, width, height, 1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) - arterial_min += 10 - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_min == arterial_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(low_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Arterial range minimum value cannot be moved beyond {}".format(arterial_min)) - break - else: - continue - elif arterial_min > art_low: - while arterial_min != art_low: - squish.mouseDrag(low_handler, width, height, -1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) - arterial_min -= 10 - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_min == arterial_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(low_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Arterial range minimum value cannot be moved beyond {}".format(arterial_min)) - break - else: - continue - # arterial blood pressure low limit should be lower than the high limit by atleast 30mmHg - if arterial_min == arterial_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(low_handler_parent.minValue, arterial_min, "Arterial range minimum value cannot be moved beyond {}".format(arterial_min)) - else: - test.compare(arterial_min, art_low, "Actual Arterial range minimum value: {} is equal to Expected value: {}".format(arterial_min, art_low)) - test.endSection() - - -def set_arterial_ranges_max_val(art_high): - """ - Method to set the Arterial range maximum value to user expected value - @param art_high - (int) user expected value - """ - test.startSection("Set Arterial range maximum value to {}".format(art_high)) - arterial_max = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery) - arterial_max = pyInt(arterial_max.maximum) - arterial_min = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery) - arterial_min = pyInt(arterial_min.minimum) - high_handler_parent = object.parent(squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery)) - high_handler_children = object.children(high_handler_parent) - high_handler = high_handler_children[-1] - width = pyInt(high_handler.width) - 20 - height = pyInt(high_handler.height) - 25 - if arterial_max == art_high: - test.passes("Arterial range maximum is already set to {}".format(art_high)) - elif arterial_max < art_high: - while arterial_max != art_high: - squish.mouseDrag(high_handler, -1, height, width, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) - arterial_max += 10 - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) - break - else: - continue - elif arterial_max > art_high: - while arterial_max != art_high: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - arterial_max -= 10 - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) - break - else: - continue - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(high_handler_parent.maxValue, arterial_max, - "Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) - else: - test.compare(arterial_max, art_high, - "Actual Arterial range maximum value: {} is equal to Expected value: {}".format(arterial_max, art_high)) - test.endSection() - - -def set_venous_ranges_max_val(ven_high): - """ - Method to set the Venous range maximum value to user expected value - @param ven_high - (int) user expected value - """ - test.startSection("Set Venous range maximum value to {}".format(ven_high)) - ven_max = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Venous) - ven_max = pyInt(ven_max.maximum) - ven_min = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Venous) - ven_min = pyInt(ven_min.minimum) - high_handler_parent = object.parent(squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Venous)) - high_handler_children = object.children(high_handler_parent) - high_handler = high_handler_children[-1] - width = pyInt(high_handler.width) - 15 - height = pyInt(high_handler.height) - 10 - if ven_max == ven_high: - test.passes("Venous range maximum is already set to {}".format(ven_high)) - elif ven_max < ven_high: - while ven_max != ven_high: - squish.mouseDrag(high_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - ven_max += 10 - # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - if ven_max == ven_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Venous range maximum value cannot be moved beyond {}".format(ven_max)) - break - else: - continue - elif ven_max > ven_high: - while ven_max != ven_high: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - ven_max -= 10 - # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - if ven_max == ven_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Venous range maximum value cannot be moved beyond {}".format(ven_max)) - break - else: - continue - # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - if ven_max == ven_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(high_handler_parent.maxValue, ven_max, "Venous range maximum value cannot be moved beyond {}".format(ven_max)) - else: - test.compare(ven_max, ven_high, "Actual Venous range maximum value: {} is equal to Expected value: {}".format(ven_max, ven_high)) - test.endSection() - -#Methods for create custom treatment -def set_venous_ranges_min_val(ven_low): - """ - Method to set the Venous range maximum value to user expected value - @param ven_low - (int) user expected value - """ - test.startSection("set Venous range minimum value to {}".format(ven_low)) - ven_min = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Venous) - ven_min = pyInt(ven_min.minimum) - ven_max = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Venous) - ven_max = pyInt(ven_max.maximum) - low_handler_parent = object.parent(squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Venous)) - low_handler_children = object.children(low_handler_parent) - low_handler = low_handler_children[-2] - width = pyInt(low_handler.width) - 15 - height = pyInt(low_handler.height) - 10 - if ven_min == ven_low: - test.passes("Venous range minimum is already set to {}".format(ven_low)) - elif ven_min < ven_low: - while ven_min != ven_low: - squish.mouseDrag(low_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - ven_min += 10 - if ven_min == ven_max - config.BUFFER_LOW_AND_HIGH_LIMITS: # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - squish.mouseDrag(low_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Venous range minimum value cannot be moved beyond {}".format(ven_min)) - break - else: - continue - elif ven_min > ven_low: - while ven_min != ven_low: - squish.mouseDrag(low_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - ven_min -= 10 - # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - if ven_min == ven_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(low_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Venous range minimum value cannot be moved beyond {}".format(ven_min)) - break - else: - continue - # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - if ven_min == ven_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(low_handler_parent.minValue, ven_min, - "Venous range minimum value cannot be moved beyond {}".format(ven_min)) - else: - test.compare(ven_min, ven_low, - "Actual Venous range minimum value: {} is equal to Expected value: {}".format(ven_min, ven_low)) - test.endSection() - -def scroll_to_value_on_pop_up(value=None, container=None): - """ - scroll to the to the value if object is hidden - @param value - (obj) value object - @param container - (obj) Container of the value - @return boolean true and false - """ - counter = 0 - while counter <= 100: - try: - counter += 1 - squish.findObject(value) - squish.snooze(0.5) - if check_if_object_is_within_the_container(obj=value, container=container): - return True - else: - raise RuntimeError - except RuntimeError: - ScreenObj = squish.waitForObject(container) - screenHeight = pyInt(ScreenObj.height) - screenWidth = pyInt(ScreenObj.width) - squish.mouseWheel(ScreenObj, screenWidth//2, screenHeight//2, 0, -50, squish.Qt.NoModifier) - raise LookupError("value object is not in view to the user after trying 100 times") - def msg(string): """ Added ### at the right side of the string to make sure that it is a message. @@ -835,6 +426,7 @@ padded_str = "###"+string return padded_str + def navigate_to_pretreatment_screen(mode): """ Method to navigate to sub mode under pre-treatment screen @@ -846,13 +438,11 @@ installation_state=0, dry_self_test_state=0, prime_state=0, recirculate_state=0, patient_connection_state=0) + def self_test_dry_check_list_text(text): names.o_self_test_dry_check_list_text["text"] = text return names.o_self_test_dry_check_list_text -def convert_seconds_into_min_and_sec(seconds): - min_and_sec = time.strftime("%M:%S", time.gmtime(seconds)) - return min_and_sec def get_time(screen_title): """ @@ -876,6 +466,7 @@ time_text = progress_circle_children[1] return time_text.time + def verify_countdown(screen_title, time_out, hd_simulator, dg_simulator): """ Method to verify the count down @@ -900,6 +491,7 @@ test.compare(actual_time, expected_time, "Actual count down time: {} should be equal to expected count down time {}".format(actual_time, expected_time)) verify_the_progress(count_down, screen_title, time_out) test.endSection() + def verify_the_progress(count_down, screen_title, time_out): """ @@ -955,6 +547,7 @@ test.compare(bullet_circle_color, config.CURRENT_COLOR) test.compare(bullet_border_color, config.INCOMPLETE_COLOR) test.endSection() + def verify_missing_object(object_to_check): """ @@ -969,117 +562,8 @@ test.passes("object is not present as expected") squish.testSettings.objectNotFoundDebugging = True - -def set_arterial_ranges_min_val(art_low): - """ - Method to set the Arterial range maximum value to user expected value - @param art_low - (int) user expected value - """ - test.startSection("Set Arterial range minimum value to {}".format(art_low)) - arterial_min = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery) - arterial_min = pyInt(arterial_min.minimum) - arterial_max = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery) - arterial_max = pyInt(arterial_max.maximum) - low_handler_parent = object.parent(squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery)) - low_handler_children = object.children(low_handler_parent) - low_handler = low_handler_children[-2] - width = pyInt(low_handler.width) - 8 - height = pyInt(low_handler.height)- 10 - if arterial_min == art_low: - test.passes("Arterial range minimum is already set to {}".format(art_low)) - elif arterial_min < art_low: - while arterial_min != art_low: - squish.mouseDrag(low_handler, width, height, 1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) - arterial_min += 10 - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_min == arterial_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(low_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Arterial range minimum value cannot be moved beyond {}".format(arterial_min)) - break - else: - continue - elif arterial_min > art_low: - while arterial_min != art_low: - squish.mouseDrag(low_handler, width, height, -1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) - arterial_min -= 10 - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_min == arterial_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(low_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Arterial range minimum value cannot be moved beyond {}".format(arterial_min)) - break - else: - continue - # arterial blood pressure low limit should be lower than the high limit by atleast 30mmHg - if arterial_min == arterial_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(low_handler_parent.minValue, arterial_min, "Arterial range minimum value cannot be moved beyond {}".format(arterial_min)) - else: - test.compare(arterial_min, art_low, "Actual Arterial range minimum value: {} is equal to Expected value: {}".format(arterial_min, art_low)) - test.endSection() -def set_arterial_ranges_max_val(art_high): - """ - Method to set the Arterial range maximum value to user expected value - @param art_high - (int) user expected value - """ - test.startSection("Set Arterial range maximum value to {}".format(art_high)) - arterial_max = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery) - arterial_max = pyInt(arterial_max.maximum) - arterial_min = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery) - arterial_min = pyInt(arterial_min.minimum) - high_handler_parent = object.parent(squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery)) - high_handler_children = object.children(high_handler_parent) - high_handler = high_handler_children[-1] - width = pyInt(high_handler.width) - 20 - height = pyInt(high_handler.height) - 25 - if arterial_max == art_high: - test.passes("Arterial range maximum is already set to {}".format(art_high)) - elif arterial_max < art_high: - while arterial_max != art_high: - squish.mouseDrag(high_handler, -1, height, width, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) - arterial_max += 10 - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) - break - else: - continue - elif arterial_max > art_high: - while arterial_max != art_high: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - arterial_max -= 10 - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) - break - else: - continue - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(high_handler_parent.maxValue, arterial_max, - "Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) - else: - test.compare(arterial_max, art_high, - "Actual Arterial range maximum value: {} is equal to Expected value: {}".format(arterial_max, art_high)) - test.endSection() - -def get_text_object(screen_obj, txt): - """ - To obtain a text object based on text provided - @param screen_obj: provides the container on which the txt must be present - @returns a real name object - """ - names.o_text_object["container"] = screen_obj - names.o_text_object["text"] = txt - return names.o_text_object - def verify_color_of_entry(entry, vital_parameter, input_field): """ Method to verify the color of entry @@ -1108,16 +592,6 @@ test.compare(input_field_color, config.IN_RANGE_COLOR, "Heart Rate value {} is in range of {} and {}".format(entry, config.HEART_RATE_LOWER_LIMIT, config.HEART_RATE_UPPER_LIMIT)) test.endSection() -def get_bullet_object(screen_obj, num): - """ - To obtain a bullet object based on occurrence provided. - @param screen_obj: provides the container on which the bullet must be present - @param num: provides the occurrence value - @returns a real name object - """ - names.o_bullet_object["container"] = screen_obj - names.o_bullet_object["occurrence"] = num + 1 - return names.o_bullet_object def keypad_input(key_value): """ @@ -1130,6 +604,7 @@ else: test.log("Invalid text for object.") names.o_keypad_input["text"] = None + def enter_keypad_value(entry): """ @@ -1142,67 +617,8 @@ for value in entry: squish.mouseClick(squish.waitForObject(keypad_input(value))) test.endSection() - - -def erase_entered_value(input_field): - """ - Method to erase the entered value - @param input_field - (obj) object of input field - """ - test.startSection("Erasing value") - input_field= squish.waitForObject(input_field) - entered_value = str(input_field.text) - for value in range(len(entered_value)+1): - utils.waitForGUI(1) - squish.mouseClick(squish.waitForObjectExists(names.o_back_space_key)) - - test.compare(str(input_field.text), "", "Input field should be empty") - test.endSection() - -def get_indicators(screen_obj, txt): - """ - Verifying the busy indicators for BiCarb Pump Check and Acid Pump Check. - indicator object of expected text - @param step - (str) expected text - @return indicators - (obj) list of busy and check indicator - """ - parent_obj = object.parent(squish.waitForObjectExists(get_text_object(screen_obj,txt))) - children_obj = object.children(parent_obj) - indicator_parent = children_obj[2] - indicators = object.children(indicator_parent) - return indicators -def convert_seconds_into_min_and_sec(seconds, format="%M:%S"): - min_and_sec = time.strftime(format, time.gmtime(seconds)) - return min_and_sec -def expected_heparin_value(val): - names.o_heparin_value["text"] = val - return names.o_heparin_value - -def get_current_date_and_time(date_format='%Y/%b/%d - %H:%M:%S'): - - date = datetime.now() - return str(date.strftime(date_format)) - -def navigate_to_pretreatment_screen(mode): - """ - Method to navigate to sub mode under pre-treatment screen - @param mode - (int) pre treatment state - """ - hd_simulator.cmd_set_hd_operation_mode_data(5,0) - - hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=mode, water_sample_state=0,consumables_self_test_state=0, - no_cartridge_self_test_state=0,installation_state=0, dry_self_test_state=0, - prime_state=0,recirculate_state=0, patient_connection_state=0) - - - -def get_current_date_and_time(date_format='%Y/%b/%d - %H:%M:%S'): - - date = datetime.now() - return str(date.strftime(date_format)) - def is_float(num): """ This function checks the value is adaptable for float conversion. @@ -1249,7 +665,8 @@ return latest_file except: return False - + + def get_message_from_log(file_name, message_text): """ @@ -1293,6 +710,7 @@ test.fail("application log data is corrupted") except: test.fail("Log file is not created or log file is not created based on standard log naming format.") + def get_ack_request_details(file_name, message_text): """ @@ -1336,7 +754,6 @@ test.fail("Log file is not created or log file is not created based on standard log naming format.") - def get_bak_request_details(file_name, ack_bak_value): """ This method intended to extract the acknowledgement back status from application log. @@ -1366,6 +783,7 @@ test.fail("application log data is corrupted") except: test.fail("Log file is not created or log file is not created based on standard log naming format.") + def get_current_log_details(message_ack = False, message_text = None): """ @@ -1393,283 +811,29 @@ content_record.append(ack_bak_status) return content_record + def vitals_interval_obj(interval): names.o_time_interval_obj["text"] = interval return names.o_time_interval_obj -def msg(string): - """ - Added ### at the right side of the string to make sure that it is a message. - @param string: (str) the string to add trailing ### to - @return pad_str: (str) padded string - """ - padded_str = "###"+string - return padded_str -def set_arterial_ranges_min_val(art_low): - """ - Method to set the Arterial range maximum value to user expected value - @param art_low - (int) user expected value - """ - test.startSection("Set Arterial range minimum value to {}".format(art_low)) - arterial_min = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery) - arterial_min = pyInt(arterial_min.minimum) - arterial_max = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery) - arterial_max = pyInt(arterial_max.maximum) - low_handler_parent = object.parent(squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery)) - low_handler_children = object.children(low_handler_parent) - low_handler = low_handler_children[-2] - width = pyInt(low_handler.width) - 8 - height = pyInt(low_handler.height)- 10 - if arterial_min == art_low: - test.passes("Arterial range minimum is already set to {}".format(art_low)) - elif arterial_min < art_low: - while arterial_min != art_low: - squish.mouseDrag(low_handler, width, height, 1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) - arterial_min += 10 - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_min == arterial_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(low_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Arterial range minimum value cannot be moved beyond {}".format(arterial_min)) - break - else: - continue - elif arterial_min > art_low: - while arterial_min != art_low: - squish.mouseDrag(low_handler, width, height, -1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) - arterial_min -= 10 - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_min == arterial_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(low_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Arterial range minimum value cannot be moved beyond {}".format(arterial_min)) - break - else: - continue - # arterial blood pressure low limit should be lower than the high limit by atleast 30mmHg - if arterial_min == arterial_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(low_handler_parent.minValue, arterial_min, "Arterial range minimum value cannot be moved beyond {}".format(arterial_min)) - else: - test.compare(arterial_min, art_low, "Actual Arterial range minimum value: {} is equal to Expected value: {}".format(arterial_min, art_low)) - test.endSection() +# def cmd_set_create_treatment_click_event(response): +# """ +# Sends a set RTC response message +# +# @param response: (int) 0=NO, 1=YES +# @return: N +# """ +# test.log("HD: Sending response {0}".format(response)) +# +# payload = integer_to_bytearray(response) +# +# message = DenaliMessage.build_message(channel_id=DenaliChannels.ui_to_hd_ch_id, +# message_id=MsgIds.MSG_ID_UI_INITIATE_TREATMENT_REQUEST.value, +# payload=payload) +# return message - -def set_arterial_ranges_max_val(art_high): - """ - Method to set the Arterial range maximum value to user expected value - @param art_high - (int) user expected value - """ - test.startSection("Set Arterial range maximum value to {}".format(art_high)) - arterial_max = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery) - arterial_max = pyInt(arterial_max.maximum) - arterial_min = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery) - arterial_min = pyInt(arterial_min.minimum) - high_handler_parent = object.parent(squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Artery)) - high_handler_children = object.children(high_handler_parent) - high_handler = high_handler_children[-1] - width = pyInt(high_handler.width) - 20 - height = pyInt(high_handler.height) - 25 - if arterial_max == art_high: - test.passes("Arterial range maximum is already set to {}".format(art_high)) - elif arterial_max < art_high: - while arterial_max != art_high: - squish.mouseDrag(high_handler, -1, height, width, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) - arterial_max += 10 - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) - break - else: - continue - elif arterial_max > art_high: - while arterial_max != art_high: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - arterial_max -= 10 - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) - break - else: - continue - # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg - if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(high_handler_parent.maxValue, arterial_max, - "Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) - else: - test.compare(arterial_max, art_high, - "Actual Arterial range maximum value: {} is equal to Expected value: {}".format(arterial_max, art_high)) - test.endSection() -def set_venous_ranges_max_val(ven_high): - """ - Method to set the Venous range maximum value to user expected value - @param ven_high - (int) user expected value - """ - test.startSection("Set Venous range maximum value to {}".format(ven_high)) - ven_max = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Venous) - ven_max = pyInt(ven_max.maximum) - ven_min = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Venous) - ven_min = pyInt(ven_min.minimum) - high_handler_parent = object.parent(squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Venous)) - high_handler_children = object.children(high_handler_parent) - high_handler = high_handler_children[-1] - width = pyInt(high_handler.width) - 15 - height = pyInt(high_handler.height) - 10 - if ven_max == ven_high: - test.passes("Venous range maximum is already set to {}".format(ven_high)) - elif ven_max < ven_high: - while ven_max != ven_high: - squish.mouseDrag(high_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - ven_max += 10 - # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - if ven_max == ven_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Venous range maximum value cannot be moved beyond {}".format(ven_max)) - break - else: - continue - elif ven_max > ven_high: - while ven_max != ven_high: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - ven_max -= 10 - # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - if ven_max == ven_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Venous range maximum value cannot be moved beyond {}".format(ven_max)) - break - else: - continue - # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - if ven_max == ven_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(high_handler_parent.maxValue, ven_max, "Venous range maximum value cannot be moved beyond {}".format(ven_max)) - else: - test.compare(ven_max, ven_high, "Actual Venous range maximum value: {} is equal to Expected value: {}".format(ven_max, ven_high)) - test.endSection() - -#Methods for create custom treatment -def set_venous_ranges_min_val(ven_low): - """ - Method to set the Venous range maximum value to user expected value - @param ven_low - (int) user expected value - """ - test.startSection("set Venous range minimum value to {}".format(ven_low)) - ven_min = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Venous) - ven_min = pyInt(ven_min.minimum) - ven_max = squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Venous) - ven_max = pyInt(ven_max.maximum) - low_handler_parent = object.parent(squish.waitForObjectExists(names.o_PreTreatmentCreate_rangeRect_RangeRect_Venous)) - low_handler_children = object.children(low_handler_parent) - low_handler = low_handler_children[-2] - width = pyInt(low_handler.width) - 15 - height = pyInt(low_handler.height) - 10 - if ven_min == ven_low: - test.passes("Venous range minimum is already set to {}".format(ven_low)) - elif ven_min < ven_low: - while ven_min != ven_low: - squish.mouseDrag(low_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - ven_min += 10 - if ven_min == ven_max - config.BUFFER_LOW_AND_HIGH_LIMITS: # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - squish.mouseDrag(low_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Venous range minimum value cannot be moved beyond {}".format(ven_min)) - break - else: - continue - elif ven_min > ven_low: - while ven_min != ven_low: - squish.mouseDrag(low_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - ven_min -= 10 - # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - if ven_min == ven_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(low_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) - test.log("Venous range minimum value cannot be moved beyond {}".format(ven_min)) - break - else: - continue - # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - if ven_min == ven_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(low_handler_parent.minValue, ven_min, - "Venous range minimum value cannot be moved beyond {}".format(ven_min)) - else: - test.compare(ven_min, ven_low, - "Actual Venous range minimum value: {} is equal to Expected value: {}".format(ven_min, ven_low)) - test.endSection() - -def enter_keypad_value_bphr(entry): - """ - Method to enter user desired - value using keypad - @param entry: (str) User expected value - """ - test.startSection("Entering {}".format(entry)) - entry = pyStr(entry) #type casted into string format - for value in entry: - squish.mouseClick(squish.waitForObject(keypad_input(value))) - test.endSection() - - -def ui_all_publication_handler(message: dict) -> None: - """ - This function is the default handler of the ui received messages which only prints out the received message - - This function can be used as an example. - - Be careful that there is only one ui publication method - and it will be overwritten on each call to the function set_ui_all_publication of the HDSimulator. - Look into the _init_loader of the Simulator class for example on how to register. - self.interface.hd.set_ui_all_publication(ui_all_publication_handler) - - This function is filtering the two message ID: - MsgIds.MSG_ID_UI_CHECK_IN.value, - MsgIds.MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK.value - for the simplicity of the printed message and as example of how to filter. - That filter can obviously be removed. - - @param message: the ui received message - @return: event binary from simulator - """ - exception_msg_id = { - MsgIds.MSG_ID_UI_CHECK_IN.value, - MsgIds.MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK.value - } - msg_id = DenaliMessage.get_message_id(message) - if msg_id in exception_msg_id: - return - - message_list = DenaliCanMessenger.convert_message_to_string(message) - event_binary = "" + pad_message_with_zeros(message_list) - - return event_binary - - -def cmd_set_create_treatment_click_event(response): - """ - Sends a set RTC response message - - @param response: (int) 0=NO, 1=YES - @return: N - """ - test.log("HD: Sending response {0}".format(response)) - - payload = integer_to_bytearray(response) - - message = DenaliMessage.build_message(channel_id=DenaliChannels.ui_to_hd_ch_id, - message_id=MsgIds.MSG_ID_UI_INITIATE_TREATMENT_REQUEST.value, - payload=payload) - - return message - - def get_extracted_error_file(): """ This function is the handler for getting error file from service folder. @@ -1685,51 +849,12 @@ except: return False -def scroll_to_value_on_pop_up(value=None, container=None): - """ - scroll to the to the value if object is hidden - @param value - (obj) value object - @param container - (obj) Container of the value - @return boolean true and false - """ - counter = 0 - while counter <= 100: - try: - counter += 1 - squish.findObject(value) - squish.snooze(0.5) - if check_if_object_is_within_the_container(obj=value, container=container): - return True - else: - raise RuntimeError - except RuntimeError: - ScreenObj = squish.waitForObject(container) - screenHeight = pyInt(ScreenObj.height) - screenWidth = pyInt(ScreenObj.width) - squish.mouseWheel(ScreenObj, screenWidth//2, - screenHeight//2, 0, -50, squish.Qt.NoModifier) - - raise LookupError("value object is not in view to the user after " + \ - "trying 100 times") -def expected_heparin_value(val): - names.o_heparin_value["text"] = val - return names.o_heparin_value - - -def msg(string): - """ - Added ### at the right side of the string to make sure that it is a message. - @param string: (str) the string to add trailing ### to - @return pad_str: (str) padded string - """ - padded_str = "###"+string - return padded_str - def keyboard_input(key_value): names.o_keyboard_object["text"] = key_value return names.o_keyboard_object + def enter_keyboard_numeric_value(entry): """ Method to enter user desired @@ -1746,108 +871,8 @@ squish.mouseClick(key_val) utils.waitForGUI(0.1) test.endSection() - -def keypad_input(key_value): - names.o_keypad_input["text"] = key_value - return names.o_keypad_input - -def enter_keypad_value(entry): - """ - Method to enter user desired - value using keypad - @param entry: (str) User expected value - """ - test.startSection("Entering {}".format(entry)) - entry = pyStr(entry) - for value in entry: - value = pyInt(value) - key_val = squish.waitForObject(keypad_input(value)) - squish.mouseClick(key_val) - utils.waitForGUI(0.1) - test.endSection() - - -def erase_entered_value(input_field): - """ - Method to erase the entered value - @param input_field - (obj) object of input field - """ - test.startSection("Erasing value") - input_field= squish.waitForObject(input_field) - entered_value = str(input_field.text) - for value in range(len(entered_value)+1): - utils.waitForGUI(0.1) - squish.mouseClick(squish.waitForObjectExists(names.o_back_space_key)) - - test.compare(str(input_field.text), "", "Input field should be empty") - test.endSection() - -def get_current_date_and_time(date_format='%Y/%b/%d - %H:%M:%S'): - date = datetime.now() - return str(date.strftime(date_format)) -def is_float(num): - """ - This function checks the value is adaptable for float conversion. - - @param num - (string) input value for conversion. - @return True/False- (bool) returns True if the value can type casted into float, else False - """ - try: - if '.' in num: - float(num) - return True - except ValueError: - return False - - -def is_intiger(num): - """ - This function checks the value is adaptable for integer conversion. - - @param num - (string) (string) input value for conversion. - @return True/False- (bool) returns True if the value can type casted into int, else False - """ - try: - if num.isdigit(): - return True - except ValueError: - return False - -def scroll_to_zone(zone=None, screen_object=None, direction = None): - """ - scroll to the UI, if object is hidden - @param zone - object to be find out. - @param screen_object - object of the screen. - @return boolean - """ - counter = 0 - while counter <= 100: - try: - counter += 1 - squish.snooze(0.5) - squish.findObject(zone) - squish.snooze(0.5) - if check_if_object_is_within_the_container(obj=zone, container=screen_object): - return True - else: - raise RuntimeError - except RuntimeError: - ScreenObj = squish.findObject(screen_object) - screenHeight = pyInt(ScreenObj.height) - screenWidth = pyInt(ScreenObj.width) - if direction is None: - squish.mouseWheel(ScreenObj, (screenWidth-100), - 107, 0, -(screenHeight-460), squish.Qt.NoModifier) - else: - squish.mouseWheel(ScreenObj, (screenWidth-100), - -(screenHeight-700), 0, 50, squish.Qt.NoModifier) - - raise LookupError("zone object is not in view to the user after " + \ - "trying 100 times") - - def convert_seconds_into_min_and_sec(seconds, time_format="%M:%S"): """ Method to convert seconds into minute format. @@ -1901,254 +926,56 @@ except: test.fail("log file is not created during application interaction") return False - -def get_extracted_file(): - """ - This function is the handler for getting file from log folder. - - This handler will go inside log folder and looks for newly added log based on current time. - if it satisfied that condition, it will return the exact path of newly created log. - - Application log file is automatically created on '/home/denali/Desktop/sd-card/log/ {current_date}_denaliSquish.log' - - @return latest_file - (string) returns latest file that append on log folder from sd-data - """ - current_date = get_current_date_and_time(date_format = "%Y_%m_%d") - latest_file = '/home/denali/Desktop/sd-card/log/'+current_date+'_denaliSquish.log' - return latest_file - - -def get_message_from_log(file_name, message_text): - - """ - This method intended to extract the message from application log. - For row[index], index represent column to be extracted. - - @param file_name - (string) path of the latest log file created. - @param message_text - (string) message text to be extracted. - @return message - (list) API arguments displayed in log. - """ - message = [] - count = 0 - try: - with open(file_name, 'r') as csv_file: - try: - for row in reversed(list(csv.reader(csv_file))): - if row[0].isalpha(): - pass - else: - row_length = sum(1 for values in row) - if row_length >= 4: - if row[3]!= None and row[3] == message_text: - if count == 30: - test.log("2") - test.fail("handler unable to find message text from log file.") - message_length = sum(1 for values in row) - for column in range(4, message_length, 1): - message.append(row[column]) - count +=1 - for value in range(len(message)): - float_status = is_float(message[value]) - int_status = is_intiger(message[value]) - if float_status is True: - message[value] = float(message[value]) - if int_status is True: - message[value] = int(message[value]) - return message - else: - pass - except: - test.fail("application log data is corrupted") - except: - test.fail("Log file is not created or log file is not created based on standard log naming format.") - - -def get_ack_request_details(file_name, message_text): - """ - This method intended to extract acknowledgement request status, negative requested acknowledgement - and message id from application log. - - For row[index], were index represent column to be extracted. - - @param file_name - (string) path of the latest log file created. - @param message_text - (string) message text to be extracted from log. - @return row[3] - (string) acknowledgement request status. - @return row[4] - (string) Negative requested acknowledgement value (Sq). - @return message_id - (string) formatted message id from log. - """ - try: - message_id = " ID" - with open(file_name, 'r') as csv_file: - try: - for row in reversed(list(csv.reader(csv_file))): - if row[0].isalpha(): - pass - else: - row_length = sum(1 for values in row) - if row_length == 6 and row[3] != message_text: - if row[5].split(':')[0] == message_id: - extracted_message_id = pyInt(row[5].split(':')[1], 16) - formatted_message_id = format(extracted_message_id, '#0x') - # MSG_ID_HD_DEBUG_EVENT (0xFFF1) and MSG_ID_DG_DEBUG_EVENT (0xFFF2) hex values are reversed in log. - string_format_id = str(formatted_message_id) - first_two_char = string_format_id[2:4] - last_two_char = string_format_id[-2:] - if last_two_char != '00': - return row[3], row[4], ('0x'+last_two_char+first_two_char) - else: - return row[3], row[4], formatted_message_id.replace("00", "") - else: - pass - except: - test.fail("application log data is corrupted - unable to fetch data") - except: - test.fail("Log file is not created or log file is not created based on standard log naming format.") - - -def get_bak_request_details(file_name, ack_bak_value): - """ - This method intended to extract the acknowledgement back status from application log. - - For row[index], were index represent column to be extracted. - - @param file_name - (string) path of the latest log file created. - @param ack_bak_value - (string) Positive back acknowledgement value (Sq). - @return row[3] - (string) acknowledgement back status. - """ - try: - with open(file_name, 'r') as csv_file: - try: - for row in reversed(list(csv.reader(csv_file))): - if row[0].isalpha(): - pass - else: - row_length = sum(1 for values in row) - if row_length >= 5: - if row[4] == ack_bak_value: - return row[3] - else: - pass - else: - pass - except: - test.fail("application log data is corrupted") - except: - test.fail("Log file is not created or log file is not created based on standard log naming format.") - - - -def get_current_log_details(message_ack = False, message_text = None): - """ - This function is capable to perform data analysis from application log folder. - - logs are automatically created in path :"/home/denali/Desktop/sd-card/log/*.log". - - In row[index], index represent column to be extracted. - @param message_ack - (bool) 'True' - if ack is satisfied in log / 'False' - if ack condition is not satisfied - @param message_text - (string) message text to be extracted from log. - @return content_record - (list) list contains extracted data (ack_req, ack_bak, message, message_id). - """ - content_record = [] - file_name = get_extracted_file() - if message_text != None: - message = get_message_from_log(file_name, message_text) - content_record.append(message) - if message_ack != False: - ack_req_status, ack_req_value, message_id = get_ack_request_details(file_name, message_text) - ack_bak_value = ack_req_value.replace(":-", ":") # getting negative requested ack from positive requested ack - content_record.append(ack_req_status) - content_record.append(message_id.lower()) - if message_ack != False and ack_bak_value != None: - ack_bak_status = get_bak_request_details(file_name, ack_bak_value) - content_record.append(ack_bak_status) - return content_record - - -def get_text_object(screen_obj, txt): - """ - To obtain a text object based on text provided - @param screen_obj: provides the container on which the txt must be present - @returns a real name object - """ - names.o_text_object["container"] = screen_obj - names.o_text_object["text"] = txt - return names.o_text_object - - -def get_bullet_object(screen_obj, num): - """ - To obtain a bullet object based on occurrence provided. - @param screen_obj: provides the container on which the bullet must be present - @param num: provides the occurrence value - @returns a real name object - """ - names.o_bullet_object["container"] = screen_obj - names.o_bullet_object["occurrence"] = num + 1 - return names.o_bullet_object - - -def get_indicators(screen_obj, txt): - """ - Verifying the busy indicators for BiCarb Pump Check and Acid Pump Check. - indicator object of expected text - @param step - (str) expected text - @return indicators - (obj) list of busy and check indicator - """ - parent_obj = object.parent(squish.waitForObjectExists(get_text_object(screen_obj,txt))) - children_obj = object.children(parent_obj) - indicator_parent = children_obj[2] - indicators = object.children(indicator_parent) - return indicators - - -def verify_missing_object(object_to_check): - """ - Method to verify the given object is invisible or is not present on the screen - @param object_to_check: the object whose invisibility must be verified - """ - try: - squish.testSettings.objectNotFoundDebugging = False - squish.waitForObject(object_to_check,3000) - test.fail("Given object should not be present initially") - except LookupError as _: - test.passes("object is not present as expected") - - squish.testSettings.objectNotFoundDebugging = True - - + def verify_page_step_indicator_post_treatment(screen_obj, post_treatment_step): """ - Method to verify the Page Step indicators [the object on top of the screen which indicates the steps passed, current, remained] - @param post_treatment_step : (int) indicates the Current post-treatment step - + Method to verify the Page Step indicators [the object on top of the screen which indicates the steps passed, current, remained] + @param pre_treatment_step : indicates the Current pre-treatment step """ test.startSection("verification of page step indicators") for page in range(len(config.POST_TREATMENT_SCREENS)): bullet_children = object.children(squish.waitForObjectExists(get_bullet_object(screen_obj, page))) bullet_circle_color = bullet_children[0].color.name bullet_border_color = bullet_children[0].border.color.name - step_title = squish.waitForObjectExists(get_text_object(screen_obj, config.POST_TREATMENT_SCREENS[0])) - #To verify the step indicators of the completed post-treatment screens + step_title = squish.waitForObjectExists(get_text_object(screen_obj, config.POST_TREATMENT_SCREENS[page])) + if page < post_treatment_step: + test.log("To verify the step indicator of the completed post-treatment screen " + config.POST_TREATMENT_SCREENS[page]) test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current) - test.compare(bullet_circle_color, config.COMPLETE_COLOR) - test.compare(bullet_border_color,config.COMPLETE_COLOR) - test.compare(step_title.color.name,config.ENABLED_COLOR) - #To verify the step indicators of the current post-treatment screen + test.compare(bullet_circle_color, config.COMPLETE_COLOR, " the bullet color must be " + str(config.COMPLETE_COLOR)) + test.compare(bullet_border_color, config.COMPLETE_COLOR," the bullet border color must be " + str(config.COMPLETE_COLOR)) + test.compare(step_title.color.name, config.ENABLED_COLOR, " the text color must be " + str(config.ENABLED_COLOR)) + elif page == post_treatment_step: - test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current,) + test.log("To verify the step indicators of the current post-treatment screen " + config.POST_TREATMENT_SCREENS[page]) + test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current) test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) - test.compare(bullet_circle_color,config.CURRENT_COLOR) - test.compare(bullet_border_color,config.COMPLETE_COLOR) - test.compare(step_title.color.name,config.ENABLED_COLOR) - #To verify the step indicators of the remaining post-treatment screens + test.compare(bullet_circle_color,config.CURRENT_COLOR," the bullet color must be " + str(config.CURRENT_COLOR)) + test.compare(bullet_border_color,config.COMPLETE_COLOR, " the bullet border color must be " + str(config.COMPLETE_COLOR)) + test.compare(step_title.color.name,config.ENABLED_COLOR, " the text color must be " + str(config.ENABLED_COLOR)) + test.verify(step_title.font.bold, " the current text must be in bold") + else: + test.log("To verify the step indicators of the remaining post-treatment screen " + config.POST_TREATMENT_SCREENS[page]) test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current,) test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete,) - test.compare(step_title.color.name,config.INCOMPLETE_COLOR_POST_TREATMENT) - test.compare(bullet_circle_color,config.CURRENT_COLOR) - test.compare(bullet_border_color,config.INCOMPLETE_COLOR) + test.compare(step_title.color.name,config.INCOMPLETE_COLOR, " the text color must be " + str(config.INCOMPLETE_COLOR)) + test.compare(bullet_circle_color,config.CURRENT_COLOR," the bullet color must be " + str(config.CURRENT_COLOR)) + test.compare(bullet_border_color,config.INCOMPLETE_COLOR, " the bullet border color must be " + str(config.INCOMPLETE_COLOR)) + test.endSection() + + +def enter_keypad_value_bphr(entry): + """ + Method to enter user desired + value using keypad + @param entry: (str) User expected value + """ + test.startSection("Entering {}".format(entry)) + entry = pyStr(entry) #type casted into string format + for value in entry: + squish.mouseClick(squish.waitForObject(keypad_input(value))) test.endSection() Index: shared/scripts/names.py =================================================================== diff -u -r8977e6f10ea8a1b5807f963a1b98dc11ea2d181f -rba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438 --- shared/scripts/names.py (.../names.py) (revision 8977e6f10ea8a1b5807f963a1b98dc11ea2d181f) +++ shared/scripts/names.py (.../names.py) (revision ba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438) @@ -1,74 +1,684 @@ # encoding: UTF-8 +# Top Parents +o_QQuickView = { "type": "QQuickView"} +o_Overlay = {"container": o_QQuickView, "type": "Overlay"} +o_Gui_MainView = { "type": "Gui::MainView" } -from objectmaphelper import * -o_Gui_MainView = {"type": "Gui::MainView", "unnamed": 1, "visible": True} -o_Overlay = {"container": o_Gui_MainView, "type": "Overlay", "unnamed": 1, "visible": True} +# Modal Dialog +o_modalDialog = {"container": o_Overlay , "id": "_backgroundRect", "type": "Rectangle", "unnamed": 1, "visible": True} +o_treatmentHome = {"container": o_QQuickView , "id": "_treatmentHome" , "type": "TreatmentHome", "unnamed": 1, "visible": True} +o_treatmentHome_backgroung = {"container": o_treatmentHome, "id": "_backgroundRect" , "type": "Rectangle" , "unnamed": 1, "visible": True} +o_treatmentHome_startTreatment = {"container": o_treatmentHome, "id": "_startTreatmentRect" , "type": "TouchRect" , "unnamed": 1, "visible": True} +o_treatmentHome_createTreatment = {"container": o_treatmentHome, "id": "_createTreatmentRect", "type": "TouchRect" , "unnamed": 1, "visible": True} + + +# Main Menu +o_mainMenu = {"container": o_QQuickView, "id": "_mainMenu" , "type": "MainMenu" , "unnamed": 1 , "visible": True} +o_mainMenu_treatment = {"container": o_mainMenu , "id": "_touchRect", "type": "TouchRect", "objectName": "_touchRect0", "visible": True} +o_mainMenu_manager = {"container": o_mainMenu , "id": "_touchRect", "type": "TouchRect", "objectName": "_touchRect1", "visible": True} +o_mainMenu_settings = {"container": o_mainMenu , "id": "_touchRect", "type": "TouchRect", "objectName": "_touchRect2", "visible": True} o_borderRect_Rectangle = {"container": o_Overlay, "gradient": 0, "id": "_borderRect", "type": "Rectangle", "unnamed": 1, "visible": True} o_minimizeButton_UpDownButton = {"container": o_Overlay, "gradient": 0, "id": "_minimizeButton", "type": "UpDownButton", "unnamed": 1, "visible": True} o_shape_Shape = {"container": o_Gui_MainView, "id": "_shape", "type": "Shape", "unnamed": 1, "visible": True} o_PreTreatmentCreateStack_PreTreatmentCreateStack = {"container": o_Gui_MainView, "objectName": "_PreTreatmentCreateStack", "type": "PreTreatmentCreateStack", "visible": True} +o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate = {"container": o_PreTreatmentCreateStack_PreTreatmentCreateStack, "objectName": "_PreTreatmentCreate", "type": "PreTreatmentCreate", "visible": True} o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentCreateStack_PreTreatmentCreateStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} o_PreTreatmentBase_titleBar_StepNavigationTitleBar = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "id": "_titleBar", "type": "StepNavigationTitleBar", "unnamed": 1, "visible": True} o_titleBar_Rectangle = {"container": o_Overlay, "gradient": 0, "id": "_titleBar", "type": "Rectangle", "unnamed": 1, "visible": True} o_treatmentStack_TreatmentStack = {"container": o_Gui_MainView, "objectName": "TreatmentStack", "type": "TreatmentStack", "visible": True} o_treatmentStack_TreatmentBloodPrime_ScreenItem = {"container": o_treatmentStack_TreatmentStack, "objectName": "_TreatmentBloodPrime", "type": "ScreenItem", "visible": True} o_PreTreatmentBase_input_TextInput = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} o_PreTreatmentBase_CONFIRM_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} -o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate = {"container": o_PreTreatmentCreateStack_PreTreatmentCreateStack, "objectName": "_PreTreatmentCreate", "type": "PreTreatmentCreate", "visible": True} -o_PreTreatmentCreate_bloodFlowRate_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "gradient": 0, "objectName": "_bloodFlowRate", "type": "SliderCreateTreatment", "visible": True} -o_PreTreatmentCreate_bloodFlowRateSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "gradient": 0, "objectName": "_bloodFlowRateSlider", "type": "Slider", "visible": True} -o_PreTreatmentCreate_dialysateFlowRate_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "gradient": 0, "objectName": "_dialysateFlowRate", "type": "SliderCreateTreatment", "visible": True} +o_PreTreatmentCreate_bloodFlowRate_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_bloodFlowRate", "type": "SliderCreateTreatment", "visible": True} +o_PreTreatmentCreate_bloodFlowRateSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_bloodFlowRateSlider", "type": "Slider", "visible": True} +o_PreTreatmentCreate_dialysateFlowRate_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_dialysateFlowRate", "type": "SliderCreateTreatment", "visible": True} o_PreTreatementCreateStack_PreTreatmentBase_TreatmentFlowBase = {"container":o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase,"objectName":"_PreTreatmentBase","type":"TreatmentFlowBase", "visible": True} o_treatmentStack_treatmentHome_TreatmentHome = {"container": o_treatmentStack_TreatmentStack, "id": "_treatmentHome", "type": "TreatmentHome", "unnamed": 1, "visible": True} o_confirmButton_TouchRect = {"container": o_Gui_MainView, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": False} o_backButton_BackButton = {"container": o_Gui_MainView, "gradient": 0, "objectName": "_backButton", "type": "BackButton", "visible": False} o_NinePatchImage = {"container": o_Gui_MainView, "occurrence": 6, "type": "NinePatchImage", "unnamed": 1, "visible": False} -o_PreTreatmentBase_backgroundRect_Rectangle = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "id": "_backgroundRect", "type": "Rectangle", "unnamed": 1, "visible": True} -o_PreTreatmentBase_confirmButton_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} +o_PreTreatmentBase_backgroundRect_Rectangle = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "id": "_backgroundRect", "type": "Rectangle", "unnamed": 1, "visible": True} +o_PreTreatmentBase_confirmButton_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} +#page step indicator dynamic object property +o_text_object = {"type": "Text", "unnamed": 1, "visible": True} +o_bullet_object = {"type": "StepBullet", "unnamed": 1, "visible": True} + + #standbymode o_MainHome_MainHome = {"container": o_Gui_MainView, "objectName": "_MainHome", "type": "MainHome", "visible": True} o_standby_page = {"container": o_MainHome_MainHome, "type": "Column", "unnamed": 1, "visible": True} +#alarm list +o_alarm_list_container = {"container": o_Overlay, "id": "_flickable", "type": "Flickable", "unnamed": 1, "visible": True} +o_notification_bar_alarm_list_button = {"container": o_Gui_MainView, "id": "_alarmListImage", "source": "qrc:/images/iList", "type": "Image", "unnamed": 1, "visible": True} +#minimize and maximize button +o_minimize_button = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iChevronDown", "type": "Image", "unnamed": 1, "visible": True} +o_maximize_button = {"container": o_Gui_MainView, "gradient": 0, "id": "_updownButton", "type": "UpDownButton", "unnamed": 1, "visible": True} +#Alarm list title text +o_alarm_list_title_text = {"container": o_Overlay, "text": "Alarm list", "type": "Text", "unnamed": 1, "visible": True} +o_dialogue_bar_alarm_list_button = {"container": o_Overlay, "id": "_icon", "source": "qrc:/images/iList", "type": "Image", "unnamed": 1, "visible": True} +#alarm list minimize and maximize button +o_alarm_list_minimize_maximize_button = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iList", "type": "Image", "unnamed": 1, "visible": True} +#generated alarm id +o_alarm_id = {"container": o_Overlay, "id": "_text", "type": "Text", "unnamed": 1, "visible": True} +#generated alarm message +o_alarm_message = {"container": o_Overlay, "id": "_itemsValue", "type": "Text", "unnamed": 1, "visible": True} +#list alarm messages +o_alarm_list = {"container": o_Overlay, "id": "_grid", "type": "Grid", "unnamed": 1, "visible": True} +#Rejected alarm list +o_rejected_alarm_list_msg = {"container": o_Overlay, "id": "_desc", "objectName": "_NotificationDialog_Description", "type": "Text", "visible": True} +#Alarm list title text +o_alarm_title_text = {"container": o_Overlay, "id": "_title", "type": "Text", "unnamed": 1, "visible": True} +#Alarm dialogue +o_alarm_dialogue_box_msg = {"container": o_Overlay, "id": "_desc", "objectName": "_NotificationDialog_Description", "type": "Text", "visible": True} + +#alarm dialog +o_alarm_dialog_content = {"container": o_Overlay , "objectName": "_NotificationDialog" , "type": "ContentItem" } +o_alarm_dialog_titleBar = {"container": o_alarm_dialog_content , "id" : "_titleBar" , "type": "Rectangle" } +o_alarm_button_minimize = {"container": o_alarm_dialog_content , "id" : "_minimizeButton" , "type": "UpDownButton" ,"visible": True } +o_alarm_button_mute = {"container": o_alarm_dialog_content, "id": "_muteButton", "type": "MuteButton", "visible": True} +o_alarm_button_mute_img = {"container": o_alarm_button_mute , "id" : "_image" , "type": "Image", "unnamed": 1, "visible": True} +o_alarm_button_mute_min = {"container": o_alarm_button_mute , "id" : "_hourText" , "type": "Text" } +o_alarm_button_mute_sec = {"container": o_alarm_button_mute , "id" : "_minuteText" , "type": "Text" } +o_alarm_button_row = {"container": o_alarm_dialog_content , "id" : "_buttonGroup" , "type": "Row" } +o_alarm_button_resume = {"container": o_alarm_button_row , "id" : "_resumeTouchRect" , "type": "TouchRect" } +o_alarm_button_rinseback = {"container": o_alarm_button_row , "id" : "_rinsebackTouchRect" , "type": "TouchRect" } +o_alarm_button_end = {"container": o_alarm_button_row , "id" : "_endTouchRect" , "type": "TouchRect" } +o_alarm_button_ok = {"container": o_alarm_button_row , "id" : "_okTouchRect" , "type": "TouchRect" } +o_alarm_text_description = {"container": o_alarm_dialog_content , "id" : "_desc" , "type": "Text" } +o_alarm_bar = {"container": o_QQuickView , "id" : "_alarmBar" , "type": "NotificationBar" } +o_alarm_bar_text = {"container": o_alarm_bar , "id" : "_text" , "type": "Text" } +o_alarm_bar_mute_img = {"container": o_alarm_bar , "id" : "_image" , "type": "Image", "unnamed": 1, "visible": True} +o_alarm_bar_mute_min = {"container": o_alarm_bar , "id" : "_hourText" , "type": "Text" } +o_alarm_bar_mute_sec = {"container": o_alarm_bar , "id" : "_minuteText" , "type": "Text" } +o_alarm_bar_maximize = {"container": o_alarm_bar , "id" : "_updownButton" , "type": "UpDownButton" } +o_qquickview_alarm = {"type": "QQuickView", "unnamed": 1, "visible": True} +o_okay_alarm = {"container": o_Overlay, "id": "_okay", "type": "TouchRect", "unnamed": 1, "visible": True} +o_dismiss_alarm = {"container": o_Overlay, "id": "_silence", "type": "TouchRect", "unnamed": 1, "visible": True} + + #in-treatment o_blood_priming = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "Blood Priming", "type": "Text", "unnamed": 1, "visible": True} o_blood_priming_value_by_default = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "0 mL", "type": "Text", "unnamed": 1, "visible": True} +o_edit_uf_value = {"container": o_Overlay, "text": "EDIT ULTRAFILTRATION VOLUME", "type": "Text", "unnamed": 1, "visible": True} +o_uf_back_button = {"container": o_Overlay, "text": "BACK", "type": "Text", "unnamed": 1, "visible": True} +o_uf_close_button = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1, "visible": True} +o_cumulative_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Cumulative Delivered", "type": "Text", "unnamed": 1, "visible": True} + + +#uf minimum and maximum value object o_uf_minimum_value = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "0.000", "type": "Text", "unnamed": 1, "visible": True} o_uf_maximum_value = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} +#uf minimum and maximum pop up o_uf_minimum_value_pop_up = {"container": o_Overlay, "text": "0.000", "type": "Text", "unnamed": 1, "visible": True} o_uf_maximum_value_pop_up = {"container": o_Overlay, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} -o_edit_uf_value = {"container": o_Overlay, "text": "EDIT ULTRAFILTRATION VOLUME", "type": "Text", "unnamed": 1, "visible": True} -o_uf_back_button = {"container": o_Overlay, "text": "BACK", "type": "Text", "unnamed": 1, "visible": True} -o_uf_close_button = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1, "visible": True} +o_uf_maximum_title = {"container": o_Overlay, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} o_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Volume Delivered", "type": "Text", "unnamed": 1, "visible": True} -o_cumulative_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Cumulative Delivered", "type": "Text", "unnamed": 1, "visible": True} -#post-treatment -o_text_object = {"type": "Text", "unnamed": 1, "visible": True} -o_bullet_object = {"type": "StepBullet", "unnamed": 1, "visible": True} +# Saline bolus objects +o_treatmentStart_TreatmentStart = {"container": o_QQuickView, "id": "_treatmentStart", "type": "TreatmentStart", "unnamed": 1, "visible": True} +o_treatmentStart_SalineSection = {"container": o_treatmentHome, "id": "_salineTouchArea", "type": "TreatmentSaline", "unnamed": 1, "visible": True} +o_treatmentHome_mL_Text = {"container": o_treatmentHome, "text": "mL", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_cumalative_value = {"container": o_treatmentHome, "id": "_cumulativeValue", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_cumalative_unit = {"container": o_treatmentHome, "id": "_cumulativeUnit", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_delivered_value = {"container": o_treatmentHome, "id": "_fluidValue", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_delivered_unit = {"container": o_treatmentHome, "id": "_fluidUnit", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_ultrafiltrationTouchArea_TreatmentUltrafiltration = {"container": o_treatmentHome, "id": "_ultrafiltrationTouchArea", "type": "TreatmentUltrafiltration", "unnamed": 1, "visible": True} +o_treatmentHome_startFluidButton_TouchRect = {"container": o_treatmentHome, "id": "_startFluidButton", "type": "TouchRect", "unnamed": 1, "visible": True} +o_treatment_notification_rejection = {"container": ":o_treatmentHome", "occurrence": 3, "objectName": "NotificationBar", "type": "NotificationBarSmall", "visible": True} +o_treatmentHome_stop_bolus_Text = {"container": o_treatmentHome, "text": "STOP BOLUS", "type": "Text", "unnamed": 1, "visible": True} + + +#main treatment pressure +#arterial title text +o_arterial_title = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Arterial", "type": "Text", "unnamed": 1, "visible": True} +#pressure adjustment pop up related objects +o_pop_up_pressure_text_obj = {"container": o_Overlay, "type": "Text", "unnamed": 1, "visible": True} +o_pop_up_close_btn = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1, "visible": True} +o_pop_up_confirm_btn = {"container": o_Overlay, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_pressure_text_obj = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "type": "Text", "unnamed": 1, "visible": True} +o_pop_up_rejected_msg = {"container": o_Overlay, "type": "Text", "unnamed": 1, "visible": True} +# Pressure Adjustment +o_treatmentAdjustmentPressures_Screen = {"container": o_Overlay, "objectName": "TreatmentAdjustmentPressures", "type": "ContentItem"} +# arterial pressure range slider +o_arterial_range_slider = {"container": o_treatmentAdjustmentPressures_Screen, "id": "_arterialPressure", "type": "PressureRangeSlider"} +# arterial progress +o_arterial_progress = {"container": o_arterial_range_slider , "id": "_pressureRangeBar", "type": "RangeBar"} +o_arterial_marker = {"container": o_arterial_progress, "id": "_rangeMarkerValue", "type": "RangeMarker"} +o_arterial_progress_text_value = {"container": o_arterial_marker, "id": "_textValue", "type": "Text"} +# arterial slider +o_arterial_slider = {"container": o_arterial_range_slider, "id": "_pressureSlider" , "type": "RangeSlider"} +# arterial limits bar +o_arterial_limitbar = {"container": o_arterial_range_slider, "id": "_rangeRect", "type": "RangeRect"} +# venous pressure range slider +o_venous_range_slider= {"container": o_treatmentAdjustmentPressures_Screen, "id": "_venousPressure", "type": "PressureRangeSlider"} +o_venous_progress = {"container": o_venous_range_slider , "id": "_pressureRangeBar", "type": "RangeBar"} +o_venous_marker = {"container": o_venous_progress , "id": "_rangeMarkerValue", "type": "RangeMarker" } +o_venous_progress_text_value = {"container": o_venous_marker , "id": "_textValue", "type": "Text"} +# venous progress +o_venous_slider = {"container": o_venous_range_slider , "id": "_pressureSlider" , "type": "RangeSlider" } +o_venous_limitbar = {"container": o_venous_range_slider, "id": "_rangeRect" , "type": "RangeRect"} +#arterial adjustment low slider title text +o_arterial_text_low = {"container": o_Overlay, "text": "LOW", "type": "Text", "unnamed": 1, "visible": True} +#venous adjustment low slider title text +o_venous_text_low = {"container": o_Overlay, "occurrence": 2, "text": "LOW", "type": "Text", "unnamed": 1, "visible": True} +o_MainHome_Create_Treatment_Button = {"container": o_MainHome_MainHome, "text": "CREATE TREATMENT", "type": "Text", "unnamed": 1, "visible": True} + + +# Ultrafiltration Section +o_progressbarex_ProgressBarEx = {"container": o_Overlay, "id": "_progressbarex", "type": "ProgressBarEx", "unnamed": 1, "visible": True} +notificationBar_NotificationBarSmall = {"container": o_Overlay, "objectName": "NotificationBar", "type": "NotificationBarSmall", "visible": True} +o_treatmentStart_ultrafiltration_section = {"container": o_treatmentStart_TreatmentStart , "id": "_ultrafiltrationTouchArea", "type": "TreatmentUltrafiltration"} +o_treatmentStart_ultrafiltration_notification = {"container": o_treatmentStart_ultrafiltration_section, "objectName": "NotificationBar" , "type": "NotificationBarSmall" } +o_treatmentStart_ultrafiltrationTouchArea_TreatmentUltrafiltration = {"container": o_treatmentHome, "id": "_ultrafiltrationTouchArea", "type": "TreatmentUltrafiltration", "unnamed": 1, "visible": True} +o_treatmentHome_Ultrafiltration_Paused_Text = {"container": o_treatmentHome, "text": "Ultrafiltration Paused", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_progressbar_start_state = {"container": o_treatmentHome, "id": "_progressbarex", "type": "ProgressBarEx", "unnamed": 1, "visible": True} +o_treatmentHome_progressbar_edit_uf = {"container": o_Overlay, "id": "_rangeProgressBar", "type": "ProgressBarEx", "unnamed": 1, "visible": True} +o_volumeSlider_slider = {"container": o_Overlay,"id": "_volumeSlider", "type": "Slider", "unnamed": 1, "visible": True} +o_ultrafiltration_volume_text = {"container": o_Overlay, "text": "ULTRAFILTRATION VOLUME (L)", "type": "Text", "unnamed": 1, "visible": True} +o_ultrafiltration_closeButton = {"container": o_Overlay, "id": "_closeButton", "type": "CloseButton", "unnamed": 1, "visible": True} +o_backbutton_backbutton = {"container": o_Overlay, "id": "_backButton", "type": "BackButton", "unnamed": 1, "visible": True} +o_notificationbar_response = {"container": o_Overlay, "objectName": "NotificationBar", "type": "NotificationBar", "visible": True} +o_ultrafilteration_pause_btn = {"container": o_Overlay, "text": "PAUSE ULTRAFILTRATION", "type": "Text", "unnamed": 1, "visible": True} +o_ultrafilteration_resume_btn = {"container": o_Overlay, "text": "RESUME ULTRAFILTRATION", "type": "Text", "unnamed": 1, "visible": True} +o_ultrafilteration_back_btn = {"container": o_Overlay, "text": "BACK", "type": "Text", "unnamed": 1, "visible": True} +o_ultrafilteration_texts ={"container": o_Overlay, "type": "Text", "unnamed": 1, "visible": True} +o_ultrafilteration_confirm_btn = {"container": o_Overlay, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} + + +#flows +o_treatment_blood_flow_touch_area = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "FLOWS", "type": "Text", "unnamed": 1, "visible": True} +o_treatment_blood_flow_rate = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "id": "_bloodFlow", "type": "TextRect", "unnamed": 1, "visible": True} +o_treatment_dialysate_flow_rate = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "id": "_dialysateInletFlow", "type": "TextRect", "unnamed": 1, "visible": True} +o_treatment_blood_flow_adjustment = {"container": o_Overlay, "id": "_bloodFlowTextRect", "type": "TextRect", "unnamed": 1, "visible": True} +o_treatment_dialysate_flow_adjustment = {"container": o_Overlay, "id": "_dialysateInletFlowTextRect", "type": "TextRect", "unnamed": 1, "visible": True} +o_treatment_flow_adjustment_close = {"container": o_Overlay, "id": "_closeButton", "type": "CloseButton", "unnamed": 1, "visible": True} +o_treatment_notification_bar = {"container": o_Overlay, "type": "Text", "unnamed": 1, "visible": True} +o_dialysateFlowSlider_Slider = {"container": o_Overlay, "id": "_dialysateFlowSlider", "type": "Slider", "unnamed": 1, "visible": True} +o_blood_flow_slider = {"container": o_Overlay, "id": "_bloodFlowSlider", "type": "Slider", "unnamed": 1, "visible": True} +o_treatmentHome_NotificationBar_NotificationBarSmall = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "objectName": "NotificationBar", "type": "NotificationBarSmall", "visible": True} + + +# pre-treatment patient connection +o_PreTreatmentStack_PreTreatmentStack = {"container": o_Gui_MainView, "objectName": "_PreTreatmentStack", "type": "PreTreatmentStack", "visible": True} +o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_pretreatmentConnectionStack ", "type": "PreTreatmentConnectionStack", "visible": True} +o_pretreatmentConnectionStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration = {"container": o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, "objectName": "_PreTreatmentUltrafiltration", "type": "PreTreatmentUltrafiltration", "visible": True} +o_PreTreatmentStack_PreTreatmentConsumblesStack_PreTreatmentConsumablesStack = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_PreTreatmentConsumblesStack", "type": "PreTreatmentConsumablesStack", "visible": True} +o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentStack_PreTreatmentConsumblesStack_PreTreatmentConsumablesStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} + + +#patient connection ultrafilteration section +o_PreTreatmentStack_PreTreatmentPrimeStack_PreTreatmentPrimeStack = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_PreTreatmentPrimeStack", "type": "PreTreatmentPrimeStack", "visible": True} +o_PreTreatmentPrimeStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentStack_PreTreatmentPrimeStack_PreTreatmentPrimeStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} +o_PreTreatmentStack_PreTreatmentSampleStack_PreTreatmentWaterSampleStack = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_PreTreatmentSampleStack", "type": "PreTreatmentWaterSampleStack", "visible": True} +o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentStack_PreTreatmentSampleStack_PreTreatmentWaterSampleStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} +o_PreTreatmentUltrafiltration_volumeSlider_Slider = {"container": o_pretreatmentConnectionStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "objectName": "_volumeSlider", "type": "Slider", "visible": True} +o_PreTreatmentUltrafiltration_Ultrafiltration_Volume_Text = {"container": o_pretreatmentConnectionStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "text": "Ultrafiltration Volume (L)", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentUltrafiltration_Ultrafiltration_Setup_Text = {"container": o_pretreatmentConnectionStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "text": "Ultrafiltration Setup", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentUltrafiltration_CONFIRM_Text = {"container": o_pretreatmentConnectionStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2 = {"container": o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} +o_PreTreatmentbase_skip_text = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "SKIP", "type": "Text", "unnamed": 1, "visible": True} + + +#patient connection BP/HR section part +o_PreTreatmentBase_Patient_Connection_Text = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "Patient Connection", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_Continue_Text = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "CONTINUE", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_input_TextInput_2 = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} +o_PreTreatmentBase_BP_HR_Text = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "occurrence": 2, "text": "BP/HR", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_Blood_Pressure_Text = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "Blood Pressure", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_mmHg_Label = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "mmHg", "type": "Label", "unnamed": 1, "visible": True} +o_PreTreatmentBase_Heart_Rate_Text = {"container":o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "Heart Rate", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_BPM_Label = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "BPM", "type": "Label", "unnamed": 1, "visible": True} +o_PreTreatmentBase_bloodPressureSystolic_TextEntry = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_bloodPressureSystolic", "type": "TextEntry", "unnamed": 1, "visible": True} +o_PreTreatmentBase_input_TextInput_3 = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "echoMode": 0, "id": "_input", "occurrence": 2, "type": "TextInput", "unnamed": 1, "visible": True} +o_PreTreatmentBase_bloodPressureDiastolic_TextEntry = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_bloodPressureDiastolic", "type": "TextEntry", "unnamed": 1, "visible": True} +o_PreTreatmentBase_input_TextInput_4 = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "echoMode": 0, "id": "_input", "occurrence": 3, "type": "TextInput", "unnamed": 1, "visible": True} +o_PreTreatmentBase_heartRate_TextEntry = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_heartRate", "type": "TextEntry", "unnamed": 1, "visible": True} + + +#patient connection training section +o_PreTreatmentBase_swipeview_SwipeView = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} +o_swipeview_tutorial_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "type": "Text", "unnamed": 1, "visible": True} +o_patient_connection_PreTreatmentBase_rightImage_Image = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} +o_patient_connection_PreTreatmentBase_leftImage_Image = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} +o_PreTreatmentUltrafiltration_Indicators = {"container": o_pretreatmentConnectionStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "id": "_nextStepsBullet", "type": "StepBullet", "unnamed": 1, "visible": True} +o_PreTreatmentFlowBase_Indicators = {"container":o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_nextStepsBullet", "type": "StepBullet", "unnamed": 1, "visible": True} +o_PreTreatmentUltrafiltration_NotificationBar_NotificationBar = {"container": o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, "objectName": "NotificationBar", "type": "NotificationBar", "visible": True} +o_PreTreatmentBase_nextStepsBullet_StepBullet = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_nextStepsBullet", "occurrence": 7, "type": "StepBullet", "unnamed": 1, "visible": True} +o_PreTreatmentBase_BACK_Text = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "BACK", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_CONFIRM_Text_2 = {"container":o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +#virtal keypad input field +o_keypad_input = {"container": o_Gui_MainView, "id": "_keyText", "type": "Text", "unnamed": 1, "visible": True} +#virtal keypad back space key +o_back_space_key = {"container": o_Gui_MainView, "id": "_backspaceKeyIcon", "source": "qrc:/plugins/QtQuick/VirtualKeyboard/Styles/denali/images/iBackspace.svg", "type": "Image", "unnamed": 1, "visible": True} + + +#authentication +o_confirm_button = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_create_back_button ={"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_image", "source": "qrc:/images/iBack", "type": "Image", "unnamed": 1, "visible": True} +o_input_patient_id = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} +o_keboard_input = {"container": o_Gui_MainView, "type": "Text", "unnamed": 1, "visible": True} +o_custom_treatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Create a Custom Treatment", "type": "Text", "unnamed": 1, "visible": True} +o_treatment_create_flickable = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "TreatmentCreateFlickable", "type": "Flickable", "visible": True} +o_operating_parameters = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_confirmButton_TouchRect_2 = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} +o_PreTreatmentBase_backButton_BackButton = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "objectName": "_backButton", "type": "BackButton", "visible": True} +o_PreTreatmentPatientid_back_button = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "objectName": "_backButton", "type": "BackButton", "visible": True} +o_confirmButton_TouchRect_2 = {"container": o_Overlay,"id": "_confirmButton", "type": "TouchRect", "unnamed": 1, "visible": True} +o_initialModeScreen_ScreenItem = {"container": o_Gui_MainView, "id": "_initialModeScreen", "type": "ScreenItem", "unnamed": 1, "visible": True} + + +#Water Sample +stacks_parent_parent = {"container": o_Gui_MainView, "objectName": "_PreTreatmentStack", "type": "PreTreatmentStack", "visible": True} +stack_parent = {"container": stacks_parent_parent, "id": "_stackView", "type": "StackView", "unnamed": 1, "visible": True} +o_PreTreatmentStack_preTreatmentWaterSampleStack_PreTreatmentWaterSampleStack = {"container":stack_parent, "objectName": "_preTreatmentWaterSampleStack", "type": "PreTreatmentWaterSampleStack", "visible": True} +o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase_2 = {"container": o_PreTreatmentStack_preTreatmentWaterSampleStack_PreTreatmentWaterSampleStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} +#Filter flush title object +o_PreTreatmentBase_Filter_Flush_Text = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "Filter Flush", "type": "Text", "unnamed": 1, "visible": True} +#Filter Flush Progress bar object +o_filter_flush_progress_main = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase_2, "objectName": "_TimeText", "type": "TimeText", "visible": True} +o_filter_flush_progress = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase_2, "objectName": "_TimeCircle", "type": "TimeCircle", "visible": True} +#Next Button object +o_next_button = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "NEXT", "type": "Text", "unnamed": 1, "visible": True} +#Water Sample button object +o_water_sample_button = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "WATER SAMPLE", "type": "Text", "unnamed": 1, "visible": True} +#Back button object +o_back_button = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "BACK", "type": "Text", "unnamed": 1, "visible": True} +#Pass button object +o_pass_button = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "PASS", "type": "Text", "unnamed": 1, "visible": True} +#Fail button object +o_fail_button = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "FAIL", "type": "Text", "unnamed": 1, "visible": True} +#Ok button object +o_ok_button = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "OK", "type": "Text", "unnamed": 1, "visible": True} +#Indicator Headstep bullet object +o_stephead_indicator = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_nextStepsBullet", "type": "StepBullet", "unnamed": 1, "visible": True} + + +#main treatment time duration +o_pop_screen = {"container": o_Overlay, "type": "PopupItem", "unnamed": 1, "visible": True} +o_Treatment_Paused = {"container": o_treatmentHome, "text": "Treatment Paused", "type": "Text", "unnamed": 1, "visible": True} +o_time_duration_confirm_button = {"container": o_Overlay, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_confirm_Text = {"container": o_Overlay, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_Time_Remaining_Text = {"container": o_treatmentHome, "text": "Time Remaining", "type": "Text", "unnamed": 1, "visible": True} +o_treatment_duration = {"container": o_treatmentHome, "objectName": "TreatmentTime", "type": "TreatmentTime", "visible": True} + + +#Heparin +o_heparin_value_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text":" Volume Delivered " ,"type": "Text", "unnamed": 1, "visible": True} +o_heparin_value = {"container": o_treatmentStack_treatmentHome_TreatmentHome,"type": "Text", "unnamed": 1, "visible": True} +o_treatmentStart_HeparinSection = {"container": o_treatmentStart_TreatmentStart , "id": "_heparinTouchArea", "type": "TreatmentFluid" } + + +#Heparin_Messages_on_Button +o_state0_heparin_delivery_Off_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "OFF", "type": "Text", "unnamed": 1, "visible": True} +o_state1_heparin_delivery_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "HEPARIN DELIVERY", "type": "Text", "unnamed": 1, "visible": True} +o_state2_heparin_state_paused_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "RESUME DELIVERY", "type": "Text", "unnamed": 1, "visible": True} +o_state4_heparin_state_dispensing_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "PAUSE DELIVERY", "type": "Text", "unnamed": 1, "visible": True} + + +#Heparin_Statewise_Messages +o_state_one_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Delivery Stopped", "type": "Text", "unnamed": 1, "visible": True} +o_state2_resume_delivery_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Delivery Paused", "type": "Text", "unnamed": 1, "visible": True} +o_state3_heparin_state_initial_bolus_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Bolus Active", "type": "Text", "unnamed": 1, "visible": True} +o_state4_heparin_state_dispensing_active_text ={"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Dispensing Active", "type": "Text", "unnamed": 1, "visible": True} +o_state5_heparin_state_completed_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Maximum Cumulative Heparin Volume Delivered", "type": "Text", "unnamed": 1, "visible": True} +o_state6_heparin_state_empty_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Syringe Empty", "type": "Text", "unnamed": 1, "visible": True} +#Heparin Rejection Message +o_rejection_msg = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "type": "Text", "unnamed": 1, "visible": True} + + +# Pre treatment Consumables +o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_preTreatmentConsumablesStack", "type": "PreTreatmentConsumablesStack", "visible": True} +o_preTreatmentConsumablesStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} +o_confirm_button_disabled={"container": o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} +o_msg_installation={"container": o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack, "text": "Consumables Installation", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_rightImage_Image={"container": o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} +o_confirm_button_enabled={"container": o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_leftImage_Image = {"container": o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack, "id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} +o_PreTreatmentBase_Consumables_Self_Test_Text = {"container": o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack, "text": "Consumables Self Test", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_BiCarb_Pump_Check_Text = {"container": o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack, "text": "BiCarb Pump Check", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_Acid_Pump_Check_Text = {"container": o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack, "text": "Acid Pump Check", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_Self_Test_Complete_Text = {"container": o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack, "text": "Self Test Complete!", "type": "Text", "unnamed": 1, "visible": True} +o_separatorLine_text={"container": o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack, "gradient": 0, "id": "_separatorLine", "type": "Line", "unnamed": 1, "visible": True} +o_pop_up_close_button = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1, "visible": True} + + +#post screen +o_busy_indicator = {"container": o_initialModeScreen_ScreenItem, "id": "_busyIndicator", "source": "qrc:/images/iBusy", "type": "Image", "unnamed": 1, "visible": True} +o_done_indicator = {"container": o_initialModeScreen_ScreenItem, "id": "_checkIndicator", "source": "qrc:/images/iBusyDone", "type": "Image", "unnamed": 1, "visible": True} +o_fail_indicator = {"container": o_initialModeScreen_ScreenItem, "id": "_checkIndicator", "source": "qrc:/images/iBusyFail", "type": "Image", "unnamed": 1, "visible": True} +o_progress_bar = {"container": o_initialModeScreen_ScreenItem, "id": "_textMaximum", "type": "Text", "unnamed": 1, "visible": False} + + +# #create_treatment +# #vital time interval +# #create_custom treatment testcase +o_PreTreatmentCreateStack_PreTreatmentConfirm_TreatmentFlowBase = {"container": o_PreTreatmentCreateStack_PreTreatmentCreateStack, "objectName": "_PreTreatmentConfirm", "type": "TreatmentFlowBase", "visible": True} +o_PreTreatmentConfirm_confirmButton_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentConfirm_TreatmentFlowBase, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} +#prescription object propert's +o_PreTreatmentCreate_dialysateFlowRateSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_dialysateFlowRateSlider", "type": "Slider", "visible": True} +o_PreTreatmentCreate_durationSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_durationSlider", "type": "Slider", "visible": True} +o_PreTreatmentCreate_heparinDispensingRateSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_heparinDispensingRateSlider", "type": "Slider", "visible": True} +o_PreTreatmentCreate_heparinBolusVolumeSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_heparinBolusVolumeSlider", "type": "Slider", "visible": True} +o_PreTreatmentCreate_heparinStopTimeSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_heparinStopTimeSlider", "type": "Slider", "visible": True} +o_PreTreatmentCreate_salineBolusSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_salineBolusSlider", "type": "Slider", "visible": True} +o_PreTreatmentCreate_dialysateTemperatureSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_dialysateTemperatureSlider", "type": "Slider", "visible": True} +o_PreTreatmentCreate_bloodPressureMeasurementIntervalSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_bloodPressureMeasurementIntervalSlider", "type": "Slider", "visible": True} +o_PreTreatmentCreate_rinsebackFlowRateSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_rinsebackFlowRateSlider", "type": "Slider", "visible": True} +o_PreTreatmentBase_gridSteps_Grid_1 = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "id": "_gridSteps", "type": "Grid", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_nextStepsBullet_StepBullet = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "type": "StepBullet", "unnamed": 1, "visible": True} +o_PreTreatmentBase_nextStepsBullet_StepBullet = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "type": "StepBullet", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_venousPressureLimitsSlider_RangeSlider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_venousPressureLimitsSlider", "type": "RangeSlider", "visible": True} +o_PreTreatmentCreate_handlerLeft_Rectangle = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_handlerLeft", "occurrence": 2, "type": "Rectangle", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_handlerRight_Rectangle = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "occurrence": 2, "id": "_handlerRight", "type": "Rectangle", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_handlerLeft_Rectangle_2 = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "occurrence": 1, "id": "_handlerLeft", "type": "Rectangle", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_venousColumn_Column = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_venousColumn", "type": "Column", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_mouseArea_MouseArea_2 = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_mouseArea", "occurrence": 33, "type": "MouseArea", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_line_Line = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_line", "type": "Line", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_rangeRect_RangeRect_Venous = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate,"id": "_rangeRect", "occurrence": 2, "type": "RangeRect", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_rangeRect_RangeRect_Artery = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate,"id": "_rangeRect", "occurrence": 1, "type": "RangeRect", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_Heparin_Type_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Heparin Type", "type": "Text", "unnamed": 1, "visible": True} +#operating parameters object property's +o_PreTreatmentCreate_heparinTypeRect0_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_heparinTypeRect0", "type": "TouchRect", "visible": True} +o_PreTreatmentCreate_acidConcentrateRect0_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_acidConcentrateRect0", "type": "TouchRect", "visible": True} +o_PreTreatmentCreate_acidConcentrateRect1_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_acidConcentrateRect1", "type": "TouchRect", "visible": True} +o_PreTreatmentCreate_acidConcentrateRect2_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_acidConcentrateRect2", "type": "TouchRect", "visible": True} +o_PreTreatmentCreate_acidConcentrateRect3_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_acidConcentrateRect3", "type": "TouchRect", "visible": True} +o_PreTreatmentCreate_dialyzerTypeRect0_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_dialyzerTypeRect0", "type": "TouchRect", "visible": True} +o_PreTreatmentCreate_dialyzerTypeRect1_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_dialyzerTypeRect1", "type": "TouchRect", "visible": True} +o_PreTreatmentCreate_dialyzerTypeRect2_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_dialyzerTypeRect2", "type": "TouchRect", "visible": True} +o_PreTreatmentCreate_dialyzerTypeRect3_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_dialyzerTypeRect3", "type": "TouchRect", "visible": True} +o_PreTreatmentCreate_dialyzerTypeRect4_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_dialyzerTypeRect4", "type": "TouchRect", "visible": True} +o_PreTreatmentCreate_heparinDispensingRateValue_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_heparinDispensingRateValue", "type": "Text", "visible": True} +o_PreTreatmentCreate_heparinBolusVolumeValue_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_heparinBolusVolumeValue", "type": "Text", "visible": True} +o_PreTreatmentCreate_heparinStopTimeValue_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_heparinStopTimeValue", "type": "Text", "visible": True} +o_PreTreatmentCreate_bloodPressureMeasurementIntervalValue_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_bloodPressureMeasurementIntervalValue", "type": "Text", "visible": True} +o_PreTreatmentCreate_duration_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_duration", "type": "SliderCreateTreatment", "visible": True} +o_PreTreatmentCreate_heparinBolusVolume_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_heparinBolusVolume", "type": "SliderCreateTreatment", "visible": True} +o_PreTreatmentCreate_heparinStopTime_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_heparinStopTime", "type": "SliderCreateTreatment", "visible": True} +o_PreTreatmentCreate_salineBolus_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_salineBolus", "type": "SliderCreateTreatment", "visible": True} +#operating parameters object property +o_PreTreatmentCreate_heparinTypeRect_GridSelection = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_heparinTypeRect", "type": "GridSelection", "visible": True} +o_PreTreatmentCreate_acidConcentrateRect_GridSelection = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_acidConcentrateRect", "type": "GridSelection", "visible": True} +o_PreTreatmentCreate_bicarbonateConcentrateRect_GridSelection = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_bicarbonateConcentrateRect", "type": "GridSelection", "visible": True} +o_PreTreatmentCreate_dialyzerTypeRect_GridSelection = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_dialyzerTypeRect", "type": "GridSelection", "visible": True} +o_PreTreatmentCreate_dialysateTemperature_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_dialysateTemperature", "type": "SliderCreateTreatment", "visible": True} +o_PreTreatmentCreate_bloodPressureMeasurementInterval_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_bloodPressureMeasurementInterval", "type": "SliderCreateTreatment", "visible": True} +o_PreTreatmentCreate_rinsebackFlowRate_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_rinsebackFlowRate", "type": "SliderCreateTreatment", "visible": True} +o_PreTreatmentCreate_bicarbonateConcentrateRect0_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_bicarbonateConcentrateRect0", "type": "TouchRect", "visible": True} +#custom treatment title object +o_PreTreatmentCreate_Create_a_Custom_Treatment_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Create a Custom Treatment", "type": "Text", "unnamed": 1, "visible": True} +#confirm and back button object property +o_PreTreatmentCreate_backButton_BackButton = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_backButton", "type": "BackButton", "visible": True} +o_PreTreatmentCreate_confirmButton_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} +o_CreateCustomTreatment_Continue_button = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} + + +#pre-treatment priming +o_PreTreatmentBase_TreatmentFlowBase = {"container": ":o_PreTreatmentStack_PreTreatmentPrimeStack_PreTreatmentPrimeStack", "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} +o_PreTreatmentStack_pretreatmentPrimeStack_PreTreatmentPrimeStack = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_pretreatmentPrimeStack ", "type": "PreTreatmentPrimeStack", "visible": True} +o_pretreatmentPrimeStack_preTreatmentDrySelfTest_TreatmentFlowBase = {"container": o_PreTreatmentStack_pretreatmentPrimeStack_PreTreatmentPrimeStack, "objectName": "_preTreatmentDrySelfTest", "type": "TreatmentFlowBase", "visible": True} +#self dry state progress tim circle +o_self_test_dry_progress = {"container": o_PreTreatmentStack_pretreatmentPrimeStack_PreTreatmentPrimeStack, "objectName": "_TimeCircle", "type": "TimeCircle", "visible": True} +#check list text common object +o_self_test_dry_check_list_text = {"container": o_PreTreatmentStack_pretreatmentPrimeStack_PreTreatmentPrimeStack, "type": "Text", "unnamed": 1, "visible": True} +#Priming title +o_priming_title_text = {"container": o_PreTreatmentStack_pretreatmentPrimeStack_PreTreatmentPrimeStack, "text": "Priming", "type": "Text", "unnamed": 1, "visible": True} +#check_mark_parent_object +o_self_test_dry_progress_circle = {"container": o_PreTreatmentStack_pretreatmentPrimeStack_PreTreatmentPrimeStack, "id": "_progressCircle", "type": "ProgressCircle", "unnamed": 1, "visible": True} +#start prime button and continue button +o_start_prime_btn = {"container": o_PreTreatmentStack_pretreatmentPrimeStack_PreTreatmentPrimeStack, "text": "Start Prime", "type": "Text", "unnamed": 1, "visible": True} +o_continue_btn = {"container": o_PreTreatmentStack_pretreatmentPrimeStack_PreTreatmentPrimeStack, "text": "CONTINUE", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentStack_PreTreatmentDisposableStack_PreTreatmentDisposablesStack = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_PreTreatmentDisposableStack", "type": "PreTreatmentDisposablesStack", "visible": True} + + +#disposable +o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_preTreatmentDisposablesStack", "type": "PreTreatmentDisposablesStack", "visible": True} +o_preTreatmentDisposablesStack_preTreatmentDisposablesSelfTest_TreatmentFlowBase = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "objectName": "_preTreatmentDisposablesSelfTest", "type": "TreatmentFlowBase", "visible": True} +o_system_self_test = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "text" : "System Self Test", "type": "Text", "unnamed": 1, "visible": True} +#progress +o_system_self_test_progress = {"container":o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "objectName": "_TimeCircle", "type": "TimeCircle", "visible": True} +o_system_test_text = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "text": "System Self Test", "type": "Text", "unnamed": 1, "visible": True} +#right and left button +o_disposable_rightImage_Image = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} +o_disposable_leftImage_Image = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} +o_next_button_text = {"container": o_Gui_MainView, "text":"NEXT", "type": "Text", "unnamed": 1, "visible": True} +o_right_side_arrow = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} +o_back_button_text = {"container": o_Gui_MainView, "text":"BACK", "type": "Text", "unnamed": 1, "visible": True} +o_confirm_button_text = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_swipeview_SwipeView = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} +o_cartridge_installation_screen1_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Open the front panel door.\nAnd check the cartridge.", "type": "Text", "unnamed": 1, "visible": True} +o_heparin_syringe_screen1_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Fill a syringe with heparin and connect the cartridge heparin tubing line.", "type": "Text", "unnamed": 1, "visible": True} +o_cartridge_connection_screen1_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Connect the cartridge blood and dialysis fluid lines to the dialyzer.", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_Patient_ID_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "text": "Patient ID", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_PRESCRIPTION_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "PRESCRIPTION", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_OPERATING_PARAMETERS_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "OPERATING PARAMETERS", "type": "Text", "unnamed": 1, "visible": True} + +#virtal keypad back space key +o_PreTreatmentBase_Indicators = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "type": "StepBullet", "unnamed": 1, "visible": True} +o_PreTreatmentBase_gridSteps_Grid = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_gridSteps", "occurrence": 2, "type": "Grid", "unnamed": 1, "visible": True} +o_PreTreatmentBase_indicator_StepIndicator = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_indicator", "type": "StepIndicator", "unnamed": 1, "visible": True} +o_PreTreatmentBase_headStepBullet_StepBullet = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_headStepBullet", "occurrence": 2, "type": "StepBullet", "unnamed": 1, "visible": True} +o_PreTreatmentBase_gridStepsRest_Grid_2 = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_gridStepsRest", "occurrence": 10, "type": "Grid", "unnamed": 1, "visible": True} + + +#saline bolus +o_treatmentHome_image_Image = {"container": o_treatmentHome, "id": "_image", "source": "qrc:/images/iPauseGray", "type": "Image", "unnamed": 1, "visible": True} +o_treatmentHome_Maximum_cumulative_saline_bolus_volume_delivered_Text = {"container": o_treatmentHome, "text": "Maximum cumulative saline bolus volume delivered", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_Treatment_Paused_Text = {"container": o_treatmentHome, "text": "Treatment Paused", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_START_BOLUS_Text = {"container": o_treatmentHome, "text": "START BOLUS", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_fluidProgressBar_ProgressBar = {"container": o_treatmentHome, "id": "_fluidProgressBar", "type": "ProgressBar", "unnamed": 1, "visible": True} +o_pretreatment_ultrafilteration_confirm_btn = {"container": o_pretreatmentConnectionStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_pretreatment_instruction_continue_btn = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "CONTINUE", "type": "Text", "unnamed": 1, "visible": True} +o_patient_connection_start_btn = {"container": o_PreTreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "START", "type": "Text", "unnamed": 1, "visible": True} +o_ultrafilteration_next_btn = {"container": o_Overlay, "text": "NEXT", "type": "Text", "unnamed": 1, "visible": True} + + +#settings_Home +o_settings_Text = {"container": o_Gui_MainView, "text": "Settings", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsHome_SettingsHome = {"container": o_Gui_MainView, "objectName": "_SettingsHome", "type": "SettingsHome", "visible": True} +o_settings_home_text_obj = {"container": o_SettingsHome_SettingsHome, "type": "Text", "unnamed": 1, "visible": True} +o_eject_btn = {"container": o_SettingsHome_SettingsHome, "id": "_image", "source": "qrc:/images/iEject", "type": "Image", "unnamed": 1, "visible": True} +o_arrow_btn = {"container": o_SettingsHome_SettingsHome, "id": "_image", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} +o_SettingsBase_SettingsBase = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsBase", "visible": True} +o_settings_base_text_obj = {"container": o_SettingsBase_SettingsBase, "type": "Text", "unnamed": 1, "visible": True} +o_service_date_obj = {"container": o_SettingsBase_SettingsBase, "type": "Text", "unnamed": 1, "visible": True} + +#volume and brightness +o_SettingsBase_SettingsVolumeBrightness = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsVolumeBrightness", "visible": True} +o_SettingsBase_Volume_And_Brightness_Text = {"container": o_SettingsBase_SettingsVolumeBrightness, "type": "Text", "unnamed": 1, "visible": True} +o_brightness_parent_obj = {"container": o_SettingsBase_SettingsVolumeBrightness, "gradient": 0, "id": "_brightness", "type": "Slider", "unnamed": 1, "visible": True} + + +#heparin syringe disposables +o_preTreatmentDisposablesStack_preTreatmentDisposablesHeparinSyringe_TreatmentFlowBase = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "objectName": "_preTreatmentDisposablesHeparinSyringe", "type": "TreatmentFlowBase", "visible": True} +o_blood_flow_minimum_value = {"container": o_Overlay, "text": "100mL/min", "type": "Text", "unnamed": 1, "visible": True} +o_blood_flow_maximum_value = {"container": o_Overlay, "text": "500mL/min", "type": "Text", "unnamed": 1, "visible": True} +o_dialysate_flow_minimum_value = {"container": o_Overlay, "text": "0mL/min", "type": "Text", "unnamed": 1, "visible": True} +o_dialysate_flow_maximum_value = {"container": o_Overlay, "occurrence": 2, "text": "0mL/min", "type": "Text", "unnamed": 1, "visible": True} +o_handler_Rectangle = {"container": o_Overlay, "id": "_handler", "type": "Rectangle", "unnamed": 1, "visible": True} +o_treatment_saline_notification_msg = {"container": o_treatmentHome, "id": "_text", "type": "Text", "unnamed": 1, "visible": True} + + +# vitals +# vitals title text on main-treatment screen +o_vitals_title = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "VITALS", "type": "Text", "unnamed": 1, "visible": True} +#unit of measurement for blood pressure and heart rate +o_bp_uom = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "mmHg", "type": "Text", "unnamed": 1, "visible": True} +o_hr_uom = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "BPM", "type": "Text", "unnamed": 1, "visible": True} +#reading of vitals +o_vitals_reading = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "type": "Text", "unnamed": 1, "visible": True} +#vitals pop up confirm and close button +o_vitals_confrim_btn = {"container": o_treatmentStack_TreatmentStack, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_vitals_close_btn = {"container": o_treatmentStack_TreatmentStack, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1, "visible": True} + #vitals title text vitals pop up +o_vitals_pop_up_title = {"container": o_treatmentStack_TreatmentStack, "text": "VITALS", "type": "Text", "unnamed": 1, "visible": True} +o_pop_up_bp_title = {"container": o_treatmentStack_TreatmentStack, "text": "Blood Pressure", "type": "Text", "unnamed": 1, "visible": True} +o_pop_up_heart_rate_title = {"container": o_treatmentStack_TreatmentStack, "text": "Heart Rate", "type": "Text", "unnamed": 1, "visible": True} +#unit of measurement for blood pressure and heart rate on pop up +o_pop_up_bp_uom = {"container": o_treatmentStack_TreatmentStack, "text": "mmHg", "type": "Label", "unnamed": 1, "visible": True} +o_pop_up_heart_rate_uom = {"container": o_treatmentStack_TreatmentStack, "text": "BPM", "type": "Label", "unnamed": 1, "visible": True} +#systolic, diastolic and heart rate input field +o_pop_up_systolic_input_field = {"container": o_treatmentStack_TreatmentStack, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} +o_pop_up_diastolic_input_field = {"container": o_treatmentStack_TreatmentStack, "echoMode": 0, "id": "_input", "occurrence": 2, "type": "TextInput", "unnamed": 1, "visible": True} +o_pop_up_heart_rate_input_field = {"backgroundcolor": "#254670", "container": o_treatmentStack_TreatmentStack, "echoMode": 0, "id": "_input", "occurrence": 3, "type": "TextInput", "unnamed": 1, "visible": True} + + +# main screen monitoring parameters +o_flowRectangle= {"container": o_treatmentStack_treatmentHome_TreatmentHome, "gradient": 0, "id": "_flowsTouchArea", "type": "TouchArea", "unnamed": 1, "visible": True} +o_Flows = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "FLOWS","type":"Text", "unnamed": 1, "visible": True} +o_pressure = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "PRESSURE (mmHg)", "type": "Text", "unnamed": 1, "visible": True} +o_Arterial = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Arterial", "type": "Text", "unnamed": 1, "visible": True} +o_Venous = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Venous", "type": "Text", "unnamed": 1, "visible": True} +o_Timeremaining = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Time Remaining", "type": "Text", "unnamed": 1, "visible": True} +o_Ultrafiltration = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "ULTRAFILTRATION VOLUME (L)", "type": "Text", "unnamed": 1, "visible": True} +o_Blood = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Blood", "type": "Text", "unnamed": 1, "visible": True} +o_Blood_Unit = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "mL/min", "type": "Text", "unnamed": 1, "visible": True} +o_Dialysate = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Dialysate", "type": "Text", "unnamed": 1, "visible": True} +o_Dialysate_Unit = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "occurrence": 2, "text": "mL/min", "type": "Text", "unnamed": 1, "visible": True} +o_Vitals = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "VITALS", "type": "Text", "unnamed": 1, "visible": True} +o_BloodPressure_Unit = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "mmHg", "type": "Text", "unnamed": 1, "visible": True} +o_HeartRate_Unit = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "BPM", "type": "Text", "unnamed": 1, "visible": True} +o_SalineBolus = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "SALINE BOLUS", "type": "Text", "unnamed": 1, "visible": True} +o_VolumeDelivered = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Volume Delivered", "type": "Text", "unnamed": 1, "visible": True} +o_VolumeDElivered_Unit = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "mL", "type": "Text", "unnamed": 1, "visible": True} +o_CumulativeDElivered = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Cumulative Delivered", "type": "Text", "unnamed": 1, "visible": True} +o_CumulativeDelivered_Unit = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "occurrence": 2, "text": "mL", "type": "Text", "unnamed": 1, "visible": True} +o_Heparin = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "HEPARIN", "type": "Text", "unnamed": 1, "visible": True} +o_Heparin_VolumeDelivered = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "occurrence": 2, "text": "Volume Delivered", "type": "Text", "unnamed": 1, "visible": True} +o_Heparin_VolumeDelivered_Unit = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "occurrence": 3, "text": "mL", "type": "Text", "unnamed": 1, "visible": True} +o_TreatmentBloodPrime_backgroundRect_Rectangle = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "gradient": 0, "id": "_backgroundRect", "type": "Rectangle", "unnamed": 1, "visible": True} +o_blood_Prime_Value = {"container": o_Gui_MainView, "id": "_shape", "type": "Shape", "unnamed": 1, "visible": True} +o_blood_Prime_Current_Value = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "id": "_circle", "type": "ProgressCircle", "unnamed": 1, "visible": True} +o_dialysate_flow_slider = {"container": o_Overlay, "id": "_dialysateFlowSlider", "type": "Slider", "unnamed": 1, "visible": True} +o_target_value = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "occurrence": 2, "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_backgroundRect_Rectangle = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "gradient": 0, "id": "_backgroundRect", "type": "Rectangle", "unnamed": 1, "visible": True} +o_treatmentHome_TimeText_timeSeparator_Text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "objectName": "_TimeText_timeSeparator", "type": "Text", "visible": True} +o_timeText = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "gradient": 0, "objectName": "_TimeText", "type": "TimeText", "visible": True} + + +#create_treatment +#create_custom treatment testcase +o_PreTreatmentCreate_heparinDispensingRate_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_heparinDispensingRate", "type": "SliderCreateTreatment", "visible": True} +o_treatment_confirm_flickable = {"container": o_PreTreatmentCreateStack_PreTreatmentConfirm_TreatmentFlowBase, "objectName": "_PreTreatmentConfirmFlickable", "type": "Flickable", "visible": True} +o_prescription_mesurement = {"container": o_PreTreatmentCreateStack_PreTreatmentConfirm_TreatmentFlowBase, "type": "Text", "visible": True} +o_create_treatment_screen = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "TreatmentCreateFlickable", "type": "Flickable", "visible": True} +o_confirm_title_text = {"container": o_PreTreatmentCreateStack_PreTreatmentConfirm_TreatmentFlowBase, "text": "Confirm Treatment", "type": "Text", "unnamed": 1, "visible": True} +o_prescription_title_text = {"container": o_PreTreatmentCreateStack_PreTreatmentConfirm_TreatmentFlowBase, "objectName": "ConfirmTreatmentTable_prescription", "type": "Text", "visible": True} +o_input_patient_id = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} +o_confirm_button = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_back_button_confirm_treatment = {"container": o_Gui_MainView, "type": "Text", "unnamed": 1, "visible": True} +o_headerRect_Rectangle = {"container": o_Overlay, "id": "_headerRect", "type": "Rectangle", "unnamed": 1, "visible": True} +o_resumeButton_TouchRect = {"container": o_Overlay, "id": "_resumeButton", "type": "TouchRect", "unnamed": 1, "visible": True} +o_editButton_TouchRect = {"container": o_Overlay, "id": "_editButton", "type": "TouchRect", "unnamed": 1, "visible": True} +o_PreTreatmentCreate_progressRect_ProgressRect = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_progressRect", "type": "ProgressRect", "unnamed": 1, "visible": True} + +#page step indicator verification +o_PreTreatmentCreate_gridSteps_Grid = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_gridSteps", "type": "Grid", "unnamed": 1, "visible": True} + +#Patient ID Keybord press +o_keyboard_switch = {"container": o_Gui_MainView, "id": "_shiftKeyIcon", "source": "qrc:/plugins/QtQuick/VirtualKeyboard/Styles/denali/images/iShiftNormal.svg", "type": "Image", "unnamed": 1, "visible": True} +o_keyboard_switch2 = {"container": o_Gui_MainView, "id": "_shiftKeyIcon", "source": "qrc:/plugins/QtQuick/VirtualKeyboard/Styles/denali/images/iShiftActive.svg", "type": "Image", "unnamed": 1, "visible": True} + + +#disposable +o_MainHome_CREATE_TREATMENT_Text = {"container": o_MainHome_MainHome, "text": "CREATE TREATMENT", "type": "Text", "unnamed": 1, "visible": True} + + +#instructions +o_PreTreatmentStack_preTreatmentWaterSampleStack_PreTreatmentWaterSample = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_preTreatmentWaterSampleStack", "type": "PreTreatmentWaterSampleStack", "visible": True} +o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentStack_preTreatmentWaterSampleStack_PreTreatmentWaterSample, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} +o_PreTreatmentBase_swipeview_SwipeView_WaterSample = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} +o_next_button_ws = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase, "text": "NEXT", "type": "Text", "unnamed": 1, "visible": True} +o_fail_button_ws = {"container": o_preTreatmentWaterSampleStack_PreTreatmentBase_TreatmentFlowBase, "text": "FAIL", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_swipeview_SwipeView_Consumables = {"container": o_preTreatmentConsumablesStack_PreTreatmentBase_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} +o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeInstallation_TreatmentFlowBase = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "objectName": "_preTreatmentDisposablesCartridgeInstallation", "type": "TreatmentFlowBase", "visible": True} +o_preTreatmentDisposablesCartridgeInstallation_swipeview_SwipeView = {"container": o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeInstallation_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} +o_next_button_cartridge_installation = {"container": o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeInstallation_TreatmentFlowBase, "text": "NEXT", "type": "Text", "unnamed": 1, "visible": True} +o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeConnetion_TreatmentFlowBase = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "objectName": "_preTreatmentDisposablesCartridgeConnetion", "type": "TreatmentFlowBase", "visible": True} +o_preTreatmentDisposablesCartridgeConnetion_swipeview_SwipeView = {"container": o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeConnetion_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} +o_next_button_cartridge_connection = {"container": o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeConnetion_TreatmentFlowBase, "text": "NEXT", "type": "Text", "unnamed": 1, "visible": True} +o_next_button_heparinsyringe = {"container": o_Gui_MainView, "text": "NEXT", "type": "Text", "unnamed": 1, "visible": True} +o_preTreatmentDisposablesStack_preTreatmentDisposablesSalineBag_TreatmentFlowBase = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "objectName": "_preTreatmentDisposablesSalineBag", "type": "TreatmentFlowBase", "visible": True} +o_preTreatmentDisposablesSalineBag_swipeview_SwipeView = {"container": o_preTreatmentDisposablesStack_preTreatmentDisposablesSalineBag_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} +o_pretreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} +o_PreTreatmentBase_swipeview_SwipeView_3 = {"container": o_pretreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} +o_skip_button = {"container": o_pretreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase, "text": "SKIP", "type": "Text", "unnamed": 1, "visible": True} + + +#instructions for rinseback setup +o_EndTreatmentRinsebackStack_EndTreatmentRinsebackStack = {"container": o_Gui_MainView, "objectName": "_EndTreatmentRinsebackStack", "type": "EndTreatmentRinsebackStack", "visible": True} +o_EndTreatmentRinsebackStack_EndTreatmentRinsebackInit_EndTreatmentRinsebackInit = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackStack, "objectName": "_EndTreatmentRinsebackInit", "type": "EndTreatmentRinsebackInit", "visible": True} +o_EndTreatmentRinsebackInit_swipeview_SwipeView = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackInit_EndTreatmentRinsebackInit, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} + + +#instructions for rinseback complete +o_EndTreatmentRinsebackStack_EndTreatmentRinsebackComplete_EndTreatmentRinsebackComplete = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackStack, "objectName": "_EndTreatmentRinsebackComplete", "type": "EndTreatmentRinsebackComplete", "visible": True} +o_EndTreatmentRinsebackComplete_swipeview_SwipeView = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackComplete_EndTreatmentRinsebackComplete, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} + + +#instructions for patient disconnection o_PostTreatmentStack_PostTreatmentStack = {"container": o_Gui_MainView, "objectName": "_PostTreatmentStack", "type": "PostTreatmentStack", "visible": True} o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase = {"container": o_PostTreatmentStack_PostTreatmentStack, "objectName": "_patientDisconnectionConfirm", "type": "TreatmentFlowBase", "visible": True} +o_patientDisconnectionConfirm_swipeview_SwipeView = {"container": o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} +o_confirm_button_patient_disconnection = {"container": o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} + + +#post treatment review screen +o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview = {"container": o_PostTreatmentStack_PostTreatmentStack, "objectName": "_treatmentReviewConfirm", "type": "PostTreatmentReview", "visible": True} +o_next_button_review = {"container": o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview, "text": "NEXT", "type": "Text", "unnamed": 1, "visible": True} + +#post treatment disposables screen o_PostTreatmentStack_disposablesRemovalConfirm_TreatmentFlowBase = {"container": o_PostTreatmentStack_PostTreatmentStack, "objectName": "_disposablesRemovalConfirm", "type": "TreatmentFlowBase", "visible": True} +o_disposablesRemovalConfirm_swipeview_SwipeView = {"container": o_PostTreatmentStack_disposablesRemovalConfirm_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} + + +#instructions for recirculate screen +o_EndTreatmentRecirculateStack_EndTreatmentRecirculateStack = {"container": o_Gui_MainView, "objectName": "_EndTreatmentRecirculateStack", "type": "EndTreatmentRecirculateStack", "visible": True} +o_EndTreatmentRecirculateStack_EndTreatmentBase_EndTreatmentBase = {"container": o_EndTreatmentRecirculateStack_EndTreatmentRecirculateStack, "objectName": "_EndTreatmentBase", "type": "EndTreatmentBase", "visible": True} +o_EndTreatmentBase_swipeview_SwipeView = {"container": o_EndTreatmentRecirculateStack_EndTreatmentBase_EndTreatmentBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} + +#instructions for standby disinfection screen +o_DisinfectStack_DisinfectStack = {"container": o_Gui_MainView, "objectName": "_DisinfectStack", "type": "DisinfectStack", "visible": True} +o_DisinfectStack_disinfect_TreatmentFlowBase = {"container": o_DisinfectStack_DisinfectStack, "objectName": "_disinfect", "type": "TreatmentFlowBase", "visible": True} +o_disinfect_swipeview_SwipeView = {"container": o_DisinfectStack_disinfect_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} + +o_instruction = {"type": "Text", "unnamed": 1, "visible": True} +o_right_arrow = {"id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} +o_image_path = {"type": "Image", "unnamed": 1, "visible": True} +o_interval_obj = {"container":o_treatmentStack_treatmentHome_TreatmentHome, "id": "_text", "type": "Text", "unnamed": 1, "visible": True} + + +# #settings_Home +o_userConfirmation_UserConfirmation = {"container": o_Gui_MainView, "objectName": "UserConfirmation", "type": "UserConfirmation", "visible": True} +o_services_screen_text_obj = {"container": o_userConfirmation_UserConfirmation, "type": "Text", "unnamed": 1, "visible": True} +o_password_text_field = {"container": o_userConfirmation_UserConfirmation, "echoMode": 2, "id": "_input", "passwordCharacter": "•", "type": "TextInput", "unnamed": 1, "visible": True} +o_show_password = {"container": o_userConfirmation_UserConfirmation, "id": "_showPassword", "source": "qrc:/images/iEye", "type": "Image", "unnamed": 1, "visible": True} +#object on keyboard to switch to keypad +o_switch_keyboard_to_keypad = {"container": o_Gui_MainView, "text": "&123", "type": "Text", "unnamed": 1, "visible": True} +o_keyboard_object = {"container": o_Gui_MainView, "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_SettingsDateTime = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsDateTime", "visible": True} +o_settings_date_and_time_text = {"container": o_SettingsBase_SettingsDateTime, "type": "Text", "unnamed": 1, "visible": True} +o_date_time_container = {"container": o_SettingsBase_SettingsDateTime, "id": "_container", "type": "Column", "unnamed": 1, "visible": True} +o_shutdown_text = {"container": o_Gui_MainView, "text": "SHUTDOWN", "type": "Text", "unnamed": 1, "visible": True} + + +#post-treatment o_patientDisconnectionConfirm_Patient_Disconnection_Text = {"container": o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase, "text": "Patient Disconnection", "type": "Text", "unnamed": 1, "visible": True} o_patient_Disconnection_left_arrow = {"container": o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase, "id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} o_patientDisconnectionConfirm_rightImage_Image = {"container": o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} o_patientDisconnectionConfirm_lefttImage_Image = {"container": o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase, "id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} o_patientDisconnectionConfirm_Button = {"container": o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} -o_PostTreatmentStack_PostTreatmentStack = {"container": o_Gui_MainView, "objectName": "_PostTreatmentStack", "type": "PostTreatmentStack", "visible": True} -o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase = {"container": o_PostTreatmentStack_PostTreatmentStack, "objectName": "_patientDisconnectionConfirm", "type": "TreatmentFlowBase", "visible": True} o_patient_disconnection_text = {"container": o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase, "text": "Patient Disconnection", "type": "Text", "unnamed": 1, "visible": True} o_patient_Disconnection_right_arrow = {"container": o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} -o_patient_Disconnection_left_arrow = {"container": o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase, "id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} o_patient_disconnection_confirm_button = {"container": o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} -o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview = {"container": o_PostTreatmentStack_PostTreatmentStack, "objectName": "_treatmentReviewConfirm", "type": "PostTreatmentReview", "visible": True} o_treatment_review_next_text = {"container": o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview, "text": "NEXT", "type": "Text", "unnamed": 1, "visible": True} -o_PostTreatmentStack_disposablesRemovalConfirm_TreatmentFlowBase = {"container": o_PostTreatmentStack_PostTreatmentStack, "objectName": "_disposablesRemovalConfirm", "type": "TreatmentFlowBase", "visible": True} -o_disposablesRemovalConfirm_swipeview_SwipeView = {"container": o_PostTreatmentStack_disposablesRemovalConfirm_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} o_disposables_removal_backButton = {"container": o_PostTreatmentStack_disposablesRemovalConfirm_TreatmentFlowBase, "objectName": "_backButton", "type": "BackButton", "visible": True} o_treatment_review_next_button = {"container": o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} o_treatmentReviewConfirm_ExportButton = {"container": o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview, "gradient": 0, "type": "ExportButton", "unnamed": 1, "visible": True} @@ -79,26 +689,14 @@ o_disposables_removal_right_arrow = {"container": o_PostTreatmentStack_disposablesRemovalConfirm_TreatmentFlowBase, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} o_disposables_removal_text = {"container": o_PostTreatmentStack_disposablesRemovalConfirm_TreatmentFlowBase, "text": "Disposables Removal", "type": "Text", "unnamed": 1, "visible": True} o_treatmentReviewConfirm_Export_Text = {"container": o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview, "text": "Export", "type": "Text", "unnamed": 1, "visible": True} -o_right_arrow = {"id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} o_left_arrow = {"id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} - - - #post treatment review -o_Gui_MainView = {"type": "Gui::MainView", "unnamed": 1, "visible": True} -o_PostTreatmentStack_PostTreatmentStack = {"container": o_Gui_MainView, "objectName": "_PostTreatmentStack", "type": "PostTreatmentStack", "visible": True} -o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview = {"container": o_PostTreatmentStack_PostTreatmentStack, "objectName": "_treatmentReviewConfirm", "type": "PostTreatmentReview", "visible": True} o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview_ONE = {"container": o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview, "type": "Text", "unnamed": 1, "visible": True} o_review_area = {"container": o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview, "id": "_flickable", "type": "Flickable", "unnamed": 1, "visible": True} o_review_text = {"container": o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview, "type": "Text", "unnamed": 1, "visible": True} #patient ID from create custom treatment -o_input_patient_id = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} -o_confirm_button = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} -o_right_arrow = {"id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} -o_left_arrow = {"id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} -o_patientDisconnectionConfirm_Button = {"container": o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} o_treatmentReviewConfirm_NEXT_Text = {"container": o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview, "text": "NEXT", "type": "Text", "unnamed": 1, "visible": True} o_treatmentReviewConfirm_patient_ID_Text = {"container": o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview, "type": "Text", "unnamed": 1, "visible": True} o_treatmentReviewConfirm_500_Text = {"container": o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview, "text": 500, "type": "Text", "unnamed": 1, "visible": True} Index: tst_main_treatment_vitals/test.py =================================================================== diff -u -r0e972c9dd9f93c0f54bd085ee92eb0f6f0da9a4e -rba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438 --- tst_main_treatment_vitals/test.py (.../test.py) (revision 0e972c9dd9f93c0f54bd085ee92eb0f6f0da9a4e) +++ tst_main_treatment_vitals/test.py (.../test.py) (revision ba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438) @@ -220,8 +220,7 @@ input_field = waitForObject(input_field) entered_value = str(input_field.text) utils.waitForGUI(1) - test.compare(entered_value, value, - "Actual {} value: {} should be equal to Expected {} value: {}".format(vital, entered_value, vital, value)) + test.compare(entered_value, value, "Actual {} value: {} should be equal to Expected {} value: {}".format(vital, entered_value, vital, value)) test.endSection() Index: tst_post_treatment/test.py =================================================================== diff -u -rc1870f6c47b476330fe930d81bf0a13cab62a86f -rba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438 --- tst_post_treatment/test.py (.../test.py) (revision c1870f6c47b476330fe930d81bf0a13cab62a86f) +++ tst_post_treatment/test.py (.../test.py) (revision ba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438) @@ -16,11 +16,16 @@ # NOTE: # This test contradicts verification of post treatment section. +import builtins import names +import csv +import test +import time import builtins from dialin.ui import utils -from dialin.ui.hd_simulator import HDSimulator +from datetime import * from configuration import config +from dialin.ui.hd_simulator import HDSimulator from configuration import utility from dialin.common.hd_defs import HDOpModes, HDOpSubModes, PostTreatmentStates @@ -55,10 +60,9 @@ Method for navigating to post treatment disconnection submode. """ hd_simulator.cmd_send_hd_operation_mode(op_mode = HDOpModes.MODE_POST.value, sub_mode=PostTreatmentStates.HD_POST_TREATMENT_PATIENT_DISCONNECTION_STATE.value) - if object.exists(get_rightarrow_obj(rightarrow_obj_names[0])): - mouseClick(waitForObject(get_rightarrow_obj(rightarrow_obj_names[0]))) - elif object.exists(get_rightarrow_obj(rightarrow_obj_names[0])): - mouseClick(waitForObject(get_rightarrow_obj(rightarrow_obj_names[0]))) + for iteration in range(2): + if object.exists(get_rightarrow_obj(rightarrow_obj_names[0])): + mouseClick(waitForObject(get_rightarrow_obj(rightarrow_obj_names[0]))) def post_treatment_review_text_obj(text): @@ -265,7 +269,7 @@ """ test.startSection("Method to check all the values of parameters in review screen") - for index in range (5): + for index in range (2): getting_patient_id_from_create_custom_treatment(config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Patient ID"][index]) navigation_to_post_treatment() @@ -312,8 +316,7 @@ utils.waitForGUI(1) test.startSection("verification of post treatment review values for iteration -> "+str(index+1)) - test.log("###verification of post treatment UI data") - + test.log("###verification of post treatment UI data based on config data") for parameters_value in config.POST_TREATMENT_REVIEW_PARAMETER_RANGE.keys(): parameter_set = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE[parameters_value] @@ -352,13 +355,25 @@ elif parameters_value == 'Water Sample Test Result': test.log("verification of values for parameter ->" + parameters_value) review_parameter_value = review_text(text = str(parameter_set[index])) + test.log(str(review_parameter_value)) parameter_text = waitForObjectExists(review_parameter_value) test.compare(str(parameter_set[index]), str(parameter_text.text), "parameter value should be "+str(parameter_set[index])) continue - if parameters_value == 'Treatment Start DateTime' or parameters_value == 'Treatment End DateTime' or parameters_value == 'Actual Treatment Duration': - continue + if parameters_value == 'Treatment Start DateTime': + start_date_time = datetime.fromtimestamp(parameter_set[index]).strftime('%Y/%m/%d %H:%M') + review_parameter_value = review_text(text = str(start_date_time)) + parameter_text = waitForObjectExists(review_parameter_value) + test.compare(start_date_time, str(parameter_text.text), "parameter value should be "+str(parameter_set[index])) + continue + if parameters_value == 'Treatment End DateTime': + end_date_time = datetime.fromtimestamp(parameter_set[index]).strftime('%Y/%m/%d %H:%M') + review_parameter_value = review_text(text = str(end_date_time)) + parameter_text = waitForObjectExists(review_parameter_value) + test.compare(end_date_time, str(parameter_text.text), "parameter value should be "+str(parameter_set[index])) + continue + else: if isinstance(parameter_set[index], float): parameter_set[index] = ('%.3f' %parameter_set[index]) @@ -370,26 +385,54 @@ parameter_to_scroll = "0" else: parameter_to_scroll = str(time_duration) - + if parameters_value == 'Actual Treatment Duration': + time_duration = builtins.int(utility.convert_seconds_into_min_and_sec(seconds=parameter_to_scroll, time_format="%M")) + test.log(str(time_duration)) + parameter_to_scroll = str(time_duration) + review_parameter_value = review_text(text = parameter_to_scroll) parameter_text = waitForObjectExists(review_parameter_value) test.log("###verification of values for parameter - >" + parameters_value + " from UI screen") parameter_set[index] = parameter_to_scroll test.compare(str(parameter_set[index]), str(parameter_text.text), "parameter value should be "+str(parameter_set[index])) test.log("verification of post treatment log file data") - parameter_value, parameter_unit = utility.verify_parameter_from_post_treatment_log(parameters_value) - if parameter_unit is None or parameter_value is None: - continue + parameter_value, parameter_unit = verify_parameter_from_post_treatment_log(parameters_value) test.compare(parameter_unit, config.POST_TREATMENT_REVIEW_SCREEN_UNITS[parameters_value], "parameters unit should be ->" + config.POST_TREATMENT_REVIEW_SCREEN_UNITS[parameters_value]) test.compare(parameter_value, parameter_set[index], "parameters value should be ->" + str(parameter_set[index])) test.endSection() test.endSection() - + +def verify_parameter_from_post_treatment_log(msg_text): + """ + To obtain the details of parameter from post treatment log file. + @param msg_text: parameter to be extracted. + @returns message value and message unit + """ + try: + log_location = str(utility.get_extracted_file_from_post_treatment()) + with open(log_location, 'r') as csv_file: + + try: + for row in csv_file: + reader = csv.reader(csv_file) + for row in reader: + row_length = sum(1 for values in row) + for row1 in row: + if row[0]!= None and row[0] == msg_text and row_length == 3: + return (row[1],row[2]) + else: + pass + except: + test.fail("Treatment log data is corrupted") + except: + test.fail("Log file is not created or log file is not created based on standard log naming format.") + + def main(): - + #TODO: Export functionality need to be verified in new build utils.tstStart(__file__) startApplication(config.AUT_NAME) hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_POST.value, sub_mode=PostTreatmentStates.HD_POST_TREATMENT_PATIENT_DISCONNECTION_STATE.value) @@ -400,4 +443,3 @@ utils.tstDone() -