Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r600b6707b102919d981f3b1d18611834e23eae60 -r8cf828e5768d491c3e329c39b108624832054e94 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 600b6707b102919d981f3b1d18611834e23eae60) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 8cf828e5768d491c3e329c39b108624832054e94) @@ -22,6 +22,7 @@ import "qrc:/compounds" import "qrc:/dialogs" import "qrc:/globals" +import "qrc:/pages/endtreatment" import "qrc:/pages/treatment/adjustments" /*! @@ -41,7 +42,10 @@ _treatmentAdjustmentDuration .close() _treatmentAdjustmentUltrafiltration .close() - if (! visible) { + if (visible) { + _headerBar.activeStack = stackView + } + else { _headerBar.menuHidden = true stackView.initialItem = null } @@ -76,35 +80,30 @@ // Components TreatmentBloodPrime { id: _treatmentBloodPrime - StackView.onActivating : { _headerBar.titleText = qsTr("Blood Priming") } - StackView.onDeactivated : { _headerBar.titleText = "" } onIncrementRate : function(newValue) { vTreatmentAdjustmentBloodFlowRate.doAdjustment(newValue) } onDecrementRate : function(newValue) { vTreatmentAdjustmentBloodFlowRate.doAdjustment(newValue) } onPause : { vTreatmentAdjustmentBloodPrime.doPause() } onResume : { vTreatmentAdjustmentBloodPrime.doResume() } } - Connections { target: vTreatmentAdjustmentBloodPrime - function onAdjustmentTriggered ( vValue ) { - if (vTreatmentAdjustmentBloodPrime.adjustment_Accepted) { - _treatmentBloodPrime.notification.text = "" - } - else { - _treatmentBloodPrime.notification.text = vTreatmentAdjustmentBloodPrime.text() - } - } - } - Connections { target: vTreatmentAdjustmentBloodFlowRate - function onAdjustmentTriggered ( vValue ) { - if (vTreatmentAdjustmentBloodPrime.adjustment_Accepted) { - _treatmentBloodPrime.notification.text = "" - } - else { - _treatmentBloodPrime.notification.text = vTreatmentAdjustmentBloodFlowRate.text() - } - } - } TreatmentHome { id: _treatmentHome } + TreatmentTrends { id: _treatmentTrends } + TreatmentHeparin { id: _treatmentHeparin } + TreatmentHDF { id: _treatmentHDF } + + // End Treatment + EndTreatmentRinsebackStack { id: _endTreatmentRinsebackStack } + EndTreatmentRecirculateStack { id: _endTreatmentRecirculateStack } + + //// Treatment Adjustment Dialogs + TreatmentAdjustmentSetPoints { id: _treatmentAdjustmentSetPoints } + TreatmentAdjustmentPressuresLimits { id: _treatmentAdjustmentPressuresLimits } + TreatmentAdjustmentBolusVolume { id: _treatmentAdjustmentBolusVolume } + TreatmentAdjustmentUltrafiltrationStack { id: _treatmentAdjustmentUltrafiltration } + TreatmentAdjustmentHDF { id: _treatmentAdjustmentHDF } + TreatmentAdjustmentDurationStack { id: _treatmentAdjustmentDuration } + TreatmentAdjustmentVitalsInterval { id: _treatmentAdjustmentVitalsInterval } + Connections { target: _treatmentHome function onSectionFlowClicked ( vValue ) { _treatmentAdjustmentSetPoints.open() @@ -126,15 +125,12 @@ } } - ScreenItem { id: _treatmentTrends } // TODO: make me! - TreatmentHeparin { id: _treatmentHeparin } Connections { target: _treatmentHeparin function onIdleTimeout ( ) { _headerBar.headerMenuIndex = HeaderBar.Treatment // on heparin idle timeout go to main treatment } } - TreatmentHDF { id: _treatmentHDF } Connections { target: _treatmentHDF function onSectionPressuresClicked ( ) { _treatmentAdjustmentPressuresLimits.open() @@ -146,24 +142,25 @@ } } - //// Treatment Adjustment Dialogs - TreatmentAdjustmentSetPoints { id: _treatmentAdjustmentSetPoints } - TreatmentAdjustmentPressuresLimits { id: _treatmentAdjustmentPressuresLimits } - TreatmentAdjustmentBolusVolume { id: _treatmentAdjustmentBolusVolume } - TreatmentAdjustmentUltrafiltrationStack { id: _treatmentAdjustmentUltrafiltration } - TreatmentAdjustmentHDF { id: _treatmentAdjustmentHDF } - Connections { target: _treatmentAdjustmentSetPoints function onConfirmClicked ( vValue ) { vTreatmentAdjustmentSetPoints.doAdjustment( +// _treatmentAdjustmentSetPoints.treatmentModality , // TODO _treatmentAdjustmentSetPoints.bloodFlowRate , _treatmentAdjustmentSetPoints.dialysateFlowRate , _treatmentAdjustmentSetPoints.dialysateTemperature , +// _treatmentAdjustmentSetPoints.hepatitus // TODO _treatmentAdjustmentSetPoints.acidConcentrate , - _treatmentAdjustmentSetPoints.bicarbConcentrate + vTreatmentRanges.acidConcentrateModel.get(_treatmentAdjustmentSetPoints.acidConcentrate).value, + _treatmentAdjustmentSetPoints.bicarbConcentrate , + _treatmentAdjustmentSetPoints.treatmentModality , + _treatmentAdjustmentSetPoints.hepatitus , + _treatmentAdjustmentSetPoints.sodium , + _treatmentAdjustmentSetPoints.bicarbonate ) } } + Connections { target: _treatmentAdjustmentPressuresLimits function onConfirmClicked ( vValue ) { vTreatmentAdjustmentPressuresLimits.doAdjustment( @@ -174,16 +171,13 @@ ) } } + Connections { target: _treatmentAdjustmentBolusVolume function onConfirmClicked ( vValue ) { vTreatmentAdjustmentBolusVolume.doAdjustment(_treatmentAdjustmentBolusVolume.fluidBolusVolume) } } - TreatmentAdjustmentDurationStack { id: _treatmentAdjustmentDuration } - - TreatmentAdjustmentVitalsInterval { id: _treatmentAdjustmentVitalsInterval } - // ---------- Manages Responses ---------- Connections { target: vTreatmentAdjustmentBolusVolume function onAdjustmentTriggered ( vValue ) { @@ -210,6 +204,13 @@ Connections { target: vTreatmentAdjustmentSetPoints function onAdjustmentTriggered ( vValue ) { if (vTreatmentAdjustmentSetPoints.adjustment_Accepted) { + // TODO update setpoints here? + vTreatmentCreate.treatmentModality = _treatmentAdjustmentSetPoints.treatmentModality + vTreatmentCreate.acidConcentrate = _treatmentAdjustmentSetPoints.acidConcentrate + vTreatmentCreate.dryBicarbCartSize = _treatmentAdjustmentSetPoints.bicarbConcentrate + vTreatmentCreate.hepatitusBStatus = _treatmentAdjustmentSetPoints.hepatitus + vTreatmentCreate.sodium = _treatmentAdjustmentSetPoints.sodium + vTreatmentCreate.bicarbonate = _treatmentAdjustmentSetPoints.bicarbonate _treatmentAdjustmentSetPoints.close() } else { @@ -218,24 +219,46 @@ } } + Connections { target: vTreatmentAdjustmentBloodPrime + function onAdjustmentTriggered ( vValue ) { + if (vTreatmentAdjustmentBloodPrime.adjustment_Accepted) { + _treatmentBloodPrime.notification.text = "" + } + else { + _treatmentBloodPrime.notification.text = vTreatmentAdjustmentBloodPrime.text() + } + } + } + + Connections { target: vTreatmentAdjustmentBloodFlowRate + function onAdjustmentTriggered ( vValue ) { + if (vTreatmentAdjustmentBloodPrime.adjustment_Accepted) { + _treatmentBloodPrime.notification.text = "" + } + else { + _treatmentBloodPrime.notification.text = vTreatmentAdjustmentBloodFlowRate.text() + } + } + } + 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. - function onInTreatmentChanged ( vValue ) { page( _treatmentBloodPrime , vValue )} - } - - Connections { target: _treatmentBloodPrime - function onVisibleChanged ( vValue ) { - if (_treatmentBloodPrime.visible) { - _headerBar.menuHidden = true + function onInTreatmentChanged ( vValue ) { + page( _treatmentBloodPrime , vValue ) + if (vValue) { + _treatmentTrends.isParamExpanded = true + vTreatmentTrends.doClearData() } } } Connections { target: vTDTreatmentStates // in-Treatmet - function onTxBloodPrimeChanged ( vValue ) { page( _treatmentBloodPrime , vValue )} - function onTxDialysisChanged ( vValue ) { page( _treatmentHome , vValue )} - function onTxEndChanged ( vValue ) { if ( vValue ) { _endTreatmentDialog.open() }} + function onTxBloodPrimeChanged ( vValue ) { page( _treatmentBloodPrime , vValue )} + function onTxDialysisChanged ( vValue ) { page( _treatmentHome , vValue )} + function onTxEndChanged ( vValue ) { if ( vValue ) { _endTreatmentDialog.open() }} + function onTxRinsebackChanged ( vValue ) { page( _endTreatmentRinsebackStack , vValue )} + function onTxRecirculateChanged ( vValue ) { page( _endTreatmentRecirculateStack , vValue )} } }