Index: sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml =================================================================== diff -u -r04fd28f30e37a09450ff5877ae2f805a92898b44 -r3365ef23a278ef93f2bf6ff10b5637ad4f1b9d83 --- sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision 04fd28f30e37a09450ff5877ae2f805a92898b44) +++ sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision 3365ef23a278ef93f2bf6ff10b5637ad4f1b9d83) @@ -16,7 +16,6 @@ // Qt import QtQuick 2.12 - // Project // Qml imports import "qrc:/globals" @@ -28,98 +27,390 @@ * \brief the post treatment Treatment Log review screen */ PostTreatmentBase { id: _root - signal itemClicked(int vIndex) + property int colSpacing : Variables.defaultMargin + property int columnWidth: ( _flickable.width / 2 ) - (colSpacing) - readonly property alias itemsText : _parametersGrid.itemsText - readonly property alias itemsValue: _parametersGrid.itemsValue - readonly property alias itemsUnit : _parametersGrid.itemsUnit + Row { id: _topRow + spacing : Variables.defaultMargin + height : 75 - ScrollBar { - anchors.fill: _flickable - flickable : _flickable - backColor : Colors.backgroundDialog - } + anchors { + top : header.bottom + topMargin : Variables.defaultMargin / 2 + left : parent.left + leftMargin : Variables.defaultMargin * 4 + right : parent.right + rightMargin : Variables.defaultMargin * 4 + } - Label { id: _txCode - property string empty : "..." - property string txCode : vPostTreatmentAdjustmentTreatmentLog.txCode - Timer { id: _waitTxCodeTimer - property int count: 0 - interval: 1000 - repeat : true - running : _txCode.visible && ! _txCode.txCode - onTriggered: { - _txCode.empty = ".".repeat( count ++ ) - if ( count == 4 ) count = 0 + Item { id: _legend + width: _root.columnWidth + height: _topRow.height + + LegendItem { id: _prescribed + anchors { + right : _actual.left + rightMargin : Variables.defaultMargin + bottom : parent.bottom + } + text : qsTr("Prescribed Values") } + + LegendItem { id: _actual + anchors { + right : parent.right + bottom : parent.bottom + } + text : qsTr("Actual Values") + color : Colors.ufVolumeGoalText + } } - anchors.bottom : _flickable.top - anchors.left : _flickable.left - width : _flickable.width - text : qsTr("Code: ") + ( txCode ? txCode : empty ) - font.pixelSize : Fonts.fontPixelButton - } - QRCode { id: _qrCode - // removed for the P1 release, since the code had a big change and cannot be removed entirely - // added for the P1B release - visible : true - anchors.bottom : _flickable.top - anchors.right : _flickable.right - anchors.margins : 15 - qrcode : vPostTreatmentAdjustmentTreatmentLog.txCode - clear : ! _root.visible + Item { id: _qrContainer + width: _root.columnWidth + height: _topRow.height + + QRCode { id: _qrCode + anchors { + left: parent.left + } + + qrcode : vPostTreatmentAdjustmentTreatmentLog.txCode + clear : ! _root.visible + } + + Text { id: _txCodeText + anchors { + left : _qrCode.right + leftMargin : Variables.defaultMargin / 2 + bottom : _qrCode.bottom + } + text : vPostTreatmentAdjustmentTreatmentLog.txCode ? qsTr("Tx Code: ") + vPostTreatmentAdjustmentTreatmentLog.txCode : " " + color : "#DBE9FA" + font.pixelSize : Fonts.fontPixelButton + } + } } Flickable { id: _flickable - clip: true anchors { - top : _root.title.bottom - topMargin : Variables.minVGap * 2 // * 2 : it was too close to title and also better with rows not half cut. + top : _topRow.bottom + topMargin : Variables.defaultMargin bottom : _root.bottom bottomMargin : Variables.notificationHeight + Variables.minVGap - horizontalCenter: parent.horizontalCenter + left : parent.left + leftMargin : Variables.defaultMargin * 4 + right : parent.right + rightMargin : Variables.defaultMargin * 4 + } - width : parent.width - Variables.minVGap2 * 2 // * 2 : for each side - contentWidth : width - contentHeight: _parametersGrid.height - TouchGrid { id: _parametersGrid - // TODO: fixed only for this list since it has been used other places. - // investigate more to move these readonly properties in the TouchGrid component. - readonly property int _itemCount: vPostTreatmentAdjustmentTreatmentLog.parametersTitle.length - readonly property int _colCount : 2 - readonly property int _rowCount : Math.ceil( _itemCount / _colCount ) + contentWidth : width + contentHeight : _row.height + clip : true - height : _rowCount * ( rowSpacing + itemHeight ) + itemHeight - width : parent.width - colCount : _colCount - rowCount : _rowCount - itemWidth : 575 - rowSpacing : 0 - colSpacing : 50 - lineColor : Colors.backgroundMain - itemsText : vPostTreatmentAdjustmentTreatmentLog.parametersTitle - itemsValue : vPostTreatmentAdjustmentTreatmentLog.parametersText - itemsUnit : vPostTreatmentAdjustmentTreatmentLog.parametersUnit - itemsValueLeftMargin : 350 // if decreased may be covered by title - itemsUnitLeftMargin : 470 // if increased will be covered by chevron if touchable - // Note: to make the item touchable - // set the touchable: true - // and set the index ot the touchable item in the itemsTouchable: [] list to 1 - // like displayed below. - touchable : false - // itemsTouchable : [ - // 0,0,0,0,0,0,0,0,0,0, - // 0,0,0,0,0,0,0,0,0,0, - // 0,0,0,0,0,0,0,0,0,0, - // 0,0,0,0,0,0,0,0,0,0, - // ] - onItemClicked: _root.itemClicked(vIndex) + Row { id: _row + width : _flickable.width + spacing : Variables.defaultMargin + + Column { id: _leftColumn + width : _root.columnWidth + spacing : _root.colSpacing + + ReviewContainer { id: _patientInfo + title : qsTr("Patient Information") + width : parent.width + + label : [ qsTr("Patient ID") , + qsTr("Secondary Patient ID")] + + initial : [ vPostTreatmentAdjustmentTreatmentLog.patientID , + vPostTreatmentAdjustmentTreatmentLog.secondaryPatientID ] + + actual : [ "" , "" ] + units : [ "" , "" ] + } + + ReviewContainer { id: _bloodFlowDiaysate + title : qsTr("Blood Flow Rate and Dialysate Settings") + width : parent.width + label : [ qsTr("Blood Flow Rate") , + qsTr("Dialysis Flow Rate") , + qsTr("Dialyzer Type") , + qsTr("Dialysate Temperature") , + qsTr("Dialysate Volume Used") ] + + initial : [ vPostTreatmentAdjustmentTreatmentLog.bloodFlowRate , + vPostTreatmentAdjustmentTreatmentLog.dialysateFlowRate , + vTreatmentRanges.dialyzerTypeOptions[vPostTreatmentAdjustmentTreatmentLog.dialyzerType] , + vPostTreatmentAdjustmentTreatmentLog.dialysateTemperature , + vPostTreatmentAdjustmentTreatmentLog.dialysateVolumeUsed ] + + actual : [ vPostTreatmentAdjustmentTreatmentLog.bloodFlowRateActual , + vPostTreatmentAdjustmentTreatmentLog.dialysateFlowRateActual , + "" , // leave empty + vPostTreatmentAdjustmentTreatmentLog.dialysateTemperatureActual , + "" ] // leave empty + + units : [ Variables.unitTextFlowRate , + Variables.unitTextFlowRate , + "" , + Variables.unitTextTemperature , + Variables.unitVolume ] + + precision : [ 0, + 0, + 0, + Variables.dialysateTempPrecision, + Variables.ultrafiltrationPrecision ] + } + + ReviewContainer { id: _concentrateSettings + title : qsTr("Concentrate Settings") + width : parent.width + label : [ qsTr("Acid Concentrate Type") , + qsTr("Bicarbonate Cartridge Size") , + qsTr("Potassium Concentration") , + qsTr("Calcium Concentration") , + qsTr("Bicarbonate Concentration") , + qsTr("Sodium Concentration") ] + + initial : [ vTreatmentRanges.acidConcentrateOptions[vPostTreatmentAdjustmentTreatmentLog.acidConcentrateType] , + vTreatmentRanges.dryBicabCartridgeSizeOptions[vPostTreatmentAdjustmentTreatmentLog.bicarbonateCartridgeSize] , + vPostTreatmentAdjustmentTreatmentLog.potassiumConcentration , + vPostTreatmentAdjustmentTreatmentLog.calciumConcentration , + vPostTreatmentAdjustmentTreatmentLog.bicarbonateConcentration , + vPostTreatmentAdjustmentTreatmentLog.sodiumConcentration ] + + actual : [ vTreatmentRanges.acidConcentrateOptions[vPostTreatmentAdjustmentTreatmentLog.acidConcentrateTypeActual] , + vTreatmentRanges.dryBicabCartridgeSizeOptions[vPostTreatmentAdjustmentTreatmentLog.bicarbonateCartridgeSizeActual] , + vPostTreatmentAdjustmentTreatmentLog.potassiumConcentrationActual , + vPostTreatmentAdjustmentTreatmentLog.calciumConcentrationActual , + vPostTreatmentAdjustmentTreatmentLog.bicarbonateConcentrationActual , + vPostTreatmentAdjustmentTreatmentLog.sodiumConcentrationActual ] + + units : [ "" , + "" , + Variables.unitTextConcentration , + Variables.unitTextConcentration , + Variables.unitTextConcentration , + Variables.unitTextConcentration ] + } + + ReviewContainer { id: _vitalsFluidBolus + title : qsTr("Vitals and Fluid Bolus") + width : parent.width + + label : [ qsTr("Vitals Interval") , + qsTr("Fluid Bolus Volume") ] + + initial : [ vPostTreatmentAdjustmentTreatmentLog.vitalsInterval , + vPostTreatmentAdjustmentTreatmentLog.fluidBolusVolume ] + + actual : [ vPostTreatmentAdjustmentTreatmentLog.vitalsIntervalActual , + vPostTreatmentAdjustmentTreatmentLog.fluidBolusVolumeActual ] + + units : [ Variables.unitTextMins , + Variables.unitTextFluid ] + } + + ReviewContainer { id: _heparin + title : qsTr("Heparin") + width : parent.width + + label : [ qsTr("Heparin Type") , + qsTr("Heparin Bolus Volume") , + qsTr("Heparin Delivery Rate") , + qsTr("Heparin Delivered Volume") , + qsTr("Heparin Delivery Durraion") ] + + initial : [ vTreatmentRanges.heparinTypeOptions[vPostTreatmentAdjustmentTreatmentLog.heparinType] , + vPostTreatmentAdjustmentTreatmentLog.heparinBolusVolume , + vPostTreatmentAdjustmentTreatmentLog.heparinDispenseRate , + vPostTreatmentAdjustmentTreatmentLog.heparinDeliveredVolume , + vPostTreatmentAdjustmentTreatmentLog.heparinDeliveryDuration ] + + actual : [ "" , + vPostTreatmentAdjustmentTreatmentLog.heparinBolusVolumeActual , + vPostTreatmentAdjustmentTreatmentLog.heparinDispenseRateActual , + "" , + vPostTreatmentAdjustmentTreatmentLog.heparinDeliveryDurationActual ] + + units : [ Variables.unitHeparinType , + Variables.unitTextFluid , + Variables.unitTextDispensingRate, + Variables.unitTextFluid , + Variables.unitTextMins ] + + precision : [ 0 , + Variables.heparinPrecision , + Variables.heparinPrecision , + Variables.heparinPrecision , + 0 ] + } + } + + Column { id: _rightColumn + width : _root.columnWidth + spacing : _root.colSpacing + + ReviewContainer { id: _treatmentDateTime + title : qsTr("Treatment Date and Time") + width : parent.width + + label : [ qsTr("Treatment Start Date, Time") , + qsTr("Treatment End Date, Time") ] + + initial : [ Qt.formatDateTime(new Date(vPostTreatmentAdjustmentTreatmentLog.treatmentStartEpoch), "yyyy/MM/dd, HH:mm") , + Qt.formatDateTime(new Date(vPostTreatmentAdjustmentTreatmentLog.treatmentEndEpoch) , "yyyy/MM/dd, HH:mm") ] + + actual : [ "" , "" ] + units : [ "" , ""] + } + + ReviewContainer { id: _treatmentInformation + title : qsTr("Treatment Information") + width : parent.width + + label : [ qsTr("Treatment Modality") , + qsTr("HDF Operating Mode") , + qsTr("Duration") ] + + initial : [ vTreatmentRanges.treatmentModalityOptions[vPostTreatmentAdjustmentTreatmentLog.treatmentModality] , + vTreatmentRanges.hdfTreatmentModeOptions[vPostTreatmentAdjustmentTreatmentLog.hDFOperatingMode ] , + vPostTreatmentAdjustmentTreatmentLog.treatmentDuration ] + + actual : [ vTreatmentRanges.treatmentModalityOptions[vPostTreatmentAdjustmentTreatmentLog.treatmentModalityActual] , + vTreatmentRanges.hdfTreatmentModeOptions[vPostTreatmentAdjustmentTreatmentLog.hDFOperatingModeActual ] , + vPostTreatmentAdjustmentTreatmentLog.treatmentDurationActual ] + + units : [ "" , "" , Variables.unitTextMins ] + } + + ReviewContainer { id: _ultrafiltration + title : qsTr("Ultrafiltration") + width : parent.width + + label : [ qsTr("Prescribed Ultrafiltration Volume") , + qsTr("Final Target Ultrafiltration Volume") , + qsTr("Prescribed Ultrafiltration Rate") , + qsTr("Final Target Ultrafiltration Rate") ] + + initial : [ vPostTreatmentAdjustmentTreatmentLog.uFVolume , + vPostTreatmentAdjustmentTreatmentLog.uFVolumeTarget , + vPostTreatmentAdjustmentTreatmentLog.uFRate , + vPostTreatmentAdjustmentTreatmentLog.uFRateTarget ] + + actual : [ vPostTreatmentAdjustmentTreatmentLog.uFVolumeActual , + "" , + vPostTreatmentAdjustmentTreatmentLog.uFRateActual , + "" ] + + units : [ Variables.unitVolume , + Variables.unitVolume , + Variables.unitTextRate , + Variables.unitTextRate ] + + precision : [ Variables.ultrafiltrationPrecision , + Variables.ultrafiltrationPrecision , + Variables.ultrafiltrationPrecision , + Variables.ultrafiltrationPrecision ] + } + + ReviewContainer { id: _substitutionFluid + title : qsTr("Substitution Fluid") + width : parent.width + + label : [ qsTr("Prescribed Substitution Fluid Volume") , + qsTr("Final Target Substitution Fluid Volume") , + qsTr("Prescribed Substitution Fluid Rate") , + qsTr("Final Target Substitution Fluid Rate") ] + + initial : [ vPostTreatmentAdjustmentTreatmentLog.substitutionVolume , + vPostTreatmentAdjustmentTreatmentLog.substitutionVolumeTarget , + vPostTreatmentAdjustmentTreatmentLog.substitutionRate , + vPostTreatmentAdjustmentTreatmentLog.substitutionRateTarget ] + + actual : [ vPostTreatmentAdjustmentTreatmentLog.substitutionVolumeActual , + "" , + vPostTreatmentAdjustmentTreatmentLog.substitutionRateActual , + "" ] + + units : [ Variables.unitVolume , + Variables.unitVolume , + Variables.unitTextFlowRate , + Variables.unitTextFlowRate ] + + precision : [ Variables.substitutionPrecision , + Variables.substitutionPrecision , + Variables.substitutionPrecision , + Variables.substitutionPrecision ] + } + + ReviewContainer { id: _isolatedUltrafiltration + title : qsTr("Isolated Ultrafiltration") + width : parent.width + + label : [ qsTr("Prescribed Isolated Ultrafiltration Volume") , + qsTr("Final Target Isolated Ultrafiltration Volume") , + qsTr("Prescribed Isolated Ultrafiltration Rate") , + qsTr("Final Target Isolated Ultrafiltration Rate") ] + + initial : [ vPostTreatmentAdjustmentTreatmentLog.isoUfVolume , + vPostTreatmentAdjustmentTreatmentLog.isoUfVolumeTarget , + vPostTreatmentAdjustmentTreatmentLog.isoUfRate , + vPostTreatmentAdjustmentTreatmentLog.isoUfRateTarget ] + + actual : [ vPostTreatmentAdjustmentTreatmentLog.isoUfVolumeActual , + "" , + vPostTreatmentAdjustmentTreatmentLog.isoUfRateActual , + "" ] + + units : [ Variables.unitVolume , + Variables.unitVolume , + Variables.unitTextRate , + Variables.unitTextRate ] + + precision : [ Variables.ultrafiltrationPrecision , + Variables.ultrafiltrationPrecision , + Variables.ultrafiltrationPrecision , + Variables.ultrafiltrationPrecision ] + } + + ReviewContainer { id: _additionalSettings + title : qsTr("Additional Settings") + width : parent.width + + label : [ qsTr("Water Sample Test Result") , + qsTr("Hepatitis B") ] + + initial : [ vPostTreatmentAdjustmentTreatmentLog.waterSampleTestResult , + vTreatmentRanges.hepatitisStatus[vPostTreatmentAdjustmentTreatmentLog.hepatitisStatus] ] + + actual : [ "" , "" ] + + units : [ Variables.unitTextChlorine , + Variables.unitHepatitis ] + + precision : [ Variables.waterSamplePrecision , + 0 ] + } + } } } + + ScrollBar { + flickable : _flickable + anchors { + top : _root.top + topMargin : Variables.defaultMargin * 6 + bottom : _root.bottom + bottomMargin : Variables.notificationHeight + Variables.minVGap + right : _root.right + } + } + reasonText : vPostTreatmentAdjustmentTreatmentLog.text() informationText : vPostTreatmentAdjustmentTreatmentLog.notification } -