Index: sources/view/hd/data/VHDTreatmentStatesData.h =================================================================== diff -u -rae1042a0c14d6d27556730183cc2cbe1a00bc0a7 -r2cee3c28bf7565eeb55dcb033961fe6962f11d16 --- sources/view/hd/data/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision ae1042a0c14d6d27556730183cc2cbe1a00bc0a7) +++ sources/view/hd/data/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision 2cee3c28bf7565eeb55dcb033961fe6962f11d16) @@ -5,11 +5,11 @@ * 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 VHDTreatmentStatesData.h - * \author (last) Behrouz NematiPour - * \date (last) 08-Sep-2020 - * \author (original) Behrouz NematiPour - * \date (original) 13-Aug-2020 + * \file VHDTreatmentStatesData.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 13-Aug-2020 * */ #pragma once @@ -47,66 +47,75 @@ PROPERTY( quint32, salineState , 0) // coco end - // these properties are mutually exclusive + // these groups of properties are mutually exclusive // and if one becomes true the other ones become false at the same time // so on each change we were going to have multiple signal emits. // but since it is not happening more often Property is used. // otherwise it should be implemented as a single signal with these properties as parameters.\n // also start UF_START_STATE should not be used often // because it's only useful in FW implementation and it immediately changes to another state. + + // ---- Treatment states + // ---- Treatment states - Basics + // coco begin validated: Manually tested + // not used yet since the Treatment Start/stop/end has not been implemented yet. + PROPERTY( bool , txStart , false) ///< TREATMENT_START_STATE = 0 # Start treatment - initialize treatment and go to blood prime state + PROPERTY( bool , txBloodPrime , false) ///< TREATMENT_BLOOD_PRIME_STATE = 1 # Prime blood-side of dialyzer with gradual ramp for 1 min. while dialyzer is bypassed. No dialysis or UF taking place. No treatment time. + PROPERTY( bool , txDialysis , false) ///< TREATMENT_DIALYSIS_STATE = 2 # Perform dialysis. Deliver Heparin as prescribed. Deliver UF as prescribed. Handle saline boluses as requested + PROPERTY( bool , txStop , false) ///< TREATMENT_STOP_STATE = 3 # Treatment stopped. All pumps off. Dializer bypassed + PROPERTY( bool , txRinseback , false) ///< TREATMENT_RINSEBACK_STATE = 4 # Perform rinseback with saline. Dialyzer bypassed. Dialysate recirculating + PROPERTY( bool , txRecirculate , false) ///< TREATMENT_RECIRC_STATE = 5 # Recirculate saline and dialysate while patient disconnected. Blood lines open and shunted. Dialyzer is bypassed + PROPERTY( bool , txEnd , false) ///< TREATMENT_END_STATE = 6 # Dialysis has ended. Blood pump slowed. Dialyzer is bypassed. Dialysate is recirculated. User can rinseback + // coco end + // ---- Ultrafiltration states // coco begin validated: Manually tested // not useful for UI more FW state entry // kept for consistency - PROPERTY( bool , ufStart , false) ///< UF_START_STATE Start state of the ultrafiltration state machine + PROPERTY( bool , ufStart , false) ///< UF_START_STATE = 0 # Start state of the ultrafiltration state machine // coco end - PROPERTY( bool , ufPaused , false) ///< UF_PAUSED_STATE Paused state of the ultrafiltration state machine - PROPERTY( bool , ufRunning , false) ///< UF_RUNNING_STATE Running state of the ultrafiltration state machine - PROPERTY( bool , ufOff , true ) ///< UF_OFF_STATE Completed/off state of the ultrafiltration state machine (default state) - PROPERTY( bool , ufCompleted , false) ///< UF_COMPLETED_STATE Completed state of ultrafiltration state machine + PROPERTY( bool , ufPaused , false) ///< UF_PAUSED_STATE = 1 # Paused state of the ultrafiltration state machine + PROPERTY( bool , ufRunning , false) ///< UF_RUNNING_STATE = 2 # Running state of the ultrafiltration state machine + PROPERTY( bool , ufOff , true ) ///< UF_OFF_STATE = 3 # Completed/off state of the ultrafiltration state machine + PROPERTY( bool , ufCompleted , false) ///< UF_COMPLETED_STATE = 4 # Completed state of ultrafiltration state machine // ---- Saline Bolus states - PROPERTY( bool , sbIdle , true ) ///< SALINE_BOLUS_STATE_IDLE No saline bolus delivery is in progress (default state) - PROPERTY( bool , sbWaitPump , false) ///< SALINE_BOLUS_STATE_WAIT_FOR_PUMPS_STOP Wait for pumps to stop before starting bolus - PROPERTY( bool , sbRunning , false) ///< SALINE_BOLUS_STATE_IN_PROGRESS A saline bolus delivery is in progress - PROPERTY( bool , sbMaxReached , false) ///< SALINE_BOLUS_STATE_MAX_DELIVERED Maximum saline bolus volume reached - no more saline bolus deliveries allowed + PROPERTY( bool , sbIdle , true ) ///< SALINE_BOLUS_STATE_IDLE = 0 # No saline bolus delivery is in progress + PROPERTY( bool , sbWaitPump , false) ///< SALINE_BOLUS_STATE_WAIT_FOR_PUMPS_STOP = 1 # Wait for pumps to stop before starting bolus + PROPERTY( bool , sbRunning , false) ///< SALINE_BOLUS_STATE_IN_PROGRESS = 2 # A saline bolus delivery is in progress + PROPERTY( bool , sbMaxReached , false) ///< SALINE_BOLUS_STATE_MAX_DELIVERED = 3 # Maximum saline bolus volume reached - no more saline bolus deliveries allowed // ---- Heparin states - PROPERTY( bool , hpOff , true ) ///< No heparin delivery is in progress - PROPERTY( bool , hpPaused , false) ///< Heparin delivery paused - PROPERTY( bool , hpInitial_bolus , false) ///< Initial heparin bolus delivery in progress - PROPERTY( bool , hpDispensing , false) ///< Gradual heparin dispensing in progress - PROPERTY( bool , hpCompleted , false) ///< Heparin delivery stopped due to the set stop time before treatment end - PROPERTY( bool , hpEmpty , false) ///< Heparin Syringe empty + PROPERTY( bool , hpOff , true ) ///< HEPARIN_STATE_OFF = 0 # No heparin delivery is in progress + PROPERTY( bool , hpPaused , false) ///< HEPARIN_STATE_PAUSED = 1 # Heparin delivery paused + PROPERTY( bool , hpInitial_bolus , false) ///< HEPARIN_STATE_INITIAL_BOLUS = 2 # Initial heparin bolus delivery in progress + PROPERTY( bool , hpDispensing , false) ///< HEPARIN_STATE_DISPENSING = 3 # Gradual heparin dispensing in progress + PROPERTY( bool , hpCompleted , false) ///< HEPARIN_STATE_COMPLETED = 4 # Heparin delivery stopped due to the set stop time before treatment end + PROPERTY( bool , hpEmpty , false) ///< HEPARIN_STATE_EMPTY = 5 # Heparin Syringe empty - // ---- Treatment states - // ---- Treatment states - Basics - // coco begin validated: Manually tested - // not used yet since the Treatment Start/stop/end has not been implemented yet. - PROPERTY( bool , txStart , false) ///< TREATMENT_START_STATE Start treatment, prime blood side with gradual ramp for 1 min. while dialyzer is bypassed. No dialysis or UF taking place - PROPERTY( bool , txStop , false) ///< TREATMENT_STOP_STATE Treatment stopped. All pumps off. Dializer bypassed - PROPERTY( bool , txEnd , false) ///< TREATMENT_END_STATE Treatment has ended. All pumps off. Dialyzer is bypassed. Blood lines are closed. User to disconnect - // coco end + // Rinseback States + PROPERTY( bool , rbInit , true ) ///< RINSEBACK_STOP_INIT_STATE = 0 # Start state (stopped) of the rinseback sub-mode state machine + PROPERTY( bool , rbRun , false) ///< RINSEBACK_RUN_STATE = 1 # Rinseback running state of the rinseback sub-mode state machine + PROPERTY( bool , rbPaused , false) ///< RINSEBACK_PAUSED_STATE = 2 # Rinseback paused state of the rinseback sub-mode state machine + PROPERTY( bool , rbStop , false) ///< RINSEBACK_STOP_STATE = 3 # Rinseback stopped (done) state of the rinseback sub-mode state machine + PROPERTY( bool , rbAdditional , false) ///< RINSEBACK_RUN_ADDITIONAL_STATE = 4 # Additional rinseback volume (10 mL) state of the rinseback sub-mode state machine - // ---- Treatment states - Dialysis - PROPERTY( bool , txDialysis_Running , false) ///< TREATMENT_DIALYSIS_STATE Perform dialysis. Deliver Heparin as prescribed. Deliver UF as prescribed. Handle saline boluses as requested - // coco begin validated: Manually tested - // not used yet since the Treatment Start/stop/end has not been implemented yet. - PROPERTY( bool , txDialysis_End , false) ///< TREATMENT_DIALYSIS_END_STATE Dialysis has ended. Blood pump slowed. Dialyzer is bypassed. Dialysate is recirculated. User can rinseback - // coco end - // ---- Treatment states - Rinse back - // coco begin validated: Manually tested - // not used yet since the rinse back and recirculate has not bin implemented yet. - PROPERTY( bool , txRinseback_Running , false) ///< TREATMENT_RINSEBACK_STATE Perform rinseback with saline. Dialyzer bypassed. Dialysate recirculating - PROPERTY( bool , txRinseback_Pause , false) ///< TREATMENT_RINSEBACK_PAUSE_STATE Rinseback paused. Blood pump off. Dialyzer bypassed. Dialysate recirculating - // ---- Treatment states - Recirculate - PROPERTY( bool , txRecirculate_Setup , false) ///< TREATMENT_RECIRC_SETUP_STATE Rinseback complete. Blood pump off. Blood lines closed. User to disconnect and shunt blood lines - PROPERTY( bool , txRecirculate_Running , false) ///< TREATMENT_RECIRC_STATE Recirculate saline and dialysate while patient disconnected. Blood lines open and shunted. Dialyzer is bypassed - PROPERTY( bool , txRecirculate_Pause , false) ///< TREATMENT_RECIRC_PAUSE_STATE Recirculate paused. Blood pump off. Blood lines closed and shunted. Dialyzer is bypassed - PROPERTY( bool , txRecirculate_Stop , false) ///< TREATMENT_RECIRC_STOP_STATE Recirculate stopped. Blood pump off. Blood lines open. Waiting for patient to unshunt and connect and resume treatment - // coco end + // Recirculate states + PROPERTY( bool , rcStarted , true ) ///< TREATMENT_RECIRC_RECIRC_STATE = 0 # Re-circulate state of the treatment re-circulate sub-mode state machine + PROPERTY( bool , rcStopped , false) ///< TREATMENT_RECIRC_STOPPED_STATE = 1 # Stopped state of the treatment re-circulate sub-mode state machine + // Blood Prime + PROPERTY( bool , bpRamp , true ) ///< BLOOD_PRIME_RAMP_STATE = 0 # Ramp state of the blood prime sub-mode state machine + + // Treatment End + PROPERTY( bool , teWaitRinseback , true ) ///< TREATMENT_END_WAIT_FOR_RINSEBACK_STATE = 0 # Wait for rinseback state of the treatment end sub-mode state machine + PROPERTY( bool , tePaused , false) ///< TREATMENT_END_PAUSED_STATE = 1 # Paused state of the treatment end sub-mode state machine + + // Treatment Stop + PROPERTY( bool , tsRecirculate , true ) ///< TREATMENT_STOP_RECIRC_STATE = 0 # Dialysate re-circulation state of the treatment stop sub-mode state machine + PROPERTY( bool , tsRecirculateNo , false) ///< TREATMENT_STOP_NO_RECIRC_STATE = 1 # No dialysate re-circulation state of the treatment stop sub-mode state machine + // class definition VIEW_DEC_CLASS(VHDTreatmentStates) @@ -115,7 +124,5 @@ VIEW_DEC_SLOT (AdjustUltrafiltrationStateResponseData ) // Ultrafiltration state Adjustment response message VIEW_DEC_SLOT (AdjustSalineResponseData ) // Saline Bolus Adjustment response message VIEW_DEC_SLOT (AdjustHeparinResponseData ) // Heparin Adjustment response message - -public slots: }; }