Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml =================================================================== diff -u -ra563e719d85e3274b0cd0fa831ef8257032e49bc -r58d24875f4e9c0115a05cae01b4a4e0a26818396 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision a563e719d85e3274b0cd0fa831ef8257032e49bc) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 58d24875f4e9c0115a05cae01b4a4e0a26818396) @@ -25,113 +25,111 @@ import "qrc:/pages/pretreatment" Item { id: _root - readonly property int cellWidth : width / 2 - ( rowSpacing / 2 ) - readonly property int cellHeight : ( _contentGrid.height ) / 7 - ( columnSpacing ) - readonly property int rowSpacing : Variables.defaultMargin * 3 - readonly property int columnSpacing : 15 readonly property bool isValidated : vTreatmentCreate.parametersValidated - readonly property bool heparinFeatured: vSettings.heparinSyringePump - 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 , + Count + } + function canEdit (state) { editingEnabled = state && ! vTDOpMode.inTreatment } 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.heparinStopTimeSet = true - vTreatmentCreate.dialysateTempSet = true - vTreatmentCreate.salineBolusVolumeSet = true - vTreatmentCreate.bloodPressureMeasureIntervalSet = true + vTreatmentCreate.heparinDeliveryDurationSet = true vTreatmentCreate.acidConcentrateSet = true - vTreatmentCreate.bicarbonateConcentrateSet = true + vTreatmentCreate.dryBicarbCartSizeSet = true vTreatmentCreate.dialyzerTypeSet = true + vTreatmentCreate.dialysateTempSet = true + vTreatmentCreate.sodiumSet = true + vTreatmentCreate.bicarbonateSet = true + vTreatmentCreate.fluidBolusVolumeSet = true + vTreatmentCreate.rinsebackVolumeSet = true + vTreatmentCreate.bloodPressureMeasureIntervalSet = true + vTreatmentCreate.hepatitusBStatusSet = true } function refreshAll () { - _bloodFlowRateControl .refresh() - _dialysateFlowRateControl .refresh() - _durationControl .refresh() - _heparinDispensingRateControl .refresh() - _heparinBolusVolumeControl .refresh() - _heparinStopTimeControl .refresh() - _dialysateTemperatureControl .refresh() - _salineBolusVolumeControl .refresh() - _bpMeasurementIntervalControl .refresh() + _preTreatmentCreateTreatmentSettings .refreshAll() + _preTreatmentCreatePatientPrescription .refreshAll() } function clear () { - vTreatmentCreate.patientID = "" - _bloodFlowRateControl .clear() - _dialysateFlowRateControl .clear() - _durationControl .clear() - _heparinDispensingRateControl .clear() - _heparinBolusVolumeControl .clear() - _heparinStopTimeControl .clear() - _acidConcentrateComboBox .clear() - _bicarbonateConcentrateComboBox .clear() - _dialyzerTypeComboBox .clear() - _dialysateTemperatureControl .clear() - _salineBolusVolumeControl .clear() - _bpMeasurementIntervalControl .clear() + _preTreatmentCreateTreatmentSettings .clear() + _preTreatmentCreatePatientPrescription .clear() clearErrors() canEdit (true) } function clearErrors() { - vTreatmentCreate.bloodFlowRateRejectReason = Variables.noRejectReason - vTreatmentCreate.dialysateFlowRateRejectReason = Variables.noRejectReason - vTreatmentCreate.treatmentDurationRejectReason = Variables.noRejectReason - vTreatmentCreate.heparinDispensingRateRejectReason = Variables.noRejectReason - vTreatmentCreate.heparinBolusVolumeRejectReason = Variables.noRejectReason - vTreatmentCreate.heparinStopTimeRejectReason = Variables.noRejectReason - vTreatmentCreate.acidConcentrateRejectReason = Variables.noRejectReason - vTreatmentCreate.bicarbonateConcentrateRejectReason = Variables.noRejectReason - vTreatmentCreate.dialyzerTypeRejectReason = Variables.noRejectReason - vTreatmentCreate.dialysateTempRejectReason = Variables.noRejectReason - vTreatmentCreate.salineBolusVolumeRejectReason = Variables.noRejectReason - vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.noRejectReason + vTreatmentCreate.treatmentModalityRejectReason = Variables.noRejectReason + vTreatmentCreate.hDFTreatmentModeRejectReason = Variables.noRejectReason + vTreatmentCreate.bloodFlowRateRejectReason = Variables.noRejectReason + vTreatmentCreate.dialysateFlowRateRejectReason = Variables.noRejectReason + vTreatmentCreate.treatmentDurationRejectReason = Variables.noRejectReason + vTreatmentCreate.heparinDeliveryDurationRejectReason = Variables.noRejectReason + vTreatmentCreate.heparinTypeRejectReason = Variables.noRejectReason + vTreatmentCreate.dryBicarbCartSizeRejectReason = Variables.noRejectReason + vTreatmentCreate.sodiumRejectReason = Variables.noRejectReason + vTreatmentCreate.bicarbonateRejectReason = Variables.noRejectReason + vTreatmentCreate.dialyzerTypeRejectReason = Variables.noRejectReason + vTreatmentCreate.fluidBolusVolumeRejectReason = Variables.noRejectReason + vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.noRejectReason + vTreatmentCreate.rinsebackVolumeRejectReason = Variables.noRejectReason + vTreatmentCreate.hepatitusBStatusRejectReason = Variables.noRejectReason + vTreatmentCreate.substitutionFluidVolumeRejectReason = Variables.noRejectReason + vTreatmentCreate.heparinBolusVolumeRejectReason = Variables.noRejectReason + vTreatmentCreate.heparinDispensingRateRejectReason = Variables.noRejectReason + vTreatmentCreate.dialysateTempRejectReason = Variables.noRejectReason + vTreatmentCreate.acidConcentrateConversionFactorRejectionReason = Variables.noRejectReason + vTreatmentCreate.ufVolumeRejectionReason = Variables.noRejectReason + vTreatmentCreate.ufPreWeightRejectionReason = Variables.noRejectReason + vTreatmentCreate.ufEstimatedTargetWeightRejectionReason = Variables.noRejectReason + vTreatmentCreate.acidConcentrateIndexRejectionReason = Variables.noRejectReason } function confirmReady () { - return _bloodFlowRateControl .isActive && _bloodFlowRate .valid && - _dialysateFlowRateControl .isActive && _dialysateFlowRate .valid && - _durationControl .isActive && _duration .valid && - ( _root.heparinFeatured ? _heparinDispensingRateControl .isActive && _heparinDispensingRate .valid && - _heparinBolusVolumeControl .isActive && _heparinBolusVolume .valid && - _heparinStopTimeControl .isActive && _heparinStopTime .valid : true ) && - _acidConcentrateComboBox .isActive && - _bicarbonateConcentrateComboBox .isActive && - _dialyzerTypeComboBox .isActive && - _dialysateTemperatureControl .isActive && _dialysateTemperature .valid && - _salineBolusVolumeControl .isActive && _salineBolusVolume .valid && - _bpMeasurementIntervalControl .isActive + return _preTreatmentCreateTreatmentSettings .ready() && + _preTreatmentCreatePatientPrescription .ready() } function validate () { - vTreatmentCreate .patientID = _pretreatmentPatientIDEntry.text - vPostTreatmentAdjustmentTreatmentLog.patientID = _pretreatmentPatientIDEntry.text // store for the TreatmentLog + vTreatmentCreate .patientID = _preTreatmentCreateTreatmentSettings.patientID + vPostTreatmentAdjustmentTreatmentLog.patientID = _preTreatmentCreateTreatmentSettings.patientID // store for the TreatmentLog - vTreatmentCreate.arterialPressureLimitWindow = vTreatmentRanges.arterialPressureLimitWindowDef // these parameters don't have a user option on create treatment, so sending the default. - vTreatmentCreate.venousPressureLimitWindow = vTreatmentRanges.venousPressureLimitWindowDef // these parameters don't have a user option on create treatment, so sending the default. - vTreatmentCreate.venousPressureLimitAsymtrc = vTreatmentRanges.venousPressureLimitAsymtrcDef // these parameters don't have a user option on create treatment, so sending the default. - vTreatmentCreate.transmembranePressureLimitWindow = vTreatmentRanges.transmembranePressureLimitWindowDef // these parameters don't have a user option on create treatment, so sending the default. - vTreatmentCreate.rinsebackVolume = vTreatmentRanges.rinsebackVolumeDef // these parameters don't have a user option on create treatment, so sending the default. - vTreatmentCreate.rinsebackFlowRate = vTreatmentRanges.rinsebackFlowRateDef // these parameters don't have a user option on create treatment, so sending the default. vTreatmentCreate.doValidation ( ) } - function confirm () { vTreatmentCreate.doConfirm() } + Connections { target: vTDOpMode + function onPreTreatmentChanged( vValue ) { + if ( vValue ) { + _preTreatmentCreateTreatmentSettings .setPresetParameters () + _preTreatmentCreatePatientPrescription .setPresetParameters () + _prescriptionMenu.index = PreTreatmentCreateContent.PatientPrescription // reset tab to first tab on new treatment + } + } + } Connections{ target: vTreatmentCreate function onDidValidationPass ( ) { @@ -142,35 +140,63 @@ } } - Connections { target: _acidConcentrateAdjustment - function onAccepted () { - vTreatmentCreate.acidConcentrate = _acidConcentrateComboBox.find(_acidConcentrateAdjustment.adjustment) - _acidConcentrateComboBox.currentIndex = vTreatmentCreate.acidConcentrate - } - } + // TODO Phase 2 +// Connections { target: _acidConcentrateAdjustment +// function onAccepted () { +// vTreatmentCreate.acidConcentrate = _acidConcentrateComboBox.find(_acidConcentrateAdjustment.adjustment) +// _acidConcentrateComboBox.currentIndex = vTreatmentCreate.acidConcentrate +// vTreatmentCreate.acidConcentrateConversionFactor = vTreatmentRanges.acidConcentrateValues[vTreatmentCreate.acidConcentrate] +// } +// } + + 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 onClicked : focus = true // grab focus here } - Text { id: _prescriptionTitle + MainMenu { id: _prescriptionMenu anchors { - top : parent.top - topMargin : Variables.defaultMargin - left : parent.left + top : parent.top + topMargin : Variables.defaultMargin + left : parent.left } - text : qsTr("Prescription") - color : Colors.textMain - font.pixelSize : Fonts.fontPixelTitle - font.weight : Font.Medium + + width : _root.width / 2.5 + index : _root.currentIndex + color : Colors.transparent + titlePixelSize : 30 + model : _model + highlightWidth : width / 2.5 + + onItemPressed: function (vIndex) { + _root.currentIndex = vIndex + } + + ListModel { id: _model + ListElement { text: qsTr("Patient Prescription") ; visible: true } + ListElement { text: qsTr("Treatment Settings") ; visible: true } + } } - BaseComboBox { id: _prescriptionMenu + Line { anchors { - left : _prescriptionTitle.right - verticalCenter : _prescriptionTitle.verticalCenter + bottom : _prescriptionMenu.bottom + right : parent.right + left : parent.left + } + + color : Colors.panelBorderColor + } + + BaseComboBox { id: _prescriptionDotMenu + anchors { + left : _prescriptionMenu.right + verticalCenter : _prescriptionMenu.verticalCenter verticalCenterOffset: 5 } @@ -200,374 +226,48 @@ } } - Grid { id: _contentGrid + Row { id: _qrRow + height : _root.cellHeight + spacing : Variables.defaultMargin anchors { - top : _prescriptionTitle.bottom - topMargin : Variables.defaultMargin * 2 - left : _root.left - right : _root.right - bottom : parent.bottom + left : parent.left + leftMargin : (_root.width / 2) + (30) + verticalCenter : _prescriptionMenu.verticalCenter + verticalCenterOffset: -10 } - // Flow intentially set o keep top row aligned. To organize with Heparin Defeature - flow : Grid.LeftToRight - rows : _root.heparinFeatured ? 7 : 6 - columns : 2 - rowSpacing :_root.columnSpacing - columnSpacing : _root.rowSpacing - - Item { id: _patientIDItem - height : _root.cellHeight - width : _root.cellWidth - - LabelUnitContainer { id: _patientID - anchors.verticalCenter : parent.verticalCenter - text : qsTr("Patient ID") - height : cellHeight - Variables.defaultMargin - contentArea.anchors.leftMargin : 120 - - 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 - - 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 - } - } - } + QRCode { id: _qrCode + anchors.verticalCenter : parent.verticalCenter + qrcode : vTreatmentCreate.txCode + clear : ! _root.visible + height : 65 + width : height } - Row { id: _qrRow - height : _root.cellHeight - spacing : Variables.defaultMargin - - QRCode { id: _qrCode - anchors.verticalCenter : parent.verticalCenter - anchors.verticalCenterOffset: -5 - qrcode : vTreatmentCreate.txCode - clear : ! _root.visible - } - - Text { id: _txCode - anchors.bottom : _qrCode.bottom - text : vTreatmentCreate.txCode ? qsTr("Tx Code: ") + vTreatmentCreate.txCode : " " - color : "#DBE9FA" - font.pixelSize : Fonts.fontPixelButton - } + Text { id: _txCode + anchors.bottom : _qrCode.bottom + text : vTreatmentCreate.txCode ? qsTr("Tx Code: ") + vTreatmentCreate.txCode : " " + color : "#DBE9FA" + font.pixelSize : Fonts.fontPixelButton } + } - LabelUnitContainer { id: _bloodFlowRate - text : qsTr("Blood Flow Rate") - unitText : Variables.unitTextFlowRate - valid : ! vTreatmentCreate.bloodFlowRateRejectReason - - contentItem : ValueAdjuster { id: _bloodFlowRateControl - 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 - } - } + Item { id: _view + anchors { + top : _prescriptionMenu.bottom + topMargin : Variables.defaultMargin * 2 + left : _root.left + right : _root.right + bottom : parent.bottom } - LabelUnitContainer { id: _acidConcentrate - text : qsTr("Acid Concentrate") - showEdit : _root.editingEnabled - 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 - vTreatmentRanges.doPopulateAcidConcentrate( vTreatmentCreate.acidConcentrateSet, - vTreatmentCreate.acidConcentrate) - } - } + PreTreatmentCreatePatientPrescription { id: _preTreatmentCreatePatientPrescription; + visible : _root.currentIndex === PreTreatmentCreateContent.PatientPrescription + editingEnabled : _root.editingEnabled } - 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 - } - } + PreTreatmentCreateTreatmentSettings { id: _preTreatmentCreateTreatmentSettings + visible : _root.currentIndex === PreTreatmentCreateContent.TreatmentSettings + editingEnabled : _root.editingEnabled } - - LabelUnitContainer { id: _bicarbonateConcentrate - text : qsTr("Bicarbonate Concentrate") - valid : ! vTreatmentCreate.bicarbonateConcentrateRejectReason - - contentItem : BaseComboBox { id: _bicarbonateConcentrateComboBox - anchors.rightMargin : Variables.defaultMargin * 2 - anchors.leftMargin : anchors.rightMargin - anchors.topMargin : Variables.defaultMargin / 2 - anchors.bottomMargin: anchors.topMargin - isActive : vTreatmentCreate.bicarbonateConcentrateSet - enabled : _root.editingEnabled - currentIndex : vTreatmentCreate.bicarbonateConcentrate - model : vTreatmentRanges.bicarbonateConcentrateOptions - onClear : vTreatmentCreate.bicarbonateConcentrateSet = false - onActivated : { - if ( ! _bicarbonateConcentrate.valid ) { vTreatmentCreate.bicarbonateConcentrateRejectReason = Variables.noRejectReason } - vTreatmentCreate.bicarbonateConcentrate = _bicarbonateConcentrateComboBox.currentIndex - vTreatmentCreate.bicarbonateConcentrateSet = true - } - } - } - - LabelUnitContainer { id: _duration - text : qsTr("Duration") - unitText : Variables.unitTextDuration - valid : ! vTreatmentCreate.treatmentDurationRejectReason - - contentItem : ValueAdjuster { id: _durationControl - 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 - - // set heparin time to clear when set - if ( _heparinStopTimeControl.enabled ) { _heparinStopTimeControl.clear() } - } - } - } - - 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 - valid : ! vTreatmentCreate.bloodPressureMeasureIntervalRejectReason - - contentItem : ValueAdjusterCustom { id: _bpMeasurementIntervalControl - editable : _root.editingEnabled - isActive : vTreatmentCreate.bloodPressureMeasureIntervalSet - defaultValue : vTreatmentRanges.vitalsInterval - value : vTreatmentRanges.bloodPressureMeasureInterval.indexOf(vTreatmentCreate.bloodPressureMeasureInterval.toString()) - model : vTreatmentRanges.bloodPressureMeasureInterval - canOff : true - - onDidActiveChange: function(vState) { vTreatmentCreate.bloodPressureMeasureIntervalSet = vState } - - onDidChange : function(vValue) { - if ( ! _bpMeasurementInterval.valid ) { - vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.noRejectReason - } - - vTreatmentCreate.bloodPressureMeasureInterval = vTreatmentRanges.bloodPressureMeasureInterval[vValue] - vTreatmentCreate.bloodPressureMeasureIntervalSet = true - } - } - } - - 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 ) { _heparinStopTimeControl.clear() } - - vTreatmentCreate.heparinDispensingRate = vValue - - // if set to OFF set heparin stop time 0 - if ( ! vTreatmentCreate.heparinDispensingRate ) { - vTreatmentCreate.heparinStopTimeSet = true - vTreatmentCreate.heparinStopTime = 0 - } - } - - onIsActiveChanged: { - if ( ! vTreatmentCreate.heparinDispensingRate && isActive ) { - vTreatmentCreate.heparinStopTimeSet = true - vTreatmentCreate.heparinStopTime = 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: _heparinStopTime - text : qsTr("Heparin Delivery Duration") - unitText : Variables.unitTextDuration - valid : ! vTreatmentCreate.heparinStopTimeRejectReason - visible : _root.heparinFeatured - - contentItem : ValueAdjuster { id: _heparinStopTimeControl - editable : _root.editingEnabled - minimum : vTreatmentRanges.heparinStopTimeMin - maximum : _durationControl.value - step : _durationControl.step - defaultValue : _durationControl.value - value : vTreatmentCreate.heparinStopTime - enabled : vTreatmentCreate.heparinDispensingRate - canOff : true - isActive : vTreatmentCreate.heparinStopTimeSet - onDidActiveChange: function(vState) { vTreatmentCreate.heparinStopTimeSet = vState } - onDidChange : function(vValue) { - if ( ! _heparinStopTime.valid ) { vTreatmentCreate.heparinStopTimeRejectReason = Variables.noRejectReason } - vTreatmentCreate.heparinStopTime = vValue - } - } - } - - LabelUnitContainer { id: _salineBolusVolume - text : qsTr("Saline Bolus Volume") - unitText : Variables.unitTextFluid - valid : ! vTreatmentCreate.salineBolusVolumeRejectReason - - contentItem : ValueAdjuster { id: _salineBolusVolumeControl - editable : _root.editingEnabled - minimum : vTreatmentRanges.salineBolusVolumeMin - maximum : vTreatmentRanges.salineBolusVolumeMax - step : vTreatmentRanges.salineBolusVolumeRes - defaultValue : vTreatmentRanges.salineBolusVolumeDef - value : vTreatmentCreate.salineBolusVolume - isActive : vTreatmentCreate.salineBolusVolumeSet - onDidActiveChange: function(vState) { vTreatmentCreate.salineBolusVolumeSet = vState } - onDidChange : function(vValue) { - if ( ! _salineBolusVolume.valid ) { vTreatmentCreate.salineBolusVolumeRejectReason = Variables.noRejectReason } - vTreatmentCreate.salineBolusVolume = vValue - } - } - } } }