Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r600b6707b102919d981f3b1d18611834e23eae60 -r7714d25c7d26b66d81becfd5023556ef4c233e05 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 600b6707b102919d981f3b1d18611834e23eae60) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 7714d25c7d26b66d81becfd5023556ef4c233e05) @@ -156,11 +156,15 @@ Connections { target: _treatmentAdjustmentSetPoints function onConfirmClicked ( vValue ) { vTreatmentAdjustmentSetPoints.doAdjustment( +// _treatmentAdjustmentSetPoints.treatmentModality , // TODO LDT-3800 _treatmentAdjustmentSetPoints.bloodFlowRate , _treatmentAdjustmentSetPoints.dialysateFlowRate , _treatmentAdjustmentSetPoints.dialysateTemperature , +// _treatmentAdjustmentSetPoints.hepatitus // TODO LDT-3800 _treatmentAdjustmentSetPoints.acidConcentrate , _treatmentAdjustmentSetPoints.bicarbConcentrate +// _treatmentAdjustmentSetPoints.sodium // TODO LDT-3800 +// _treatmentAdjustmentSetPoints.bicarboante // TODO LDT-3800 ) } } @@ -210,6 +214,14 @@ Connections { target: vTreatmentAdjustmentSetPoints function onAdjustmentTriggered ( vValue ) { if (vTreatmentAdjustmentSetPoints.adjustment_Accepted) { + // TODO update setpoints here? + vTreatmentCreate.treatmentModality = _treatmentAdjustmentSetPoints.treatmentModality + vTreatmentCreate.acidConcentrate = _treatmentAdjustmentSetPoints.acidConcentrate + vTreatmentCreate.acidConcentrateConversionFactor = vTreatmentRanges.acidConcentrateModel.get(vTreatmentCreate.acidConcentrate).value + vTreatmentCreate.dryBicarbCartSize = _treatmentAdjustmentSetPoints.bicarbConcentrate + vTreatmentCreate.hepatitusBStatus = _treatmentAdjustmentSetPoints.hepatitus + vTreatmentCreate.sodium = _treatmentAdjustmentSetPoints.sodium + vTreatmentCreate.bicarbonate = _treatmentAdjustmentSetPoints.bicarboante _treatmentAdjustmentSetPoints.close() } else { Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentSetPoints.qml =================================================================== diff -u -r56381aae237db191956aff493907cd1f0801216b -r7714d25c7d26b66d81becfd5023556ef4c233e05 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentSetPoints.qml (.../TreatmentAdjustmentSetPoints.qml) (revision 56381aae237db191956aff493907cd1f0801216b) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentSetPoints.qml (.../TreatmentAdjustmentSetPoints.qml) (revision 7714d25c7d26b66d81becfd5023556ef4c233e05) @@ -30,11 +30,16 @@ TreatmentAdjustmentBase { id: _root objectName: "_TreatmentAdjustmentFlow" // SquishQt testability + readonly property alias treatmentModality : _treatmentModalityComboBox.currentIndex readonly property alias bloodFlowRate : _bloodFlowRate.value readonly property alias dialysateFlowRate : _dialysateFlowRate.value readonly property alias dialysateTemperature : _dialysateTemperature.value + readonly property alias hepatitus : _hepatitusStatusControl.currentIndex + readonly property alias acidConcentrate : _acidConcentrateComboBox.currentIndex readonly property alias bicarbConcentrate : _bicarbConcentrateComboBox.currentIndex + readonly property alias sodium : _sodium.value + readonly property alias bicarboante : _bicarbonate.value width : 1540 height : 865 @@ -48,9 +53,15 @@ } onAboutToShow: { - _bloodFlowRate.value = vTreatmentParametersSetPoint.bloodFlow - _dialysateFlowRate.value = vTreatmentParametersSetPoint.dialysateFlow.toFixed(Variables.dialysateFlowPrecision) - _dialysateTemperature.value = Variables.notSetVariable(vTreatmentParametersSetPoint.dialysateTemp.toFixed(Variables.dialysateTempPrecision)) + _treatmentModalityComboBox.currentIndex = vTreatmentCreate.treatmentModality + _bloodFlowRate.value = vTreatmentParametersSetPoint.bloodFlow + _dialysateFlowRate.value = vTreatmentParametersSetPoint.dialysateFlow.toFixed(Variables.dialysateFlowPrecision) + _dialysateTemperature.value = Variables.notSetVariable(vTreatmentParametersSetPoint.dialysateTemp.toFixed(Variables.dialysateTempPrecision)) + _hepatitusStatusControl.currentIndex = vTreatmentCreate.hepatitusBStatus + _acidConcentrateComboBox.currentIndex = vTreatmentCreate.acidConcentrate + _bicarbConcentrateComboBox.currentIndex = vTreatmentCreate.dryBicarbCartSize + _sodium.value = vTreatmentCreate.sodium + _bicarbonate.value = vTreatmentCreate.bicarbonate } Connections { target: _acidConcentrateAdjustment @@ -89,6 +100,22 @@ objectName : "_controlLeftColumn" spacing : Variables.defaultMargin + LabelUnitContainer { id: _treatmentModality + text : qsTr("Treatment Modality") + width : _private.containerWidth + + contentItem : BaseComboBox { id: _treatmentModalityComboBox + anchors.rightMargin : Variables.defaultMargin * 2 + anchors.leftMargin : anchors.rightMargin + anchors.topMargin : Variables.defaultMargin / 2 + anchors.bottomMargin: anchors.topMargin + isActive : true + currentIndex : vTreatmentCreate.treatmentModality + model : vTreatmentRanges.treatmentModalityOptions + centerHorizontally : true + } + } + LabelUnitValueAdjuster { id: _bloodFlowRate objectName : "_bloodFlowRate" width : _private.containerWidth @@ -137,6 +164,17 @@ onDidChange : function(vValue) { value = vValue } } + + LabelUnitContainer { id: _hepatitusStatus + text : qsTr("Hepatitus Status") + width : _private.containerWidth + + contentItem : ValueAdjusterCustom { id: _hepatitusStatusControl + value : vTreatmentCreate.hepatitusBStatus + defaultValue : vTreatmentCreate.hepatitusBStatus + model : vTreatmentRanges.hepatitisStatus + } + } } Column { id: _controlRightColumn @@ -150,7 +188,7 @@ text : qsTr("Acid Concentrate") titleFontSize : _private.titleFontPixelSize unitFontSize : _private.unitFontPixelSize - showEdit : true + // showEdit : _root.editingEnabled // Hide 👋📋 TODO Phase 2 onEditClicked : _acidConcentrateAdjustment.open() contentItem: BaseComboBox { id: _acidConcentrateComboBox @@ -162,20 +200,9 @@ rightMargin : anchors.leftMargin } font.pixelSize : _private.titleFontPixelSize - isActive : vTreatmentCreate.acidConcentrateSet + isActive : true currentIndex : vTreatmentCreate.acidConcentrate model : vTreatmentRanges.acidConcentrateOptions - - onClear : { - vTreatmentRanges.doClearAcidConcentrate(vTreatmentCreate.acidConcentrateSet) - vTreatmentCreate.acidConcentrateSet = false - } - - onActivated : { - if ( ! _acidConcentrate.valid ) { vTreatmentCreate.acidConcentrateRejectReason = Variables.noRejectReason } - vTreatmentCreate.acidConcentrate = _acidConcentrateComboBox.currentIndex - vTreatmentCreate.acidConcentrateSet = true - } } } @@ -196,57 +223,38 @@ rightMargin : anchors.leftMargin } font.pixelSize : _private.titleFontPixelSize - isActive : vTreatmentCreate.dryBicarbCartSizeSet + isActive : true currentIndex : vTreatmentCreate.dryBicarbCartSize model : vTreatmentRanges.dryBicabCartridgeSizeOptions - onClear : vTreatmentCreate.dryBicarbCartSizeSet = false - - onActivated : { - if ( ! _bicarbConcentrate.valid ) { vTreatmentCreate.bicarbonateConcentrateRejectReason = Variables.noRejectReason } - vTreatmentCreate.dryBicarbCartSize = _bicarbConcentrateComboBox.currentIndex - vTreatmentCreate.dryBicarbCartSizeSet = true - } } } - LabelUnitContainer { id: _theoreticalConductivity - objectName : "_theoreticalConductivity" - width : _private.containerWidth - height : Variables.adjustmentLabelUnitContainerHeight - text : qsTr("Theoretical Conductivity") - titleFontSize : _private.titleFontPixelSize - unitText : Variables.unitTextDialCond - unitFontSize : _private.unitFontPixelSize + LabelUnitValueAdjuster { id: _sodium + text : qsTr("Sodium (Na)") + unitText : Variables.unitTextConcentration + width : _private.containerWidth + minimum : vTreatmentRanges.dialysateSodiumMin + maximum : vTreatmentRanges.dialysateSodiumMax + step : vTreatmentRanges.dialysateSodiumRes + defaultValue : vTreatmentRanges.dialysateSodiumDef + value : vTreatmentCreate.sodium + isActive : true - contentItem: Text { id: _theoreticalConductivityText - objectName : "_theoreticalConductivityText" - anchors.centerIn : parent - width : contentWidth - height : contentHeight - color : Colors.offWhite - font.pixelSize : Fonts.fontPixelValueControl - text : Variables.emptyEntry - } + onDidChange : function(vValue) { value = vValue } } - LabelUnitContainer { id: _independentConductivity - objectName : "_independentConductivity" - width : _private.containerWidth - height : Variables.adjustmentLabelUnitContainerHeight - text : qsTr("Independent Conductivity Reading") - titleFontSize : _private.titleFontPixelSize - unitText : Variables.unitTextDialCond - unitFontSize : _private.unitFontPixelSize + LabelUnitValueAdjuster { id: _bicarbonate + text : qsTr("Bicarbonate") + unitText : Variables.unitTextConcentration + width : _private.containerWidth + minimum : vTreatmentRanges.dialysateBicarbonateMin + maximum : vTreatmentRanges.dialysateBicarbonateMax + step : vTreatmentRanges.dialysateBicarbonateRes + defaultValue : vTreatmentRanges.dialysateBicarbonateDef + value : vTreatmentCreate.bicarbonate + isActive : true - contentItem: Text { id: _independentConductivityText - objectName : "_independentConductivityText" - anchors.centerIn : parent - width : contentWidth - height : contentHeight - color : Colors.offWhite - font.pixelSize : Fonts.fontPixelValueControl - text : Variables.emptyEntry - } + onDidChange : function(vValue) { value = vValue } } } }