Index: denali.pro =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -re125bd5cf13750eaf241d518b9c846139afaa81c --- denali.pro (.../denali.pro) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ denali.pro (.../denali.pro) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -153,6 +153,7 @@ \ # ---------- Models - HD - Adjustment - Disinfeection sources/model/hd/adjustment/disinfect/MDisinfectAdjustRequests.h \ sources/model/hd/adjustment/disinfect/MDisinfectAdjustResponse.h \ + sources/model/hd/adjustment/disinfect/MDisinfectAdjustChemicalConfirmResponse.h \ \ # ---------- Models - HD - Data - Pre-Treatment - Progress sources/model/hd/data/pretreatment/MPreTreatmentSelfTestNoCartridgeData.h \ sources/model/hd/data/pretreatment/MPreTreatmentSelfTestDryData.h \ @@ -178,11 +179,9 @@ \ # ---------- Models - DG - Data - Pre-Treatment - Progress sources/model/dg/data/pretreatment/MDGFilterFlushData.h \ \ # ---------- Models - DG - Data - Disinfect - Progress - sources/model/dg/data/disinfect/MDisinfectDGFlushData.h \ + sources/model/dg/data/disinfect/MDisinfectDGFlushTimeData.h \ sources/model/dg/data/disinfect/MDisinfectDGHeatTimeData.h \ - sources/model/dg/data/disinfect/MDisinfectDGHeatTemperatureData.h \ sources/model/dg/data/disinfect/MDisinfectDGChemicalTimeData.h \ - sources/model/dg/data/disinfect/MDisinfectDGChemicalTBDData.h \ \ # ---------- Models - DG - Data sources/model/dg/data/MDGDebugText.h \ sources/model/dg/data/MDGDrainPumpData.h \ @@ -250,6 +249,7 @@ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.h \ \ # ---------- Views - HD - Adjustment - Disinfection sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.h \ + sources/view/hd/adjustment/disinfect/VDisinfectAdjustChemicalConfirm.h \ \ # ---------- Views - HD - Data - States sources/view/hd/data/VHDOperationModeData.h \ sources/view/hd/data/pretreatment/VPreTreatmentStatesData.h \ @@ -276,6 +276,8 @@ sources/view/dg/data/pretreatment/VDGFilterFlushData.h \ \ # ---------- Views - DG - Data - Disinfection - Progress sources/view/dg/data/disinfect/VDisinfectDGData.h \ + \ # ---------- Views - DG - States + sources/view/dg/data/disinfect/VDisinfectStatesData.h \ \ # ---------- Views - DG - Data sources/view/dg/data/VDGOperationModeData.h \ sources/view/dg/data/VDGDrainPumpData.h \ @@ -356,6 +358,7 @@ sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp \ \ # ---------- Models - HD - Adjustment - Disinfection sources/model/hd/adjustment/disinfect/MDisinfectAdjustResponse.cpp \ + sources/model/hd/adjustment/disinfect/MDisinfectAdjustChemicalConfirmResponse.cpp \ \ # ---------- Models - HD - Data \ # ---------- Models - HD - Data - Pre-Treatment sources/model/hd/data/pretreatment/MPreTreatmentDisposablesPrimeData.cpp \ @@ -381,11 +384,9 @@ \ # ---------- Models - DG - Data - Pre-Treatment - Progress sources/model/dg/data/pretreatment/MDGFilterFlushData.cpp \ \ # ---------- Models - DG - Data - Disinfection - Progress - sources/model/dg/data/disinfect/MDisinfectDGFlushData.cpp \ + sources/model/dg/data/disinfect/MDisinfectDGFlushTimeData.cpp \ sources/model/dg/data/disinfect/MDisinfectDGHeatTimeData.cpp \ - sources/model/dg/data/disinfect/MDisinfectDGHeatTemperatureData.cpp \ sources/model/dg/data/disinfect/MDisinfectDGChemicalTimeData.cpp \ - sources/model/dg/data/disinfect/MDisinfectDGChemicalTBDData.cpp \ \ # ---------- Models - DG - Data sources/model/dg/data/MDGDebugText.cpp \ sources/model/dg/data/MDGDrainPumpData.cpp \ @@ -451,6 +452,7 @@ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.cpp \ \ # ---------- Views - HD - Adjustment - Disinfection sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.cpp \ + sources/view/hd/adjustment/disinfect/VDisinfectAdjustChemicalConfirm.cpp \ \ # ---------- Views - HD - States Data sources/view/hd/data/VHDOperationModeData.cpp \ sources/view/hd/data/pretreatment/VPreTreatmentStatesData.cpp \ @@ -479,6 +481,8 @@ sources/view/dg/data/pretreatment/VDGFilterFlushData.cpp \ \ # ---------- Views - DG - Data - Disinfect - Progress sources/view/dg/data/disinfect/VDisinfectDGData.cpp \ + \ # ---------- Views - DG - States + sources/view/dg/data/disinfect/VDisinfectStatesData.cpp \ \ # ---------- Views - DG - Data sources/view/dg/data/VDGDrainPumpData.cpp \ sources/view/dg/data/VDGHeatersData.cpp \ Index: denali.pro.user =================================================================== diff -u -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 -re125bd5cf13750eaf241d518b9c846139afaa81c --- denali.pro.user (.../denali.pro.user) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) +++ denali.pro.user (.../denali.pro.user) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -1,6 +1,6 @@ - + EnvironmentId Index: en_US.udic =================================================================== diff -u -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 -re125bd5cf13750eaf241d518b9c846139afaa81c --- en_US.udic (.../en_US.udic) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) +++ en_US.udic (.../en_US.udic) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -82,3 +82,4 @@ TPAR HDOp DeviceID +RO Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -r2c3846821eda0903c34bb5fcf2aebcbde2d0343a -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 2c3846821eda0903c34bb5fcf2aebcbde2d0343a) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -663,10 +663,10 @@ * \param vData - Data model contains the epoch time * \return void */ -void MessageDispatcher::onAdjustment(const AdjustDisinfectChemicalConfirmRequestData &) +void MessageDispatcher::onAdjustment(const AdjustChemicalConfirmRequestData &) { QVariantList mData; - onActionTransmit(GuiActionType::ID_AdjustDisinfectChemicalConfirmReq, mData); + onActionTransmit(GuiActionType::ID_AdjustChemicalConfirmReq, mData); } // ---------------------------------------------------------------------------------------------------- Index: sources/canbus/MessageDispatcher.h =================================================================== diff -u -r2c3846821eda0903c34bb5fcf2aebcbde2d0343a -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 2c3846821eda0903c34bb5fcf2aebcbde2d0343a) +++ sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -141,8 +141,7 @@ GuiActionType::ID_AdjustTreatmentLogReq , // Disinfect GuiActionType::ID_AdjustDisinfectReq , - GuiActionType::ID_AdjustDisinfectRsp , - GuiActionType::ID_AdjustDisinfectChemicalConfirmReq , + GuiActionType::ID_AdjustChemicalConfirmReq , // Settings GuiActionType::ID_AdjustHDDateTimeReq , GuiActionType::ID_AdjustDGDateTimeReq , Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -202,12 +202,11 @@ // ---- Disinfect {Gui::GuiActionType::ID_AdjustDisinfectReq , 1 * 4 }, // 1 parameters each 4bytes {Gui::GuiActionType::ID_AdjustDisinfectRsp , 2 * 4 }, // 2 parameters each 4bytes - {Gui::GuiActionType::ID_AdjustDisinfectChemicalConfirmReq , 0 * 4 }, // 0 parameters each 4bytes - {Gui::GuiActionType::ID_DisinfectDGFlushData , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustChemicalConfirmReq , 0 * 4 }, // 0 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustChemicalConfirmRsp , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_DisinfectDGFlushTimeData , 2 * 4 }, // 2 parameters each 4bytes {Gui::GuiActionType::ID_DisinfectDGHeatTimeData , 2 * 4 }, // 2 parameters each 4bytes - {Gui::GuiActionType::ID_DisinfectDGHeatTempData , 2 * 4 }, // 2 parameters each 4bytes {Gui::GuiActionType::ID_DisinfectDGChemicalTimeData , 2 * 4 }, // 2 parameters each 4bytes - {Gui::GuiActionType::ID_DisinfectDGChemicalTBDData , 2 * 4 }, // 2 parameters each 4bytes // ---- {Gui::GuiActionType::ID_CANBusFaultCount , 1 }, {Gui::GuiActionType::ID_RawData , 255 }, Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -269,7 +269,7 @@ case Gui::GuiActionType::ID_AdjustTreatmentLogReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustTreatmentLogRequestData ); break; // Disinfection case Gui::GuiActionType::ID_AdjustDisinfectReq : INTERPRET_TRANSMIT_MESSAGE(AdjustDisinfectRequestData ); break; - case Gui::GuiActionType::ID_AdjustDisinfectChemicalConfirmReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustDisinfectChemicalConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustChemicalConfirmReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustChemicalConfirmRequestData ); break; // alarms case Gui::GuiActionType::ID_AlarmSilenceReq : INTERPRET_TRANSMIT_MESSAGE(AlarmSilenceRequestData ); break; case Gui::GuiActionType::ID_AlarmUserActionReq : INTERPRET_TRANSMIT_MESSAGE(AlarmUserActionRequestData ); break; @@ -403,6 +403,7 @@ // ----- Disinfection - Adjust case Gui::GuiActionType::ID_AdjustDisinfectRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustDisinfectRsp ); break; + case Gui::GuiActionType::ID_AdjustChemicalConfirmRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustChemicalConfirmRsp ); break; // these need to be standard and use notify as well case Gui::GuiActionType::ID_AdjustUltrafiltrationEditRsp : ok = adjustUltrafiltrationEdit (vMessage, vData); break; // TODO : implement notify<>() @@ -461,11 +462,9 @@ // ----- Datum - Pre-Treatment progress case Gui::GuiActionType::ID_DGFilterFlushData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGFilterFlushData ); break; // ----- Datum - Disinfection - case Gui::GuiActionType::ID_DisinfectDGFlushData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DisinfectDGFlushData ); break; + case Gui::GuiActionType::ID_DisinfectDGFlushTimeData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DisinfectDGFlushTimeData ); break; case Gui::GuiActionType::ID_DisinfectDGHeatTimeData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DisinfectDGHeatTimeData ); break; - case Gui::GuiActionType::ID_DisinfectDGHeatTempData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DisinfectDGHeatTempData ); break; case Gui::GuiActionType::ID_DisinfectDGChemicalTimeData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DisinfectDGChemicalTimeData ); break; - case Gui::GuiActionType::ID_DisinfectDGChemicalTBDData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DisinfectDGChemicalTBDData ); break; // ----- Datum - Disinfect States case Gui::GuiActionType::ID_DisinfectStates : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DisinfectStates ); break; Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -r2c3846821eda0903c34bb5fcf2aebcbde2d0343a -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 2c3846821eda0903c34bb5fcf2aebcbde2d0343a) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -35,6 +35,7 @@ #include "VPreTreatmentStatesData.h" #include "VHDTreatmentStatesData.h" #include "VPostTreatmentStatesData.h" +#include "VDisinfectStatesData.h" // Pre-treatment #include "VPreTreatmentAdjustmentInitTreatment.h" #include "VDGFilterFlushData.h" @@ -93,6 +94,7 @@ // ----- Disinfection #include "VDisinfectDGData.h" #include "VDisinfectAdjustDisinfect.h" +#include "VDisinfectAdjustChemicalConfirm.h" // ----- #include "VTreatmentAdjustmentEnd.h" Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -223,12 +223,11 @@ // Disinfect ID_AdjustDisinfectReq = 0x7F00, // 127 ID_AdjustDisinfectRsp = 0x8000, // 128 - ID_AdjustDisinfectChemicalConfirmReq = 0x8100, // 129 // there is no specific response message for this request and changing of the state in HDOpMode.subMode is used as the response - ID_DisinfectDGFlushData = 0x8200, // 130 - ID_DisinfectDGHeatTimeData = 0x8300, // 131 - ID_DisinfectDGHeatTempData = 0x8400, // 132 + ID_AdjustChemicalConfirmReq = 0x8100, // 129 + ID_AdjustChemicalConfirmRsp = 0x8200, // 130 + ID_DisinfectDGFlushTimeData = 0x8300, // 131 + ID_DisinfectDGHeatTimeData = 0x8400, // 132 ID_DisinfectDGChemicalTimeData = 0x8500, // 133 - ID_DisinfectDGChemicalTBDData = 0x8600, // 134 }; enum class GuiActionsData_Enum /*: quint8 QML doesn't support*/ { @@ -302,6 +301,15 @@ #include "DGDefs.h" Q_ENUM(DG_Op_Modes) Q_ENUM(DG_Heat_States) + + // TODO: temporary enum until DG defines one + enum DG_Disinfect_States { + DG_DISINFECT_STATE_UNKNOWN = -1, + DG_DISINFECT_STATE_FLUSH = 0, + DG_DISINFECT_STATE_HEAT = 1, + DG_DISINFECT_STATE_CHEM = 2, + }; + Q_ENUM(DG_Disinfect_States) }; // to be able to use the enum as signal/slot parameter @@ -366,6 +374,7 @@ typedef GuiActions::HD_Post_Treatment_Mode_States GuiPostTreatmentStates; // Disinfection Heat States + typedef GuiActions::DG_Disinfect_States GuiDisinfectDGStates; typedef GuiActions::DG_Heat_States GuiDisinfectDGHeatStates; /*! Index: sources/gui/qml/components/ExportButton.qml =================================================================== diff -u -r73091a6f5717c0fc88e236c06c618ad361f30a3c -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/gui/qml/components/ExportButton.qml (.../ExportButton.qml) (revision 73091a6f5717c0fc88e236c06c618ad361f30a3c) +++ sources/gui/qml/components/ExportButton.qml (.../ExportButton.qml) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -21,15 +21,23 @@ import "qrc:/components" TouchRect { id : _root - width : 50 - height : width - x : width - 10 + width : 155 + height : 50 + + property bool exportTreatment: false + + anchors.margins: 35 + text { text: qsTr("Export") font.pixelSize: Fonts.fontPixelButton * 0.75 } - onPressed: { - _GuiView.doExportLog() + onClicked: { + if ( exportTreatment ) + _GuiView.doExportTreatment() + else + _GuiView.doExportLog() + } Connections { target: _GuiView Index: sources/gui/qml/compounds/TouchGrid.qml =================================================================== diff -u -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/gui/qml/compounds/TouchGrid.qml (.../TouchGrid.qml) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) +++ sources/gui/qml/compounds/TouchGrid.qml (.../TouchGrid.qml) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -26,11 +26,10 @@ Item { id: _root objectName: "_TouchGrid" - property var itemsText : [] property var itemsValue : [] + property var itemsText : [] property var itemsUnit : [] - property var itemsEnabled : [] property var itemsHasImage : [] property var itemsHasLine : [] @@ -54,6 +53,13 @@ height: parent.height + function undef(vValue, vOtherwise) { + if ( vValue === undefined ) { + return vOtherwise + } + return vValue + } + Grid { id: _grid flow: Grid.TopToBottom anchors.centerIn: _root @@ -64,49 +70,56 @@ Repeater { model : _root.itemsText TouchRect { id: _touchItem - clip : true - touchable : _root.itemsTouchable[index] !== undefined ? _root.itemsTouchable[index] : true + clip : true + touchable : undef( _root.itemsTouchable[index], true ) text.anchors.horizontalCenter: undefined - text.leftPadding: Variables.minVGap - text.text : modelData - border.width: 0 - height : _root.itemHeight - width : _root.itemWidth - radius : 5 - enabled : _root.itemsEnabled[index] !== undefined ? _root.itemsEnabled[index] : true - onClicked : _root.itemClicked(index) + text.leftPadding : Variables.minVGap + text.text : modelData + border.width : 0 + height : _root.itemHeight + width : _root.itemWidth + radius : 5 + enabled : undef( _root.itemsEnabled[index], true ) + onClicked : _root.itemClicked(index) + Text { id : _itemsValue + text : undef( _root.itemsValue[index], "") + font.pixelSize : _touchItem.pixelSize + color : _touchItem.fgColor + anchors.left : parent.left + anchors.leftMargin : _root.itemsValueLeftMargin + anchors.verticalCenter : _touchItem.verticalCenter + } + Text { id: _itemsUnit + text : undef( _root.itemsUnit[index], "" ) + font.pixelSize : _touchItem.pixelSize + color : _touchItem.fgColor + anchors.left : parent.left + anchors.leftMargin : _root.itemsUnitLeftMargin + anchors.verticalCenter : _touchItem.verticalCenter + } Image { id: _image - visible : _touchItem.touchable && ( _root.itemsHasImage[index] !== undefined ? _root.itemsHasImage[index] : true ) && _touchItem.enabled && ! _touchItem.isPressed && _root.itemsText[index] + visible : undef( _root.itemsHasImage[index] , true ) + && _touchItem.touchable + && _touchItem.enabled + && ! _touchItem.isPressed + && _root.itemsText[index] anchors.right : _touchItem.right anchors.verticalCenter : _touchItem.verticalCenter - width : Variables.arrowWidth - height : Variables.arrowHeight - source : "qrc:/images/iArrowRight" + width : Variables.arrowWidth + height : Variables.arrowHeight + source : "qrc:/images/iArrowRight" } Line { id: _line - visible : /*_touchItem.enabled &&*/ ( _root.itemsHasLine[index] !== undefined ? _root.itemsHasLine[index] : true ) && ! _touchItem.isPressed && _root.itemsText[index] + visible : undef( _root.itemsHasLine[index], true ) + // && ! _touchItem.isPressed + && _root.itemsText[index] + // && _touchItem.enabled thickness : _root.lineThickness color : _touchItem.enabled ? _root.lineColor : Colors.borderDisableButton anchors.left : _touchItem.left anchors.right : _touchItem.right anchors.bottom : _touchItem.bottom } - Text { id : _itemsValue - text : _root.itemsValue[index] !== undefined ? _root.itemsValue[index] : "" - font.pixelSize : _touchItem.pixelSize - color : _touchItem.fgColor - anchors.left: parent.left - anchors.leftMargin: _root.itemsValueLeftMargin - anchors.verticalCenter: _touchItem.verticalCenter - } - Text { id : _itemsUnit - text : _root.itemsUnit[index] !== undefined ? _root.itemsUnit[index] : "" - font.pixelSize : _touchItem.pixelSize - color : _touchItem.fgColor - anchors.left: parent.left - anchors.leftMargin: _root.itemsUnitLeftMargin - anchors.verticalCenter: _touchItem.verticalCenter - } } } } Index: sources/gui/qml/main.qml =================================================================== diff -u -r2c3846821eda0903c34bb5fcf2aebcbde2d0343a -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/gui/qml/main.qml (.../main.qml) (revision 2c3846821eda0903c34bb5fcf2aebcbde2d0343a) +++ sources/gui/qml/main.qml (.../main.qml) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -34,6 +34,8 @@ import VPreTreatmentStates 0.1 import VHDTreatmentStates 0.1 import VPostTreatmentStates 0.1 +import VDisinfectStates 0.1 + // In-Treatment - Data import VTreatmentBloodFlow 0.1 import VTreatmentDialysateFlow 0.1 @@ -88,6 +90,7 @@ import VPostTreatmentAdjustmentTreatmentLog 0.1 // Disinfection import VDisinfectAdjustDisinfect 0.1 +import VDisinfectAdjustChemicalConfirm 0.1 import VDisinfectDGData 0.1 // Qml imports @@ -108,11 +111,12 @@ VSettings { id: vSettings } VAdjustmentVersions { id: vAdjustmentVersions } VDateTime { id: vDateTime } - + // ---- States VHDOperationMode { id: vHDOperationMode } VPreTreatmentStates { id: vPreTreatmentStates } VHDTreatmentStates { id: vHDTreatmentStates } VPostTreatmentStates { id: vPostTreatmentStates } + VDisinfectStates { id: vDisinfectStates } VTreatmentBloodFlow { id: vTreatmentBloodFlow } VTreatmentDialysateFlow { id: vTreatmentDialysateFlow } @@ -173,6 +177,7 @@ // --- Disinfection VDisinfectAdjustDisinfect { id: vDisinfectAdjustDisinfect } + VDisinfectAdjustChemicalConfirm { id: vDisinfectAdjustChemicalConfirm } VDisinfectDGData { id: vDisinfectDGData } Background {} Index: sources/gui/qml/pages/disinfect/DisinfectStack.qml =================================================================== diff -u -rc71946746586d5a4061ad866ce7dbbaf74b9798a -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/gui/qml/pages/disinfect/DisinfectStack.qml (.../DisinfectStack.qml) (revision c71946746586d5a4061ad866ce7dbbaf74b9798a) +++ sources/gui/qml/pages/disinfect/DisinfectStack.qml (.../DisinfectStack.qml) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -73,12 +73,14 @@ timeCircleTimeTextValue : vDisinfectDGData.heatTimeRemaining * 60 hasCheckList : true + isComplete : vDisinfectStates.complete + completeText : qsTr("Heat Disinfection Complete!") checkListStepNames : [ - qsTr("Running Pre-Disinfect Flush" ), - qsTr("Heating Up the Fluid" ), - qsTr("Running Heat Disinfect" ), - qsTr("Cooling Down" ), - qsTr("Running Post-Disinfect Flush"), + qsTr("Pre-Disinfect Flush" ), + qsTr("Heating Up the Fluid" ), + qsTr("Heat Disinfect" ), + qsTr("Cooling Down" ), + qsTr("Post-Disinfect Flush" ), ] } @@ -123,25 +125,75 @@ timeCircleTimeTextValue : vDisinfectDGData.flushTimeRemaining * 60 } + // ----- Checkmarks + Connections { target: vDisinfectStates + onStartEntered : {} + onDrainR1Entered : { _disinfectHeat .checkList.setItem(0, true )} + onDrainR2Entered : {} + onFlushDrainEntered : {} + onFlushCirculationEntered : {} + onFlushR1R2Entered : {} + onFlushR2DrainR1Entered : {} + onFlushDrainR2Entered : {} + onFlushDrainR1Entered : { _disinfectHeat .checkList.setItem(0, vflushDrainR1 )} + onFillWithWaterEntered : { _disinfectHeat .checkList.setItem(1, true )} + onDisinfectR1R2Entered : {} + onFillR2WithHotWaterEntered : { _disinfectHeat .checkList.setItem(1, vfillR2WithHotWater )} + onDisinfectR2R1Entered : { _disinfectHeat .checkList.setItem(2, vdisinfectR2R1 )} + onCooldownHeatersEntered : { _disinfectHeat .checkList.setItem(3, true )} + onCooldownRoFilterEntered : { _disinfectHeat .checkList.setItem(3, vcooldownRoFilter )} + onMixDrainR1Entered : { _disinfectHeat .checkList.setItem(4, true )} + onMixDrainR2Entered : {} + onRinseR1ToR2Entered : {} + onRinseR2ToR1DrainR1Entered : {} + onRinseCirculationEntered : { _disinfectHeat .checkList.setItem(4, vrinseCirculation )} + onCancelBasicPathEntered : {} + onCancelWaterPathEntered : {} + onCompleteEntered : {} + } + // ----- Commands + onDisinfectSkip : { vDisinfectAdjustDisinfect .doFlush ( )} + onDisinfectHeatClicked : { vDisinfectAdjustDisinfect .doDisinfectHeat ( )} + onDisinfectChemicalClicked : { vDisinfectAdjustDisinfect .doDisinfectChemical( )} + onDisinfectChemicalConfirm : { vDisinfectAdjustChemicalConfirm.doConfirm ( )} + + // ------ Navigations Connections { target: vPostTreatmentStates - onPatientDisconnectionChanged : { console.debug("patientDisconnection", vpatientDisconnection )} - onDrainReservoirsChanged : { console.debug("drainReservoirs ", vdrainReservoirs )} - onVerifyChanged : { console.debug("verify ", vverify )} + onPatientDisconnectionChanged : { console.debug("patientDisconnection", vpatientDisconnection )} + onDrainReservoirsChanged : { console.debug("drainReservoirs ", vdrainReservoirs )} + onVerifyChanged : { console.debug("verify ", vverify )} } Connections { target: vHDOperationMode - onStandbyWaitDisinfectChanged : { page( _disinfect , vstandbyWaitDisinfect )} // initialItem - onStandbyDGFlushChanged : { page( _flush , vstandbyDGFlush )} - onStandbyDGDisinfectHeatChanged : { page( _disinfectHeat , vstandbyDGDisinfectHeat )} - onStandbyDGDisinfectChemicalChanged : { page( _disinfectChemicalProgress , vstandbyDGDisinfectChemical )} + onStandbyWaitDisinfectChanged : { page( _disinfect , vstandbyWaitDisinfect )} // initialItem + onStandbyDGFlushChanged : { page( _flush , vstandbyDGFlush )} + onStandbyDGDisinfectHeatChanged : { page( _disinfectHeat , vstandbyDGDisinfectHeat )} + onStandbyDGDisinfectChemicalChanged : { page( _disinfectChemicalProgress , vstandbyDGDisinfectChemical )} } - onDisinfectSkip : { vDisinfectAdjustDisinfect.doFlush ( )} - onDisinfectHeatClicked : { vDisinfectAdjustDisinfect.doDisinfectHeat ( )} - onDisinfectChemicalClicked : { vDisinfectAdjustDisinfect.doDisinfectChemical ( ) - page( _disinfectChemicalInstruction )} - onDisinfectChemicalConfirm : { vDisinfectAdjustDisinfect.doDisinfectChemicalConfirm( )} + // ----- Responses + Connections { target: vDisinfectAdjustDisinfect + onAdjustmentTriggered : { + if ( vDisinfectAdjustDisinfect.adjustment_Accepted ) { + _disinfect.reasonText = "" + if ( vDisinfectAdjustDisinfect.chemical ) + page( _disinfectChemicalInstruction ) + } else { + _disinfect.reasonText = vDisinfectAdjustDisinfect.text() + } + } + } + Connections { target: vDisinfectAdjustChemicalConfirm + onAdjustmentTriggered : { + if ( vDisinfectAdjustChemicalConfirm.adjustment_Accepted ) { + _disinfectChemicalInstruction.reasonText = "" + } else { + _disinfectChemicalInstruction.reasonText = vDisinfectAdjustChemicalConfirm.text() + } + } + } + onVisibleChanged: { if (visible) { _mainMenu.hidden = true Index: sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml =================================================================== diff -u -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) +++ sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -30,7 +30,13 @@ PostTreatmentBase { id: _root signal itemClicked(int vIndex) - Rectangle { id: _backgroug + ExportButton { + anchors.top : parent.top + anchors.left : parent.left + exportTreatment : true + } + + Rectangle { id: _backgroud clip: true anchors.fill: _flickable color : Colors.backgroundDialog @@ -49,12 +55,12 @@ clip: true anchors { top : _root.title.bottom - topMargin : Variables.minVGap + topMargin : Variables.minVGap * 2 // * 2 : it was too close to title and also better with rows not half cut. bottom : _root.bottom bottomMargin : Variables.notificationHeight + Variables.minVGap horizontalCenter: parent.horizontalCenter } - width : parent.width - Variables.minVGap * 2 + width : parent.width - Variables.minVGap * 2 // * 2 : for each side contentWidth : width contentHeight: _parametersGrid.height @@ -64,11 +70,45 @@ colCount : 2 rowCount : 17 itemWidth : 575 - rowSpacing : 7 + rowSpacing : 0 columnSpacing : 50 lineColor : Colors.backgroundMain - itemsText : vPostTreatmentAdjustmentTreatmentLog.parametersTitle itemsValue : vPostTreatmentAdjustmentTreatmentLog.parametersText + itemsText : [ + qsTr("Blood Flow Rate" ), + qsTr("Dialysate Flow Rate" ), + qsTr("Treatment Duration" ), + qsTr("Actual Treatment Duration" ), + qsTr("Acid ConcentrateType" ), + qsTr("Bicarbonate Concentrate Type" ), + qsTr("Potassium Concentration" ), + qsTr("Calcium Concentration" ), + qsTr("Bicarbonate Concentration" ), + qsTr("Sodium Concentration" ), + qsTr("Dialysate Temperature" ), + qsTr("Dialyzer Type" ), + qsTr("Treatment DateTime" ), + qsTr("Average Blood Flow" ), + qsTr("Average Dialysate Flow" ), + qsTr("Dialysate Volume Used" ), + qsTr("Average Dialysate Temp" ), + qsTr("Target UF Volume" ), + qsTr("Actual UF Volume" ), + qsTr("Target UF Rate" ), + qsTr("Actual UF Rate" ), + qsTr("Saline Bolus Volume" ), + qsTr("Heparin Type" ), + qsTr("Heparin Concentration" ), + qsTr("Heparin Bolus Volume" ), + qsTr("Heparin Dispense Rate" ), + qsTr("Heparin Pre-Stop" ), + qsTr("Heparin Delivered Volume" ), + qsTr("Average Arterial Pressure" ), + qsTr("Average Venous Pressure" ), + qsTr("End Treatment Early Alarm" ), + qsTr("Device ID" ), + qsTr("Water Sample Test Result" ), + ] itemsUnit : [ Variables.unitTextFlowRate , Variables.unitTextFlowRate , @@ -106,7 +146,6 @@ ] itemsValueLeftMargin : 350 itemsUnitLeftMargin : 495 - itemsTouchable : [ 0,0,0,0,1,0,0,0,0,0, 1,0,0,0,0,0,0,0,0,0, Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -96,6 +96,7 @@ } } } + onVisibleChanged: { if (visible) { _mainMenu.hidden = true Index: sources/model/MModel.h =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/model/MModel.h (.../MModel.h) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ sources/model/MModel.h (.../MModel.h) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -105,11 +105,10 @@ // Disinfection #include "MDisinfectAdjustRequests.h" #include "MDisinfectAdjustResponse.h" -#include "MDisinfectDGFlushData.h" +#include "MDisinfectAdjustChemicalConfirmResponse.h" +#include "MDisinfectDGFlushTimeData.h" #include "MDisinfectDGHeatTimeData.h" -#include "MDisinfectDGHeatTemperatureData.h" #include "MDisinfectDGChemicalTimeData.h" -#include "MDisinfectDGChemicalTBDData.h" /*! * \page MessageFlow Message interpretation Flow @@ -276,11 +275,9 @@ REGISTER_METATYPE( PreTreatmentSelfTestDryData ) \ REGISTER_METATYPE( PreTreatmentDisposablesPrimeData ) \ /* Disinfection */ \ - REGISTER_METATYPE( DisinfectDGFlushData ) \ + REGISTER_METATYPE( DisinfectDGFlushTimeData ) \ REGISTER_METATYPE( DisinfectDGHeatTimeData ) \ - REGISTER_METATYPE( DisinfectDGHeatTemperatureData ) \ REGISTER_METATYPE( DisinfectDGChemicalTimeData ) \ - REGISTER_METATYPE( DisinfectDGChemicalTBDData ) \ \ /* Request */ \ /* Post-Treatment */ \ @@ -302,7 +299,7 @@ REGISTER_METATYPE( AdjustStartTreatmentRequestData ) \ /* Disinfection */ \ REGISTER_METATYPE( AdjustDisinfectRequestData ) \ - REGISTER_METATYPE( AdjustDisinfectChemicalConfirmRequestData ) \ + REGISTER_METATYPE( AdjustChemicalConfirmRequestData ) \ \ REGISTER_METATYPE( AlarmSilenceRequestData ) \ REGISTER_METATYPE( AlarmUserActionRequestData ) \ @@ -339,6 +336,7 @@ REGISTER_METATYPE( AdjustStartTreatmentResponseData ) \ /* Disinfect */ \ REGISTER_METATYPE( AdjustDisinfectResponseData ) \ + REGISTER_METATYPE( AdjustChemicalConfirmResponseData ) \ \ REGISTER_METATYPE( AdjustBloodDialysateResponseData ) \ REGISTER_METATYPE( AdjustDurationResponseData ) \ @@ -418,11 +416,9 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, PreTreatmentSelfTestDryData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, PreTreatmentDisposablesPrimeData ) \ /* Disinfection */ \ - ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DisinfectDGFlushData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DisinfectDGFlushTimeData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DisinfectDGHeatTimeData ) \ - ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DisinfectDGHeatTemperatureData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DisinfectDGChemicalTimeData ) \ - ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DisinfectDGChemicalTBDData ) \ /* Response */ \ /* Post-Treatment */ \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustDisposablesRemovalConfirmResponseData ) \ @@ -438,6 +434,7 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustStartTreatmentResponseData ) \ /* Disinfect */ \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustDisinfectResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustChemicalConfirmResponseData ) \ \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustBloodDialysateResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustDurationResponseData ) \ @@ -491,7 +488,7 @@ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustStartTreatmentRequestData ) \ /* Disinfection */ \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustDisinfectRequestData ) \ - ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustDisinfectChemicalConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustChemicalConfirmRequestData ) \ /* Alarms */ \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmSilenceRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmUserActionRequestData ) \ @@ -563,11 +560,9 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( PreTreatmentSelfTestDryData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( PreTreatmentDisposablesPrimeData ) \ /* Disinfection */ \ - ACTION_RECEIVE_BRIDGE_DEFINITION( DisinfectDGFlushData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( DisinfectDGFlushTimeData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( DisinfectDGHeatTimeData ) \ - ACTION_RECEIVE_BRIDGE_DEFINITION( DisinfectDGHeatTemperatureData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( DisinfectDGChemicalTimeData ) \ - ACTION_RECEIVE_BRIDGE_DEFINITION( DisinfectDGChemicalTBDData ) \ /* Response */ \ /* Post-Treatment */ \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustDisposablesRemovalConfirmResponseData ) \ @@ -583,6 +578,7 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustStartTreatmentResponseData ) \ /* Disinfect */ \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustDisinfectResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustChemicalConfirmResponseData ) \ \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustBloodDialysateResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustDurationResponseData ) \ @@ -621,7 +617,7 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustStartTreatmentRequestData ) \ /* Disinfection */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustDisinfectRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustDisinfectChemicalConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustChemicalConfirmRequestData ) \ \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustBloodDialysateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustDurationRequestData ) \ @@ -665,7 +661,7 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustStartTreatmentRequestData ) \ /* Disinfection */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustDisinfectRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustDisinfectChemicalConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustChemicalConfirmRequestData ) \ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustBloodDialysateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustDurationRequestData ) \ @@ -709,7 +705,7 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustStartTreatmentRequestData ) \ /* Disinfection */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustDisinfectRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustDisinfectChemicalConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustChemicalConfirmRequestData ) \ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustBloodDialysateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustDurationRequestData ) \ @@ -779,11 +775,9 @@ ACTION_RECEIVE_SIGNAL( PreTreatmentSelfTestDryData ) \ ACTION_RECEIVE_SIGNAL( PreTreatmentDisposablesPrimeData ) \ /* Disinfection */ \ - ACTION_RECEIVE_SIGNAL( DisinfectDGFlushData ) \ + ACTION_RECEIVE_SIGNAL( DisinfectDGFlushTimeData ) \ ACTION_RECEIVE_SIGNAL( DisinfectDGHeatTimeData ) \ - ACTION_RECEIVE_SIGNAL( DisinfectDGHeatTemperatureData ) \ ACTION_RECEIVE_SIGNAL( DisinfectDGChemicalTimeData ) \ - ACTION_RECEIVE_SIGNAL( DisinfectDGChemicalTBDData ) \ /* Response */ \ /* Post-Treatment */ \ ACTION_RECEIVE_SIGNAL( AdjustDisposablesRemovalConfirmResponseData ) \ @@ -799,6 +793,7 @@ ACTION_RECEIVE_SIGNAL( AdjustStartTreatmentResponseData ) \ /* Disinfect */ \ ACTION_RECEIVE_SIGNAL( AdjustDisinfectResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustChemicalConfirmResponseData ) \ \ ACTION_RECEIVE_SIGNAL( AdjustBloodDialysateResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustDurationResponseData ) \ Fisheye: Tag e125bd5cf13750eaf241d518b9c846139afaa81c refers to a dead (removed) revision in file `sources/model/dg/data/disinfect/MDisinfectDGChemicalTBDData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e125bd5cf13750eaf241d518b9c846139afaa81c refers to a dead (removed) revision in file `sources/model/dg/data/disinfect/MDisinfectDGChemicalTBDData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e125bd5cf13750eaf241d518b9c846139afaa81c refers to a dead (removed) revision in file `sources/model/dg/data/disinfect/MDisinfectDGFlushData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e125bd5cf13750eaf241d518b9c846139afaa81c refers to a dead (removed) revision in file `sources/model/dg/data/disinfect/MDisinfectDGFlushData.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/dg/data/disinfect/MDisinfectDGFlushTimeData.cpp =================================================================== diff -u --- sources/model/dg/data/disinfect/MDisinfectDGFlushTimeData.cpp (revision 0) +++ sources/model/dg/data/disinfect/MDisinfectDGFlushTimeData.cpp (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -0,0 +1,45 @@ +/*! + * + * Copyright (c) 2019-2020 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 MDisinfectDGFlushTimeData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 21-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 21-Apr-2021 + * + */ +#include "MDisinfectDGFlushTimeData.h" + +using namespace Model; + +QVariantList MDisinfectDGFlushTime::parameters() const { + return { + _data.mTimeout .value, + _data.mCountdown .value, + }; +} + +bool MDisinfectDGFlushTime::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mTimeout )) + if (GetValue(vByteArray, index, _data.mCountdown )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MDisinfectDGFlushTime::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MDisinfectDGFlushTime::Data MDisinfectDGFlushTime::data() const { + Data data; + data.mTimeout = _data.mTimeout .value; + data.mCountdown = _data.mCountdown .value; + return data; +} Index: sources/model/dg/data/disinfect/MDisinfectDGFlushTimeData.h =================================================================== diff -u --- sources/model/dg/data/disinfect/MDisinfectDGFlushTimeData.h (revision 0) +++ sources/model/dg/data/disinfect/MDisinfectDGFlushTimeData.h (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -0,0 +1,82 @@ +/*! + * + * Copyright (c) 2019-2020 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 MDisinfectDGFlushTimeData.h + * \author (last) Behrouz NematiPour + * \date (last) 21-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 21-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MDisinfectDGFlushTime class + * \details The progress time data model + * + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------:| + * |0x8300| 0x070 | 1 Hz | N | DG | UI | Disinfect DG Flush Progress | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mTimeout | + * | #2:(U32) | \ref Data::mCountDown | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | DG | + * | infoText | DisinfectDGFlushTime | + * + */ +class MDisinfectDGFlushTime : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mTimeout ; + Types::U32 mCountdown ; + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eDatum ; } + Unit_Enum unitText () const override { return Unit_Enum::eDG ; } + QString infoText () const override { return QString("DisinfectDGFlushTime"); } + + struct Data { + quint32 mTimeout = 0; + quint32 mCountdown = 0; + }; + + MDisinfectDGFlushTime() {} + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MDisinfectDGFlushTime::Data DisinfectDGFlushTimeData; Fisheye: Tag e125bd5cf13750eaf241d518b9c846139afaa81c refers to a dead (removed) revision in file `sources/model/dg/data/disinfect/MDisinfectDGHeatTemperatureData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e125bd5cf13750eaf241d518b9c846139afaa81c refers to a dead (removed) revision in file `sources/model/dg/data/disinfect/MDisinfectDGHeatTemperatureData.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/dg/data/disinfect/MDisinfectDGHeatTimeData.h =================================================================== diff -u -rc71946746586d5a4061ad866ce7dbbaf74b9798a -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/model/dg/data/disinfect/MDisinfectDGHeatTimeData.h (.../MDisinfectDGHeatTimeData.h) (revision c71946746586d5a4061ad866ce7dbbaf74b9798a) +++ sources/model/dg/data/disinfect/MDisinfectDGHeatTimeData.h (.../MDisinfectDGHeatTimeData.h) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -32,7 +32,7 @@ * * | MSG | CAN ID | Type | Ack | Src | Dst | Description | * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------:| - * |0x8300| 0x070 | 1 Hz | N | DG | UI | Disinfect DG HeatTime Progress | + * |0x8400| 0x070 | 1 Hz | N | DG | UI | Disinfect DG HeatTime Progress | * * | Payload || * | || Index: sources/model/dg/data/disinfect/MDisinfectStatesData.cpp =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/model/dg/data/disinfect/MDisinfectStatesData.cpp (.../MDisinfectStatesData.cpp) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ sources/model/dg/data/disinfect/MDisinfectStatesData.cpp (.../MDisinfectStatesData.cpp) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -19,6 +19,7 @@ QVariantList MDisinfectStates::parameters() const { return { _data.mSubMode .value, + _data.mFlushStates .value, _data.mHeatStates .value, _data.mChemicalStates .value, }; @@ -27,12 +28,14 @@ bool MDisinfectStates::fromByteArray(const QByteArray &vByteArray, int *vIndex) { int index = 0; // message data start position if (GetValue(vByteArray, index, _data.mSubMode )) + if (GetValue(vByteArray, index, _data.mFlushStates )) if (GetValue(vByteArray, index, _data.mHeatStates )) if (GetValue(vByteArray, index, _data.mChemicalStates )) return true ; else { if(vIndex) *vIndex = index; return false; } else { if(vIndex) *vIndex = index; return false; } else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } } /*! @@ -43,6 +46,7 @@ MDisinfectStates::Data MDisinfectStates::data() const { Data data; data.mSubMode = _data.mSubMode .value; + data.mFlushStates = _data.mFlushStates .value; data.mHeatStates = _data.mHeatStates .value; data.mChemicalStates = _data.mChemicalStates .value; return data; Index: sources/model/dg/data/disinfect/MDisinfectStatesData.h =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/model/dg/data/disinfect/MDisinfectStatesData.h (.../MDisinfectStatesData.h) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ sources/model/dg/data/disinfect/MDisinfectStatesData.h (.../MDisinfectStatesData.h) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -37,7 +37,10 @@ * * | Payload || * | || - * | #1:(U32) | \ref Data::mState | + * | #1:(U32) | \ref Data::mSubMode | + * | #2:(U32) | \ref Data::mFlushStates | + * | #3:(U32) | \ref Data::mHeatStates | + * | #4:(U32) | \ref Data::mChemicalStates | * * \sa Data * \sa HD_Post_Treatment_Mode_States @@ -46,7 +49,7 @@ * | || * | || * | typeText | Datum | - * | unitText | HD | + * | unitText | DG | * | infoText | DisinfectStates | * */ @@ -58,7 +61,8 @@ QVariantList parameters() const override; struct { - Types::U32 mSubMode ; ///< Sub State - HD_Post_Treatment_Mode_States + Types::U32 mSubMode ; ///< Sub State - /* Not Complete */ + Types::U32 mFlushStates ; ///< Flush State - /* Not Complete */ Types::U32 mHeatStates ; ///< Heat State - DG_Heat_States Types::U32 mChemicalStates ; ///< Chemical State - /* Not Complete */ } _data; @@ -70,9 +74,10 @@ QString infoText () const override { return QString("DisinfectStates"); } struct Data { - quint32 mSubMode = 0; ///< Sub State - HD_Post_Treatment_Mode_States - quint32 mHeatStates = 0; ///< Heat State - DG_Heat_States - quint32 mChemicalStates = 0; ///< Chem State - /* Not Complete */ + quint32 mSubMode = 0; ///< Sub State - HD_Post_Treatment_Mode_States + quint32 mFlushStates = 0; ///< Flush State - /* Not Complete */ + quint32 mHeatStates = 0; ///< Heat State - DG_Heat_States + quint32 mChemicalStates = 0; ///< Chem State - /* Not Complete */ }; MDisinfectStates() { } Index: sources/model/hd/adjustment/disinfect/MDisinfectAdjustChemicalConfirmResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/disinfect/MDisinfectAdjustChemicalConfirmResponse.cpp (revision 0) +++ sources/model/hd/adjustment/disinfect/MDisinfectAdjustChemicalConfirmResponse.cpp (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -0,0 +1,45 @@ +/*! + * + * Copyright (c) 2019-2020 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 MDisinfectAdjustChemicalConfirmResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 21-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 21-Apr-2021 + * + */ +#include "MDisinfectAdjustChemicalConfirmResponse.h" + +using namespace Model; + +QVariantList MAdjustChemicalConfirmResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustChemicalConfirmResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mAccepted )) + if (GetValue(vByteArray, index, _data.mReason )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MAdjustChemicalConfirmResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustChemicalConfirmResponseData MAdjustChemicalConfirmResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/disinfect/MDisinfectAdjustChemicalConfirmResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/disinfect/MDisinfectAdjustChemicalConfirmResponse.h (revision 0) +++ sources/model/hd/adjustment/disinfect/MDisinfectAdjustChemicalConfirmResponse.h (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -0,0 +1,83 @@ +/*! + * + * Copyright (c) 2019-2020 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 MDisinfectAdjustChemicalConfirmResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 21-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 21-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustChemicalConfirmResponse class + * \details The Disinfect adjustment response model + * + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:----:|:---:|:---:|:----:|:---------: | + * |0x8200| 0x020 | Rsp | Y | HD | UI | Chemical Instruction Confirm Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustChemicalConfirmReq : Disinfect Request + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustChemicalConfirm | + * + */ +class MAdjustChemicalConfirmResponse : 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::eHD ; } + QString infoText () const override { return QString("AdjustDisinfectChemicalConfirm") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustChemicalConfirmResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustChemicalConfirmResponse::Data AdjustChemicalConfirmResponseData; Index: sources/model/hd/adjustment/disinfect/MDisinfectAdjustRequests.h =================================================================== diff -u -r2c3846821eda0903c34bb5fcf2aebcbde2d0343a -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/model/hd/adjustment/disinfect/MDisinfectAdjustRequests.h (.../MDisinfectAdjustRequests.h) (revision 2c3846821eda0903c34bb5fcf2aebcbde2d0343a) +++ sources/model/hd/adjustment/disinfect/MDisinfectAdjustRequests.h (.../MDisinfectAdjustRequests.h) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -49,13 +49,7 @@ */ class MAdjustDisinfectReq : public MModel { public: - enum Options { - eUnknown = -1, - eFlush = 0, - eHeat = 1, - eChemical = 2, - }; - Options mState = eUnknown; + GuiDisinfectDGStates mState = GuiDisinfectDGStates::DG_DISINFECT_STATE_UNKNOWN; // coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. @@ -96,5 +90,5 @@ } -typedef Model:: MAdjustDisinfectReq AdjustDisinfectRequestData; -typedef Model:: MAdjustDisinfectChemicalConfirmReq AdjustDisinfectChemicalConfirmRequestData; +typedef Model:: MAdjustDisinfectReq AdjustDisinfectRequestData; +typedef Model:: MAdjustDisinfectChemicalConfirmReq AdjustChemicalConfirmRequestData; Index: sources/view/VView.h =================================================================== diff -u -r2c3846821eda0903c34bb5fcf2aebcbde2d0343a -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/view/VView.h (.../VView.h) (revision 2c3846821eda0903c34bb5fcf2aebcbde2d0343a) +++ sources/view/VView.h (.../VView.h) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -113,6 +113,7 @@ REGISTER_TYPE( VPreTreatmentStates ) \ REGISTER_TYPE( VHDTreatmentStates ) \ REGISTER_TYPE( VPostTreatmentStates ) \ + REGISTER_TYPE( VDisinfectStates ) \ /* In-Treatment - Data */ \ REGISTER_TYPE( VTreatmentBloodFlow ) \ REGISTER_TYPE( VTreatmentDialysateFlow ) \ @@ -173,5 +174,6 @@ /* Disinfection */ \ REGISTER_TYPE( VDisinfectDGData ) \ REGISTER_TYPE( VDisinfectAdjustDisinfect ) \ + REGISTER_TYPE( VDisinfectAdjustChemicalConfirm ) \ //--------------------------------------------------------------------------------// Index: sources/view/dg/data/disinfect/VDisinfectDGData.cpp =================================================================== diff -u -rc71946746586d5a4061ad866ce7dbbaf74b9798a -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/view/dg/data/disinfect/VDisinfectDGData.cpp (.../VDisinfectDGData.cpp) (revision c71946746586d5a4061ad866ce7dbbaf74b9798a) +++ sources/view/dg/data/disinfect/VDisinfectDGData.cpp (.../VDisinfectDGData.cpp) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -20,19 +20,17 @@ VIEW_DEF_CLASS(VDisinfectDGData) void View::VDisinfectDGData::initConnections() { - ACTION_VIEW_CONNECTION( DisinfectDGFlushData ); + ACTION_VIEW_CONNECTION( DisinfectDGFlushTimeData ); ACTION_VIEW_CONNECTION( DisinfectDGHeatTimeData ); - ACTION_VIEW_CONNECTION( DisinfectDGHeatTemperatureData ); ACTION_VIEW_CONNECTION( DisinfectDGChemicalTimeData ); - ACTION_VIEW_CONNECTION( DisinfectDGChemicalTBDData ); } /*! * \brief View::VDisinfectDGData::onActionReceive * \details received response model data handler * \param vData - model data */ -void View::VDisinfectDGData::onActionReceive(const DisinfectDGFlushData &vData) +void View::VDisinfectDGData::onActionReceive(const DisinfectDGFlushTimeData &vData) { flushTimeTotal (vData.mTimeout ); flushTimeRemaining (vData.mCountdown ); @@ -56,31 +54,9 @@ * \details received response model data handler * \param vData - model data */ -void View::VDisinfectDGData::onActionReceive(const DisinfectDGHeatTemperatureData &vData) -{ - heatTemperatureTarget (vData.mTarget ); - heatTemperatureValue (vData.mValue ); -} - -/*! - * \brief View::VDisinfectDGData::onActionReceive - * \details received response model data handler - * \param vData - model data - */ void View::VDisinfectDGData::onActionReceive(const DisinfectDGChemicalTimeData &vData) { chemicalTimeTotal (vData.mTimeout ); chemicalTimeRemaining (vData.mCountdown ); chemicalTimeElapsed (vData.mTimeout - vData.mCountdown ); } - -/*! - * \brief View::VDisinfectDGData::onActionReceive - * \details received response model data handler - * \param vData - model data - */ -void View::VDisinfectDGData::onActionReceive(const DisinfectDGChemicalTBDData &vData) -{ - chemicalTBDTarget (vData.mTarget ); - chemicalTBDValue (vData.mValue ); -} Index: sources/view/dg/data/disinfect/VDisinfectDGData.h =================================================================== diff -u -rc71946746586d5a4061ad866ce7dbbaf74b9798a -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/view/dg/data/disinfect/VDisinfectDGData.h (.../VDisinfectDGData.h) (revision c71946746586d5a4061ad866ce7dbbaf74b9798a) +++ sources/view/dg/data/disinfect/VDisinfectDGData.h (.../VDisinfectDGData.h) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -20,11 +20,9 @@ // Project #include "main.h" // Doxygen : don't remove #include "VView.h" -#include "MDisinfectDGFlushData.h" +#include "MDisinfectDGFlushTimeData.h" #include "MDisinfectDGHeatTimeData.h" -#include "MDisinfectDGHeatTemperatureData.h" #include "MDisinfectDGChemicalTimeData.h" -#include "MDisinfectDGChemicalTBDData.h" // namespace namespace View { @@ -40,33 +38,23 @@ { Q_OBJECT - // DisinfectDGFlushData - PROPERTY( quint32 , flushTimeTotal , 0) - PROPERTY( quint32 , flushTimeRemaining , 0) - PROPERTY( quint32 , flushTimeElapsed , 0) + // DisinfectDGFlushTimeData + PROPERTY( quint32 , flushTimeTotal , 0 ) + PROPERTY( quint32 , flushTimeRemaining , 0 ) + PROPERTY( quint32 , flushTimeElapsed , 0 ) // DisinfectDGHeatTimeData - PROPERTY( quint32 , heatTimeTotal , 0) - PROPERTY( quint32 , heatTimeRemaining , 0) - PROPERTY( quint32 , heatTimeElapsed , 0) - // DisinfectDGHeatTemperatureData - PROPERTY( float , heatTemperatureTarget , 0) - PROPERTY( float , heatTemperatureValue , 0) + PROPERTY( quint32 , heatTimeTotal , 0 ) + PROPERTY( quint32 , heatTimeRemaining , 0 ) + PROPERTY( quint32 , heatTimeElapsed , 0 ) // DisinfectDGChemicalTimeData - PROPERTY( quint32 , chemicalTimeTotal , 0) - PROPERTY( quint32 , chemicalTimeRemaining , 0) - PROPERTY( quint32 , chemicalTimeElapsed , 0) - // DisinfectDGChemicalTBDData - PROPERTY( float , chemicalTBDTarget , 0) - PROPERTY( float , chemicalTBDValue , 0) + PROPERTY( quint32 , chemicalTimeTotal , 0 ) + PROPERTY( quint32 , chemicalTimeRemaining , 0 ) + PROPERTY( quint32 , chemicalTimeElapsed , 0 ) - - - VIEW_DEC_CLASS(VDisinfectDGData ) - VIEW_DEC_SLOT (DisinfectDGFlushData ) + VIEW_DEC_SLOT (DisinfectDGFlushTimeData ) VIEW_DEC_SLOT (DisinfectDGHeatTimeData ) - VIEW_DEC_SLOT (DisinfectDGHeatTemperatureData ) VIEW_DEC_SLOT (DisinfectDGChemicalTimeData ) - VIEW_DEC_SLOT (DisinfectDGChemicalTBDData ) }; + } Index: sources/view/dg/data/disinfect/VDisinfectStatesData.cpp =================================================================== diff -u --- sources/view/dg/data/disinfect/VDisinfectStatesData.cpp (revision 0) +++ sources/view/dg/data/disinfect/VDisinfectStatesData.cpp (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -0,0 +1,81 @@ +/*! + * + * Copyright (c) 2019-2020 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 VDisinfectStatesData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 21-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 21-Apr-2021 + * + */ +#include "VDisinfectStatesData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VDisinfectStates, DisinfectStatesData) + + +/*! + * \brief VHDTreatmentStates::onActionReceive + * \details sets the properties for the received data of Treatment States + * \param vData - Treatment States data + */ +void VDisinfectStates::onActionReceive(const DisinfectStatesData &vData) +{ + subMode ( vData.mSubMode ); + flushState ( vData.mFlushStates ); + heatState ( vData.mHeatStates ); + chemicalState ( vData.mChemicalStates ); + + // Flush Mode + bool mFlush = vData.mSubMode == GuiDisinfectDGStates ::DG_DISINFECT_STATE_FLUSH ; + if ( mFlush ) { + /* No FW implementation yet */ + } + flush( mFlush ); + + // Heat Mode + bool mHeat = vData.mSubMode == GuiDisinfectDGStates ::DG_DISINFECT_STATE_HEAT ; + if ( mHeat ) { + start ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_START ); + drainR1 ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_DRAIN_R1 ); + drainR2 ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_DRAIN_R2 ); + flushDrain ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_FLUSH_DRAIN ); + flushCirculation ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_FLUSH_CIRCULATION ); + flushR1R2 ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_FLUSH_R1_AND_R2 ); + flushR2DrainR1 ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_FLUSH_R2_AND_DRAIN_R1 ); + flushDrainR2 ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_FLUSH_DRAIN_R2 ); + flushDrainR1 ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_FLUSH_DRAIN_R1 ); + fillWithWater ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_FILL_WITH_WATER ); + disinfectR1R2 ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_DISINFECT_R1_TO_R2 ); + fillR2WithHotWater ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_FILL_R2_WITH_HOT_WATER ); + disinfectR2R1 ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_DISINFECT_R2_TO_R1 ); + cooldownHeaters ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_COOL_DOWN_HEATERS ); + cooldownRoFilter ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_COOL_DOWN_RO_FILTER ); + mixDrainR1 ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_MIX_DRAIN_R1 ); + mixDrainR2 ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_MIX_DRAIN_R2 ); + rinseR1ToR2 ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_RINSE_R1_TO_R2 ); + rinseR2ToR1DrainR1 ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_RINSE_R2_TO_R1_AND_DRAIN_R1 ); + rinseCirculation ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_RINSE_CIRCULATION ); + cancelBasicPath ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_CANCEL_BASIC_PATH ); + cancelWaterPath ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_CANCEL_WATER_PATH ); + complete ( vData.mHeatStates == GuiDisinfectDGHeatStates ::DG_HEAT_DISINFECT_STATE_COMPLETE ); + } + heat( mHeat ); + + // Chemical Mode + bool mChemical = vData.mSubMode == GuiDisinfectDGStates ::DG_DISINFECT_STATE_CHEM ; + if ( mChemical ) { + /* No FW implementation yet */ + } + chemical( mChemical ); + + // *** Only for test *** + // Be careful it is always triggered on each message. + state(true); +} Index: sources/view/dg/data/disinfect/VDisinfectStatesData.h =================================================================== diff -u --- sources/view/dg/data/disinfect/VDisinfectStatesData.h (revision 0) +++ sources/view/dg/data/disinfect/VDisinfectStatesData.h (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -0,0 +1,80 @@ +/*! + * + * Copyright (c) 2019-2020 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 VDisinfectStatesData.h + * \author (last) Behrouz NematiPour + * \date (last) 21-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 21-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MDisinfectStatesData.h" + +// namespace +namespace View { + +/*! + * \brief The VDisinfectStates class + * \details View for Model's data representation. + * + * \sa Model::MDisinfectStates + * + */ +class VDisinfectStates : public QObject +{ + Q_OBJECT + + // *** Only for test *** + // Be careful it is always triggered on each message. + TRIGGER ( bool , state , false ) // changes in case any message received. + + PROPERTY( quint8 , subMode , 0 ) ///< /* No FW enumeration yet */ + PROPERTY( quint8 , flushState , 0 ) ///< /* No FW enumeration yet */ + PROPERTY( quint8 , heatState , 0 ) ///< /* No FW enumeration yet */ + PROPERTY( quint8 , chemicalState , 0 ) ///< /* No FW enumeration yet */ + + // Start disinfection mode state + PROPERTY( bool , flush , false ) ///< /* No FW enumeration yet */ + PROPERTY( bool , heat , false ) ///< /* No FW enumeration yet */ + PROPERTY( bool , chemical , false ) ///< /* No FW enumeration yet */ + + // Heat disinfection state + STATE ( bool , start , false ) ///< DG_HEAT_DISINFECT_STATE_START , Heat disinfect, start mode state + STATE ( bool , drainR1 , false ) ///< DG_HEAT_DISINFECT_STATE_DRAIN_R1 , Heat disinfect, drain R1 state + STATE ( bool , drainR2 , false ) ///< DG_HEAT_DISINFECT_STATE_DRAIN_R2 , Heat disinfect, drain R2 state + STATE ( bool , flushDrain , false ) ///< DG_HEAT_DISINFECT_STATE_FLUSH_DRAIN , Heat disinfect, flush drain state + STATE ( bool , flushCirculation , false ) ///< DG_HEAT_DISINFECT_STATE_FLUSH_CIRCULATION , Heat disinfect, flush circulation state + STATE ( bool , flushR1R2 , false ) ///< DG_HEAT_DISINFECT_STATE_FLUSH_R1_AND_R2 , Heat disinfect, flush R1 and R2 state + STATE ( bool , flushR2DrainR1 , false ) ///< DG_HEAT_DISINFECT_STATE_FLUSH_R2_AND_DRAIN_R1 , Heat disinfect, flush R2 and drain R1 state + STATE ( bool , flushDrainR2 , false ) ///< DG_HEAT_DISINFECT_STATE_FLUSH_DRAIN_R2 , Heat disinfect, flush drain R2 state + STATE ( bool , flushDrainR1 , false ) ///< DG_HEAT_DISINFECT_STATE_FLUSH_DRAIN_R1 , Heat disinfect, flush drain R1 state + STATE ( bool , fillWithWater , false ) ///< DG_HEAT_DISINFECT_STATE_FILL_WITH_WATER , Heat disinfect, fill with water state + STATE ( bool , disinfectR1R2 , false ) ///< DG_HEAT_DISINFECT_STATE_DISINFECT_R1_TO_R2 , Heat disinfect, disinfect R1 to R2 state + STATE ( bool , fillR2WithHotWater , false ) ///< DG_HEAT_DISINFECT_STATE_FILL_R2_WITH_HOT_WATER , Heat disinfect, fill R2 with hot water state + STATE ( bool , disinfectR2R1 , false ) ///< DG_HEAT_DISINFECT_STATE_DISINFECT_R2_TO_R1 , Heat disinfect, disinfect R2 to R1 state + STATE ( bool , cooldownHeaters , false ) ///< DG_HEAT_DISINFECT_STATE_COOL_DOWN_HEATERS , Heat disinfect, cool down heaters state + STATE ( bool , cooldownRoFilter , false ) ///< DG_HEAT_DISINFECT_STATE_COOL_DOWN_RO_FILTER , Heat disinfect, cool down RO filter state + STATE ( bool , mixDrainR1 , false ) ///< DG_HEAT_DISINFECT_STATE_MIX_DRAIN_R1 , Heat disinfect, mix drain R1 state + STATE ( bool , mixDrainR2 , false ) ///< DG_HEAT_DISINFECT_STATE_MIX_DRAIN_R2 , Heat disinfect, mix drain R2 state + STATE ( bool , rinseR1ToR2 , false ) ///< DG_HEAT_DISINFECT_STATE_RINSE_R1_TO_R2 , Heat disinfect, rinse R1 to R2 state + STATE ( bool , rinseR2ToR1DrainR1 , false ) ///< DG_HEAT_DISINFECT_STATE_RINSE_R2_TO_R1_AND_DRAIN_R1 , Heat disinfect, rinse R2 to R1 and drain R1 state + STATE ( bool , rinseCirculation , false ) ///< DG_HEAT_DISINFECT_STATE_RINSE_CIRCULATION , Heat disinfect, rinse circulation state + STATE ( bool , cancelBasicPath , false ) ///< DG_HEAT_DISINFECT_STATE_CANCEL_BASIC_PATH , Heat disinfect, cancel mode basic path state + STATE ( bool , cancelWaterPath , false ) ///< DG_HEAT_DISINFECT_STATE_CANCEL_WATER_PATH , Heat disinfect, cancel mode water path state + STATE ( bool , complete , false ) ///< DG_HEAT_DISINFECT_STATE_COMPLETE , Heat disinfect, complete state + + VIEW_DEC(VDisinfectStates, DisinfectStatesData) +}; +} Index: sources/view/hd/adjustment/disinfect/VDisinfectAdjustChemicalConfirm.cpp =================================================================== diff -u --- sources/view/hd/adjustment/disinfect/VDisinfectAdjustChemicalConfirm.cpp (revision 0) +++ sources/view/hd/adjustment/disinfect/VDisinfectAdjustChemicalConfirm.cpp (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -0,0 +1,53 @@ +/*! + * + * Copyright (c) 2019-2020 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 VDisinfectAdjustChemicalConfirm.cpp + * \author (last) Behrouz NematiPour + * \date (last) 21-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 21-Apr-2021 + * + */ +#include "VDisinfectAdjustChemicalConfirm.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VDisinfectAdjustChemicalConfirm) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VDisinfectAdjustChemicalConfirm::initConnections() { + ADJUST_VIEW_CONNECTION(AdjustChemicalConfirmRequestData ); + ACTION_VIEW_CONNECTION(AdjustChemicalConfirmResponseData); +} + +/*! + * \brief VDisinfectAdjustChemicalConfirm::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VDisinfectAdjustChemicalConfirm::onActionReceive(const AdjustChemicalConfirmResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the Previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VDisinfectAdjustChemicalConfirm::doConfirm + * \details the invocable slot to send user's Disinfect Chemical Confirm + */ +void View::VDisinfectAdjustChemicalConfirm::doConfirm() { + AdjustChemicalConfirmRequestData data; + emit didAdjustment(data); +} + Index: sources/view/hd/adjustment/disinfect/VDisinfectAdjustChemicalConfirm.h =================================================================== diff -u --- sources/view/hd/adjustment/disinfect/VDisinfectAdjustChemicalConfirm.h (revision 0) +++ sources/view/hd/adjustment/disinfect/VDisinfectAdjustChemicalConfirm.h (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -0,0 +1,61 @@ +/*! + * + * Copyright (c) 2019-2020 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 VDisinfectAdjustChemicalConfirm.h + * \author (last) Behrouz NematiPour + * \date (last) 21-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 21-Apr-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VAdjustmentResponseBase.h" +#include "MDisinfectAdjustRequests.h" +#include "MDisinfectAdjustChemicalConfirmResponse.h" + +namespace View { + +/*! + * \brief The VDisinfectAdjustDisinfect class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustDisposablesRemovalConfirmResponse + * + */ +class VDisinfectAdjustChemicalConfirm : public VAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VDisinfectAdjustChemicalConfirm, AdjustChemicalConfirmResponseData) + +public slots: + void doConfirm(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's Disinfect Chemical Confirm + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustChemicalConfirmRequestData &vData); +}; +} Index: sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.cpp =================================================================== diff -u -r2c3846821eda0903c34bb5fcf2aebcbde2d0343a -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.cpp (.../VDisinfectAdjustDisinfect.cpp) (revision 2c3846821eda0903c34bb5fcf2aebcbde2d0343a) +++ sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.cpp (.../VDisinfectAdjustDisinfect.cpp) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -24,7 +24,6 @@ */ void View::VDisinfectAdjustDisinfect::initConnections() { ADJUST_VIEW_CONNECTION(AdjustDisinfectRequestData); - ADJUST_VIEW_CONNECTION(AdjustDisinfectChemicalConfirmRequestData); ACTION_VIEW_CONNECTION(AdjustDisinfectResponseData); } @@ -38,6 +37,10 @@ adjustment_Accepted ( vData.mAccepted ); adjustment_Reason ( vData.mReason ); + flush ( _data.mState == GuiDisinfectDGStates::DG_DISINFECT_STATE_FLUSH ); + heat ( _data.mState == GuiDisinfectDGStates::DG_DISINFECT_STATE_HEAT ); + chemical ( _data.mState == GuiDisinfectDGStates::DG_DISINFECT_STATE_CHEM ); + // *** has to be the last to let the information to be set and then emit the signal *** // *** otherwise will use the Previous values before being set. *** adjustment ( true ); @@ -49,9 +52,8 @@ */ void View::VDisinfectAdjustDisinfect::doFlush() { - AdjustDisinfectRequestData data; - data.mState = AdjustDisinfectRequestData::eFlush; - emit didAdjustment(data); + _data.mState = GuiDisinfectDGStates::DG_DISINFECT_STATE_FLUSH; + emit didAdjustment(_data); } /*! @@ -60,9 +62,8 @@ */ void View::VDisinfectAdjustDisinfect::doDisinfectHeat() { - AdjustDisinfectRequestData data; - data.mState = AdjustDisinfectRequestData::eHeat; - emit didAdjustment(data); + _data.mState = GuiDisinfectDGStates::DG_DISINFECT_STATE_HEAT; + emit didAdjustment(_data); } /*! @@ -71,17 +72,6 @@ */ void View::VDisinfectAdjustDisinfect::doDisinfectChemical() { - AdjustDisinfectRequestData data; - data.mState = AdjustDisinfectRequestData::eChemical; - emit didAdjustment(data); + _data.mState = GuiDisinfectDGStates::DG_DISINFECT_STATE_CHEM; + emit didAdjustment(_data); } - -/*! - * \brief View::VDisinfectAdjustDisinfect::doDisinfectChemicalConfirm - * \details the invocable slot to send user's Disinfect Chemical Confirm - */ -void View::VDisinfectAdjustDisinfect::doDisinfectChemicalConfirm() { - AdjustDisinfectChemicalConfirmRequestData data; - emit didAdjustment(data); -} - Index: sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.h =================================================================== diff -u -r2c3846821eda0903c34bb5fcf2aebcbde2d0343a -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.h (.../VDisinfectAdjustDisinfect.h) (revision 2c3846821eda0903c34bb5fcf2aebcbde2d0343a) +++ sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.h (.../VDisinfectAdjustDisinfect.h) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -7,9 +7,9 @@ * * \file VDisinfectAdjustDisinfect.h * \author (last) Behrouz NematiPour - * \date (last) 18-Apr-2021 + * \date (last) 21-Apr-2021 * \author (original) Behrouz NematiPour - * \date (original) 18-Apr-2021 + * \date (original) 21-Apr-2021 * */ #pragma once @@ -38,20 +38,25 @@ // friends friend class ::tst_views; + AdjustDisinfectRequestData _data; + // coco begin validated: // The property adjustment_Triggered has to be always true // and to always trigger the change event to work as a notifier for GUI // has been manually tested that it works perfectly fine TRIGGER( bool , adjustment , 0) // coco end + PROPERTY( bool , flush , 0) + PROPERTY( bool , heat , 0) + PROPERTY( bool , chemical , 0) + VIEW_DEC_CLASS_ADJUSTMENT(VDisinfectAdjustDisinfect, AdjustDisinfectResponseData) public slots: void doFlush (); void doDisinfectHeat (); void doDisinfectChemical (); - void doDisinfectChemicalConfirm(); signals: /*! @@ -60,12 +65,5 @@ * \param vData - data model includes request information */ void didAdjustment(const AdjustDisinfectRequestData &vData); - - /*! - * \brief didAdjustment - * \details the notification signal to send the user's Disinfect Chemical Confirm - * \param vData - data model includes request information - */ - void didAdjustment(const AdjustDisinfectChemicalConfirmRequestData &vData); }; } Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp =================================================================== diff -u -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 -re125bd5cf13750eaf241d518b9c846139afaa81c --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (.../VPostTreatmentAdjustTreatmentLog.cpp) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (.../VPostTreatmentAdjustTreatmentLog.cpp) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) @@ -75,43 +75,6 @@ mParametersText += mStr.arg(vData.mWaterSampleTestResult ); parametersText( mParametersText ); - // Titles - QStringList mParametersTitle; - mParametersTitle += tr("Blood Flow Rate" ); - mParametersTitle += tr("Dialysate Flow Rate" ); - mParametersTitle += tr("Treatment Duration" ); - mParametersTitle += tr("Actual Treatment Duration" ); - mParametersTitle += tr("Acid ConcentrateType" ); - mParametersTitle += tr("Bicarbonate Concentrate Type"); - mParametersTitle += tr("Potassium Concentration" ); - mParametersTitle += tr("Calcium Concentration" ); - mParametersTitle += tr("Bicarbonate Concentration" ); - mParametersTitle += tr("Sodium Concentration" ); - mParametersTitle += tr("Dialysate Temperature" ); - mParametersTitle += tr("Dialyzer Type" ); - mParametersTitle += tr("Treatment DateTime" ); - mParametersTitle += tr("Average Blood Flow" ); - mParametersTitle += tr("Average Dialysate Flow" ); - mParametersTitle += tr("Dialysate Volume Used" ); - mParametersTitle += tr("Average Dialysate Temp" ); - mParametersTitle += tr("Target UF Volume" ); - mParametersTitle += tr("Actual UF Volume" ); - mParametersTitle += tr("Target UF Rate" ); - mParametersTitle += tr("Actual UF Rate" ); - mParametersTitle += tr("Saline Bolus Volume" ); - mParametersTitle += tr("Heparin Type" ); - mParametersTitle += tr("Heparin Concentration" ); - mParametersTitle += tr("Heparin Bolus Volume" ); - mParametersTitle += tr("Heparin Dispense Rate" ); - mParametersTitle += tr("Heparin Pre-Stop" ); - mParametersTitle += tr("Heparin Delivered Volume" ); - mParametersTitle += tr("Average Arterial Pressure" ); - mParametersTitle += tr("Average Venous Pressure" ); - mParametersTitle += tr("End Treatment Early Alarm" ); - mParametersTitle += tr("Device ID" ); - mParametersTitle += tr("Water Sample Test Result" ); - parametersTitle( mParametersTitle ); - // raw values bloodFlowRate ( vData.mBloodFlowRate ); dialysateFlowRate ( vData.mDialysateFlowRate );