Index: denali.pro =================================================================== diff -u -ra5be04172757fa469d85fb83a6998a4404214f19 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- denali.pro (.../denali.pro) (revision a5be04172757fa469d85fb83a6998a4404214f19) +++ denali.pro (.../denali.pro) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -63,6 +63,7 @@ sources/model/hd/data/pretreatment \ sources/model/hd/data/treatment \ sources/model/hd/data/posttreatment \ + sources/model/hd/data/treatmentlog \ sources/model/dg/data \ sources/model/dg/data/pretreatment \ sources/model/dg/data/disinfect \ Index: denali.pro.user =================================================================== diff -u -ra5be04172757fa469d85fb83a6998a4404214f19 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- denali.pro.user (.../denali.pro.user) (revision a5be04172757fa469d85fb83a6998a4404214f19) +++ denali.pro.user (.../denali.pro.user) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -1,6 +1,6 @@ - + EnvironmentId Index: en_US.udic =================================================================== diff -u -ra5be04172757fa469d85fb83a6998a4404214f19 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- en_US.udic (.../en_US.udic) (revision a5be04172757fa469d85fb83a6998a4404214f19) +++ en_US.udic (.../en_US.udic) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -112,3 +112,6 @@ HDAccel Avrge Param +BUSFault +ACKBACK +ActionID Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -re125bd5cf13750eaf241d518b9c846139afaa81c -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -302,6 +302,7 @@ } /** + * \brief MessageDispatcher::onAdjustment * \details This method transmits the User Action Denali message. * \param vData - Data model contains User Action on the alarm dialog. * \return void @@ -313,6 +314,18 @@ onActionTransmit(GuiActionType::ID_AlarmUserActionReq, mData); } +/** + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Alarm Active List Request denali message. + * \param vData - Data model contains Alarm Active List payload. + * \return void + */ +void MessageDispatcher::onAdjustment(const AlarmActiveListRequestData &) +{ + QVariantList mData; + onActionTransmit(GuiActionType::ID_AlarmUserActionReq, mData); +} + /*! * \brief MessageDispatcher::onAdjustment * \details This method transmits the Alarm Acknowledge Request message. Index: sources/canbus/MessageDispatcher.h =================================================================== diff -u -ra5be04172757fa469d85fb83a6998a4404214f19 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision a5be04172757fa469d85fb83a6998a4404214f19) +++ sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -139,13 +139,17 @@ // Post-Treatment GuiActionType::ID_AdjustPatientDisconnectionConfirmReq , GuiActionType::ID_AdjustDisposablesRemovalConfirmReq , - GuiActionType::ID_AdjustTreatmentLogReq , // Disinfect GuiActionType::ID_AdjustDisinfectReq , GuiActionType::ID_AdjustChemicalConfirmReq , // Settings GuiActionType::ID_AdjustHDDateTimeReq , GuiActionType::ID_AdjustDGDateTimeReq , + // Treatment Log + GuiActionType::ID_AdjustTreatmentLogReq , + GuiActionType::ID_TreatmentLogAvrgeData , + GuiActionType::ID_TreatmentLogAlarmData , + GuiActionType::ID_TreatmentLogEventData , }; public slots: Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -ra5be04172757fa469d85fb83a6998a4404214f19 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision a5be04172757fa469d85fb83a6998a4404214f19) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -190,6 +190,9 @@ // ---- Treatment Log {Gui::GuiActionType::ID_AdjustTreatmentLogReq , 0 * 4 }, // 1 parameter each 4bytes {Gui::GuiActionType::ID_AdjustTreatmentLogRsp , 35 * 4 }, //35 parameter each 4bytes + {Gui::GuiActionType::ID_TreatmentLogAvrgeData , 6 * 4 }, // 6 parameter each 4bytes + {Gui::GuiActionType::ID_TreatmentLogAlarmData , 4 * 4 }, // 4 parameter each 4bytes + {Gui::GuiActionType::ID_TreatmentLogEventData , 4 * 4 }, // 4 parameter each 4bytes // ---- Versions {Gui::GuiActionType::ID_AdjustVersionsReq , 0 * 4 }, // 0 parameters each 4bytes Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r7077e38c74db9cccb5496ffefcf8936c0916de76 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 7077e38c74db9cccb5496ffefcf8936c0916de76) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -95,6 +95,10 @@ bool MessageInterpreter::isType(const Message &vMessage, Gui::GuiActionType vType) const { if ( vMessage.actionId != vType ) { + LOG_DEBUG(QString("Incorrect expected ID '%1', got '%2'") + .arg(vType) + .arg(vMessage.actionId) + ); return false; } return true; @@ -275,6 +279,7 @@ case Gui::GuiActionType::ID_AlarmUserActionReq : INTERPRET_TRANSMIT_MESSAGE(AlarmUserActionRequestData ); break; // coco begin validated: Manually tested. This model class is a placeholder for the message 63(0x3F00) and there is no use case for this now. case Gui::GuiActionType::ID_AlarmClearedConditionReq : INTERPRET_TRANSMIT_MESSAGE(AlarmClearedConditionRequestData ); break; + case Gui::GuiActionType::ID_AlarmActiveListReq : INTERPRET_TRSMT_MT_MESSAGE(AlarmActiveListRequestData ); break; // coco end default: QString mActionIdHexString = Format::toHexString(vActionId); @@ -400,6 +405,10 @@ // ----- Post-Treatment Adjust case Gui::GuiActionType::ID_AdjustDisposableRemovalConfirmRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustDisposableRemovalConfirmRsp ); break; case Gui::GuiActionType::ID_AdjustTreatmentLogRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustTreatmentLogRsp ); break; + // ----- Treatment Log + case Gui::GuiActionType::ID_TreatmentLogAvrgeData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentLogAvrgeData ); break; + case Gui::GuiActionType::ID_TreatmentLogAlarmData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentLogAlarmData ); break; + case Gui::GuiActionType::ID_TreatmentLogEventData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentLogEventData ); break; // ----- Disinfection - Adjust case Gui::GuiActionType::ID_AdjustDisinfectRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustDisinfectRsp ); break; @@ -415,11 +424,12 @@ case Gui::GuiActionType::ID_AlarmCleared : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AlarmCleared ); break; // coco begin validated: Manually tested. This model class is a placeholder for the message 63(0x3F00) and there is no use case for this now. case Gui::GuiActionType::ID_AlarmClearedConditionRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AlarmClearedConditionRsp ); break; + case Gui::GuiActionType::ID_AlarmActiveListRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AlarmActiveListRsp ); break; // coco end // unhandled messages: these will only be logged as received message // there has nothing been defined for these messages. - default : printUnhandled(vMessage); break; + default : printUnhandled(vMessage); break; } return ok; Index: sources/gui/GuiGlobals.h =================================================================== diff -u -ra5be04172757fa469d85fb83a6998a4404214f19 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision a5be04172757fa469d85fb83a6998a4404214f19) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -218,9 +218,13 @@ ID_AdjustDisposablesRemovalConfirmReq = 0x7300, // 115 ID_AdjustDisposableRemovalConfirmRsp = 0x7400, // 116 - // Treatment Log + // Treatment Log Adjs ID_AdjustTreatmentLogReq = 0x7500, // 117 ID_AdjustTreatmentLogRsp = 0x7600, // 118 + // Treatment Log Data + ID_TreatmentLogAvrgeData = 0x9400, // 148 + ID_TreatmentLogAlarmData = 0x9500, // 149 + ID_TreatmentLogEventData = 0x9600, // 150 // Disinfect ID_AdjustDisinfectReq = 0x7F00, // 127 Index: sources/model/MModel.h =================================================================== diff -u -r7077e38c74db9cccb5496ffefcf8936c0916de76 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/model/MModel.h (.../MModel.h) (revision 7077e38c74db9cccb5496ffefcf8936c0916de76) +++ sources/model/MModel.h (.../MModel.h) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -23,6 +23,7 @@ #include "MAlarmTriggered.h" #include "MAlarmCleared.h" #include "MAlarmClearedCondition.h" +#include "MAlarmActiveList.h" // States Messages #include "MHDOperationModeData.h" @@ -100,7 +101,11 @@ // Post-Treatment #include "MPostTreatmentAdjustRequests.h" #include "MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h" +// Treatment Log #include "MPostTreatmentAdjustTreatmentLogResponse.h" +#include "MTreatmentLogAvrgeData.h" +#include "MTreatmentLogAlarmData.h" +#include "MTreatmentLogEventData.h" // Disinfection #include "MDisinfectAdjustRequests.h" @@ -229,10 +234,10 @@ \details Registers the models in the Qt MetaType so it can be used in signal/slots between threads. */ #define REGISTER_MODEL_METATYPES \ - \ + /* Settings */ \ REGISTER_METATYPE( SettingsData ) \ REGISTER_METATYPE( WifiNetworkData ) \ - \ + /* Data */ \ REGISTER_METATYPE( HDOperationModeData ) \ REGISTER_METATYPE( PreTreatmentStatesData ) \ REGISTER_METATYPE( TreatmentStatesData ) \ @@ -251,7 +256,11 @@ REGISTER_METATYPE( TreatmentRecirculateData ) \ REGISTER_METATYPE( TreatmentBloodPrimeData ) \ REGISTER_METATYPE( HDAccelerometerData ) \ - \ + /* Treatment Log */ \ + REGISTER_METATYPE( TreatmentLogAvrgeData ) \ + REGISTER_METATYPE( TreatmentLogAlarmData ) \ + REGISTER_METATYPE( TreatmentLogEventData ) \ + /* Alarms */ \ REGISTER_METATYPE( AlarmStatusData ) \ REGISTER_METATYPE( AlarmTriggeredData ) \ REGISTER_METATYPE( AlarmClearedData ) \ @@ -303,8 +312,10 @@ REGISTER_METATYPE( AdjustDisinfectRequestData ) \ REGISTER_METATYPE( AdjustChemicalConfirmRequestData ) \ \ + /* Alarms */ \ REGISTER_METATYPE( AlarmSilenceRequestData ) \ REGISTER_METATYPE( AlarmUserActionRequestData ) \ + REGISTER_METATYPE( AlarmActiveListRequestData ) \ /* coco begin validated: Manually tested. This model class is a placeholder and there is no use case for this now. REGISTER_METATYPE( AlarmClearedConditionRequestData ) \ coco end*/ \ @@ -355,8 +366,11 @@ REGISTER_METATYPE( AdjustDGVersionsResponseData ) \ REGISTER_METATYPE( AdjustHDDateTimeResponseData ) \ REGISTER_METATYPE( AdjustDGDateTimeResponseData ) \ + /* Alarms - Active List Response */ \ + REGISTER_METATYPE( AlarmActiveListResponseData ) \ + //===============================================================================// /*! \def ACTION_RECEIVE_MODEL_BRIDGE_CONNECTIONS @@ -392,7 +406,11 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentRecirculateData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentBloodPrimeData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDAccelerometerData ) \ - \ + /* Treatment Log */ \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentLogAvrgeData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentLogAlarmData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentLogEventData ) \ + /* Alarms */ \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AlarmStatusData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AlarmTriggeredData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AlarmClearedData ) \ @@ -453,7 +471,10 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustDGVersionsResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustHDDateTimeResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustDGDateTimeResponseData ) \ + /* Alarms - Active List Response */ \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AlarmActiveListResponseData ) \ + // /* Request */ ---------------------------------------------------------// #define ADJUST_TRANSMT_MODEL_BRIDGE_CONNECTIONS(vSOURCE) \ \ @@ -494,6 +515,7 @@ /* Alarms */ \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmSilenceRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmUserActionRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmActiveListRequestData ) \ /* coco begin validated: Manually tested. This model class is a placeholder and there is no use case for this now. ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmClearedConditionRequestData ) \ coco end */ \ @@ -536,7 +558,11 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentRecirculateData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentBloodPrimeData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( HDAccelerometerData ) \ - \ + /* Treatment Log */ \ + ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentLogAvrgeData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentLogAlarmData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentLogEventData ) \ + /* Alarms */ \ ACTION_RECEIVE_BRIDGE_DEFINITION( AlarmStatusData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AlarmTriggeredData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AlarmClearedData ) \ @@ -597,7 +623,10 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustDGVersionsResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustHDDateTimeResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustDGDateTimeResponseData ) \ + /* Alarms - Active List Response */ \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AlarmActiveListResponseData ) \ + #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS \ /* Request --------------------------------------------------------- */ \ /* Post-Treatment */ \ @@ -635,9 +664,10 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustVersionsRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustHDDateTimeRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustDGDateTimeRequestData ) \ - \ + /* Alarms */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmSilenceRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmUserActionRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmActiveListRequestData ) \ /* coco begin validated: Manually tested. This model class is a placeholder and there is no use case for this now. ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmClearedConditionRequestData ) \ coco end */ \ @@ -679,9 +709,10 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustVersionsRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustHDDateTimeRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustDGDateTimeRequestData ) \ - \ + /* Alarms */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmSilenceRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmUserActionRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmActiveListRequestData ) \ /* coco begin validated: Manually tested. This model class is a placeholder and there is no use case for this now. ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmClearedConditionRequestData ) \ coco end */ \ @@ -723,9 +754,10 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustVersionsRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustHDDateTimeRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustDGDateTimeRequestData ) \ - \ + /* Alarms */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmSilenceRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmUserActionRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmActiveListRequestData ) \ /* coco begin validated: Manually tested. This model class is a placeholder and there is no use case for this now. ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmClearedConditionRequestData ) \ coco end */ \ @@ -753,11 +785,16 @@ ACTION_RECEIVE_SIGNAL( TreatmentRecirculateData ) \ ACTION_RECEIVE_SIGNAL( TreatmentBloodPrimeData ) \ ACTION_RECEIVE_SIGNAL( HDAccelerometerData ) \ - \ + /* Alarms */ \ ACTION_RECEIVE_SIGNAL( AlarmStatusData ) \ ACTION_RECEIVE_SIGNAL( AlarmTriggeredData ) \ ACTION_RECEIVE_SIGNAL( AlarmClearedData ) \ ACTION_RECEIVE_SIGNAL( AlarmClearedConditionData ) \ + /* Treatment Log */ \ + ACTION_RECEIVE_SIGNAL( TreatmentLogAvrgeData ) \ + ACTION_RECEIVE_SIGNAL( TreatmentLogAlarmData ) \ + ACTION_RECEIVE_SIGNAL( TreatmentLogEventData ) \ + \ ACTION_RECEIVE_SIGNAL( DGROPumpData ) \ ACTION_RECEIVE_SIGNAL( DGPressuresData ) \ ACTION_RECEIVE_SIGNAL( DGDrainPumpData ) \ @@ -812,6 +849,9 @@ ACTION_RECEIVE_SIGNAL( AdjustDGVersionsResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustHDDateTimeResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustDGDateTimeResponseData ) \ + /* Alarms */ \ + ACTION_RECEIVE_SIGNAL( AlarmActiveListResponseData ) \ + //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// Index: sources/model/hd/alarm/MAlarmActiveList.h =================================================================== diff -u -ra5be04172757fa469d85fb83a6998a4404214f19 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/model/hd/alarm/MAlarmActiveList.h (.../MAlarmActiveList.h) (revision a5be04172757fa469d85fb83a6998a4404214f19) +++ sources/model/hd/alarm/MAlarmActiveList.h (.../MAlarmActiveList.h) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -80,11 +80,11 @@ * \sa MAlarmActiveListReq : Alarm Active List Request * *

Logging info

- * | || - * | || - * | typeText | Event | - * | unitText | HD | - * | infoText | AdjustTreatmentLog | + * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustTreatmentLog | * */ class MAlarmActiveListResponse : public MAbstract { @@ -137,5 +137,5 @@ }; } -typedef Model::MAlarmActiveListReq AdjustPowerOffRequestData; +typedef Model::MAlarmActiveListReq AlarmActiveListRequestData; typedef Model::MAlarmActiveListResponse::Data AlarmActiveListResponseData; Index: sources/model/hd/data/treatmentlog/MTreatmentLogAlarmData.h =================================================================== diff -u -ra5be04172757fa469d85fb83a6998a4404214f19 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/model/hd/data/treatmentlog/MTreatmentLogAlarmData.h (.../MTreatmentLogAlarmData.h) (revision a5be04172757fa469d85fb83a6998a4404214f19) +++ sources/model/hd/data/treatmentlog/MTreatmentLogAlarmData.h (.../MTreatmentLogAlarmData.h) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -45,11 +45,11 @@ * \sa HD_Post_Treatment_Mode_States * *

Logging info

- * | || - * | || - * | typeText | Datum | - * | unitText | HD | - * | infoText | TreatmentLogAlarm | + * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | TreatmentLogAlarm | * */ class MTreatmentLogAlarmData : public MAbstract { Index: sources/model/hd/data/treatmentlog/MTreatmentLogAvrgeData.h =================================================================== diff -u -ra5be04172757fa469d85fb83a6998a4404214f19 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/model/hd/data/treatmentlog/MTreatmentLogAvrgeData.h (.../MTreatmentLogAvrgeData.h) (revision a5be04172757fa469d85fb83a6998a4404214f19) +++ sources/model/hd/data/treatmentlog/MTreatmentLogAvrgeData.h (.../MTreatmentLogAvrgeData.h) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -48,11 +48,11 @@ * \sa HD_Post_Treatment_Mode_States * *

Logging info

- * | || - * | || - * | typeText | Datum | - * | unitText | HD | - * | infoText | TreatmentLogAvrge | + * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | TreatmentLogAvrge | * */ class MTreatmentLogAvrgeData : public MAbstract { @@ -84,6 +84,9 @@ float mUFRate ; ///< 4 - (F32) Ultrafiltration Rate (mmHg) float mArterialPressure ; ///< 5 - (F32) Arterial Pressure (mmHg) float mVenousPressure ; ///< 6 - (F32) Venous Pressure (mmHg) + quint32 mSystolic ; ///< Systolic Blood Pressure - This value is not coming from FW and will be get from UI and User. + quint32 mDiastolic ; ///< Diastolic Blood Pressure - This value is not coming from FW and will be get from UI and User. + quint32 mHeartRate ; ///< Heart Rate - This value is not coming from FW and will be get from UI and User. }; MTreatmentLogAvrgeData() { } Index: sources/model/hd/data/treatmentlog/MTreatmentLogEventData.h =================================================================== diff -u -ra5be04172757fa469d85fb83a6998a4404214f19 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/model/hd/data/treatmentlog/MTreatmentLogEventData.h (.../MTreatmentLogEventData.h) (revision a5be04172757fa469d85fb83a6998a4404214f19) +++ sources/model/hd/data/treatmentlog/MTreatmentLogEventData.h (.../MTreatmentLogEventData.h) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -46,11 +46,11 @@ * \sa HD_Post_Treatment_Mode_States * *

Logging info

- * | || - * | || - * | typeText | Datum | - * | unitText | HD | - * | infoText | TreatmentLogEvent | + * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | TreatmentLogEvent | * */ class MTreatmentLogEventData : public MAbstract { Index: sources/storage/TreatmentLog.cpp =================================================================== diff -u -r7077e38c74db9cccb5496ffefcf8936c0916de76 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision 7077e38c74db9cccb5496ffefcf8936c0916de76) +++ sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -25,6 +25,8 @@ using namespace Storage; +#define ADDTITLE(vTITLE) logContent += QString("[%1]\n").arg(vTITLE) +#define ADDALINE(vTEXT ) logContent += QString("%1\n" ).arg(vTEXT ) #define ADDTOLOG(vINDEX) index = vINDEX; logContent += _titles[index] + sep + _values[index] + sep + _units[index] + "\n"; /*! @@ -62,8 +64,6 @@ // qDebug() << _Settings.groups(); // SRSUI910 : PRS187 : Clinical - Data - Order - - QString mTreatmentDuration = QTime (0, 0).addSecs(vData.mTreatmentDuration ).toString("HH:mm"); QString mActualTreatmentDuration = QTime (0, 0).addSecs(vData.mActualTreatmentDuration ).toString("HH:mm"); QString mTreatmentDateTime = QDateTime::fromSecsSinceEpoch ( vData.mTreatmentDateTime ).toString("yyyy/MM/dd HH:mm"); @@ -120,6 +120,14 @@ _values[eEndTreatmentEarlyAlarm ] = mStrText.arg(vData.mEndTreatmentEarlyAlarm ); } +/*! + * \brief TreatmentLog::append + * \param vData - the received data to be kept in the list to be appended at the end of the Treatment Log + */ +void TreatmentLog::append(const TreatmentLogAvrgeData &vData) { _treatmentLogAvrgeData.append(vData); } +void TreatmentLog::append(const TreatmentLogAlarmData &vData) { _treatmentLogAlarmData.append(vData); } +void TreatmentLog::append(const TreatmentLogEventData &vData) { _treatmentLogEventData.append(vData); } + // ----- Save /*! * \brief TreatmentLog::doSave @@ -156,13 +164,18 @@ QString logContent; QString sep = ","; + QString csv = "%1" + sep; uint index = 0; - logContent += tr("Patient ID") + sep + QString("None") + "\n"; - + const char *NONE = "N/A"; + ADDTITLE("Title"); + ADDALINE(csv.arg(tr("Patient Name")) + NONE ); + ADDALINE(csv.arg(tr("Patient ID" )) + NONE ); + ADDTOLOG( eTreatmentDateTime ); ADDTOLOG( eDeviceID ); + + ADDTITLE("Treatment Parameters" ); ADDTOLOG( eBloodFlowRate ); ADDTOLOG( eDialysateFlowRate ); - ADDTOLOG( eTreatmentDuration ); ADDTOLOG( eActualTreatmentDuration ); ADDTOLOG( eAcidConcentrateType ); ADDTOLOG( eBicarbonateConcentrateType ); @@ -177,22 +190,65 @@ ADDTOLOG( eHeparinBolusVolume ); ADDTOLOG( eHeparinDispenseRate ); ADDTOLOG( eHeparinStop ); - ADDTOLOG( eHeparinDeliveredVolume ); - ADDTOLOG( eTreatmentDateTime ); - ADDTOLOG( eWaterSampleTestResult ); + + ADDTITLE("Treatment Parameters" ); + ADDTITLE(csv.arg(tr("Start Time")) + NONE ); + ADDTITLE(csv.arg(tr("End Time" )) + NONE ); + ADDTOLOG( eTreatmentDuration ); + + ADDTITLE("Post-Treatment Data" ); ADDTOLOG( eDialysateVolumeUsed ); ADDTOLOG( eTargetUFVolume ); ADDTOLOG( eActualUFVolume ); + ADDTOLOG( eSalineBolusVolume ); + ADDTOLOG( eHeparinDeliveredVolume ); + + ADDTITLE("Extra" ); + ADDTOLOG( eWaterSampleTestResult ); ADDTOLOG( eTargetUFRate ); ADDTOLOG( eActualUFRate ); - ADDTOLOG( eSalineBolusVolume ); ADDTOLOG( eAverageBloodFlow ); ADDTOLOG( eAverageDialysateFlow ); ADDTOLOG( eAverageDialysateTemp ); ADDTOLOG( eAverageArterialPressure ); ADDTOLOG( eAverageVenousPressure ); ADDTOLOG( eEndTreatmentEarlyAlarm ); + ADDTITLE("Treatment Data" ); + for ( const TreatmentLogAvrgeData &item : _treatmentLogAvrgeData ) { + QString line; + line += csv.arg(item.mTimeStamp); + line += csv.arg(NONE); + line += csv.arg(item.mBloodFlowRate); + line += csv.arg(item.mDialysateFlowRate); + line += csv.arg(item.mUFRate); + line += csv.arg(item.mArterialPressure); + line += csv.arg(item.mVenousPressure); + line += csv.arg(item.mSystolic); + line += csv.arg(item.mDiastolic); + line += csv.arg(item.mHeartRate); + ADDALINE(line); + } + + ADDTITLE("Treatment Alarms" ); + for ( const TreatmentLogAlarmData &item : _treatmentLogAlarmData ) { + QString line; + line += csv.arg(item.mTimeStamp); + line += csv.arg(item.mAlarmID); + line += csv.arg(item.mParam1); + ADDALINE(line); + } + + ADDTITLE("Treatment Events" ); + for ( const TreatmentLogEventData &item : _treatmentLogEventData ) { + QString line; + line += csv.arg(item.mTimeStamp); + line += csv.arg(item.mEventID); + line += csv.arg(item.mOldValue); + line += csv.arg(item.mNewValue); + ADDALINE(line); + } + QString mDateTime = _values[eTreatmentDateTime]; mDateTime.replace("/", "" ); // remove date separator mDateTime.replace(":", "" ); // remove time separator Index: sources/storage/TreatmentLog.h =================================================================== diff -u -r7077e38c74db9cccb5496ffefcf8936c0916de76 -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/storage/TreatmentLog.h (.../TreatmentLog.h) (revision 7077e38c74db9cccb5496ffefcf8936c0916de76) +++ sources/storage/TreatmentLog.h (.../TreatmentLog.h) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -22,6 +22,9 @@ // Project #include "main.h" // Doxygen : don't remove #include "MPostTreatmentAdjustTreatmentLogResponse.h" +#include "MTreatmentLogAvrgeData.h" +#include "MTreatmentLogAlarmData.h" +#include "MTreatmentLogEventData.h" // define #define _TreatmentLog Storage::TreatmentLog::I() @@ -48,8 +51,6 @@ QString _unitTextDispencingRate = tr("mL/hr" ); QString _unitTextBloodPressure = tr("mmHg" ); - QStringList _values; - enum TreatmentLogIndex { eDeviceID , eBloodFlowRate , @@ -160,6 +161,12 @@ "" , }; + // Lists + QStringList _values; + QList _treatmentLogAvrgeData; + QList _treatmentLogAlarmData; + QList _treatmentLogEventData; + void initConnections(); bool saveLog (); @@ -177,6 +184,10 @@ const QStringList units () const { return _units ; } const QStringList values() const { return _values; } + void append(const TreatmentLogAvrgeData &vData); + void append(const TreatmentLogAlarmData &vData); + void append(const TreatmentLogEventData &vData); + private slots: void onSave (); void onExport (); Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp =================================================================== diff -u -r2216ac6ac7f77437a7c29ac8b4043be01bc4609e -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (.../VPostTreatmentAdjustTreatmentLog.cpp) (revision 2216ac6ac7f77437a7c29ac8b4043be01bc4609e) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (.../VPostTreatmentAdjustTreatmentLog.cpp) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -32,6 +32,11 @@ void View::VPostTreatmentAdjustmentTreatmentLog::initConnections() { ADJUST_VIEW_CONNECTION(AdjustTreatmentLogRequestData ); ACTION_VIEW_CONNECTION(AdjustTreatmentLogResponseData); + + ACTION_VIEW_CONNECTION(TreatmentLogAvrgeData); + ACTION_VIEW_CONNECTION(TreatmentLogAlarmData); + ACTION_VIEW_CONNECTION(TreatmentLogEventData); + connect(&_TreatmentLog , &TreatmentLog::isIdleNotified, this , [=](bool vIdle){isIdle(vIdle);}); } @@ -46,6 +51,14 @@ } /*! + * \brief View::VPostTreatmentAdjustmentTreatmentLog::doExport + * \details the invocable slot to send user's treatment log export request to the controller + */ +void View::VPostTreatmentAdjustmentTreatmentLog::doExport() { + _TreatmentLog.doExport(); +} + +/*! * \brief VPostTreatmentAdjustmentUltrafiltrationInit::onActionReceive * \details received response model data handler * \param vData - model data @@ -101,6 +114,11 @@ adjustment ( true ); } -void View::VPostTreatmentAdjustmentTreatmentLog::doExport() { - _TreatmentLog.doExport(); -} +/*! + * \brief VPostTreatmentAdjustmentUltrafiltrationInit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VPostTreatmentAdjustmentTreatmentLog::onActionReceive(const TreatmentLogAvrgeData &vData){ _TreatmentLog.append(vData); } +void View::VPostTreatmentAdjustmentTreatmentLog::onActionReceive(const TreatmentLogAlarmData &vData){ _TreatmentLog.append(vData); } +void View::VPostTreatmentAdjustmentTreatmentLog::onActionReceive(const TreatmentLogEventData &vData){ _TreatmentLog.append(vData); } Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h =================================================================== diff -u -r2216ac6ac7f77437a7c29ac8b4043be01bc4609e -rb3eb8bc9696c4db9867ad1cf13b47c455a94e0fe --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h (.../VPostTreatmentAdjustTreatmentLog.h) (revision 2216ac6ac7f77437a7c29ac8b4043be01bc4609e) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h (.../VPostTreatmentAdjustTreatmentLog.h) (revision b3eb8bc9696c4db9867ad1cf13b47c455a94e0fe) @@ -23,6 +23,9 @@ #include "main.h" // Doxygen : don't remove #include "VAdjustmentResponseBase.h" #include "TreatmentLog.h" // Model MPostTreatmentAdjustTreatmentLogResponse included in this controller header +#include "MTreatmentLogAvrgeData.h" +#include "MTreatmentLogAlarmData.h" +#include "MTreatmentLogEventData.h" namespace View { @@ -87,7 +90,11 @@ PROPERTY(bool , isIdle , true) - VIEW_DEC_CLASS_ADJUSTMENT(VPostTreatmentAdjustmentTreatmentLog, AdjustTreatmentLogResponseData) + VIEW_DEC_CLASS (VPostTreatmentAdjustmentTreatmentLog) + VIEW_DEC_SLOT (AdjustTreatmentLogResponseData) + VIEW_DEC_SLOT (TreatmentLogAvrgeData) + VIEW_DEC_SLOT (TreatmentLogAlarmData) + VIEW_DEC_SLOT (TreatmentLogEventData) public slots: void doRequest ();