Index: leahi.pro =================================================================== diff -u -rea37bc16ab57586729e332c2a9df3299f91012ca -r660cad5ccb0fb2ad30703cb1cf33db1ea243d156 --- leahi.pro (.../leahi.pro) (revision ea37bc16ab57586729e332c2a9df3299f91012ca) +++ leahi.pro (.../leahi.pro) (revision 660cad5ccb0fb2ad30703cb1cf33db1ea243d156) @@ -189,6 +189,7 @@ sources/model/td/data/MTDTemperatureData.h \ sources/model/td/data/MTDValvesData.h \ sources/model/td/data/MTDVoltageData.h \ + sources/model/td/data/MWaterSampleData.h \ sources/model/td/data/treatment/MTreatmentBloodFlowData.h \ sources/model/td/data/treatment/MTreatmentBloodPrimeData.h \ sources/model/td/data/treatment/MTreatmentIsolatedUFData.h \ @@ -266,6 +267,7 @@ sources/view/td/data/VTDValvesData.h \ sources/view/td/data/VTDVoltageData.h \ sources/view/td/data/VTreatmentRanges.h \ + sources/view/td/data/VWaterSampleData.h \ \ # ---------- Views - TD - Data - In-Treatment sources/view/td/data/treatment/VTDTreatmentStatesData.h \ sources/view/td/data/treatment/VTreatmentBloodFlow.h \ @@ -300,6 +302,7 @@ \ # ---------- Views - TD - Adjustment - Pre-Treatment sources/view/td/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesConfirm.h \ sources/view/td/adjustment/pretreatment/VPreTreatmentAdjustmentStartTreatment.h \ + sources/view/td/adjustment/pretreatment/VPreTreatmentAdjustmentWaterSample.h \ \ # ---------- Views - TD - Adjustment - Post-Treatment sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.h \ sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h \ @@ -319,6 +322,7 @@ \ # ---------- Models - TD - Adjustment - Pre-Treatment sources/model/td/adjustment/pretreatment/MPreTreatmentAdjustDisposablesConfirmResponse.h \ sources/model/td/adjustment/pretreatment/MPreTreatmentAdjustStartTreatmentResponse.h \ + sources/model/td/adjustment/pretreatment/MPreTreatmentAdjustWaterSampleResponse.h \ \ # ---------- Models - TD - Adjustment - Post-Treatment sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustRequests.h \ sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.h \ @@ -359,7 +363,6 @@ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustRequests.h \ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustInitTreatmentResponse.h \ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustParametersValidationResponse.h \ - sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustWaterSampleResponse.h \ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustDisposablesPrimeResponse.h \ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionBeginResponse.h \ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustUltrafiltrationInitResponse.h \ @@ -455,7 +458,6 @@ sources/view/hd/adjustment/common/VCommonAdjustmentVitals.h \ \ # ---------- Views - HD - Adjustment - Pre-Treatment sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentInitTreatment.h \ - sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentWaterSample.h \ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentConsumablesConfirm.h \ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesPrime.h \ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionBegin.h \ @@ -554,6 +556,7 @@ sources/model/td/data/MTDTemperatureData.cpp \ sources/model/td/data/MTDValvesData.cpp \ sources/model/td/data/MTDVoltageData.cpp \ + sources/model/td/data/MWaterSampleData.cpp \ sources/model/td/data/treatment/MTreatmentBloodFlowData.cpp \ sources/model/td/data/treatment/MTreatmentBloodPrimeData.cpp \ sources/model/td/data/treatment/MTreatmentIsolatedUFData.cpp \ @@ -651,6 +654,7 @@ \ # ---------- Models - TD - Adjustment - Pre-Treatment sources/model/td/adjustment/pretreatment/MPreTreatmentAdjustDisposablesConfirmResponse.cpp \ sources/model/td/adjustment/pretreatment/MPreTreatmentAdjustStartTreatmentResponse.cpp \ + sources/model/td/adjustment/pretreatment/MPreTreatmentAdjustWaterSampleResponse.cpp \ \ # ---------- Models - TD - Adjustment - Post-Treatment sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.cpp \ sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp \ @@ -666,7 +670,6 @@ \ # ---------- Models - HD - Adjustment - Pre-Treatment sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustInitTreatmentResponse.cpp \ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustParametersValidationResponse.cpp \ - sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustWaterSampleResponse.cpp \ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustDisposablesPrimeResponse.cpp \ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionBeginResponse.cpp \ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustUltrafiltrationInitResponse.cpp \ @@ -744,6 +747,7 @@ sources/view/td/data/VTDValvesData.cpp \ sources/view/td/data/VTDVoltageData.cpp \ sources/view/td/data/VTreatmentRanges.cpp \ + sources/view/td/data/VWaterSampleData.cpp \ \ # ---------- Views - TD - Data - In-Treatment sources/view/td/data/treatment/VTDTreatmentStatesData.cpp \ sources/view/td/data/treatment/VTreatmentBloodFlow.cpp \ @@ -778,6 +782,7 @@ \ # ---------- Views - TD - Adjustment - Pre-Treatment sources/view/td/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesConfirm.cpp \ sources/view/td/adjustment/pretreatment/VPreTreatmentAdjustmentStartTreatment.cpp \ + sources/view/td/adjustment/pretreatment/VPreTreatmentAdjustmentWaterSample.cpp \ \ # ---------- Views - TD - Adjustment - Post-Treatment sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.cpp \ sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp \ @@ -810,7 +815,6 @@ sources/view/hd/adjustment/common/VCommonAdjustmentVitals.cpp \ \ # ---------- Views - HD - Adjustment - Pre-Treatment sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentInitTreatment.cpp \ - sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentWaterSample.cpp \ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentConsumablesConfirm.cpp \ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesPrime.cpp \ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionBegin.cpp \ Index: leahi.qrc =================================================================== diff -u -r14d7345260cdc47d8308da4fff127fbd97837fe4 -r660cad5ccb0fb2ad30703cb1cf33db1ea243d156 --- leahi.qrc (.../leahi.qrc) (revision 14d7345260cdc47d8308da4fff127fbd97837fe4) +++ leahi.qrc (.../leahi.qrc) (revision 660cad5ccb0fb2ad30703cb1cf33db1ea243d156) @@ -131,6 +131,9 @@ resources/images/recirculate_main.png resources/images/bloodpump.png resources/images/edit_yellow.png + resources/images/leahi-console.png + resources/images/moon.png + resources/images/sun.png sources/gui/qml/components/MainMenu.qml @@ -220,6 +223,7 @@ sources/gui/qml/compounds/SettingsSlider.qml sources/gui/qml/compounds/AutoStepController.qml sources/gui/qml/compounds/InteractiveImage.qml + sources/gui/qml/compounds/ProcessStatusView.qml qtquickcontrols2.conf @@ -342,5 +346,8 @@ sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml + sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml + sources/gui/qml/pages/posttreatment/PostTreatmentDrainConsumables.qml + sources/gui/qml/pages/posttreatment/PostTreatmentDisinfection.qml Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -rc16cfee6212ad1ba9f788c41d4a4c916daa43c9c -r660cad5ccb0fb2ad30703cb1cf33db1ea243d156 --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision c16cfee6212ad1ba9f788c41d4a4c916daa43c9c) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 660cad5ccb0fb2ad30703cb1cf33db1ea243d156) @@ -229,6 +229,8 @@ {Gui::GuiActionType::ID_AdjustWaterSampleReq , 1 * 4 }, // 1 parameters each 4bytes {Gui::GuiActionType::ID_AdjustWaterSampleRsp , 2 * 4 }, // 2 parameters each 4bytes {Gui::GuiActionType::ID_AdjustWaterSampleResultReq , 1 * 4 }, // 1 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustWaterSampleData , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustWaterSampleTimeout , 0 * 4 }, // 0 parameters each 4bytes // Pre-Treatment Consumables Installation Confirm {Gui::GuiActionType::ID_AdjustConsumablesConfirmReq , 0 * 4 }, // 0 parameter // Pre-Treatment SelfTest NoCartridge Progress Data Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -rfdddcd8b25b5acc99f8c044c998af0e95752063c -r660cad5ccb0fb2ad30703cb1cf33db1ea243d156 --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision fdddcd8b25b5acc99f8c044c998af0e95752063c) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 660cad5ccb0fb2ad30703cb1cf33db1ea243d156) @@ -44,9 +44,8 @@ qsTr("Disinfection" ), ] - property int stackStepIndex : 0 + property int stackStepIndex : 0 readonly property bool isDisconnect : _root.stackStepIndex === PostTreatmentStack.StackStep.Disconnect - readonly property bool isReview : _root.stackStepIndex === PostTreatmentStack.StackStep.Review onVisibleChanged: { if (visible) { @@ -172,33 +171,6 @@ onBackClicked : _root.backClicked() onConfirmClicked: _root.confirmClicked() - Row { id: _qrRow - spacing : Variables.defaultMargin - visible : _root.isReview - - anchors { - left : _titleBar.left - leftMargin : Variables.defaultMargin * 2 - top : _titleBar.top - topMargin : Variables.defaultMargin * 2 - } - - QRCode { id: _qrCode - anchors.verticalCenter : parent.verticalCenter - anchors.verticalCenterOffset: -5 - qrcode : vPostTreatmentAdjustmentTreatmentLog.txCode - clear : ! _root.visible - } - - Text { id: _txCodeText - anchors.bottom : _qrCode.bottom - text : vPostTreatmentAdjustmentTreatmentLog.txCode ? qsTr("Tx Code: ") + vPostTreatmentAdjustmentTreatmentLog.txCode : " " - color : "#DBE9FA" - font.pixelSize : Fonts.fontPixelButton - } - } - } - PostTreatmentDisconnectStack { id: _postTreatmentDisconnectStack objectName : "_postTreatmentDisconnectStack" onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Disconnect; initStack() } @@ -221,6 +193,12 @@ onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Disinfection } } + PostTreatmentBase { id: _disposablesRemovalConfirm + objectName :"_disposablesRemovalConfirm" + instructionBased : true + onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Disinfection } + } + // connections Connections { target: vPostTreatmentStates function onDrainReservoirsChanged ( vValue ) { console.debug("drainReservoirs ", vValue )} @@ -256,7 +234,7 @@ function onAdjustmentTriggered ( vValue ) { if ( vPostTreatmentAdjustmentDisposablesRemovalConfirm.adjustment_Accepted ) { _postTreatmentRemove.reasonText = "" - page( _postTreatmentReview ) + page( _postTreatmentReview ) } else { _postTreatmentRemove.reasonText = vPostTreatmentAdjustmentDisposablesRemovalConfirm.text() } Index: sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustRequests.h =================================================================== diff -u --- sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustRequests.h (revision 0) +++ sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustRequests.h (revision 660cad5ccb0fb2ad30703cb1cf33db1ea243d156) @@ -0,0 +1,121 @@ +/*! + * + * 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 MPostTreatmentAdjustRequests.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Aug-2023 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ + +#pragma once + +// Qt +#include + +//project +#include "MAdjustRequestsBase.h" +#include "GuiGlobals.h" +#include "MessageGlobals.h" +using namespace Gui; + +namespace Model { + +/*! + * Simple request models + * These are models to send the request for the doAdjustment + * The the only reason thy have been defined to help overloading the adjustment methods + * Otherwise the parameters are so tiny models. + */ + +/*! + * \brief The MAdjustPatientDisconnectionNotifyReq class + * \details The model to Confirm Patient Disconnection + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| + * |0x4A00| 0x100 | 9 | Req | Y | UI | TD | Patient Disconnection Notify Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustPatientDisconnectionNotifyReq : public MModel { +public: + static QString toString(const QVariantList &vParameters) { + return MModel::toString("PatientDisconnectionNotify", vParameters); + } +}; + +/*! + * \brief The MAdjustPatientDisconnectionConfirmReq class + * \details The model to Confirm Patient Disconnection + * + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:----:|:---:|:---:|:----:|:-----------:| + * |0x5500| 0x100 | Req | Y | UI | TD | Patient Disconnection Confirm Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustPatientDisconnectionConfirmReq : public MModel { +public: + static QString toString(const QVariantList &vParameters) { + return MModel::toString("PatientDisconnectionConfirm", vParameters); + } +}; + +/*! + * \brief The MAdjustDisposablesRemovalConfirmReq class + * \details The model to Confirm Disposables Removal + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| + * |0x7300| 0x100 | 9 | Req | Y | UI | TD | Disposables Removal Confirm Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustDisposablesRemovalConfirmReq : public MModel { +public: + static QString toString(const QVariantList &vParameters) { + return MModel::toString("DisposablesRemovalConfirm", vParameters); + } +}; + +/*! + * \brief The MAdjustTreatmentLogReq class + * \details The model to request Treatment Log + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| + * |0x7500| 0x100 | 9 | Req | Y | UI | TD | Treatment Log Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustTreatmentLogReq : public MModel { +public: + static QString toString(const QVariantList &vParameters) { + return MModel::toString("TreatmentLog", vParameters); + } +}; + +} + +typedef Model:: MAdjustPatientDisconnectionNotifyReq AdjustPatientDisconnectionNotifyRequestData; +typedef Model:: MAdjustPatientDisconnectionConfirmReq AdjustPatientDisconnectionConfirmRequestData; +typedef Model:: MAdjustDisposablesRemovalConfirmReq AdjustDisposablesRemovalConfirmRequestData; +typedef Model:: MAdjustTreatmentLogReq AdjustTreatmentLogRequestData;