Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml =================================================================== diff -u -r31b1e7a5d69f014398827e16286f28515cd60e35 -r23121e17d1a6120ae4a31930e18de362d9533bcb --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml (.../TreatmentAdjustmentVitals.qml) (revision 31b1e7a5d69f014398827e16286f28515cd60e35) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml (.../TreatmentAdjustmentVitals.qml) (revision 23121e17d1a6120ae4a31930e18de362d9533bcb) @@ -17,37 +17,40 @@ import QtQuick 2.12 // Project - -// Qml imports import "qrc:/globals" import "qrc:/components" import "qrc:/compounds" TreatmentAdjustmentBase { id: _root contentItem.objectName: "TreatmentAdjustmentVitals" - titleText : qsTr("VITALS") - confirmEnabled : _bphrEntry.isValid - height : 500 - width : 750 -// y : Variables.mainMenuHeight - x: numPad.isOpened ? Math.round((Variables.applicationWidth - width) / 2) - 200 : - Math.round((Variables.applicationWidth - width) / 2) + titleText : qsTr("VITALS") + confirmEnabled : _bphrEntry.isValid + height : 500 + width : 750 + x : numPad.isOpened ? Math.round((Variables.applicationWidth - width) / 2) - 200 : + Math.round((Variables.applicationWidth - width) / 2) + notification.visible: vTreatmentVitals.lastRead - notificationText: qsTr("Interval:" ) - + " " + (vTreatmentVitals.interval ? (vTreatmentVitals.interval + qsTr("min")) : qsTr("OFF")) - + " , " - + qsTr("Last Read:") - + " " + vTreatmentVitals.lastRead + property string notificationTextString: qsTr("Interval:" ) + + " " + (vTreatmentVitals.interval ? (vTreatmentVitals.interval + qsTr("min")) : qsTr("OFF")) + + " , " + + qsTr("Last Read:") + + " " + vTreatmentVitals.lastRead function update(vSystolic, vDiastolic ,vHeartRate) { _bphrEntry.systolic = vSystolic ? vSystolic : "" _bphrEntry.diastolic = vDiastolic ? vDiastolic : "" _bphrEntry.heartRate = vHeartRate ? vHeartRate : "" } - onOpened: vTreatmentVitals.doTimerStop() + onOpened: { + notificationText = notificationTextString + vTreatmentVitals.doTimerStop() + vTreatmentAdjustmentVitals.doRequest() ///trjhrtjr + } + onClosed: vTreatmentVitals.doTimerStart() onConfirmClicked: { @@ -66,17 +69,31 @@ vTreatmentVitals.doSkip() } - BPHREntry { id : _bphrEntry + BPHREntry { id: _bphrEntry contentRectHeight : 350 } Connections { target: vTreatmentVitals function onDidTrigger ( vSystolic, vDiastolic, vHeartRate ) { - print("**** vTreatmentVitals.enableDialo " + vTreatmentVitals.enableDialog) print(("%1 / %2 -- %3").arg(vSystolic).arg(vDiastolic).arg(vHeartRate)) - _headerBar.vitalsRecorded() + _root.update ( vSystolic, vDiastolic, vHeartRate ) + + // vitals recorded + if ( vSystolic && vDiastolic && vHeartRate ) { + print("**** vitalsRecorded ") + _headerBar.vitalsRecorded() + } + else { + print("**** vTreatmentAdjustmentVitals.doRequest() ") + + vTreatmentAdjustmentVitals.doRequest() + + } + + if ( vTreatmentVitals.enableDialog ) { - _root.update ( vSystolic, vDiastolic, vHeartRate ) + print("**** vTreatmentVitals.enableDialog " + vTreatmentVitals.enableDialog) +// _root.update ( vSystolic, vDiastolic, vHeartRate ) // _root.open () } }