########################################################################### # # Copyright (c) 2020-2024 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 msg_defs.py # # @author (last) Enum Updater Script # @date (last) 03-Aug-2026 # @author (original) Zoltan Miskolci # @date (original) 31-Jul-2026 # ############################################################################ from enum import unique from leahi_dialin.utils.enums import DialinEnum @unique class RequestRejectReasons(DialinEnum): REQUEST_REJECT_REASON_NONE = 0 # Used when there is no rejection REQUEST_REJECT_REASON_NOT_ALLOWED_IN_CURRENT_MODE = 1 # Request is not allowed in the current operating mode REQUEST_REJECT_REASON_TIMEOUT_WAITING_FOR_USER_CONFIRM = 2 # Validated request was not confirmed by user in reasonable time REQUEST_REJECT_REASON_NOT_IN_TREATMENT_MODE = 3 # Request is not allowed if not in treatment mode REQUEST_REJECT_REASON_INVALID_TREATMENT_STATE = 4 # Request is not allowed in current treatment state REQUEST_REJECT_REASON_TREATMENT_TOO_CLOSE_TO_FINISHED = 5 # Request is not allowed so near end of treatment REQUEST_REJECT_REASON_TREATMENT_TIME_OUT_OF_RANGE = 6 # Treatment duration is out of range REQUEST_REJECT_REASON_TREATMENT_TIME_LESS_THAN_CURRENT = 7 # Treatment time change is less than currently elapsed treatment time REQUEST_REJECT_REASON_BLOOD_FLOW_OUT_OF_RANGE = 8 # Blood flow is out of range REQUEST_REJECT_REASON_DIAL_FLOW_OUT_OF_RANGE = 9 # Dialysate flow is out of range REQUEST_REJECT_REASON_DIAL_VOLUME_OUT_OF_RANGE = 10 # Dialysate flow rate or treatment duration causes dialysate volume to exceed limit REQUEST_REJECT_REASON_UF_VOLUME_OUT_OF_RANGE = 11 # Ultrafiltration volume is out of range REQUEST_REJECT_REASON_UF_RATE_OUT_OF_RANGE = 12 # Ultrafiltration rate is out of range REQUEST_REJECT_REASON_TREATMENT_TIME_LESS_THAN_MINIMUM = 13 # Treatment time change is less than minimum treatment time REQUEST_REJECT_REASON_UF_NOT_IN_PROGESS = 14 # Ultrafiltration is not currently in progress REQUEST_REJECT_REASON_UF_NOT_PAUSED = 15 # Ultrafiltration is not currently paused REQUEST_REJECT_REASON_FLUID_BOLUS_IN_PROGRESS = 16 # A fluid bolus is in progress REQUEST_REJECT_REASON_PARAM_OUT_OF_RANGE = 17 # A treatment parameter is out of range REQUEST_REJECT_REASON_FILTER_FLUSH_HAS_BEEN_EXPIRED = 18 # Filter flush time has been expired REQUEST_REJECT_REASON_SALINE_MAX_VOLUME_REACHED = 19 # Saline bolus volume maximum has been reached - no more saline allowed REQUEST_REJECT_REASON_FLUID_BOLUS_NOT_IN_PROGRESS = 20 # A fluid bolus is not in progress REQUEST_REJECT_REASON_ACTION_DISABLED_IN_CURRENT_STATE = 21 # Requested user action is disabled in current state REQUEST_REJECT_REASON_ALARM_IS_ACTIVE = 22 # Requested user action not allowed while alarm is active REQUEST_REJECT_REASON_INVALID_COMMAND = 23 # Requested user action invalid REQUEST_REJECT_REASON_TREATMENT_IS_COMPLETED = 24 # The treatment has been completed REQUEST_REJECT_REASON_ADDL_RINSEBACK_MAX_VOLUME_REACHED = 25 # Rinseback additional volume maximum has been reached - no more additional rinsebacks allowed REQUEST_REJECT_REASON_DIALYZER_NOT_INVERTED = 26 # Dialyzer not inverted yet REQUEST_REJECT_REASON_NO_PATIENT_CONNECTION_CONFIRM = 27 # The user has not confirmed patient connection REQUEST_REJECT_REASON_DD_COMM_LOST = 28 # Treatment cannot initiate if DD comm is lost REQUEST_REJECT_REASON_DD_NOT_IN_STANDBY_IDLE_STATE = 29 # Treatment cannot initiate if DD is not in standby idle state REQUEST_REJECT_REASON_INVALID_REQUEST_FORMAT = 30 # Request message not formatted properly REQUEST_REJECT_REASON_INVALID_DATE_OR_TIME = 31 # Given date/time is invalid REQUEST_REJECT_REASON_TREATMENT_IN_PROGRESS = 32 # Treatment is in progress REQUEST_REJECT_REASON_BATTERY_IS_NOT_CHARGED = 33 # Battery does not have enough charge to start treatment REQUEST_REJECT_REASON_RINSEBACK_NOT_COMPLETED = 34 # Cannot move on to recirculate without completing full rinseback. REQUEST_REJECT_REASON_DOOR_NOT_CLOSED = 35 # Door is not closed REQUEST_REJECT_REASON_DD_DIALYSATE_CAP_OPEN = 36 # Dialysate cap open REQUEST_REJECT_REASON_DD_CONCENTRATE_CAP_OPEN = 37 # Concentrate cap open REQUEST_REJECT_REASON_DISINFECT_HAS_BEEN_EXPIRED = 38 # Disinfect has been expired REQUEST_REJECT_REASON_DD_SERVICE_IS_DUE = 39 # DD service is due REQUEST_REJECT_REASON_TD_SERVICE_IS_DUE = 40 # TD service is due REQUEST_REJECT_REASON_RO_FILTER_TEMPERATURE_OUT_OF_RANGE = 41 # RO filter temperature out of range REQUEST_REJECT_REASON_DD_INCOMPATIBLE = 42 # DD firmware version is not compatible with TD firmware REQUEST_REJECT_REASON_DIALYZER_REPRIME_IN_PROGRESS = 43 # Fluid bolus is not allowed during dialyzer reprime REQUEST_REJECT_REASON_RO_ONLY_MODE_DD_BUSY = 44 # RO only mode DD is busy REQUEST_REJECT_REASON_RO_ONLY_MODE_INVALID_PARAMETER = 45 # RO only mode invalid parameter REQUEST_REJECT_REASON_RO_ONLY_MODE_INVALID_PAYLOAD_LENGTH = 46 # RO only mode invalid payload length REQUEST_REJECT_REASON_TREATMENT_CANNOT_BE_RESUMED = 47 # Cannot resume treatment per alarm REQUEST_REJECT_REASON_HEPARIN_STOP_TIME_EXCEEDS_DURATION = 48 # The Heparin stop time setting is greater than the treatment duration REQUEST_REJECT_REASON_HEPARIN_STOP_TIME_WITH_NO_DISPENSE = 49 # Heparin settings are zero but stop time setting is non-zero REQUEST_REJECT_REASON_HEPARIN_PAUSE_INVALID_IN_THIS_STATE = 50 # Heparin cannot be paused if not currently deliverying Heparin REQUEST_REJECT_REASON_HEPARIN_NOT_PAUSED = 51 # Heparin cannot be resumed if not paused REQUEST_REJECT_REASON_HEPARIN_VOLUME_EXCEEDS_10_ML = 52 # Heparin volume needed for treatment exceeds 10 mL maximum. REQUEST_REJECT_REASON_PARAM_NOT_APPLICABLE = 53 # Treatment parameter not applicable for current treatment modality type REQUEST_REJECT_REASON_ACID_CONV_FACTOR_MISMATCH = 54 # Acid conversion factor from UI mismatch with FW REQUEST_REJECT_REASON_INVALID_PATIENT_WEIGHTS = 55 # Patient pre and estimated target weights are invalid REQUEST_REJECT_REASON_UF_VOL_AND_WEIGHTS_INCONSISTENT = 56 # UF volume and the patient weights are not consistent REQUEST_REJECT_REASON_TD_AUTHENTICATION_INVALID = 57 # TD authentication invalid REQUEST_REJECT_REASON_CONFIRMATION_NOT_EXPECTED = 58 # Confirmation received without prior validation REQUEST_REJECT_REASON_CONFIRMATION_MISMATCH = 59 # Confirmed value does not match validated value REQUEST_REJECT_REASON_INVALID_TREATMENT_SUB_STATE = 60 # Request is not allowed in current treatment sub-state REQUEST_REJECT_REASON_MODALITY_MISMATCH = 61 # Mismatched modality (Rx entered vs reatment initiation modality ) NUM_OF_REQUEST_REJECT_REASONS = 62 # Number of settings change reject codes RequestRejectReasons._str_list = { } ACK_NOT_REQUIRED = [ ]