Index: sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml =================================================================== diff -u -r1d6adeff8df4dc9395d6a2aee3c7f33d903c4711 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml (.../TreatmentHeparin.qml) (revision 1d6adeff8df4dc9395d6a2aee3c7f33d903c4711) +++ sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml (.../TreatmentHeparin.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,15 +1,15 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-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 TreatmentHeparin.qml - * \author (last) Behrouz NematiPour - * \date (last) 17-Nov-2020 + * \file TreatmentHeparin.qml + * \author (last) Vy + * \date (last) 17-May-2023 * \author (original) Behrouz NematiPour - * \date (original) 17-Nov-2020 + * \date (original) 20-Nov-2020 * */ @@ -34,13 +34,15 @@ readonly property bool isDispensing : vHDTreatmentStates.hpDispensing readonly property bool isCompleted : vHDTreatmentStates.hpCompleted readonly property bool isEmpty : vHDTreatmentStates.hpEmpty + readonly property bool isRejected : vTreatmentAdjustmentHeparin.adjustment_Accepted + readonly property bool displayReason : _private.displayReason readonly property bool isTxRunning : vHDTreatmentStates.txDialysis QtObject { id: _private readonly property string textHeparin : qsTr("HEPARIN DELIVERY") readonly property string textOff : qsTr("OFF") - readonly property string textPause : qsTr("PAUSE DELIVERY") + readonly property string textPause : qsTr("PAUSE HEPARIN") readonly property string textResume : qsTr("RESUME DELIVERY") readonly property string textComplete : qsTr("OFF") readonly property string textVolumeTarget : "(" + valueTarget + unit + ")" @@ -49,7 +51,10 @@ readonly property string mesgEmpty : qsTr("Syringe Empty") readonly property string mesgOff : qsTr("") // it is redundant since the button text is now display OFF readonly property string mesgStopped : qsTr("Delivery Stopped") + readonly property string mesgPaused : qsTr("Delivery Paused") readonly property string mesgDispensing : qsTr("Dispensing Active") + + property bool displayReason : false readonly property string mesgRejectReason : vTreatmentAdjustmentHeparin.adjustment_ReasonText } @@ -71,7 +76,8 @@ _private.textHeparin unit : Variables.unitTextSaline - valueDelivered: vTreatmentHeparin.cumulative.toFixed(1) // this is the cumulative volume of the Heparin bolus and despensing. + valueDecimal : Variables.heparinPrecision + valueDelivered : vTreatmentHeparin.cumulative // this is the cumulative volume of the Heparin bolus and despensing. VTreatmentHeparin { id: vTreatmentHeparin } @@ -81,14 +87,27 @@ if ( isDispensing ) vTreatmentAdjustmentHeparin.doPause () } + Connections { target: vTreatmentAdjustmentHeparin + function onAdjustmentTriggered ( vValue ) { + _private.displayReason = ! vTreatmentAdjustmentHeparin.adjustment_Accepted + } + } + Connections { target: vHDTreatmentStates + function onHeparinChanged ( vValue ) { + _private.displayReason = false + } + + } + notification { visible : true - text : isBolus ? _private.mesgBolus : + text : displayReason ? _private.mesgRejectReason : + isBolus ? _private.mesgBolus : isOff ? _private.mesgOff : isStopped ? _private.mesgStopped : + isPaused ? _private.mesgPaused : isCompleted ? _private.mesgCompleted : isEmpty ? _private.mesgEmpty : - isDispensing ? _private.mesgDispencing : - _private.mesgRejectReason + isDispensing ? _private.mesgDispensing : "" } }