Index: sources/storage/TreatmentLog.cpp =================================================================== diff -u -ra7c8f14c6d5420ea15cdbd8fc6e3c46bae1052cb -r3b323bd6a1a03429c2321a889049de1c3b11302f --- sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision a7c8f14c6d5420ea15cdbd8fc6e3c46bae1052cb) +++ sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision 3b323bd6a1a03429c2321a889049de1c3b11302f) @@ -7,7 +7,7 @@ * * \file TreatmentLog.cpp * \author (last) Behrouz NematiPour - * \date (last) 21-Nov-2023 + * \date (last) 13-Mar-2024 * \author (original) Behrouz NematiPour * \date (original) 04-May-2021 * @@ -22,7 +22,6 @@ #include "FileHandler.h" #include "ApplicationController.h" #include "Logger.h" -// #include "MSettings.h" #include "Settings.h" #include "CloudSyncController.h" @@ -32,7 +31,12 @@ #define FLOAT3 0,'f',3 #define ADDTITLE(vTITLE) logContent += QString("[%1]\n").arg(vTITLE) #define ADDALINE(vTEXT ) logContent += QString("%1\n" ).arg(vTEXT ) -#define ADDTOLOG(vINDEX) index = vINDEX; logContent += title(index) + _sep + value(index) + _sep + unit(index) + "\n"; +#define ADDTOLOG( vINDEX ) index = vINDEX; logContent += title(index) + _sep + value(index) + _sep + unit(index) + "\n"; +#define ADDTOLOG_MT(vINDEX, vVALUE ) \ + index = vINDEX; \ + logContent += title(index) + _sep + \ + ( value(index).trimmed().isEmpty() ? vVALUE : value(index) ) + _sep + \ + unit(index) + "\n"; /*! * \brief TreatmentLog::TreatmentLog @@ -332,7 +336,7 @@ ADDTITLE("Title"); ADDALINE(txCode .arg(_txCodeKey).arg(_gTxCode) ); - ADDTOLOG( ePatientID ); + ADDTOLOG_MT( ePatientID, _emptyPatinetID ); ADDTITLE("Treatment Parameters" ); ADDTOLOG( eTreatmentDuration ); @@ -642,6 +646,7 @@ if ( pendingFiles.count() ) { // the most recent/first Tx file, to first ask for the current treatment which has just saved as pending on screen _pendingTxr = pendingFiles.first().absoluteFilePath(); + // DEBUG qDebug() << _pendingTxr; if (pendingTxr != _pendingTxr ) { pendingTxr = _pendingTxr; findTxCode();