Index: sources/storage/TreatmentLog.h =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r928a1ed5d70358fc00c49df45725f989d16c370e --- sources/storage/TreatmentLog.h (.../TreatmentLog.h) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/storage/TreatmentLog.h (.../TreatmentLog.h) (revision 928a1ed5d70358fc00c49df45725f989d16c370e) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2021-2022 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2023 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file TreatmentLog.h * \author (last) Behrouz NematiPour - * \date (last) 13-Dec-2021 + * \date (last) 27-Jun-2022 * \author (original) Behrouz NematiPour * \date (original) 04-May-2021 * @@ -41,6 +41,7 @@ Q_OBJECT QString _treatmentLogPath; + QString _treatmentLogPath_Pending; QFutureWatcher _saveWatcher; QFutureWatcher _exportWatcher; @@ -54,11 +55,11 @@ QString _unitTextDurationHour = tr("hour" ); QString _unitTextDurationMin = tr("min" ); QString _unitTextConcentration = tr("mEg/L" ); - QString _unitTextTemperature = tr("°C" ); + QString _unitTextTemperature = tr("C" ); QString _unitTextVolume = tr("L" ); QString _unitTextFluid = tr("mL" ); QString _unitTextHeparinConcentration = tr("IU/mL" ); - QString _unitTextDispencingRate = tr("mL/hr" ); + QString _unitTextDispensingRate = tr("mL/hr" ); QString _unitTextBloodPressure = tr("mmHg" ); struct TxInfo { @@ -78,6 +79,9 @@ _lastTxInfo; + QString _deviceID = ""; + QString _txCode = ""; // content of this value comes from CloudSync App. + enum Role { eValue, eTitle, @@ -86,7 +90,6 @@ enum TreatmentLogIndex { ePatientID , - eDeviceID , eBloodFlowRate , eDialysateFlowRate , eTreatmentDuration , @@ -109,23 +112,18 @@ eTreatmentEndDateTime , eWaterSampleTestResult , eDialysateVolumeUsed , + eOriginUFVolume , eTargetUFVolume , eActualUFVolume , + eOriginUFRate , eTargetUFRate , eActualUFRate , eSalineBolusVolume , - eAverageBloodFlow , - eAverageDialysateFlow , - eAverageDialysateTemp , - eAverageArterialPressure , - eAverageVenousPressure , - - eTreatmentLogIndexCount + eTreatmentLogIndexCount , }; const QStringList _titles { tr("Patient ID" ), // ePatientID - tr("Device ID" ), // eDeviceID tr("Blood Flow Rate" ), // eBloodFlowRate tr("Dialysate Flow Rate" ), // eDialysateFlowRate tr("Treatment Duration" ), // eTreatmentDuration @@ -148,21 +146,17 @@ tr("Treatment End DateTime" ), // eTreatmentEndDateTime tr("Water Sample Test Result" ), // eWaterSampleTestResult tr("Dialysate Volume Used" ), // eDialysateVolumeUsed + tr("Prescribed UF Volume" ), // eOriginUFVolume tr("Target UF Volume" ), // eTargetUFVolume tr("Actual UF Volume" ), // eActualUFVolume + tr("Prescribed UF Rate" ), // eOriginUFRate tr("Target UF Rate" ), // eTargetUFRate tr("Actual UF Rate" ), // eActualUFRate tr("Saline Bolus Volume" ), // eSalineBolusVolume - tr("Average Blood Flow" ), // eAverageBloodFlow - tr("Average Dialysate Flow" ), // eAverageDialysateFlow - tr("Average Dialysate Temp" ), // eAverageDialysateTemp - tr("Average Arterial Pressure" ), // eAverageArterialPressure - tr("Average Venous Pressure" ), // eAverageVenousPressure }; const QStringList _units { "" , // ePatientID - "" , // eDeviceID _unitTextFlowRate , // eBloodFlowRate _unitTextFlowRate , // eDialysateFlowRate _unitTextDurationMin , // eTreatmentDuration @@ -178,23 +172,20 @@ "" , // eHeparinType _unitTextHeparinConcentration , // eHeparinConcentration _unitTextFluid , // eHeparinBolusVolume - _unitTextDispencingRate , // eHeparinDispenseRate + _unitTextDispensingRate , // eHeparinDispenseRate _unitTextDurationMin , // eHeparinStop _unitTextFluid , // eHeparinDeliveredVolume "" , // eTreatmentStartDateTime "" , // eTreatmentEndDateTime "" , // eWaterSampleTestResult _unitTextVolume , // eDialysateVolumeUsed + _unitTextVolume , // eOriginUFVolume _unitTextVolume , // eTargetUFVolume _unitTextVolume , // eActualUFVolume + _unitTextFlowRate , // eOriginUFRate _unitTextFlowRate , // eTargetUFRate _unitTextFlowRate , // eActualUFRate _unitTextFluid , // eSalineBolusVolume - _unitTextFlowRate , // eAverageBloodFlow - _unitTextFlowRate , // eAverageDialysateFlow - _unitTextTemperature , // eAverageDialysateTemp - _unitTextBloodPressure , // eAverageArterialPressure - _unitTextBloodPressure , // eAverageVenousPressure }; QString title(quint8 vIndex) const { @@ -223,6 +214,7 @@ void saveLogConcurrent (); bool exportLog (); void exportLogConcurrent(); + bool addTxCode(); NOTIFIER(isIdle) SINGLETON(TreatmentLog) @@ -238,19 +230,26 @@ void append(const TreatmentLogAlarmData &vData); void append(const TreatmentLogEventData &vData); + QString logPath () { return _treatmentLogPath ;} + QString logPathPending () { return _treatmentLogPath_Pending ;} + private slots: void onLogPathSet(Logger::LogType vLogType, const QString &vLogPath); void onSave (); void onExport (); + void onTxCodeReceive(const QString &vTxCode); public slots: void doSave (); void doExport (); signals: - void didTreatmentLogSave( const QString &vPatientID , - const QString &vDeviceID , + void didTreatmentLogSave( const QString &vDeviceID , + const QString &vPatientID , const QString &vFileName ); + void didTxCodeReceive ( const QString &vTxCode ); + + void didNotification ( const QString &vNotification); }; }