Index: denali.pro.user =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 --- denali.pro.user (.../denali.pro.user) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ denali.pro.user (.../denali.pro.user) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) @@ -1,6 +1,6 @@ - + EnvironmentId Index: denali.qrc =================================================================== diff -u -r4afc91856c00e01dfb5d84bc54d2d92faefec0db -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 --- denali.qrc (.../denali.qrc) (revision 4afc91856c00e01dfb5d84bc54d2d92faefec0db) +++ denali.qrc (.../denali.qrc) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) @@ -198,5 +198,6 @@ sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml + sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml Index: en_US.udic =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 --- en_US.udic (.../en_US.udic) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ en_US.udic (.../en_US.udic) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) @@ -81,3 +81,4 @@ backend TPAR HDOp +DeviceID Index: sources/gui/qml/components/TouchRect.qml =================================================================== diff -u -rf7392d985121b21e9f9814e444b0810cd1d00b18 -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 --- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision f7392d985121b21e9f9814e444b0810cd1d00b18) +++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) @@ -26,11 +26,16 @@ */ Rectangle { id : _root property alias text : _text + property alias pixelSize : _text.font.pixelSize + property alias fgColor : _text.color + property alias bgColor : _root.color + property bool touchable : true property bool animated : true property bool isDefault : false property bool selectable : false property bool selected : false + readonly property alias isPressed : _mouseArea.pressed property color textColor : Colors.textButton @@ -93,6 +98,7 @@ } MouseArea { id: _mouseArea + enabled : _root.touchable anchors.fill : parent anchors.margins : touchExpanding * -1 onClicked : _root.clicked() Index: sources/gui/qml/compounds/TouchGrid.qml =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 --- sources/gui/qml/compounds/TouchGrid.qml (.../TouchGrid.qml) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ sources/gui/qml/compounds/TouchGrid.qml (.../TouchGrid.qml) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) @@ -26,21 +26,34 @@ Item { id: _root objectName: "_TouchGrid" - property var itemsText : [] - property var itemsEnabled : [] - property int itemWidth : 350 - property int itemHeight : 50 - property alias layoutOrder : _grid.flow + property var itemsText : [] + property var itemsValue : [] + property var itemsUnit : [] - property bool hasImage : true - property bool hasLine : true - readonly property int rowCount : 5 // rowCount should be readonly because it depends on the available space on the screen - readonly property int colCount : itemsText.length > rowCount ? Math.ceil(itemsText.length / rowCount) : 1 + property var itemsEnabled : [] + property var itemsHasImage : [] + property var itemsHasLine : [] + property var itemsTouchable : [] + + property int itemWidth : 350 + property int itemHeight : 50 + property alias layoutOrder : _grid.flow + property alias rowSpacing : _grid.rowSpacing + property alias columnSpacing : _grid.columnSpacing + property color lineColor : Colors.borderButtonHalfDarker + property real lineThickness : 1.5 + property real itemsValueLeftMargin : itemWidth / 2 + property real itemsUnitLeftMargin : itemWidth / 4 + + property int rowCount : Math.floor( _root.height / itemHeight ) + property int colCount : itemsText.length > rowCount ? Math.ceil(itemsText.length / rowCount) : 1 readonly property int titleTopMargin: 110 signal itemClicked(int vIndex) + height: parent.height + Grid { id: _grid flow: Grid.TopToBottom anchors.centerIn: _root @@ -51,33 +64,49 @@ Repeater { model : _root.itemsText TouchRect { id: _touchItem + clip : true + touchable : _root.itemsTouchable[index] !== undefined ? _root.itemsTouchable[index] : true text.anchors.horizontalCenter: undefined - text.leftPadding: 15 - + text.leftPadding: Variables.minVGap text.text : modelData border.width: 0 height : _root.itemHeight width : _root.itemWidth radius : 5 enabled : _root.itemsEnabled[index] !== undefined ? _root.itemsEnabled[index] : true onClicked : _root.itemClicked(index) - - Image { - visible : _root.hasImage && _touchItem.enabled && ! _touchItem.isPressed && _root.itemsText[index] + Image { id: _image + visible : _touchItem.touchable && ( _root.itemsHasImage[index] !== undefined ? _root.itemsHasImage[index] : true ) && _touchItem.enabled && ! _touchItem.isPressed && _root.itemsText[index] anchors.right : _touchItem.right anchors.verticalCenter : _touchItem.verticalCenter width : Variables.arrowWidth height : Variables.arrowHeight source : "qrc:/images/iArrowRight" } - - Line { - visible : hasLine && ! _touchItem.isPressed && _root.itemsText[index] - color : _touchItem.enabled ? Colors.borderButtonHalfDarker : Colors.borderDisableButton + Line { id: _line + visible : /*_touchItem.enabled &&*/ ( _root.itemsHasLine[index] !== undefined ? _root.itemsHasLine[index] : true ) && ! _touchItem.isPressed && _root.itemsText[index] + thickness : _root.lineThickness + color : _touchItem.enabled ? _root.lineColor : Colors.borderDisableButton anchors.left : _touchItem.left anchors.right : _touchItem.right anchors.bottom : _touchItem.bottom } + Text { id : _itemsValue + text : _root.itemsValue[index] !== undefined ? _root.itemsValue[index] : "" + font.pixelSize : _touchItem.pixelSize + color : _touchItem.fgColor + anchors.left: parent.left + anchors.leftMargin: _root.itemsValueLeftMargin + anchors.verticalCenter: _touchItem.verticalCenter + } + Text { id : _itemsUnit + text : _root.itemsUnit[index] !== undefined ? _root.itemsUnit[index] : "" + font.pixelSize : _touchItem.pixelSize + color : _touchItem.fgColor + anchors.left: parent.left + anchors.leftMargin: _root.itemsUnitLeftMargin + anchors.verticalCenter: _touchItem.verticalCenter + } } } } Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) @@ -218,7 +218,7 @@ // Units // - Ultrafiltration readonly property string unitTextUltrafiltrationRate : unitTextFlowRate - readonly property string unitTextUltrafiltrationVolume : qsTr("(L)") + readonly property string unitTextUltrafiltrationVolume : unitTextVolume // - Duration/Interval readonly property string unitTextDuration : qsTr("min") // - Flows @@ -228,9 +228,14 @@ readonly property string unitTextBloodPressure : qsTr("mmHg") readonly property string unitTextHeartBeat : qsTr("BPM" ) // - Fluid - readonly property string unitTextFluid : qsTr("mL") - readonly property string unitTextSaline : unitTextFluid - readonly property string unitTextHeparin : unitTextFluid + readonly property string unitTextVolume : qsTr("(L)") + readonly property string unitTextFluid : qsTr("mL") + readonly property string unitTextSaline : unitTextFluid + readonly property string unitTextHeparin : unitTextFluid // - Temperature - readonly property string unitTextTemperature : qsTr("°C") + readonly property string unitTextTemperature : qsTr("°C") + // Concentration + readonly property string unitTextConcentration : qsTr("mEg/L") + readonly property string unitTextHeparinConcentration : qsTr("IU/mL") + } Index: sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml =================================================================== diff -u --- sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (revision 0) +++ sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) @@ -0,0 +1,119 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file PostTreatmentMainStack.qml + * \author (last) Behrouz NematiPour + * \date (last) 20-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Apr-2021 + * + */ + +// Qt +import QtQuick 2.12 + + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/compounds" +import "qrc:/pages/posttreatment" + +/*! + * \brief the post treatment Treatment Log review screen + */ +PostTreatmentBase { id: _root + signal itemClicked(int vIndex) + + Rectangle { id: _backgroug + clip: true + anchors.fill: _flickable + color : Colors.backgroundDialog + radius : 5 + Rectangle { id: _scrollbar + anchors.right: parent.right + width : 5 + radius : width + y : _flickable.height * _flickable.visibleArea.yPosition + height : _flickable.height * _flickable.visibleArea.heightRatio + color : "#80696969" // half transparent dimgray + } + } + + Flickable { id: _flickable + clip: true + anchors { + top : _root.title.bottom + topMargin : Variables.minVGap + bottom : _root.bottom + bottomMargin : Variables.notificationHeight + Variables.minVGap + horizontalCenter: parent.horizontalCenter + } + width : parent.width - Variables.minVGap * 2 + contentWidth : width + contentHeight: _parametersGrid.height + + TouchGrid { id: _parametersGrid + height : rowCount * ( rowSpacing + itemHeight ) + itemHeight + width : parent.width + colCount : 2 + rowCount : 17 + itemWidth : 575 + rowSpacing : 7 + columnSpacing : 50 + lineColor : Colors.backgroundMain + itemsText : vPostTreatmentAdjustmentTreatmentLog.parametersTitle + itemsValue : vPostTreatmentAdjustmentTreatmentLog.parametersText + itemsUnit : [ + Variables.unitTextFlowRate , + Variables.unitTextFlowRate , + Variables.unitTextDuration , + Variables.unitTextDuration , + "" , + "" , + Variables.unitTextConcentration , + Variables.unitTextConcentration , + Variables.unitTextConcentration , + Variables.unitTextConcentration , + Variables.unitTextTemperature , + "" , + "" , + Variables.unitTextFlowRate , + Variables.unitTextFlowRate , + Variables.unitTextVolume , + Variables.unitTextTemperature , + Variables.unitTextVolume , + Variables.unitTextVolume , + Variables.unitTextFlowRate , + Variables.unitTextFlowRate , + Variables.unitTextFluid , + "" , + Variables.unitTextHeparinConcentration , + Variables.unitTextFluid , + Variables.unitTextDispencingRate , + Variables.unitTextDuration , + Variables.unitTextFluid , + Variables.unitTextBloodPressure , + Variables.unitTextBloodPressure , + "" , + "" , + "" + ] + itemsValueLeftMargin : 350 + itemsUnitLeftMargin : 495 + + itemsTouchable : [ + 0,0,0,0,1,0,0,0,0,0, + 1,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) + } + } +} Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -rc71946746586d5a4061ad866ce7dbbaf74b9798a -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision c71946746586d5a4061ad866ce7dbbaf74b9798a) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) @@ -20,6 +20,7 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/compounds" import "qrc:/pages/posttreatment" /*! * \brief the post treatment prime stack screen @@ -32,6 +33,7 @@ signal patientDisconnectionConfirm () signal treatmentReviewConfirm () signal disposablesRemovalConfirm () + signal disposablesRemovalBack () PostTreatmentBase { id: _patientDisconnectionConfirm property int stackStepIndex : 0 @@ -41,7 +43,7 @@ onConfirmClicked : _root.patientDisconnectionConfirm() } - PostTreatmentBase { id: _treatmentReviewConfirm + PostTreatmentReview { id: _treatmentReviewConfirm property int stackStepIndex : 1 header.confirmVisible : true title.text : qsTr("Treatment Review") @@ -51,10 +53,12 @@ PostTreatmentBase { id: _disposablesRemovalConfirm property int stackStepIndex : 2 + header. backVisible : true header.confirmVisible : true title.text : qsTr("Disposables Removal") instructionBased : true onConfirmClicked : _root.disposablesRemovalConfirm() + onBackClicked : _root.disposablesRemovalBack () } Connections { target: vPostTreatmentStates @@ -66,11 +70,12 @@ Connections { target: vHDOperationMode onPostTreatmentChanged : { page( _patientDisconnectionConfirm , vpostTreatment )} } - onPatientDisconnectionConfirm : { vPostTreatmentAdjustmentPatientDisconnectionConfirm .doConfirm( ) - /* No wait for Rsp, so navigates => */ page( _treatmentReviewConfirm )} + /* No wait for Rsp, so navigates => */ page( _treatmentReviewConfirm ) + /* After navigate ask for Tx data */ vPostTreatmentAdjustmentTreatmentLog .doRequest( )} onTreatmentReviewConfirm : { page( _disposablesRemovalConfirm )} onDisposablesRemovalConfirm : { vPostTreatmentAdjustmentDisposablesRemovalConfirm .doConfirm( )} + onDisposablesRemovalBack : { page( _treatmentReviewConfirm )} Connections { target: vPostTreatmentAdjustmentDisposablesRemovalConfirm onAdjustmentTriggered : { @@ -82,6 +87,15 @@ } } + Connections { target: vPostTreatmentAdjustmentTreatmentLog + onAdjustmentTriggered : { + if ( vPostTreatmentAdjustmentTreatmentLog.adjustment_Accepted ) { + _treatmentReviewConfirm.reasonText = "" + } else { + _treatmentReviewConfirm.reasonText = vPostTreatmentAdjustmentTreatmentLog.text() + } + } + } onVisibleChanged: { if (visible) { _mainMenu.hidden = true Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp =================================================================== diff -u -r88563177f10f20ced98750b2e40036201728131d -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (.../VPostTreatmentAdjustTreatmentLog.cpp) (revision 88563177f10f20ced98750b2e40036201728131d) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (.../VPostTreatmentAdjustTreatmentLog.cpp) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) @@ -37,6 +37,82 @@ adjustment_Accepted ( vData.mAccepted ); adjustment_Reason ( vData.mReason ); + // Formatted values + QStringList mParametersText; + QString mStr = "%1"; + mParametersText += mStr.arg(vData.mBloodFlowRate ); + mParametersText += mStr.arg(vData.mDialysateFlowRate ); + mParametersText += mStr.arg(vData.mTreatmentDuration ); + mParametersText += mStr.arg(vData.mActualTreatmentDuration ); + mParametersText += mStr.arg(vData.mAcidConcentrateType ); + mParametersText += mStr.arg(vData.mBicarbonateConcentrateType ); + mParametersText += mStr.arg(vData.mPotassiumConcentration ); + mParametersText += mStr.arg(vData.mCalciumConcentration ); + mParametersText += mStr.arg(vData.mBicarbonateConcentration ); + mParametersText += mStr.arg(vData.mSodiumConcentration ); + mParametersText += mStr.arg(vData.mDialysateTemperature ,0,'f',3); + mParametersText += mStr.arg(vData.mDialyzerType ); + mParametersText += mStr.arg(vData.mTreatmentDateTime ); + mParametersText += mStr.arg(vData.mAverageBloodFlow ,0,'f',3); + mParametersText += mStr.arg(vData.mAverageDialysateFlow ,0,'f',3); + mParametersText += mStr.arg(vData.mDialysateVolumeUsed ,0,'f',3); + mParametersText += mStr.arg(vData.mAverageDialysateTemp ,0,'f',3); + mParametersText += mStr.arg(vData.mTargetUFVolume ,0,'f',3); + mParametersText += mStr.arg(vData.mActualUFVolume ,0,'f',3); + mParametersText += mStr.arg(vData.mTargetUFRate ,0,'f',3); + mParametersText += mStr.arg(vData.mActualUFRate ,0,'f',3); + mParametersText += mStr.arg(vData.mSalineBolusVolume ); + mParametersText += mStr.arg(vData.mHeparinType ); + mParametersText += mStr.arg(vData.mHeparinConcentration ); + mParametersText += mStr.arg(vData.mHeparinBolusVolume ,0,'f',3); + mParametersText += mStr.arg(vData.mHeparinDispenseRate ,0,'f',3); + mParametersText += mStr.arg(vData.mHeparinPreStop ); + mParametersText += mStr.arg(vData.mHeparinDeliveredVolume ,0,'f',3); + mParametersText += mStr.arg(vData.mAverageArterialPressure ,0,'f',3); + mParametersText += mStr.arg(vData.mAverageVenousPressure ,0,'f',3); + mParametersText += mStr.arg(vData.mEndTreatmentEarlyAlarm ); + mParametersText += mStr.arg(vData.mDeviceID ); + mParametersText += mStr.arg(vData.mWaterSampleTestResult ); + parametersText( mParametersText ); + + // Titles + QStringList mParametersTitle; + mParametersTitle += tr("Blood Flow Rate" ); + mParametersTitle += tr("Dialysate Flow Rate" ); + mParametersTitle += tr("Treatment Duration" ); + mParametersTitle += tr("Actual Treatment Duration" ); + mParametersTitle += tr("Acid ConcentrateType" ); + mParametersTitle += tr("Bicarbonate Concentrate Type"); + mParametersTitle += tr("Potassium Concentration" ); + mParametersTitle += tr("Calcium Concentration" ); + mParametersTitle += tr("Bicarbonate Concentration" ); + mParametersTitle += tr("Sodium Concentration" ); + mParametersTitle += tr("Dialysate Temperature" ); + mParametersTitle += tr("Dialyzer Type" ); + mParametersTitle += tr("Treatment DateTime" ); + mParametersTitle += tr("Average Blood Flow" ); + mParametersTitle += tr("Average Dialysate Flow" ); + mParametersTitle += tr("Dialysate Volume Used" ); + mParametersTitle += tr("Average Dialysate Temp" ); + mParametersTitle += tr("Target UF Volume" ); + mParametersTitle += tr("Actual UF Volume" ); + mParametersTitle += tr("Target UF Rate" ); + mParametersTitle += tr("Actual UF Rate" ); + mParametersTitle += tr("Saline Bolus Volume" ); + mParametersTitle += tr("Heparin Type" ); + mParametersTitle += tr("Heparin Concentration" ); + mParametersTitle += tr("Heparin Bolus Volume" ); + mParametersTitle += tr("Heparin Dispense Rate" ); + mParametersTitle += tr("Heparin Pre-Stop" ); + mParametersTitle += tr("Heparin Delivered Volume" ); + mParametersTitle += tr("Average Arterial Pressure" ); + mParametersTitle += tr("Average Venous Pressure" ); + mParametersTitle += tr("End Treatment Early Alarm" ); + mParametersTitle += tr("Device ID" ); + mParametersTitle += tr("Water Sample Test Result" ); + parametersTitle( mParametersTitle ); + + // raw values bloodFlowRate ( vData.mBloodFlowRate ); dialysateFlowRate ( vData.mDialysateFlowRate ); treatmentDuration ( vData.mTreatmentDuration ); @@ -71,6 +147,8 @@ deviceID ( vData.mDeviceID ); waterSampleTestResult ( vData.mWaterSampleTestResult ); + + // *** has to be the last to let the information to be set and then emit the signal *** // *** otherwise will use the Previous values before being set. *** adjustment ( true ); Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h =================================================================== diff -u -r506a9e3db1a20bda1685e38c5e9041005c9a4a4f -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h (.../VPostTreatmentAdjustTreatmentLog.h) (revision 506a9e3db1a20bda1685e38c5e9041005c9a4a4f) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h (.../VPostTreatmentAdjustTreatmentLog.h) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) @@ -78,6 +78,11 @@ PROPERTY(quint32 , deviceID , 0 ) PROPERTY(quint32 , waterSampleTestResult , 0 ) + + PROPERTY(QStringList , parametersTitle , {}) + PROPERTY(QStringList , parametersText , {}) + PROPERTY(QStringList , parametersUnit , {}) + VIEW_DEC_CLASS_ADJUSTMENT(VPostTreatmentAdjustmentTreatmentLog, AdjustTreatmentLogResponseData) public slots: