Index: SDDs/TreatmentAdjustmentIsolatedUF.png =================================================================== diff -u Binary files differ Index: SDDs/TreatmentAdjustmentIsolatedUF.puml =================================================================== diff -u --- SDDs/TreatmentAdjustmentIsolatedUF.puml (revision 0) +++ SDDs/TreatmentAdjustmentIsolatedUF.puml (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,92 @@ +@startuml Isolated UF Adjustment + + participant TD as TD + participant SW as SW + participant UI as UI + actor USER as US + + 'Possible actions and interaction types + ' TD -> SW: MSG: Message + ' SW -> TD: MSG: Message + ' SW -> UI: CMD: command + ' UI -> SW: ACT: Action + ' US -> UI: User actions are: + ' ENT: User enters a value or string + ' TCH: User touches a button (RadioButton, CheckBox, ...) + ' SET: User sets/slides a slider + ' SCL: User scrolls a flipable area + ' + 'Messages conventions: + '[x \n ,] + '[x \n ,# certain amount of parameters according to the content] + '[x \n ,X The rest of the parameters do not matter.] + + == Open Ultrafiltration Adjustment Screen == + US -> UI: TCH: Click Ultrafiltration Adjustment Button + UI -> US: ACT: Open Ultrafiltration Adjustment Start Screen + + == Isolated UF - Adjustment == + US -> UI: TCH: Click Edit Isolated UF Button + UI -> US: ACT: Open Adjust Isolated UF Duration Screen + US -> UI: SET: Change Isolated UF Duration + US -> UI: TCH: Click Continue Button + UI -> SW: ACT: User Requested Isolated UF Duration Adjustment + SW -> TD: MSG: Isolated UF Duration Change Request [x84: Req #1]\n\ + \t(U32) duration + alt accepted + TD -> SW: MSG: Isolated UF Duration Change Response [x85: Rsp #3]\n\ + \t(U32) accepted=1\n\ + \t(U32) rejectionReason=X\n\ + \t(U32) volumeGoalMax + SW -> UI: CMD: Isolated UF Duration Change Adjustment Triggered + UI -> US: ACT: Open Adjust Isolated UF Volume Goal Screen + US -> UI: SET: Change Isolated UF Volume Goal + US -> UI: TCH: Click Continue Button + UI -> SW: ACT: User Requested Isolated UF Volume Goal Adjustment + SW -> TD: MSG: Isolated UF Volume Goal Change Request [x86: Req #2]\n\ + \t(U32) duration\n\ + \t(U32) volumeGoal + alt accepted + TD -> SW: MSG: Isolated UF Volume Goal Change Response [x87: Rsp #5]\n\ + \t(U32) accepted=1\n\ + \t(U32) rejectionReason=X\n\ + \t(U32) volumeGoal\n\ + \t(U32) duration\n\ + \t(U32) rate + SW -> UI: CMD: Isolated UF Volume Goal Change Adjustment Triggered + UI -> US: ACT: Open Isolated UF Adjustment Confirm Screen + US -> UI: TCH: Click Confirm Button + UI -> SW: ACT: User Confirmed Isolated UF Adjustment + SW -> TD: MSG: Isolated UF Adjustment Confirm Request [x88: Req #0] + alt accepted + TD -> SW: MSG: Isolated UF Adjustment Confirm Response [x89: Rsp #2]\n\ + \t(U32) accepted=1\n\ + \t(U32) rejectionReason=X + SW -> UI: CMD: Isolated UF Adjustement Confirm Triggered + UI -> US: ACT: Close Ultrafiltration Adjustment Screen + else rejected + TD -> SW: MSG: Isolated UF Adjustment Confirm Response [x89: Rsp #2]\n\ + \t(U32) accepted=0\n\ + \t(U32) rejectionReason + SW -> UI: CMD: Isolated UF Adjustement Confirm Triggered + UI -> US: ACT: Display Rejection Reason + end + else rejected + TD -> SW: MSG: Isolated UF Volume Goal Change Response [x87: Rsp #5]\n\ + \t(U32) accepted=0\n\ + \t(U32) rejectionReason\n\ + \t(U32) volumeGoal=X\n\ + \t(U32) duration=X\n\ + \t(U32) rate=X + SW -> UI: CMD: Isolated UF Volume Goal Change Adjustment Triggered + UI -> US: ACT: Display Rejection Reason + end + else rejected + TD -> SW: MSG: Isolated UF Duration Change Response [x85: Rsp #3]\n\ + \t(U32) accepted=0\n\ + \t(U32) rejectionReason\n\ + \t(U32) volumeGoalMax=X + SW -> UI: CMD: Isolated UF Duration Change Adjustment Triggered + UI -> US: ACT: Display Rejection Reason + end +@enduml Index: leahi.pro =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- leahi.pro (.../leahi.pro) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ leahi.pro (.../leahi.pro) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -186,6 +186,7 @@ sources/model/td/data/MTDValvesData.h \ sources/model/td/data/MTDVoltageData.h \ sources/model/td/data/treatment/MTreatmentBloodFlowData.h \ + sources/model/td/data/treatment/MTreatmentIsolatedUFData.h \ sources/model/td/data/treatment/MTreatmentParametersSetPointData.h \ sources/model/td/data/treatment/MTreatmentPressureOcclusionData.h \ sources/model/td/data/treatment/MTreatmentSalineData.h \ @@ -212,6 +213,9 @@ sources/model/td/adjustment/treatment/MTreatmentAdjustDialysateTemperatureResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustDurationConfirmResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustDurationEditResponse.h \ + sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFDurationEditResponse.h \ + sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.h \ + sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFConfirmResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustSalineResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustSetPointsResponse.h \ @@ -246,6 +250,19 @@ sources/view/td/data/VTDBatteryData.h \ sources/view/td/data/VTDEjectorData.h \ sources/view/td/data/VTDOpModeData.h \ + sources/view/td/data/VTDSwitchesData.h \ + sources/view/td/data/VTDTemperatureData.h \ + sources/view/td/data/VTDValvesData.h \ + sources/view/td/data/VTDVoltageData.h \ + \ # ---------- Views - TD - Data - In-Treatment + sources/view/td/data/treatment/VTDTreatmentStatesData.h \ + sources/view/td/data/treatment/VTreatmentBloodFlow.h \ + sources/view/td/data/treatment/VTreatmentIsolatedUFData.h \ + sources/view/td/data/treatment/VTreatmentParametersSetPointData.h \ + sources/view/td/data/treatment/VTreatmentPressureOcclusion.h \ + sources/view/td/data/treatment/VTreatmentSalineData.h \ + sources/view/td/data/treatment/VTreatmentTime.h \ + sources/view/td/data/treatment/VTreatmentUltrafiltrationData.h \ \ # ---------- Views - TD - Adjustment - In-Treatment sources/view/td/adjustment/treatment/VTreatmentAdjustmentBloodFlowRate.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentBolusVolume.h \ @@ -254,6 +271,9 @@ sources/view/td/adjustment/treatment/VTreatmentAdjustmentDurationConfirm.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentDurationEdit.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentFlows.h \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFDurationEdit.h \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFVolumeGoalEdit.h \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFConfirm.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentSaline.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentSetPoints.h \ @@ -474,18 +494,7 @@ sources/utility/format.h \ sources/utility/types.h \ sources/utility/encryption.h \ - sources/utility/qrcodegen.h \ - sources/view/td/data/VTDSwitchesData.h \ - sources/view/td/data/VTDTemperatureData.h \ - sources/view/td/data/VTDValvesData.h \ - sources/view/td/data/VTDVoltageData.h \ - sources/view/td/data/treatment/VTDTreatmentStatesData.h \ - sources/view/td/data/treatment/VTreatmentBloodFlow.h \ - sources/view/td/data/treatment/VTreatmentParametersSetPointData.h \ - sources/view/td/data/treatment/VTreatmentPressureOcclusion.h \ - sources/view/td/data/treatment/VTreatmentSalineData.h \ - sources/view/td/data/treatment/VTreatmentTime.h \ - sources/view/td/data/treatment/VTreatmentUltrafiltrationData.h + sources/utility/qrcodegen.h SOURCES += \ \ # common @@ -534,6 +543,7 @@ sources/model/td/data/MTDValvesData.cpp \ sources/model/td/data/MTDVoltageData.cpp \ sources/model/td/data/treatment/MTreatmentBloodFlowData.cpp \ + sources/model/td/data/treatment/MTreatmentIsolatedUFData.cpp \ sources/model/td/data/treatment/MTreatmentParametersSetPointData.cpp \ sources/model/td/data/treatment/MTreatmentPressureOcclusionData.cpp \ sources/model/td/data/treatment/MTreatmentSalineData.cpp \ @@ -578,6 +588,9 @@ sources/model/td/adjustment/treatment/MTreatmentAdjustDialysateTemperatureResponse.cpp \ sources/model/td/adjustment/treatment/MTreatmentAdjustDurationConfirmResponse.cpp \ sources/model/td/adjustment/treatment/MTreatmentAdjustDurationEditResponse.cpp \ + sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFDurationEditResponse.cpp \ + sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.cpp \ + sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFConfirmResponse.cpp \ sources/model/td/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.cpp \ sources/model/td/adjustment/treatment/MTreatmentAdjustSalineResponse.cpp \ sources/model/td/adjustment/treatment/MTreatmentAdjustSetPointsResponse.cpp \ @@ -709,6 +722,19 @@ sources/view/td/data/VTDBatteryData.cpp \ sources/view/td/data/VTDEjectorData.cpp \ sources/view/td/data/VTDOpModeData.cpp \ + sources/view/td/data/VTDSwitchesData.cpp \ + sources/view/td/data/VTDTemperatureData.cpp \ + sources/view/td/data/VTDValvesData.cpp \ + sources/view/td/data/VTDVoltageData.cpp \ + \ # ---------- Views - TD - Data - In-Treatment + sources/view/td/data/treatment/VTDTreatmentStatesData.cpp \ + sources/view/td/data/treatment/VTreatmentBloodFlow.cpp \ + sources/view/td/data/treatment/VTreatmentIsolatedUFData.cpp \ + sources/view/td/data/treatment/VTreatmentParametersSetPointData.cpp \ + sources/view/td/data/treatment/VTreatmentPressureOcclusion.cpp \ + sources/view/td/data/treatment/VTreatmentSalineData.cpp \ + sources/view/td/data/treatment/VTreatmentTime.cpp \ + sources/view/td/data/treatment/VTreatmentUltrafiltrationData.cpp \ \ # ---------- Views - TD - Adjustment - In-Treatment sources/view/td/adjustment/treatment/VTreatmentAdjustmentBloodFlowRate.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentBolusVolume.cpp \ @@ -717,6 +743,9 @@ sources/view/td/adjustment/treatment/VTreatmentAdjustmentDurationConfirm.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentDurationEdit.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentFlows.cpp \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFDurationEdit.cpp \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFVolumeGoalEdit.cpp \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFConfirm.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentSaline.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentSetPoints.cpp \ @@ -812,18 +841,7 @@ sources/utility/format.cpp \ sources/utility/types.cpp \ sources/utility/encryption.cpp \ - sources/utility/qrcodegen.cpp \ - sources/view/td/data/VTDSwitchesData.cpp \ - sources/view/td/data/VTDTemperatureData.cpp \ - sources/view/td/data/VTDValvesData.cpp \ - sources/view/td/data/VTDVoltageData.cpp \ - sources/view/td/data/treatment/VTDTreatmentStatesData.cpp \ - sources/view/td/data/treatment/VTreatmentBloodFlow.cpp \ - sources/view/td/data/treatment/VTreatmentParametersSetPointData.cpp \ - sources/view/td/data/treatment/VTreatmentPressureOcclusion.cpp \ - sources/view/td/data/treatment/VTreatmentSalineData.cpp \ - sources/view/td/data/treatment/VTreatmentTime.cpp \ - sources/view/td/data/treatment/VTreatmentUltrafiltrationData.cpp + sources/utility/qrcodegen.cpp RESOURCES += \ leahi.qrc Index: leahi.qrc =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- leahi.qrc (.../leahi.qrc) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ leahi.qrc (.../leahi.qrc) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -290,6 +290,9 @@ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationConfirm.qml + sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFDurationEdit.qml + sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFVolumeGoalEdit.qml + sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFConfirm.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitalsInterval.qml Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -360,6 +360,46 @@ /*! * \brief MessageDispatcher::onAdjustment + * \details This method transmits the IsolatedUF Adjustment Denali message. + * \param vData - Data model contains treatment ultrafiltration adjustment volume + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustIsolatedUFDurationEditRequestData &vData) +{ + QVariantList mData; + mData += vData.duration; + onActionTransmit(GuiActionType::ID_AdjustIsolatedUFDurationEditReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the IsolatedUF Adjustment Denali message. + * \param vData - Data model contains treatment ultrafiltration adjustment volume + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustIsolatedUFVolumeGoalEditRequestData &vData) +{ + QVariantList mData; + mData += vData.duration; + mData += vData.volumeGoal; + onActionTransmit(GuiActionType::ID_AdjustIsolatedUFVolumeGoalEditReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the IsolatedUF Adjustment User Confirm message. + * \param vData - treatment isolated UF adjustment user confirm data model + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustIsolatedUFConfirmRequestData &vData) +{ + qDebug() << "*** MessageDispatcher::onAdjustment(AdjustIsolatedUFConfirmRequestData)"; // SQ + Q_UNUSED(vData) + onActionTransmit(GuiActionType::ID_AdjustIsolatedUFConfirmReq, QVariantList()); +} + +/*! + * \brief MessageDispatcher::onAdjustment * \details This method transmits the Alarm Request Silence message. * \param vData - Data model contains the silence request information. * \return void Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -79,6 +79,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_Heparin , 2 * 4 }, // 2 parameters each 4bytes {Gui::GuiActionType::ID_Rinseback , 6 * 4 }, // 6 parameters each 4bytes {Gui::GuiActionType::ID_Recirculate , 2 * 4 }, // 2 parameters each 4bytes @@ -191,6 +192,18 @@ {Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmRsp , 2 * 4 }, // 2 parameters each 4bytes // ---- + {Gui::GuiActionType::ID_AdjustIsolatedUFDurationEditReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustIsolatedUFDurationEditRsp , 3 * 4 }, // 3 parameters each 4bytes + + // ---- + {Gui::GuiActionType::ID_AdjustIsolatedUFVolumeGoalEditReq , 2 * 4 }, // 2 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustIsolatedUFVolumeGoalEditRsp , 5 * 4 }, // 5 parameters each 4bytes + + // ---- + {Gui::GuiActionType::ID_AdjustIsolatedUFConfirmReq , 0 * 4 }, // 0 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustIsolatedUFConfirmRsp , 2 * 4 }, // 2 parameters each 4bytes + + // ---- {Gui::GuiActionType::ID_AdjustPressuresLimitsReq , 4 * 4 }, // 4 parameter each 4bytes {Gui::GuiActionType::ID_AdjustPressuresLimitsRsp , 2 * 4 }, // 2 parameters each 4bytes Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -265,6 +265,9 @@ case Gui::GuiActionType::ID_AdjustUltrafiltrationStateReq : INTERPRET_TRANSMIT_MESSAGE(AdjustUltrafiltrationStateRequestData ); break; case Gui::GuiActionType::ID_AdjustUltrafiltrationEditReq : INTERPRET_TRANSMIT_MESSAGE(AdjustUltrafiltrationEditRequestData ); break; case Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmReq : INTERPRET_TRANSMIT_MESSAGE(AdjustUltrafiltrationConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustIsolatedUFDurationEditReq : INTERPRET_TRANSMIT_MESSAGE(AdjustIsolatedUFDurationEditRequestData ); break; + case Gui::GuiActionType::ID_AdjustIsolatedUFVolumeGoalEditReq : INTERPRET_TRANSMIT_MESSAGE(AdjustIsolatedUFVolumeGoalEditRequestData ); break; + case Gui::GuiActionType::ID_AdjustIsolatedUFConfirmReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustIsolatedUFConfirmRequestData ); break; // End-Treatment case Gui::GuiActionType::ID_AdjustRinsebackReq : INTERPRET_TRANSMIT_MESSAGE(AdjustRinsebackRequestData ); break; case Gui::GuiActionType::ID_AdjustRecirculateReq : INTERPRET_TRANSMIT_MESSAGE(AdjustRecirculateRequestData ); break; @@ -536,6 +539,7 @@ case Gui::GuiActionType::ID_BloodPrime : ok = notify(vMessage, vData, Gui::GuiActionType::ID_BloodPrime ); break; case Gui::GuiActionType::ID_TreatmentStop : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentStop ); break; case Gui::GuiActionType::ID_Ultrafiltration : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Ultrafiltration ); break; + case Gui::GuiActionType::ID_IsolatedUF : ok = notify(vMessage, vData, Gui::GuiActionType::ID_IsolatedUF ); break; case Gui::GuiActionType::ID_TreatmentParametersSetPointData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentParametersSetPointData ); break; // ----- In-Treatment Adjust case Gui::GuiActionType::ID_AdjustDurationEditRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustDurationEditRsp ); break; @@ -554,6 +558,9 @@ 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; case Gui::GuiActionType::ID_AdjustTreatmentEndRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustTreatmentEndRsp ); break; + case Gui::GuiActionType::ID_AdjustIsolatedUFDurationEditRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustIsolatedUFDurationEditRsp ); break; + case Gui::GuiActionType::ID_AdjustIsolatedUFVolumeGoalEditRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustIsolatedUFVolumeGoalEditRsp ); break; + case Gui::GuiActionType::ID_AdjustIsolatedUFConfirmRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustIsolatedUFConfirmRsp ); break; // ----- Post-Treatment Adjust case Gui::GuiActionType::ID_AdjustPatientDisconnectConfirmRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustPatientDisconnectConfirmRsp ); break; Index: sources/canbus/MessageInterpreter.h =================================================================== diff -u -rb80f8f84f21f86ad4c962a2c690447c572498e0b -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/canbus/MessageInterpreter.h (.../MessageInterpreter.h) (revision b80f8f84f21f86ad4c962a2c690447c572498e0b) +++ sources/canbus/MessageInterpreter.h (.../MessageInterpreter.h) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -72,6 +72,8 @@ // ----- Adjustments bool adjustUltrafiltrationEdit (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; bool adjustUltrafiltrationConfirm (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; + bool adjustIsolatedUFEdit (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; + bool adjustIsolatedUFConfirm (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; template bool notify (const Message &vMessage, QVariantList &vData, Gui::GuiActionType vIdCheck) __attribute_warn_unused_result__; Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -128,6 +128,7 @@ #include "VFPBoostPumpData.h" // ----- #include "VTreatmentCreate.h" +#include "VTreatmentIsolatedUFData.h" // ----- In-Treatment Adjustments #include "VTreatmentAdjustmentDurationEdit.h" #include "VTreatmentAdjustmentDurationConfirm.h" @@ -147,6 +148,9 @@ #include "VTreatmentAdjustmentDialysateTemperature.h" #include "VTreatmentAdjustmentDurationConfirm.h" #include "VTreatmentAdjustmentDurationEdit.h" +#include "VTreatmentAdjustmentIsolatedUFConfirm.h" +#include "VTreatmentAdjustmentIsolatedUFDurationEdit.h" +#include "VTreatmentAdjustmentIsolatedUFVolumeGoalEdit.h" #include "VTreatmentAdjustmentSetPoints.h" // ----- Post-Treatment Adjustments #include "VPostTreatmentAdjustPatientDisconnectionConfirm.h" Index: sources/gui/GuiGlobals.h =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -84,9 +84,9 @@ // POST ID_HDPostSingleResultData = 0x8E0F, // 142 //// ----- @CRAPIZED: had to change to avoid duplication ID_HDPostFinalResultData = 0x8F00, // 143 - ID_DGPostSingleResultData = 0x9000, // 144 - ID_DGPostFinalResultData = 0x9100, // 145 - ID_UIPostFinalResultData = 0x9200, // 146 // ID_UIFinalResultTxr - UI Final Result response/Data transmit + ID_DGPostSingleResultData = 0x900F, // 144 //// ----- @CRAPIZED: had to change to avoid duplication + ID_DGPostFinalResultData = 0x910F, // 145 //// ----- @CRAPIZED: had to change to avoid duplication + ID_UIPostFinalResultData = 0x920F, // 146 // ID_UIFinalResultTxr - UI Final Result response/Data transmit ID_UIPostFinalResultHDReq = 0xB200, // 178 // ID_HDFinalResultRxq - HD Final Result request received // ----- Settings @@ -137,6 +137,7 @@ ID_Saline = 0x3D00, // 61 //// ----- @LEAHIZED ID_Ultrafiltration = 0x3E00, // 62 //// ----- @LEAHIZED ID_Heparin = 0x8C00, // 140 + ID_IsolatedUF = 0x9000, // 144 ID_Rinseback = 0x5600, // 86 ID_Recirculate = 0x5A00, // 90 ID_BloodPrime = 0x5900, // 89 @@ -282,6 +283,15 @@ ID_AdjustUltrafiltrationConfirmReq = 0x6600, // 102 //// ----- @LEAHIZED ID_AdjustUltrafiltrationConfirmRsp = 0x6700, // 103 //// ----- @LEAHIZED + ID_AdjustIsolatedUFDurationEditReq = 0x9100, // 145 //// ----- @LEAHIZED + ID_AdjustIsolatedUFDurationEditRsp = 0x9200, // 146 //// ----- @LEAHIZED + + ID_AdjustIsolatedUFVolumeGoalEditReq = 0x9300, // 147 //// ----- @LEAHIZED + ID_AdjustIsolatedUFVolumeGoalEditRsp = 0x9400, // 148 //// ----- @LEAHIZED + + ID_AdjustIsolatedUFConfirmReq = 0x9500, // 149 //// ----- @LEAHIZED + ID_AdjustIsolatedUFConfirmRsp = 0x9600, // 150 //// ----- @LEAHIZED + // End-Treatment // Rinseback ID_AdjustRinsebackReq = 0x520F, // 82 //// ----- @CRAPIZED: had to change to avoid duplication Index: sources/gui/qml/components/ProgressBarEx.qml =================================================================== diff -u -r5001ec3cb4b5e76db9fa3c70a36e9c8d64677348 -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/components/ProgressBarEx.qml (.../ProgressBarEx.qml) (revision 5001ec3cb4b5e76db9fa3c70a36e9c8d64677348) +++ sources/gui/qml/components/ProgressBarEx.qml (.../ProgressBarEx.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -24,30 +24,60 @@ * \brief Denali project ProgressBar */ ProgressBar { id: _root - signal extraClicked() + objectName : "_progressBarEx" - property alias valueEx : _progressRectEx.value // for convenience - property alias progressEx : _progressRectEx + property alias valueEx: _progressRectEx.value - minimum : 0 - maximum : 0 + width : Variables.ultrafiltrationProgressBarWidth + height : Variables.ultraFiltrationProgressBarHeight + minimum : 0.0 + maximum : 0.0 + color : Colors.ufProgressBarFill + radius : Variables.ultrafiltrationProgressBarRadius - minText.visible : true - maxText.visible : true + minText { + font { + pixelSize : Fonts.fontPixelUltrafiltrationMinMaxLabel + weight : Font.Normal + } + color : Colors.progressBarMinMax + text : minimum.toFixed(_root.decimal) + " " + Variables.unitVolume + } + maxText { + font { + pixelSize : minText.font.pixelSize + weight : minText.font.weight + } + color : Colors.progressBarMinMax + text : maximum.toFixed(_root.decimal) + " " + Variables.unitVolume + } + marker { + width : Variables.ultrafiltrationRangeMarkerWidth + height : Variables.rangeMarkerHeight + hasHandle : false + valueOnTop : true + decimal : _root.decimal + value : _root.value + text { + anchors.bottomMargin: Variables.ultrafiltrationRangeMarkerTextMargin + font { + pixelSize: Fonts.fontPixelUltrafiltrationRangeMarker + weight: Font.DemiBold + } + } + } + ProgressRect { id: _progressRectEx z : 0 // ProgressBarEx z order in the gui // to be ordred among the components of the parent (ProgressBar) visible : value + color : Colors.ufAdjustmentDeltaFill decimal : _root.decimal minimum : _root.minimum maximum : _root.maximum value : _root.valueEx radius : _root.radius - color : Colors.highlightMedProgressBar margin : 0 - maxText.visible : visible - - onClicked : extraClicked() } } Index: sources/gui/qml/components/RangeMarker.qml =================================================================== diff -u -r0022c3993c47e74c2d17c7f07f78fa1751a034f6 -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/components/RangeMarker.qml (.../RangeMarker.qml) (revision 0022c3993c47e74c2d17c7f07f78fa1751a034f6) +++ sources/gui/qml/components/RangeMarker.qml (.../RangeMarker.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -69,7 +69,7 @@ Text { id: _textValue font { pixelSize : Fonts.fontPixelRangeMarker - weight : Font.Bold + weight : Font.Medium } anchors { right : valueOnTop ? parent.left : undefined Index: sources/gui/qml/compounds/LabelUnitText.qml =================================================================== diff -u -r9976417452cd2e151697108f47483e132ebc0cfc -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/compounds/LabelUnitText.qml (.../LabelUnitText.qml) (revision 9976417452cd2e151697108f47483e132ebc0cfc) +++ sources/gui/qml/compounds/LabelUnitText.qml (.../LabelUnitText.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -22,12 +22,18 @@ Rectangle { id: _root objectName : "_labelUnitText" + enum Layout { + Center, + Justify + } + property alias label : _label.text property alias labelColor : _label.color property string unit : "" property alias value : _value.text property alias valueColor : _value.color property alias valueWidth : _value.width + property int layout : LabelUnitText.Layout.Center width : Variables.adjustmentLabelUnitContainerWidth height : Variables.adjustmentLabelUnitContainerHeight @@ -41,7 +47,7 @@ Item { id: _contentItem objectName : "_contentItem" anchors.centerIn: parent - width : childrenRect.width + width : _root.layout === LabelUnitText.Layout.Justify ? (parent.width - (2 * Variables.defaultMargin)) : childrenRect.width height : parent.height Text { id: _label @@ -50,9 +56,10 @@ left : parent.left verticalCenter : parent.verticalCenter } - width : contentWidth + width : contentWidth color : Colors.offWhite font.pixelSize : Fonts.fontPixelContainerTitleSmall + horizontalAlignment: _root.layout === LabelUnitText.Layout.Justify ? Text.AlignRight : Text.AlignLeft } Text { id: _unit @@ -76,6 +83,7 @@ anchors{ left : _unit.right leftMargin : Variables.defaultMargin + right : _root.layout === LabelUnitText.Layout.Justify ? parent.right : undefined baseline : _label.baseline } width : 60 Index: sources/gui/qml/compounds/LabelUnitValueAdjuster.qml =================================================================== diff -u -r47aff3b45afdf9c651a2c40ebeedd8e70d4bbb1e -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/compounds/LabelUnitValueAdjuster.qml (.../LabelUnitValueAdjuster.qml) (revision 47aff3b45afdf9c651a2c40ebeedd8e70d4bbb1e) +++ sources/gui/qml/compounds/LabelUnitValueAdjuster.qml (.../LabelUnitValueAdjuster.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -30,6 +30,7 @@ property alias step : _valueAdjuster.step property alias value : _valueAdjuster.value property alias canOff : _valueAdjuster.canOff + property alias editable : _valueAdjuster.editable width : Variables.adjustmentLabelUnitContainerWidth height : Variables.adjustmentLabelUnitContainerHeight Index: sources/gui/qml/compounds/TreatmentAdjustmentUltrafiltrationMetrics.qml =================================================================== diff -u -r8672e62f205231b08dd7d4a4f6f7f3a60b2c677b -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/compounds/TreatmentAdjustmentUltrafiltrationMetrics.qml (.../TreatmentAdjustmentUltrafiltrationMetrics.qml) (revision 8672e62f205231b08dd7d4a4f6f7f3a60b2c677b) +++ sources/gui/qml/compounds/TreatmentAdjustmentUltrafiltrationMetrics.qml (.../TreatmentAdjustmentUltrafiltrationMetrics.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -26,94 +26,42 @@ * that display the ultrafiltration volume removed and goal. */ Item { id: _root - property real setVolume : 0 - property real volumeRemoved : 0 - property color volumeRemovedColor : Colors.fluidText + property alias leftLabel : _left.label + property alias leftUnit : _left.unit + property alias leftValue : _left.value + property alias leftColor : _left.valueColor + property alias rightLabel : _right.label + property alias rightUnit : _right.unit + property alias rightValue : _right.value + property alias rightColor : _right.valueColor - implicitWidth : (_ufVolumeRemovedItem.width * 2) + Variables.columnSpacing - implicitHeight : _ufVolumeRemovedItem.height + implicitWidth : (_left.width * 2) + Variables.columnSpacing + implicitHeight : _left.height - component ValueItem: Rectangle { id: _valueItem - property alias label : _label.text - property alias value : _value.text - property color textColor : Colors.offWhite - anchors.centerIn : parent - width : 425 - height : Variables.adjustmentLabelUnitContainerHeight - radius : 5 - color : Colors.panelBackgroundColor - border { - width : Variables.panelBorderWidth - color : Colors.panelBorderColor - } - - Item { id: _contentItem - anchors.centerIn: parent - width : childrenRect.width - height : parent.height - - Text { id: _label - anchors { - left : parent.left - verticalCenter : parent.verticalCenter - } - width : contentWidth - color : _valueItem.textColor - font { - pixelSize : 23 - weight : Font.Medium - } - } - - Text { id: _unit - anchors { - left : _label.right - leftMargin : 5 - baseline : _label.baseline - } - width : contentWidth - text : ("(%1) :").arg(Variables.unitVolume) - color : _valueItem.textColor - font { - pixelSize : 20 - } - } - - Text { id: _value - anchors{ - left : _unit.right - leftMargin : 5 - baseline : _label.baseline - } - width : 60 - horizontalAlignment : Text.AlignLeft - color : _valueItem.textColor - font { - pixelSize : Fonts.fontPixelUltrafiltrationAdjustmentMetrics - weight : Font.DemiBold - } - } - } - } - - ValueItem { id: _ufVolumeRemovedItem + LabelUnitText { id: _left + objectName : "_left" anchors { horizontalCenter : parent.horizontalCenter horizontalCenterOffset : -(width + Variables.columnSpacing)/2 verticalCenter : parent.verticalCenter } - label : qsTr("UF Volume Removed") - value : _root.volumeRemoved.toFixed(Variables.ultrafiltrationPrecision) + width : 420 + label : "" + unit : "" + value : "" } - ValueItem { id: _ufVolumeGoalItem + LabelUnitText { id: _right + objectName : "_right" anchors { horizontalCenter : parent.horizontalCenter - horizontalCenterOffset : -(_ufVolumeRemovedItem.anchors.horizontalCenterOffset) + horizontalCenterOffset : (width + Variables.columnSpacing)/2 verticalCenter : parent.verticalCenter } - textColor : _root.volumeRemovedColor + width : _left.width label : qsTr("UF Volume Goal") - value : _root.setVolume.toFixed(Variables.ultrafiltrationPrecision) + unit : Variables.unitVolume + value : _root.rightValue.toFixed(Variables.ultrafiltrationPrecision) + valueColor : Colors.fluidText } } Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -r232dc65ad1d642f750547db6c480da534704a2c4 -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 232dc65ad1d642f750547db6c480da534704a2c4) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -37,7 +37,7 @@ readonly property color backgroundButtonNormal : transparent readonly property color backgroundButtonSelect : "#438FEB" readonly property color backgroundButtonSelectDark : "#135088" // "#214773" - readonly property color backgroundDialog : "#254670" + readonly property color backgroundDialog : "#1B3F66" readonly property color backgroundMenu : "#14314C" readonly property color backgroundMainMenu : "#0F2841" //// ----- @LEAHIZED readonly property color backgroundDottedMenu : "#64809D" @@ -62,7 +62,7 @@ readonly property color dialogValueColor : "#3D8EEF" readonly property color darkDialogColor : "#091E31" - readonly property color backgroundRangeRect : "#3e546e" + readonly property color backgroundRangeRect : "#2E4F76" readonly property color highlightProgressBar : "#3d8eef" readonly property color highlightMedProgressBar : "#1b2b3e" readonly property color textProgressBar : "#88a3c5" Index: sources/gui/qml/globals/Fonts.qml =================================================================== diff -u -r1f9e84f74ead9e10577c8caa204c6eb911e12ab8 -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 1f9e84f74ead9e10577c8caa204c6eb911e12ab8) +++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -82,8 +82,8 @@ readonly property int fontPixelUltrafiltrationAdjustmentMetrics : 30 readonly property int fontPixelUltrafiltrationAdjustmentNotification : 32 readonly property int fontPixelUltrafiltrationAdjustmentConfirmation : 50 - readonly property int fontPixelUltrafiltrationRangeMarker : 32 - readonly property int fontPixelUltrafiltrationMinMaxLabel : 24 + readonly property int fontPixelUltrafiltrationRangeMarker : 24 + readonly property int fontPixelUltrafiltrationMinMaxLabel : 18 readonly property int fontPixelUltrafiltrationRateUnit : 16 readonly property int fontPixelRinsebackAdjustmentButton : 26 Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -81,7 +81,7 @@ readonly property int rangeRectRadius : 2 readonly property int rangeRectTextMargin : 10 readonly property int rangeRectBorderWidth : 2 - readonly property int rangeMarkerHeight : 60 + readonly property int rangeMarkerHeight : 48 readonly property int rangeMarkerHeightMidle : 40 readonly property int rangeMarkerHeightShort : 30 readonly property int rangeMarkerWidth : 2 @@ -136,7 +136,7 @@ readonly property int ultrafiltrationButtonWidth : 300 readonly property int ultrafiltrationButtonHeight : 60 readonly property int ultrafiltrationRangeMarkerWidth : 3 - readonly property int ultrafiltrationRangeMarkerTextMargin : 5 + readonly property int ultrafiltrationRangeMarkerTextMargin : 10 readonly property int silenceIconMargin : 10 readonly property int notificationBarIconMargin : 10 Index: sources/gui/qml/main.qml =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/main.qml (.../main.qml) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/gui/qml/main.qml (.../main.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -69,6 +69,7 @@ // In-Treatment - Data import VTreatmentBloodFlow 0.1 import VTreatmentDialysateFlow 0.1 +import VTreatmentIsolatedUF 0.1 import VTreatmentPressureOcclusion 0.1 import VTreatmentUltrafiltration 0.1 import VTreatmentTime 0.1 @@ -130,6 +131,9 @@ import VTreatmentAdjustmentDialysateFlowRate 0.1 import VTreatmentAdjustmentDialysateTemperature 0.1 import VTreatmentAdjustmentFlows 0.1 +import VTreatmentAdjustmentIsolatedUFDurationEdit 0.1 +import VTreatmentAdjustmentIsolatedUFVolumeGoalEdit 0.1 +import VTreatmentAdjustmentIsolatedUFConfirm 0.1 import VTreatmentAdjustmentUltrafiltrationState 0.1 import VTreatmentAdjustmentUltrafiltrationEdit 0.1 import VTreatmentAdjustmentUltrafiltrationConfirm 0.1 @@ -231,6 +235,7 @@ VTDTemperature { id: vTDTemperature } VTreatmentDialysateFlow { id: vTreatmentDialysateFlow } + VTreatmentIsolatedUF { id: vTreatmentIsolatedUF } VTreatmentPressureOcclusion { id: vTreatmentPressureOcclusion } VTreatmentUltrafiltration { id: vTreatmentUltrafiltration } VTreatmentTime { id: vTreatmentTime } @@ -294,6 +299,9 @@ VTreatmentRanges { id: vTreatmentRanges } VTreatmentAdjustmentBolusVolume { id: vTreatmentAdjustmentBolusVolume } + VTreatmentAdjustmentIsolatedUFDurationEdit { id: vTreatmentAdjustmentIsolatedUFDurationEdit } + VTreatmentAdjustmentIsolatedUFVolumeGoalEdit { id: vTreatmentAdjustmentIsolatedUFVolumeGoalEdit } + VTreatmentAdjustmentIsolatedUFConfirm { id: vTreatmentAdjustmentIsolatedUFConfirm } VTreatmentAdjustmentSaline { id: vTreatmentAdjustmentSaline } VTreatmentAdjustmentVitals { id: vTreatmentAdjustmentVitals } VTreatmentAdjustmentUltrafiltrationState { id: vTreatmentAdjustmentUltrafiltrationState } Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFConfirm.qml =================================================================== diff -u --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFConfirm.qml (revision 0) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFConfirm.qml (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,139 @@ +/*! + * + * Copyright (c) 2020-2025 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 TreatmentAdjustmentIsolatedUFConfirm.qml + * \author (last) Stephen Quong + * \date (last) 08-Oct-2025 + * \author (original) Behrouz NematiPour + * \date (original) 18-May-2020 + * + */ + +// Qt +import QtQuick 2.12 + +// Project + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/compounds" + +/*! + * \brief TreatmentAdjustmentIsolatedUFConfirm.qml is the screen + * to confirm requested changes to the treatment isolated UF settings + */ +Item { id: _root + objectName: "_treatmentAdjustmentIsolatedUFConfirm" // SquishQt testability + + property real volumeGoal : 0.0 + property int duration : 0 + property real rate : 0.0 + + signal confirmVolumeClicked() + + QtObject { id: _private + objectName: "_private" + readonly property real volumeGoal : calculatePrecisionValue(_root.volumeGoal) + readonly property real rate : calculatePrecisionValue(_root.rate) + + readonly property int multiplier : Math.pow(10, Variables.ultrafiltrationPrecision) + function calculatePrecisionValue(value) { + return Math.round(value * multiplier) / multiplier + } + } + + Item { id: _contentArea + objectName: "_contentArea" + anchors { + top : parent.top + bottom : _warningText.top + left : parent.left + right : parent.right + } + + Column { id: _contentColumn + objectName : "_contentColumn" + anchors.centerIn : parent + width : 500 + spacing : Variables.defaultMargin + + LabelUnitText { id: _volumeGoal + objectName: "_volumeGoal" + anchors { + left: parent.left + right: parent.right + } + layout: LabelUnitText.Layout.Justify + label: qsTr("Isolated UF Volume Goal") + unit: Variables.unitVolume + valueColor: Colors.ufVolumeGoalText + value: _private.volumeGoal.toFixed(Variables.ultrafiltrationPrecision) + } + + LabelUnitText { id: _duration + objectName: "_duration" + anchors { + left: parent.left + right: parent.right + } + layout: LabelUnitText.Layout.Justify + label: qsTr("Isolated UF Duration") + unit: Variables.unitTextDuration + valueColor: Colors.ufVolumeGoalText + value: _root.duration + } + + LabelUnitText { id: _rate + objectName: "_rate" + anchors { + left: parent.left + right: parent.right + } + layout: LabelUnitText.Layout.Justify + label: qsTr("Isolated UF Rate") + unit: Variables.unitTextRate + valueColor: Colors.ufVolumeGoalText + value: _private.rate.toFixed(Variables.ultrafiltrationPrecision) + } + } + } + + Text { id: _warningText + objectName: "_warningText" + anchors { + bottom: _confirmButton.top + bottomMargin: Variables.defaultMargin * 2 + horizontalCenter: parent.horizontalCenter + } + width: contentWidth + height: Variables.adjustmentLabelUnitContainerHeight + font.pixelSize: 24 + color: Colors.offWhite + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + text: qsTr("Progress towards the treament IsolatedUF Volume will be paused during Isolated IsolatedUF.") + } + + TouchRect { id: _confirmButton + objectName : "_confirmButton" + anchors { + bottom : parent.bottom + bottomMargin : Variables.defaultMargin + horizontalCenter: parent.horizontalCenter + } + width : Variables.ultrafiltrationButtonWidth + height : Variables.ultrafiltrationButtonHeight + isDefault : true + text { + text : qsTr("Confirm") + font.weight : Font.Medium + } + + onClicked: confirmVolumeClicked() + } +} Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFDurationEdit.qml =================================================================== diff -u --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFDurationEdit.qml (revision 0) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFDurationEdit.qml (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,150 @@ +/*! + * + * Copyright (c) 2020-2025 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 TreatmentAdjustmentIsolatedUFEdit.qml + * \author (last) Stephen Quong + * \date (last) 08-Oct-2025 + * \author (original) Behrouz NematiPour + * \date (original) 15-May-2020 + * + */ + +// Qt +import QtQuick 2.12 + +// Project + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/compounds" + +/*! + * \brief TreatmentAdjustmentIsolatedUFDurationEdit.qml is the screen + * To adjust the treatment isolated UF duration + */ +Item { id: _root + objectName: "_treatmentAdjustmentIsolatedUFDurationEdit" // SquishQt testability + + property alias duration : _durationAdjuster.value + + signal continueClicked(int vDuration) + + function reset() { + duration = vTreatmentIsolatedUF.duration + } + + QtObject { id: _private + objectName: "_private" + readonly property int precision : Variables.ultrafiltrationPrecision + readonly property real volumeRemoved : calculatePrecisionValue(vTreatmentIsolatedUF.volumeDelivered) + readonly property real volumeGoal : calculatePrecisionValue(vTreatmentIsolatedUF.volumeGoal) + readonly property real volumeMax : Math.floor(_root.volumeGoalMax / volumeRes) * volumeRes + readonly property real volumeRes : calculatePrecisionValue(vTreatmentRanges.ultrafiltrationVolumeRes) + + readonly property int multiplier : Math.pow(10, precision) + function calculatePrecisionValue(value) { + return Math.round(value * multiplier) / multiplier + } + } + + TreatmentAdjustmentIsolatedUFMetrics { id: _ufMetrics + objectName: "_ufMetrics" + anchors { + top : parent.top + topMargin : Variables.defaultMargin + horizontalCenter: parent.horizontalCenter + } + leftLabel : qsTr("Isolated UF Volume Removed") + leftUnit : Variables.unitVolume + leftValue : _private.volumeRemoved.toFixed(_private.precision) + rightLabel : qsTr("Isolated UF Volume Goal") + rightUnit : Variables.unitVolume + rightValue : _private.volumeGoal.toFixed(_private.precision) + } + + Item { id: _contentArea + objectName: "_contentArea" + anchors { + top : _ufMetrics.bottom + bottom : _continueButton.top + left : parent.left + right : parent.right + } + + Column { id: _contentColumn + objectName : "_contentColumn" + anchors { + centerIn : parent + verticalCenterOffset : -(Variables.defaultMargin) + } + width : Variables.ultrafiltrationProgressBarWidth + spacing : 80 + + ProgressBarEx { id: _volumeProgress + objectName : "_volumeProgress" + anchors { + left : parent.left + right : parent.right + } + decimal : Variables.ultrafiltrationPrecision + minimum : 0 + maximum : _private.volumeGoal + value : _private.volumeRemoved + valueEx : _private.volumeRemoved + } + + LabelUnitValueAdjuster { id: _durationAdjuster + objectName : "_durationAdjuster" + anchors { + horizontalCenter: parent.horizontalCenter + } + text : qsTr("Isolated UF Duration") + isActive : true + unitText : Variables.unitTextDuration + minimum : vTreatmentRanges.isolatedUFDurationMin + maximum : vTreatmentRanges.isolatedUFDurationMax + step : vTreatmentRanges.isolatedUFDurationRes + + onDidChange : function(vValue) { + value = vValue + } + onMinimumChanged : { + if (value < minimum) { + value = minimum + } + } + onMaximumChanged : { + if (value > maximum) { + value = maximum + } + } + } + } + } + + TouchRect { id: _continueButton + objectName : "_continueButton" + anchors { + bottom : parent.bottom + bottomMargin : Variables.defaultMargin + horizontalCenter: parent.horizontalCenter + } + width : Variables.ultrafiltrationButtonWidth + height : Variables.ultrafiltrationButtonHeight + text { + text : qsTr("Continue") + font.weight : Font.Medium + } + isDefault : true + enabled : _durationAdjuster.value != vTreatmentIsolatedUF.duration + + onClicked : { + continueClicked(_durationAdjuster.value) + } + } +} Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFVolumeGoalEdit.qml =================================================================== diff -u --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFVolumeGoalEdit.qml (revision 0) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFVolumeGoalEdit.qml (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,183 @@ +/*! + * + * Copyright (c) 2020-2025 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 TreatmentAdjustmentIsolatedUFEdit.qml + * \author (last) Stephen Quong + * \date (last) 08-Oct-2025 + * \author (original) Behrouz NematiPour + * \date (original) 15-May-2020 + * + */ + +// Qt +import QtQuick 2.12 + +// Project + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/compounds" + +/*! + * \brief TreatmentAdjustmentIsolatedUFVolumeGoalEdit.qml is the screen + * To adjust the treatment isolate UF volume goal + */ +Item { id: _root + objectName: "_treatmentAdjustmentIsolatedUFVolumeGoalEdit" // SquishQt testability + + property alias duration : _durationAdjuster.value + property real volumeGoalMax : 0 + + signal continueClicked(int vDuration, real vVolumeGoal) + + function reset() { + _volumeGoalAdjuster.value = _volumeGoalAdjuster.minimum + _volumeGoalAdjuster.isActive = false + } + + QtObject { id: _private + objectName: "_private" + readonly property int precision : Variables.ultrafiltrationPrecision + readonly property real volumeRemoved : calculatePrecisionValue(vTreatmentIsolatedUF.volumeDelivered) + readonly property real volumeGoalMax : Math.floor(_root.volumeGoalMax / volumeGoalRes) * volumeGoalRes + readonly property real volumeGoalRes : calculatePrecisionValue(vTreatmentRanges.ultrafiltrationVolumeRes) + + readonly property int multiplier : Math.pow(10, precision) + function calculatePrecisionValue(value) { + return Math.round(value * multiplier) / multiplier + } + } + + TreatmentAdjustmentIsolatedUFMetrics { id: _ufMetrics + objectName : "_ufMetrics" + anchors { + top : parent.top + topMargin : Variables.defaultMargin + horizontalCenter: parent.horizontalCenter + } + leftLabel : qsTr("Isolated UF Volume Removed") + leftUnit : Variables.unitVolume + leftValue : _private.volumeRemoved.toFixed(_private.precision) + rightLabel : qsTr("Isolated UF Volume Goal") + rightUnit : Variables.unitVolume + rightValue : _volumeGoalAdjuster.isActive ? _volumeGoalAdjuster.value.toFixed(_private.precision) : Variables.emptyEntry + } + + Item { id: _contentArea + objectName: "_contentArea" + anchors { + top : _ufMetrics.bottom + bottom : _continueButton.top + left : parent.left + right : parent.right + } + + Column { id: _contentColumn + objectName : "_contentColumn" + anchors { + centerIn : parent + verticalCenterOffset : -(Variables.defaultMargin) + } + width : Variables.ultrafiltrationProgressBarWidth + spacing : 80 + + ProgressBarEx { id: _volumeProgress + objectName : "_volumeProgress" + anchors { + left : parent.left + right : parent.right + } + decimal : _private.precision + minimum : 0 + maximum : _private.volumeGoalMax + value : _private.volumeRemoved + valueEx : _volumeGoalAdjuster.value + } + + LabelUnitValueAdjuster { id: _durationAdjuster + objectName : "_durationAdjuster" + anchors { + horizontalCenter: parent.horizontalCenter + } + text : qsTr("Isolated UF Duration") + isActive : true + editable : false + unitText : Variables.unitTextDuration + minimum : vTreatmentRanges.isolatedUFDurationMin + maximum : vTreatmentRanges.isolatedUFDurationMax + step : vTreatmentRanges.isolatedUFDurationRes + + onDidChange : function(vValue) { + value = vValue + } + onMinimumChanged : { + if (value < minimum) { + value = minimum + } + } + onMaximumChanged : { + if (value > maximum) { + value = maximum + } + } + } + } + + LabelUnitValueAdjuster { id: _volumeGoalAdjuster + objectName : "_volumeGoalAdjuster" + anchors { + top : _contentColumn.bottom + topMargin : Variables.defaultMargin + horizontalCenter: parent.horizontalCenter + } + text : qsTr("Isolated UF Volume Goal") + isActive : false + unitText : Variables.unitVolume + decimal : _private.precision + step : _private.volumeGoalRes + minimum : Math.ceil(_private.volumeRemoved / step) * step + maximum : Math.floor(_private.volumeGoalMax / step) * step + + onDidChange : function(vValue) { + isActive = true + value = vValue + } + onMinimumChanged : { + if (value < minimum) { + value = minimum + } + } + onMaximumChanged : { + if (value > maximum) { + value = maximum + } + } + } + } + + TouchRect { id: _continueButton + objectName : "_continueButton" + anchors { + bottom : parent.bottom + bottomMargin : Variables.defaultMargin + horizontalCenter: parent.horizontalCenter + } + width : Variables.ultrafiltrationButtonWidth + height : Variables.ultrafiltrationButtonHeight + text { + text : qsTr("Continue") + font.weight : Font.Medium + } + isDefault : true + enabled : _volumeGoalAdjuster.isActive + + onClicked : { + continueClicked(_durationAdjuster.value, _volumeGoalAdjuster.value) + } + } +} Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltration.qml =================================================================== diff -u -r0135be257d4c512b53b593a8bcd0a26458651b82 -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltration.qml (.../TreatmentAdjustmentUltrafiltration.qml) (revision 0135be257d4c512b53b593a8bcd0a26458651b82) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltration.qml (.../TreatmentAdjustmentUltrafiltration.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -38,7 +38,6 @@ onAboutToShow : { _ufStack.reset() } onClosed : { _ufStack.reset() } onBackClicked : { _ufStack.pop() } - onCloseClicked : { _ufStack.reset() } information { visible : true && information.text && ! notification.visible @@ -85,7 +84,8 @@ _ufStack.page(_treatmentAdjustmentUltrafiltrationEdit) } onIsolatedUfClicked : { - console.log("Isolated UF clicked") + _treatmentAdjustmentIsolatedUFDurationEdit.reset() + _ufStack.page(_treatmentAdjustmentIsolatedUFDurationEdit) } onResumeClicked : { // send resume to TD and wait. @@ -122,6 +122,51 @@ } } + TreatmentAdjustmentIsolatedUFDurationEdit { id: _treatmentAdjustmentIsolatedUFDurationEdit + objectName : "_treatmentAdjustmentIsolatedUFDurationEdit" + visible : false + + StackView.onActivating : { + _root.titleText = qsTr("Isolated Ultrafiltration Volume ") + Variables.unitTextUltrafiltrationVolume + _root.notificationText = "" + } + + onContinueClicked : function(vDuration) { + // send Volume to TD and wait. + // if accepted moves to confirm screen, otherwise show error in notification + // vTreatmentAdjustmentIsolatedUFEdit.doAdjustment(vVolume) + vTreatmentAdjustmentIsolatedUFDurationEdit.doAdjustment(vDuration) + } + } + + TreatmentAdjustmentIsolatedUFVolumeGoalEdit { id: _treatmentAdjustmentIsolatedUFVolumeGoalEdit + objectName : "_treatmentAdjustmentIsolatedUFVolumeGoalEdit" + visible : false + + StackView.onActivating : { + _root.titleText = qsTr("Isolated Ultrafiltration Volume ") + Variables.unitTextUltrafiltrationVolume + _root.notificationText = "" + } + onContinueClicked : function(vDuration, vVolumeGoal) { + // send Volume to TD and wait. + // if accepted moves to confirm screen, otherwise show error in notification + vTreatmentAdjustmentIsolatedUFVolumeGoalEdit.doAdjustment(vDuration, vVolumeGoal) + } + } + + TreatmentAdjustmentIsolatedUFConfirm { id: _treatmentAdjustmentIsolatedUFConfirm + objectName : "_treatmentAdjustmentIsolatedUFConfirm" + visible : false + + StackView.onActivating : { + _root.titleText = qsTr("Confirm Isolated Ultrafiltration Values") + _root.notificationText = "" + } + onConfirmVolumeClicked : { + vTreatmentAdjustmentIsolatedUFConfirm.doConfirm() + } + } + Connections { target: vTreatmentAdjustmentUltrafiltrationState function onAdjustmentTriggered ( vValue ) { if (vTreatmentAdjustmentUltrafiltrationState.adjustment_Accepted) { @@ -160,5 +205,51 @@ } } } + + Connections { target: vTreatmentAdjustmentIsolatedUFDurationEdit + function onAdjustmentTriggered ( vValue ) { + if (vTreatmentAdjustmentIsolatedUFDurationEdit.adjustment_Accepted) { + notification.text = "" + + _treatmentAdjustmentIsolatedUFVolumeGoalEdit.duration = _treatmentAdjustmentIsolatedUFDurationEdit.duration + _treatmentAdjustmentIsolatedUFVolumeGoalEdit.volumeGoalMax = vTreatmentAdjustmentIsolatedUFDurationEdit.volumeGoalMax + + _treatmentAdjustmentIsolatedUFVolumeGoalEdit.reset() + _ufStack.page(_treatmentAdjustmentIsolatedUFVolumeGoalEdit) + } + else { + notification.text = vTreatmentAdjustmentIsolatedUFDurationEdit.text() + } + } + } + + Connections { target: vTreatmentAdjustmentIsolatedUFVolumeGoalEdit + function onAdjustmentTriggered ( vValue ) { + if (vTreatmentAdjustmentIsolatedUFVolumeGoalEdit.adjustment_Accepted) { + notification.text = "" + + _treatmentAdjustmentIsolatedUFConfirm.volumeGoal = vTreatmentAdjustmentIsolatedUFVolumeGoalEdit.volumeGoal + _treatmentAdjustmentIsolatedUFConfirm.duration = vTreatmentAdjustmentIsolatedUFVolumeGoalEdit.duration + _treatmentAdjustmentIsolatedUFConfirm.rate = vTreatmentAdjustmentIsolatedUFVolumeGoalEdit.rate + + _ufStack.page(_treatmentAdjustmentIsolatedUFConfirm) + } + else { + notification.text = vTreatmentAdjustmentIsolatedUFVolumeGoalEdit.text() + } + } + } + + Connections { target: vTreatmentAdjustmentIsolatedUFConfirm + function onAdjustmentTriggered ( vValue ) { + if (vTreatmentAdjustmentIsolatedUFConfirm.adjustment_Accepted) { + notification.text = "" + close() + } + else { + notification.text = vTreatmentAdjustmentIsolatedUFConfirm.text() + } + } + } } } Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationConfirm.qml =================================================================== diff -u -r8672e62f205231b08dd7d4a4f6f7f3a60b2c677b -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationConfirm.qml (.../TreatmentAdjustmentUltrafiltrationConfirm.qml) (revision 8672e62f205231b08dd7d4a4f6f7f3a60b2c677b) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationConfirm.qml (.../TreatmentAdjustmentUltrafiltrationConfirm.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -35,26 +35,6 @@ signal confirmVolumeClicked(real vVolume) - component ValueContainer: LabelUnitContainer { id: _valueContainer - objectName : "_valueContainer" - property alias value : _value.text - property color valueColor : _value.color - - implicitWidth : Variables.ultrafiltrationConfirmValueWidth - implicitHeight : Variables.adjustmentLabelUnitContainerHeight - - contentItem: Text { id: _value - objectName: "_value" - font { - pixelSize : Fonts.fontPixelUltrafiltrationAdjustmentMetrics - weight : Font.DemiBold - } - horizontalAlignment : Text.AlignHCenter - verticalAlignment : Text.AlignVCenter - color : Colors.ufVolumeGoalText - } - } - Item { id: _newValuesItem objectName: "_newValuesItem" anchors { @@ -64,26 +44,17 @@ right : parent.right } - Row { id: _newValuesRow - objectName : "_newValuesRow" - anchors.centerIn: parent - spacing : Variables.columnSpacing - - ValueContainer { id: _newVolumeContainer - objectName : "_newVolumeContainer" - text : qsTr("New UF Volume") - unitText : Variables.unitVolume - valueColor : Colors.ufVolumeGoalText - value : _root.ultrafiltrationVolume.toFixed(Variables.ultrafiltrationPrecision) - } - - ValueContainer { id: _newRateContainer - objectName : "_newRateContainer" - text : qsTr("New UF Rate") - unitText : Variables.unitTextRate - valueColor : Colors.ufVolumeGoalText - value : _root.ultrafiltrationRate.toFixed(Variables.ultrafiltrationPrecision) - } + TreatmentAdjustmentUltrafiltrationMetrics { id: _newValues + objectName : "_newValues" + anchors.centerIn : parent + leftLabel : qsTr("New UF Volume") + leftUnit : Variables.unitVolume + leftValue : _root.ultrafiltrationVolume.toFixed(Variables.ultrafiltrationPrecision) + leftColor : Colors.ufVolumeGoalText + rightLabel : qsTr("New UF Rate") + rightUnit : Variables.unitTextRate + rightValue : _root.ultrafiltrationRate.toFixed(Variables.ultrafiltrationPrecision) + rightColor : Colors.ufVolumeGoalText } } Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml =================================================================== diff -u -r71bb1dea18ee4340d90d894a7ab8e147b5977bb4 -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml (.../TreatmentAdjustmentUltrafiltrationEdit.qml) (revision 71bb1dea18ee4340d90d894a7ab8e147b5977bb4) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml (.../TreatmentAdjustmentUltrafiltrationEdit.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -32,13 +32,14 @@ QtObject { id: _private objectName: "_private" + readonly property int precision : Variables.ultrafiltrationPrecision readonly property real minimum : calculatePrecisionValue( vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Min ) readonly property real maximum : calculatePrecisionValue( vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Max ) readonly property real volumeRes : calculatePrecisionValue( vTreatmentRanges.ultrafiltrationVolumeRes ) readonly property real setVolume : calculatePrecisionValue( vTreatmentUltrafiltration.setVolume ) readonly property real volumeRemoved : calculatePrecisionValue( vTreatmentUltrafiltration.volumeRemoved ) + readonly property int multiplier : Math.pow(10, precision) - readonly property int multiplier : Math.pow(10, Variables.ultrafiltrationPrecision) function calculatePrecisionValue(value) { return Math.round(value * multiplier) / multiplier } @@ -57,9 +58,12 @@ topMargin : Variables.defaultMargin horizontalCenter: parent.horizontalCenter } - setVolume : _volumeGoalAdjuster.value - volumeRemoved : _private.volumeRemoved - volumeRemovedColor : Colors.ufVolumeGoalText + leftLabel : qsTr("UF Volume Removed") + leftUnit : Variables.unitVolume + leftValue : _private.volumeRemoved.toFixed(_private.precision) + rightLabel : qsTr("UF Volume Goal") + rightUnit : Variables.unitVolume + rightValue : _volumeGoalAdjuster.value.toFixed(_private.precision) } Item { id: _contentArea @@ -77,69 +81,14 @@ width : Variables.ultrafiltrationProgressBarWidth spacing : 80 - ProgressBar { id: _maxVolumeBar + ProgressBarEx { id: _maxVolumeBar objectName : "_maxVolumeBar" width : parent.width - height : Variables.ultraFiltrationProgressBarHeight - marker.visible : false - bgColor : Colors.ufAdjustmentProgressBarBg - color : Colors.ufAdjustmentDeltaFill - radius : Variables.ultrafiltrationProgressBarRadius - minText { - font { - pixelSize : Fonts.fontPixelUltrafiltrationMinMaxLabel - weight : Font.Normal - } - color : Colors.progressBarMinMax - text : minimum.toFixed(Variables.ultrafiltrationPrecision) + " " + Variables.unitVolume - } - maxText { - font { - pixelSize : minText.font.pixelSize - weight : minText.font.weight - } - color : Colors.progressBarMinMax - text : _private.maximum.toFixed(Variables.ultrafiltrationPrecision) + " " + Variables.unitVolume - } + decimal : Variables.ultrafiltrationPrecision minimum : _private.minimum maximum : _private.maximum - decimal : Variables.ultrafiltrationPrecision - value : _volumeGoalAdjuster.value - - Rectangle { id: _removedFill - objectName: "_removedFill" - anchors { - top : parent.top - bottom : parent.bottom - left : parent.left - right : _lowMarker.right - // adjust margin so fill completely covers the underlying slider - leftMargin : -1 - } - z : parent.z + 1 - color : Colors.ufProgressBarFill - radius : parent.radius - } - - RangeMarker { id: _lowMarker - objectName : "_lowMarker" - anchors.bottom : parent.bottom - x : (_maxVolumeBar.width * ((value - _maxVolumeBar.minimum) / (_maxVolumeBar.maximum - _maxVolumeBar.minimum))) - ((width+1)/2) - z : _removedFill.z + 1 - width : Variables.ultrafiltrationRangeMarkerWidth - height : Variables.rangeMarkerHeight - hasHandle : false - valueOnTop : true - decimal : Variables.ultrafiltrationPrecision - value : Math.max(_private.volumeRemoved, _private.minimum) - text { - anchors.bottomMargin: Variables.ultrafiltrationRangeMarkerTextMargin - font { - pixelSize: Fonts.fontPixelUltrafiltrationRangeMarker - weight: Font.DemiBold - } - } - } + value : _private.volumeRemoved + valueEx : _volumeGoalAdjuster.value } LabelUnitContainer { id: _volumeGoalContainer Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml =================================================================== diff -u -rca05e940ea4a0c567acb05c4c8777dea079b0f08 -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml (.../TreatmentAdjustmentUltrafiltrationStart.qml) (revision ca05e940ea4a0c567acb05c4c8777dea079b0f08) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml (.../TreatmentAdjustmentUltrafiltrationStart.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -30,14 +30,6 @@ Item { id: _root objectName: "_TreatmentAdjustmentUltrafiltrationStart" // SquishQt testability - QtObject { id: _private - objectName: "_private" - readonly property real minimum : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Min - readonly property real maximum : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Max - property real setVolume : vTreatmentUltrafiltration.setVolume - property real volumeRemoved : vTreatmentUltrafiltration.volumeRemoved - } - signal editClicked() signal isolatedUfClicked() signal pauseClicked() @@ -50,8 +42,12 @@ topMargin : Variables.defaultMargin horizontalCenter: parent.horizontalCenter } - setVolume : _private.setVolume - volumeRemoved : _private.volumeRemoved + leftLabel : qsTr("UF Volume Removed") + leftUnit : Variables.unitVolume + leftValue : vTreatmentUltrafiltration.volumeRemoved.toFixed(Variables.ultrafiltrationPrecision) + rightLabel : qsTr("UF Volume Goal") + rightUnit : Variables.unitVolume + rightValue : vTreatmentUltrafiltration.setVolume.toFixed(Variables.ultrafiltrationPrecision) } Item { id: _contentArea @@ -64,48 +60,15 @@ } ProgressBarEx { id: _progressBarEx - objectName: "_progressBarEx" + objectName : "_progressBarEx" anchors { centerIn : parent } - width : Variables.ultrafiltrationProgressBarWidth - height : Variables.ultraFiltrationProgressBarHeight - decimal : Variables.ultrafiltrationPrecision - minimum : _private.minimum - maximum : _private.setVolume - value : _private.volumeRemoved - valueEx : 0 - color : Colors.ufProgressBarFill - bgColor : Colors.ufAdjustmentDeltaFill - radius : Variables.ultrafiltrationProgressBarRadius - minText { - font { - pixelSize : Fonts.fontPixelUltrafiltrationMinMaxLabel - weight : Font.Normal - } - color : Colors.progressBarMinMax - text : minimum.toFixed(Variables.ultrafiltrationPrecision) + " " + Variables.unitVolume - } - maxText { - font { - pixelSize : minText.font.pixelSize - weight : minText.font.weight - } - color : Colors.progressBarMinMax - text : _private.setVolume.toFixed(Variables.ultrafiltrationPrecision) + " " + Variables.unitVolume - } - marker { - width : Variables.ultrafiltrationRangeMarkerWidth - hasHandle : false - valueOnTop : true - text { - anchors.bottomMargin: Variables.ultrafiltrationRangeMarkerTextMargin - font { - pixelSize: Fonts.fontPixelUltrafiltrationRangeMarker - weight : Font.DemiBold - } - } - } + decimal : Variables.ultrafiltrationPrecision + minimum : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Min + maximum : vTreatmentUltrafiltration.setVolume + value : vTreatmentUltrafiltration.volumeRemoved + valueEx : vTreatmentUltrafiltration.volumeRemoved } } Index: sources/model/MModel.h =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/model/MModel.h (.../MModel.h) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/model/MModel.h (.../MModel.h) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -59,6 +59,7 @@ #include "MTreatmentBloodPrimeData.h" #include "MTreatmentStopData.h" #include "MTreatmentUltrafiltrationData.h" +#include "MTreatmentIsolatedUFData.h" #include "MTreatmentParametersSetPointData.h" #include "MHDAccelerometerData.h" #include "MHDSyringePumpData.h" @@ -158,6 +159,9 @@ #include "MTreatmentAdjustUltrafiltrationStateResponse.h" #include "MTreatmentAdjustUltrafiltrationEditResponse.h" #include "MTreatmentAdjustUltrafiltrationConfirmResponse.h" +#include "MTreatmentAdjustIsolatedUFDurationEditResponse.h" +#include "MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.h" +#include "MTreatmentAdjustIsolatedUFConfirmResponse.h" #include "MTreatmentAdjustSalineResponse.h" #include "MTreatmentAdjustVitalsResponse.h" #include "MTreatmentAdjustHeparinResponse.h" @@ -368,6 +372,7 @@ REGISTER_METATYPE( TreatmentBloodPrimeData ) \ REGISTER_METATYPE( TreatmentStopData ) \ REGISTER_METATYPE( TreatmentUltrafiltrationData ) \ + REGISTER_METATYPE( TreatmentIsolatedUFData ) \ REGISTER_METATYPE( TreatmentParametersSetPointData ) \ REGISTER_METATYPE( HDSyringePumpData ) \ REGISTER_METATYPE( HDAccelerometerData ) \ @@ -465,6 +470,9 @@ REGISTER_METATYPE( AdjustUltrafiltrationStateRequestData ) \ REGISTER_METATYPE( AdjustUltrafiltrationEditRequestData ) \ REGISTER_METATYPE( AdjustUltrafiltrationConfirmRequestData ) \ + REGISTER_METATYPE( AdjustIsolatedUFDurationEditRequestData ) \ + REGISTER_METATYPE( AdjustIsolatedUFVolumeGoalEditRequestData ) \ + REGISTER_METATYPE( AdjustIsolatedUFConfirmRequestData ) \ REGISTER_METATYPE( AdjustSalineRequestData ) \ REGISTER_METATYPE( AdjustVitalsRequestData ) \ REGISTER_METATYPE( AdjustHeparinRequestData ) \ @@ -511,6 +519,9 @@ REGISTER_METATYPE( AdjustUltrafiltrationStateResponseData ) \ REGISTER_METATYPE( AdjustUltrafiltrationEditResponseData ) \ REGISTER_METATYPE( AdjustUltrafiltrationConfirmResponseData ) \ + REGISTER_METATYPE( AdjustIsolatedUFDurationEditResponseData ) \ + REGISTER_METATYPE( AdjustIsolatedUFVolumeGoalEditResponseData ) \ + REGISTER_METATYPE( AdjustIsolatedUFConfirmResponseData ) \ REGISTER_METATYPE( AdjustSalineResponseData ) \ REGISTER_METATYPE( AdjustVitalsResponseData ) \ REGISTER_METATYPE( AdjustHeparinResponseData ) \ @@ -593,6 +604,7 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentBloodPrimeData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentStopData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentUltrafiltrationData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentIsolatedUFData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentParametersSetPointData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDSyringePumpData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDAccelerometerData ) \ @@ -679,6 +691,9 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationStateResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationConfirmResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustIsolatedUFDurationEditResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustIsolatedUFVolumeGoalEditResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustIsolatedUFConfirmResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustSalineResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustVitalsResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustHeparinResponseData ) \ @@ -726,6 +741,9 @@ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustIsolatedUFDurationEditRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustIsolatedUFVolumeGoalEditRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustIsolatedUFConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustParametersConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustSalineRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustVitalsRequestData ) \ @@ -829,6 +847,7 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentBloodPrimeData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentStopData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentUltrafiltrationData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentIsolatedUFData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentParametersSetPointData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( HDSyringePumpData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( HDAccelerometerData ) \ @@ -915,6 +934,9 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationStateResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationConfirmResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustIsolatedUFDurationEditResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustIsolatedUFVolumeGoalEditResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustIsolatedUFConfirmResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustSalineResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustVitalsResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustHeparinResponseData ) \ @@ -986,6 +1008,9 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustUltrafiltrationStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustUltrafiltrationConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustIsolatedUFDurationEditRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustIsolatedUFVolumeGoalEditRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustIsolatedUFConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustSalineRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustVitalsRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustHeparinRequestData ) \ @@ -1056,6 +1081,9 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustUltrafiltrationStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustUltrafiltrationConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustIsolatedUFDurationEditRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustIsolatedUFVolumeGoalEditRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustIsolatedUFConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustSalineRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustVitalsRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustHeparinRequestData ) \ @@ -1126,6 +1154,9 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustIsolatedUFDurationEditRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustIsolatedUFVolumeGoalEditRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustIsolatedUFConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustPressuresLimitsRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustSalineRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustVitalsRequestData ) \ @@ -1189,6 +1220,7 @@ ACTION_RECEIVE_SIGNAL( TreatmentBloodPrimeData ) \ ACTION_RECEIVE_SIGNAL( TreatmentStopData ) \ ACTION_RECEIVE_SIGNAL( TreatmentUltrafiltrationData ) \ + ACTION_RECEIVE_SIGNAL( TreatmentIsolatedUFData ) \ ACTION_RECEIVE_SIGNAL( TreatmentParametersSetPointData ) \ ACTION_RECEIVE_SIGNAL( HDSyringePumpData ) \ ACTION_RECEIVE_SIGNAL( HDAccelerometerData ) \ @@ -1276,6 +1308,9 @@ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationStateResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationConfirmResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustIsolatedUFDurationEditResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustIsolatedUFVolumeGoalEditResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustIsolatedUFConfirmResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustSalineResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustVitalsResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustHeparinResponseData ) \ Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -319,7 +319,7 @@ return toString({volume}); } static QString toString(const QVariantList &vParameters) { - return MModel::toString("AdjustUFEdit", vParameters); + return MModel::toString("AdjustUFDurationEdit", vParameters); } }; @@ -350,6 +350,78 @@ }; /*! + * \brief The MAdjustIsolatedUFDurationEditReq class + * \details The ultrafiltration volume change request model + * + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | + * |0x8400| 0x100 | Req | Y | UI | HD | Isolated UF Duration Change Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref duration | + * + */ +class MAdjustIsolatedUFDurationEditReq : public MModel { +public: + quint32 duration = 0; + QString toString() { + return toString({duration}); + } + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustIsolatedUFDurationEdit", vParameters); + } +}; + +/*! + * \brief The MAdjustIsolatedUFVolumeGoalEditReq class + * \details The ultrafiltration volume change request model + * + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | + * |0x8600| 0x100 | Req | Y | UI | HD | Isolated UF VolumeGoal Change Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref duration | + * | #1:(U32) | \ref volumeGoal | + * + */ +class MAdjustIsolatedUFVolumeGoalEditReq : public MModel { +public: + quint32 duration = 0; + quint32 volumeGoal = 0; + QString toString() { + return toString({duration, volumeGoal}); + } + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustIsolatedUFVolumeGoalEdit", vParameters); + } +}; + +/*! + * \brief The MAdjustIsolatedUFConfirmReq class + * \details The ultrafiltration volume change user confirm request model + * + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | + * |0x8800| 0x041 | Req | Y | UI | HD | Isolated UF Change User Confirm | + * + * | Payload || + * | || + * | None || + * + * \sa Options + * + */ +class MAdjustIsolatedUFConfirmReq : public MModel { +public: + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustIsolatedUFConfirm", vParameters); + } +}; + +/*! * \brief The MAdjustSalineReq class * \details The model to request the Saline Bolus state * @@ -637,6 +709,9 @@ typedef Model:: MAdjustUltrafiltrationStateReq AdjustUltrafiltrationStateRequestData; typedef Model:: MAdjustUltrafiltrationEditReq AdjustUltrafiltrationEditRequestData; typedef Model::MAdjustUltrafiltrationConfirmReq AdjustUltrafiltrationConfirmRequestData; +typedef Model::MAdjustIsolatedUFDurationEditReq AdjustIsolatedUFDurationEditRequestData; +typedef Model::MAdjustIsolatedUFVolumeGoalEditReq AdjustIsolatedUFVolumeGoalEditRequestData; +typedef Model:: MAdjustIsolatedUFConfirmReq AdjustIsolatedUFConfirmRequestData; typedef Model:: MAdjustSalineReq AdjustSalineRequestData; typedef Model:: MAdjustVitalsReq AdjustVitalsRequestData; typedef Model:: MAdjustHeparinReq AdjustHeparinRequestData; Index: sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFConfirmResponse.cpp =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFConfirmResponse.cpp (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFConfirmResponse.cpp (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,54 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentAdjustIsolatedUFConfirmResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "MTreatmentAdjustIsolatedUFConfirmResponse.h" + +using namespace Model; + +QString MAdjustIsolatedUFConfirmResponse::toString() const { + return QString(stringPrefix + ",%1,%2,%3,%4,%5") + .arg(_data.mAccepted .value) + .arg(_data.mReason .value); +} + +void MAdjustIsolatedUFConfirmResponse::toVariantList(QVariantList &vData) const { + vData += _data.mAccepted .value; + vData += _data.mReason .value; +} + +bool MAdjustIsolatedUFConfirmResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if ( ! GetValue(vByteArray, index, _data.mAccepted )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mReason )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; + +} + +/*! + * \brief MAdjustIsolatedUFConfirmResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustIsolatedUFConfirmResponseData MAdjustIsolatedUFConfirmResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted .value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFConfirmResponse.h =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFConfirmResponse.h (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFConfirmResponse.h (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,80 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentAdjustIsolatedUFConfirmResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustIsolatedUFConfirmResponse class + * \details The UF vol. change confirmation response model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x9600| 0x040 | 6 | Rsp | Y | TD | UI | UF Vol. Change Confirmation Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | TD | + * | infoText | AdjustUFConfirm | + * + */ +class MAdjustIsolatedUFConfirmResponse { + + // friends + friend class ::tst_models; + +public: + QString stringPrefix = "AdjustUFConfirm"; + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + +protected: + struct _Data { + Types::U32 mAccepted ; + Types::U32 mReason ; + } _data; + +public: + MAdjustIsolatedUFConfirmResponse () { } + + QString toString ( ) const ; + void toVariantList ( QVariantList &vData ) const ; + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr); + + Data data() const; +}; +} + +typedef Model::MAdjustIsolatedUFConfirmResponse::Data AdjustIsolatedUFConfirmResponseData; Index: sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFDurationEditResponse.cpp =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFDurationEditResponse.cpp (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFDurationEditResponse.cpp (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,58 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentAdjustIsolatedUFDurationEditResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "MTreatmentAdjustIsolatedUFDurationEditResponse.h" + +using namespace Model; + +QString MAdjustIsolatedUFDurationEditResponse::toString() const { + return QString(stringPrefix + ",%1,%2,%3,%4") + .arg(_data.mAccepted .value) + .arg(_data.mReason .value) + .arg(_data.mVolumeGoalMax .value) + ; +} + +void MAdjustIsolatedUFDurationEditResponse::toVariantList(QVariantList &vData) const { + vData += _data.mAccepted .value; + vData += _data.mReason .value; + vData += _data.mVolumeGoalMax .value; +} + +bool MAdjustIsolatedUFDurationEditResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if ( ! GetValue(vByteArray, index, _data.mAccepted )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mReason )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mVolumeGoalMax )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MAdjustIsolatedUFDurationEditResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustIsolatedUFDurationEditResponseData MAdjustIsolatedUFDurationEditResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted .value; + data.mReason = _data.mReason .value; + data.mVolumeGoalMax = _data.mVolumeGoalMax .value; + return data; +} Index: sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFDurationEditResponse.h =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFDurationEditResponse.h (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFDurationEditResponse.h (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,87 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentAdjustIsolatedUFDurationEditResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2023 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustIsolatedUFDurationEditResponse class + * \details The UF vol. change response model + * + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | + * |0x9200| 0x040 | Rsp | Y | TD | UI | Isolated UF Duration Edit Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * | #3:(U32) | \ref Data::mVolumeGoalMax | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | TD | + * | infoText | AdjustIsolatedUFDurationEdit | + * + */ +class MAdjustIsolatedUFDurationEditResponse +{ + + // friends + friend class ::tst_models; + +public: + QString stringPrefix = "AdjustUFDurationEdit"; + //NOTE: The correct order is followed in cpp to fill in the values regarding the payload byte orders. + // The struct here is just the values not in correct order + // since has been inherited from the confirm to borrow some struct variables. + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + quint32 mVolumeGoalMax = 0; /*!< volume goal max value of type quint32 extracted out */ + }; + +private: + struct _Data { + Types::U32 mAccepted ; + Types::U32 mReason ; + Types::U32 mVolumeGoalMax ; + } _data; + +public: + MAdjustIsolatedUFDurationEditResponse () { } + + QString toString ( ) const ; + void toVariantList ( QVariantList &vData ) const ; + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr); + + Data data() const; +}; +} + +typedef Model::MAdjustIsolatedUFDurationEditResponse::Data AdjustIsolatedUFDurationEditResponseData; Index: sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.cpp =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.cpp (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.cpp (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,66 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.h" + +using namespace Model; + +QString MAdjustIsolatedUFVolumeGoalEditResponse::toString() const { + return QString(stringPrefix + ",%1,%2,%3,%4,%5") + .arg(_data.mAccepted .value) + .arg(_data.mReason .value) + .arg(_data.mVolumeGoal .value) + .arg(_data.mDuration .value) + .arg(_data.mRate .value) + ; +} + +void MAdjustIsolatedUFVolumeGoalEditResponse::toVariantList(QVariantList &vData) const { + vData += _data.mAccepted .value; + vData += _data.mReason .value; + vData += _data.mVolumeGoal .value; + vData += _data.mDuration .value; + vData += _data.mRate .value; +} + +bool MAdjustIsolatedUFVolumeGoalEditResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if ( ! GetValue(vByteArray, index, _data.mAccepted )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mReason )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mVolumeGoal )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mDuration )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mRate )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MAdjustIsolatedUFVolumeGoalEditResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustIsolatedUFVolumeGoalEditResponseData MAdjustIsolatedUFVolumeGoalEditResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted .value; + data.mReason = _data.mReason .value; + data.mVolumeGoal = _data.mVolumeGoal .value; + data.mDuration = _data.mDuration .value; + data.mRate = _data.mRate .value; + return data; +} Index: sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.h =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.h (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.h (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,93 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2023 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustIsolatedUFVolumeGoalEditResponse class + * \details The UF vol. change response model + * + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | + * |0x9400| 0x040 | Rsp | Y | TD | UI | Isolated UF Volume Goal Edit Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * | #3:(U32) | \ref Data::mVolume | + * | #4:(U32) | \ref Data::mDuration | + * | #5:(U32) | \ref Data::mRate | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | TD | + * | infoText | AdjustIsolatedUFVolumeGoalEdit | + * + */ +class MAdjustIsolatedUFVolumeGoalEditResponse +{ + + // friends + friend class ::tst_models; + +public: + QString stringPrefix = "AdjustUFVolumeGoalEdit"; + //NOTE: The correct order is followed in cpp to fill in the values regarding the payload byte orders. + // The struct here is just the values not in correct order + // since has been inherited from the confirm to borrow some struct variables. + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + quint32 mVolumeGoal = 0; /*!< volume goal value of type quint32 extracted out */ + quint32 mDuration = 0; /*!< duration value of type quint32 extracted out */ + quint32 mRate = 0; /*!< rate value of type quint32 extracted out */ + }; + +private: + struct _Data { + Types::U32 mAccepted ; + Types::U32 mReason ; + Types::U32 mVolumeGoal ; + Types::U32 mDuration ; + Types::U32 mRate ; + } _data; + +public: + MAdjustIsolatedUFVolumeGoalEditResponse () { } + + QString toString ( ) const ; + void toVariantList ( QVariantList &vData ) const ; + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr); + + Data data() const; +}; +} + +typedef Model::MAdjustIsolatedUFVolumeGoalEditResponse::Data AdjustIsolatedUFVolumeGoalEditResponseData; Index: sources/model/td/data/treatment/MTreatmentIsolatedUFData.cpp =================================================================== diff -u --- sources/model/td/data/treatment/MTreatmentIsolatedUFData.cpp (revision 0) +++ sources/model/td/data/treatment/MTreatmentIsolatedUFData.cpp (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,55 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentIsolatedUFData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "MTreatmentIsolatedUFData.h" + +using namespace Model; + +QVariantList MTreatmentIsolatedUF::parameters() const { + return { + _data.mDuration .value, + _data.mVolumeGoal .value, + _data.mVolumeDelivered .value, + _data.mRate .value, + }; +} + +bool MTreatmentIsolatedUF::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if ( ! GetValue(vByteArray, index, _data.mDuration )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mVolumeGoal )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mVolumeDelivered )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mRate )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MTreatmentIsolatedUF::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MTreatmentIsolatedUF::Data MTreatmentIsolatedUF::data() const { + return { + _data.mDuration .value, + _data.mVolumeGoal .value, + _data.mVolumeDelivered .value, + _data.mRate .value + }; +} Index: sources/model/td/data/treatment/MTreatmentIsolatedUFData.h =================================================================== diff -u --- sources/model/td/data/treatment/MTreatmentIsolatedUFData.h (revision 0) +++ sources/model/td/data/treatment/MTreatmentIsolatedUFData.h (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,89 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentIsolatedUFData.h + * \author (last) Behrouz NematiPour + * \date (last) 09-Mar-2022 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTreatmentIsolatedUF class + * \details The treatment IsolatedUF data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x900| 0x100 | 7 | 1 Hz | N | TD | All | Treatment IsolatedUF Data | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mDuration | + * | #2:(U32) | \ref Data::mVolumeGoal | + * | #3:(U32) | \ref Data::mVolumeDelivered | + * | #4:(U32) | \ref Data::mRate | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | TD | + * | infoText | IsolatedUF | + * + */ +class MTreatmentIsolatedUF : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mDuration ; + Types::U32 mVolumeGoal ; + Types::U32 mVolumeDelivered ; + Types::U32 mRate ; + } _data; + +public: + + Type_Enum typeText() const override { return Type_Enum::eDatum ; } + Unit_Enum unitText() const override { return Unit_Enum::eTD ; } + QString infoText() const override { return QString("IsolatedUF") ; } + + struct Data { + quint32 mDuration = 0; ///< Current duration + quint32 mVolumeGoal = 0; ///< Current volume goal + quint32 mVolumeDelivered = 0; ///< Current volume removed during Isolateds UF + quint32 mRate = 0; ///< IsolatedUF rate + }; + +public: + MTreatmentIsolatedUF () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MTreatmentIsolatedUF::Data TreatmentIsolatedUFData; Index: sources/view/VView.h =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/view/VView.h (.../VView.h) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/view/VView.h (.../VView.h) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -239,8 +239,12 @@ REGISTER_TYPE( VTreatmentAdjustmentDialysateTemperature ) \ REGISTER_TYPE( VTreatmentAdjustmentDurationConfirm ) \ REGISTER_TYPE( VTreatmentAdjustmentDurationEdit ) \ + REGISTER_TYPE( VTreatmentAdjustmentIsolatedUFConfirm ) \ + REGISTER_TYPE( VTreatmentAdjustmentIsolatedUFDurationEdit ) \ + REGISTER_TYPE( VTreatmentAdjustmentIsolatedUFVolumeGoalEdit ) \ REGISTER_TYPE( VTreatmentAdjustmentSetPoints ) \ REGISTER_TYPE( VTreatmentCreate ) \ + REGISTER_TYPE( VTreatmentIsolatedUF ) \ /* Post-Treatment */ \ REGISTER_TYPE( VPostTreatmentAdjustmentPatientDisconnectionConfirm ) \ REGISTER_TYPE( VPostTreatmentAdjustmentDisposablesRemovalConfirm ) \ Index: sources/view/hd/data/VTreatmentRanges.cpp =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/view/hd/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/view/hd/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -324,5 +324,10 @@ FROMVARIANT_WITHRETURN ( chlorineWaterSampleCheckMax , "Chlorine Water Sample Check" , "Chlorine_Water_Sample_Check_Max" , Int , isConfigsOk ); FROMVARIANT_WITHRETURN ( chlorineWaterSampleCheckRes , "Chlorine Water Sample Check" , "Chlorine_Water_Sample_Check_Res" , Int , isConfigsOk ); + FROMVARIANT_WITHRETURN ( isolatedUFDurationDef , "Isolated UF Duration Ranges" , "Isolated_UF_Duration_Def" , UInt , isConfigsOk ); + FROMVARIANT_WITHRETURN ( isolatedUFDurationMin , "Isolated UF Duration Ranges" , "Isolated_UF_Duration_Min" , UInt , isConfigsOk ); + FROMVARIANT_WITHRETURN ( isolatedUFDurationMax , "Isolated UF Duration Ranges" , "Isolated_UF_Duration_Max" , UInt , isConfigsOk ); + FROMVARIANT_WITHRETURN ( isolatedUFDurationRes , "Isolated UF Duration Ranges" , "Isolated_UF_Duration_Res" , UInt , isConfigsOk ); + emit didTreatmentRangesDone( isConfigsOk ); } Index: sources/view/hd/data/VTreatmentRanges.h =================================================================== diff -u -rc9764bd0ad823c5c1725d7c7f556290c2c459d4d -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/view/hd/data/VTreatmentRanges.h (.../VTreatmentRanges.h) (revision c9764bd0ad823c5c1725d7c7f556290c2c459d4d) +++ sources/view/hd/data/VTreatmentRanges.h (.../VTreatmentRanges.h) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -104,6 +104,9 @@ // ultrafiltration RANGESET( float , ultrafiltrationVolume , 0) + // isolated UF + RANGESET( quint32 , isolatedUFDuration , 0) + VIEW_DEC_CLASS(VTreatmentRanges ) VIEW_DEC_SLOT(TreatmentRangesData ) VIEW_DEC_SLOT(SettingsData ) Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFConfirm.cpp =================================================================== diff -u --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFConfirm.cpp (revision 0) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFConfirm.cpp (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,54 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VTreatmentAdjustmentIsolatedUFConfirm.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "VTreatmentAdjustmentIsolatedUFConfirm.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentIsolatedUFConfirm) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void VTreatmentAdjustmentIsolatedUFConfirm::initConnections() { + ACTION_VIEW_CONNECTION(AdjustIsolatedUFConfirmResponseData); + ADJUST_VIEW_CONNECTION( AdjustIsolatedUFConfirmRequestData); +} + +/*! + * \brief VTreatmentAdjustmentIsolatedUFEdit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void VTreatmentAdjustmentIsolatedUFConfirm::onActionReceive(const AdjustIsolatedUFConfirmResponseData &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::VTreatmentAdjustmentIsolatedUFConfirm::doOptionRate + * \details the invocable slot to adjust the ultrafiltration set volume + * \param vVolume - the new ultrafiltration volume + */ +void View::VTreatmentAdjustmentIsolatedUFConfirm::doConfirm() +{ + qDebug() << "*** VTreatmentAdjustmentIsolatedUFConfirm"; // SQ + emit didAdjustment(_data); +} Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFConfirm.h =================================================================== diff -u --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFConfirm.h (revision 0) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFConfirm.h (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,60 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VTreatmentAdjustmentIsolatedUFConfirm.h + * \author (last) Behrouz NematiPour + * \date (last) 18-Apr-2022 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VAdjustmentResponseBase.h" +#include "MTreatmentAdjustIsolatedUFConfirmResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentIsolatedUFConfirm class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustIsolatedUFConfirmResponse + * + */ +class VTreatmentAdjustmentIsolatedUFConfirm : public VAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustIsolatedUFConfirmRequestData _data; + + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + TRIGGER( bool , adjustment , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentIsolatedUFConfirm, AdjustIsolatedUFConfirmResponseData) + + // ----------- Confirm IsolatedUF +public slots: + void doConfirm (); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to confirm the the treatment ultrafiltration adjustment + * \param vData - data model for confirm the the treatment ultrafiltration adjustment request + */ + void didAdjustment(const AdjustIsolatedUFConfirmRequestData &vData); +}; +} Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFDurationEdit.cpp =================================================================== diff -u --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFDurationEdit.cpp (revision 0) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFDurationEdit.cpp (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,55 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VTreatmentAdjustmentIsolatedUFDurationEdit.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "VTreatmentAdjustmentIsolatedUFDurationEdit.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentIsolatedUFDurationEdit) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void VTreatmentAdjustmentIsolatedUFDurationEdit::initConnections() { + ACTION_VIEW_CONNECTION(AdjustIsolatedUFDurationEditResponseData); + ADJUST_VIEW_CONNECTION( AdjustIsolatedUFDurationEditRequestData); +} + +/*! + * \brief VTreatmentAdjustmentIsolatedUFDurationEdit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void VTreatmentAdjustmentIsolatedUFDurationEdit::onActionReceive(const AdjustIsolatedUFDurationEditResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + volumeGoalMax ( vData.mVolumeGoalMax / 1000.f ); // mL => L + + // *** 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::VTreatmentAdjustmentIsolatedUFDurationEdit::doAdjustment + * \details the invocable slot to adjust the treatment ultrafiltration volume + * \param vDuration - requested isolated UF duration + */ +void View::VTreatmentAdjustmentIsolatedUFDurationEdit::doAdjustment(quint32 vDuration) { + _data.duration = vDuration; + emit didAdjustment(_data); +} Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFDurationEdit.h =================================================================== diff -u --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFDurationEdit.h (revision 0) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFDurationEdit.h (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,63 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VTreatmentAdjustmentIsolatedUFDurationEdit.h + * \author (last) Behrouz NematiPour + * \date (last) 18-Apr-2022 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VAdjustmentResponseBase.h" +#include "MTreatmentAdjustIsolatedUFDurationEditResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentIsolatedUFDurationEdit class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustIsolatedUFDurationEditResponse + * + */ +class VTreatmentAdjustmentIsolatedUFDurationEdit : public VAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustIsolatedUFDurationEditRequestData _data; + + // The property adjustment_Triggered has to be always true + // and to always trigger the chasnge event to work as a notifier for GUI + TRIGGER( bool , adjustment , 0) + + // Treatment IsolatedUF data + PROPERTY( float , volumeGoalMax , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentIsolatedUFDurationEdit, AdjustIsolatedUFDurationEditResponseData) + + // ----------- Adjust IsolatedUF Duration +public slots: + void doAdjustment(quint32 vDuration); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the treatment ultrafiltration volume + * \param vData - data model for edit the treatment ultrafiltration volume adjustment request + */ + void didAdjustment(const AdjustIsolatedUFDurationEditRequestData &vData); +}; +} Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFVolumeGoalEdit.cpp =================================================================== diff -u --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFVolumeGoalEdit.cpp (revision 0) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFVolumeGoalEdit.cpp (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,60 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VTreatmentAdjustmentIsolatedUFVolumeGoalEdit.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "VTreatmentAdjustmentIsolatedUFVolumeGoalEdit.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentIsolatedUFVolumeGoalEdit) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void VTreatmentAdjustmentIsolatedUFVolumeGoalEdit::initConnections() { + ACTION_VIEW_CONNECTION(AdjustIsolatedUFVolumeGoalEditResponseData); + ADJUST_VIEW_CONNECTION( AdjustIsolatedUFVolumeGoalEditRequestData); +} + +/*! + * \brief VTreatmentAdjustmentIsolatedUFVolumeGoalEdit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void VTreatmentAdjustmentIsolatedUFVolumeGoalEdit::onActionReceive(const AdjustIsolatedUFVolumeGoalEditResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + volumeGoal ( vData.mVolumeGoal / 1000.f ); // mL => L + duration ( vData.mDuration ); + rate ( vData.mRate / 1000.f ); // mL/Hr => L/Hr + + // *** 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::VTreatmentAdjustmentIsolatedUFVolumeGoalEdit::doAdjustment + * \details the invocable slot to adjust the treatment isolated uf volume goal + * \param vVolumeGoal - requested isolated UF volume goal + */ +void View::VTreatmentAdjustmentIsolatedUFVolumeGoalEdit::doAdjustment(quint32 vDuration, float vVolumeGoal) { + qDebug() << QString("*** VTreatmentAdjustmentIsolatedUFVolumeGoalEdit::doAdjustment: vDuration=%1, vVolumeGoal=%2").arg(vDuration).arg(vVolumeGoal); // SQ + _data.duration = vDuration; + _data.volumeGoal = quint32(vVolumeGoal * 1000); + qDebug() << QString(" _data.volumeGoal=%1").arg(_data.volumeGoal); // SQ + emit didAdjustment(_data); +} Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFVolumeGoalEdit.h =================================================================== diff -u --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFVolumeGoalEdit.h (revision 0) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentIsolatedUFVolumeGoalEdit.h (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,65 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VTreatmentAdjustmentIsolatedUFVolumeGoalEdit.h + * \author (last) Behrouz NematiPour + * \date (last) 18-Apr-2022 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VAdjustmentResponseBase.h" +#include "MTreatmentAdjustIsolatedUFVolumeGoalEditResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentIsolatedUFVolumeGoalEdit class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustIsolatedUFVolumeGoalEditResponse + * + */ +class VTreatmentAdjustmentIsolatedUFVolumeGoalEdit : public VAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustIsolatedUFVolumeGoalEditRequestData _data; + + // The property adjustment_Triggered has to be always true + // and to always trigger the chasnge event to work as a notifier for GUI + TRIGGER( bool , adjustment , 0) + + // Treatment IsolatedUF data + PROPERTY( float , volumeGoal , 0) + PROPERTY( quint32 , duration , 0) + PROPERTY( float , rate , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentIsolatedUFVolumeGoalEdit, AdjustIsolatedUFVolumeGoalEditResponseData) + + // ----------- Adjust IsolatedUF Duration +public slots: + void doAdjustment(quint32 vDuration, float vVolumeGoal); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the treatment ultrafiltration volume + * \param vData - data model for edit the treatment ultrafiltration volume adjustment request + */ + void didAdjustment(const AdjustIsolatedUFVolumeGoalEditRequestData &vData); +}; +} Index: sources/view/td/data/treatment/VTDTreatmentStatesData.cpp =================================================================== diff -u -r036d378b4b89db03c812584c1d0f682494d81568 -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/view/td/data/treatment/VTDTreatmentStatesData.cpp (.../VTDTreatmentStatesData.cpp) (revision 036d378b4b89db03c812584c1d0f682494d81568) +++ sources/view/td/data/treatment/VTDTreatmentStatesData.cpp (.../VTDTreatmentStatesData.cpp) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -213,6 +213,9 @@ txStop ( mTreatmentStop ); txTreatment ( _txDialysis || _txStop ); + + bool mTreatmentIsolatedUF = vData.mSubMode == GuiTreatmentStates ::TREATMENT_ISO_UF_STATE ; + txIsolatedUF ( mTreatmentIsolatedUF ); } /*! Index: sources/view/td/data/treatment/VTDTreatmentStatesData.h =================================================================== diff -u -r41d3980778ddbd9d810169f83b4ad581c59c04e4 -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/view/td/data/treatment/VTDTreatmentStatesData.h (.../VTDTreatmentStatesData.h) (revision 41d3980778ddbd9d810169f83b4ad581c59c04e4) +++ sources/view/td/data/treatment/VTDTreatmentStatesData.h (.../VTDTreatmentStatesData.h) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -65,6 +65,7 @@ PROPERTY( bool , txRinseback , false) ///< TREATMENT_RINSEBACK_STATE = 4 # Perform rinseback with saline. Dialyzer bypassed. Dialysate recirculating PROPERTY( bool , txRecirculate , false) ///< TREATMENT_RECIRC_STATE = 5 # Recirculate saline and dialysate while patient disconnected. Blood lines open and shunted. Dialyzer is bypassed PROPERTY( bool , txEnd , false) ///< TREATMENT_END_STATE = 6 # Dialysis has ended. Blood pump slowed. Dialyzer is bypassed. Dialysate is recirculated. User can rinseback + PROPERTY( bool , txIsolatedUF , false) ///< TREATMENT_END_STATE = 7 # Isolated UF mode // ---- Ultrafiltration states PROPERTY( bool , ufPaused , false) ///< UF_PAUSED_STATE = 1 # Paused state of the ultrafiltration state machine Index: sources/view/td/data/treatment/VTreatmentIsolatedUFData.cpp =================================================================== diff -u --- sources/view/td/data/treatment/VTreatmentIsolatedUFData.cpp (revision 0) +++ sources/view/td/data/treatment/VTreatmentIsolatedUFData.cpp (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,29 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VTreatmentIsolatedUFData.cpp + * \author (last) Dara Navaei + * \date (last) 18-Jan-2024 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "VTreatmentIsolatedUFData.h" + +// Project +#include "GuiController.h" +#include "GuiGlobals.h" + +VIEW_DEF(VTreatmentIsolatedUF, TreatmentIsolatedUFData) + +void VTreatmentIsolatedUF::onActionReceive(const TreatmentIsolatedUFData &vData) +{ + duration ( vData.mDuration ); + volumeGoal ( vData.mVolumeGoal / 1000.f ); // mL => L + volumeDelivered ( vData.mVolumeDelivered / 1000.f ); // mL => L + rate ( vData.mRate / 1000.f ); // mL/Hr => L/Hr +} Index: sources/view/td/data/treatment/VTreatmentIsolatedUFData.h =================================================================== diff -u --- sources/view/td/data/treatment/VTreatmentIsolatedUFData.h (revision 0) +++ sources/view/td/data/treatment/VTreatmentIsolatedUFData.h (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -0,0 +1,46 @@ +/*! + * + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VTreatmentIsolatedUFData.h + * \author (last) Dara Navaei + * \date (last) 18-Jan-2024 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VView.h" +#include "MTreatmentIsolatedUFData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentIsolatedUF class + * \details View for Model's data representation. + * + * \sa Model::MTreatmentIsolatedUF + * + */ +class VTreatmentIsolatedUF : public QObject +{ + Q_OBJECT + + PROPERTY( quint32 , duration , 0) + PROPERTY( float , volumeGoal , 0) + PROPERTY( float , volumeDelivered , 0) + PROPERTY( float , rate , 0) + + VIEW_DEC(VTreatmentIsolatedUF, TreatmentIsolatedUFData) +}; +}