Index: leahi.qrc
===================================================================
diff -u -rf2aa3ee850de1023cfc011b845ed0364d251b749 -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- leahi.qrc (.../leahi.qrc) (revision f2aa3ee850de1023cfc011b845ed0364d251b749)
+++ leahi.qrc (.../leahi.qrc) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -258,7 +258,6 @@
sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml
sources/gui/qml/pages/treatment/sections/TreatmentPressures.qml
sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml
- sources/gui/qml/pages/treatment/sections/TreatmentFluid.qml
sources/gui/qml/pages/treatment/sections/TreatmentTime.qml
sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml
sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml
Index: sources/gui/GuiGlobals.h
===================================================================
diff -u -rcb9c48c7c307690dcafcfd16ef412fe660291692 -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision cb9c48c7c307690dcafcfd16ef412fe660291692)
+++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -136,7 +136,7 @@
ID_PressureOcclusion = 0x2400, // 36 //// ----- @LEAHIZED
ID_Saline = 0x3D00, // 61 //// ----- @LEAHIZED
ID_Ultrafiltration = 0x3E00, // 62 //// ----- @LEAHIZED
- ID_Heparin = 0x4D00, // 77
+ ID_Heparin = 0xD900, // 77
ID_Rinseback = 0x5600, // 86
ID_Recirculate = 0x5A00, // 90
ID_BloodPrime = 0x5900, // 89
@@ -252,8 +252,8 @@
ID_AdjustVitalsReq = 0x6300, // 99
ID_AdjustVitalsRsp = 0x6400, // 100
- ID_AdjustHeparinReq = 0x4B00, // 75
- ID_AdjustHeparinRsp = 0x4C00, // 76
+ ID_AdjustHeparinReq = 0xD700, // 75
+ ID_AdjustHeparinRsp = 0xD800, // 76
// Ultrafiltration
ID_AdjustUltrafiltrationStateReq = 0x4700, // 71 //// ----- @LEAHIZED
Index: sources/gui/qml/components/HeaderBar.qml
===================================================================
diff -u -r9048646630717f980a852df54349805ba63773e0 -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision 9048646630717f980a852df54349805ba63773e0)
+++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -7,6 +7,8 @@
property alias menuHidden : _headerMenu.hidden
property alias headerMenuIndex : _headerMenu.index
+ readonly property int currentScreen : _headerMenu.currentScreen
+ property alias statusColor : _headerMenu.heparinStatusColor
width : Variables.applicationWidth
height : Variables.headerHeight
@@ -93,13 +95,12 @@
bottomMargin: hidden || disable ? height * -1 : 0
}
height : parent.height
- width : parent.width / 3
+ width : parent.width / 2
hidden : true
titlePixelSize : 32
backgroundColor : Colors.transparent
highlightHeight : 15
isMainTreatment : true
-
onHiddenChanged: { if (hidden) { index = 0 } }
}
Index: sources/gui/qml/components/MainMenu.qml
===================================================================
diff -u -r0808e668ca656c86185c3fa69e4a70dbdb4192c9 -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 0808e668ca656c86185c3fa69e4a70dbdb4192c9)
+++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -34,12 +34,21 @@
property int highlightHeight : 10
property bool isMainMenu : false
property bool isMainTreatment : false
+ readonly property int currentScreen : isMainTreatment ? _mainTreatmentModel.get(index).screen : 0
+ property color heparinStatusColor: Colors.transparent
width : parent.width
height : Variables.mainMenuHeight
color : _root.backgroundColor
clip : true
+ enum TreatmentScreen {
+ Treatment = 0,
+ Trends = 1,
+ Heparin = 2,
+ HDF = 3
+ }
+
gradient: Gradient {
GradientStop { position: 0.2; color: Qt.lighter(Colors.backgroundMain, 1.2) }
GradientStop { position: 0.8; color: Qt.darker (Colors.backgroundMain, 1.2) }
@@ -48,15 +57,16 @@
signal itemPressed(int vIndex)
ListModel { id: _mainTreatmentModel
- ListElement { text: qsTr("Treatment") }
- ListElement { text: qsTr("Trends") }
- ListElement { text: qsTr("Heparin") }
+ ListElement { text: qsTr("Treatment"); visible: true; screen: 0 } // MainMenu.Treatment
+ ListElement { text: qsTr("Trends"); visible: true; screen: 1 } // MainMenu.Trends
+ ListElement { text: qsTr("Heparin"); visible: true; /*vSettings.heparinSyringePump */ screen: 2 } // MainMenu.Heparin
+ ListElement { text: qsTr("HDF"); visible: true; screen: 3 } // MainMenu.HDF
}
ListModel { id: _mainMenuModel
- ListElement { text: qsTr("Treatment") }
- ListElement { text: qsTr("Prescriptions") }
- ListElement { text: qsTr("Settings") }
+ ListElement { text: qsTr("Treatment") ; visible: true }
+ ListElement { text: qsTr("Prescriptions") ; visible: true }
+ ListElement { text: qsTr("Settings") ; visible: true }
}
ListView { id: _listView
@@ -89,17 +99,18 @@
bottom: parent.bottom
bottomMargin: (height / 2) * -1
}
- height: _root.highlightHeight
- width: parent.width / 2
- radius: 10
- color: Colors.backgroundButtonSelect
+ height : _root.highlightHeight
+ width : parent.width / 2
+ radius : 10
+ color : Colors.backgroundButtonSelect
}
}
delegate: Item { id: _delegateControl
objectName : "delegateControl"
- width : ListView.view.count ? ListView.view.width / ListView.view.count : 0
+ width : ListView.view.count ? model.visible ? ListView.view.width / ListView.view.count : 0 : 0
height : ListView.view.height
+ visible : model.visible
TouchRect { id : _touchRect
objectName: "_touchRect" + index
@@ -109,6 +120,21 @@
border.width: 0
pixelSize : titlePixelSize
+ Rectangle { id: _heparinStatus
+ anchors {
+ left : parent.left
+ leftMargin : Variables.defaultMargin * 2
+ top : parent.top
+ topMargin : 10
+ }
+
+ height : 15
+ width : height
+ radius : height
+ visible : _root.isMainTreatment && model.screen === MainMenu.Heparin
+ color : _root.heparinStatusColor
+ }
+
onPressed: {
if (_listView.currentIndex !== index) {
_listView.currentIndex = index
Index: sources/gui/qml/compounds/LabelUnitContainer.qml
===================================================================
diff -u -r24f141c96bdd5d4043e6ff05ea7ad962f63faabc -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/qml/compounds/LabelUnitContainer.qml (.../LabelUnitContainer.qml) (revision 24f141c96bdd5d4043e6ff05ea7ad962f63faabc)
+++ sources/gui/qml/compounds/LabelUnitContainer.qml (.../LabelUnitContainer.qml) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -29,6 +29,8 @@
property string unitText : ""
property bool valid : true
property bool showEdit : false
+ property int titleFontSize : Fonts.fontPixelContainerTitle
+ property int unitFontSize : Fonts.fontPixelContainerUnit
height : cellHeight
width : cellWidth
@@ -53,14 +55,14 @@
Text { id: _title
anchors.verticalCenter : _titleRow.verticalCenter
color : Colors.offWhite
- font.pixelSize : Fonts.fontPixelContainerTitle
+ font.pixelSize : _root.titleFontSize
}
Text { id: _unit
anchors.baseline: _title.baseline
text : ("(%1)").arg(_root.unitText)
color : Colors.offWhite
- font.pixelSize : Fonts.fontPixelContainerUnit
+ font.pixelSize : _root.unitFontSize
font.weight : Font.Thin
visible : _root.unitText.length > 0
}
Index: sources/gui/qml/globals/Colors.qml
===================================================================
diff -u -rcb9c48c7c307690dcafcfd16ef412fe660291692 -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision cb9c48c7c307690dcafcfd16ef412fe660291692)
+++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -92,6 +92,11 @@
readonly property color panelBackgroundColor : "#12FFFFFF"
readonly property color panelBorderColor : "#4DB5B5B5"
readonly property color panelInvalidBorderColor : "#FFA500"
+ readonly property color heparinPanelBorderColor : "#CC42556B"
+ readonly property color heparinSectionHeader : "#384B60"
+ readonly property color heparinActive : "#429C4A"
+ readonly property color heparinPaused : "#D9A23D"
+ readonly property color heparinComplete : "#276FCD"
readonly property color touchTextAreaTitle : "#a0b6d0"
Index: sources/gui/qml/globals/Fonts.qml
===================================================================
diff -u -r24f141c96bdd5d4043e6ff05ea7ad962f63faabc -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 24f141c96bdd5d4043e6ff05ea7ad962f63faabc)
+++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -81,6 +81,8 @@
readonly property int fontPixelRinsebackAdjustmentButton : 26
readonly property int fontPixelCreateTreatment : 30
+ readonly property int fontPixelHeparin : 30
+ readonly property int fontPixelHeparinTime : 55
readonly property int fontPixelCircleButtonLabel: 50
Index: sources/gui/qml/globals/Variables.qml
===================================================================
diff -u -r8672e62f205231b08dd7d4a4f6f7f3a60b2c677b -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 8672e62f205231b08dd7d4a4f6f7f3a60b2c677b)
+++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -233,6 +233,7 @@
// Heparin
readonly property int heparinPrecision : 1
+ readonly property int heparinDeliveryPrecision : 2
// Saline
readonly property int salinePrecision : 1
@@ -279,6 +280,8 @@
readonly property string preTreatmentStepLabelPriming : qsTr("PRIME" )
readonly property string preTreatmentStepLabelUltrafiltration : qsTr("BEGIN" )
+ // Heparin
+ readonly property string unitHeparinType : qsTr("IU/mL")
// Units
readonly property string unitTextPotassium : qsTr("K")
readonly property string unitTextCalcium : qsTr("Ca")
@@ -287,6 +290,8 @@
readonly property string unitTextUltrafiltrationVolume : unitTextVolume
// - Duration/Interval
readonly property string unitTextDuration : qsTr("min")
+ readonly property string unitTextHrs : qsTr("hrs")
+ readonly property string unitTextMins : qsTr("mins")
// - Flows
readonly property string unitTextFlowRate : qsTr("mL/min")
readonly property string unitTextDispensingRate : qsTr("mL/hr")
Index: sources/gui/qml/main.qml
===================================================================
diff -u -rb12853c86ef9e517667516dc3e47bca07349cedf -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/qml/main.qml (.../main.qml) (revision b12853c86ef9e517667516dc3e47bca07349cedf)
+++ sources/gui/qml/main.qml (.../main.qml) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -75,6 +75,8 @@
import VTreatmentBloodPrime 0.1
import VTreatmentStop 0.1
import VTreatmentRanges 0.1
+import VTreatmentHeparin 0.1
+
// Pre-Treatment
import VPreTreatmentAdjustmentInitTreatment 0.1
import VDGFilterFlush 0.1
@@ -225,6 +227,8 @@
VTreatmentRinseback { id: vTreatmentRinseback }
VTreatmentRecirculate { id: vTreatmentRecirculate }
VTreatmentStop { id: vTreatmentStop }
+ VTreatmentHeparin { id: vTreatmentHeparin }
+
// ---- DD
VDGDrainPump { id: vDGDrainPump }
VDDHeaters { id: vDDHeaters }
Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml
===================================================================
diff -u -r24f141c96bdd5d4043e6ff05ea7ad962f63faabc -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 24f141c96bdd5d4043e6ff05ea7ad962f63faabc)
+++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -26,10 +26,11 @@
Item { id: _root
readonly property int cellWidth : width / 2 - ( rowSpacing / 2 )
- readonly property int cellHeight : ( _contentRow.height ) / 7 - ( columnSpacing )
+ 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: true // TODO: vSettings.heparinSyringePump
readonly property string editRx : qsTr( "Edit Rx" )
readonly property string selectRx : qsTr( "Select Rx" )
@@ -196,376 +197,375 @@
}
}
- Row { id: _contentRow
+ Grid { id: _contentGrid
anchors {
top : _prescriptionTitle.bottom
topMargin : Variables.defaultMargin * 2
left : _root.left
right : _root.right
bottom : parent.bottom
}
- spacing : _root.rowSpacing
+ // 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
- Column { id: _leftColumn
- spacing : _root.columnSpacing
+ Item { id: _patientIDItem
+ height : _root.cellHeight
+ width : _root.cellWidth
- Item { id: _patientIDItem
- height : cellHeight
- width : cellWidth
+ LabelUnitContainer { id: _patientID
+ anchors.verticalCenter : parent.verticalCenter
+ text : qsTr("Patient ID")
+ height : cellHeight - Variables.defaultMargin
+ contentArea.anchors.leftMargin : 120
- 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
- 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
- }
+ 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
}
}
}
+ }
- LabelUnitContainer { id: _bloodFlowRate
- text : qsTr("Blood Flow Rate")
- unitText : Variables.unitTextFlowRate
- valid : ! vTreatmentCreate.bloodFlowRateRejectReason
+ Row { id: _qrRow
+ height : _root.cellHeight
+ spacing : Variables.defaultMargin
- 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
- }
- }
+ QRCode { id: _qrCode
+ anchors.verticalCenter : parent.verticalCenter
+ anchors.verticalCenterOffset: -5
+ qrcode : vTreatmentCreate.txCode
+ clear : ! _root.visible
}
- LabelUnitContainer { id: _dialysateFlowRate
- text : qsTr("Dialysate Flow Rate")
- unitText : Variables.unitTextFlowRate
- valid : ! vTreatmentCreate.dialysateFlowRateRejectReason
+ Text { id: _txCode
+ anchors.bottom : _qrCode.bottom
+ text : vTreatmentCreate.txCode ? qsTr("Tx Code: ") + vTreatmentCreate.txCode : " "
+ color : "#DBE9FA"
+ font.pixelSize : Fonts.fontPixelButton
+ }
+ }
- 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: _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
}
}
+ }
- LabelUnitContainer { id: _duration
- text : qsTr("Duration")
- unitText : Variables.unitTextDuration
- valid : ! vTreatmentCreate.treatmentDurationRejectReason
+ LabelUnitContainer { id: _acidConcentrate
+ text : qsTr("Acid Concentrate")
+ showEdit : _root.editingEnabled
+ onEditClicked : _acidConcentrateAdjustment.open()
+ valid : ! vTreatmentCreate.acidConcentrateRejectReason
- 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
+ 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
+ }
- // set heparin time to clear when set
- if ( _heparinStopTimeControl.enabled ) { _heparinStopTimeControl.clear() }
- }
+ onActivated : {
+ if ( ! _acidConcentrate.valid ) { vTreatmentCreate.acidConcentrateRejectReason = Variables.noRejectReason }
+ vTreatmentCreate.acidConcentrate = _acidConcentrateComboBox.currentIndex
+ vTreatmentCreate.acidConcentrateSet = true
}
}
+ }
- LabelUnitContainer { id: _heparinBolusVolume
- text : qsTr("Heparin Bolus Volume")
- unitText : Variables.unitTextFluid
- valid : ! vTreatmentCreate.heparinBolusVolumeRejectReason
+ LabelUnitContainer { id: _dialysateFlowRate
+ text : qsTr("Dialysate Flow Rate")
+ unitText : Variables.unitTextFlowRate
+ valid : ! vTreatmentCreate.dialysateFlowRateRejectReason
- 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
- }
+ 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: _heparinDispensingRate
- text : qsTr("Heparin Dispensing Rate")
- unitText : Variables.unitTextDispensingRate
- valid : ! vTreatmentCreate.heparinDispensingRateRejectReason
+ LabelUnitContainer { id: _bicarbonateConcentrate
+ text : qsTr("Bicarbonate Concentrate")
+ valid : ! vTreatmentCreate.bicarbonateConcentrateRejectReason
- 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() }
+ 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
+ }
+ }
+ }
- vTreatmentCreate.heparinDispensingRate = vValue
+ LabelUnitContainer { id: _duration
+ text : qsTr("Duration")
+ unitText : Variables.unitTextDuration
+ valid : ! vTreatmentCreate.treatmentDurationRejectReason
- // if set to OFF set heparin stop time 0
- if ( ! vTreatmentCreate.heparinDispensingRate ) {
- vTreatmentCreate.heparinStopTimeSet = true
- vTreatmentCreate.heparinStopTime = 0
- }
- }
+ 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
- onIsActiveChanged: {
- if ( ! vTreatmentCreate.heparinDispensingRate && isActive ) {
- vTreatmentCreate.heparinStopTimeSet = true
- vTreatmentCreate.heparinStopTime = 0
- }
- }
+ // set heparin time to clear when set
+ if ( _heparinStopTimeControl.enabled ) { _heparinStopTimeControl.clear() }
}
}
+ }
- LabelUnitContainer { id: _heparinStopTime
- text : qsTr("Heparin Stop Time")
- unitText : Variables.unitTextDuration
- valid : ! vTreatmentCreate.heparinStopTimeRejectReason
+ LabelUnitContainer { id: _dialyzerType
+ text : qsTr("Dialyzer Type")
+ valid : ! vTreatmentCreate.dialyzerTypeRejectReason
- 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
- }
+ 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
}
}
}
- Column { id: _rightColumn
- spacing : _root.columnSpacing
+ LabelUnitContainer { id: _heparinBolusVolume
+ text : qsTr("Heparin Bolus Volume")
+ unitText : Variables.unitTextFluid
+ valid : ! vTreatmentCreate.heparinBolusVolumeRejectReason
+ visible : _root.heparinFeatured
- Row { id: _qrRow
- height : _root.cellHeight
- spacing : Variables.defaultMargin
- anchors.left : parent.left
-
- QRCode { id: _qrCode
- anchors.verticalCenter : parent.verticalCenter
- anchors.verticalCenterOffset: -5
- qrcode : vTreatmentCreate.txCode
- clear : ! _root.visible
+ 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
}
-
- Text { id: _txCode
- anchors.bottom : _qrCode.bottom
- text : vTreatmentCreate.txCode ? qsTr("Tx Code: ") + vTreatmentCreate.txCode : " "
- color : "#DBE9FA"
- font.pixelSize : Fonts.fontPixelButton
- }
}
+ }
- LabelUnitContainer { id: _acidConcentrate
- text : qsTr("Acid Concentrate")
- showEdit : _root.editingEnabled
- onEditClicked : _acidConcentrateAdjustment.open()
- valid : ! vTreatmentCreate.acidConcentrateRejectReason
+ LabelUnitContainer { id: _bpMeasurementInterval
+ text : qsTr("Vitals Interval")
+ unitText : Variables.unitTextDuration
+ valid : ! vTreatmentCreate.bloodPressureMeasureIntervalRejectReason
- 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
- }
+ contentItem : BaseComboBox { id: _bpMeasurementIntervalControl
+ anchors.rightMargin : Variables.defaultMargin * 2
+ anchors.leftMargin : anchors.rightMargin
+ anchors.topMargin : Variables.defaultMargin / 2
+ anchors.bottomMargin: anchors.topMargin
+ isActive : vTreatmentCreate.bloodPressureMeasureIntervalSet
+ enabled : _root.editingEnabled
+ currentIndex : vTreatmentRanges.bloodPressureMeasureInterval.indexOf(vTreatmentCreate.bloodPressureMeasureInterval.toString())
+ model : vTreatmentRanges.bloodPressureMeasureInterval
+ canOff : true
+ centerHorizontally : true
- onActivated : {
- if ( ! _acidConcentrate.valid ) { vTreatmentCreate.acidConcentrateRejectReason = Variables.noRejectReason }
- vTreatmentCreate.acidConcentrate = _acidConcentrateComboBox.currentIndex
- vTreatmentCreate.acidConcentrateSet = true
+ onClear : {
+ vTreatmentCreate.bloodPressureMeasureIntervalSet = false
+ }
+
+ onActivated : {
+ if ( ! _bpMeasurementInterval.valid ) {
+ vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.noRejectReason
}
+ vTreatmentCreate.bloodPressureMeasureInterval = vTreatmentRanges.bloodPressureMeasureInterval[_bpMeasurementIntervalControl.currentIndex]
+ vTreatmentCreate.bloodPressureMeasureIntervalSet = true
}
}
+ }
- LabelUnitContainer { id: _bicarbonateConcentrate
- text : qsTr("Bicarbonate Concentrate")
- valid : ! vTreatmentCreate.bicarbonateConcentrateRejectReason
+ LabelUnitContainer { id: _heparinDispensingRate
+ text : qsTr("Heparin Dispensing Rate")
+ unitText : Variables.unitTextDispensingRate
+ valid : ! vTreatmentCreate.heparinDispensingRateRejectReason
+ visible : _root.heparinFeatured
- 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
+ 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
}
}
- }
- 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
+ onIsActiveChanged: {
+ if ( ! vTreatmentCreate.heparinDispensingRate && isActive ) {
+ vTreatmentCreate.heparinStopTimeSet = true
+ vTreatmentCreate.heparinStopTime = 0
}
}
}
+ }
- LabelUnitContainer { id: _bpMeasurementInterval
- text : qsTr("Vitals Interval")
- unitText : Variables.unitTextDuration
- valid : ! vTreatmentCreate.bloodPressureMeasureIntervalRejectReason
+ LabelUnitContainer { id: _dialysateTemperature
+ text : qsTr("Dialysate Temperature")
+ unitText : Variables.unitTextTemperature
+ valid : ! vTreatmentCreate.dialysateTempRejectReason
- contentItem : BaseComboBox { id: _bpMeasurementIntervalControl
- anchors.rightMargin : Variables.defaultMargin * 2
- anchors.leftMargin : anchors.rightMargin
- anchors.topMargin : Variables.defaultMargin / 2
- anchors.bottomMargin: anchors.topMargin
- isActive : vTreatmentCreate.bloodPressureMeasureIntervalSet
- enabled : _root.editingEnabled
- currentIndex : vTreatmentRanges.bloodPressureMeasureInterval.indexOf(vTreatmentCreate.bloodPressureMeasureInterval.toString())
- model : vTreatmentRanges.bloodPressureMeasureInterval
- canOff : true
- centerHorizontally : true
-
- onClear : {
- vTreatmentCreate.bloodPressureMeasureIntervalSet = false
- }
-
- onActivated : {
- if ( ! _bpMeasurementInterval.valid ) {
- vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.noRejectReason
- }
- vTreatmentCreate.bloodPressureMeasureInterval = vTreatmentRanges.bloodPressureMeasureInterval[_bpMeasurementIntervalControl.currentIndex]
- vTreatmentCreate.bloodPressureMeasureIntervalSet = true
- }
+ 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: _dialysateTemperature
- text : qsTr("Dialysate Temperature")
- unitText : Variables.unitTextTemperature
- valid : ! vTreatmentCreate.dialysateTempRejectReason
+ LabelUnitContainer { id: _heparinStopTime
+ text : qsTr("Heparin Stop Time")
+ unitText : Variables.unitTextDuration
+ valid : ! vTreatmentCreate.heparinStopTimeRejectReason
+ visible : _root.heparinFeatured
- 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
- }
+ 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
+ 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
- }
+ 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
}
}
}
Index: sources/gui/qml/pages/treatment/TreatmentSection.qml
===================================================================
diff -u -r21bcf654a57e2b3a6d1a2fee1173c3dff81f8f99 -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/qml/pages/treatment/TreatmentSection.qml (.../TreatmentSection.qml) (revision 21bcf654a57e2b3a6d1a2fee1173c3dff81f8f99)
+++ sources/gui/qml/pages/treatment/TreatmentSection.qml (.../TreatmentSection.qml) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -24,6 +24,7 @@
property Item contentItem : null
property alias header : _header
property alias contentArea : _contentArea
+ property bool enableDropShadow: true
signal editClicked
signal lockClicked
@@ -50,7 +51,7 @@
contentItem: _root.contentItem
}
- layer.enabled: true
+ layer.enabled: _root.enableDropShadow
layer.effect: DropShadow {
id: _dropShadow
horizontalOffset: 3
Index: sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml
===================================================================
diff -u -rd27d1a0cd3a0dd7ac8a7dd5cf1a66ca0e038e8dd -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml (.../TreatmentSectionHeader.qml) (revision d27d1a0cd3a0dd7ac8a7dd5cf1a66ca0e038e8dd)
+++ sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml (.../TreatmentSectionHeader.qml) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -24,14 +24,15 @@
property bool editEnabled : true
property bool showLock : false
property bool showEdit : true
+ property int titleLeftMargin: Variables.defaultMargin * 2
signal editClicked
signal lockClicked
- color: Colors.treatmentSectionHeader
+ color : Colors.treatmentSectionHeader
height : Variables.contentHeight + (Variables.defaultMargin * 2)
width : parent.width
- radius: 15
+ radius : 15
anchors.top: parent.top
@@ -43,9 +44,9 @@
Text { id: _title
anchors {
- verticalCenter: parent.verticalCenter
- left : parent.left
- leftMargin : Variables.defaultMargin * 2
+ verticalCenter : parent.verticalCenter
+ left : parent.left
+ leftMargin : _root.titleLeftMargin
}
text: title
Index: sources/gui/qml/pages/treatment/TreatmentStack.qml
===================================================================
diff -u -r975e1964b60365b24c74be139c6b84369a7248ce -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 975e1964b60365b24c74be139c6b84369a7248ce)
+++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -22,6 +22,7 @@
import "qrc:/dialogs"
import "qrc:/globals"
import "qrc:/pages/treatment/adjustments"
+import "qrc:/pages/treatment/sections"
/*!
* \brief TreatmentStack is the screen
@@ -53,9 +54,23 @@
property int headerMenuIndex: _headerBar.headerMenuIndex
onHeaderMenuIndexChanged: {
- if ( _root.headerMenuIndex === 2) page(_treatmentHeparin)
- if ( _root.headerMenuIndex === 1) page(_treatmentTrends)
- if ( _root.headerMenuIndex === 0) pop(null) // unwind stack
+ switch( _headerBar.currentScreen ) {
+ case MainMenu.Treatment:
+ pop(null) // unwind stack
+ break
+ case MainMenu.Trends:
+ page(_treatmentTrends)
+ break;
+ case MainMenu.Heparin:
+ page(_treatmentHeparin)
+ break
+ case MainMenu.HDF: // TODO
+ page(_treatmentHDF)
+ break
+ default:
+ pop(null)
+ break
+ }
}
// Components
@@ -83,8 +98,10 @@
}
ScreenItem { id: _treatmentTrends } // TODO: make me!
- ScreenItem { id: _treatmentHeparin } // TODO: make me!
+ TreatmentHeparin { id: _treatmentHeparin }
+ ScreenItem { id: _treatmentHDF } // TODO: make me!
+
//// Treatment Adjustment Dialogs
TreatmentAdjustmentFlow { id: _treatmentAdjustmentFlow }
TreatmentAdjustmentPressuresLimits { id: _treatmentAdjustmentPressuresLimits }
Fisheye: Tag 93b7d7da5dea9e0392e139b59117eb0315d6c343 refers to a dead (removed) revision in file `sources/gui/qml/pages/treatment/sections/TreatmentFluid.qml'.
Fisheye: No comparison available. Pass `N' to diff?
Index: sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml
===================================================================
diff -u -r43ae56f762e6f3e1416d39e3d16f9103fc597e41 -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml (.../TreatmentHeparin.qml) (revision 43ae56f762e6f3e1416d39e3d16f9103fc597e41)
+++ sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml (.../TreatmentHeparin.qml) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -17,16 +17,17 @@
import QtQuick 2.12
// Project
-import VTreatmentHeparin 0.1;
// Qml imports
import "qrc:/globals"
import "qrc:/components"
+import "qrc:/compounds"
+import "qrc:/pages/treatment"
/*!
* \brief Treatment Screen Heparin Management section
*/
-TreatmentFluid { id: _root
+ScreenItem { id: _root
readonly property bool isOff : vTDTreatmentStates.hpOff
readonly property bool isStopped : vTDTreatmentStates.hpStopped
readonly property bool isPaused : vTDTreatmentStates.hpPaused
@@ -35,79 +36,304 @@
readonly property bool isCompleted : vTDTreatmentStates.hpCompleted
readonly property bool isEmpty : vTDTreatmentStates.hpEmpty
readonly property bool isRejected : vTreatmentAdjustmentHeparin.adjustment_Accepted
- readonly property bool displayReason : _private.displayReason
-
+// readonly property bool displayReason : _private.displayReason
readonly property bool isTxRunning : vTDTreatmentStates.txDialysis
- QtObject { id: _private
- readonly property string textHeparin : qsTr("HEPARIN DELIVERY")
- readonly property string textOff : qsTr("OFF")
- readonly property string textPause : qsTr("PAUSE HEPARIN")
- readonly property string textResume : qsTr("RESUME DELIVERY")
- readonly property string textComplete : qsTr("OFF")
- readonly property string textVolumeTarget : "(" + valueTarget + unit + ")"
- readonly property string mesgCompleted : qsTr("Maximum Cumulative Heparin Volume Delivered")
- readonly property string mesgBolus : qsTr("Bolus Active")
- readonly property string mesgEmpty : qsTr("Syringe Empty")
- readonly property string mesgOff : qsTr("") // it is redundant since the button text is now display OFF
- readonly property string mesgStopped : qsTr("Delivery Stopped")
- readonly property string mesgPaused : qsTr("Delivery Paused")
- readonly property string mesgDispensing : qsTr("Dispensing Active")
+ readonly property color heparinColor : _root.deliveryOff ? Colors.transparent :
+ isDispensing ? Colors.heparinActive :
+ isPaused ? Colors.heparinPaused :
+ isCompleted ? Colors.heparinComplete : Colors.transparent
+ readonly property bool deliveryOff : vTreatmentCreate.heparinDispensingRate === 0
+ readonly property string buttonText : isDispensing ? qsTr("Pause") :
+ isPaused ? qsTr("Resume") : qsTr("Pause")
- property bool displayReason : false
- readonly property string mesgRejectReason : vTreatmentAdjustmentHeparin.adjustment_ReasonText
+ readonly property string statusText : isDispensing ? qsTr("Active") :
+ isPaused ? qsTr("Pause") :
+ isCompleted ? qsTr("Complete") : qsTr("Active")
+
+ readonly property var titles : [ "Heparin Type", "Dispensing Rate", "Bolus Volume", "Stop Time" ]
+ readonly property var units : [ Variables.unitHeparinType, Variables.unitTextDispensingRate, Variables.unitTextDispensingRate, Variables.unitTextDuration ]
+ readonly property var values : [ "Unfractionated 1000", vTreatmentCreate.heparinDispensingRate, vTreatmentCreate.heparinBolusVolume, vTreatmentCreate.heparinStopTime ]
+
+ readonly property real cumulative : 0.23 // vTreatmentHeparin.cumulative
+ readonly property real target : 1.0 // vTreatmentHeparin.target
+ readonly property string timeRemaining : "01:39" // vTreatmentHeparin.timeRemaining
+
+
+ onHeparinColorChanged : _headerBar.statusColor = heparinColor
+
+ enum HeparinPrescription{
+ HeparinType,
+ DispensingRate,
+ BolusVolume,
+ StopTime
}
- title : qsTr("HEPARIN")
- cumulativeVisible : false
- targetVisible : false
- progressBarVisible : false
+ component HeparinContainer: TreatmentSection { id: _heparinContainer
+ color : Colors.panelBackgroundColor
+ header.color : Colors.heparinSectionHeader
+ enableDropShadow: false
+ header {
+ showEdit : false
+ titleLeftMargin: Variables.defaultMargin * 3
+ }
+ contentArea.anchors {
+ topMargin : 0
+ leftMargin : Variables.defaultMargin * 2
+ rightMargin : Variables.defaultMargin * 2
+ }
+ border {
+ width: 1
+ color: Colors.heparinPanelBorderColor
+ }
+ header.border {
+ width: 1
+ color: Colors.heparinPanelBorderColor
+ }
+ }
- hasArrow : false
- isTouchable : false
- buttonEnabled : ! (isOff || isStopped || isBolus || isEmpty
- || isCompleted // decided to not to enable user to resume the heparin while completed (1/Apr/2021 - I,Sean,Nick)
- ) && ! isSBInProgress && isTxRunning
- buttonText : ! isTxRunning ? _private.textHeparin :
- isDispensing ? _private.textPause :
- isPaused ? _private.textResume :
- isCompleted ? _private.textComplete : // decided to not to enable user to resume the heparin while completed (1/Apr/2021 - I,Sean,Nick)
- isOff ? _private.textOff :
- _private.textHeparin
- unit : Variables.unitTextSaline
+ Row { id: _row
+ objectName : "_row"
+ spacing : Variables.defaultMargin * 5
- valueDecimal : Variables.heparinPrecision
- valueDelivered : vTreatmentHeparin.cumulative // this is the cumulative volume of the Heparin bolus and despensing.
+ anchors {
+ fill : parent
+ topMargin : Variables.defaultMargin * 5
+ leftMargin : Variables.defaultMargin * 5
+ rightMargin : Variables.defaultMargin * 5
+ }
- VTreatmentHeparin { id: vTreatmentHeparin }
+ readonly property int cellWidth : width / 2 - ( spacing / 2 ) // 2 items for the row and subtract spacing for widths
+ readonly property int cellHeight : height / 2
+ readonly property int prescriptionCount : _root.titles.length
- onClicked: {
- // if ( isCompleted ) vTreatmentAdjustmentHeparin.doResume() // decided to not to enable user to resume the heparin while completed (1/Apr/2021 - I,Sean,Nick)
- if ( isPaused ) vTreatmentAdjustmentHeparin.doResume()
- if ( isDispensing ) vTreatmentAdjustmentHeparin.doPause ()
+ HeparinContainer { id: _heparinPrescription
+ objectName : "_heparinPrescription"
+ header.title : qsTr("Heparin Prescription" )
+ width : _row.cellWidth
+ height : _row.cellHeight
+
+ contentItem : Column { id :_heparinPrescriptionContent
+ Repeater {
+ model: _row.prescriptionCount
+ delegate: LabelUnitContainer {
+ width : parent.width
+ height : parent.height / _row.prescriptionCount
+ border.width : 0
+ color : Colors.transparent
+ text : _root.titles[index]
+ unitText : _root.units[index]
+ titleFontSize : Fonts.fontPixelContainerTitleSmall
+ unitFontSize : Fonts.fontPixelContainerUnitSmall
+
+ contentItem : Text{ id: _value
+ anchors.centerIn: parent
+ color : Colors.offWhite
+ font.pixelSize : Fonts.fontPixelHeparin
+ text : _root.deliveryOff ? "OFF" : index === TreatmentHeparin.DispensingRate ||
+ index === TreatmentHeparin.BolusVolume ? _root.values[index].toFixed(Variables.heparinPrecision) :
+ _root.values[index]
+ }
+ // Bottom border, except for last item
+ Rectangle { id: _separator
+ anchors {
+ left : parent.left
+ leftMargin : Variables.defaultMargin
+ right : parent.right
+ rightMargin : Variables.defaultMargin
+ bottom : parent.bottom
+ }
+ height : 1
+ color : Colors.panelBorderColor
+ visible : index < titles.length - 1 // hide for last item
+ }
+ }
+ }
+ }
+ }
+
+ HeparinContainer { id: _heparinDelivery
+ objectName : "_heparinDelivery"
+ header.title : qsTr("Heparin Delivery" )
+ width : _row.cellWidth
+ height : _row.cellHeight
+
+ contentItem : Item { id: _content
+ anchors.fill : parent
+
+ TouchRect { id: _heparinButton
+ anchors {
+ left : parent.left
+ leftMargin : Variables.defaultMargin
+ bottom : parent.bottom
+ bottomMargin : Variables.defaultMargin * 1.5
+ }
+
+ width : Variables.defaultButtonWidth
+ height : Variables.defaultButtonHeight
+ radius : 9
+ text.textFormat : Text.RichText
+ text.text : _root.buttonText
+ isDefault : true
+ visible : ! _root.deliveryOff && ( _root.isDispensing || _root.isPaused )
+ text.font.weight: Font.DemiBold
+
+ onPressed : {
+ if ( _root.isPaused ) vTreatmentAdjustmentHeparin.doResume()
+ if ( _root.isDispensing ) vTreatmentAdjustmentHeparin.doPause ()
+ }
+ }
+
+ Rectangle { id: _status
+ anchors {
+ top : parent.top
+ topMargin : Variables.defaultMargin * 1.5
+ right : parent.right
+ }
+ visible : ! _root.deliveryOff && ( _root.isDispensing || _root.isPaused || _root.isCompleted )
+ width : 100
+ height : 30
+ radius : height
+ color : _root.heparinColor
+ Text { id: _statusText
+ anchors.centerIn: parent
+ text : _root.statusText
+ color : Colors.white
+ font.pixelSize : Fonts.fontPixelContainerUnitSmall
+ font.weight : Font.DemiBold
+ }
+ }
+
+ Item {
+ anchors {
+ top : parent.top
+ topMargin : Variables.defaultMargin * 1.5
+ left : parent.left
+ leftMargin : Variables.defaultMargin
+ }
+
+ Text { id: _timeRemainingTitle
+ anchors {
+ top : parent.top
+ left : parent.left
+ }
+ text : qsTr("Time Remaining")
+ color : Colors.white
+ font.pixelSize : Fonts.fontPixelHeparin
+ font.weight : Font.Medium
+ }
+
+ Text { id: _timeRemaining
+ anchors {
+ top : _timeRemainingTitle.bottom
+ topMargin : _root.deliveryOff ? Variables.defaultMargin : Variables.defaultMargin / 2
+ left : parent.left
+ }
+ text : _root.deliveryOff ? ("%1 : %2").arg(Variables.emptyEntry).arg(Variables.emptyEntry) : _root.timeRemaining
+ color : _root.deliveryOff ? Colors.white : _root.isPaused ? Colors.heparinPaused : Colors.white
+ font.pixelSize : _root.deliveryOff ? Fonts.fontPixelHeparin : Fonts.fontPixelHeparinTime
+ font.weight : Font.DemiBold
+ }
+
+ Text { id: _hrsMinsText
+ anchors {
+ top : _timeRemaining.bottom
+ left : parent.left
+ leftMargin : 5
+ }
+ width : _timeRemaining.contentWidth / 2
+ text : Variables.unitTextHrs
+ color : Colors.white
+ font.pixelSize : Fonts.fontPixelContainerUnit
+ font.weight : Font.Thin
+ }
+
+ Text { id: _hrsMinsText1
+ anchors {
+ top : _timeRemaining.bottom
+ left : _hrsMinsText.right
+ leftMargin : 5
+ }
+ width : _timeRemaining.contentWidth / 2
+ text : Variables.unitTextMins
+ color : Colors.white
+ font.pixelSize : Fonts.fontPixelContainerUnit
+ font.weight : Font.Thin
+ }
+ }
+
+ Column { id: _deliveryColumn
+ anchors {
+ right: parent.right
+ top : parent.top
+ }
+ topPadding : Variables.defaultMargin * 9.5
+ width : parent.width * 0.7
+ height : _content.height * 0.7
+
+ ProgressBar { id: _progressbar
+ width : parent.width
+ height : 20
+ decimal : Variables.heparinDeliveryPrecision
+ minimum : 0
+ maximum : _root.deliveryOff ? 0 : _root.target
+ value : _root.deliveryOff ? 0 : _root.cumulative
+ unitText : Variables.unitTextFluid
+ color : _root.isPaused ? Colors.heparinPaused : Colors.progressBarUltrafiltration
+ radius : height
+ showMarker : false
+ progress.opacity: _root.isPaused ? 0.5 : 1
+
+ minText.color: "#818181"
+ minText.font {
+ pixelSize : 18
+ weight : Font.Normal
+ }
+
+ maxText.color: "#818181"
+ maxText.font {
+ pixelSize : 18
+ weight : Font.Normal
+ }
+
+ Text { id: _valueText
+ anchors {
+ bottom : parent.top
+ bottomMargin: Variables.defaultMargin
+ right : parent.right
+ }
+ text : ("%1 %2").arg(_root.deliveryOff ? Variables.emptyEntry :
+ _root.cumulative.toFixed(Variables.heparinDeliveryPrecision)).arg(qsTr(Variables.unitTextFluid))
+ color : _root.deliveryOff ? Colors.white : _root.isPaused ? Colors.heparinPaused : Colors.white
+ font.pixelSize : Fonts.fontPixelHeparin
+ font.weight : Font.DemiBold
+ }
+
+ Text { id: _heparinDeliveredText
+ anchors {
+ top : parent.bottom
+ topMargin : Variables.defaultMargin * 2.5
+ right : parent.right
+ }
+ text : qsTr("Heparin Delivered")
+ color : Colors.textTextRectLabel
+ font.pixelSize : 20
+ font.weight : Font.Medium
+ }
+ }
+ }
+ }
+ }
}
Connections { target: vTreatmentAdjustmentHeparin
function onAdjustmentTriggered ( vValue ) {
- _private.displayReason = ! vTreatmentAdjustmentHeparin.adjustment_Accepted
+// _private.displayReason = ! vTreatmentAdjustmentHeparin.adjustment_Accepted
}
}
Connections { target: vTDTreatmentStates
function onHeparinChanged ( vValue ) {
- _private.displayReason = false
+// _private.displayReason = false
}
-
}
-
- notification {
- visible : true
- text : displayReason ? _private.mesgRejectReason :
- isBolus ? _private.mesgBolus :
- isOff ? _private.mesgOff :
- isStopped ? _private.mesgStopped :
- isPaused ? _private.mesgPaused :
- isCompleted ? _private.mesgCompleted :
- isEmpty ? _private.mesgEmpty :
- isDispensing ? _private.mesgDispensing : ""
- }
}
Index: sources/model/hd/data/treatment/MTreatmentHeparinData.h
===================================================================
diff -u -ra58f91b077c8131bea3dbde0fc338adb113fc9f3 -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/model/hd/data/treatment/MTreatmentHeparinData.h (.../MTreatmentHeparinData.h) (revision a58f91b077c8131bea3dbde0fc338adb113fc9f3)
+++ sources/model/hd/data/treatment/MTreatmentHeparinData.h (.../MTreatmentHeparinData.h) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -36,8 +36,9 @@
*
* | Payload ||
* | ||
- * | #1:(F32) | \ref Data::mCumulative |
- * | #2:(F32) | \ref Data::mTarget |
+ * | #1:(F32) | \ref Data::mCumulative |
+ * | #2:(F32) | \ref Data::mTarget |
+ * | #2:(F32) | \ref Data::mTimeRemaining |
*
* \sa Data
* \sa MAdjustHeparinReq : Heparin Request
@@ -59,8 +60,9 @@
QVariantList parameters() const override;
struct {
- Types::F32 mCumulative ;
- Types::F32 mTarget ;
+ Types::F32 mCumulative ;
+ Types::F32 mTarget ;
+ Types::F32 mTimeRemaining ;
} _data;
public:
@@ -70,8 +72,9 @@
QString infoText() const override { return QString("Heparin") ; }
struct Data {
- float mCumulative = 0; ///< Cumulative volume of all Heparin deliveries during current treatment
- float mTarget = 0; ///< Target volume of all Heparin deliveries during current treatment
+ float mCumulative = 0; ///< Cumulative volume of all Heparin deliveries during current treatment
+ float mTarget = 0; ///< Target volume of all Heparin deliveries during current treatment
+ float mTimeRemaining = 0; ///< Time remaining heparing time remaining
};
public:
Index: sources/view/hd/data/treatment/VTreatmentHeparinData.cpp
===================================================================
diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/view/hd/data/treatment/VTreatmentHeparinData.cpp (.../VTreatmentHeparinData.cpp) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1)
+++ sources/view/hd/data/treatment/VTreatmentHeparinData.cpp (.../VTreatmentHeparinData.cpp) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -21,6 +21,7 @@
void VTreatmentHeparin::onActionReceive(const TreatmentHeparinData &vData)
{
- cumulative (vData.mCumulative);
- target (vData.mTarget );
+ cumulative (vData.mCumulative );
+ target (vData.mTarget );
+ timeRemaining (vData.mTimeRemaining );
}
Index: sources/view/hd/data/treatment/VTreatmentHeparinData.h
===================================================================
diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r93b7d7da5dea9e0392e139b59117eb0315d6c343
--- sources/view/hd/data/treatment/VTreatmentHeparinData.h (.../VTreatmentHeparinData.h) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1)
+++ sources/view/hd/data/treatment/VTreatmentHeparinData.h (.../VTreatmentHeparinData.h) (revision 93b7d7da5dea9e0392e139b59117eb0315d6c343)
@@ -36,9 +36,11 @@
{
Q_OBJECT
- PROPERTY( float , cumulative , 0)
- PROPERTY( float , target , 0)
+ PROPERTY( float , cumulative , 0)
+ PROPERTY( float , target , 0)
+ PROPERTY( float , timeRemaining , 0)
+
VIEW_DEC(VTreatmentHeparin, TreatmentHeparinData)
};
}