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