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], }