Index: sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r9667ff80660933cb89207a510c4fb111148181d4 --- sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml (.../EndTreatmentRecirculateStack.qml) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml (.../EndTreatmentRecirculateStack.qml) (revision 9667ff80660933cb89207a510c4fb111148181d4) @@ -25,88 +25,114 @@ * \brief the end treatment recirculate stack screen */ StackItem { id: _root - objectName: "_EndTreatmentRecirculateStack" + objectName: "_recirculateRecirculateStack" stackView.initialItem : null property int stackStepIndex : 0 signal reconnectClicked () - signal recirculateConfirmClicked() + signal confirmDisconnectClicked () + signal confirmReconnectClicked () signal recirculateBackClicked () signal treatmentEndClicked () - onReconnectClicked : vTreatmentAdjustmentRecirculate.doReconnect () //84.0 - onRecirculateConfirmClicked : vTreatmentAdjustmentRecirculate.doConfirm () //84.1 - onRecirculateBackClicked : vTreatmentAdjustmentRecirculate.doResume () //84.2 - onTreatmentEndClicked : vTreatmentAdjustmentRecirculate.doTreatmentEnd () //84.3 + onReconnectClicked : vTreatmentAdjustmentRecirculate.doReconnect () //84.0 + onConfirmReconnectClicked : vTreatmentAdjustmentRecirculate.doConfirmReconnect () //84.1 + onRecirculateBackClicked : vTreatmentAdjustmentRecirculate.doResume () //84.2 + onTreatmentEndClicked : vTreatmentAdjustmentRecirculate.doTreatmentEnd () //84.3 + onConfirmDisconnectClicked : vTreatmentAdjustmentRecirculate.doConfirmDisconnect () //84.4 - // Recirculate - EndTreatmentBase { id : _endTreatmentRecirculate - title.text : qsTr("Recirculate") - instructionBased : true - hasTimeout : vTreatmentRecirculate .timeoutTotal - timeoutValue : vTreatmentRecirculate .timeoutCountDown * 60 + readonly property bool timeoutTotal : vTreatmentRecirculate .timeoutTotal + readonly property int timeoutCountdown : vTreatmentRecirculate .timeoutCountDown * 60 + readonly property bool treatmentTimeLeft : true // vTreatmentTime .time_IsLeft // regarding the conversation with Sean (04/23/2023). - footer { - width : parent.width - height : Variables.touchRectHeight - } + component ButtonBackToRecirculate : TouchRect { + text.text : qsTr("BACK TO RECIRCULATE") + onClicked : recirculateBackClicked() + } - FooterStatic { - childrenWidth : 300 - anchors.fill : parent.footer - children : [ - Item { }, - TouchRect { - text.text : qsTr("RECONNECT") - isDefault : true - onClicked : reconnectClicked() - }, - TouchRect { - visible : vTreatmentTime .time_IsLeft - text.text : qsTr("END TREATMENT") - onClicked : treatmentEndClicked() - } - ] - } + component ButtonEndTreatment : TouchRect { + visible : treatmentTimeLeft + text.text : qsTr("END TREATMENT") + onClicked : treatmentEndClicked() } - EndTreatmentBase { id : _endTreatmentReconnect - title.text : qsTr("Reconnect") - instructionBased : true - header.confirmVisible : vTreatmentTime .time_IsLeft - hasTimeout : vTreatmentRecirculate .timeoutTotal - timeoutValue : vTreatmentRecirculate .timeoutCountDown * 60 - onConfirmClicked : recirculateConfirmClicked() + component ButtonReconnect : TouchRect { + text.text : qsTr("RECONNECT") + isDefault : true + onClicked : reconnectClicked() + } + component RecirculateBase : EndTreatmentBase { + property alias footerButtons : _footer.children + property bool confirmVisible : false + + header.confirmVisible : confirmVisible + instructionBased : true + hasTimeout : timeoutTotal + timeoutValue : timeoutCountdown + footer { - width : parent.width - height : Variables.touchRectHeight + width : parent.width + height : Variables.touchRectHeight } - FooterStatic { - childrenWidth : 300 - anchors.fill : parent.footer - children : [ - Item { }, - TouchRect { - visible : vTreatmentTime .time_IsLeft - text.text : qsTr("BACK TO RECIRCULATE") - onClicked : recirculateBackClicked() - }, - TouchRect { - visible : vTreatmentTime .time_IsLeft - text.text : qsTr("END TREATMENT") - onClicked : treatmentEndClicked() - } - ] + FooterStatic { id: _footer + childrenWidth : 300 + anchors.fill : parent.footer } } + // Disconnect + RecirculateBase { id: _recirculateDisconnect + title.text : qsTr("Recirculate Disconnect") + confirmVisible : true + onConfirmClicked : confirmDisconnectClicked() + footerButtons : [ + Item {}, // button placeholder to align the buttons + Item {}, // button placeholder to align the buttons + ButtonEndTreatment {} + ] + } + + // Recirculate + RecirculateBase { id: _recirculateRecirculate + title.text : qsTr("Recirculate") + footerButtons : [ + Item {}, // button placeholder to align the buttons + ButtonReconnect {}, + ButtonEndTreatment {} + ] + } + + // Stopped + RecirculateBase { id: _recirculateStopped + title.text : qsTr("Recirculate Stopped") + footerButtons : [ + Item {}, // button placeholder to align the buttons + ButtonBackToRecirculate {}, + ButtonEndTreatment {} + ] + } + + // Reconnect + RecirculateBase { id: _recirculateReconnect + title.text : qsTr("Recirculate Reconnect") + confirmVisible : true + onConfirmClicked : confirmReconnectClicked() + footerButtons : [ + Item {}, // button placeholder to align the buttons + ButtonBackToRecirculate {}, + ButtonEndTreatment {} + ] + } + Connections { target: vHDTreatmentStates - function onRcStartedChanged ( vValue ) { page( _endTreatmentRecirculate , vValue )} - function onRcStoppedChanged ( vValue ) { page( _endTreatmentReconnect , vValue )} + function onRcDisconnectChanged ( vValue ) { page( _recirculateDisconnect , vValue )} + function onRcStartedChanged ( vValue ) { page( _recirculateRecirculate , vValue )} + function onRcStoppedChanged ( vValue ) { page( _recirculateStopped , vValue )} + function onRcReconnectChanged ( vValue ) { page( _recirculateReconnect , vValue )} } Connections { target: vTreatmentAdjustmentRecirculate @@ -115,8 +141,10 @@ // since the rejection reason will be cleared by each trasition // so it's fine to set all at the same time // and let them cleared for their own message when each get visible. - _endTreatmentRecirculate .reasonText = vTreatmentAdjustmentRecirculate.text(); - _endTreatmentReconnect .reasonText = vTreatmentAdjustmentRecirculate.text(); + _recirculateDisconnect .reasonText = vTreatmentAdjustmentRecirculate.text(); + _recirculateRecirculate .reasonText = vTreatmentAdjustmentRecirculate.text(); + _recirculateStopped .reasonText = vTreatmentAdjustmentRecirculate.text(); + _recirculateReconnect .reasonText = vTreatmentAdjustmentRecirculate.text(); } } } Index: sources/gui/qml/pages/settings/SettingsStack.qml =================================================================== diff -u -r6d76149dca70e879f33bf6ed44203d0d06bc523a -r9667ff80660933cb89207a510c4fb111148181d4 --- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 6d76149dca70e879f33bf6ed44203d0d06bc523a) +++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 9667ff80660933cb89207a510c4fb111148181d4) @@ -68,7 +68,7 @@ qsTr("Water Input Mode" ), // RoInput qsTr("Set Language" ), // Language qsTr("Calibration " ), // Calibration - qsTr("Device Registeration" ), // DeviceRegistration + qsTr("Device Registration" ), // DeviceRegistration qsTr("Software Update" ), // SWUpdate qsTr("Factory Reset" ), // FactoryReset ] Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.cpp =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r9667ff80660933cb89207a510c4fb111148181d4 --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.cpp (.../VTreatmentAdjustmentRecirculate.cpp) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.cpp (.../VTreatmentAdjustmentRecirculate.cpp) (revision 9667ff80660933cb89207a510c4fb111148181d4) @@ -48,30 +48,38 @@ * \brief View::VTreatmentAdjustmentRecirculate::doReconnect * \details User requests to re-connect to system (stop re-circulating, clamp arterial and venous lines) */ -void View::VTreatmentAdjustmentRecirculate::doReconnect() { - doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_RECONNECT ); +void View::VTreatmentAdjustmentRecirculate::doReconnect () { // 0 + doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_RECONNECT ); } /*! - * \brief View::VTreatmentAdjustmentRecirculate::doConfirm + * \brief View::VTreatmentAdjustmentRecirculate::doConfirmReconnect * \details User confirms patient connected, lines un-shunted to return to treatment */ -void View::VTreatmentAdjustmentRecirculate::doConfirm() { - doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_CONFIRM_RECONNECT ); +void View::VTreatmentAdjustmentRecirculate::doConfirmReconnect () { // 1 + doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_CONFIRM_RECONNECT ); } /*! * \brief View::VTreatmentAdjustmentRecirculate::doResume * \details User requests to resume re-circulation */ -void View::VTreatmentAdjustmentRecirculate::doResume() { - doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_RESUME_RC ); +void View::VTreatmentAdjustmentRecirculate::doResume () { // 2 + doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_RESUME_RC ); } /*! * \brief View::VTreatmentAdjustmentRecirculate::doTreatmentEnd * \details User requests to end treatment */ -void View::VTreatmentAdjustmentRecirculate::doTreatmentEnd() { - doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_END_TREATMENT ); +void View::VTreatmentAdjustmentRecirculate::doTreatmentEnd () { // 3 + doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_END_TREATMENT ); } + +/*! + * \brief View::VTreatmentAdjustmentRecirculate::doConfirmDisconnect + * \details User confirms patient disconnected, lines shunted to begin re-circulation + */ +void View::VTreatmentAdjustmentRecirculate::doConfirmDisconnect () { // 4 + doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_CONFIRM_DISCONNECT ); +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.h =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r9667ff80660933cb89207a510c4fb111148181d4 --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.h (.../VTreatmentAdjustmentRecirculate.h) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.h (.../VTreatmentAdjustmentRecirculate.h) (revision 9667ff80660933cb89207a510c4fb111148181d4) @@ -53,11 +53,16 @@ void doAdjustment(const GuiRecirculateCommands &vRequestedState); public slots: - void doReconnect (); - void doConfirm (); - void doResume (); - void doTreatmentEnd (); + + + + void doReconnect (); // REQUESTED_USER_ACTION_TX_RECIRC_RECONNECT = 0, ///< User requests to re-connect to system (stop re-circulating, clamp arterial and venous lines) + void doConfirmReconnect (); // REQUESTED_USER_ACTION_TX_RECIRC_CONFIRM_RECONNECT = 1, ///< User confirms patient connected, lines un-shunted to return to treatment + void doResume (); // REQUESTED_USER_ACTION_TX_RECIRC_RESUME_RC = 2, ///< User requests to resume re-circulation + void doTreatmentEnd (); // REQUESTED_USER_ACTION_TX_RECIRC_END_TREATMENT = 3, ///< User requests to end treatment + void doConfirmDisconnect(); // REQUESTED_USER_ACTION_TX_RECIRC_CONFIRM_DISCONNECT = 4, ///< User confirms patient disconnected, lines shunted to begin re-circulation + signals: /*! * \brief didAdjustment Index: sources/view/hd/data/treatment/VHDTreatmentStatesData.cpp =================================================================== diff -u -r53b262fea2d4b5bd78ff878fda0848f3737e7b74 -r9667ff80660933cb89207a510c4fb111148181d4 --- sources/view/hd/data/treatment/VHDTreatmentStatesData.cpp (.../VHDTreatmentStatesData.cpp) (revision 53b262fea2d4b5bd78ff878fda0848f3737e7b74) +++ sources/view/hd/data/treatment/VHDTreatmentStatesData.cpp (.../VHDTreatmentStatesData.cpp) (revision 9667ff80660933cb89207a510c4fb111148181d4) @@ -163,11 +163,15 @@ bool mRecirculate = vData.mSubMode == GuiTreatmentStates ::TREATMENT_RECIRC_STATE ; if ( mRecirculate ) { ENUM_CHECK_O( GuiRecirculateStates, vData.mRecirculateState ) { + ENUM_CHECK ( GuiRecirculateStates, TREATMENT_RECIRC_DISCONNECT_PATIENT_STATE ) ENUM_CHECK ( GuiRecirculateStates, TREATMENT_RECIRC_RECIRC_STATE ) ENUM_CHECK ( GuiRecirculateStates, TREATMENT_RECIRC_STOPPED_STATE ) + ENUM_CHECK ( GuiRecirculateStates, TREATMENT_RECIRC_RECONNECT_PATIENT_STATE ) ENUM_CHECK_C( GuiRecirculateStates, NUM_OF_TREATMENT_RECIRC_STATES ) } + ENUM_READ ( GuiRecirculateStates, TREATMENT_RECIRC_DISCONNECT_PATIENT_STATE , rcDisconnect ); ENUM_READ ( GuiRecirculateStates, TREATMENT_RECIRC_RECIRC_STATE , rcStarted ); ENUM_READ ( GuiRecirculateStates, TREATMENT_RECIRC_STOPPED_STATE , rcStopped ); + ENUM_READ ( GuiRecirculateStates, TREATMENT_RECIRC_RECONNECT_PATIENT_STATE , rcReconnect ); } txRecirculate ( mRecirculate ); // it's the main recirculate even so moved last to have all the sub-recirculate-states updated prior to. Index: sources/view/hd/data/treatment/VHDTreatmentStatesData.h =================================================================== diff -u -r53b262fea2d4b5bd78ff878fda0848f3737e7b74 -r9667ff80660933cb89207a510c4fb111148181d4 --- sources/view/hd/data/treatment/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision 53b262fea2d4b5bd78ff878fda0848f3737e7b74) +++ sources/view/hd/data/treatment/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision 9667ff80660933cb89207a510c4fb111148181d4) @@ -103,8 +103,10 @@ PROPERTY( bool , rbAdditional , false) ///< RINSEBACK_RUN_ADDITIONAL_STATE = 4 # Additional rinseback volume (10 mL) state of the rinseback sub-mode state machine // 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 + PROPERTY( bool , rcDisconnect , true ) ///< TREATMENT_RECIRC_DISCONNECT_PATIENT_STATE = 0 # Disconnect patient state of the treatment re-circulate sub-mode state machine + PROPERTY( bool , rcStarted , false) ///< TREATMENT_RECIRC_RECIRC_STATE = 1 # Re-circulate Dialysate state of the treatment re-circulate sub-mode state machine + PROPERTY( bool , rcStopped , false) ///< TREATMENT_RECIRC_STOPPED_STATE = 2 # Stopped state of the treatment re-circulate sub-mode state machine + PROPERTY( bool , rcReconnect , false) ///< TREATMENT_RECIRC_RECONNECT_PATIENT_STATE = 3 # Reconnect patient 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