Index: SDDs/Pre-Treatment.puml =================================================================== diff -u --- SDDs/Pre-Treatment.puml (revision 0) +++ SDDs/Pre-Treatment.puml (revision a55e0de27d8c427dd4d441f47bb22ca2fe0ca462) @@ -0,0 +1,130 @@ +@startuml Pre-Treatment + + participant TD as TD + participant SW as SW + participant UI as UI + actor USER as US + + 'Possible actions and interaction tuypes + ' TD -> SW: MSG: Message + ' SW -> TD: MSG: Message + ' SW -> UI: CMD: command + ' UI -> SW: ACT: Action + ' US -> UI: User actions are: + ' ENT: User enters a value or string + ' TCH: User touches a button (RadioButton, CheckBox, ...) + ' SET: User sets/slides a slider + ' SCL: User scrolls a flipable area + ' + 'Messages conventions: + '[x \n ,] + '[x \n ,# certain amount of parameters according to the content] + '[x \n ,X The rest of the parameters do not matter.] + + == Pre-Treatment == + US -> UI: TCH: Create Treatment Button + UI -> SW: ACT: Create Treatment + SW -> TD: MSG: [x45: 1] Req \n Initiate Treatment + alt Accepted: Initiate Treatment + TD -> SW: MSG: [x46: 1,X] Rsp \n Initiate Treatment + TD -> SW: MSG: [x12: 4,1] Dat \n OpMode - Pre-Treatment MOde + SW -> UI: CMD: CPre-Treatment Screen + + alt isStandardMode? + UI -> US: ACT: Show Concentrates page + US -> UI: TCH: Any instruction step + UI -> UI: ACT: Highlight instruction step \ + \n\tShow image for instruction step + US -> UI: Act: Press Next + alt #CEFAD0 Next + UI -> UI: ACT: Go to Installation Page + end + end + UI -> US: ACT: Show Installation page + US -> UI: TCH: Any instruction step + UI -> UI: ACT: Highlight instruction step \ + \n\tShow image for instruction step + alt #CEFAD0 Auto-Load + US -> UI: TCH: Auto-Load Button + UI -> SW: ACT: Auto-Load Request + SW -> TD: MSG: [x92: 0] Request + TD -> SW: MSG: [x93: #2] \n\tResponse: \ + \n\t(U32) mAccepted\ + \n\t(U32) mReason + SW -> UI: CMD: Rejection Reason + alt #CAE9F5 Accepted: AutoLoad + UI -> UI: ACT: Go to Self-Tests Page + else #Pink Rejected + UI -> UI: ACT: Stay on page + UI -> US: ACT: Display rejection reason + end + else #D0D9CD Back + US -> UI: TCH: Back Button + UI -> SW: ACT: Back + SW -> TD: MSG: [x45: 0] Req \n Initiate Treatment Cancel + TD -> SW: MSG: [x12: 3,1] Dat \n OpMode - Standby + SW -> UI: CMD: MainHome Screen + end + UI -> US: ACT: Show Self-Tests page + UI -> SW: ACT: Request start Self Tests + SW -> TD: ACT: Request start Self Tests + TD -> SW: ACT: Response Self Tests State + SW -> UI: ACT: Response Self Tests State + UI -> US: ACT: Show Self Tests State + US -> UI: Act: Press Next + alt #CEFAD0 Next + UI -> UI: ACT: Go to Saline Page + end + UI -> US: ACT: Show Saline page + US -> UI: TCH: Any instruction step + UI -> UI: ACT: Highlight instruction step \ + \n\tShow image for instruction step + US -> UI: Act: Press Next + alt #CEFAD0 Next + UI -> UI: ACT: Go to Prime Page + end + UI -> US: ACT: Show Prime page + UI -> SW: ACT: Request start Prime + SW -> TD: ACT: Request start Prime + TD -> SW: ACT: Response Prime State + SW -> UI: ACT: Response Prime State + UI -> US: ACT: Show Prime State + US -> UI: Act: Press Next + alt #CEFAD0 Next + alt #CAE9F5 Is Water Sample Featured + UI -> UI: ACT: Go to Water Sample + UI -> US: ACT: Show Water Sample + US -> UI: TCH: Select pass or fail + US -> UI: Act: Press Next + alt #CEFAD0 Next Button + UI -> UI: ACT: Go to Create Rx + end + else + UI -> UI: ACT: Go to Create Rx + end + end + + UI -> US: ACT: Show Create Rx + !include common_puml/CreateRxCommon.puml + UI -> UI: ACT: Go to UF/ Dialysate + UI -> US: ACT: Show UF/ Dialysate + US -> UI: Act: Press Next + alt #CEFAD0 Next + UI -> UI: ACT: Go to Connect Page + end + UI -> UI: ACT: Go to Connect + UI -> US: ACT: Show Connect + UI -> UI: ACT: Highlight instruction step \ + \n\tShow image for instruction step + US -> UI: Act: Press Start + + UI -> SW: ACT: Pre-Treatment Adjustment Start Treatment + SW -> TD: MSD: [xA1: 0] Request \n Pre-Treatment Adjustment Start Treatment + alt #CEFAD0 Accepted + TD -> SW: MSG: [xA2: 2] \n\tResponse: \ + \n\t(U32) mAccepted \ + \n\t(U32) mReason + SW -> UI: CMD: Treatment Stack + UI -> US: Act: Show Main Treatment + end +@enduml Index: SDDs/PreTreatment.png =================================================================== diff -u -r516cfc11a0a54d5ef0e5be8c21324d61091944ef -ra55e0de27d8c427dd4d441f47bb22ca2fe0ca462 Binary files differ Fisheye: Tag a55e0de27d8c427dd4d441f47bb22ca2fe0ca462 refers to a dead (removed) revision in file `SDDs/PreTreatment.puml'. Fisheye: No comparison available. Pass `N' to diff? Index: SDDs/common_puml/CreateRxCommon.puml =================================================================== diff -u -r09b4d71593dc6c7a9465541f60cc2178164ff8a6 -ra55e0de27d8c427dd4d441f47bb22ca2fe0ca462 --- SDDs/common_puml/CreateRxCommon.puml (.../CreateRxCommon.puml) (revision 09b4d71593dc6c7a9465541f60cc2178164ff8a6) +++ SDDs/common_puml/CreateRxCommon.puml (.../CreateRxCommon.puml) (revision a55e0de27d8c427dd4d441f47bb22ca2fe0ca462) @@ -3,9 +3,7 @@ participant TD as TD participant SW as SW participant UI as UI - control Wait_Retry as Wait_Retry actor USER as US - collections Pre_Tx as Pre_Tx 'Possible actions and interaction types ' External on CANBus @@ -45,13 +43,12 @@ alt Accepted TD -> SW: MSG: [x12: 4,1] Dat \n OpMode - Pre-Treatment SW -> UI: CMD: Pre-Treatment Stack - UI -[#Green]>o Pre_Tx end end else #Pink TD -> SW: MSG: [x40: 0,#RR] Rsp \n Prescription Parameters: Validation SW -> UI: CMD: Highlight Rejected Parameters - UI ->o Wait_Retry: ⟲: Prescription Parameters Screen + UI -> US: Notify User rejected parameters end end @enduml Index: leahi.qrc =================================================================== diff -u -r4a2b83dcb56555861d2c741a8e8894e5b07e24bf -ra55e0de27d8c427dd4d441f47bb22ca2fe0ca462 --- leahi.qrc (.../leahi.qrc) (revision 4a2b83dcb56555861d2c741a8e8894e5b07e24bf) +++ leahi.qrc (.../leahi.qrc) (revision a55e0de27d8c427dd4d441f47bb22ca2fe0ca462) @@ -260,7 +260,6 @@ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml - sources/gui/qml/pages/treatment/TreatmentStack.qml sources/gui/qml/pages/treatment/TreatmentHome.qml Index: sources/gui/qml/components/SubStepIndicator.qml =================================================================== diff -u -r4a2b83dcb56555861d2c741a8e8894e5b07e24bf -ra55e0de27d8c427dd4d441f47bb22ca2fe0ca462 --- sources/gui/qml/components/SubStepIndicator.qml (.../SubStepIndicator.qml) (revision 4a2b83dcb56555861d2c741a8e8894e5b07e24bf) +++ sources/gui/qml/components/SubStepIndicator.qml (.../SubStepIndicator.qml) (revision a55e0de27d8c427dd4d441f47bb22ca2fe0ca462) @@ -6,8 +6,7 @@ import "qrc:/globals" import "qrc:/components" -Rectangle { id: _root - color : Colors.transparent +Item { id: _root width : _row.width height : _row.height Index: sources/gui/qml/components/WaitDone.qml =================================================================== diff -u -r4a2b83dcb56555861d2c741a8e8894e5b07e24bf -ra55e0de27d8c427dd4d441f47bb22ca2fe0ca462 --- sources/gui/qml/components/WaitDone.qml (.../WaitDone.qml) (revision 4a2b83dcb56555861d2c741a8e8894e5b07e24bf) +++ sources/gui/qml/components/WaitDone.qml (.../WaitDone.qml) (revision a55e0de27d8c427dd4d441f47bb22ca2fe0ca462) @@ -47,7 +47,7 @@ loops : Animation.Infinite duration: 7200 } - Behavior on opacity { OpacityAnimator { duration: 1200 } } + Behavior on opacity { OpacityAnimator { duration: 250 } } } Image { id: _checkIndicator @@ -59,7 +59,7 @@ fillMode: Image.PreserveAspectFit mipmap : true - Behavior on opacity { OpacityAnimator { duration: 1200 } } + Behavior on opacity { OpacityAnimator { duration: 250 } } } } Index: sources/gui/qml/compounds/CheckListView.qml =================================================================== diff -u -r4a2b83dcb56555861d2c741a8e8894e5b07e24bf -ra55e0de27d8c427dd4d441f47bb22ca2fe0ca462 --- sources/gui/qml/compounds/CheckListView.qml (.../CheckListView.qml) (revision 4a2b83dcb56555861d2c741a8e8894e5b07e24bf) +++ sources/gui/qml/compounds/CheckListView.qml (.../CheckListView.qml) (revision a55e0de27d8c427dd4d441f47bb22ca2fe0ca462) @@ -53,8 +53,6 @@ function setWait (vModel) { vModel.stepStart = true ; vModel.stepDone = false } function setDone (vModel) { vModel.stepStart = true ; vModel.stepDone = true } - function stepDone (vIndex) { setDone (_listView.itemAt(vIndex)) } - function setItemExt (vIndex, vEntered) { let goBak = pIndex > vIndex let goTop = pIndex < vIndex Index: sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml =================================================================== diff -u -r4a2b83dcb56555861d2c741a8e8894e5b07e24bf -ra55e0de27d8c427dd4d441f47bb22ca2fe0ca462 --- sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml (.../PreTreatmentBase.qml) (revision 4a2b83dcb56555861d2c741a8e8894e5b07e24bf) +++ sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml (.../PreTreatmentBase.qml) (revision a55e0de27d8c427dd4d441f47bb22ca2fe0ca462) @@ -31,44 +31,13 @@ onVisibleChanged: if ( visible ) { _root.updateModel() } - /// --------TODO REMOVE -- DEMO testing progression --------------------------//// - // TODO remove -- testing progress ////////////////////////// - property int testCount : checkListStepNames.length - property int increment : timeCircleMaximum / checkListStepNames.length - property int step : 1 - - function resetTest() { - timeCircleProgressValue = 0 - step = 1 - checkList.setItemExt(0, true) - _progressTimer.start() - } - - function incrementTest() { - if (timeCircleProgressValue >= timeCircleMaximum ) { return } - timeCircleProgressValue = step * increment - - // fix setItemExt methods in checklist later.. i do not understand 😵‍💫 - checkList.setItemExt(step, true) - checkList.stepDone(step - 1) - step++ - } - - Timer { id: _progressTimer - interval : 1000 - running : ! isComplete - repeat : ! isComplete - onTriggered: incrementTest() - } - /// --------END REMOVE -----------------------------------------------------//// - // update model for instruction based steps function updateModel () { let stepName = stepNames[stackStepIndex] if ( stepName === undefined ) stepName = "" - let group = vSettings.advancedMode ? vSettings.groupFormat.arg(stepName).arg("Advanced") : - _root.subStepName.length === 0 ? stepName : vSettings.groupFormat.arg(stepName).arg(_root.subStepName) + let group = vSettings.groupFormat(stepName, vSettings.advancedMode || _root.subStepName.length === 0 ? "" : _root.subStepName ) + let instructionsGroup = vSettings.instructions[group] if ( instructionsGroup !== undefined ) { Index: sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml =================================================================== diff -u -r238262c1ae91d89c2f5bbce80b8e8016e9bbe782 -ra55e0de27d8c427dd4d441f47bb22ca2fe0ca462 --- sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml (.../PreTreatmentStack.qml) (revision 238262c1ae91d89c2f5bbce80b8e8016e9bbe782) +++ sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml (.../PreTreatmentStack.qml) (revision a55e0de27d8c427dd4d441f47bb22ca2fe0ca462) @@ -129,7 +129,6 @@ break case PreTreatmentStack.Step.Prime: if ( _pretreatmentPrime.timeCircleProgressValue === 0 ) { vPreTreatmentAdjustmentDisposablesPrime.doPrime(); } - if ( ! _pretreatmentPrime.isComplete) { _pretreatmentPrime.incrementTest(); return; } // TODO update later only for testing if ( enableWaterSample ) { page ( _pretreatmentWaterSample ) } else { page ( _pretreatmentCreate ) } @@ -200,10 +199,10 @@ function confirmEnabled() { switch ( stepKeys[_root.stackStepIndex] ) { - case PreTreatmentStack.Step.SelfTests: - return _pretreatmentSelfTests.isComplete - case PreTreatmentStack.Step.Prime: - return _pretreatmentPrime.isComplete +// case PreTreatmentStack.Step.SelfTests: +// return _pretreatmentSelfTests.isComplete +// case PreTreatmentStack.Step.Prime: +// return _pretreatmentPrime.isComplete case PreTreatmentStack.Step.WaterSample: return _pretreatmentWaterSample.confirmEnabled case PreTreatmentStack.Step.CreateRx: @@ -248,7 +247,7 @@ } PreTreatmentSelfTests{ id: _pretreatmentSelfTests - onVisibleChanged : if (visible) { _root.stackStepIndex = stepKeys.indexOf(PreTreatmentStack.Step.SelfTests); resetTest() } + onVisibleChanged : if (visible) { _root.stackStepIndex = stepKeys.indexOf(PreTreatmentStack.Step.SelfTests); } } PreTreatmentBase { id: _pretreatmentSaline @@ -257,7 +256,7 @@ } PreTreatmentPrime { id: _pretreatmentPrime - onVisibleChanged : if (visible) { _root.stackStepIndex = stepKeys.indexOf(PreTreatmentStack.Step.Prime); resetTest() } + onVisibleChanged : if (visible) { _root.stackStepIndex = stepKeys.indexOf(PreTreatmentStack.Step.Prime); } } PreTreatmentWaterSample { id: _pretreatmentWaterSample Index: sources/gui/qml/pages/pretreatment/PreTreatmentUltrafiltration.qml =================================================================== diff -u -r4a2b83dcb56555861d2c741a8e8894e5b07e24bf -ra55e0de27d8c427dd4d441f47bb22ca2fe0ca462 --- sources/gui/qml/pages/pretreatment/PreTreatmentUltrafiltration.qml (.../PreTreatmentUltrafiltration.qml) (revision 4a2b83dcb56555861d2c741a8e8894e5b07e24bf) +++ sources/gui/qml/pages/pretreatment/PreTreatmentUltrafiltration.qml (.../PreTreatmentUltrafiltration.qml) (revision a55e0de27d8c427dd4d441f47bb22ca2fe0ca462) @@ -111,34 +111,31 @@ } } - LabelUnitContainer { id: _volumeGoalContainer - objectName : "_volumeGoalContainer" + LabelUnitValueAdjuster { id: _volumeGoalAdjuster + objectName : "_volumeGoalAdjuster" width : parent.width height : Variables.adjustmentLabelUnitContainerHeight text : qsTr("Ultrafiltration") unitText : Variables.unitVolume - contentItem : ValueAdjuster { id: _volumeGoalAdjuster - objectName : "_volumeGoalAdjuster" - isActive : true - decimal : Variables.ultrafiltrationPrecision - minimum : Math.ceil(_private.volumeRemoved / step) * step - maximum : Math.floor(_private.maximum / step) * step - step : _private.volumeRes - value : { value = _private.setVolume } // set without binding + isActive : true + decimal : Variables.ultrafiltrationPrecision + minimum : Math.ceil(_private.volumeRemoved / step) * step + maximum : Math.floor(_private.maximum / step) * step + step : _private.volumeRes + value : { value = _private.setVolume } // set without binding - onDidChange : { - value = _private.calculatePrecisionValue(vValue) + onDidChange : { + value = _private.calculatePrecisionValue(vValue) + } + onMinimumChanged: { + if (value < minimum) { + value = minimum } - onMinimumChanged: { - if (value < minimum) { - value = minimum - } + } + onMaximumChanged: { + if (value > maximum) { + value = maximum } - onMaximumChanged: { - if (value > maximum) { - value = maximum - } - } } } Index: sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustRequests.h =================================================================== diff -u -rd1793ffb8c9a4bc3aee524aafbf0042175e91229 -ra55e0de27d8c427dd4d441f47bb22ca2fe0ca462 --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustRequests.h (.../MPreTreatmentAdjustRequests.h) (revision d1793ffb8c9a4bc3aee524aafbf0042175e91229) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustRequests.h (.../MPreTreatmentAdjustRequests.h) (revision a55e0de27d8c427dd4d441f47bb22ca2fe0ca462) @@ -68,7 +68,7 @@ * * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------------------------------------:| - * |0x3F00| 0x100 | 9 | Req | Y | UI | HD | Validate New Treatment Parameters Request | + * |0x3F00| 0x100 | 9 | Req | Y | UI | TD | Validate New Treatment Parameters Request | * * | Payload || * | || Index: sources/view/settings/VSettings.cpp =================================================================== diff -u -red3945bdd13d73f5cb1aec03fafa1697be5f1b66 -ra55e0de27d8c427dd4d441f47bb22ca2fe0ca462 --- sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision ed3945bdd13d73f5cb1aec03fafa1697be5f1b66) +++ sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision a55e0de27d8c427dd4d441f47bb22ca2fe0ca462) @@ -109,24 +109,29 @@ QStringList keys ; QVariantList values ; QString title = ""; - for (const QString &key : _Settings.keys(category, group)) { - if (Storage::Settings::isKeyTitle ( key ) ) { - title = _Settings.value(category, group, key).toString(); - } else { - const QString imagePath = QStringLiteral("%1%2").arg(_location) - .arg(_Settings.value(category, group, key).toString()); - QFileInfo fileInfo(imagePath); - values.append(fileInfo.exists() && fileInfo.isFile() ? "file:" + imagePath : ""); - keys.append(key); - } - } if ( Storage::Settings::isCategoryInstructions( category ) ) { + for (const QString &key : _Settings.keys(category, group)) { + if (Storage::Settings::isKeyTitle ( key ) ) { + title = _Settings.value(category, group, key).toString(); + } else { + const QString imagePath = QStringLiteral("%1%2").arg(_location) + .arg(_Settings.value(category, group, key).toString()); + QFileInfo fileInfo(imagePath); + values.append(fileInfo.exists() && fileInfo.isFile() ? "file:" + imagePath : ""); + keys.append(key); + } + } + TKeysList keysList = updateReplacements(group, keys ); updateInstructions(group, keysList, values, title ); updateInstructions(group ); } else { //TODO: Since it is global system settings, move this to the settings controller so the C++ backend can also use it. like Date/Time formats. + for (const QString &key : _Settings.keys(category, group)) { + keys.append(key); + } + for (const auto &key : qAsConst(keys)) { // DEBUG: qDebug() << " ~~~~~~~~~~ " << category << group << key << _Settings.value(category, group, key).toString (); QVariantMap keyValue; Index: sources/view/settings/VSettings.h =================================================================== diff -u -r0dfba44fb7172b9458d161b3ed5f54527f93b698 -ra55e0de27d8c427dd4d441f47bb22ca2fe0ca462 --- sources/view/settings/VSettings.h (.../VSettings.h) (revision 0dfba44fb7172b9458d161b3ed5f54527f93b698) +++ sources/view/settings/VSettings.h (.../VSettings.h) (revision a55e0de27d8c427dd4d441f47bb22ca2fe0ca462) @@ -58,7 +58,7 @@ // TODO: This view needs modification and it needs to isolate the settings and have its own specific properties, not the complete settings exposed to QML and let QML access it. // Don't use QVariantHash, qml doesn't like it and won't show the values, *** and not even complains/errors ***. - CONSTANT(QString , groupFormat , "%1^%2" ) + PROPERTY(bool , initialized , false ) PROPERTY(QStringList , categorys , {} ) PROPERTY(QVariantMap , instructions , {} ) @@ -71,7 +71,7 @@ SETTINGS(bool , integratedBPCuff , false , Storage::Settings_Category_SettingsSystem , "Feature Configurations" , "IntegratedBPCuff" ) SETTINGS(bool , heparinSyringePump , false , Storage::Settings_Category_SettingsSystem , "Feature Configurations" , "HeparinSyringePump" ) SETTINGS(bool , chemicalDisinfection , false , Storage::Settings_Category_SettingsSystem , "Feature Configurations" , "ChemicalDisinfection" ) - SETTINGS(bool , advancedMode , false , Storage::Settings_Category_SettingsSystem , "AdvancedMode", "AdvancedMode" ) + SETTINGS(bool , advancedMode , false , Storage::Settings_Category_SettingsSystem , "AdvancedMode" , "AdvancedMode" ) TRIGGER (bool , encryptionPass, false ) @@ -100,6 +100,10 @@ void updateServicePassword (const QString &vPassword); void checkServicePasswordSet (); + QString groupFormat (const QString &vFirst, const QString &vSecond = QString()) { return QString("%1%2").arg(_advancedMode ? "@" : "") + .arg(vSecond.isEmpty() ? QString("%1").arg(vFirst) : + QString("%1^%2").arg(vFirst, vSecond)); } + private slots: void onActionReceive (GuiActionType vAction, const QVariantList &vData);