Index: leahi.qrc
===================================================================
diff -u -r6a1e770e3d7a8729ab7acdb7b2e96a5b72f8bc9f -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- leahi.qrc (.../leahi.qrc) (revision 6a1e770e3d7a8729ab7acdb7b2e96a5b72f8bc9f)
+++ leahi.qrc (.../leahi.qrc) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -48,6 +48,7 @@
sources/gui/qml/dialogs/headerbar/HeaderbarWiFi.qml
sources/gui/qml/dialogs/headerbar/HeaderbarStorage.qml
sources/gui/qml/dialogs/headerbar/HeaderbarSettings.qml
+ sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml
sources/gui/qml/dialogs/headerbar/HeaderbarInformation.qml
Index: sources/gui/qml/components/BaseComboBox.qml
===================================================================
diff -u -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/gui/qml/components/BaseComboBox.qml (.../BaseComboBox.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a)
+++ sources/gui/qml/components/BaseComboBox.qml (.../BaseComboBox.qml) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -28,6 +28,7 @@
property alias dropDownWidth : _popup.width
property int delegateWidth : dropDownWidth
property int delegateHeight : height
+ property int actualValue : 0
width : 300
displayText : _root.active ? currentText : Variables.emptyEntry
@@ -43,6 +44,8 @@
active = false
}
+ function sync () { currentIndex = actualValue }
+
contentItem: Text { id: _displayText
text : parent.displayText
color : Colors.offWhite
@@ -52,7 +55,7 @@
}
background: Rectangle { id: _background
- color : Colors.highlightMedProgressBar
+ color : Colors.comboBoxDisplay
radius : Variables.dialogRadius
}
Index: sources/gui/qml/components/HeaderBar.qml
===================================================================
diff -u -re1ecb77ba0ff9619b7363f14e1ed3c3e110c4057 -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision e1ecb77ba0ff9619b7363f14e1ed3c3e110c4057)
+++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -115,7 +115,7 @@
iconImageSource : "qrc:/images/iPrescription"
extraSpace : _headerButtonRow.spacing
- onPressed : print("Prescription button pressed!")
+ onPressed : _headerbarPrescription.open()
}
IconButton { id : _wifiButton
Index: sources/gui/qml/compounds/ValueAdjuster.qml
===================================================================
diff -u -rea4de12b2c7d6306a9cb89ff23eb95ccd25077a1 -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/gui/qml/compounds/ValueAdjuster.qml (.../ValueAdjuster.qml) (revision ea4de12b2c7d6306a9cb89ff23eb95ccd25077a1)
+++ sources/gui/qml/compounds/ValueAdjuster.qml (.../ValueAdjuster.qml) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -24,41 +24,46 @@
property real minimum : 0
property real maximum : 0
property real value : 0
- property real defaultValue : 0
+ property real defaultValue: 0
property real step : 0
-
+ property real actualValue : 0
property bool active : false
property bool editable : true
+ property bool allowOff : false
+ property bool synchronize : false
- property bool canIncrement : active ? value < maximum : true
- property bool canDecrement : active ? allowOff ? value > 0 :
- value > minimum : true
-
- property bool allowOff : false
-
// fix floating-point precision issue
readonly property real stepVal : Math.round(step * 100) / 100
readonly property real minVal : Math.round(minimum * 100) / 100
readonly property real val : Math.round(value * 100) / 100
- onActiveChanged : if ( active ) { _root.value = _root.defaultValue }
+ readonly property bool canIncrement : active ? value < maximum : true
+ readonly property bool canDecrement : active ? allowOff ? value > 0 :
+ value > minimum : true
- function clear() { _root.active = false }
+ onActiveChanged : {
+ // use actual value not default value to synchronize
+ if ( synchronize ) { synchronize = false; return; }
+ if ( active ) { _root.value = _root.defaultValue }
+ }
+
+ function sync () { value = actualValue; synchronize = true }
+
+ function clear() { _root.active = false }
+
function increment() {
- if ( ! active ) { active = true }
- else {
- if ( allowOff ) { value = val < minVal ? minVal : val + stepVal }
- else { value += stepVal }
- }
+ if ( ! active ) { active = true; return; }
+
+ if ( allowOff ) { value = val < minVal ? minVal : val + stepVal }
+ else { value += stepVal }
}
function decrement() {
- if ( ! active ) { active = true }
- else {
- if ( allowOff ) { value = val > minVal ? val - stepVal : 0 }
- else { value -= stepVal }
- }
+ if ( ! active ) { active = true; return; }
+
+ if ( allowOff ) { value = val > minVal ? val - stepVal : 0 }
+ else { value -= stepVal }
}
Text { id: _text
@@ -118,10 +123,7 @@
pressAndHoldInterval: 0
onClicked: {
- if ( _root.editable ) {
- active = true
- focus = true
- }
+ if ( _root.editable ) { active = true; focus = true }
_slider.opacity = 0
}
@@ -133,10 +135,7 @@
}
onPressAndHold: {
- if ( _root.editable ) {
- active = true
- focus = true
- }
+ if ( _root.editable ) { active = true; focus = true }
_sliderMouseArea.grabbed = true
}
Index: sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml
===================================================================
diff -u -rfeb708952ab1311368560d025d1e241c68b5413c -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision feb708952ab1311368560d025d1e241c68b5413c)
+++ sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -78,10 +78,10 @@
height : _root.controlHeight
contentItem : ValueAdjuster{ id: _potassiumVolumeControl
- minimum : Variables.potassiumMin // TODO: NR - Update to .conf values when available
- maximum : Variables.potassiumMax // LEAHI-PRS-660 , LEAHI-PRS-241
- step : Variables.potassiumResolution
- defaultValue : Variables.potassiumDefault
+ minimum : vTreatmentRanges.potassiumMin
+ maximum : vTreatmentRanges.potassiumMax
+ step : vTreatmentRanges.potassiumRes
+ defaultValue : vTreatmentRanges.potassiumDef
decimal : Variables.potassiumPrecision
}
}
@@ -99,10 +99,10 @@
height : _root.controlHeight
contentItem : ValueAdjuster { id: _calciumVolumeControl
- minimum : Variables.calciumMin // TODO: NR - Update to .conf values when available
- maximum : Variables.calciumMax // LEAHI-PRS-660 , LEAHI-PRS-241
- step : Variables.calciumResolution
- defaultValue : Variables.calciumDefault
+ minimum : vTreatmentRanges.calciumMin
+ maximum : vTreatmentRanges.calciumMax
+ step : vTreatmentRanges.calciumRes
+ defaultValue : vTreatmentRanges.calciumDef
decimal : Variables.calciumPrecision
}
}
Index: sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml
===================================================================
diff -u
--- sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml (revision 0)
+++ sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -0,0 +1,67 @@
+/*!
+ *
+ * Copyright (c) 2021-2025 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 HeaderbarPrescription.qml
+ * \author (last) Nico Ramirez
+ * \date (last) 11-Sep-2025
+ * \author (original) Nico Ramirez
+ * \date (original) 11-Sep-2025
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+
+// Project
+import "qrc:/globals"
+import "qrc:/components"
+import "qrc:/pages/pretreatment/create"
+
+ModalDialog { id: _root
+ readonly property bool isConfirmed: vTreatmentCreate.parametersConfirmed
+
+ padding : Variables.defaultMargin
+ onOpened: _headerbarPrescriptionContent.canEdit( ! ( vTreatmentCreate.parametersValidated || vTreatmentCreate.parametersConfirmed ) )
+
+ onIsConfirmedChanged: if (isConfirmed) { _root.close() }
+
+ PreTreatmentCreateContent { id: _headerbarPrescriptionContent
+ anchors {
+ top : parent.top
+ topMargin : Variables.defaultMargin * -1
+ left : parent.left
+ leftMargin : Variables.defaultMargin * 3
+ right : parent.right
+ rightMargin : anchors.leftMargin
+ bottom : parent.bottom
+ bottomMargin: anchors.leftMargin
+ }
+ }
+
+ CloseButton { id : _closeButton
+ anchors {
+ right : parent.right
+ left : undefined
+ margins : 0
+ }
+
+ onClicked : _root.close()
+ }
+
+ ConfirmButton { id : _confirmButton
+ anchors {
+ top : undefined
+ bottom : parent.bottom
+ bottomMargin : 5
+ rightMargin : Variables.defaultMargin * 3
+ }
+ enabled : _headerbarPrescriptionContent.confirmReady()
+ text.text : vTreatmentCreate.parametersValidated ? qsTr("CONFIRM") : qsTr("VALIDATE")
+ onClicked : vTreatmentCreate.parametersValidated ? _headerbarPrescriptionContent.confirm() : _headerbarPrescriptionContent.validate()
+ visible : ! vTDOpMode.inTreatment
+ }
+}
Index: sources/gui/qml/globals/Colors.qml
===================================================================
diff -u -rfeb708952ab1311368560d025d1e241c68b5413c -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision feb708952ab1311368560d025d1e241c68b5413c)
+++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -67,6 +67,7 @@
readonly property color textProgressBar : "#88a3c5"
readonly property color progressBarSaline : "#73D8DF"
readonly property color progressBarUltrafiltration : "#67ACFF"
+ readonly property color comboBoxDisplay : "#B31B2B3E"
readonly property color textRangeMarker : white
readonly property color rangeMarker : white
Index: sources/gui/qml/globals/Variables.qml
===================================================================
diff -u -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a)
+++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -221,17 +221,9 @@
// Potassium
readonly property int potassiumPrecision : 1
- readonly property int potassiumMin : 0
- readonly property int potassiumMax : 4
- readonly property int potassiumResolution : 1
- readonly property int potassiumDefault : 2
// Calcium
readonly property int calciumPrecision : 2
- readonly property real calciumMin : 0.0
- readonly property real calciumMax : 3.5
- readonly property real calciumResolution : 0.25
- readonly property real calciumDefault : 2.5
function sizeConverted(vSize, vSizePowers, vRound = 2) {
return ( vSize
Index: sources/gui/qml/main.qml
===================================================================
diff -u -r6a1e770e3d7a8729ab7acdb7b2e96a5b72f8bc9f -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/gui/qml/main.qml (.../main.qml) (revision 6a1e770e3d7a8729ab7acdb7b2e96a5b72f8bc9f)
+++ sources/gui/qml/main.qml (.../main.qml) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -181,6 +181,8 @@
vTreatmentVitals.doReset()
vTreatmentCreate.txCode = ""
vTreatmentCreate.parametersValidated = false
+ vTreatmentCreate.parametersConfirmed = false
+ vTreatmentCreate.doClear()
}
}
}
@@ -354,9 +356,11 @@
// Dialogs
AcidConcentrateAdjustment { id: _acidConcentrateAdjustment }
+ HeaderbarPrescription { id: _headerbarPrescription }
HeaderbarWiFi { id: _headerbarWifi }
HeaderbarStorage { id: _headerbarStorage }
HeaderbarSettings { id: _headerbarSettings }
+ HeaderbarInformation { id: _headerbarInformation }
LockDialog { id: _lockDialog }
AlarmItem { id: _alarmItem ; z: 996 }
PowerItem { id: _powerItem ; z: 997 }
Index: sources/gui/qml/pages/MainStack.qml
===================================================================
diff -u -rf83c14046290cebcd5c9229e76f747e4af586698 -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision f83c14046290cebcd5c9229e76f747e4af586698)
+++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -134,7 +134,6 @@
}
function onHomeChanged ( vValue ) { page( _startupScreen , vValue )}
- function onStandbyChanged ( vValue ) { if ( vTDOpMode.standby ) _preTreatmentCreateStack.clear(vValue) }
function onStandbyStartChanged ( vValue ) { /* It depends on the subModes of the standBy. Handled by onHome. */ }
function onStandbyWaitTreatmentChanged ( vValue ) { if ( vValue ) vDisinfectAdjustDisinfect.hasCancel = false }
function onStandbyWaitDisinfectChanged ( vValue ) { page( _disinfectStack , vValue )}
Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml
===================================================================
diff -u -rb38a0f4cf86482bb66ee69e1f809fb28b33edb4a -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision b38a0f4cf86482bb66ee69e1f809fb28b33edb4a)
+++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -29,20 +29,16 @@
PreTreatmentBase { id: _root
objectName: "_PreTreatmentCreate" // SquishQt testability
- header.backVisible : true
header.confirmVisible : true
title.visible : false
+ header.backVisible : ! vTreatmentCreate.parametersValidated
header.confirmEnabled : _preTreatmentCreateContent.confirmReady()
- header.confirmText.text : vTreatmentCreate.parametersValidated ? qsTr("CONFIRM") : qsTr("VALIDATE")
+ header.confirmText.text : vTreatmentCreate.parametersValidated ? qsTr("CONFIRM") :
+ qsTr("VALIDATE")
+ onConfirmClicked : vTreatmentCreate.parametersValidated ? _preTreatmentCreateContent.confirm() :
+ _preTreatmentCreateContent.validate()
+ onBackClicked : vPreTreatmentAdjustmentInitTreatment.doCancel()
- onConfirmClicked : vTreatmentCreate.parametersValidated ? _preTreatmentCreateContent.confirm() : _preTreatmentCreateContent.validate()
- onBackClicked : vTreatmentCreate.parametersValidated ? vTreatmentCreate.doCancel() : vPreTreatmentAdjustmentInitTreatment.doCancel()
-
- function clear( vValue ) {
- if ( ! vValue ) return
- _preTreatmentCreateContent.clear()
- }
-
PreTreatmentCreateContent { id: _preTreatmentCreateContent
anchors {
top : _root.header.bottom
Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml
===================================================================
diff -u -r1f6d3544ea05941cd4c4d5ebf48603d2668cb421 -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 1f6d3544ea05941cd4c4d5ebf48603d2668cb421)
+++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -39,10 +39,41 @@
property bool editingEnabled : true
- onIsValidatedChanged : if ( ! isValidated ) { enableEditing () }
+ onIsValidatedChanged : canEdit ( ! isValidated )
- function enableEditing () { editingEnabled = true }
+ function canEdit (state) { editingEnabled = state }
+ function activateAndSync() {
+ syncAll () // needs to be first
+ _bloodFlowRateControl .active = true
+ _dialysateFlowRateControl .active = true
+ _durationControl .active = true
+ _heparinDispensingRateControl .active = true
+ _heparinBolusVolumeControl .active = true
+ _heparinStopTimeControl .active = true
+ _acidConcentrateComboBox .active = true
+ _bicarbonateConcentrateComboBox .active = true
+ _dialyzerTypeComboBox .active = true
+ _dialysateTemperatureControl .active = true
+ _salineBolusVolumeControl .active = true
+ _bpMeasurementIntervalControl .active = true
+ }
+
+ function syncAll () {
+ _bloodFlowRateControl .sync()
+ _dialysateFlowRateControl .sync()
+ _durationControl .sync()
+ _heparinDispensingRateControl .sync()
+ _heparinBolusVolumeControl .sync()
+ _heparinStopTimeControl .sync()
+ _acidConcentrateComboBox .sync()
+ _bicarbonateConcentrateComboBox .sync()
+ _dialyzerTypeComboBox .sync()
+ _dialysateTemperatureControl .sync()
+ _salineBolusVolumeControl .sync()
+ _bpMeasurementIntervalControl .sync()
+ }
+
function clear () {
vTreatmentCreate.patientID = ""
_bloodFlowRateControl .clear()
@@ -58,7 +89,7 @@
_salineBolusVolumeControl .clear()
_bpMeasurementIntervalControl .clear()
clearErrors()
- enableEditing ()
+ canEdit (true)
}
function clearErrors() {
@@ -108,10 +139,13 @@
function onDidValidationPass ( vValue ) {
vPostTreatmentAdjustmentTreatmentLog.heparinDispensingRateOff = vTreatmentCreate.heparinDispensingRateOff = ! vTreatmentCreate.heparinDispensingRate
vPostTreatmentAdjustmentTreatmentLog.heparinBolusVolumeOff = vTreatmentCreate.heparinBolusVolumeOff = ! vTreatmentCreate.heparinBolusVolume
-
+ activateAndSync() // sync on validation
clearErrors()
- _root.editingEnabled = false
}
+
+ function onDidClear() {
+ _root.clear()
+ }
}
Connections { target: _acidConcentrateAdjustment
@@ -146,7 +180,8 @@
verticalCenterOffset: 5
}
- model : [qsTr("Edit Rx"), qsTr("Select Rx"), qsTr("Clear All")]
+ model : ! vTreatmentCreate.parametersValidated ? [ qsTr("Select Rx"), qsTr("Clear All") ]:
+ [ qsTr("Edit Rx"), qsTr("Select Rx"), qsTr("Clear All") ]
height : 50
width : 75
dropDownWidth : 250
@@ -155,18 +190,24 @@
displayText : ""
iconSource : "qrc:/images/iMenuDot"
backgroundColor : Colors.transparent
- visible : ! vTreatmentCreate.parametersValidated
+ visible : ! vTDOpMode.inTreatment
onActivated: {
- switch (currentIndex) {
+ let actualIndex = currentIndex
+ // only send AdjustParametersConfirmRequestData::eCancel when validated
+ // Telling FW user is canceling confirm treatment parameters
+ if ( vTreatmentCreate.parametersValidated ) { vTreatmentCreate.doCancel() }
+ else { actualIndex++ }
+
+ switch (actualIndex) {
case PreTreatmentCreateContent.Edit:
- _root.enableEditing()
+ // now handled above by 'vTreatmentCreate.doCancel()' monitoring 'vTreatmentCreate.parametersValidated'
break
case PreTreatmentCreateContent.Select:
- print("TODO: Open and Select from Prescription Manager " )
+ print("TODO: Open and Select from Prescription Manager" )
break
case PreTreatmentCreateContent.Clear:
- _root.clear()
+ vTreatmentCreate.doClear()
break
default: // Unknown state
break
@@ -236,6 +277,7 @@
maximum : vTreatmentRanges.bloodFlowRateMax
step : vTreatmentRanges.bloodFlowRateRes
defaultValue : vTreatmentRanges.bloodFlowRateDef
+ actualValue : vTreatmentCreate.bloodFlowRate
onValueChanged : {
if ( ! _bloodFlowRate.valid ) { vTreatmentCreate.bloodFlowRateRejectReason = Variables.noRejectReason }
vTreatmentCreate.bloodFlowRate = value
@@ -254,6 +296,7 @@
maximum : vTreatmentRanges.dialysateFlowRateMax
step : vTreatmentRanges.dialysateFlowRateRes
defaultValue : vTreatmentRanges.dialysateFlowRateDef
+ actualValue : vTreatmentCreate.dialysateFlowRate
onValueChanged : {
if ( ! _dialysateFlowRate.valid ) { vTreatmentCreate.dialysateFlowRateRejectReason = Variables.noRejectReason }
vTreatmentCreate.dialysateFlowRate = value
@@ -272,6 +315,7 @@
maximum : vTreatmentRanges.treatmentDurationMax
step : vTreatmentRanges.treatmentDurationRes
defaultValue : vTreatmentRanges.treatmentDurationDef
+ actualValue : vTreatmentCreate.treatmentDuration
onValueChanged : {
if ( ! _duration.valid ) { vTreatmentCreate.treatmentDurationRejectReason = Variables.noRejectReason }
vTreatmentCreate.treatmentDuration = value
@@ -293,6 +337,7 @@
maximum : vTreatmentRanges.heparinBolusVolumeMax
step : vTreatmentRanges.heparinBolusVolumeRes
defaultValue : vTreatmentRanges.heparinBolusVolumeDef
+ actualValue : vTreatmentCreate.heparinBolusVolume
decimal : Variables.heparinPrecision
allowOff : true
onValueChanged : {
@@ -313,6 +358,7 @@
maximum : vTreatmentRanges.heparinDispensingRateMax
step : vTreatmentRanges.heparinDispensingRateRes
defaultValue : vTreatmentRanges.heparinDispensingRateDef
+ actualValue : vTreatmentCreate.heparinDispensingRate
decimal : Variables.heparinPrecision
allowOff : true
onValueChanged : {
@@ -349,6 +395,7 @@
maximum : _durationControl.value
step : _durationControl.step
defaultValue : _durationControl.value
+ actualValue : vTreatmentCreate.heparinStopTime
enabled : vTreatmentCreate.heparinDispensingRate
allowOff : true
onValueChanged : {
@@ -398,6 +445,7 @@
enabled : _root.editingEnabled
currentIndex : vTreatmentCreate.acidConcentrate
model : vTreatmentRanges.acidConcentrateOptions
+ actualValue : vTreatmentCreate.acidConcentrate
onClear : {
vTreatmentRanges.doClearAcidConcentrate(vTreatmentCreate.acidConcentrateSet)
vTreatmentCreate.acidConcentrateSet = false
@@ -425,6 +473,7 @@
enabled : _root.editingEnabled
currentIndex : vTreatmentCreate.bicarbonateConcentrate
model : vTreatmentRanges.bicarbonateConcentrateOptions
+ actualValue : vTreatmentCreate.bicarbonateConcentrate
onClear : vTreatmentCreate.bicarbonateConcentrateSet = false
onActivated : {
if ( ! _bicarbonateConcentrate.valid ) { vTreatmentCreate.bicarbonateConcentrateRejectReason = Variables.noRejectReason }
@@ -448,6 +497,7 @@
enabled : _root.editingEnabled
currentIndex : vTreatmentCreate.dialyzerType
model : vTreatmentRanges.dialyzerTypeOptions
+ actualValue : vTreatmentCreate.dialyzerType
onClear : vTreatmentCreate.dialyzerTypeSet = false
onActivated : {
if ( ! _dialyzerType.valid ) { vTreatmentCreate.dialyzerTypeRejectReason = Variables.noRejectReason }
@@ -468,6 +518,7 @@
maximum : vTreatmentRanges.dialysateTempMax
step : vTreatmentRanges.dialysateTempRes
defaultValue : vTreatmentRanges.dialysateTempDef
+ actualValue : vTreatmentCreate.dialysateTemp
decimal : Variables.dialysateTempPrecision
onValueChanged : {
if ( ! _dialysateTemperature.valid ) { vTreatmentCreate.dialysateTempRejectReason = Variables.noRejectReason }
@@ -487,6 +538,7 @@
maximum : vTreatmentRanges.salineBolusVolumeMax
step : vTreatmentRanges.salineBolusVolumeRes
defaultValue : vTreatmentRanges.salineBolusVolumeDef
+ actualValue : vTreatmentCreate.salineBolusVolume
onValueChanged : {
if ( ! _salineBolusVolume.valid ) { vTreatmentCreate.salineBolusVolumeRejectReason = Variables.noRejectReason }
vTreatmentCreate.salineBolusVolume = value
@@ -505,6 +557,7 @@
maximum : vTreatmentRanges.bloodPressureMeasureIntervalMax
step : vTreatmentRanges.bloodPressureMeasureIntervalRes
defaultValue : vTreatmentRanges.bloodPressureMeasureIntervalDef
+ actualValue : vTreatmentCreate.bloodPressureMeasureInterval
allowOff : true
onValueChanged : {
if ( ! _bpMeasurementInterval.valid ) { vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.noRejectReason }
Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml
===================================================================
diff -u -rf83c14046290cebcd5c9229e76f747e4af586698 -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml (.../PreTreatmentCreateStack.qml) (revision f83c14046290cebcd5c9229e76f747e4af586698)
+++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml (.../PreTreatmentCreateStack.qml) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -32,23 +32,14 @@
property int stackStepIndex : 0
- function clear(vValue) {
- if ( ! vValue ) return // delete only if asked to. // is used on state enter, and not done on exiting.
- _pretreatmentCreate.clear(vValue)
- }
-
PreTreatmentCreate { id: _pretreatmentCreate }
onVisibleChanged: {
- if (visible) {
- _mainMenu.hidden = true
- }
- else {
- stackView.initialItem = null
- }
+ if (visible) { _mainMenu.hidden = true }
+ else { stackView.initialItem = null }
}
Connections { target: vTDOpMode
- function onValidateParametersChanged ( vValue ) { page( _pretreatmentCreate )}
+ function onValidateParametersChanged ( vValue ) { page( _pretreatmentCreate ) }
}
}
Index: sources/view/VTreatmentCreate.cpp
===================================================================
diff -u -ra631df5b4ae818e351d8b8332bbe1e760f7de888 -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision a631df5b4ae818e351d8b8332bbe1e760f7de888)
+++ sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -79,7 +79,6 @@
confirmTreatmentRequest.requestedState = AdjustParametersConfirmRequestData::eConfirm;
emit didAdjustment(confirmTreatmentRequest);
parametersConfirmed(true);
-
}
/**
@@ -93,6 +92,7 @@
confirmTreatmentRequest.requestedState = AdjustParametersConfirmRequestData::eCancel;
emit didAdjustment(confirmTreatmentRequest);
parametersValidated(false);
+ parametersConfirmed(false);
}
/**
@@ -145,6 +145,14 @@
}
}
+/**
+ * \brief VCreateTreatment::doClear
+ * Notify UI to clear fields
+ */
+void VTreatmentCreate::doClear() {
+ emit didClear();
+}
+
/*!
* \brief VTreatmentCreate::onActionReceive
* \details This message is received from the HD in POST through the applicationController and GuiController.
Index: sources/view/VTreatmentCreate.h
===================================================================
diff -u -r13d04e674e9d22091bcc72b97574bbba21fdc9c9 -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 13d04e674e9d22091bcc72b97574bbba21fdc9c9)
+++ sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -139,13 +139,15 @@
void didAdjustment(const AdjustParametersValidationRequestData &data);
void didAdjustment(const AdjustParametersConfirmRequestData &data);
- void didValidationFail();
- void didValidationPass();
+ void didValidationFail ();
+ void didValidationPass ();
+ void didClear ();
public slots:
void doValidation ();
void doConfirm ();
void doCancel ();
+ void doClear ();
QStringList doGetPrescriptionParameterValues();
QStringList doGetOperatingParameterValues();
Index: sources/view/hd/data/VTreatmentRanges.cpp
===================================================================
diff -u -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/view/hd/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a)
+++ sources/view/hd/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -129,6 +129,16 @@
// FROMVARIANT_WITHRETURN ( heparinStopTimeRes , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Res" , UInt , isConfigsOk );
// FROMVARIANT_WITHRETURN ( heparinStopTimeDef , "Heparin Stop Time Ranges" , "Heparin_Stop_Time_Def" , UInt , isConfigsOk );
+ FROMVARIANT_WITHRETURN ( potassiumDef , "Potassium" , "Potassium_Def" , Float , isConfigsOk );
+ FROMVARIANT_WITHRETURN ( potassiumMin , "Potassium" , "Potassium_Min" , Float , isConfigsOk );
+ FROMVARIANT_WITHRETURN ( potassiumMax , "Potassium" , "Potassium_Max" , Float , isConfigsOk );
+ FROMVARIANT_WITHRETURN ( potassiumRes , "Potassium" , "Potassium_Res" , Float , isConfigsOk );
+
+ FROMVARIANT_WITHRETURN ( calciumDef , "Calcium" , "Calcium_Def" , Float , isConfigsOk );
+ FROMVARIANT_WITHRETURN ( calciumMin , "Calcium" , "Calcium_Min" , Float , isConfigsOk );
+ FROMVARIANT_WITHRETURN ( calciumMax , "Calcium" , "Calcium_Max" , Float , isConfigsOk );
+ FROMVARIANT_WITHRETURN ( calciumRes , "Calcium" , "Calcium_Res" , Float , isConfigsOk );
+
FROMVARIANT_WITHRETURN ( salineBolusVolumeDef , "Saline Bolus Volume Ranges" , "Saline_Bolus_Volume_Def" , UInt , isConfigsOk );
FROMVARIANT_WITHRETURN ( salineBolusVolumeMin , "Saline Bolus Volume Ranges" , "Saline_Bolus_Volume_Min" , UInt , isConfigsOk );
FROMVARIANT_WITHRETURN ( salineBolusVolumeMax , "Saline Bolus Volume Ranges" , "Saline_Bolus_Volume_Max" , UInt , isConfigsOk );
Index: sources/view/hd/data/VTreatmentRanges.h
===================================================================
diff -u -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a -r40ddf63592b60608ae34aeb3099fe4e62ae45054
--- sources/view/hd/data/VTreatmentRanges.h (.../VTreatmentRanges.h) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a)
+++ sources/view/hd/data/VTreatmentRanges.h (.../VTreatmentRanges.h) (revision 40ddf63592b60608ae34aeb3099fe4e62ae45054)
@@ -52,6 +52,8 @@
RANGESET( float , heparinBolusVolume , 0)
RANGESET( quint32 , heparinStopTime , 0)
RANGESET( quint32 , salineBolusVolume , 0)
+ RANGESET( float , potassium , 0)
+ RANGESET( float , calcium , 0)
READONLY( QStringList , heparinTypeOptions ,{})
READONLY( QStringList , acidConcentrateOptions ,{})