Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp =================================================================== diff -u -rc4bd7072571428744e11dd24d5da1d1a3e1d1686 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (.../VPostTreatmentAdjustTreatmentLog.cpp) (revision c4bd7072571428744e11dd24d5da1d1a3e1d1686) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (.../VPostTreatmentAdjustTreatmentLog.cpp) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * 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 VPostTreatmentAdjustTreatmentLog.cpp * \author (last) Behrouz NematiPour - * \date (last) 11-Apr-2021 + * \date (last) 21-Nov-2023 * \author (original) Behrouz NematiPour * \date (original) 11-Apr-2021 * @@ -20,7 +20,7 @@ // Project #include "GuiController.h" -#include "FileHandler.h" +//#include "FileHandler.h" using namespace Storage; @@ -38,14 +38,23 @@ ACTION_VIEW_CONNECTION(TreatmentLogEventData); connect(&_TreatmentLog , &TreatmentLog::isIdleNotified, - this , [=](bool vIdle){isIdle(vIdle);}); + [=](bool vIdle) { isIdle(vIdle); } ); + + connect(&_TreatmentLog , &TreatmentLog::didTxCodeReceive, + [=](const QString &vTxCode) { txCode( vTxCode ); } ); + + connect(&_TreatmentLog , &TreatmentLog::didNotification, + [=](const QString &vNotification) { notification(vNotification); } ); } /*! * \brief View::VPostTreatmentAdjustmentTreatmentLog::doRequest * \details the invocable slot to send user's treatment log request */ void View::VPostTreatmentAdjustmentTreatmentLog::doRequest() { + _TreatmentLog.clearModel(); + parametersText ( {} ); + AdjustTreatmentLogRequestData data; emit didAdjustment(data); } @@ -68,8 +77,22 @@ adjustment_Accepted ( vData.mAccepted ); adjustment_Reason ( vData.mReason ); - _TreatmentLog.initModel (vData, _patientID.trimmed() ); - parametersText ( _TreatmentLog.values() ); + // init the TreatmentLog model + _TreatmentLog.initModel ( vData, _patientID.trimmed(), heparinBolusVolumeOff(), heparinDispensingRateOff()); + if ( vData.mAccepted ) { + //TODO Commented out for now + // It is needed to display NONE for the heparin items if the heparin set to off on Create Treatment Parameters screen. + // The problem is the data comes from the _TreatmentLog model + // But if that model changes to have the NONE values, then the CloudSync or Cloud may reject the TxLog. + // When the Cloud is updated we can as well update the entire flow. + // For now it will only updates the display/Gui value. + // Look for the https://diality.atlassian.net/browse/DEN-15911 + // to know were to update for full model the view update. + // When the model updated the valueGui() can be removed and valuesLog() can be used. + parametersText ( _TreatmentLog.values() ); + } else { + parametersText ( {} ); + } // raw values bloodFlowRate ( vData.mBloodFlowRate ); @@ -90,8 +113,10 @@ averageDialysateFlow ( vData.mAverageDialysateFlow ); dialysateVolumeUsed ( vData.mDialysateVolumeUsed ); averageDialysateTemp ( vData.mAverageDialysateTemp ); + originUFVolume ( vData.mOriginUFVolume ); targetUFVolume ( vData.mTargetUFVolume ); actualUFVolume ( vData.mActualUFVolume ); + originUFRate ( vData.mOriginUFRate ); targetUFRate ( vData.mTargetUFRate ); actualUFRate ( vData.mActualUFRate ); salineBolusVolume ( vData.mSalineBolusVolume );