Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r975e1964b60365b24c74be139c6b84369a7248ce -re1816d3c0bcda6e4810d634a02160c1aab41e643 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 975e1964b60365b24c74be139c6b84369a7248ce) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision e1816d3c0bcda6e4810d634a02160c1aab41e643) @@ -33,9 +33,10 @@ objectName: "TreatmentStack" onVisibleChanged : { // this should never happen by design, but in tests it can easily happen and will block the screen touch. - _treatmentAdjustmentFlow .close() + _treatmentAdjustmentSetPoints .close() _treatmentAdjustmentVitals .close() _treatmentAdjustmentPressuresLimits .close() + _treatmentAdjustmentBolusVolume .close() _treatmentAdjustmentDuration .close() _treatmentAdjustmentUltrafiltration .close() @@ -64,17 +65,18 @@ Connections { target: _treatmentHome function onSectionFlowClicked ( vValue ) { - _treatmentAdjustmentFlow.open() + _treatmentAdjustmentSetPoints.open() } function onSectionVitalsClicked ( vValue ) { _treatmentAdjustmentVitalsInterval.open() } function onSectionPressuresClicked ( vValue ) { _treatmentAdjustmentPressuresLimits.open() } + function onSectionSalineClicked ( vValue ) { + _treatmentAdjustmentBolusVolume.open() + } function onSectionTimeClicked ( vValue ) { - //DEBUG: console.log("time total minutes: " + vTreatmentTime.time_Total / 60 ) - _treatmentAdjustmentDuration.setDurationValue(vTreatmentTime.time_Total / 60) // minutes => hours _treatmentAdjustmentDuration.open() } function onSectionUltrafiltrationClicked ( vValue ) { @@ -86,63 +88,76 @@ ScreenItem { id: _treatmentHeparin } // TODO: make me! //// Treatment Adjustment Dialogs - TreatmentAdjustmentFlow { id: _treatmentAdjustmentFlow } - TreatmentAdjustmentPressuresLimits { id: _treatmentAdjustmentPressuresLimits } + TreatmentAdjustmentSetPoints { id: _treatmentAdjustmentSetPoints } + TreatmentAdjustmentPressuresLimits { id: _treatmentAdjustmentPressuresLimits } + TreatmentAdjustmentBolusVolume { id: _treatmentAdjustmentBolusVolume } TreatmentAdjustmentUltrafiltration { id: _treatmentAdjustmentUltrafiltration } - Connections { target: _treatmentAdjustmentFlow - function onConfirmClicked ( vValue ) { vTreatmentAdjustmentFlows.doAdjustment( - _treatmentAdjustmentFlow.bloodFlowRateValue , - _treatmentAdjustmentFlow.dialysateFlowRateValue ) + Connections { target: _treatmentAdjustmentSetPoints + function onConfirmClicked ( vValue ) { + vTreatmentAdjustmentSetPoints.doAdjustment( + _treatmentAdjustmentSetPoints.bloodFlowRate , + _treatmentAdjustmentSetPoints.dialysateFlowRate , + _treatmentAdjustmentSetPoints.dialysateTemperature , + _treatmentAdjustmentSetPoints.acidConcentrate , + _treatmentAdjustmentSetPoints.bicarbConcentrate + ) } } Connections { target: _treatmentAdjustmentPressuresLimits - function onConfirmClicked ( vValue ) { vTreatmentAdjustmentPressuresLimits.doAdjustment( - _treatmentAdjustmentPressuresLimits.arterialPressureLimitWindow , - _treatmentAdjustmentPressuresLimits.venousPressureLimitWindow , - _treatmentAdjustmentPressuresLimits.venousPressureLimitAsymtrc ) + function onConfirmClicked ( vValue ) { + vTreatmentAdjustmentPressuresLimits.doAdjustment( + _treatmentAdjustmentPressuresLimits.arterialPressureLimitWindow , + _treatmentAdjustmentPressuresLimits.venousPressureLimitWindow , + _treatmentAdjustmentPressuresLimits.venousPressureLimitAsymtrc , + _treatmentAdjustmentPressuresLimits.tmpLimitWindow + ) } } - - TreatmentAdjustmentDuration { id: _treatmentAdjustmentDuration } - Connections { target: _treatmentAdjustmentDuration - function onConfirmClicked ( vValue ) { vTreatmentAdjustmentDuration.doAdjustment( - _treatmentAdjustmentDuration.durationValue ) + Connections { target: _treatmentAdjustmentBolusVolume + function onConfirmClicked ( vValue ) { + vTreatmentAdjustmentBolusVolume.doAdjustment(_treatmentAdjustmentBolusVolume.fluidBolusVolume) } } + TreatmentAdjustmentDuration { id: _treatmentAdjustmentDuration } + TreatmentAdjustmentVitalsInterval { id: _treatmentAdjustmentVitalsInterval } // ---------- Manages Responses ---------- - Connections { target: vTreatmentAdjustmentDuration + Connections { target: vTreatmentAdjustmentBolusVolume function onAdjustmentTriggered ( vValue ) { - if ( vTreatmentAdjustmentDuration.adjustment_Accepted ) { - vTreatmentUltrafiltration.maximum = vTreatmentAdjustmentDuration.ultrafiltration - _treatmentAdjustmentDuration.accept() - } else { - _treatmentAdjustmentDuration.setDurationValue(vTreatmentAdjustmentDuration.duration); - _treatmentAdjustmentDuration.notification.text = vTreatmentAdjustmentDuration.text(); + if ( vTreatmentAdjustmentBolusVolume.adjustment_Accepted ) { + _treatmentAdjustmentBolusVolume.close() } + else { + _treatmentAdjustmentBolusVolume.notification.text = vTreatmentAdjustmentBolusVolume.adjustment_ReasonText + } } } Connections { target: vTreatmentAdjustmentPressuresLimits function onAdjustmentTriggered ( vValue ) { - // values have to be update even when rejected HD is reverting back the values. - // if accepted will be updated for later [may need refresh later] - _treatmentAdjustmentPressuresLimits.arterialPressureLimitWindow = vTreatmentAdjustmentPressuresLimits.arterialPressureLimitWindow - _treatmentAdjustmentPressuresLimits.venousPressureLimitWindow = vTreatmentAdjustmentPressuresLimits.venousPressureLimitWindow - _treatmentAdjustmentPressuresLimits.venousPressureLimitAsymtrc = vTreatmentAdjustmentPressuresLimits.venousPressureLimitAsymtrc - if (vTreatmentAdjustmentPressuresLimits.adjustment_Accepted) { _treatmentAdjustmentPressuresLimits.close() } else { - _treatmentAdjustmentPressuresLimits.notification.text = vTreatmentAdjustmentPressuresLimits.text() + _treatmentAdjustmentPressuresLimits.notification.text = vTreatmentAdjustmentPressuresLimits.adjustment_ReasonText } } } + Connections { target: vTreatmentAdjustmentSetPoints + function onAdjustmentTriggered ( vValue ) { + if (vTreatmentAdjustmentSetPoints.adjustment_Accepted) { + _treatmentAdjustmentSetPoints.close() + } + else { + _treatmentAdjustmentSetPoints.notification.text = vTreatmentAdjustmentSetPoints.adjustment_ReasonText + } + } + } + Connections { target: vTDOpMode // The initail screen should be the Blood Prime, since that one is the earlier state in the list. // also since it is being used in two stacks In-Treatment and also in End-Treatmet is has been defined in the MainStack.