########################################################################### # # Copyright (c) 2019-2021 Diality Inc. - All Rights Reserved. # # 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 # # @author (last) Joseph varghese # @date (last) 18-Jan-2022 # ############################################################################ import os from configuration.strings import * AUT_NAME = "denaliSquish" COMMON_PATH = os.environ['HOME']+"/Projects" 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"} #standby mode GOODMORNING_START_TIME_SEC = 0 GOODEVENING_START_TIME_SEC = 43200 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 STEP_VALUE_OF_BLOOD_FLOW_RATE = 25 BUFFER_LOW_AND_HIGH_LIMITS = 30 ARTERIAL_VALUE_0 = 0 ARTERIAL_VALUE_NEGATIVE_300 = -300 ARTERIAL_VALUE_NEGATIVE_20 = -20 ARTERIAL_VALUE_NEGATIVE_270 = -270 VENOUS_VALUE_600 = 600 VENOUS_VALUE_20 = 20 VENOUS_VALUE_50 = 50 VENOUS_VALUE_570 = 570 POSITIVE_BUFFER = 10 NEGATIVE_BUFFER = -10 #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], }