Index: sources/view/VTreatmentCreate.cpp =================================================================== diff -u -rf9e747f0f28df1cc6a33179f0bc78bfc03d486fc -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision f9e747f0f28df1cc6a33179f0bc78bfc03d486fc) +++ sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2020-2023 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2024 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 VTreatmentCreate.cpp * \author (last) Behrouz NematiPour - * \date (last) 18-Jul-2023 + * \date (last) 21-Nov-2023 * \author (original) Peter Lucia * \date (original) 22-Sep-2020 * @@ -148,29 +148,30 @@ /*! * \brief VTreatmentCreate::generateTxCode - * \details Generates the txCode by combination of the HD serial number and date and time in yyyyMMddHHmm + * \details Generates the txCode by combination of the HD serial number and date and time in yyyyMMddHHmmss * And updates the TreatmenLog class to be saved in the Tx Report. */ void VTreatmentCreate::generateTxCode() { QDateTime datetime = QDateTime::currentDateTime(); - txCode(datetime.toString("%1yyyyMMddHHmm").arg(_HDSerialNumber)); + QString today = datetime.toString("yyyyMMddHHmmss"); + txCode(_HDSerialNumber + today); _TreatmentLog.gTxCode(_txCode); + LOG_APPED_UI(QString("Generated Treatment Code is %1").arg(_txCode)); } /*! * \brief VCreateTreatment::doGetPrescriptionParameterValues * \details Gets a list of the prescription parameter values * \return (QStringList) The list of parameter values with units */ -QStringList VTreatmentCreate::doGetPrescriptionParameterValues() -{ - return QStringList() << QString("%0 mL/min").arg(_bloodFlowRate) - << QString("%0 mL/min").arg(_dialysateFlowRate) - << QString("%0 min").arg(_treatmentDuration) - << ( _heparinDispensingRate ? QString("%0 mL/hr").arg(_heparinDispensingRate) : tr("OFF") ) - << ( _heparinBolusVolume ? QString("%0 mL" ).arg(_heparinBolusVolume ) : tr("OFF") ) - << QString("%0 min").arg(_heparinStopTime) - << QString("%0 mL").arg(_salineBolusVolume); +QStringList VTreatmentCreate::doGetPrescriptionParameterValues() { + return QStringList() << QString("%1 mL/min" ).arg(_bloodFlowRate ) + << QString("%1 mL/min" ).arg(_dialysateFlowRate ) + << QString("%1 min" ).arg(_treatmentDuration ) + << ( _heparinDispensingRate ? QString("%1 mL/hr" ).arg(_heparinDispensingRate) : tr("OFF") ) + << ( _heparinBolusVolume ? QString("%1 mL" ).arg(_heparinBolusVolume ) : tr("OFF") ) + << ( _heparinDispensingRate ? QString("%1 min" ).arg(_heparinStopTime ) : tr("OFF") ) + << QString("%1 mL" ).arg(_salineBolusVolume ) ; } /*! @@ -192,7 +193,7 @@ QString mCategory = Storage::Settings_Category_ConfigurationsDataList; - if ( heparinTypeSet () ) { + if ( heparinTypeSet () ) { // this is managed on UI with heparinTypeSet() // && ( _heparinDispensingRate || _heparinBolusVolume ) mHeparinTypeOptions = _Settings.keys(mCategory, "Heparin Type Options" ); if ((int) _heparinType < mHeparinTypeOptions .length()) mHeparinType = mHeparinTypeOptions .at( _heparinType ); } else { mHeparinType = tr("NONE"); }