Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml =================================================================== diff -u -rbfdee4cd41dfc4609cbd6045e64217731433f79d -r80b727733768477975addc967b3d6b04ed39e598 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml (.../TreatmentAdjustmentVitals.qml) (revision bfdee4cd41dfc4609cbd6045e64217731433f79d) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml (.../TreatmentAdjustmentVitals.qml) (revision 80b727733768477975addc967b3d6b04ed39e598) @@ -31,6 +31,7 @@ Math.round((Variables.applicationWidth - width) / 2) notification.textfontSize : 20 notification.visible : vTreatmentVitals.lastRead || vTreatmentAdjustmentVitals.adjustment_ReasonText + notification.anchors.rightMargin: numPad.isOpened ? 10 : 0 // fix margins when numpad is open and notifiction is displayed backgroundItemZ : numPad.isOpened ? 0 : -1 backgroundItem : [ NumPad { id: _numPad @@ -72,10 +73,13 @@ vTreatmentVitals.doTimerStop() } - onClosed: if ( vTreatmentVitals.enableDialog ) { vTreatmentVitals.doTimerStart() } + onClosed: { + vTreatmentVitals.doTimerStart() + } onCloseClicked: { numPad.hide() + numPad.visible = false vTreatmentVitals.doSkip() } @@ -154,7 +158,7 @@ text { text : qsTr("Measure Vitals") font.pixelSize : Fonts.fontPixelConfirm - font.weight : Font.Medium + font.weight : Font.Medium } onClicked: vTreatmentAdjustmentVitals.doRequest() @@ -164,28 +168,48 @@ } Connections { target: vTreatmentVitals - function onDidTrigger () { vTreatmentAdjustmentVitals.doRequest() } + // On Timeout - Vitals Request + function onDidTimeout () { + if ( ! vTreatmentVitals.interval ) { + // TODO: interval set to OFF but 15 min default timer still running + return + } + + // On Timeout request vitas if BP cuff is enabled or shjow popup for manual entry + if ( vTreatmentVitals.enableBPCuff ) { + vTreatmentAdjustmentVitals.doRequest() + vTreatmentVitals.doTimerStart() + } + else { + _root.open () + _bphrEntry.systolic = "" + _bphrEntry.diastolic = "" + _bphrEntry.heartRate = "" + } + } + + // Vitals Reading Ready + function onAdjustmentTriggered ( vValue ) { + _root.update ( vTreatmentVitals.systolic__rt, vTreatmentVitals.diastolic_rt, vTreatmentVitals.heartRate_rt ) + _root.confirm() + } } Connections { target: vTreatmentAdjustmentVitals + // Vitals Response function onAdjustmentTriggered ( vValue ) { - if ( vTreatmentAdjustmentVitals.adjustment_Accepted ) { - // on accepted read vital data and populate - _root.update ( vTreatmentVitals.systolic__rt, vTreatmentVitals.diastolic_rt, vTreatmentVitals.heartRate_rt ) - - // confirm only if triggered from interval timer and popup is not open - _root.confirm() - if ( vTreatmentVitals.enableDialog ) { vTreatmentVitals.doTimerStart() } - } - else { // on rejected prompt user to enter vitals manually - if ( vTreatmentVitals.enableDialog ) { _root.open () } - + // on rejected prompt user to enter vitals manually + if ( ! vTreatmentAdjustmentVitals.adjustment_Accepted ) { + _root.open () _bphrEntry.systolic = "" _bphrEntry.diastolic = "" _bphrEntry.heartRate = "" } notificationText = notificationTextString } + + // FW no response timeout + function onDidTimeout ( ) { vTreatmentVitals.doSkip(); } } Behavior on x { NumberAnimation { duration: Variables.keybardAnimationDuration } }