Index: leahi.qrc =================================================================== diff -u -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 -rd82802819678ccdb5d2cf480cf06071c4b4b4197 --- leahi.qrc (.../leahi.qrc) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) +++ leahi.qrc (.../leahi.qrc) (revision d82802819678ccdb5d2cf480cf06071c4b4b4197) @@ -201,6 +201,8 @@ sources/gui/qml/components/SubStepIndicator.qml sources/gui/qml/components/SDCInfo.qml sources/gui/qml/components/BaseChart.qml + sources/gui/qml/components/ReviewContainer.qml + sources/gui/qml/components/LegendItem.qml sources/gui/qml/compounds/PressureRangeSlider.qml Index: sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml =================================================================== diff -u -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 -rd82802819678ccdb5d2cf480cf06071c4b4b4197 --- sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml (.../PostTreatmentBase.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) +++ sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml (.../PostTreatmentBase.qml) (revision d82802819678ccdb5d2cf480cf06071c4b4b4197) @@ -30,18 +30,18 @@ header.visible : false headerTitle : qsTr("End Treatment") - onVisibleChanged: if (visible) { _root.updateModel() } + onVisibleChanged: if ( visible && instructionBased ) { _root.updateModel() } function updateModel () { let stepName = stepNames[stackStepIndex] ?? "" let group = vSettings.groupFormat(stepName, _root.subStepName.length === 0 ? "" : _root.subStepName ) let instructionsGroup = vSettings.instructions[group] - if ( instructionsGroup !== undefined ) { - instructionTitle = instructionsGroup.title - instructionStepNames = instructionsGroup.keys - instructionStepImages = instructionsGroup.values - } + if ( ! instructionsGroup ) { return } + + instructionTitle = instructionsGroup.title + instructionStepNames = instructionsGroup.keys + instructionStepImages = instructionsGroup.values } } Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -r7ad92639d1b70bd07c0bb9ea7ae467b87d847219 -rd82802819678ccdb5d2cf480cf06071c4b4b4197 --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 7ad92639d1b70bd07c0bb9ea7ae467b87d847219) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision d82802819678ccdb5d2cf480cf06071c4b4b4197) @@ -44,9 +44,8 @@ qsTr("Disinfection" ), ] - property int stackStepIndex : 0 + property int stackStepIndex : 0 readonly property bool isDisconnect : _root.stackStepIndex === PostTreatmentStack.StackStep.Disconnect - readonly property bool isReview : _root.stackStepIndex === PostTreatmentStack.StackStep.Review onVisibleChanged: { if (visible) { @@ -58,6 +57,11 @@ } } + function setPage(vPage, vCondition) { + _root.stackStepIndex = vPage.stepIndex + page( vPage , vCondition) + } + function confirmClicked() { switch ( _root.stackStepIndex ) { case PostTreatmentStack.Disconnect: @@ -67,7 +71,7 @@ vPostTreatmentAdjustmentDisposablesRemovalConfirm.doConfirm() break case PostTreatmentStack.Review: - page( _postTreatmentDisinfection ) + setPage( _postTreatmentDisinfection ) break case PostTreatmentStack.Disinfection: // Skip button - go back to standby -- Finish Treatment @@ -83,7 +87,7 @@ _postTreatmentDisconnectStack.backClicked() break case PostTreatmentStack.Disinfection: - page(_postTreatmentReview) + setPage( _postTreatmentReview) break case PostTreatmentStack.Remove: case PostTreatmentStack.Review: @@ -150,56 +154,13 @@ onBackClicked : _root.backClicked() onConfirmClicked: _root.confirmClicked() - - Row { id: _qrRow - spacing : Variables.defaultMargin - visible : _root.isReview - - anchors { - left : _titleBar.left - leftMargin : Variables.defaultMargin * 2 - top : _titleBar.top - topMargin : Variables.defaultMargin * 2 - } - - QRCode { id: _qrCode - anchors.verticalCenter : parent.verticalCenter - anchors.verticalCenterOffset: -5 - qrcode : vPostTreatmentAdjustmentTreatmentLog.txCode - clear : ! _root.visible - } - - Text { id: _txCodeText - anchors.bottom : _qrCode.bottom - text : vPostTreatmentAdjustmentTreatmentLog.txCode ? qsTr("Tx Code: ") + vPostTreatmentAdjustmentTreatmentLog.txCode : " " - color : "#DBE9FA" - font.pixelSize : Fonts.fontPixelButton - } - } } - PostTreatmentDisconnectStack { id: _postTreatmentDisconnectStack - objectName : "_postTreatmentDisconnectStack" - onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Disconnect; initStack() } - } + PostTreatmentBase { id: _patientDisconnectionConfirm; stepIndex: PostTreatmentStack.Disconnect; instructionBased: true } + PostTreatmentBase { id: _postTreatmentRemove; stepIndex: PostTreatmentStack.Remove; instructionBased: true } + PostTreatmentReview { id: _postTreatmentReview; stepIndex: PostTreatmentStack.Review } + PostTreatmentBase { id: _postTreatmentDisinfection; stepIndex: PostTreatmentStack.Disinfection } - PostTreatmentBase { id: _postTreatmentRemove - objectName : "_postTreatmentRemove" - instructionBased : true - onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Remove; updateModel() } - } - - PostTreatmentReview { id: _postTreatmentReview - objectName : " _postTreatmentReview" - onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Review; - vPostTreatmentAdjustmentTreatmentLog.doRequest() } - } - - PostTreatmentDisinfection { id: _postTreatmentDisinfection - objectName :" _postTreatmentDisinfection" - onVisibleChanged : if (visible) { stackStepIndex = PostTreatmentStack.Disinfection } - } - // connections Connections { target: vPostTreatmentStates function onDrainReservoirsChanged ( vValue ) { console.debug("drainReservoirs ", vValue )} @@ -209,7 +170,7 @@ } Connections { target: vTDOpMode - function onPostTreatmentChanged ( vValue ) { page( _postTreatmentDisconnectStack , vValue )} + function onPostTreatmentChanged ( vValue ) { setPage( _patientDisconnectionConfirm , vValue )} } // Disconnect stack @@ -222,7 +183,8 @@ function onAdjustmentTriggered ( vValue ) { if ( vPostTreatmentAdjustmentDisposablesRemovalConfirm.adjustment_Accepted ) { _postTreatmentRemove.reasonText = "" - page( _postTreatmentReview ) + vPostTreatmentAdjustmentTreatmentLog.doRequest() + setPage( _postTreatmentReview ) } else { _postTreatmentRemove.reasonText = vPostTreatmentAdjustmentDisposablesRemovalConfirm.text() } Index: sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustRequests.h =================================================================== diff -u -rf3eeb3de0d97d87521e5f9be57634fb801029a19 -rd82802819678ccdb5d2cf480cf06071c4b4b4197 --- sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustRequests.h (.../MPostTreatmentAdjustRequests.h) (revision f3eeb3de0d97d87521e5f9be57634fb801029a19) +++ sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustRequests.h (.../MPostTreatmentAdjustRequests.h) (revision d82802819678ccdb5d2cf480cf06071c4b4b4197) @@ -59,7 +59,7 @@ * * | MSG | CAN ID | Type | Ack | Src | Dest | Description | * |:----:|:------:|:----:|:---:|:---:|:----:|:-----------:| - * |0x0600| 0x100 | Req | Y | UI | TD | Patient Disconnection Confirm Request | + * |0x5500| 0x100 | Req | Y | UI | TD | Patient Disconnection Confirm Request | * * | Payload || * | || @@ -99,7 +99,7 @@ * * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| - * |0x7500| 0x100 | 9 | Req | Y | UI | TD | Treatment Log Request | + * |0x7500| 0x100 | 9 | Req | Y | UI | HD | Treatment Log Request | * * | Payload || * | ||