Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -raf8d98b36b427e2b5f4d6659fcf3b58ee79eab6a -r1d3e80dd50bfe08502c8e52de126a2b809370211 --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision af8d98b36b427e2b5f4d6659fcf3b58ee79eab6a) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 1d3e80dd50bfe08502c8e52de126a2b809370211) @@ -93,8 +93,9 @@ // connections Connections { target: vPostTreatmentStates - function onPatientDisconnectionChanged ( vValue ) { console.debug("patientDisconnection", vValue )} function onDrainReservoirsChanged ( vValue ) { console.debug("drainReservoirs ", vValue )} + function onPatientDisconnectionChanged ( vValue ) { console.debug("patientDisconnection", vValue )} + function onDisposableRemovalChanged ( vValue ) { console.debug("disposableRemoval ", vValue )} function onVerifyChanged ( vValue ) { console.debug("verify ", vValue )} } Index: sources/gui/qml/pages/pretreatment/PreTreatmentDisposablesStack.qml =================================================================== diff -u -r8172c6aa4187be26aa9c0e73a130bc6183ad10dd -r1d3e80dd50bfe08502c8e52de126a2b809370211 --- sources/gui/qml/pages/pretreatment/PreTreatmentDisposablesStack.qml (.../PreTreatmentDisposablesStack.qml) (revision 8172c6aa4187be26aa9c0e73a130bc6183ad10dd) +++ sources/gui/qml/pages/pretreatment/PreTreatmentDisposablesStack.qml (.../PreTreatmentDisposablesStack.qml) (revision 1d3e80dd50bfe08502c8e52de126a2b809370211) @@ -32,7 +32,7 @@ property int stackStepIndex : 3 - readonly property bool hasHeparin : vTreatmentCreate.heparinBolusVolume || vTreatmentCreate.heparinDispensingRate + readonly property bool hasHeparin : ! ( vTreatmentCreate.heparinBolusVolumeOff && vTreatmentCreate.heparinDispensingRateOff ) PreTreatmentBase { id: _preTreatmentDisposablesSelfTest objectName :"_preTreatmentDisposablesSelfTest" Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -rfcfa029b4a6d30ff8aa8162de7573545f3cf7052 -r1d3e80dd50bfe08502c8e52de126a2b809370211 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision fcfa029b4a6d30ff8aa8162de7573545f3cf7052) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 1d3e80dd50bfe08502c8e52de126a2b809370211) @@ -218,17 +218,15 @@ // This is a full implementation of a Switch Switch { id: _heparinDispensingRateSwitch property bool active: false - onActiveChanged : { - _heparinDispensingRate.active = active - } onCheckedChanged: { if ( ! active ) { active = true checked = ! checked } - vTreatmentCreate.heparinDispensingRate = 0 - _heparinDispensingRate.reset ( 0 ) - _heparinDispensingRate.active = ! checked + vTreatmentCreate.heparinDispensingRate = 0 + vTreatmentCreate.heparinDispensingRateOff = ! checked + _heparinDispensingRate.reset ( 0 ) + _heparinDispensingRate.active = ! checked } x : width * -1.5 @@ -304,9 +302,10 @@ active = true checked = ! checked } - vTreatmentCreate.heparinBolusVolume = 0 - _heparinBolusVolume.reset ( 0 ) - _heparinBolusVolume.active = ! checked + vTreatmentCreate.heparinBolusVolume = 0 + vTreatmentCreate.heparinBolusVolumeOff = ! checked + _heparinBolusVolume.reset ( 0 ) + _heparinBolusVolume.active = ! checked } x : width * -1.5 Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml =================================================================== diff -u -rfe8135c784a6c5ad2f35957d39af96f31d7c5618 -r1d3e80dd50bfe08502c8e52de126a2b809370211 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml (.../PreTreatmentCreateStack.qml) (revision fe8135c784a6c5ad2f35957d39af96f31d7c5618) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml (.../PreTreatmentCreateStack.qml) (revision 1d3e80dd50bfe08502c8e52de126a2b809370211) @@ -122,7 +122,10 @@ Connections { target: _pretreatmentConfirm function onBackClicked ( ) { vTreatmentCreate.doCancel () page( _pretreatmentCreate )} - function onConfirmClicked ( ) { vTreatmentCreate.doConfirm ()} + function onConfirmClicked ( ) { vTreatmentCreate.doConfirm () + vPostTreatmentAdjustmentTreatmentLog.heparinDispensingRateOff = vTreatmentCreate.heparinDispensingRateOff + vPostTreatmentAdjustmentTreatmentLog.heparinBolusVolumeOff = vTreatmentCreate.heparinBolusVolumeOff + } } onVisibleChanged: { Index: sources/storage/TreatmentLog.cpp =================================================================== diff -u -r80b5e8f1ebb90c03c37d90d90cd2da3bd95d6803 -r1d3e80dd50bfe08502c8e52de126a2b809370211 --- sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision 80b5e8f1ebb90c03c37d90d90cd2da3bd95d6803) +++ sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision 1d3e80dd50bfe08502c8e52de126a2b809370211) @@ -81,7 +81,7 @@ * Initializing the model for the constant values. * \param vData - the response model data. */ -void TreatmentLog::initModel(const AdjustTreatmentLogResponseData &vData, const QString &vPatientID) +void TreatmentLog::initModel(const AdjustTreatmentLogResponseData &vData, const QString &vPatientID, bool vIsHeparinOff) { // Formatted values QString mStrText = "%1"; @@ -108,42 +108,54 @@ // init/fill/clear the _values - _values.clear(); - for (int i = 0; i < eTreatmentLogIndexCount; i++) _values << ""; + _valuesLog.clear(); + for (int i = 0; i < eTreatmentLogIndexCount; i++) _valuesLog << ""; _deviceID = mStrText.arg(vData.mDeviceID ); - _values[ePatientID ] = vPatientID.trimmed() ; - _values[eBloodFlowRate ] = mStrText.arg(vData.mBloodFlowRate ); - _values[eDialysateFlowRate ] = mStrText.arg(vData.mDialysateFlowRate ); - _values[eTreatmentDuration ] = mTreatmentDuration ; - _values[eActualTreatmentDuration ] = mActualTreatmentDuration ; - _values[eAcidConcentrateType ] = mAcidConcentrateType ; - _values[eBicarbonateConcentrateType ] = mBicarbonateConcentrateType ; - _values[ePotassiumConcentration ] = mStrText.arg(vData.mPotassiumConcentration ); - _values[eCalciumConcentration ] = mStrText.arg(vData.mCalciumConcentration ); - _values[eBicarbonateConcentration ] = mStrText.arg(vData.mBicarbonateConcentration ); - _values[eSodiumConcentration ] = mStrText.arg(vData.mSodiumConcentration ); - _values[eDialysateTemperature ] = mStrText.arg(vData.mDialysateTemperature ,FLOAT3 ); - _values[eDialyzerType ] = mDialyzerType ; - _values[eHeparinType ] = mHeparinType ; - _values[eHeparinConcentration ] = mStrText.arg(vData.mHeparinConcentration ); - _values[eHeparinBolusVolume ] = mStrText.arg(vData.mHeparinBolusVolume ,FLOAT3 ); - _values[eHeparinDispenseRate ] = mStrText.arg(vData.mHeparinDispenseRate ,FLOAT3 ); - _values[eHeparinStop ] = mStrText.arg(vData.mHeparinStop ); - _values[eHeparinDeliveredVolume ] = mStrText.arg(vData.mHeparinDeliveredVolume ,FLOAT3 ); - _values[eTreatmentStartDateTime ] = mTreatmentStartDateTime ; - _values[eTreatmentEndDateTime ] = mTreatmentEndDateTime ; - _values[eWaterSampleTestResult ] = mWaterSampleTestResult ; - _values[eDialysateVolumeUsed ] = mStrText.arg(vData.mDialysateVolumeUsed ,FLOAT3 ); - _values[eOriginUFVolume ] = mStrText.arg(vData.mOriginUFVolume ,FLOAT3 ); - _values[eTargetUFVolume ] = mStrText.arg(vData.mTargetUFVolume ,FLOAT3 ); - _values[eActualUFVolume ] = mStrText.arg(vData.mActualUFVolume ,FLOAT3 ); - _values[eOriginUFRate ] = mStrText.arg(vData.mOriginUFRate ,FLOAT3 ); - _values[eTargetUFRate ] = mStrText.arg(vData.mTargetUFRate ,FLOAT3 ); - _values[eActualUFRate ] = mStrText.arg(vData.mActualUFRate ,FLOAT3 ); - _values[eSalineBolusVolume ] = mStrText.arg(vData.mSalineBolusVolume ); + _valuesLog[ePatientID ] = vPatientID.trimmed() ; + _valuesLog[eBloodFlowRate ] = mStrText.arg(vData.mBloodFlowRate ); + _valuesLog[eDialysateFlowRate ] = mStrText.arg(vData.mDialysateFlowRate ); + _valuesLog[eTreatmentDuration ] = mTreatmentDuration ; + _valuesLog[eActualTreatmentDuration ] = mActualTreatmentDuration ; + _valuesLog[eAcidConcentrateType ] = mAcidConcentrateType ; + _valuesLog[eBicarbonateConcentrateType ] = mBicarbonateConcentrateType ; + _valuesLog[ePotassiumConcentration ] = mStrText.arg(vData.mPotassiumConcentration ); + _valuesLog[eCalciumConcentration ] = mStrText.arg(vData.mCalciumConcentration ); + _valuesLog[eBicarbonateConcentration ] = mStrText.arg(vData.mBicarbonateConcentration ); + _valuesLog[eSodiumConcentration ] = mStrText.arg(vData.mSodiumConcentration ); + _valuesLog[eDialysateTemperature ] = mStrText.arg(vData.mDialysateTemperature ,FLOAT3 ); + _valuesLog[eDialyzerType ] = mDialyzerType ; + _valuesLog[eHeparinType ] = mHeparinType ; + _valuesLog[eHeparinConcentration ] = mStrText.arg(vData.mHeparinConcentration ); + _valuesLog[eHeparinBolusVolume ] = mStrText.arg(vData.mHeparinBolusVolume ,FLOAT3 ); + _valuesLog[eHeparinDispenseRate ] = mStrText.arg(vData.mHeparinDispenseRate ,FLOAT3 ); + _valuesLog[eHeparinStop ] = mStrText.arg(vData.mHeparinStop ); + _valuesLog[eHeparinDeliveredVolume ] = mStrText.arg(vData.mHeparinDeliveredVolume ,FLOAT3 ); + _valuesLog[eTreatmentStartDateTime ] = mTreatmentStartDateTime ; + _valuesLog[eTreatmentEndDateTime ] = mTreatmentEndDateTime ; + _valuesLog[eWaterSampleTestResult ] = mWaterSampleTestResult ; + _valuesLog[eDialysateVolumeUsed ] = mStrText.arg(vData.mDialysateVolumeUsed ,FLOAT3 ); + _valuesLog[eOriginUFVolume ] = mStrText.arg(vData.mOriginUFVolume ,FLOAT3 ); + _valuesLog[eTargetUFVolume ] = mStrText.arg(vData.mTargetUFVolume ,FLOAT3 ); + _valuesLog[eActualUFVolume ] = mStrText.arg(vData.mActualUFVolume ,FLOAT3 ); + _valuesLog[eOriginUFRate ] = mStrText.arg(vData.mOriginUFRate ,FLOAT3 ); + _valuesLog[eTargetUFRate ] = mStrText.arg(vData.mTargetUFRate ,FLOAT3 ); + _valuesLog[eActualUFRate ] = mStrText.arg(vData.mActualUFRate ,FLOAT3 ); + _valuesLog[eSalineBolusVolume ] = mStrText.arg(vData.mSalineBolusVolume ); + //https://diality.atlassian.net/browse/DEN-15911 + _valuesGui = _valuesLog; + if ( ! vIsHeparinOff ) goto lOut; + + _valuesGui[eHeparinType ] = tr("NONE"); + _valuesGui[eHeparinConcentration ] = tr("NONE"); + _valuesGui[eHeparinBolusVolume ] = tr("NONE"); + _valuesGui[eHeparinDispenseRate ] = tr("NONE"); + _valuesGui[eHeparinStop ] = tr("NONE"); + _valuesGui[eHeparinDeliveredVolume ] = tr("NONE"); + +lOut: emit didTxCodeReceive("..."); /* put ... just to notify user about the wait for data */ } @@ -226,7 +238,7 @@ bool TreatmentLog::saveLog() { _lastTxInfo.clear(); - bool ok = (unsigned)_values.count() >= eTreatmentLogIndexCount; + bool ok = (unsigned)_valuesLog.count() >= eTreatmentLogIndexCount; if (!ok) return false; @@ -314,13 +326,13 @@ } ADDALINE(""); - _lastTxInfo.mDateTime = _values[eTreatmentStartDateTime]; + _lastTxInfo.mDateTime = _valuesLog[eTreatmentStartDateTime]; _lastTxInfo.mDateTime.replace("/", "" ); // remove date separator _lastTxInfo.mDateTime.replace(":", "" ); // remove time separator _lastTxInfo.mDateTime.replace(" ", "_"); // replace spaces _lastTxInfo.mDeviceID = _deviceID; - _lastTxInfo.mPatientID = _values[ePatientID]; + _lastTxInfo.mPatientID = _valuesLog[ePatientID]; _lastTxInfo.mFileName = QString("%1%2_%3.log") .arg(_treatmentLogPath_Pending) .arg(_lastTxInfo.mDateTime) Index: sources/storage/TreatmentLog.h =================================================================== diff -u -r6d76149dca70e879f33bf6ed44203d0d06bc523a -r1d3e80dd50bfe08502c8e52de126a2b809370211 --- sources/storage/TreatmentLog.h (.../TreatmentLog.h) (revision 6d76149dca70e879f33bf6ed44203d0d06bc523a) +++ sources/storage/TreatmentLog.h (.../TreatmentLog.h) (revision 1d3e80dd50bfe08502c8e52de126a2b809370211) @@ -198,7 +198,7 @@ return ""; } QString value(quint8 vIndex) const { - if (vIndex < _values.count()) return _values[vIndex]; + if (vIndex < _valuesLog.count()) return _valuesLog[vIndex]; return ""; } QString unit(quint8 vIndex) const { @@ -207,7 +207,10 @@ } // Lists - QStringList _values; + QStringList _valuesLog; + + QStringList _valuesGui; + QList _treatmentLogAvrgeData; QList _treatmentLogAlarmData; QList _treatmentLogEventData; @@ -232,11 +235,12 @@ void timerEvent(QTimerEvent *) override; public: - void initModel(const AdjustTreatmentLogResponseData &vData, const QString &vPatientID); + void initModel(const AdjustTreatmentLogResponseData &vData, const QString &vPatientID, bool vIsHeparinOff); - const QStringList titles() const { return _titles; } - const QStringList units () const { return _units ; } - const QStringList values() const { return _values; } + const QStringList titles () const { return _titles ; } + const QStringList units () const { return _units ; } + const QStringList valuesLog () const { return _valuesLog; } + const QStringList valuesGui () const { return _valuesGui; } void append(const TreatmentLogAvrgeData &vData); void append(const TreatmentLogAlarmData &vData); Index: sources/view/VTreatmentCreate.h =================================================================== diff -u -r159f2bb0317c7c3c0336e4cb80c7fef3f87e329a -r1d3e80dd50bfe08502c8e52de126a2b809370211 --- sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 159f2bb0317c7c3c0336e4cb80c7fef3f87e329a) +++ sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 1d3e80dd50bfe08502c8e52de126a2b809370211) @@ -74,6 +74,9 @@ // friends friend class::tst_views; + PROPERTY(bool , heparinDispensingRateOff , true) + PROPERTY(bool , heparinBolusVolumeOff , true) + VALUESET(quint32 , bloodFlowRate , 0) VALUESET(quint32 , dialysateFlowRate , 0) VALUESET(quint32 , treatmentDuration , 0) Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r1d3e80dd50bfe08502c8e52de126a2b809370211 --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (.../VPostTreatmentAdjustTreatmentLog.cpp) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (.../VPostTreatmentAdjustTreatmentLog.cpp) (revision 1d3e80dd50bfe08502c8e52de126a2b809370211) @@ -74,11 +74,22 @@ adjustment_Accepted ( vData.mAccepted ); adjustment_Reason ( vData.mReason ); - _TreatmentLog.initModel ( vData, _patientID.trimmed() ); + // init the TreatmentLog model + bool isHeparinOff = heparinBolusVolumeOff() && heparinDispensingRateOff(); + _TreatmentLog.initModel ( vData, _patientID.trimmed(), isHeparinOff); if ( vData.mAccepted ) { - parametersText ( _TreatmentLog.values() ); + //TODO Commented out for now + // It is needed to display NONE for the heparin items if the heparin set to off on Create Treatment Prameters 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.valuesGui() ); } else { - parametersText ( {} ); + parametersText ( {} ); } // raw values Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r1d3e80dd50bfe08502c8e52de126a2b809370211 --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h (.../VPostTreatmentAdjustTreatmentLog.h) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h (.../VPostTreatmentAdjustTreatmentLog.h) (revision 1d3e80dd50bfe08502c8e52de126a2b809370211) @@ -50,6 +50,9 @@ TRIGGER( bool , adjustment , 0) // disabled coco end + PROPERTY(bool , heparinDispensingRateOff , true) + PROPERTY(bool , heparinBolusVolumeOff , true) + PROPERTY(QString , patientID , "") PROPERTY(quint32 , bloodFlowRate , 0 )