Index: sources/storage/TreatmentLog.cpp =================================================================== diff -u -rb043c5b9919a9a435e50907772ec8346823b05d6 -rfe30c662d0fdf9df32883c17772b5803b84d229e --- sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision b043c5b9919a9a435e50907772ec8346823b05d6) +++ sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision fe30c662d0fdf9df32883c17772b5803b84d229e) @@ -7,7 +7,7 @@ * * \file TreatmentLog.cpp * \author (last) Behrouz NematiPour - * \date (last) 17-Jan-2024 + * \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();