Index: sources/gui/qml/main.qml =================================================================== diff -u -r9bd436782039b50ac45eb38f561a36706517271b -r0be698733fd4570240a91703978fee7d53a76121 --- sources/gui/qml/main.qml (.../main.qml) (revision 9bd436782039b50ac45eb38f561a36706517271b) +++ sources/gui/qml/main.qml (.../main.qml) (revision 0be698733fd4570240a91703978fee7d53a76121) @@ -195,6 +195,7 @@ VTreatmentVitals { id: vTreatmentVitals interval : vTreatmentCreate.bloodPressureMeasureInterval canStartInterval: vTreatmentCreate.parametersConfirmed + enableBPCuff : true // TODO: PRS 343 update with enable/disable Integrated Blood Pressure Cuff onCanStartIntervalChanged : { if ( vTreatmentVitals.canStartInterval ) { vTreatmentVitals.doTimerStart() } else { vTreatmentVitals.doTimerStop() } Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml =================================================================== diff -u -rde099919f262c3429cb0592ef71deb6a16e92892 -r0be698733fd4570240a91703978fee7d53a76121 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml (.../TreatmentAdjustmentVitals.qml) (revision de099919f262c3429cb0592ef71deb6a16e92892) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml (.../TreatmentAdjustmentVitals.qml) (revision 0be698733fd4570240a91703978fee7d53a76121) @@ -167,25 +167,24 @@ Connections { target: vTreatmentVitals // Vitals Request - function onDidTrigger () { + function onDidTimeout () { vTreatmentAdjustmentVitals.doRequest() vTreatmentVitals.doTimerStart() } + + // Vitals Reading Ready + function onDidTrigger() { + _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() - } - else { // on rejected prompt user to enter vitals manually + // on rejected prompt user to enter vitals manually + if ( ! vTreatmentAdjustmentVitals.adjustment_Accepted ) { _root.open () - _bphrEntry.systolic = "" _bphrEntry.diastolic = "" _bphrEntry.heartRate = "" Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitalsInterval.qml =================================================================== diff -u -rde099919f262c3429cb0592ef71deb6a16e92892 -r0be698733fd4570240a91703978fee7d53a76121 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitalsInterval.qml (.../TreatmentAdjustmentVitalsInterval.qml) (revision de099919f262c3429cb0592ef71deb6a16e92892) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitalsInterval.qml (.../TreatmentAdjustmentVitalsInterval.qml) (revision 0be698733fd4570240a91703978fee7d53a76121) @@ -48,7 +48,7 @@ unitText : Variables.unitTextDuration valid : ! vTreatmentCreate.bloodPressureMeasureIntervalRejectReason width : Variables.adjustmentLabelUnitContainerWidth - height : Variables.popupAdjustmentContainerHeight + height : Variables.adjustmentLabelUnitContainerHeight titlePixelSize : Fonts.fontPixelContainerTitleSmall unitPixelSize : Fonts.fontPixelContainerUnitSmall titleLeftMargin : Variables.defaultMargin * 2 Index: sources/view/hd/adjustment/common/VCommonAdjustmentVitals.cpp =================================================================== diff -u -rfaf6802c35d530181106342f840b4cd9c851e272 -r0be698733fd4570240a91703978fee7d53a76121 --- sources/view/hd/adjustment/common/VCommonAdjustmentVitals.cpp (.../VCommonAdjustmentVitals.cpp) (revision faf6802c35d530181106342f840b4cd9c851e272) +++ sources/view/hd/adjustment/common/VCommonAdjustmentVitals.cpp (.../VCommonAdjustmentVitals.cpp) (revision 0be698733fd4570240a91703978fee7d53a76121) @@ -47,6 +47,7 @@ .arg(vData.mSystolic ) .arg(vData.mDiastolic) .arg(vData.mHeartRate)); + emit didTrigger(); } /*! @@ -157,7 +158,6 @@ void View::VTreatmentVitals::timerEvent(QTimerEvent *) { if ( ! _timerId ) return; // No timer started or failed starting - if ( ! _interval ) return; // if interval is 0/OFF return if ( ! _canStartInterval ) return; // parameters have not been confirmed yet updateTimer(); @@ -170,7 +170,6 @@ */ void View::VTreatmentVitals::onIntervalChanged() { - if ( ! _interval ) timerStop (); } /*! @@ -181,7 +180,6 @@ void View::VTreatmentVitals::timerStart() { if ( _timerId ) killTimer(_timerId); // this typically should not happen. - if ( ! _interval ) return; // if interval is 0/OFF return _timerId = startTimer(1000); // 1 sec interval which will used as 1 min in timerEvent (easier to debug) } @@ -192,28 +190,32 @@ */ void View::VTreatmentVitals::updateTimer() { + int interval = _interval && _enableBPCuff ? _interval : 15; _now = QDateTime::currentDateTime(); // minutes past last interval mark - int past = _now.time().minute() % _interval; + int past = _now.time().minute() % interval; + int currentCount = past * 60 + _now.time().second(); // Seconds since the last interval mark - totalCount( past * 60 + _now.time().second()); + if ( _interval && _enableBPCuff ) { totalCount( currentCount ); } // Seconds until the next interval mark - int totalSecLeft = _interval * 60 - _totalCount; + int totalSecLeft = interval * 60 - currentCount; // trigger timeout when timer countdown is done if (totalSecLeft <= 1 ) { timerStop(); - emit didTrigger(); + emit didTimeout(); } // construct count down string - int counter_min = totalSecLeft / 60; - int counter_sec = totalSecLeft % 60; - countdown( QStringLiteral("%1:%2") .arg(counter_min,2,10,QChar('0')) - .arg(counter_sec,2,10,QChar('0')) ); + if ( _interval && _enableBPCuff ) { + int counter_min = totalSecLeft / 60; + int counter_sec = totalSecLeft % 60; + countdown( QStringLiteral("%1:%2") .arg(counter_min,2,10,QChar('0')) + .arg(counter_sec,2,10,QChar('0')) ); + } } /*! Index: sources/view/hd/adjustment/common/VCommonAdjustmentVitals.h =================================================================== diff -u -rfaf6802c35d530181106342f840b4cd9c851e272 -r0be698733fd4570240a91703978fee7d53a76121 --- sources/view/hd/adjustment/common/VCommonAdjustmentVitals.h (.../VCommonAdjustmentVitals.h) (revision faf6802c35d530181106342f840b4cd9c851e272) +++ sources/view/hd/adjustment/common/VCommonAdjustmentVitals.h (.../VCommonAdjustmentVitals.h) (revision 0be698733fd4570240a91703978fee7d53a76121) @@ -51,6 +51,7 @@ // timer PROPERTY( bool , canStartInterval , 0) + PROPERTY( bool , enableBPCuff , 0) // TODO: PRS 343 enable/ disable Integrated Blood Pressure Cuff PROPERTY( quint8 , interval , 0) // show the vital screen in min // timestamp @@ -104,6 +105,11 @@ void didTrigger(); /*! + * \brief didTimeout + * \details the signal to trigger the Gui to notify the user for time has timed out + */ + void didTimeout(); + /*! * \brief didAdjustment * \details the notification signal to request vitals * \param vData - data model for the duration adjustment request