Index: leahi.pro =================================================================== diff -u -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- leahi.pro (.../leahi.pro) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) +++ leahi.pro (.../leahi.pro) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -183,6 +183,7 @@ sources/model/td/adjustment/treatment/MTreatmentAdjustAutoSubResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustHDFResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustHDFStateResponse.h \ + sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFStateResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustPressuresWideningResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustVitalsAlarmLimitsResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustVitalsResponse.h \ @@ -267,10 +268,10 @@ sources/view/fp/data/VFPTemperatureData.h \ sources/view/settings/VAdjustmentAdvancedInstitutionalRecord.h \ sources/view/settings/VAdvancedInstitutionalRecord.h \ + sources/view/settings/VCalibrationSettings.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentAutoSub.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDF.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDFState.h \ - sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresWidening.h \ sources/view/td/data/VTDAirBubbleData.h \ sources/view/td/data/VTDAirPumpData.h \ sources/view/td/data/VTDAirTrapData.h \ @@ -308,6 +309,8 @@ sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFDurationEdit.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFVolumeEdit.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFConfirm.h \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFState.h \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresWidening.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentSaline.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentSetPoints.h \ @@ -560,6 +563,7 @@ sources/model/td/adjustment/settings/MAdjustTDVersionsRequest.cpp \ sources/model/td/adjustment/settings/MAdjustTDVersionsResponse.cpp \ sources/model/td/adjustment/settings/MTDAdvancedInstitutionalRecordResponse.cpp \ + sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFStateResponse.cpp \ sources/model/td/adjustment/treatment/MTreatmentAdjustAutoSubResponse.cpp \ sources/model/td/adjustment/treatment/MTreatmentAdjustHDFResponse.cpp \ sources/model/td/adjustment/treatment/MTreatmentAdjustHDFStateResponse.cpp \ @@ -753,10 +757,10 @@ \ # ---------- Views - TD - States Data sources/view/settings/VAdjustmentAdvancedInstitutionalRecord.cpp \ sources/view/settings/VAdvancedInstitutionalRecord.cpp \ + sources/view/settings/VCalibrationSettings.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentAutoSub.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDF.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDFState.cpp \ - sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresWidening.cpp \ sources/view/td/data/VTDAirBubbleData.cpp \ sources/view/td/data/VTDAirPumpData.cpp \ sources/view/td/data/VTDAirTrapData.cpp \ @@ -794,6 +798,8 @@ sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFDurationEdit.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFVolumeEdit.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFConfirm.cpp \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFState.cpp \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresWidening.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentSaline.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentSetPoints.cpp \ Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -371,6 +371,19 @@ /*! * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Isolated Ultrafiltration State Adjustment Denali message. + * \param vData - Data model contains treatment ultrafiltration state adjustment + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustIsolatedUFStateRequestData &vData) +{ + QVariantList mData; + mData += vData.requestedState; + actionTransmit(GuiActionType::ID_AdjustIsoUFStateReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment * \details This method transmits the Ultrafiltration Adjustment Denali message. * \param vData - Data model contains treatment ultrafiltration adjustment volume * \return void Index: sources/canbus/MessageDispatcher.h =================================================================== diff -u -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) +++ sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -145,6 +145,7 @@ GuiActionType::ID_AdjustIsolatedUFDurationEditReq , GuiActionType::ID_AdjustIsolatedUFVolumeEditReq , GuiActionType::ID_AdjustIsolatedUFConfirmReq , + GuiActionType::ID_AdjustIsoUFStateReq , GuiActionType::ID_AdjustSalineReq , GuiActionType::ID_AdjustVitalsReq , GuiActionType::ID_AdjustHeparinReq , Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r85105bf140b9b7c4ffc8f0d176f5f01dd2261867 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 85105bf140b9b7c4ffc8f0d176f5f01dd2261867) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -78,7 +78,7 @@ {Gui::GuiActionType::ID_Saline , 4 * 4 }, // 4 parameters each 4bytes {Gui::GuiActionType::ID_Vitals , 3 * 4 }, // 3 parameters each 4bytes {Gui::GuiActionType::ID_Ultrafiltration , 4 * 4 }, // 4 parameters each 4bytes - {Gui::GuiActionType::ID_IsolatedUF , 4 * 4 }, // 4 parameters each 4bytes + {Gui::GuiActionType::ID_IsolatedUF , 6 * 4 }, // 6 parameters each 4bytes {Gui::GuiActionType::ID_Heparin , 2 * 4 }, // 2 parameters each 4bytes {Gui::GuiActionType::ID_Rinseback , 7 * 4 }, // 6 parameters each 4bytes {Gui::GuiActionType::ID_Recirculate , 1 * 4 }, // 1 parameters each 4bytes @@ -192,6 +192,10 @@ {Gui::GuiActionType::ID_AdjustUltrafiltrationStateRsp , 2 * 4 }, // 2 parameter each 4bytes // ---- + {Gui::GuiActionType::ID_AdjustIsoUFStateReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustIsoUFStateRsp , 2 * 4 }, // 2 parameter each 4bytes + + // ---- {Gui::GuiActionType::ID_AdjustUltrafiltrationEditReq , 1 * 4 }, // 1 parameter each 4bytes {Gui::GuiActionType::ID_AdjustUltrafiltrationEditRsp , 4 * 4 }, // 4 parameters each 4bytes Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -271,6 +271,7 @@ case Gui::GuiActionType::ID_AdjustIsolatedUFDurationEditReq : INTERPRET_TRANSMIT_MESSAGE(AdjustIsolatedUFDurationEditRequestData ); break; case Gui::GuiActionType::ID_AdjustIsolatedUFVolumeEditReq : INTERPRET_TRANSMIT_MESSAGE(AdjustIsolatedUFVolumeEditRequestData ); break; case Gui::GuiActionType::ID_AdjustIsolatedUFConfirmReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustIsolatedUFConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustIsoUFStateReq : INTERPRET_TRANSMIT_MESSAGE(AdjustIsolatedUFStateRequestData ); break; // End-Treatment case Gui::GuiActionType::ID_AdjustRinsebackReq : INTERPRET_TRANSMIT_MESSAGE(AdjustRinsebackRequestData ); break; case Gui::GuiActionType::ID_AdjustRecirculateReq : INTERPRET_TRANSMIT_MESSAGE(AdjustRecirculateRequestData ); break; @@ -560,6 +561,7 @@ case Gui::GuiActionType::ID_AdjustSalineRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustSalineRsp ); break; case Gui::GuiActionType::ID_AdjustVitalsRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustVitalsRsp ); break; case Gui::GuiActionType::ID_AdjustUltrafiltrationStateRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustUltrafiltrationStateRsp ); break; + case Gui::GuiActionType::ID_AdjustIsoUFStateRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustIsoUFStateRsp ); break; case Gui::GuiActionType::ID_AdjustHeparinRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustHeparinRsp ); break; case Gui::GuiActionType::ID_AdjustRinsebackRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustRinsebackRsp ); break; case Gui::GuiActionType::ID_AdjustRecirculateRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustRecirculateRsp ); break; Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -56,6 +56,7 @@ #include "VInstitutionalRecord.h" #include "VAdjustmentAdvancedInstitutionalRecord.h" #include "VAdvancedInstitutionalRecord.h" +#include "VCalibrationSettings.h" // states data #include "VTDOpModeData.h" #include "VPreTreatmentStatesData.h" @@ -159,6 +160,7 @@ #include "VTreatmentAdjustmentIsolatedUFConfirm.h" #include "VTreatmentAdjustmentIsolatedUFDurationEdit.h" #include "VTreatmentAdjustmentIsolatedUFVolumeEdit.h" +#include "VTreatmentAdjustmentIsolatedUFState.h" #include "VTreatmentAdjustmentSetPoints.h" #include "VTreatmentAdjustmentVitalsAlarmLimits.h" #include "VTreatmentAdjustmentAutoSub.h" Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -302,6 +302,9 @@ ID_AdjustIsolatedUFConfirmReq = 0x9F00, // 159 //// ----- @LEAHIZED ID_AdjustIsolatedUFConfirmRsp = 0xA000, // 160 //// ----- @LEAHIZED + ID_AdjustIsoUFStateReq = 0xBA00, // 186 //// ----- @LEAHIZED + ID_AdjustIsoUFStateRsp = 0xBB00, // 187 //// ----- @LEAHIZED + // HDF ID_HDF = 0xBC00, // 188 //// ----- @LEAHIZED @@ -494,6 +497,9 @@ // Ultrafiltration typedef GuiActions::UF_Commands GuiUFCommands; typedef GuiActions::UF_Adjustments GuiUFAdjustment; + // Isolated UF + typedef GuiActions::ISO_UF_Commands GuiIsoUFCommands; + typedef GuiActions::Isolated_UF_States GuiIsoUfState; // Saline typedef GuiActions::Fluid_Bolus_States GuiSalineStates; typedef GuiActions::Fluid_Bolus_Commands GuiSalineCommands; Index: sources/gui/qml/main.qml =================================================================== diff -u -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/gui/qml/main.qml (.../main.qml) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) +++ sources/gui/qml/main.qml (.../main.qml) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -58,6 +58,7 @@ import VCloudSync 0.1 import VHDUsageInfo 0.1 import VInstitutionalRecord 0.1 +import VCalibrationSettings 0.1 import VAdjustmentInstitutionalRecord 0.1 import VAdvancedInstitutionalRecord 0.1 import VAdjustmentAdvancedInstitutionalRecord 0.1 @@ -144,6 +145,7 @@ import VTreatmentAdjustmentIsolatedUFVolumeEdit 0.1 import VTreatmentAdjustmentIsolatedUFConfirm 0.1 import VTreatmentAdjustmentUltrafiltrationState 0.1 +import VTreatmentAdjustmentIsolatedUFState 0.1 import VTreatmentAdjustmentUltrafiltrationEdit 0.1 import VTreatmentAdjustmentUltrafiltrationConfirm 0.1 import VTreatmentAdjustmentPressuresLimits 0.1 @@ -207,6 +209,8 @@ VInstitutionalRecord { id: vInstitutionalRecord } VAdjustmentAdvancedInstitutionalRecord { id: vAdjustmentAdvancedInstitutionalRecord } VAdvancedInstitutionalRecord { id: vAdvancedInstitutionalRecord } + VCalibrationSettings { id: vCalibrationSettings } + //VAdjustIn // ---- States VTDOpMode { id: vTDOpMode @@ -324,6 +328,7 @@ VTreatmentAdjustmentIsolatedUFDurationEdit { id: vTreatmentAdjustmentIsolatedUFDurationEdit } VTreatmentAdjustmentIsolatedUFVolumeEdit { id: vTreatmentAdjustmentIsolatedUFVolumeEdit } VTreatmentAdjustmentIsolatedUFConfirm { id: vTreatmentAdjustmentIsolatedUFConfirm } + VTreatmentAdjustmentIsolatedUFState { id: vTreatmentAdjustmentIsolatedUFState } VTreatmentAdjustmentSaline { id: vTreatmentAdjustmentSaline } VTreatmentAdjustmentVitals { id: vTreatmentAdjustmentVitals } VTreatmentAdjustmentUltrafiltrationState { id: vTreatmentAdjustmentUltrafiltrationState } Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r85105bf140b9b7c4ffc8f0d176f5f01dd2261867 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 85105bf140b9b7c4ffc8f0d176f5f01dd2261867) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -60,8 +60,10 @@ readonly property bool isTreatmentPaused : vTDTreatmentStates.txStop readonly property bool isSBInProgress : ( vTDTreatmentStates.sbRunning || vTDTreatmentStates.sbWaitPump ) readonly property bool isTreatmentEnd : vTDTreatmentStates.txEnd - property int headerMenuIndex : _headerBar.headerMenuIndex + readonly property bool isIsoTreatment : vTDTreatmentStates.txIsolatedUF + property int headerMenuIndex : _headerBar.headerMenuIndex + onHeaderMenuIndexChanged: { switch( _headerBar.currentScreen ) { case HeaderBar.Treatment: Index: sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml =================================================================== diff -u -re7a26aa8823fdabbfb21fe75ea9a581c7d0513b4 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml (.../TreatmentHDFComponent.qml) (revision e7a26aa8823fdabbfb21fe75ea9a581c7d0513b4) +++ sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml (.../TreatmentHDFComponent.qml) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -24,7 +24,11 @@ color : Colors.panelBackgroundColor header.color : Colors.heparinSectionHeader enableDropShadow : false - header.title : qsTr("Hemodiafiltration") + " (" + qsTr("HDF") + ")" + header { + title : qsTr("Hemodiafiltration") + " (" + qsTr("HDF") + ")" + showPauseResume : true + isPaused : vTreatmentHDF.hdfState === TreatmentHDF.Paused + } header.editEnabled : ! isIsoTreatment // LEAHI-PRS-459 contentArea.anchors { @@ -44,28 +48,28 @@ readonly property int topTextFontSize : 25 readonly property int bottomTextFontSize : 60 - readonly property real estimatedSubstitutionVal : 23.0 // TODO update later - readonly property int substitutionRate : 125 // TODO update later + readonly property real estimatedSubstitutionVal : vTreatmentHDF.requestedVolume + readonly property real prescribedSubstitutionVal: vTreatmentCreate.substitutionFluidVolume + readonly property real substitutionRate : vTreatmentHDF.currentRate readonly property real minimum : vTreatmentRanges.substitutionVolumeMin readonly property real maximum : vTreatmentRanges.substitutionVolumeMax readonly property real resolution : vTreatmentRanges.substitutionVolumeRes - readonly property real substitutionValue: 10.0 // TODO update later + readonly property real substitutionValue: vTreatmentHDF.totalVolume - readonly property string statusText : qsTr("Active") - /*isDispensing ? qsTr("Active") : - isPaused ? qsTr("Pause") : - isCompleted ? qsTr("Complete") : qsTr("Active")*/ + readonly property string statusText : vTreatmentHDF.hdfState === TreatmentHDF.Active ? qsTr("Active") : + vTreatmentHDF.hdfState === TreatmentHDF.Paused ? qsTr("Pause") : + vTreatmentHDF.hdfState === TreatmentHDF.Complete ? qsTr("Complete") : Variables.emptyEntry - readonly property string buttonText : qsTr("Pause Substitution Flow") + readonly property bool volumeDeviation: estimatedSubstitutionVal < prescribedSubstitutionVal // LEAHI-PRS-816 + property color statusColor : Colors.transparent readonly property int cellHeight: contentItem.height readonly property int cellWidth : contentItem.width / 2 - _row.spacing - signal substitutionFlowClicked() contentItem: Row { id: _row spacing: Variables.defaultMargin * 2 @@ -84,12 +88,13 @@ topText : qsTr("Estimated Final Substitution Volume") topTextFont.pixelSize : topTextFontSize topTextFont.weight : Font.Medium - bottomText : (_root.estimatedSubstitutionVal).toFixed(Variables.substitutionPrecision) //vTreatmentUltrafiltration.setVolume.toFixed(Variables.substitutionPrecision) + bottomText : (_root.estimatedSubstitutionVal).toFixed(Variables.substitutionPrecision) bottomTextFont.pixelSize: bottomTextFontSize bottomTextFont.weight : Font.Normal leftAlign : true unitText : Variables.unitVolume bottomTextTopMargin : Variables.defaultMargin + bottomTextColor : _root.volumeDeviation ? Colors.pauseColor : Colors.textTextRectLabel } LabelValue { id: _substitutionRate @@ -103,27 +108,30 @@ topText : qsTr("Substitution Rate") topTextFont.pixelSize : topTextFontSize topTextFont.weight : Font.Medium - bottomText : _root.substitutionRate //vTreatmentUltrafiltration.setVolume.toFixed(Variables.substitutionPrecision) + bottomText : _root.substitutionRate.toFixed(Variables.substitutionPrecision) + bottomTextColor : vTreatmentHDF.hdfState === TreatmentHDF.Paused ? Colors.statusTextPaused : Colors.textTextRectLabel bottomTextFont.pixelSize: bottomTextFontSize bottomTextFont.weight : Font.Normal leftAlign : true unitText : Variables.unitTextFlowRate bottomTextTopMargin : Variables.defaultMargin } - ProgressBar { id: _progressbar + ProgressBarEx { id: _progressbar anchors { verticalCenter : parent.verticalCenter right : parent.right } width : parent.width * 0.6 height : 20 decimal : Variables.substitutionPrecision - minimum : _root.minimum - maximum : vTreatmentCreate.substitutionFluidVolume - value : _root.substitutionValue + minimum : 0 + maximum : _root.prescribedSubstitutionVal.toFixed(Variables.substitutionPrecision) + value : _root.substitutionValue.toFixed(Variables.substitutionPrecision) + valueEx : _root.volumeDeviation ? _root.estimatedSubstitutionVal.toFixed(Variables.substitutionPrecision) : 0 + unitText : Variables.unitVolume - color : Colors.progressBarUltrafiltration + color : vTreatmentHDF.hdfState === TreatmentHDF.Paused ? Colors.pauseColor : Colors.progressBarUltrafiltration bgColor : Colors.heparinSectionHeader radius : height showMarker : false @@ -146,7 +154,7 @@ right : parent.right } text : _root.substitutionValue.toFixed(Variables.substitutionPrecision) + " " + Variables.unitVolume - color : Colors.white + color : vTreatmentHDF.hdfState === TreatmentHDF.Paused ? Colors.statusTextPaused : Colors.offWhite font.pixelSize : 40 font.weight : Font.DemiBold } @@ -181,26 +189,6 @@ font.weight : Font.DemiBold } } - - TouchRect { id : _substitutionFlowButton - width : text.implicitWidth + Variables.defaultMargin * 2 - height : 60 - text { - text : _root.buttonText - font.pixelSize : Fonts.fontPixelConfirm - font.weight : Font.Medium - } - - isDefault: true - enabled : ! isIsoTreatment // LEAHI-PRS-459 - - anchors { - bottom : parent.bottom - horizontalCenter: parent.horizontalCenter - } - - onClicked: substitutionFlowClicked() - } } Column { id: _rightColumn @@ -237,14 +225,12 @@ right : _autoSubText.left rightMargin : Variables.defaultMargin } - checked : true // TODO + checked : vTreatmentHDF.autoSubState height : Variables.contentHeight active : ! isIsoTreatment // LEAHI-PRS-459 enabled : active - onClicked: { - print (("Auto Sub Switch set to %1").arg(_autoSubSwitch.checked ? "On" : "Off")) - } + onClicked: vTreatmentAdjustmentAutoSub.doAdjustment( ! _autoSubSwitch.checked ) } } Index: sources/model/MModel.h =================================================================== diff -u -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/model/MModel.h (.../MModel.h) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) +++ sources/model/MModel.h (.../MModel.h) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -165,6 +165,7 @@ #include "MTreatmentAdjustIsolatedUFDurationEditResponse.h" #include "MTreatmentAdjustIsolatedUFVolumeEditResponse.h" #include "MTreatmentAdjustIsolatedUFConfirmResponse.h" +#include "MTreatmentAdjustIsolatedUFStateResponse.h" #include "MTreatmentAdjustSalineResponse.h" #include "MTreatmentAdjustVitalsResponse.h" #include "MTreatmentAdjustHeparinResponse.h" @@ -481,6 +482,7 @@ REGISTER_METATYPE( AdjustDialysateFlowRateRequestData ) \ REGISTER_METATYPE( AdjustDialysateTemperatureRequestData ) \ REGISTER_METATYPE( AdjustUltrafiltrationStateRequestData ) \ + REGISTER_METATYPE( AdjustIsolatedUFStateRequestData ) \ REGISTER_METATYPE( AdjustUltrafiltrationEditRequestData ) \ REGISTER_METATYPE( AdjustUltrafiltrationConfirmRequestData ) \ REGISTER_METATYPE( AdjustIsolatedUFDurationEditRequestData ) \ @@ -533,6 +535,7 @@ REGISTER_METATYPE( AdjustDialysateFlowRateResponseData ) \ REGISTER_METATYPE( AdjustDialysateTemperatureResponseData ) \ REGISTER_METATYPE( AdjustUltrafiltrationStateResponseData ) \ + REGISTER_METATYPE( AdjustIsolatedUFStateResponseData ) \ REGISTER_METATYPE( AdjustUltrafiltrationEditResponseData ) \ REGISTER_METATYPE( AdjustUltrafiltrationConfirmResponseData ) \ REGISTER_METATYPE( AdjustIsolatedUFDurationEditResponseData ) \ @@ -714,6 +717,7 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustDialysateFlowRateResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustDialysateTemperatureResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationStateResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustIsolatedUFStateResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationConfirmResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustIsolatedUFDurationEditResponseData ) \ @@ -771,7 +775,7 @@ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustVitalsAlarmLimitsRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustBloodFlowRateRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustDialysateFlowRateRequestData ) \ - ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustDialysateTemperatureRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustIsolatedUFStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationConfirmRequestData ) \ @@ -970,6 +974,7 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustDialysateFlowRateResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustDialysateTemperatureResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationStateResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustIsolatedUFStateResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationConfirmResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustIsolatedUFDurationEditResponseData ) \ @@ -1051,6 +1056,7 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustDialysateFlowRateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustDialysateTemperatureRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustUltrafiltrationStateRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustIsolatedUFStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustUltrafiltrationConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustIsolatedUFDurationEditRequestData ) \ @@ -1128,6 +1134,7 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustDialysateFlowRateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustDialysateTemperatureRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustUltrafiltrationStateRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustIsolatedUFStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustUltrafiltrationConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustIsolatedUFDurationEditRequestData ) \ @@ -1205,6 +1212,7 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustDialysateFlowRateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustDialysateTemperatureRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationStateRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustIsolatedUFStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustIsolatedUFDurationEditRequestData ) \ @@ -1365,6 +1373,7 @@ ACTION_RECEIVE_SIGNAL( AdjustDialysateFlowRateResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustDialysateTemperatureResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationStateResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustIsolatedUFStateResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationConfirmResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustIsolatedUFDurationEditResponseData ) \ Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h =================================================================== diff -u -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -335,6 +335,33 @@ }; /*! + * \brief The MAdjustIsolatedUFStateReq class + * \details The Iso UF commands request model + * + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | + * |0xBA00| 0x041 | Req | Y | UI | HD | Iso UF Pause/Resume/End | + * + * | Payload || + * | || + * | #1:(U32) | \ref requestedState | + * + */ +class MAdjustIsolatedUFStateReq : public MModel { +public: + +// GuiUFCommands requestedState = GuiUFCommands::UF_CMD_PAUSE; // the requested state. Initially it's running => paused. +// TODO UPDATE + quint32 requestedState = 0; // Pause/ resume/ end + QString toString() { + return toString({requestedState}); + } + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustIsoUFState", vParameters); + } +}; + +/*! * \brief The MAdjustUltrafiltrationEditReq class * \details The ultrafiltration volume change request model * @@ -872,6 +899,7 @@ typedef Model:: MAdjustDialysateFlowRateReq AdjustDialysateFlowRateRequestData; typedef Model:: MAdjustDialysateTemperatureReq AdjustDialysateTemperatureRequestData; typedef Model:: MAdjustUltrafiltrationStateReq AdjustUltrafiltrationStateRequestData; +typedef Model:: MAdjustIsolatedUFStateReq AdjustIsolatedUFStateRequestData; typedef Model:: MAdjustUltrafiltrationEditReq AdjustUltrafiltrationEditRequestData; typedef Model::MAdjustUltrafiltrationConfirmReq AdjustUltrafiltrationConfirmRequestData; typedef Model::MAdjustIsolatedUFDurationEditReq AdjustIsolatedUFDurationEditRequestData; Index: sources/view/VView.h =================================================================== diff -u -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/view/VView.h (.../VView.h) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) +++ sources/view/VView.h (.../VView.h) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -146,6 +146,7 @@ REGISTER_TYPE( VInstitutionalRecord ) \ REGISTER_TYPE( VAdjustmentAdvancedInstitutionalRecord ) \ REGISTER_TYPE( VAdvancedInstitutionalRecord ) \ + REGISTER_TYPE( VCalibrationSettings ) \ /* Alarm */ \ REGISTER_TYPE( VAlarmStatus ) \ REGISTER_TYPE( VAlarmActiveList ) \ @@ -248,6 +249,7 @@ REGISTER_TYPE( VTreatmentAdjustmentIsolatedUFConfirm ) \ REGISTER_TYPE( VTreatmentAdjustmentIsolatedUFDurationEdit ) \ REGISTER_TYPE( VTreatmentAdjustmentIsolatedUFVolumeEdit ) \ + REGISTER_TYPE( VTreatmentAdjustmentIsolatedUFState ) \ REGISTER_TYPE( VTreatmentAdjustmentSetPoints ) \ REGISTER_TYPE( VTreatmentAdjustmentVitalsAlarmLimits ) \ REGISTER_TYPE( VTreatmentHDF ) \ Index: sources/view/td/data/treatment/VTDTreatmentStatesData.cpp =================================================================== diff -u -rabe8e7cfe31d4ac42a9d85f8e5d93fa809025ea9 -r29f591c2ce9d6977f776a1b1925f7f492f217744 --- sources/view/td/data/treatment/VTDTreatmentStatesData.cpp (.../VTDTreatmentStatesData.cpp) (revision abe8e7cfe31d4ac42a9d85f8e5d93fa809025ea9) +++ sources/view/td/data/treatment/VTDTreatmentStatesData.cpp (.../VTDTreatmentStatesData.cpp) (revision 29f591c2ce9d6977f776a1b1925f7f492f217744) @@ -57,12 +57,21 @@ void VTDTreatmentStates::onActionReceive(const TreatmentStatesData &vData) { subMode ( vData.mSubMode ); - ufState ( vData.mIsolatedUFState ); + isoUfState ( vData.mIsolatedUFState ); salineState ( vData.mSalineState ); - salineState ( vData.mSalineState ); + // Isolated Ultrafiltration states + bool mIsoUf = vData.mSubMode == GuiTreatmentStates ::TREATMENT_ISO_UF_STATE ; + if ( mIsoUf ) { + ENUM_CHECK_O( GuiIsoUfState, vData.mIsolatedUFState ) { + ENUM_CHECK ( GuiIsoUfState, ISOALTED_UF_RUNNING_STATE ) + ENUM_CHECK ( GuiIsoUfState, ISOLATED_UF_PAUSE_STATE ) + ENUM_CHECK_C( GuiIsoUfState, NUM_OF_ISOLATED_UF_STATES ) } + ENUM_READ ( GuiIsoUfState, ISOALTED_UF_RUNNING_STATE , isoUfRunning ); + ENUM_READ ( GuiIsoUfState, ISOLATED_UF_PAUSE_STATE , isoUfPaused ); + } + txIsolatedUF ( mIsoUf ); // it's the main dialysis event so moved last to have all the sub-dialysis-states updated prior to. - // Ultrafiltration states // Saline Bolus states ENUM_CHECK_O( GuiSalineStates, vData.mSalineState ) {