Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r6d7a81af8acbaaf3ee3f722ccace021634507cb4 -r1da0c41020664b642359f3cd5d58a2fdc36774a2 --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 6d7a81af8acbaaf3ee3f722ccace021634507cb4) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 1da0c41020664b642359f3cd5d58a2fdc36774a2) @@ -139,7 +139,7 @@ ID_Heparin = 0x8C00, // 140 ID_IsolatedUF = 0x9A00, // 154 ID_Rinseback = 0x8F00, // 143 //// ----- @LEAHIZED - ID_Recirculate = 0x5A00, // 90 + ID_Recirculate = 0xA800, // 168 ID_BloodPrime = 0x9700, // 151 ID_TreatmentStop = 0x4900, // 73 ID_Vitals = 0x6500, // 101 @@ -305,8 +305,8 @@ ID_AdjustRinsebackRsp = 0x9100, // 145 //// ----- @LEAHIZED // Recirculate - ID_AdjustRecirculateReq = 0x540F, // 84 //// ----- @CRAPIZED: had to change to avoid duplication - ID_AdjustRecirculateRsp = 0x5500, // 85 + ID_AdjustRecirculateReq = 0xA600, // 166 + ID_AdjustRecirculateRsp = 0xA700, // 167 // Treatment End ID_AdjustTreatmentEndReq = 0x8D00, // 141 Index: sources/gui/qml/pages/TreatmentFlowBase.qml =================================================================== diff -u -r4a2b83dcb56555861d2c741a8e8894e5b07e24bf -r1da0c41020664b642359f3cd5d58a2fdc36774a2 --- sources/gui/qml/pages/TreatmentFlowBase.qml (.../TreatmentFlowBase.qml) (revision 4a2b83dcb56555861d2c741a8e8894e5b07e24bf) +++ sources/gui/qml/pages/TreatmentFlowBase.qml (.../TreatmentFlowBase.qml) (revision 1da0c41020664b642359f3cd5d58a2fdc36774a2) @@ -112,13 +112,15 @@ active : _root.instructionBased anchors { top : title.visible ? title.bottom : title.top - bottom : footer.top +// bottom : footer.top + bottom : parent.bottom left : parent.left right : parent.right leftMargin : _root.sideMargins rightMargin : _root.sideMargins topMargin : outerVMargin - bottomMargin : outerVMargin +// bottomMargin : outerVMargin + bottomMargin : Variables.notificationHeight + Variables.minVGap } sourceComponent : InstructionView { id: _instructionView title : _root.instructionTitle @@ -165,7 +167,10 @@ // ^^^^^^^^^^^^^^^^^^^^ Optional Components ^^^^^^^^^^^^^^^^^^^^ // - Footer { id: _footer } + Footer { id: _footer + anchors.bottomMargin: Variables.notificationHeight * 2 + anchors.horizontalCenter: _root.horizontalCenter + } NotificationBarSmall { id: _information visible : text Index: sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml =================================================================== diff -u -r43ae56f762e6f3e1416d39e3d16f9103fc597e41 -r1da0c41020664b642359f3cd5d58a2fdc36774a2 --- sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml (.../EndTreatmentRecirculateStack.qml) (revision 43ae56f762e6f3e1416d39e3d16f9103fc597e41) +++ sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml (.../EndTreatmentRecirculateStack.qml) (revision 1da0c41020664b642359f3cd5d58a2fdc36774a2) @@ -34,38 +34,50 @@ signal reconnectClicked () signal confirmDisconnectClicked () signal confirmReconnectClicked () - signal recirculateBackClicked () +// signal recirculateResumeClicked() signal treatmentEndClicked () - 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 + onReconnectClicked : vTreatmentAdjustmentRecirculate.doReconnect () //84.0 ///< User requests to re-connect to system (stop re-circulating, clamp arterial and venous lines) + onConfirmReconnectClicked : vTreatmentAdjustmentRecirculate.doConfirmReconnect () //84.1 ///< User confirms patient connected, lines un-shunted to return to treatment +// onRecirculateResumeClicked : vTreatmentAdjustmentRecirculate.doResume () //84.2 ///< User requests to resume re-circulation + onTreatmentEndClicked : vTreatmentAdjustmentRecirculate.doTreatmentEnd () //84.3 ///< User requests to end treatment + onConfirmDisconnectClicked : vTreatmentAdjustmentRecirculate.doConfirmDisconnect () //84.4 ///< User confirms patient disconnected, lines shunted to begin re-circulation 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). - component ButtonBackToRecirculate : TouchRect { - text.text : qsTr("BACK TO RECIRCULATE") - onClicked : recirculateBackClicked() + onVisibleChanged: { + if (visible) { + _headerBar.titleText = stackView.currentItem.headerTitle ?? "" + } + else { + _headerBar.titleText = "" + } } component ButtonEndTreatment : TouchRect { - visible : treatmentTimeLeft - text.text : qsTr("END TREATMENT") + text.text : qsTr("End Treatment") + height : Variables.defaultButtonHeight + textColor : borderColor onClicked : treatmentEndClicked() } - component ButtonReconnect : TouchRect { - text.text : qsTr("RESUME TREATMENT") + component ButtonStartRecirculate : TouchRect { + visible : treatmentTimeLeft + text.text : qsTr("Start Recirculation") isDefault : true - onClicked : reconnectClicked() + height : Variables.defaultButtonHeight + onClicked : confirmDisconnectClicked() } + component ButtonResume : TouchRect { + text.text : qsTr("Resume Treatment") + isDefault : true + height : Variables.defaultButtonHeight + } + component RecirculateBase : EndTreatmentBase { - property alias footerButtons : _footer.children property bool confirmVisible : false header.confirmVisible : confirmVisible @@ -74,66 +86,52 @@ timeoutValue : timeoutCountdown footer { - width : parent.width - height : Variables.touchRectHeight + width : parent.width / 2 + height : Variables.defaultButtonHeight + childrenWidth : Variables.defaultButtonWidth } - - FooterStatic { id: _footer - childrenWidth : 300 - anchors.fill : parent.footer - } } // Disconnect RecirculateBase { id: _recirculateDisconnect - title.text : qsTr("Recirculate Disconnect") - confirmVisible : true - onConfirmClicked : confirmDisconnectClicked() - footerButtons : [ + headerTitle : qsTr("Recirculate Set Up") + footer.children : [ ButtonEndTreatment {}, - Item {}, // button placeholder to align the buttons - Item {} // button placeholder to align the buttons + ButtonStartRecirculate {} + ] } // Recirculate RecirculateBase { id: _recirculateRecirculate - title.text : qsTr("Recirculate") - footerButtons : [ - ButtonEndTreatment {}, - ButtonReconnect {}, - Item {} // button placeholder to align the buttons + headerTitle : qsTr("Recirculate In Progress") + instructionBased : false + footer.children : [ + ButtonEndTreatment { textColor: Colors.offWhite }, + ButtonResume { onClicked: reconnectClicked() } /// doReconnect ] } - // Stopped - RecirculateBase { id: _recirculateStopped - title.text : qsTr("Recirculate Stopped") - footerButtons : [ - ButtonEndTreatment {}, - ButtonBackToRecirculate {}, - Item {} // button placeholder to align the buttons - - ] - } - // Reconnect RecirculateBase { id: _recirculateReconnect - title.text : qsTr("Recirculate Reconnect") - confirmVisible : true - onConfirmClicked : confirmReconnectClicked() - footerButtons : [ - ButtonEndTreatment {}, - ButtonBackToRecirculate {}, - Item {} // button placeholder to align the buttons + headerTitle : qsTr("Reconnect To Patient") + footer.children : [ + ButtonEndTreatment { }, + ButtonResume { onClicked: confirmReconnectClicked() } // /doConfirmReconnect ] } + Connections { target: stackView + function onCurrentItemChanged() { + _headerBar.titleText = stackView.currentItem.headerTitle ?? "" + } + } + Connections { target: vTDTreatmentStates - function onRcDisconnectChanged ( vValue ) { page( _recirculateDisconnect , vValue )} - function onRcStartedChanged ( vValue ) { page( _recirculateRecirculate , vValue )} - function onRcStoppedChanged ( vValue ) { page( _recirculateStopped , vValue )} - function onRcReconnectChanged ( vValue ) { page( _recirculateReconnect , vValue )} + function onRcDisconnectChanged ( vValue ) { page( _recirculateDisconnect , vValue )} // set up + function onRcStartedChanged ( vValue ) { page( _recirculateRecirculate , vValue )} // in progress +// function onRcStoppedChanged ( vValue ) { page( _recirculateStopped , vValue )} // complete + function onRcReconnectChanged ( vValue ) { page( _recirculateReconnect , vValue )} // disconnect } Connections { target: vTreatmentAdjustmentRecirculate @@ -144,7 +142,7 @@ // and let them cleared for their own message when each get visible. _recirculateDisconnect .reasonText = vTreatmentAdjustmentRecirculate.text(); _recirculateRecirculate .reasonText = vTreatmentAdjustmentRecirculate.text(); - _recirculateStopped .reasonText = vTreatmentAdjustmentRecirculate.text(); +// _recirculateStopped .reasonText = vTreatmentAdjustmentRecirculate.text(); _recirculateReconnect .reasonText = vTreatmentAdjustmentRecirculate.text(); } } Index: sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml =================================================================== diff -u -r4da79084388ac25822ab24fb52ec1ca4083b50cc -r1da0c41020664b642359f3cd5d58a2fdc36774a2 --- sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml (.../EndTreatmentRinsebackInit.qml) (revision 4da79084388ac25822ab24fb52ec1ca4083b50cc) +++ sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml (.../EndTreatmentRinsebackInit.qml) (revision 1da0c41020664b642359f3cd5d58a2fdc36774a2) @@ -37,13 +37,10 @@ hasTimeout : vTreatmentRinseback .timeoutTotal timeoutValue : vTreatmentRinseback .timeoutCountDown * 60 + footer.children : [_beginRinsebackTouchRect] + footer.childrenWidth: Variables.defaultButtonWidth + TouchRect { id : _beginRinsebackTouchRect - anchors { - bottom : _root.bottom - bottomMargin : Variables.notificationHeight * 2 - horizontalCenter: _root.horizontalCenter - } - width : Variables.defaultButtonWidth height : Variables.defaultButtonHeight isDefault : true textString : qsTr("Start Blood Return") Fisheye: Tag 1da0c41020664b642359f3cd5d58a2fdc36774a2 refers to a dead (removed) revision in file `sources/model/hd/adjustment/treatment/MTreatmentAdjustRecirculateResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1da0c41020664b642359f3cd5d58a2fdc36774a2 refers to a dead (removed) revision in file `sources/model/hd/adjustment/treatment/MTreatmentAdjustRecirculateResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h =================================================================== diff -u -rf723048b0efe2edf7cb08b9bba2ef67c55917503 -r1da0c41020664b642359f3cd5d58a2fdc36774a2 --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision f723048b0efe2edf7cb08b9bba2ef67c55917503) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 1da0c41020664b642359f3cd5d58a2fdc36774a2) @@ -653,7 +653,7 @@ * * | MSG | CAN ID | Type | Ack | Src | Dest | Description | * |:----:|:------:|:----:|:---:|:---:|:----:|:---------------: | - * |0x5400| 0x100 | Req | Y | UI | HD | Recirculate Request | + * |0xA600| 0x100 | Req | Y | UI | TD | Recirculate Request | * * | Payload || * | || Index: sources/model/hd/data/treatment/MTreatmentRecirculateData.h =================================================================== diff -u -ra58f91b077c8131bea3dbde0fc338adb113fc9f3 -r1da0c41020664b642359f3cd5d58a2fdc36774a2 --- sources/model/hd/data/treatment/MTreatmentRecirculateData.h (.../MTreatmentRecirculateData.h) (revision a58f91b077c8131bea3dbde0fc338adb113fc9f3) +++ sources/model/hd/data/treatment/MTreatmentRecirculateData.h (.../MTreatmentRecirculateData.h) (revision 1da0c41020664b642359f3cd5d58a2fdc36774a2) @@ -32,7 +32,7 @@ * * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | - * |0x5A00| 0x020 | 6 | 1 Hz | N | HD | UI | Recirculate Progress Data | + * |0xA800| 0x020 | 6 | 1 Hz | N | HD | UI | Recirculate Progress Data | * * | Payload || * | || Index: sources/model/td/adjustment/treatment/MTreatmentAdjustRecirculateResponse.cpp =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustRecirculateResponse.cpp (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustRecirculateResponse.cpp (revision 1da0c41020664b642359f3cd5d58a2fdc36774a2) @@ -0,0 +1,49 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * 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 MTreatmentAdjustRecirculateResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "MTreatmentAdjustRecirculateResponse.h" + +using namespace Model; + +QVariantList MAdjustRecirculateResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustRecirculateResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if ( ! GetValue(vByteArray, index, _data.mAccepted )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mReason )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MAdjustRecirculateResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustRecirculateResponseData MAdjustRecirculateResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/td/adjustment/treatment/MTreatmentAdjustRecirculateResponse.h =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustRecirculateResponse.h (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustRecirculateResponse.h (revision 1da0c41020664b642359f3cd5d58a2fdc36774a2) @@ -0,0 +1,84 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * 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 MTreatmentAdjustRecirculateResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustRecirculateResponse class + * \details The Recirculate adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:----------------: | + * |0xA700| 0x020 | 6 | Rsp | Y | HD | UI | Recirculate Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustRecirculateReq : Recirculate Request + * \sa MTreatmentRecirculate : Recirculate Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | td | + * | infoText | AdjustRecirculate | + * + */ +class MAdjustRecirculateResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted; + Types::U32 mReason ; + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eTD ; } + QString infoText () const override { return QString("AdjustRecirculate") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustRecirculateResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustRecirculateResponse::Data AdjustRecirculateResponseData; Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.h =================================================================== diff -u -ra58f91b077c8131bea3dbde0fc338adb113fc9f3 -r1da0c41020664b642359f3cd5d58a2fdc36774a2 --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.h (.../VTreatmentAdjustmentRecirculate.h) (revision a58f91b077c8131bea3dbde0fc338adb113fc9f3) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.h (.../VTreatmentAdjustmentRecirculate.h) (revision 1da0c41020664b642359f3cd5d58a2fdc36774a2) @@ -50,10 +50,6 @@ void doAdjustment(const GuiRecirculateCommands &vRequestedState); public slots: - - - - 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