Index: shared/scripts/configuration/config.py =================================================================== diff -u -r36113b694009f6d153d227dc68cb87d7be28e046 -r4800083679383c87221a7e55ad35f84b40ffb386 --- shared/scripts/configuration/config.py (.../config.py) (revision 36113b694009f6d153d227dc68cb87d7be28e046) +++ shared/scripts/configuration/config.py (.../config.py) (revision 4800083679383c87221a7e55ad35f84b40ffb386) @@ -22,64 +22,63 @@ # -K, --enable-acknow-log Enables Acknowledgment Log AUT_NAME = "denaliSquish -k -K -S -q" -AUT_NAME_ONLY = "denaliSquish" # Need only the AUT name for tst_ui_logs, do not add options +AUT_NAME_ONLY = "denaliSquish" # Need only the AUT name for tst_ui_logs, do not add options HOME_DIR_PATH = "/home/denali" TMP_DIR = "/tmp/" -#post treatment -POST_TREATMENT_LOG_LOCATION = "".join([str(HOME_DIR_PATH),'/Desktop/usb-disk/treatment/']) -POST_TREATMENT_LOG_FILTER = "".join([str(POST_TREATMENT_LOG_LOCATION),'*.txr.p']) +# post treatment +POST_TREATMENT_LOG_LOCATION = "".join([str(HOME_DIR_PATH), '/Desktop/usb-disk/treatment/']) +POST_TREATMENT_LOG_FILTER = "".join([str(POST_TREATMENT_LOG_LOCATION), '*.txr.p']) -#settings files -SETTINGS_ROOT_PATH = "".join([str(HOME_DIR_PATH),'/Projects/application/resources/settings/Configurations/']) +# settings files +SETTINGS_ROOT_PATH = "".join([str(HOME_DIR_PATH), '/Projects/unittests/resources/settings/Configurations/']) TREATMENT_DATA_SETTINGS_FILENAME = "DataList.conf" +# instructions_image location +INSTRUCTION_CONF_LOCATION = "".join([str(HOME_DIR_PATH), '/Projects/unittests/resources/settings/Instructions/Instructions.conf']) +IMAGE_LOCATION = "file://" + "".join([str(HOME_DIR_PATH), '/Projects/application/resources/settings//Instructions/']) +EXPECTED_IMAGE_LOCATION = "".join([str(HOME_DIR_PATH), '/Projects/application/resources/settings/Instructions/']) +TREATMENT_LOG_LOCATION = "".join([str(HOME_DIR_PATH), '/Desktop/sd-card/treatment/*.log']) -#instructions_image location -INSTRUCTION_CONF_LOCATION = "".join([str(HOME_DIR_PATH),'/Projects/application/resources/settings/Instructions/Instructions.conf']) -IMAGE_LOCATION = "file://"+"".join([str(HOME_DIR_PATH),'/Projects/application/resources/settings//Instructions/']) -EXPECTED_IMAGE_LOCATION ="".join([str(HOME_DIR_PATH),'/Projects/application/resources/settings//Instructions/']) -TREATMENT_LOG_LOCATION = "".join([str(HOME_DIR_PATH),'/Desktop/sd-card/treatment/*.log']) +# cloud_sync_verification +INP_BUF_FILE_LOCATION = "".join([str(HOME_DIR_PATH), '/Desktop/sd-card/cloudsync/']) +CLOUD_CREDENTIALS_LOCATION = "".join([str(HOME_DIR_PATH) + '/Desktop/cloudsync/credentials']) +ERROR_FILE_LOCATION = "".join([str(HOME_DIR_PATH) + '/Desktop/sd-card/service/']) -#cloud_sync_verification -INP_BUF_FILE_LOCATION = "".join([str(HOME_DIR_PATH),'/Desktop/sd-card/cloudsync/']) -CLOUD_CREDENTIALS_LOCATION = "".join([str(HOME_DIR_PATH)+'/Desktop/cloudsync/credentials']) -ERROR_FILE_LOCATION = "".join([str(HOME_DIR_PATH)+'/Desktop/sd-card/service/']) - -#ui_logs -APP_POST_LOG_LOCATION = "".join([str(TMP_DIR),'/post.log']) -LOG_LOCATION = "".join([str(HOME_DIR_PATH),'/Desktop/sd-card/log/']) -CLOUDSYNC_FOLDER_PATH = "".join([str(HOME_DIR_PATH)+'/Desktop/']) -SD_CARD_CLOUDSYNC_FOLDER_PATH = "".join([str(HOME_DIR_PATH)+'/Desktop/sd-card/']) -SD_CARD_LOCATION = "".join([str(HOME_DIR_PATH)+'/Desktop/']) -USB_DISK_FOLDER_LOCATION = "".join([str(HOME_DIR_PATH)+'/Desktop/usb-disk/']) -SETTINGS_FOLDER_LOCATION = "".join([str(HOME_DIR_PATH)+'/Projects/application/resources/']) -APPLICATION_FOLDER_LOCATION = "".join([str(HOME_DIR_PATH)+'/Projects/']) -CANBUS_FOLDER_LOCATION = "".join([str(HOME_DIR_PATH)+'/Projects/application/sources/']) +# ui_logs +APP_POST_LOG_LOCATION = "".join([str(TMP_DIR), '/post.log']) +LOG_LOCATION = "".join([str(HOME_DIR_PATH), '/Desktop/sd-card/log/']) +CLOUDSYNC_FOLDER_PATH = "".join([str(HOME_DIR_PATH) + '/Desktop/']) +SD_CARD_CLOUDSYNC_FOLDER_PATH = "".join([str(HOME_DIR_PATH) + '/Desktop/sd-card/']) +SD_CARD_LOCATION = "".join([str(HOME_DIR_PATH) + '/Desktop/']) +USB_DISK_FOLDER_LOCATION = "".join([str(HOME_DIR_PATH) + '/Desktop/usb-disk/']) +SETTINGS_FOLDER_LOCATION = "".join([str(HOME_DIR_PATH) + '/Projects/unittests/resources/']) +APPLICATION_FOLDER_LOCATION = "".join([str(HOME_DIR_PATH) + '/Projects/']) +CANBUS_FOLDER_LOCATION = "".join([str(HOME_DIR_PATH) + '/Projects/unittests/sources/']) PEM_FILES = ['1.pem', '2.pem', '3.pem' ] -#standby mode +# standby mode GOODMORNING_START_TIME_SEC = 0 GOODEVENING_START_TIME_SEC = 43200 -NUM_OF_REQUEST_REJECT_REASONS = 48 #Number of settings change reject codes +NUM_OF_REQUEST_REJECT_REASONS = 48 # Number of settings change reject codes -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", +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_INSTRUCTION_COLOR = '#4290ec' CURRENT_COLOR = '#000000' -COMPLETE_COLOR = '#4290ec' +COMPLETE_COLOR = '#4290ec' ENABLED_COLOR = '#fcfcfc' -INCOMPLETE_COLOR = '#607a91' -INCOMPLETE_INSTRUCTION_COLOR = '#4290ec' +INCOMPLETE_COLOR = '#607a91' +INCOMPLETE_INSTRUCTION_COLOR = '#4290ec' OUT_OF_RANGE_COLOR = "#c53b33" -#Disinfection -DISINFECT_TREATMENT_ID = ["_headStepBullet","_nextStepsBullet"] +# Disinfection +DISINFECT_TREATMENT_ID = ["_headStepBullet", "_nextStepsBullet"] -#main treatment screen +# main treatment screen IN_RANGE_COLOR = "#fcfcfc" SYSTOLIC_LOWER_LIMIT = 60 SYSTOLIC_UPPER_LIMIT = 250 @@ -89,9 +88,9 @@ HEART_RATE_UPPER_LIMIT = 180 TREATMENT_UNHIGHLIGHTED_COLOR = "#000000" TREATMENT_HIGHLIGHTED_COLOR = "#135088" -TREATMENT_PRESSURE_IN_RANGE_COLOR="#ffffff" # for the range bar marker text +TREATMENT_PRESSURE_IN_RANGE_COLOR = "#ffffff" # for the range bar marker text -#create custom treatment +# create custom treatment HIGHER_VALUE_OF_BLOOD_FLOW_RATE = 500 LOWER_VALUE_OF_BLOOD_FLOW_RATE = 100 STEP_VALUE_OF_BLOOD_FLOW_RATE = 25 @@ -107,135 +106,135 @@ POSITIVE_BUFFER = 10 NEGATIVE_BUFFER = -10 -#dictionary consist of custom treatment values +# dictionary consist of custom treatment values CREATE_CUSTOM_TREATMENT = { - "Blood Flow Rate": 250, + "Blood Flow Rate": 250, "Dialysate Flow Rate": 400, - "Duration": 270, - "Heparin Dispensing Rate": 0.5, + "Duration": 270, + "Heparin Dispensing Rate": 0.5, "Heparin Bolus Volume": 1, - "Heparin Stop Time": 100, + "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, + "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 +# 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, 210, 225, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, 390, 405, 420, 435, 450, 465, 480], "Heparin Dispensing Rate": [0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1], "Heparin Bolus Volume": [0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2], - "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, 480], + "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, 480], "Saline Bolus Volume": [100, 200, 300], "Dialysate Temperature": [35.0, 35.5, 36.0, 36.5, 37.0], "Blood Pressure Measurement Interval": [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60], - "Rinseback Flow Rate": [50, 75, 100, 125, 150], + "Rinseback Flow Rate": [50, 75, 100, 125, 150], } -#dictionary consist of slider [minimum value, slider buffer value, width buffer of slider] +# 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, 74], - "duration" : [60, 15, 28], - "heparin_dispensing_rate" : [0.2, 0.1, 93], - "heparin_bolus_volume" : [0.2, 0.1, 41], - "heparin_stop_time" : [0, 10, 15.75], - "saline_bolus" : [100, 100, 350], - "dialysate_temperature" : [35, 0.5, 187.5], - "arterial_pressure_limit_high" : [20, 10, 11.931], - "blood_pressure_measurement_interval" : [5, 5, 60], + "blood_flow_rate": [100, 25, 46], + "dialysate_flow_rate": [100, 50, 74], + "duration": [60, 15, 28], + "heparin_dispensing_rate": [0.2, 0.1, 93], + "heparin_bolus_volume": [0.2, 0.1, 41], + "heparin_stop_time": [0, 10, 15.75], + "saline_bolus": [100, 100, 350], + "dialysate_temperature": [35, 0.5, 187.5], + "arterial_pressure_limit_high": [20, 10, 11.931], + "blood_pressure_measurement_interval": [5, 5, 60], } # NOTE this is for the sliders specifically on the Treatment screen's pressure dialog (tst_main_treatment_pressure) -#dictionary consist of slider [minimum value, slider buffer value, width buffer of slider] +# dictionary consist of slider [minimum value, slider buffer value, width buffer of slider] TREATMENT_PRESSURE_ADJUSTMENT_VALUES = { - "arterial_window" : [120, 40, 300], - "venous_window" : [100, 20, 150], - "venous_asymmetric" : [20, 5, 225] + "arterial_window": [120, 40, 300], + "venous_window": [100, 20, 150], + "venous_asymmetric": [20, 5, 225] } TREATMENT_PRESSURE_ADJUSTMENT_TITLE = "PRESSURES" - -#Alarms location + +# Alarms location CONFIG_PATH = Path(os.getcwd()) HOME_DIR_PATH = CONFIG_PATH.parent.parent.parent -ALARMS_CONF_LOCATION = "".join([str(HOME_DIR_PATH),'/Projects/application/resources/settings/Alarms/Alarms.conf']) -ALARM_MAPPING_CSV_FILE_LOCATION = "".join([str(HOME_DIR_PATH)+'/Projects/application/AlarmMapping.csv']) -ALARM_MAPPING_CSV_DIR_LOCATION = "".join([str(HOME_DIR_PATH)+'/Projects/application/']) +ALARMS_CONF_LOCATION = "".join([str(HOME_DIR_PATH), '/Projects/unittests/resources/settings/Alarms/Alarms.conf']) +ALARM_MAPPING_CSV_FILE_LOCATION = "".join([str(HOME_DIR_PATH) + '/Projects/unittests/AlarmMapping.csv']) +ALARM_MAPPING_CSV_DIR_LOCATION = "".join([str(HOME_DIR_PATH) + '/Projects/unittests/']) -#Service password location -SERVICE_CONF_LOCATION ="".join([str(HOME_DIR_PATH),'/Projects/application/resources/settings/Settings/System.conf']) -DEFAULT_SERVICE_PASSWORD_RAW = "Atal.Matal.22leh" # TODO need to update if we ever change the default -SERVICE_SCREEN_SUBSCREEN_INDEX = { #these indices are only valid for the service screen accessed after password entered - "INFORMATION_SUBSCREEN" :2, +# Service password location +SERVICE_CONF_LOCATION = "".join([str(HOME_DIR_PATH), '/Projects/unittests/resources/settings/Settings/System.conf']) +DEFAULT_SERVICE_PASSWORD_RAW = "Atal.Matal.22leh" # TODO need to update if we ever change the default +SERVICE_SCREEN_SUBSCREEN_INDEX = { # these indices are only valid for the service screen accessed after password entered + "INFORMATION_SUBSCREEN":2, "VOLUME_AND_BRIGHTNESS_SUBSCREEN":3, - "WIFI_SUBSCREEN" : 4, - "BLUETOOTH_CUFF_SUBSCREEN" :5, - "DG_CLEANING_SUBSCREEN" : 6, - "SET_DATETIME_SUBSCREEN" : 7, - "EXPORT_LOGS_SUBSCREEN" : 8, - "WATER_INPUT_MODE_SUBSCREEN" : 9, + "WIFI_SUBSCREEN": 4, + "BLUETOOTH_CUFF_SUBSCREEN":5, + "DG_CLEANING_SUBSCREEN": 6, + "SET_DATETIME_SUBSCREEN": 7, + "EXPORT_LOGS_SUBSCREEN": 8, + "WATER_INPUT_MODE_SUBSCREEN": 9, # ONLY ACCESSIBLE WITH SERVICE LOG-IN - "ENABLE_ROOT_SUBSCREEN" : 10, - "FACTORY_RESET_SUBSCREEN" :11, - "DECOMMISSION_SUBSCREEN" :12 + "ENABLE_ROOT_SUBSCREEN": 10, + "FACTORY_RESET_SUBSCREEN":11, + "DECOMMISSION_SUBSCREEN":12 } -#alarm colors +# alarm colors ALARMS_COLORS_HEADER = { - "ALARM_PRIORITY_NONE" : "#438feb", - "ALARM_PRIORITY_LOW" : "#db8f00", - "ALARM_PRIORITY_MEDIUM" : "#db8f00", - "ALARM_PRIORITY_HIGH" : "#831913" + "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_PRIORITY_NONE": "#254670", + "ALARM_PRIORITY_LOW": "#f5a623", + "ALARM_PRIORITY_MEDIUM": "#f5a623", + "ALARM_PRIORITY_HIGH": "#c53b33" } -ALARM_MUTE_FLAG = 0B0000001000000000 -ALARM_UNMUTE_FLAG = 0B0000000000000000 +ALARM_MUTE_FLAG = 0B0000001000000000 +ALARM_UNMUTE_FLAG = 0B0000000000000000 -ALARM_BUTTONS_OK = 0B0000000010111000 +ALARM_BUTTONS_OK = 0B0000000010111000 -ALARM_BUTTONS_RESUME = 0B0000000000110000 -ALARM_BUTTONS_RESUME_RINSEBACK = 0B0000000000100000 -ALARM_BUTTONS_RESUME_END = 0B0000000000010000 +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_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_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 -NUM_OF_ALARM_PRIORITIES = 4 # Total number of alarm priorities +NUM_OF_ALARM_PRIORITIES = 4 # Total number of alarm priorities NUM_OF_MSG_ID = 321 NUM_OF_ALARM_ID = 322 ALARM_ID_NO_ALARM = 0 ALARM_ID_OUT_OF_RANGE = 322 -#standby mode & ultrafiltration +# standby mode & ultrafiltration UF_MINIMUM_VALUE = 0 UF_MAXIMUM_VALUE = 600 -#pressure +# pressure PRESSURE_STEPS = 10 ARTERIAL_PRESSURE_MINIMUM = +120 ARTERIAL_PRESSURE_MAXIMUM = +200 @@ -247,15 +246,15 @@ ARTERIAL_PRESSURE_HIGH_MAX = +200 VENOUS_PRESSURE_MINIMUM = +100 -VENOUS_PRESSURE_MAXIMUM = +200 #check is meant to be 500 +VENOUS_PRESSURE_MAXIMUM = +200 # check is meant to be 500 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 +# main_treatment_flows BLOOD_FLOW_MINIMUM_VALUE = 100 BLOOD_FLOW_BUFFER = 25 FLOW_SLIDER_WIDTH_BUFFER = 37 @@ -265,66 +264,66 @@ DIALYSATE_FLOW_BUFFER = 50 DIALYSATE_FLOW_SLIDER_WIDTH_BUFFER = 60 -#main treatment screen +# main treatment screen RED_COLOR = "#ff0000" GREEN_COLOR = "#008000" BLOOD_PRIMING_RANGE = 300 BLOOD_PRIMING_TARGET_MAXIMUM = 300 -#tst_pretreatment_screens +# tst_pretreatment_screens NUM_OF_PRETREATMENT_BULLETS = len(PRE_TREATMENT_SCREENS) SALINE_BOLUS_CUMULATIVE = 300 -#patient id +# patient id KEYBOARD_SWITCH = ["ABC", "&123"] PATIENT_ID_COMBINATION = { - "qwerty" : "qwerty", - "sampleid" : "sampleid", - "abcdefghijklmnop" : "abcdefghijklmnop", - "patientid" : "patientid", - "username" : "username", - "sA@MpLE#123" : "sAMpLE123", - "A@BH&321" : "ABH321", - "5432@qwerty" : "5432qwerty" + "qwerty": "qwerty", + "sampleid": "sampleid", + "abcdefghijklmnop": "abcdefghijklmnop", + "patientid": "patientid", + "username": "username", + "sA@MpLE#123": "sAMpLE123", + "A@BH&321": "ABH321", + "5432@qwerty": "5432qwerty" } -#Random selection for operational parameter for custom dta +# Random selection for operational parameter for custom dta OPERATIONAL_PARAMETERS = {"Heparin Type": HEPARIN_TYPE, "Acid Concentrate": "1.0 K 2.5 Ca", "Bicarbonate Concentrate": BICARBONATE_CONCENTRATE, "Dialyzer Type": "BB Diacap Pro 16H"} -#ultrafilteration volume based on flow parameters. Python list contains Rotational speed, Motor speed, +# 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, 0, 0, 0, 0, 0, 0], - 1 : [220, 1.45, 1.45, 1.45, 1.45, 1.45, 1.45], + 0: [100, 0, 0, 0, 0, 0, 0], + 1: [220, 1.45, 1.45, 1.45, 1.45, 1.45, 1.45], } -#dictionary contains uf maximum and minimum value's to set. +# dictionary contains uf maximum and minimum value's to set. TREATMENT_ULTRAFILTRATION_TESTING_OPTION = { - 0 : {"uf_maximum" : 600, "uf_minimum" : 0}, - 1 : {"uf_maximum" : 480, "uf_minimum" : 250}, + 0: {"uf_maximum": 600, "uf_minimum": 0}, + 1: {"uf_maximum": 480, "uf_minimum": 250}, } -#dictionary contains saline cumulative and saline delivered value -#key : saline cumulative value. -#value: saline delivered value +# 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.54, - 165.87 : 145.87, - 220.64 : 220.64, - 325.26 : 300.24, - 400.86 : 380.86, - 500.00 : 500.24, - 634.76 : 634.76, - 823.67 : 800.64, - 999.99 : 999.99, - 1000 : 1000 + 0: 0, + 1.0: 1.0, + 125.56: 100.54, + 165.87: 145.87, + 220.64: 220.64, + 325.26: 300.24, + 400.86: 380.86, + 500.00: 500.24, + 634.76: 634.76, + 823.67: 800.64, + 999.99: 999.99, + 1000: 1000 } -#testing options for main treatment saline -SALINE_BOLUS_TARGET = [0, 1, 150, 155, 299, 300] #Boundary Value Analysis +# testing options for main treatment saline +SALINE_BOLUS_TARGET = [0, 1, 150, 155, 299, 300] # Boundary Value Analysis # pretreatment_patient_connection SYSTOLIC_PRESSSURE_120 = 120 @@ -358,22 +357,21 @@ UF_VALID_RANGE = 700 TRAINING_INDICATOR_SCREEN = 4 ULTRAFILTRATION_VOLUME_COMBINATION_FROM_ULTRAFILTRATION_SETUP_SCREEN = { - "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}, + "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}, } - -#pre-treatment_priming +# pre-treatment_priming NOT_VISIBLE = False VISIBLE = True FOCUS = True @@ -386,30 +384,30 @@ ENABLED = True DISABLED = False -#pre-treatment_priming +# pre-treatment_priming ACCEPTED = True REJECTED = False -#Filter Flush +# Filter Flush MAXIMUM_COUNTDOWN_TIME = 300 CONSUMABLE_SELF_TEST_BICARB_PUMP_CHECK_STATE = 3 -#settings information +# settings information BRIGHTNESS_MIN_VAL = 20 BRIGHTNESS_MAX_VAL = 100 VOLUME_MIN_VAL = 20 VOLUME_MAX_VAL = 100 -#service screen +# service screen PASSWORD = 123 -#wifi screen -IP_ADDRESS = {"valid" : "192.168.1.1","invalid" : "1.2.2.3"} -GATEWAY = {"valid" : "255.255.255.0", "invalid" : "1.2.3.4"} -SUBNET_MASK = {"valid" : "255.255.255.0", "invalid" : "3.4.2.1"} -DNS = {"valid" : "0.0.0.0", "invalid" : "3.2.1.3"} +# wifi screen +IP_ADDRESS = {"valid": "192.168.1.1", "invalid": "1.2.2.3"} +GATEWAY = {"valid": "255.255.255.0", "invalid": "1.2.3.4"} +SUBNET_MASK = {"valid": "255.255.255.0", "invalid": "3.4.2.1"} +DNS = {"valid": "0.0.0.0", "invalid": "3.2.1.3"} -#dictionary consist of review parameters values of post treatment +# dictionary consist of review parameters values of post treatment POST_TREATMENT_REVIEW_PARAMETER_RANGE = { "Patient ID": ["abcd", "xyz"], "Heparin Stop": [0, 101], @@ -421,7 +419,7 @@ "Treatment End DateTime": [1654519251, 1623382321], "Treatment Duration": [70, 75], "Water Sample Test Result": [0, 1], - "Actual Treatment Duration": [62, 126], + "Actual Treatment Duration": [62, 126], "Dialysate Volume Used": [4.0, 6.0], "Acid ConcentrateType": [0, 1], "Prescribed UF Volume": [0.3, 0.5], @@ -431,7 +429,7 @@ "Actual UF Volume": [0.3, 0.5], "Calcium Concentration": [3, 56], "Prescribed UF Rate": [0.1, 0.55], - "Bicarbonate Concentration": [14, 50], + "Bicarbonate Concentration": [14, 50], "Target UF Rate": [0.2, 0.56], "Sodium Concentration": [4, 6], "Actual UF Rate": [0.5, 0.6], @@ -445,60 +443,60 @@ "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], + "Average Venous Pressure": [20.0, 101.45], } VALID = True INVALID = False -#cloud sync index +# cloud sync index EPOCH_INDEX = 0 SEQUENCE_INDEX = 1 CRC_INDEX = 2 CODE_INDEX = 3 PARAMETER_COUNT = 4 PARAMETER_INDEX = 5 -#cloud_sync_hd_opmodes +# cloud_sync_hd_opmodes OPMODE_INDEX = 5 SUBMODE = 6 HD_OPMODES_MSG_PARAMETER_LEN = 7 HD_OPMODES_CREDENTIAL_PARAMETER_LEN = 6 -#ui_logs +# ui_logs RESET_BINARY = "0" SET_BINARY = "1" TREATMENT_DATA_PARAMETER = { - "Blood flow rate" : [1, 2], - "Dialysate flow rate" : [3, 5], - "Uf rate" : [1.234, 3.452], - "Arterial pressure" : [10.123, 10.567], - "Venous pressure" : [10.323, 10.634], + "Blood flow rate": [1, 2], + "Dialysate flow rate": [3, 5], + "Uf rate": [1.234, 3.452], + "Arterial pressure": [10.123, 10.567], + "Venous pressure": [10.323, 10.634], } TREATMENT_ALARM_PARAMETER = { - "Alarm Id" : [2, 4], - "Alarm Id String" : ["2-HD POST: FPGA Compatibility", 4], - "Parameter1" : [2.3, 3.7], - "Parameter2" : [3.4, 4.5], + "Alarm Id": [2, 4], + "Alarm Id String": ["2-HD POST: FPGA Compatibility", 4], + "Parameter1": [2.3, 3.7], + "Parameter2": [3.4, 4.5], } TREATMENT_EVENT_PARAMETER = { - "Event id" : [2, 3], - "Event id String" : ["2 - Treatment duration change event", 3], - "Old Value" : [1.523, 1.945], - "New Value" : [2.523, 3.567], + "Event id": [2, 3], + "Event id String": ["2 - Treatment duration change event", 3], + "Old Value": [1.523, 1.945], + "New Value": [2.523, 3.567], } -#dg cleaning -WATER_FLUSH_TIME_HOUR = {"valid" : "23","invalid" : "24"} -WATER_FLUSH_TIME_MINUTE = {"valid" : "59","invalid" : "60"} -WATER_FLUSH_CYCLE = {"valid" : "1", "invalid" : "8"} -HEAT_DISINFECTION_TIME_HOUR = {"valid" : "23","invalid" : "24"} -HEAT_DISINFECTION_TIME_MINUTE = {"valid" : "59","invalid" : "60"} -HEAT_DISINFECTION_CYCLE = {"valid" : "7", "invalid" : "61"} +# dg cleaning +WATER_FLUSH_TIME_HOUR = {"valid": "23", "invalid": "24"} +WATER_FLUSH_TIME_MINUTE = {"valid": "59", "invalid": "60"} +WATER_FLUSH_CYCLE = {"valid": "1", "invalid": "8"} +HEAT_DISINFECTION_TIME_HOUR = {"valid": "23", "invalid": "24"} +HEAT_DISINFECTION_TIME_MINUTE = {"valid": "59", "invalid": "60"} +HEAT_DISINFECTION_CYCLE = {"valid": "7", "invalid": "61"} -#heparin cumualtive values +# heparin cumualtive values HEPARIN_VALUES = {"Cumulative Value": [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 1.0, 15.0, 17.8, 20.0], - "Required Value": [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 1.0, 15.0, 17.8, 20.0],} + "Required Value": [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 1.0, 15.0, 17.8, 20.0], }