Index: leahi.qrc
===================================================================
diff -u -r56381aae237db191956aff493907cd1f0801216b -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- leahi.qrc (.../leahi.qrc) (revision 56381aae237db191956aff493907cd1f0801216b)
+++ leahi.qrc (.../leahi.qrc) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -38,6 +38,8 @@
sources/gui/qml/dialogs/LockDialog.qml
sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml
sources/gui/qml/dialogs/EndTreatmentDialog.qml
+ sources/gui/qml/dialogs/UfVolumeAdjustment.qml
+ sources/gui/qml/dialogs/HeparinRxAdjustment.qml
sources/gui/qml/dialogs/diagnostics/DiagnosticsDialog.qml
@@ -119,6 +121,7 @@
resources/images/water_sample_fail.png
resources/images/water_sample_pass.png
resources/images/water_sample.png
+ resources/images/edit_yellow.png
sources/gui/qml/components/MainMenu.qml
Index: sources/gui/qml/components/BaseComboBox.qml
===================================================================
diff -u -rbea36be2766046e63c4e82539a630b5cee7ce1c6 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/components/BaseComboBox.qml (.../BaseComboBox.qml) (revision bea36be2766046e63c4e82539a630b5cee7ce1c6)
+++ sources/gui/qml/components/BaseComboBox.qml (.../BaseComboBox.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -31,7 +31,6 @@
property bool canOff : false
property bool centerHorizontally: false
-
width : 300
displayText : _root.isActive ? currentText : Variables.emptyEntry
currentIndex : 0
Index: sources/gui/qml/compounds/LabelUnitContainer.qml
===================================================================
diff -u -r4a7dd11138d2321f1ab8d324b3bd25f02eaefe84 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/compounds/LabelUnitContainer.qml (.../LabelUnitContainer.qml) (revision 4a7dd11138d2321f1ab8d324b3bd25f02eaefe84)
+++ sources/gui/qml/compounds/LabelUnitContainer.qml (.../LabelUnitContainer.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -31,6 +31,8 @@
property bool showEdit : false
property int titleFontSize : Fonts.fontPixelDefaultButton
property int unitFontSize : Fonts.fontUnit
+ property bool needsAttention : false
+ property bool editEnabled : true
height : Variables.createRxLabelUnitContainerHeight
width : Variables.createRxLabelUnitContainerWidth
@@ -71,7 +73,11 @@
anchors.verticalCenter : _title.verticalCenter
anchors.verticalCenterOffset : 5
visible : _root.showEdit
- iconImageSource : "qrc:/images/iEdit"
+ enabled : _root.editEnabled
+
+ iconImageSource : _root.editEnabled ? _root.needsAttention ? "qrc:/images/iEditYellow" :
+ "qrc:/images/iEdit" :
+ "qrc:/images/iEditDisabled"
onPressed : _root.editClicked()
iconSize : Variables.iconsDiameter
}
Index: sources/gui/qml/compounds/ValueAdjusterCustom.qml
===================================================================
diff -u -rbea36be2766046e63c4e82539a630b5cee7ce1c6 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/compounds/ValueAdjusterCustom.qml (.../ValueAdjusterCustom.qml) (revision bea36be2766046e63c4e82539a630b5cee7ce1c6)
+++ sources/gui/qml/compounds/ValueAdjusterCustom.qml (.../ValueAdjusterCustom.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -127,7 +127,8 @@
let raw = _slider.from + _slider.pos * (_slider.to - _slider.from)
let stepped = Math.round((raw - _slider.from) / _slider.stepSize) * _slider.stepSize + _slider.from
_root.currentIndex = stepped
- didChange(stepped)
+
+ if ( value !== stepped ) { didChange(stepped) } // if value already set dont send again
}
}
Index: sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml
===================================================================
diff -u -reb3bbd3e203463dc3634ecb009b8a1390bb87012 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision eb3bbd3e203463dc3634ecb009b8a1390bb87012)
+++ sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -25,8 +25,8 @@
import "qrc:/pages/pretreatment/create"
ModalDialog { id : _root
- property int controlWidth : 770
- property int controlHeight : 86
+ property int controlWidth : Variables.createRxLabelUnitContainerWidth
+ property int controlHeight : Variables.createRxLabelUnitContainerHeight
readonly property string adjustment: ("%1 %2, %3 %4, 1 Mg") .arg(_potassiumValueControl.value.toFixed(Variables.potassiumPrecision))
.arg(Variables.unitTextPotassium)
.arg(_calciumValueControl.value.toFixed(Variables.calciumPrecision))
Index: sources/gui/qml/dialogs/HeparinRxAdjustment.qml
===================================================================
diff -u
--- sources/gui/qml/dialogs/HeparinRxAdjustment.qml (revision 0)
+++ sources/gui/qml/dialogs/HeparinRxAdjustment.qml (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -0,0 +1,198 @@
+// Qt
+import QtQuick 2.12
+
+// Project
+
+// Qml imports
+import "qrc:/globals"
+import "qrc:/components"
+import "qrc:/compounds"
+import "qrc:/pages/pretreatment/create"
+import "qrc:/pages/treatment/adjustments"
+
+TreatmentAdjustmentBase { id : _root
+ property int cellWidth : Variables.createRxLabelUnitContainerWidth
+ property int cellHeight : Variables.createRxLabelUnitContainerHeight
+ property bool editingEnabled : false
+
+ height : Variables.smallDialogHeight
+ width : Variables.smallDialogWidth
+ titleText : qsTr("Heparin Rx")
+ x : Math.round((parent.width - width) / 2)
+ y : Math.round((parent.height - height) / 2)
+
+ onCloseClicked : _root.close()
+
+ onVisibleChanged: {
+ if ( visible ) {
+ _heparinBolusVolume .value = vTreatmentCreate.heparinBolusVolume
+ _heparinDispensingRate .value = vTreatmentCreate.heparinDispensingRate
+ _heparinDeliveryDuration.value = vTreatmentCreate.heparinDeliveryDuration
+ }
+ }
+
+ function refresh () {
+ _heparinBolusVolume .refresh()
+ _heparinDispensingRate .refresh()
+ _heparinDeliveryDuration.refresh()
+ }
+
+ function clear () {
+ _heparinBolusVolume .clear()
+ _heparinDispensingRate .clear()
+ _heparinDeliveryDuration.clear()
+ }
+
+ function confirmReady () {
+ return _heparinBolusVolume .isActive && _heparinBolusVolume .valid &&
+ _heparinDispensingRate .isActive && _heparinDispensingRate .valid &&
+ _heparinDeliveryDuration.isActive && _heparinDeliveryDuration .valid
+ }
+
+ Connections { target: vTDOpMode
+ function onPreTreatmentChanged() { _root.close() }
+ }
+
+ Connections { target: _preTreatmentCreateTreatmentSettings
+ function onClearHeparinDuration () {
+ if ( _heparinDeliveryDuration.enabled ) { _heparinDeliveryDuration.clear() }
+ }
+ }
+
+ Column { id : _column
+ spacing: 15
+
+ anchors {
+ verticalCenter : _root.contentItem.verticalCenter
+ verticalCenterOffset: Variables.defaultMargin * -3 // better align label with dialog height
+ horizontalCenter : _root.contentItem.horizontalCenter
+ }
+
+ LabelUnitContainer { id: _heparinType
+ text : qsTr("Heparin Type")
+ unitText : Variables.unitHeparinType
+ contentArea.anchors.leftMargin : 120
+
+ contentItem : TextEntry { id: _heparinTypeTextEntry
+ clip : true
+ textInput.width : parent.width - Variables.defaultMargin * 4
+ text : vTreatmentRanges.heparinTypeOptions[vTreatmentCreate.heparinType] ?? ""
+ anchors.centerIn : parent
+ textInput.rightPadding : Variables.defaultMargin
+ textInput.leftPadding : Variables.defaultMargin * 14
+ line.visible : false
+ enabled : false
+ textInput.color : Colors.offWhite
+ }
+ }
+
+ LabelUnitValueAdjuster { id: _heparinBolusVolume
+ text : qsTr("Heparin Bolus Volume")
+ width : _root.cellWidth
+ height : _root.cellHeight
+ unitText : Variables.unitTextFluid
+ valid : ! vTreatmentCreate.heparinBolusVolumeRejectReason
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.heparinBolusVolumeMin
+ maximum : vTreatmentRanges.heparinBolusVolumeMax
+ step : vTreatmentRanges.heparinBolusVolumeRes
+ defaultValue : vTreatmentRanges.heparinBolusVolumeDef
+ value : vTreatmentCreate.heparinBolusVolume
+ decimal : Variables.heparinPrecision
+ canOff : true
+ isActive : vTreatmentCreate.heparinBolusVolumeSet
+ onDidActiveChange : function(vState) { vTreatmentCreate.heparinBolusVolumeSet = vState }
+
+ onDidChange : function(vValue) {
+ if ( ! _heparinBolusVolume.valid ) { vTreatmentCreate.heparinBolusVolumeRejectReason = Variables.noRejectReason }
+ value = vValue
+ }
+ }
+
+ LabelUnitValueAdjuster { id: _heparinDispensingRate
+ text : qsTr("Heparin Dispensing Rate")
+ unitText : Variables.unitTextDispensingRate
+ valid : ! vTreatmentCreate.heparinDispensingRateRejectReason
+ width : _root.cellWidth
+ height : _root.cellHeight
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.heparinDispensingRateMin
+ maximum : vTreatmentRanges.heparinDispensingRateMax
+ step : vTreatmentRanges.heparinDispensingRateRes
+ defaultValue : vTreatmentRanges.heparinDispensingRateDef
+ value : vTreatmentCreate.heparinDispensingRate
+ decimal : Variables.heparinPrecision
+ canOff : true
+ isActive : vTreatmentCreate.heparinDispensingRateSet
+ onDidActiveChange: function(vState) { vTreatmentCreate.heparinDispensingRateSet = vState }
+ onDidChange : function(vValue) {
+ if ( ! _heparinDispensingRate.valid ) { vTreatmentCreate.heparinDispensingRateRejectReason = Variables.noRejectReason }
+ // set heparin time to clear when set OFF to value
+ if ( ! vTreatmentCreate.heparinDispensingRate && vValue ) { _heparinDeliveryDuration.clear() }
+
+ value = vValue
+
+ // if set to OFF set heparin stop time 0
+ if ( ! vTreatmentCreate.heparinDispensingRate ) {
+ vTreatmentCreate.heparinDeliveryDurationSet = true
+ vTreatmentCreate.heparinDeliveryDuration = 0
+ }
+ }
+
+ onIsActiveChanged: {
+ if ( ! vTreatmentCreate.heparinDispensingRate && isActive ) {
+ vTreatmentCreate.heparinDeliveryDurationSet = true
+ vTreatmentCreate.heparinDeliveryDuration = 0
+ }
+ }
+ }
+
+ LabelUnitValueAdjuster { id: _heparinDeliveryDuration
+ text : qsTr("Heparin Delivery Duration")
+ unitText : Variables.unitTextDuration
+ valid : ! vTreatmentCreate.heparinDeliveryDurationRejectReason
+ width : _root.cellWidth
+ height : _root.cellHeight
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.heparinStopTimeMin
+ maximum : vTreatmentCreate.treatmentDuration
+ step : vTreatmentRanges.treatmentDurationRes
+ defaultValue : vTreatmentCreate.treatmentDuration
+ value : vTreatmentCreate.heparinDeliveryDuration
+ enabled : vTreatmentCreate.heparinDispensingRate
+ canOff : true
+ isActive : vTreatmentCreate.heparinDeliveryDurationSet
+ onDidActiveChange: function(vState) { vTreatmentCreate.heparinDeliveryDurationSet = vState }
+ onDidChange : function(vValue) {
+ if ( ! _heparinDeliveryDuration.valid ) { vTreatmentCreate.heparinDeliveryDurationRejectReason = Variables.noRejectReason }
+ value = vValue
+ }
+ }
+ }
+
+ ConfirmButton { id : _confirmButton
+ anchors {
+ bottom : _root.contentItem.bottom
+ bottomMargin : Variables.defaultMargin * 3
+ horizontalCenter: _root.contentItem.horizontalCenter
+ }
+
+ width : Variables.defaultButtonWidth
+ height : Variables.defaultButtonHeight
+ enabled : _heparinBolusVolume.isActive && _heparinDispensingRate.isActive && _heparinDeliveryDuration.isActive
+
+ anchors {
+ top : undefined
+ right : undefined
+ margins : 0
+ }
+
+ onClicked : {
+ vTreatmentCreate.heparinBolusVolume = _heparinBolusVolume.value
+ vTreatmentCreate.heparinDispensingRate = _heparinDispensingRate.value
+ vTreatmentCreate.heparinDeliveryDuration = _heparinDeliveryDuration.value
+
+ _root.close()
+ }
+ }
+}
Index: sources/gui/qml/dialogs/UfVolumeAdjustment.qml
===================================================================
diff -u
--- sources/gui/qml/dialogs/UfVolumeAdjustment.qml (revision 0)
+++ sources/gui/qml/dialogs/UfVolumeAdjustment.qml (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -0,0 +1,110 @@
+// Qt
+import QtQuick 2.12
+
+// Project
+
+// Qml imports
+import "qrc:/globals"
+import "qrc:/components"
+import "qrc:/compounds"
+import "qrc:/pages/pretreatment/create"
+import "qrc:/pages/treatment/adjustments"
+
+TreatmentAdjustmentBase { id : _root
+ property int cellWidth : Variables.createRxLabelUnitContainerWidth
+ property int cellHeight : Variables.createRxLabelUnitContainerHeight
+ property bool editingEnabled : false
+
+ height : Variables.smallDialogHeight
+ width : Variables.smallDialogWidth
+ titleText : qsTr("Ultrafiltration Volume (L)")
+ x : Math.round((parent.width - width) / 2)
+ y : Math.round((parent.height - height) / 2)
+
+ onCloseClicked : _root.close()
+
+ onVisibleChanged: {
+ if ( visible ) {
+ _estimatedTargetWeight.value = vTreatmentCreate.ufEstimatedTargetWeight
+ _preWeight.value = vTreatmentCreate.ufPreWeight
+ }
+ }
+
+ Connections { target: vTDOpMode
+ function onPreTreatmentChanged() { _root.close() }
+ }
+
+ Column { id : _column
+ spacing: Variables.defaultMargin * 2
+
+ anchors {
+ verticalCenter : _root.contentItem.verticalCenter
+ verticalCenterOffset: Variables.defaultMargin * -3 // better align label with dialog height
+ horizontalCenter : _root.contentItem.horizontalCenter
+ }
+
+ LabelUnitValueAdjuster { id: _preWeight
+ text : qsTr("Pre-Weight")
+ width : _root.cellWidth
+ height : _root.cellHeight
+ unitText : Variables.unitWeight
+ valid : ! vTreatmentCreate.ufPreWeightRejectionReason
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.weightMin
+ maximum : vTreatmentRanges.weightMax
+ step : vTreatmentRanges.weightRes
+ defaultValue : vTreatmentRanges.weightDef
+ decimal : Variables.weightPrecision
+ value : vTreatmentCreate.ufPreWeight
+
+ onDidChange : function(vValue) {
+ if ( ! _preWeight.valid ) { vTreatmentCreate.ufPreWeightRejectionReason = Variables.noRejectReason }
+ value = valid
+ }
+ }
+
+ LabelUnitValueAdjuster { id: _estimatedTargetWeight
+ text : qsTr("Estimated Target Weight")
+ width : _root.cellWidth
+ height : _root.cellHeight
+ unitText : Variables.unitWeight
+ valid : ! vTreatmentCreate.ufEstimatedTargetWeightRejectionReason
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.weightMin
+ maximum : vTreatmentRanges.weightMax
+ step : vTreatmentRanges.weightRes
+ defaultValue : vTreatmentRanges.weightDef
+ decimal : Variables.weightPrecision
+ value : vTreatmentCreate.ufEstimatedTargetWeight
+
+ onDidChange : function(vValue) {
+ if ( ! _estimatedTargetWeight.valid ) { vTreatmentCreate.ufEstimatedTargetWeightRejectionReason = Variables.noRejectReason }
+ value = vValue
+ }
+ }
+ }
+
+ ConfirmButton { id : _confirmButton
+ anchors {
+ bottom : _root.contentItem.bottom
+ bottomMargin : Variables.defaultMargin * 4
+ horizontalCenter: _root.contentItem.horizontalCenter
+ }
+
+ width : Variables.defaultButtonWidth
+ height : Variables.defaultButtonHeight
+ enabled : _preWeight.isActive && _estimatedTargetWeight.isActive
+
+ anchors {
+ top : undefined
+ right : undefined
+ margins : 0
+ }
+
+ onClicked : {
+ vTreatmentCreate.ufEstimatedTargetWeight = _estimatedTargetWeight.value
+ vTreatmentCreate.ufPreWeight = _preWeight.value
+ _root.close()
+ }
+ }
+}
Index: sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml
===================================================================
diff -u -r0c448ff97fb2882b068cf6da24bbed375fc68f44 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml (.../HeaderbarPrescription.qml) (revision 0c448ff97fb2882b068cf6da24bbed375fc68f44)
+++ sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml (.../HeaderbarPrescription.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -23,6 +23,7 @@
ModalDialog { id: _root
readonly property bool isConfirmed: vTreatmentCreate.parametersConfirmed
+ readonly property bool isFirstTab : _headerbarPrescriptionContent.currentIndex === PreTreatmentCreateContent.PatientPrescription
padding : Variables.defaultMargin
onOpened: _headerbarPrescriptionContent.canEdit( ! ( vTreatmentCreate.parametersValidated || vTreatmentCreate.parametersConfirmed ) )
@@ -59,11 +60,17 @@
bottomMargin : 5
rightMargin : Variables.defaultMargin * 3
}
- enabled : _headerbarPrescriptionContent.confirmReady()
- text.text : vTreatmentCreate.parametersValidated ? qsTr("CONFIRM") : qsTr("VALIDATE")
+ enabled : _root.isFirstTab ? true : _headerbarPrescriptionContent.confirmReady()
+ text.text : _root.isFirstTab ? qsTr("Next")
+ : vTreatmentCreate.parametersValidated ? qsTr("Confirm") : qsTr("Validate")
visible : ! vTDOpMode.inTreatment && ! isConfirmed
onClicked : {
+ if ( _root.isFirstTab ) {
+ _headerbarPrescriptionContent.currentIndex = PreTreatmentCreateContent.TreatmentSettings
+ return
+ }
+
if ( vTreatmentCreate.parametersValidated ) {
_headerbarPrescriptionContent.confirm()
_root.close()
Index: sources/gui/qml/globals/Variables.qml
===================================================================
diff -u -r4a7dd11138d2321f1ab8d324b3bd25f02eaefe84 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 4a7dd11138d2321f1ab8d324b3bd25f02eaefe84)
+++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -263,8 +263,11 @@
readonly property int substitutionPrecision : 1
// conductivity
- readonly property int conductivityPrecision : 1
+ readonly property int conductivityPrecision : 1
+ // weight
+ readonly property int weightPrecision : 1
+
function sizeConverted(vSize, vSizePowers, vRound = 2) {
return ( vSize
/ vSizePowers // convert from byte to Giga byte
@@ -324,6 +327,8 @@
readonly property string unitTextFluid : qsTr("mL")
readonly property string unitTextSaline : unitTextFluid
readonly property string unitTextHeparin : unitTextFluid
+ readonly property string unitWeight : qsTr("Kg")
+
// - Pressure
readonly property string unitTextPressure : qsTr("mmHg")
// - Temperature
Index: sources/gui/qml/pages/MainHome.qml
===================================================================
diff -u -r45ce5cd058a8d0239d486e0ab4b057731f7dba76 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/pages/MainHome.qml (.../MainHome.qml) (revision 45ce5cd058a8d0239d486e0ab4b057731f7dba76)
+++ sources/gui/qml/pages/MainHome.qml (.../MainHome.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -31,7 +31,7 @@
property alias reasonText : _notification.text
- signal createTreatment()
+ signal createTreatment(int modality)
Image {
anchors.fill: backgroundRect
@@ -48,18 +48,37 @@
width: parent.width
text : vDateTime.greeting
font.pixelSize: 40 //// ----- @LEAHIZED: Move to Variables.qml
+ }
+ TouchRect { id : _createHDTreatment
+ anchors {
+ horizontalCenter : parent.horizontalCenter
+ verticalCenter : parent.verticalCenter
+ verticalCenterOffset: Variables.defaultMargin * -1
+ }
+ text.text : qsTr("HD")
+ onClicked : createTreatment(HeaderBar.Mode_HD)
+ isDefault : true
+ width : 435 //// ----- @LEAHIZED: Move to Variables.qml
+ height : 92 //// ----- @LEAHIZED: Move to Variables.qml
+ pixelSize : 30 //// ----- @LEAHIZED: Move to Variables.qml
}
- TouchRect { id : _createTreatmentRect
- anchors.centerIn: parent
- text.text : qsTr("Create Treatment")
- onClicked : createTreatment()
+
+ TouchRect { id : _createHDFTreatment
+ anchors {
+ top : _createHDTreatment.bottom
+ topMargin : Variables.defaultMargin
+ horizontalCenter: _createHDTreatment.horizontalCenter
+ }
+ text.text : qsTr("HDF")
+ onClicked : createTreatment(HeaderBar.Mode_HDF)
isDefault : true
width : 435 //// ----- @LEAHIZED: Move to Variables.qml
height : 92 //// ----- @LEAHIZED: Move to Variables.qml
pixelSize : 30 //// ----- @LEAHIZED: Move to Variables.qml
}
+
NotificationBarSmall { id: _notification
anchors.bottomMargin: Variables.mainMenuHeight
}
Index: sources/gui/qml/pages/MainStack.qml
===================================================================
diff -u -r45ce5cd058a8d0239d486e0ab4b057731f7dba76 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 45ce5cd058a8d0239d486e0ab4b057731f7dba76)
+++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -114,7 +114,11 @@
}
MainHome { id: _mainHome
- onCreateTreatment : { vPreTreatmentAdjustmentInitTreatment.doInitiate( )}
+ onCreateTreatment: function (vValue) {
+ vTreatmentCreate.treatmentModality = vValue
+ vPreTreatmentAdjustmentInitTreatment.doInitiate( )
+ }
+
onVisibleChanged: {
if (visible) {
_mainMenu.hidden = false // initially our landing screen is _initialModeScreen which should not have the Main menu.
Index: sources/gui/qml/pages/pretreatment/PreTreatmentInstallStack.qml
===================================================================
diff -u -r8a9a7d5cb3e54aa73e499ddec62653893e7d5ca7 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/pages/pretreatment/PreTreatmentInstallStack.qml (.../PreTreatmentInstallStack.qml) (revision 8a9a7d5cb3e54aa73e499ddec62653893e7d5ca7)
+++ sources/gui/qml/pages/pretreatment/PreTreatmentInstallStack.qml (.../PreTreatmentInstallStack.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -18,6 +18,7 @@
BloodSetTubing ,
BloodLines ,
PressureLinesAndDialyzer,
+ Saline ,
Count
}
@@ -37,6 +38,9 @@
page ( _preTreatmentPressureLinesAndDialyzer )
break
case PreTreatmentInstallStack.Step.PressureLinesAndDialyzer:
+ page ( _pretreatmentSaline )
+ break
+ case PreTreatmentInstallStack.Step.Saline:
goToNextStep ()
break
default:
@@ -55,6 +59,9 @@
case PreTreatmentInstallStack.Step.PressureLinesAndDialyzer:
page ( _preTreatmentBloodLines )
break
+ case PreTreatmentInstallStack.Step.Saline:
+ page ( _preTreatmentPressureLinesAndDialyzer )
+ break
default:
break
}
@@ -65,7 +72,8 @@
case PreTreatmentInstallStack.Step.BloodSetTubing:
return qsTr("Auto Load")
case PreTreatmentInstallStack.Step.BloodLines:
- case PreTreatmentInstallStack.Step.PressureLinesAndDialyzer: // fall through
+ case PreTreatmentInstallStack.Step.PressureLinesAndDialyzer:
+ case PreTreatmentInstallStack.Step.Saline: // fall through
default:
return qsTr("Next")
}
@@ -78,22 +86,30 @@
// ----- Screens definitions
PreTreatmentBase { id: _preTreatmentBloodSetTubing
instructionBased : true
- onVisibleChanged : if (visible) { _root.subStepIndex = PreTreatmentInstallStack.Step.BloodSetTubing ; updateModel() }
+ onVisibleChanged : if (visible) { _root.subStepIndex = PreTreatmentInstallStack.Step.BloodSetTubing; updateModel() }
subStepName : qsTr("Blood Tubing Set")
}
PreTreatmentBase { id: _preTreatmentBloodLines
instructionBased : true
- onVisibleChanged : if (visible) { _root.subStepIndex = PreTreatmentInstallStack.Step.BloodLines ; updateModel() }
+ onVisibleChanged : if (visible) { _root.subStepIndex = PreTreatmentInstallStack.Step.BloodLines ; updateModel() }
subStepName : qsTr("Bloodlines")
}
PreTreatmentBase { id: _preTreatmentPressureLinesAndDialyzer
instructionBased : true
- onVisibleChanged : if (visible) { _root.subStepIndex = PreTreatmentInstallStack.Step.PressureLinesAndDialyzer ; updateModel()}
+ onVisibleChanged : if (visible) { _root.subStepIndex = PreTreatmentInstallStack.Step.PressureLinesAndDialyzer; updateModel() }
subStepName : qsTr("Pressure Lines and Dialyzer")
}
+
+ PreTreatmentBase { id: _pretreatmentSaline
+ instructionBased : true
+ onVisibleChanged : if (visible) { _root.subStepIndex = PreTreatmentInstallStack.Step.Saline; updateModel() }
+ subStepName : qsTr("Saline")
+
+ }
+
// blood tubing set auto-load
Connections { target: vPreTreatmentAdjustmentDisposablesConfirm
function onAdjustmentTriggered ( vValue ) {
Index: sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml
===================================================================
diff -u -r56381aae237db191956aff493907cd1f0801216b -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml (.../PreTreatmentStack.qml) (revision 56381aae237db191956aff493907cd1f0801216b)
+++ sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml (.../PreTreatmentStack.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -34,7 +34,6 @@
Concentrates ,
Installation ,
SelfTests ,
- Saline ,
Prime ,
CreateRx ,
Connect
@@ -76,9 +75,6 @@
keys.push(PreTreatmentStack.Step.SelfTests)
values.push(qsTr("Self-Tests"))
- keys.push(PreTreatmentStack.Step.Saline)
- values.push(qsTr("Saline"))
-
keys.push(PreTreatmentStack.Step.Prime)
values.push(qsTr("Prime"))
@@ -107,9 +103,6 @@
else { _pretreatmentInstallation.continueClicked() }
break
case PreTreatmentStack.Step.SelfTests:
- page ( _pretreatmentSaline )
- break
- case PreTreatmentStack.Step.Saline:
page ( _pretreatmentPrime )
break
case PreTreatmentStack.Step.Prime:
@@ -225,11 +218,6 @@
onVisibleChanged : if (visible) { _root.stackStepIndex = stepKeys.indexOf(PreTreatmentStack.Step.SelfTests); }
}
- PreTreatmentBase { id: _pretreatmentSaline
- instructionBased : true
- onVisibleChanged : if (visible) { _root.stackStepIndex = stepKeys.indexOf(PreTreatmentStack.Step.Saline); updateModel() }
- }
-
PreTreatmentPrime { id: _pretreatmentPrime
onVisibleChanged : if (visible) { _root.stackStepIndex = stepKeys.indexOf(PreTreatmentStack.Step.Prime); }
}
Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml
===================================================================
diff -u -r4a7dd11138d2321f1ab8d324b3bd25f02eaefe84 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 4a7dd11138d2321f1ab8d324b3bd25f02eaefe84)
+++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -25,21 +25,17 @@
import "qrc:/pages/pretreatment"
Item { id: _root
-// readonly property int cellWidth : Variables.createRxLabelUnitContainerWidth
-// readonly property int cellHeight : Variables.createRxLabelUnitContainerHeight
-// readonly property int rowSpacing : Variables.defaultMargin * 3
-// readonly property int columnSpacing : 15
readonly property bool isValidated : vTreatmentCreate.parametersValidated
-
readonly property string editRx : qsTr( "Edit Rx" )
readonly property string selectRx : qsTr( "Select Rx" )
readonly property string clearAll : qsTr( "Clear All" )
-
property int currentIndex : PreTreatmentCreateContent.PatientPrescription
property bool editingEnabled : true
onIsValidatedChanged : canEdit ( ! isValidated )
+ onCurrentIndexChanged: _prescriptionMenu.index = _root.currentIndex
+
enum Page {
PatientPrescription ,
TreatmentSettings
@@ -50,53 +46,38 @@
function activateAndRefresh() {
refreshAll () // needs to be first
-
+ vTreatmentCreate.hdfTreatmentModeSet = true
+ vTreatmentCreate.substitutionFluidVolumeSet = true
vTreatmentCreate.bloodFlowRateSet = true
vTreatmentCreate.dialysateFlowRateSet = true
vTreatmentCreate.treatmentDurationSet = true
+ vTreatmentCreate.ultrafiltrationVolumeSet = true
+ vTreatmentCreate.ufPreWeightSet = true
+ vTreatmentCreate.ufEstimatedTargetWeightSet = true
vTreatmentCreate.heparinDispensingRateSet = true
vTreatmentCreate.heparinBolusVolumeSet = true
vTreatmentCreate.heparinDeliveryDurationSet = true
+ vTreatmentCreate.acidConcentrateSet = true
+ vTreatmentCreate.dryBicarbCartSizeSet = true
+ vTreatmentCreate.dialyzerTypeSet = true
vTreatmentCreate.dialysateTempSet = true
+ vTreatmentCreate.sodiumSet = true
+ vTreatmentCreate.bicarbonateSet = true
vTreatmentCreate.fluidBolusVolumeSet = true
+ vTreatmentCreate.primeDiscardVolumeSet = true
+ vTreatmentCreate.rinsebackVolumeSet = true
vTreatmentCreate.bloodPressureMeasureIntervalSet = true
- vTreatmentCreate.acidConcentrateSet = true
- vTreatmentCreate.bicarbonateConcentrateSet = true
- vTreatmentCreate.dialyzerTypeSet = true
+ vTreatmentCreate.hepatitusBStatusSet = true
}
function refreshAll () {
- _preTreatmentCreateTreatmentSettings.refreshAll ()
-
-
-// _bloodFlowRateControl .refresh()
-// _dialysateFlowRateControl .refresh()
-// _durationControl .refresh()
-// _heparinDispensingRateControl .refresh()
-// _heparinBolusVolumeControl .refresh()
-// _heparinDeliveryDurationControl .refresh()
-// _dialysateTemperatureControl .refresh()
-// _fluidBolusVolumeControl .refresh()
-// _bpMeasurementIntervalControl .refresh()
+ _preTreatmentCreateTreatmentSettings .refreshAll()
+ _preTreatmentCreatePatientPrescription .refreshAll()
}
function clear () {
- _preTreatmentCreateTreatmentSettings.clear ()
-
-
-// vTreatmentCreate.patientID = ""
-// _bloodFlowRateControl .clear()
-// _dialysateFlowRateControl .clear()
-// _durationControl .clear()
-// _heparinDispensingRateControl .clear()
-// _heparinBolusVolumeControl .clear()
-// _heparinDeliveryDurationControl .clear()
-// _acidConcentrateComboBox .clear()
-// _bicarbonateConcentrateComboBox .clear()
-// _dialyzerTypeComboBox .clear()
-// _dialysateTemperatureControl .clear()
-// _fluidBolusVolumeControl .clear()
-// _bpMeasurementIntervalControl .clear()
+ _preTreatmentCreateTreatmentSettings .clear()
+ _preTreatmentCreatePatientPrescription .clear()
clearErrors()
canEdit (true)
}
@@ -129,33 +110,29 @@
}
function confirmReady () {
- return _preTreatmentCreateTreatmentSettings.ready()
-
-// return _bloodFlowRateControl .isActive && _bloodFlowRate .valid &&
-// _dialysateFlowRateControl .isActive && _dialysateFlowRate .valid &&
-// _durationControl .isActive && _duration .valid &&
-// ( _root.heparinFeatured ? _heparinDispensingRateControl .isActive && _heparinDispensingRate .valid &&
-// _heparinBolusVolumeControl .isActive && _heparinBolusVolume .valid &&
-// _heparinDeliveryDurationControl .isActive && _heparinDeliveryDuration .valid : true ) &&
-// _acidConcentrateComboBox .isActive &&
-// _bicarbonateConcentrateComboBox .isActive &&
-// _dialyzerTypeComboBox .isActive &&
-// _dialysateTemperatureControl .isActive && _dialysateTemperature .valid &&
-// _fluidBolusVolumeControl .isActive && _fluidBolusVolume .valid &&
-// _bpMeasurementIntervalControl .isActive
+ return _preTreatmentCreateTreatmentSettings .ready() &&
+ _preTreatmentCreatePatientPrescription .ready()
}
function validate () {
vTreatmentCreate .patientID = _preTreatmentCreateTreatmentSettings.patientID
vPostTreatmentAdjustmentTreatmentLog.patientID = _preTreatmentCreateTreatmentSettings.patientID // store for the TreatmentLog
-
-
vTreatmentCreate.doValidation ( )
}
function confirm () { vTreatmentCreate.doConfirm() } /// TODO: Remove later.. keeping for now (only in popup) to get into main tx on device
+
+ Connections { target: vTDOpMode
+ function onPreTreatmentChanged( vValue ) {
+ if ( vValue ) {
+ _preTreatmentCreateTreatmentSettings .setPresetParameters ()
+ _preTreatmentCreatePatientPrescription .setPresetParameters ()
+ }
+ }
+ }
+
Connections{ target: vTreatmentCreate
function onDidValidationPass ( ) {
vPostTreatmentAdjustmentTreatmentLog.heparinDispensingRateOff = vTreatmentCreate.heparinDispensingRateOff = ! vTreatmentCreate.heparinDispensingRate
@@ -173,6 +150,10 @@
}
}
+
+ HeparinRxAdjustment { id: _heparinRxAdjustment; editingEnabled: _root.editingEnabled }
+ UfVolumeAdjustment { id: _ufVolumeAdjustment; editingEnabled: _root.editingEnabled }
+
MouseArea { // click outside to remove active focus and lower keyboard
anchors.fill : parent
propagateComposedEvents : true
@@ -290,81 +271,8 @@
}
-// LabelUnitContainer { id: _acidConcentrate
-// text : qsTr("Acid Concentrate")
-//// showEdit : _root.editingEnabled // Hide 👋📋 TODO Phase 2
-// onEditClicked : _acidConcentrateAdjustment.open()
-// valid : ! vTreatmentCreate.acidConcentrateRejectReason
-// contentItem : BaseComboBox { id: _acidConcentrateComboBox
-// anchors.rightMargin : Variables.defaultMargin * 2
-// anchors.leftMargin : anchors.rightMargin
-// anchors.topMargin : Variables.defaultMargin / 2
-// anchors.bottomMargin: anchors.topMargin
-// isActive : vTreatmentCreate.acidConcentrateSet
-// enabled : _root.editingEnabled
-// 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
-//// vTreatmentCreate.acidConcentrateConversionFactor = vTreatmentRanges.acidConcentrateValues[vTreatmentCreate.acidConcentrate]
-
-// print( vTreatmentRanges.acidConcentrateModel.get(vTreatmentCreate.acidConcentrate).value )
-
-// }
-// }
-// }
-
-// LabelUnitContainer { id: _dialysateFlowRate
-// text : qsTr("Dialysate Flow Rate")
-// unitText : Variables.unitTextFlowRate
-// valid : ! vTreatmentCreate.dialysateFlowRateRejectReason
-
-// contentItem : ValueAdjuster { id: _dialysateFlowRateControl
-// editable : _root.editingEnabled
-// minimum : vTreatmentRanges.dialysateFlowRateMin
-// maximum : vTreatmentRanges.dialysateFlowRateMax
-// step : vTreatmentRanges.dialysateFlowRateRes
-// defaultValue : vTreatmentRanges.dialysateFlowRateDef
-// value : vTreatmentCreate.dialysateFlowRate
-// isActive : vTreatmentCreate.dialysateFlowRateSet
-// onDidActiveChange: function(vState) { vTreatmentCreate.dialysateFlowRateSet = vState }
-// onDidChange : function(vValue) {
-// if ( ! _dialysateFlowRate.valid ) { vTreatmentCreate.dialysateFlowRateRejectReason = Variables.noRejectReason }
-// vTreatmentCreate.dialysateFlowRate = vValue
-// }
-// }
-// }
-
-// LabelUnitContainer { id: _bicarbonateConcentrate
-// text : qsTr("Bicarbonate Concentrate Size")
-// valid : ! vTreatmentCreate.dryBicarbCartSizeRejectReason
-
-// contentItem : BaseComboBox { id: _bicarbonateConcentrateComboBox
-// anchors.rightMargin : Variables.defaultMargin * 2
-// anchors.leftMargin : anchors.rightMargin
-// anchors.topMargin : Variables.defaultMargin / 2
-// anchors.bottomMargin: anchors.topMargin
-// isActive : vTreatmentCreate.dryBicarbCartSizeSet
-// enabled : _root.editingEnabled
-// currentIndex : vTreatmentCreate.dryBicarbCartSize
-// model : vTreatmentRanges.dryBicabCartridgeSizeOptions
-// onClear : vTreatmentCreate.dryBicarbCartSizeSet = false
-// onActivated : {
-// if ( ! _bicarbonateConcentrate.valid ) { vTreatmentCreate.dryBicarbCartSizeRejectReason = Variables.noRejectReason }
-// vTreatmentCreate.dryBicarbCartSize = _bicarbonateConcentrateComboBox.currentIndex
-// vTreatmentCreate.dryBicarbCartSizeSet = true
-// }
-// }
-// }
-
// LabelUnitContainer { id: _duration
// text : qsTr("Duration")
// unitText : Variables.unitTextDuration
@@ -389,52 +297,8 @@
// }
// }
-// LabelUnitContainer { id: _dialyzerType
-// text : qsTr("Dialyzer Type")
-// valid : ! vTreatmentCreate.dialyzerTypeRejectReason
-// contentItem : BaseComboBox { id: _dialyzerTypeComboBox
-// anchors.rightMargin : Variables.defaultMargin * 2
-// anchors.leftMargin : anchors.rightMargin
-// anchors.topMargin : Variables.defaultMargin / 2
-// anchors.bottomMargin: anchors.topMargin
-// isActive : vTreatmentCreate.dialyzerTypeSet
-// enabled : _root.editingEnabled
-// currentIndex : vTreatmentCreate.dialyzerType
-// model : vTreatmentRanges.dialyzerTypeOptions
-// onClear : vTreatmentCreate.dialyzerTypeSet = false
-// onActivated : {
-// if ( ! _dialyzerType.valid ) { vTreatmentCreate.dialyzerTypeRejectReason = Variables.noRejectReason }
-// vTreatmentCreate.dialyzerType = _dialyzerTypeComboBox.currentIndex
-// vTreatmentCreate.dialyzerTypeSet = true
-// }
-// }
-// }
-// LabelUnitContainer { id: _heparinBolusVolume
-// text : qsTr("Heparin Bolus Volume")
-// unitText : Variables.unitTextFluid
-// valid : ! vTreatmentCreate.heparinBolusVolumeRejectReason
-// visible : _root.heparinFeatured
-
-// contentItem : ValueAdjuster { id: _heparinBolusVolumeControl
-// editable : _root.editingEnabled
-// minimum : vTreatmentRanges.heparinBolusVolumeMin
-// maximum : vTreatmentRanges.heparinBolusVolumeMax
-// step : vTreatmentRanges.heparinBolusVolumeRes
-// defaultValue : vTreatmentRanges.heparinBolusVolumeDef
-// value : vTreatmentCreate.heparinBolusVolume
-// decimal : Variables.heparinPrecision
-// canOff : true
-// isActive : vTreatmentCreate.heparinBolusVolumeSet
-// onDidActiveChange: function(vState) { vTreatmentCreate.heparinBolusVolumeSet = vState }
-// onDidChange : function(vValue) {
-// if ( ! _heparinBolusVolume.valid ) { vTreatmentCreate.heparinBolusVolumeRejectReason = Variables.noRejectReason }
-// vTreatmentCreate.heparinBolusVolume = vValue
-// }
-// }
-// }
-
// LabelUnitContainer { id: _bpMeasurementInterval
// text : qsTr("Vitals Interval")
// unitText : Variables.unitTextDuration
@@ -461,92 +325,8 @@
// }
// }
-// LabelUnitContainer { id: _heparinDispensingRate
-// text : qsTr("Heparin Dispensing Rate")
-// unitText : Variables.unitTextDispensingRate
-// valid : ! vTreatmentCreate.heparinDispensingRateRejectReason
-// visible : _root.heparinFeatured
-// contentItem : ValueAdjuster { id: _heparinDispensingRateControl
-// editable : _root.editingEnabled
-// minimum : vTreatmentRanges.heparinDispensingRateMin
-// maximum : vTreatmentRanges.heparinDispensingRateMax
-// step : vTreatmentRanges.heparinDispensingRateRes
-// defaultValue : vTreatmentRanges.heparinDispensingRateDef
-// value : vTreatmentCreate.heparinDispensingRate
-// decimal : Variables.heparinPrecision
-// canOff : true
-// isActive : vTreatmentCreate.heparinDispensingRateSet
-// onDidActiveChange: function(vState) { vTreatmentCreate.heparinDispensingRateSet = vState }
-// onDidChange : function(vValue) {
-// if ( ! _heparinDispensingRate.valid ) { vTreatmentCreate.heparinDispensingRateRejectReason = Variables.noRejectReason }
-// // set heparin time to clear when set OFF to value
-// if ( ! vTreatmentCreate.heparinDispensingRate && vValue ) { _heparinDeliveryDurationControl.clear() }
-// vTreatmentCreate.heparinDispensingRate = vValue
-
-// // if set to OFF set heparin stop time 0
-// if ( ! vTreatmentCreate.heparinDispensingRate ) {
-// vTreatmentCreate.heparinDeliveryDurationSet = true
-// vTreatmentCreate.heparinDeliveryDuration = 0
-// }
-// }
-
-// onIsActiveChanged: {
-// if ( ! vTreatmentCreate.heparinDispensingRate && isActive ) {
-// vTreatmentCreate.heparinDeliveryDurationSet = true
-// vTreatmentCreate.heparinDeliveryDuration = 0
-// }
-// }
-// }
-// }
-
-// LabelUnitContainer { id: _dialysateTemperature
-// text : qsTr("Dialysate Temperature")
-// unitText : Variables.unitTextTemperature
-// valid : ! vTreatmentCreate.dialysateTempRejectReason
-
-// contentItem : ValueAdjuster { id: _dialysateTemperatureControl
-// editable : _root.editingEnabled
-// minimum : vTreatmentRanges.dialysateTempMin
-// maximum : vTreatmentRanges.dialysateTempMax
-// step : vTreatmentRanges.dialysateTempRes
-// defaultValue : vTreatmentRanges.dialysateTempDef
-// value : vTreatmentCreate.dialysateTemp
-// decimal : Variables.dialysateTempPrecision
-// isActive : vTreatmentCreate.dialysateTempSet
-// onDidActiveChange: function(vState) { vTreatmentCreate.dialysateTempSet = vState }
-// onDidChange : function(vValue) {
-// if ( ! _dialysateTemperature.valid ) { vTreatmentCreate.dialysateTempRejectReason = Variables.noRejectReason }
-// vTreatmentCreate.dialysateTemp = vValue
-// }
-// }
-// }
-
-// LabelUnitContainer { id: _heparinDeliveryDuration
-// text : qsTr("Heparin Delivery Duration")
-// unitText : Variables.unitTextDuration
-// valid : ! vTreatmentCreate.heparinDeliveryDurationRejectReason
-// visible : _root.heparinFeatured
-
-// contentItem : ValueAdjuster { id: _heparinDeliveryDurationControl
-// editable : _root.editingEnabled
-// minimum : vTreatmentRanges.heparinStopTimeMin
-// maximum : _durationControl.value
-// step : _durationControl.step
-// defaultValue : _durationControl.value
-// value : vTreatmentCreate.heparinDeliveryDuration
-// enabled : vTreatmentCreate.heparinDispensingRate
-// canOff : true
-// isActive : vTreatmentCreate.heparinDeliveryDurationSet
-// onDidActiveChange: function(vState) { vTreatmentCreate.heparinDeliveryDurationSet = vState }
-// onDidChange : function(vValue) {
-// if ( ! _heparinDeliveryDuration.valid ) { vTreatmentCreate.heparinDeliveryDurationRejectReason = Variables.noRejectReason }
-// vTreatmentCreate.heparinDeliveryDuration = vValue
-// }
-// }
-// }
-
// LabelUnitContainer { id: _fluidBolusVolume
// text : qsTr("Fluid Bolus Volume")
// unitText : Variables.unitTextFluid
Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreatePatientPrescription.qml
===================================================================
diff -u -r4a7dd11138d2321f1ab8d324b3bd25f02eaefe84 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreatePatientPrescription.qml (.../PreTreatmentCreatePatientPrescription.qml) (revision 4a7dd11138d2321f1ab8d324b3bd25f02eaefe84)
+++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreatePatientPrescription.qml (.../PreTreatmentCreatePatientPrescription.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -9,17 +9,85 @@
import "qrc:/compounds"
-Grid { id: _root
+Row { id: _root
readonly property int cellWidth : Variables.createRxLabelUnitContainerWidth
readonly property int cellHeight : Variables.createRxLabelUnitContainerHeight
+ property bool editingEnabled : true
+ property int columnSpacing : 15
+ spacing : Variables.defaultMargin * 3
- property bool editingEnabled : true
+ function setPresetParameters () {
+ vTreatmentCreate.sodium = vTreatmentRanges.dialysateSodiumDef
+ vTreatmentCreate.bicarbonate = vTreatmentRanges.dialysateBicarbonateDef
+ }
- flow : Grid.LeftToRight
- rows : 7
- columns : 2
- rowSpacing : Variables.defaultMargin * 3
- columnSpacing : Variables.defaultMargin * 3
+ function refreshAll () {
+ _sodium .refresh()
+ _bicarbonate .refresh()
+ }
+
+ function clear () {
+
+ _sodium .clear()
+ _bicarbonate .clear()
+ clearErrors()
+ canEdit (true)
+ }
+
+ function ready () {
+ return _sodium .isActive && _sodium .valid &&
+ _bicarbonate .isActive && _bicarbonate .valid
+ }
+
+ Column { id: _leftColumn
+ spacing : _root.columnSpacing
+
+ LabelUnitValueAdjuster { id: _sodium
+ text : qsTr("Sodium (Na)")
+ unitText : Variables.unitTextConcentration
+ valid : ! vTreatmentCreate.sodiumRejectReason
+ width : _root.cellWidth
+ height : _root.cellHeight
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.dialysateSodiumMin
+ maximum : vTreatmentRanges.dialysateSodiumMax
+ step : vTreatmentRanges.dialysateSodiumRes
+ defaultValue : vTreatmentRanges.dialysateSodiumDef
+ value : vTreatmentCreate.sodium
+ isActive : true // PRS-215
+
+ onDidChange : function(vValue) {
+ if ( ! _sodium.valid ) { vTreatmentCreate.sodiumRejectReason = Variables.noRejectReason }
+ vTreatmentCreate.sodium = vValue
+ }
+ }
+
+ LabelUnitValueAdjuster { id: _bicarbonate
+ text : qsTr("Bicarbonate")
+ unitText : Variables.unitTextConcentration
+ valid : ! vTreatmentCreate.bicarbonateRejectReason
+ width : _root.cellWidth
+ height : _root.cellHeight
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.dialysateBicarbonateMin
+ maximum : vTreatmentRanges.dialysateBicarbonateMax
+ step : vTreatmentRanges.dialysateBicarbonateRes
+ defaultValue : vTreatmentRanges.dialysateBicarbonateDef
+ value : vTreatmentCreate.bicarbonate
+ isActive : true // PRS-215
+
+ onDidChange : function(vValue) {
+ if ( ! _sodium.valid ) { vTreatmentCreate.bicarbonateRejectReason = Variables.noRejectReason }
+ vTreatmentCreate.bicarbonate = vValue
+ }
+ }
+
+ }
+
+ Column { id: _rightColumn
+ spacing : _root.columnSpacing
+
+ }
}
Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateTreatmentSettings.qml
===================================================================
diff -u -r4a7dd11138d2321f1ab8d324b3bd25f02eaefe84 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateTreatmentSettings.qml (.../PreTreatmentCreateTreatmentSettings.qml) (revision 4a7dd11138d2321f1ab8d324b3bd25f02eaefe84)
+++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateTreatmentSettings.qml (.../PreTreatmentCreateTreatmentSettings.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -8,242 +8,402 @@
import "qrc:/components"
import "qrc:/compounds"
-Grid { id: _root
+Row { id: _root
readonly property int cellWidth : Variables.createRxLabelUnitContainerWidth
readonly property int cellHeight : Variables.createRxLabelUnitContainerHeight
readonly property bool heparinFeatured : vSettings.heparinSyringePump
readonly property string patientID : _pretreatmentPatientIDEntry.text
property bool isHDFFeatured : vTreatmentCreate.treatmentModality === HeaderBar.Mode_HDF
-
property bool editingEnabled : true
+ property int columnSpacing : 15
- flow : Grid.TopToBottom
- rows : _root.isHDFFeatured ? 7 : 5
- columns : 2
- rowSpacing : 15
- columnSpacing : Variables.defaultMargin * 3
+ spacing : Variables.defaultMargin * 3
+ enum HeparinEnabled {
+ OFF,
+ ON
+ }
+
+ signal clearHeparinDuration()
+
onIsHDFFeaturedChanged: {
if ( ! isHDFFeatured ) {
vTreatmentCreate.hdfTreatmentMode = 0
vTreatmentCreate.substitutionFluidVolume = 0
}
}
+ function setPresetParameters () {
+ vTreatmentCreate.dialysateTemp = vTreatmentRanges.dialysateTempDef
+ }
+
function refreshAll () {
+ _hdfTreatmentModeControl .refresh()
_subFluidVolume .refresh()
-
- _ufVolume .refresh()
_bloodFlowRate .refresh()
-
- _dialysateFlowRateControl .refresh()
- _durationControl .refresh()
- _heparinDispensingRateControl .refresh()
- _heparinBolusVolumeControl .refresh()
- _heparinDeliveryDurationControl .refresh()
- _dialysateTemperatureControl .refresh()
- _fluidBolusVolumeControl .refresh()
- _bpMeasurementIntervalControl .refresh()
+ _dialysateFlowRate .refresh()
+ _duration .refresh()
+ _ufVolume .refresh()
+ _heparinRxAdjustment .refresh()
+ _dialysateTemperature .refresh()
}
function clear () {
- vTreatmentCreate.patientID = ""
- _hdfTreatmentModeComboBox .clear()
- _subFluidVolume .clear()
-
- _ufVolume .clear()
- _bloodFlowRate .clear()
-
-
- _dialysateFlowRateControl .clear()
- _durationControl .clear()
- _heparinDispensingRateControl .clear()
- _heparinBolusVolumeControl .clear()
- _heparinDeliveryDurationControl .clear()
+ vTreatmentCreate.patientID = ""
+ _hdfTreatmentModeControl .clear()
+ _subFluidVolume .clear()
+ _bloodFlowRate .clear()
+ _dialysateFlowRate .clear()
+ _duration .clear()
+ _ufVolume .clear()
+ _heparinRxAdjustment .clear()
_acidConcentrateComboBox .clear()
_bicarbonateConcentrateComboBox .clear()
_dialyzerTypeComboBox .clear()
- _dialysateTemperatureControl .clear()
- _fluidBolusVolumeControl .clear()
- _bpMeasurementIntervalControl .clear()
- clearErrors()
- canEdit (true)
+ _dialysateTemperature .clear()
}
function ready () {
- return _root.isHDFFeatured ? _hdfTreatmentModeComboBox .isActive && _hdfTreatmentMode.valid &&
- _subFluidVolume .isActive && _subFluidVolume .valid : true &&
- _bloodFlowRate .isActive && _bloodFlowRate .valid &&
+ return _root.isHDFFeatured ? _hdfTreatmentModeControl .isActive && _hdfTreatmentMode .valid &&
+ _subFluidVolume .isActive && _subFluidVolume .valid : true &&
+ _bloodFlowRate .isActive && _bloodFlowRate .valid &&
+ _dialysateFlowRate .isActive && _dialysateFlowRate .valid &&
+ _duration .isActive && _duration .valid &&
- _ufVolume .isActive && _ufVolume .valid &&
+ _ufVolume .isActive && _ufVolume .valid &&
+ _root.isHDFFeatured &&
+ _heparinRxControl.value === PreTreatmentCreateTreatmentSettings.ON ? _heparinRxAdjustment.confirmReady() :
+ true &&
+ _acidConcentrateComboBox .isActive && _acidConcentrate .valid &&
+ _bicarbonateConcentrateComboBox .isActive && _bicarbonateConcentrate .valid &&
+ _dialyzerTypeComboBox .isActive && _dialyzerType .valid &&
+ _dialysateTemperature .isActive && _dialysateTemperature .valid
+ }
+ Column { id: _leftColumn
+ spacing : _root.columnSpacing
+ LabelUnitContainer { id: _patientID
+ text : qsTr("Patient ID")
+ contentArea.anchors.leftMargin : 120
- _dialysateFlowRateControl .isActive && _dialysateFlowRate .valid &&
- _durationControl .isActive && _duration .valid &&
- ( _root.heparinFeatured ? _heparinDispensingRateControl .isActive && _heparinDispensingRate .valid &&
- _heparinBolusVolumeControl .isActive && _heparinBolusVolume .valid &&
- _heparinDeliveryDurationControl .isActive && _heparinDeliveryDuration .valid : true ) &&
- _acidConcentrateComboBox .isActive &&
- _bicarbonateConcentrateComboBox .isActive &&
- _dialyzerTypeComboBox .isActive &&
- _dialysateTemperatureControl .isActive && _dialysateTemperature .valid &&
- _fluidBolusVolumeControl .isActive && _fluidBolusVolume .valid &&
- _bpMeasurementIntervalControl .isActive
- }
+ contentItem : TextEntry { id: _pretreatmentPatientIDEntry
+ clip : true
+ textInput.width : parent.width - Variables.defaultMargin * 4
+ text : vTreatmentCreate.patientID
+ anchors.centerIn : parent
+ textInput.maximumLength : 20 // LEAHI-PRS-236
+ textInput.rightPadding : Variables.defaultMargin
+ textInput.leftPadding : Variables.defaultMargin * 14
+ textInput.inputMethodHints : Qt.ImhPreferLowercase
+ textInput.echoMode : TextInput.Normal
+ textInput.validator : RegExpValidator { regExp: Variables.regExp_PatientID }
+ line.visible : false
+ enabled : _root.editingEnabled
+ onEditingFinished : vTreatmentCreate.patientID = text
- LabelUnitContainer { id: _patientID
- text : qsTr("Patient ID")
- contentArea.anchors.leftMargin : 120
+ Text { id: _patientIDPlaceHolderText
+ text : Variables.emptyEntry
+ anchors.fill : parent
+ rightPadding : 125
+ horizontalAlignment : Text.AlignRight
+ font.pixelSize : Fonts.fontPixelValueControl
+ color : Colors.offWhite
+ visible : _pretreatmentPatientIDEntry.textInput.text.length === 0 &&
+ ! _pretreatmentPatientIDEntry.textInput.activeFocus
+ }
+ }
+ }
- contentItem : TextEntry { id: _pretreatmentPatientIDEntry
- clip : true
- textInput.width : parent.width - Variables.defaultMargin * 4
- text : vTreatmentCreate.patientID
- anchors.centerIn : parent
- textInput.maximumLength : 20 // LEAHI-PRS-236
- textInput.rightPadding : Variables.defaultMargin
- textInput.leftPadding : Variables.defaultMargin * 14
- textInput.inputMethodHints : Qt.ImhPreferLowercase
- textInput.echoMode : TextInput.Normal
- textInput.validator : RegExpValidator { regExp: Variables.regExp_PatientID }
- line.visible : false
- enabled : _root.editingEnabled
- onEditingFinished : vTreatmentCreate.patientID = text
+ LabelUnitContainer { id: _treatmentModality
+ text : qsTr("Treatment Modality")
+ valid : ! vTreatmentCreate.treatmentModalityRejectReason
- Text { id: _patientIDPlaceHolderText
- text : Variables.emptyEntry
- anchors.fill : parent
- rightPadding : 125
- horizontalAlignment : Text.AlignRight
- font.pixelSize : Fonts.fontPixelValueControl
- color : Colors.offWhite
- visible : _pretreatmentPatientIDEntry.textInput.text.length === 0 &&
- ! _pretreatmentPatientIDEntry.textInput.activeFocus
+ contentItem : BaseComboBox { id: _treatmentModalityComboBox
+ anchors.rightMargin : Variables.defaultMargin * 2
+ anchors.leftMargin : anchors.rightMargin
+ anchors.topMargin : Variables.defaultMargin / 2
+ anchors.bottomMargin: anchors.topMargin
+ isActive : true // PRS-215
+ enabled : _root.editingEnabled
+ currentIndex : vTreatmentCreate.treatmentModality
+ model : vTreatmentRanges.treatmentModalityOptions
+ centerHorizontally : true
+
+ onActivated : {
+ if ( ! _treatmentModality.valid ) { vTreatmentCreate.treatmentModalityRejectReason = Variables.noRejectReason }
+ vTreatmentCreate.treatmentModality = _treatmentModalityComboBox.currentIndex
+ }
}
}
- }
- LabelUnitContainer { id: _treatmentModality
- text : qsTr("Treatment Modality")
- valid : ! vTreatmentCreate.treatmentModalityRejectReason
+ LabelUnitContainer { id: _hdfTreatmentMode
+ text : _root.isHDFFeatured ? qsTr("HDF Operating Mode") : ""
+ valid : ! vTreatmentCreate.hdfTreatmentModeRejectReason
+ height : _root.isHDFFeatured ? _root.cellHeight : 0
- contentItem : BaseComboBox { id: _treatmentModalityComboBox
- anchors.rightMargin : Variables.defaultMargin * 2
- anchors.leftMargin : anchors.rightMargin
- anchors.topMargin : Variables.defaultMargin / 2
- anchors.bottomMargin: anchors.topMargin
- isActive : true // PRS-215
- enabled : _root.editingEnabled
- currentIndex : vTreatmentCreate.treatmentModality
- model : vTreatmentRanges.treatmentModalityOptions
+ contentItem : ValueAdjusterCustom { id: _hdfTreatmentModeControl
+ value : vTreatmentCreate.hdfTreatmentMode
+ model : vTreatmentRanges.hdfTreatmentModeOptions
+ isActive : vTreatmentCreate.hdfTreatmentModeSet
+ editable : _root.editingEnabled
+ visible : _root.isHDFFeatured
- onActivated : {
- if ( ! _treatmentModality.valid ) { vTreatmentCreate.treatmentModalityRejectReason = Variables.noRejectReason }
- vTreatmentCreate.treatmentModality = _treatmentModalityComboBox.currentIndex
+ onDidActiveChange: function(vState) { vTreatmentCreate.hdfTreatmentModeSet = vState }
+
+ onDidChange : function(vValue) {
+ if ( ! _hdfTreatmentMode.valid ) { vTreatmentCreate.hdfTreatmentModeRejectReason = Variables.noRejectReason }
+ vTreatmentCreate.hdfTreatmentModeSet = true
+ vTreatmentCreate.hdfTreatmentMode = vValue
+ }
}
+ Behavior on height { NumberAnimation { duration: 250 } }
}
- }
- LabelUnitContainer { id: _hdfTreatmentMode
- text : qsTr("HDF Operating Mode")
- valid : ! vTreatmentCreate.hdfTreatmentModeRejectReason
- visible : _root.isHDFFeatured
+ LabelUnitValueAdjuster { id: _subFluidVolume
+ text : _root.isHDFFeatured ? qsTr("Substitution Fluid Volume") : ""
+ width : _root.cellWidth
+ height : _root.isHDFFeatured ? _root.cellHeight : 0
+ contentItem.visible: _root.isHDFFeatured
+ unitText : _root.isHDFFeatured ? Variables.unitVolume : ""
+ valid : ! vTreatmentCreate.substitutionFluidVolumeRejectionReason
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.substitutionVolumeMin
+ maximum : vTreatmentRanges.substitutionVolumeMax
+ step : vTreatmentRanges.substitutionVolumeRes
+ defaultValue : vTreatmentRanges.substitutionVolumeDef
+ decimal : Variables.substitutionPrecision
+ value : vTreatmentCreate.substitutionFluidVolume
+ isActive : vTreatmentCreate.substitutionFluidVolumeSet
- contentItem : BaseComboBox { id: _hdfTreatmentModeComboBox
- anchors.rightMargin : Variables.defaultMargin * 2
- anchors.leftMargin : anchors.rightMargin
- anchors.topMargin : Variables.defaultMargin / 2
- anchors.bottomMargin: anchors.topMargin
- isActive : vTreatmentCreate.hdfTreatmentModeSet
- enabled : _root.editingEnabled
- currentIndex : vTreatmentCreate.hdfTreatmentMode
- model : vTreatmentRanges.hdfTreatmentModeOptions
+ onDidActiveChange : function(vState) { vTreatmentCreate.substitutionFluidVolumeSet = vState }
+ onDidChange : function(vValue) {
+ if ( ! _ufVolume.valid ) { vTreatmentCreate.substitutionFluidVolumeRejectionReason = Variables.noRejectReason }
+ vTreatmentCreate.substitutionFluidVolume = vValue
+ }
+ Behavior on height { NumberAnimation { duration: 250 } }
+ }
- onClear : vTreatmentCreate.hdfTreatmentModeSet = false
+ LabelUnitValueAdjuster { id: _bloodFlowRate
+ text : qsTr("Blood Flow Rate")
+ unitText : Variables.unitTextFlowRate
+ valid : ! vTreatmentCreate.bloodFlowRateRejectReason
+ width : _root.cellWidth
+ height : _root.cellHeight
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.bloodFlowRateMin
+ maximum : vTreatmentRanges.bloodFlowRateMax
+ step : vTreatmentRanges.bloodFlowRateRes
+ defaultValue : vTreatmentRanges.bloodFlowRateDef
+ value : vTreatmentCreate.bloodFlowRate
+ isActive : vTreatmentCreate.bloodFlowRateSet
+ onDidActiveChange : function(vState) { vTreatmentCreate.bloodFlowRateSet = vState }
+ onDidChange : function(vValue) {
+ if ( ! _bloodFlowRate.valid ) { vTreatmentCreate.bloodFlowRateRejectReason = Variables.noRejectReason }
+ vTreatmentCreate.bloodFlowRate = vValue
+ }
+ }
- onActivated : {
- if ( ! _hdfTreatmentMode.valid ) { vTreatmentCreate.hdfTreatmentModeRejectReason = Variables.noRejectReason }
- vTreatmentCreate.hdfTreatmentModeSet = true
- vTreatmentCreate.hdfTreatmentMode = _hdfTreatmentModeComboBox.currentIndex
+ LabelUnitValueAdjuster { id: _dialysateFlowRate
+ text : qsTr("Dialysate Flow Rate")
+ unitText : Variables.unitTextFlowRate
+ valid : ! vTreatmentCreate.dialysateFlowRateRejectReason
+ width : _root.cellWidth
+ height : _root.cellHeight
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.dialysateFlowRateMin
+ maximum : vTreatmentRanges.dialysateFlowRateMax
+ step : vTreatmentRanges.dialysateFlowRateRes
+ defaultValue : vTreatmentRanges.dialysateFlowRateDef
+ value : vTreatmentCreate.dialysateFlowRate
+ isActive : vTreatmentCreate.dialysateFlowRateSet
+ onDidActiveChange : function(vState) { vTreatmentCreate.dialysateFlowRateSet = vState }
+ onDidChange : function(vValue) {
+ if ( ! _dialysateFlowRate.valid ) { vTreatmentCreate.dialysateFlowRateRejectReason = Variables.noRejectReason }
+ vTreatmentCreate.dialysateFlowRate = vValue
}
}
- }
- LabelUnitValueAdjuster { id: _subFluidVolume
- text : qsTr("Substitution Fluid Volume")
- visible : _root.isHDFFeatured
- width : _root.cellWidth
- height : _root.cellHeight
- unitText : Variables.unitVolume
- valid : ! vTreatmentCreate.substitutionFluidVolumeRejectionReason
- editable : _root.editingEnabled
- minimum : vTreatmentRanges.substitutionVolumeMin
- maximum : vTreatmentRanges.substitutionVolumeMax
- step : vTreatmentRanges.substitutionVolumeRes
- defaultValue : vTreatmentRanges.substitutionVolumeDef
- decimal : Variables.substitutionPrecision
- value : vTreatmentCreate.substitutionFluidVolume
- isActive : vTreatmentCreate.substitutionFluidVolumeSet
+ LabelUnitValueAdjuster { id: _duration
+ text : qsTr("Duration")
+ unitText : Variables.unitTextDuration
+ valid : ! vTreatmentCreate.treatmentDurationRejectReason
+ width : _root.cellWidth
+ height : _root.cellHeight
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.treatmentDurationMin
+ maximum : vTreatmentRanges.treatmentDurationMax
+ step : vTreatmentRanges.treatmentDurationRes
+ defaultValue : vTreatmentRanges.treatmentDurationDef
+ value : vTreatmentCreate.treatmentDuration
+ isActive : vTreatmentCreate.treatmentDurationSet
+ onDidActiveChange: function(vState) { vTreatmentCreate.treatmentDurationSet = vState }
+ onDidChange : function(vValue) {
+ if ( ! _duration.valid ) { vTreatmentCreate.treatmentDurationRejectReason = Variables.noRejectReason }
+ vTreatmentCreate.treatmentDuration = vValue
- onDidActiveChange : function(vState) { vTreatmentCreate.substitutionFluidVolumeSet = vState }
- onDidChange : function(vValue) {
- if ( ! _ufVolume.valid ) { vTreatmentCreate.substitutionFluidVolumeRejectionReason = Variables.noRejectReason }
- vTreatmentCreate.substitutionFluidVolume = vValue
+ // set heparin time to clear when set
+ clearHeparinDuration()
+ }
}
}
- LabelUnitValueAdjuster { id: _bloodFlowRate
- text : qsTr("Blood Flow Rate")
- width : _root.cellWidth
- height : _root.cellHeight
- unitText : Variables.unitTextFlowRate
- valid : ! vTreatmentCreate.bloodFlowRateRejectReason
- editable : _root.editingEnabled
- minimum : vTreatmentRanges.bloodFlowRateMin
- maximum : vTreatmentRanges.bloodFlowRateMax
- step : vTreatmentRanges.bloodFlowRateRes
- defaultValue : vTreatmentRanges.bloodFlowRateDef
- value : vTreatmentCreate.bloodFlowRate
- isActive : vTreatmentCreate.bloodFlowRateSet
+ Column { id: _rightColumn
+ spacing : _root.columnSpacing
- onDidActiveChange : function(vState) { vTreatmentCreate.bloodFlowRateSet = vState }
- onDidChange : function(vValue) {
- if ( ! _bloodFlowRate.valid ) { vTreatmentCreate.bloodFlowRateRejectReason = Variables.noRejectReason }
- vTreatmentCreate.bloodFlowRate = vValue
- }
- }
+ LabelUnitValueAdjuster { id: _ufVolume
+ text : qsTr("Ultrafiltration Volume")
+ width : _root.cellWidth
+ height : _root.cellHeight
+ unitText : Variables.unitVolume
+ showEdit : true
+ valid : ! vTreatmentCreate.ultrafiltrationVolumeRejectionReason
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.ultrafiltrationVolumeMin
+ maximum : vTreatmentRanges.ultrafiltrationVolumeMax
+ step : vTreatmentRanges.ultrafiltrationVolumeRes
+ defaultValue : vTreatmentRanges.ultrafiltrationVolumeDef
+ decimal : Variables.ultrafiltrationPrecision
+ value : vTreatmentCreate.ultrafiltrationVolume
+ isActive : vTreatmentCreate.ultrafiltrationVolumeSet
+ onDidActiveChange : function(vState) { vTreatmentCreate.ultrafiltrationVolumeSet = vState }
+ onDidChange : function(vValue) {
+ if ( ! _ufVolume.valid ) { vTreatmentCreate.ultrafiltrationVolumeRejectionReason = Variables.noRejectReason }
+ vTreatmentCreate.ultrafiltrationVolume = vValue
+ }
+ onEditClicked :_ufVolumeAdjustment.open()
+ }
- LabelUnitValueAdjuster { id: _ufVolume
- text : qsTr("Ultrafiltration Volume")
- width : _root.cellWidth
- height : _root.cellHeight
- unitText : Variables.unitVolume
- showEdit : true
- valid : ! vTreatmentCreate.ultrafiltrationVolumeRejectionReason
- editable : _root.editingEnabled
- minimum : vTreatmentRanges.ultrafiltrationVolumeMin
- maximum : vTreatmentRanges.ultrafiltrationVolumeMax
- step : vTreatmentRanges.ultrafiltrationVolumeRes
- defaultValue : vTreatmentRanges.ultrafiltrationVolumeDef
- decimal : Variables.ultrafiltrationPrecision
- value : vTreatmentCreate.ultrafiltrationVolume
- isActive : vTreatmentCreate.ultrafiltrationVolumeSet
+ LabelUnitContainer { id: _heparinRx
+ text : qsTr("Heparin Rx")
+ valid : ! vTreatmentCreate.heparinDeliveryDurationRejectReason &&
+ ! vTreatmentCreate.heparinTypeRejectReason &&
+ ! vTreatmentCreate.heparinBolusVolumeRejectReason &&
+ ! vTreatmentCreate.heparinDispensingRateRejectReason
+ visible : _root.heparinFeatured
+ showEdit : true
+ needsAttention : ! _heparinRxAdjustment.confirmReady()
+ editEnabled : _heparinRxControl.value === PreTreatmentCreateTreatmentSettings.ON
- onDidActiveChange : function(vState) { vTreatmentCreate.ultrafiltrationVolumeSet = vState }
- onDidChange : function(vValue) {
- if ( ! _ufVolume.valid ) { vTreatmentCreate.ultrafiltrationVolumeRejectionReason = Variables.noRejectReason }
- vTreatmentCreate.ultrafiltrationVolume = vValue
+ contentItem : ValueAdjusterCustom { id: _heparinRxControl
+ defaultValue : 0
+ value : 0
+ editable : _root.editingEnabled
+ model : [qsTr("OFF"), qsTr("ON")]
+ onDidChange : function(vValue) {
+ value = vValue
+ if ( value ) {
+ _heparinRxAdjustment.open()
+ }
+ else {
+ vTreatmentCreate.heparinBolusVolume = 0
+ vTreatmentCreate.heparinDispensingRate = 0
+ vTreatmentCreate.heparinDeliveryDuration = 0
+ }
+ }
+ }
+
+ onEditClicked : _heparinRxAdjustment.open()
}
- }
+ LabelUnitContainer { id: _acidConcentrate
+ text : qsTr("Acid Concentrate")
+// showEdit : _root.editingEnabled // Hide 👋📋 TODO Phase 2
+ onEditClicked : _acidConcentrateAdjustment.open()
+ valid : ! vTreatmentCreate.acidConcentrateRejectReason
+ contentItem : BaseComboBox { id: _acidConcentrateComboBox
+ anchors.rightMargin : Variables.defaultMargin * 2
+ anchors.leftMargin : anchors.rightMargin
+ anchors.topMargin : Variables.defaultMargin / 2
+ anchors.bottomMargin: anchors.topMargin
+ isActive : vTreatmentCreate.acidConcentrateSet
+ enabled : _root.editingEnabled
+ 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
+ vTreatmentCreate.acidConcentrateConversionFactor = vTreatmentRanges.acidConcentrateModel.get(vTreatmentCreate.acidConcentrate).value
+ print( vTreatmentCreate.acidConcentrateConversionFactor )
+ }
+ }
+ }
+ LabelUnitContainer { id: _bicarbonateConcentrate
+ text : qsTr("Bicarbonate Concentrate Size")
+ valid : ! vTreatmentCreate.dryBicarbCartSizeRejectReason
+ contentItem : BaseComboBox { id: _bicarbonateConcentrateComboBox
+ anchors.rightMargin : Variables.defaultMargin * 2
+ anchors.leftMargin : anchors.rightMargin
+ anchors.topMargin : Variables.defaultMargin / 2
+ anchors.bottomMargin: anchors.topMargin
+ isActive : vTreatmentCreate.dryBicarbCartSizeSet
+ enabled : _root.editingEnabled
+ currentIndex : vTreatmentCreate.dryBicarbCartSize
+ model : vTreatmentRanges.dryBicabCartridgeSizeOptions
+ centerHorizontally : true
+ onClear : vTreatmentCreate.dryBicarbCartSizeSet = false
+ onActivated : {
+ if ( ! _bicarbonateConcentrate.valid ) { vTreatmentCreate.dryBicarbCartSizeRejectReason = Variables.noRejectReason }
+ vTreatmentCreate.dryBicarbCartSize = _bicarbonateConcentrateComboBox.currentIndex
+ vTreatmentCreate.dryBicarbCartSizeSet = true
+ }
+ }
+ }
+ LabelUnitContainer { id: _dialyzerType
+ text : qsTr("Dialyzer Type")
+ valid : ! vTreatmentCreate.dialyzerTypeRejectReason
+
+ contentItem : BaseComboBox { id: _dialyzerTypeComboBox
+ anchors.rightMargin : Variables.defaultMargin * 2
+ anchors.leftMargin : anchors.rightMargin
+ anchors.topMargin : Variables.defaultMargin / 2
+ anchors.bottomMargin: anchors.topMargin
+ isActive : vTreatmentCreate.dialyzerTypeSet
+ enabled : _root.editingEnabled
+ currentIndex : vTreatmentCreate.dialyzerType
+ model : vTreatmentRanges.dialyzerTypeOptions
+ onClear : vTreatmentCreate.dialyzerTypeSet = false
+ onActivated : {
+ if ( ! _dialyzerType.valid ) { vTreatmentCreate.dialyzerTypeRejectReason = Variables.noRejectReason }
+ vTreatmentCreate.dialyzerType = _dialyzerTypeComboBox.currentIndex
+ vTreatmentCreate.dialyzerTypeSet = true
+ }
+ }
+ }
+
+ LabelUnitValueAdjuster { id: _dialysateTemperature
+ text : qsTr("Dialysate Temperature")
+ unitText : Variables.unitTextTemperature
+ valid : ! vTreatmentCreate.dialysateTempRejectReason
+ width : _root.cellWidth
+ height : _root.cellHeight
+ editable : _root.editingEnabled
+ minimum : vTreatmentRanges.dialysateTempMin
+ maximum : vTreatmentRanges.dialysateTempMax
+ step : vTreatmentRanges.dialysateTempRes
+ defaultValue : vTreatmentRanges.dialysateTempDef
+ value : vTreatmentCreate.dialysateTemp
+ decimal : Variables.dialysateTempPrecision
+ isActive : true
+
+ onDidChange : function(vValue) {
+ if ( ! _dialysateTemperature.valid ) { vTreatmentCreate.dialysateTempRejectReason = Variables.noRejectReason }
+ vTreatmentCreate.dialysateTemp = vValue
+ }
+ }
+ }
}
Index: sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustRequests.h
===================================================================
diff -u -r4a7dd11138d2321f1ab8d324b3bd25f02eaefe84 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustRequests.h (.../MPreTreatmentAdjustRequests.h) (revision 4a7dd11138d2321f1ab8d324b3bd25f02eaefe84)
+++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustRequests.h (.../MPreTreatmentAdjustRequests.h) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -94,8 +94,8 @@
* | #20:(F32) | \ref mDialysateTemp |
* | #21:(F32) | \ref mAcidConcentrateConversionFactor |
* | #22:(F32) | \ref mUFVolume |
- * | #23:(U32) | \ref mUFPreWeight |
- * | #24:(U32) | \ref mUFEstimatedTargetWeight |
+ * | #23:(F32) | \ref mUFPreWeight |
+ * | #24:(F32) | \ref mUFEstimatedTargetWeight |
*
*/
@@ -123,8 +123,8 @@
float mDialysateTemp = 0; // Celsius
float mAcidConcentrateConversionFactor = 0; // mEq/L
float mUFVolume = 0; // L
- quint32 mUFPreWeight = 0; // kg
- quint32 mUFEstimatedTargetWeight = 0; // kg
+ float mUFPreWeight = 0; // kg
+ float mUFEstimatedTargetWeight = 0; // kg
QString toString() {
return toString({
Index: sources/view/VTreatmentCreate.h
===================================================================
diff -u -r4a7dd11138d2321f1ab8d324b3bd25f02eaefe84 -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 4a7dd11138d2321f1ab8d324b3bd25f02eaefe84)
+++ sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -101,8 +101,8 @@
VALUESET(float , dialysateTemp , 0)
VALUESET(float , acidConcentrateConversionFactor , 0)
VALUESET(float , ultrafiltrationVolume , 0)
- VALUESET(quint32 , ufPreWeight , 0)
- VALUESET(quint32 , ufEstimatedTargetWeight , 0)
+ VALUESET(float , ufPreWeight , 0)
+ VALUESET(float , ufEstimatedTargetWeight , 0)
VALUESET(quint32 , acidConcentrate , 0)
Index: sources/view/td/data/VTreatmentRanges.cpp
===================================================================
diff -u -r56381aae237db191956aff493907cd1f0801216b -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/view/td/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision 56381aae237db191956aff493907cd1f0801216b)
+++ sources/view/td/data/VTreatmentRanges.cpp (.../VTreatmentRanges.cpp) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -384,5 +384,10 @@
FROMVARIANT_WITHRETURN ( isolatedUFDurationMax , "Isolated UF Duration Ranges" , "Isolated_UF_Duration_Max" , UInt , isConfigsOk );
FROMVARIANT_WITHRETURN ( isolatedUFDurationRes , "Isolated UF Duration Ranges" , "Isolated_UF_Duration_Res" , UInt , isConfigsOk );
+ FROMVARIANT_WITHRETURN ( weightDef , "Weight Ranges" , "Weight_Def" , Float , isConfigsOk );
+ FROMVARIANT_WITHRETURN ( weightMin , "Weight Ranges" , "Weight_Min" , Float , isConfigsOk );
+ FROMVARIANT_WITHRETURN ( weightMax , "Weight Ranges" , "Weight_Max" , Float , isConfigsOk );
+ FROMVARIANT_WITHRETURN ( weightRes , "Weight Ranges" , "Weight_Res" , Float , isConfigsOk );
+
emit didTreatmentRangesDone( isConfigsOk );
}
Index: sources/view/td/data/VTreatmentRanges.h
===================================================================
diff -u -r56381aae237db191956aff493907cd1f0801216b -r1132f049e169cc87a059261f72fca0ceb7d739f1
--- sources/view/td/data/VTreatmentRanges.h (.../VTreatmentRanges.h) (revision 56381aae237db191956aff493907cd1f0801216b)
+++ sources/view/td/data/VTreatmentRanges.h (.../VTreatmentRanges.h) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1)
@@ -76,6 +76,7 @@
RANGESET( float , dialysateTemp , 0)
RANGESET( quint32 , salineBolusVolume , 0)
+ RANGESET( float , weight , 0)
Q_PROPERTY(MListModel* acidConcentrateModel READ acidConcentrateModel NOTIFY didAcidConcentrateModelChange)