Index: leahi.pro =================================================================== diff -u -r3da801fd23f007886f7fda5e9b45d17d565150d2 -rea37bc16ab57586729e332c2a9df3299f91012ca --- leahi.pro (.../leahi.pro) (revision 3da801fd23f007886f7fda5e9b45d17d565150d2) +++ leahi.pro (.../leahi.pro) (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -66,6 +66,7 @@ sources/model/td/adjustment/settings \ sources/model/td/adjustment/treatment \ sources/model/td/adjustment/pretreatment \ + sources/model/td/adjustment/posttreatment \ sources/model/dd \ sources/model/dd/data \ sources/model/dd/adjustment \ @@ -80,6 +81,7 @@ sources/view/td/data/treatment \ sources/view/td/adjustment/treatment \ sources/view/td/adjustment/pretreatment \ + sources/view/td/adjustment/posttreatment \ sources/view/dd \ sources/view/dd/data \ sources/view/confirm \ @@ -101,7 +103,6 @@ sources/model/hd/adjustment/settings \ sources/model/hd/adjustment/pretreatment \ sources/model/hd/adjustment/treatment \ - sources/model/hd/adjustment/posttreatment \ sources/model/hd/alarm \ sources/model/hd/data \ sources/model/hd/data/post \ @@ -121,7 +122,6 @@ sources/view/hd/adjustment \ sources/view/hd/adjustment/pretreatment \ sources/view/hd/adjustment/treatment \ - sources/view/hd/adjustment/posttreatment \ sources/view/hd/adjustment/disinfect \ sources/view/hd/alarm \ sources/view/hd/data \ @@ -300,6 +300,10 @@ \ # ---------- Views - TD - Adjustment - Pre-Treatment sources/view/td/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesConfirm.h \ sources/view/td/adjustment/pretreatment/VPreTreatmentAdjustmentStartTreatment.h \ + \ # ---------- Views - TD - Adjustment - Post-Treatment + sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.h \ + sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h \ + sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.h \ \ # ---------- Models - TD - Adjustment - In-Treatment sources/model/td/adjustment/treatment/MTreatmentAdjustSalineResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustRecirculateResponse.h \ @@ -315,6 +319,11 @@ \ # ---------- Models - TD - Adjustment - Pre-Treatment sources/model/td/adjustment/pretreatment/MPreTreatmentAdjustDisposablesConfirmResponse.h \ sources/model/td/adjustment/pretreatment/MPreTreatmentAdjustStartTreatmentResponse.h \ + \ # ---------- Models - TD - Adjustment - Post-Treatment + sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustRequests.h \ + sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.h \ + sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h \ + sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustPatientDisconnectionConfirmResponse.h \ \ # ---------- Models - confirm sources/model/confirm/MDuetConfirmHDi.h \ \ # ---------- Models - POST @@ -359,11 +368,6 @@ sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h \ sources/model/hd/adjustment/treatment/MTreatmentAdjustBloodDialysateResponse.h \ sources/model/hd/adjustment/treatment/MTreatmentAdjustHeparinResponse.h \ - \ # ---------- Models - HD - Adjustment - Post-Treatment - sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustRequests.h \ - sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.h \ - sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h \ - sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustPatientDisconnectionConfirmResponse.h \ \ # ---------- Models - HD - Adjustment - Disinfeection sources/model/hd/adjustment/disinfect/MDisinfectAdjustModeRequests.h \ sources/model/hd/adjustment/disinfect/MDisinfectAdjustModeResponse.h \ @@ -463,10 +467,6 @@ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRinseback.h \ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.h \ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentEnd.h \ - \ # ---------- Views - HD - Adjustment - Post-Treatment - sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.h \ - sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h \ - sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.h \ \ # ---------- Views - HD - Adjustment - Disinfection sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.h \ \ # ---------- Views - HD - Data - States @@ -651,6 +651,10 @@ \ # ---------- Models - TD - Adjustment - Pre-Treatment sources/model/td/adjustment/pretreatment/MPreTreatmentAdjustDisposablesConfirmResponse.cpp \ sources/model/td/adjustment/pretreatment/MPreTreatmentAdjustStartTreatmentResponse.cpp \ + \ # ---------- Models - TD - Adjustment - Post-Treatment + sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.cpp \ + sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp \ + sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustPatientDisconnectionConfirmResponse.cpp \ \ # ---------- Models - TD - Adjustment - In-Treatment sources/model/td/adjustment/treatment/MTreatmentAdjustRecirculateResponse.cpp \ \ # ---------- Models - DD - Adjustment - Settings @@ -670,10 +674,6 @@ \ # ---------- Models - HD - Adjustment - In-Treatment sources/model/hd/adjustment/treatment/MTreatmentAdjustBloodDialysateResponse.cpp \ sources/model/hd/adjustment/treatment/MTreatmentAdjustHeparinResponse.cpp \ - \ # ---------- Models - HD - Adjustment - Post-Treatment - sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.cpp \ - sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp \ - sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustPatientDisconnectionConfirmResponse.cpp \ \ # ---------- Models - HD - Adjustment - Disinfection sources/model/hd/adjustment/disinfect/MDisinfectAdjustModeResponse.cpp \ sources/model/hd/adjustment/disinfect/MDisinfectAdjustStartResponse.cpp \ @@ -778,6 +778,10 @@ \ # ---------- Views - TD - Adjustment - Pre-Treatment sources/view/td/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesConfirm.cpp \ sources/view/td/adjustment/pretreatment/VPreTreatmentAdjustmentStartTreatment.cpp \ + \ # ---------- Views - TD - Adjustment - Post-Treatment + sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.cpp \ + sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp \ + sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.cpp \ \ # ---------- Views - CONFIRM sources/view/confirm/VConfirm.cpp \ \ # ---------- Views - POST @@ -818,10 +822,6 @@ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRinseback.cpp \ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.cpp \ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentEnd.cpp \ - \ # ---------- Views - HD - Adjustment - Post-Treatment - sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.cpp \ - sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp \ - sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.cpp \ \ # ---------- Views - HD - Adjustment - Disinfection sources/view/hd/adjustment/disinfect/VDisinfectAdjustDisinfect.cpp \ \ # ---------- Views - HD - States Data Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustPatientDisconnectionConfirmResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustPatientDisconnectionConfirmResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustRequests.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp =================================================================== diff -u --- sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp (revision 0) +++ sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,49 @@ +/*! + * + * Copyright (c) 2021-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 MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h" + +using namespace Model; + +QVariantList MAdjustDisposablesRemovalConfirmResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustDisposablesRemovalConfirmResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if ( ! GetValue(vByteArray, index, _data.mAccepted )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mReason )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MAdjustDisposablesRemovalConfirmResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustDisposablesRemovalConfirmResponseData MAdjustDisposablesRemovalConfirmResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h =================================================================== diff -u --- sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h (revision 0) +++ sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,84 @@ +/*! + * + * Copyright (c) 2021-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 MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustDisposablesRemovalConfirmResponse class + * \details The DisposablesRemovalConfirm adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------: | + * |0x7400| 0x020 | 6 | Rsp | Y | HD | UI | Disposables Removal Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustDisposablesRemovalConfirmReq : DisposablesRemovalConfirm Request + * \sa MTreatmentDisposablesRemovalConfirm : DisposablesRemovalConfirm Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustDisposablesRemovalConfirm | + * + */ +class MAdjustDisposablesRemovalConfirmResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted; + Types::U32 mReason ; + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eTD ; } + QString infoText () const override { return QString("AdjustDisposablesRemovalConfirm") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustDisposablesRemovalConfirmResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustDisposablesRemovalConfirmResponse::Data AdjustDisposablesRemovalConfirmResponseData; Index: sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustPatientDisconnectionConfirmResponse.cpp =================================================================== diff -u --- sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustPatientDisconnectionConfirmResponse.cpp (revision 0) +++ sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustPatientDisconnectionConfirmResponse.cpp (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,49 @@ +/*! + * + * Copyright (c) 2023-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 MPostTreatmentAdjustPatientDisconnectionConfirmResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Aug-2023 + * \author (original) Behrouz NematiPour + * \date (original) 11-Aug-2023 + * + */ +#include "MPostTreatmentAdjustPatientDisconnectionConfirmResponse.h" + +using namespace Model; + +QVariantList MAdjustPatientDisconnectionConfirmResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustPatientDisconnectionConfirmResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if ( ! GetValue(vByteArray, index, _data.mAccepted )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mReason )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MAdjustPatientDisconnectionConfirmResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustPatientDisconnectionConfirmResponseData MAdjustPatientDisconnectionConfirmResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustPatientDisconnectionConfirmResponse.h =================================================================== diff -u --- sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustPatientDisconnectionConfirmResponse.h (revision 0) +++ sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustPatientDisconnectionConfirmResponse.h (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,84 @@ +/*! + * + * Copyright (c) 2023-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 MPostTreatmentAdjustPatientDisconnectionConfirmResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Aug-2023 + * \author (original) Behrouz NematiPour + * \date (original) 11-Aug-2023 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustPatientDisconnectionConfirmResponse class + * \details The PatientDisconnectionConfirm adjustment response model + * + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:----:|:---:|:---:|:----:|:-----------:| + * |0x7E00| 0x020 | Rsp | Y | HD | UI | Disposables Removal Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustPatientDisconnectionConfirmReq : PatientDisconnectionConfirm Request + * \sa MTreatmentPatientDisconnectionConfirm : PatientDisconnectionConfirm Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustPatientDisconnectionConfirm | + * + */ +class MAdjustPatientDisconnectionConfirmResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted; + Types::U32 mReason ; + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eTD ; } + QString infoText () const override { return QString("AdjustPatientDisconnectionConfirm") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustPatientDisconnectionConfirmResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustPatientDisconnectionConfirmResponse::Data AdjustPatientDisconnectionConfirmResponseData; Index: sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustRequests.h =================================================================== diff -u --- sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustRequests.h (revision 0) +++ sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustRequests.h (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,121 @@ +/*! + * + * Copyright (c) 2021-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 MPostTreatmentAdjustRequests.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Aug-2023 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ + +#pragma once + +// Qt +#include + +//project +#include "MAdjustRequestsBase.h" +#include "GuiGlobals.h" +#include "MessageGlobals.h" +using namespace Gui; + +namespace Model { + +/*! + * Simple request models + * These are models to send the request for the doAdjustment + * The the only reason thy have been defined to help overloading the adjustment methods + * Otherwise the parameters are so tiny models. + */ + +/*! + * \brief The MAdjustPatientDisconnectionNotifyReq class + * \details The model to Confirm Patient Disconnection + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| + * |0x4A00| 0x100 | 9 | Req | Y | UI | HD | Patient Disconnection Notify Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustPatientDisconnectionNotifyReq : public MModel { +public: + static QString toString(const QVariantList &vParameters) { + return MModel::toString("PatientDisconnectionNotify", vParameters); + } +}; + +/*! + * \brief The MAdjustPatientDisconnectionConfirmReq class + * \details The model to Confirm Patient Disconnection + * + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:----:|:---:|:---:|:----:|:-----------:| + * |0x0600| 0x100 | Req | Y | UI | HD | Patient Disconnection Confirm Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustPatientDisconnectionConfirmReq : public MModel { +public: + static QString toString(const QVariantList &vParameters) { + return MModel::toString("PatientDisconnectionConfirm", vParameters); + } +}; + +/*! + * \brief The MAdjustDisposablesRemovalConfirmReq class + * \details The model to Confirm Disposables Removal + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| + * |0x7300| 0x100 | 9 | Req | Y | UI | HD | Disposables Removal Confirm Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustDisposablesRemovalConfirmReq : public MModel { +public: + static QString toString(const QVariantList &vParameters) { + return MModel::toString("DisposablesRemovalConfirm", vParameters); + } +}; + +/*! + * \brief The MAdjustTreatmentLogReq class + * \details The model to request Treatment Log + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| + * |0x7500| 0x100 | 9 | Req | Y | UI | HD | Treatment Log Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustTreatmentLogReq : public MModel { +public: + static QString toString(const QVariantList &vParameters) { + return MModel::toString("TreatmentLog", vParameters); + } +}; + +} + +typedef Model:: MAdjustPatientDisconnectionNotifyReq AdjustPatientDisconnectionNotifyRequestData; +typedef Model:: MAdjustPatientDisconnectionConfirmReq AdjustPatientDisconnectionConfirmRequestData; +typedef Model:: MAdjustDisposablesRemovalConfirmReq AdjustDisposablesRemovalConfirmRequestData; +typedef Model:: MAdjustTreatmentLogReq AdjustTreatmentLogRequestData; Index: sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.cpp =================================================================== diff -u --- sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.cpp (revision 0) +++ sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.cpp (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,237 @@ +/*! + * + * Copyright (c) 2021-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 MPostTreatmentAdjustTreatmentLogResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 03-Nov-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "MPostTreatmentAdjustTreatmentLogResponse.h" + +using namespace Model; + +QVariantList MAdjustTreatmentLogResponse::parameters() const { + return { + _data.mAccepted .value, + _data.mReason .value, + _data.mBloodFlowRate .value, + _data.mBloodFlowRateActual .value, + _data.mDialysateFlowRate .value, + _data.mDialysateFlowRateActual .value, + _data.mTreatmentDuration .value, + _data.mTreatmentDurationActual .value, + _data.mAcidConcentrateType .value, + _data.mAcidConcentrateTypeActual .value, + _data.mBicarbonateCartridgeSize .value, + _data.mBicarbonateCartridgeSizeActual .value, + _data.mPotassiumConcentration .value, + _data.mPotassiumConcentrationActual .value, + _data.mCalciumConcentration .value, + _data.mCalciumConcentrationActual .value, + _data.mBicarbonateConcentration .value, + _data.mBicarbonateConcentrationActual .value, + _data.mSodiumConcentration .value, + _data.mSodiumConcentrationActual .value, + _data.mVitalsInterval .value, + _data.mVitalsIntervalActual .value, + _data.mDialyzerType .value, + _data.mTreatmentStartEpoch .value, + _data.mTreatmentEndEpoch .value, + _data.mFluidBolusVolume .value, + _data.mFluidBolusVolumeActual .value, + _data.mHeparinType .value, + _data.mHeparinDeliveryDuration .value, + _data.mHeparinDeliveryDurationActual .value, + _data.mTreatmentModality .value, + _data.mTreatmentModalityActual .value, + _data.mHDFOperatingMode .value, + _data.mHDFOperatingModeActual .value, + _data.mHepatitisStatus .value, + _data.mDialysateTemperature .value, + _data.mDialysateTemperatureActual .value, + _data.mDialysateVolumeUsed .value, + _data.mHeparinBolusVolume .value, + _data.mHeparinBolusVolumeActual .value, + _data.mHeparinDispenseRate .value, + _data.mHeparinDispenseRateActual .value, + _data.mHeparinDeliveredVolume .value, + _data.mAverageArterialPressure .value, + _data.mAverageVenousPressure .value, + _data.mUFVolume .value, + _data.mUFVolumeActual .value, + _data.mUFVolumeTarget .value, + _data.mUFRate .value, + _data.mUFRateActual .value, + _data.mUFRateTarget .value, + _data.mSubstitutionVolume .value, + _data.mSubstitutionVolumeActual .value, + _data.mSubstitutionVolumeTarget .value, + _data.mSubstitutionRate .value, + _data.mSubstitutionRateActual .value, + _data.mSubstitutionRateTarget .value, + _data.mIsoUfVolume .value, + _data.mIsoUfVolumeActual .value, + _data.mIsoUfVolumeTarget .value, + _data.mIsoUfRate .value, + _data.mIsoUfRateActual .value, + _data.mIsoUfRateTarget .value, + _data.mWaterSampleTestResult .value, + }; +} + +bool MAdjustTreatmentLogResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + + if ( ! GetValue(vByteArray, index, _data.mAccepted )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mReason )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mBloodFlowRate )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mBloodFlowRateActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mDialysateFlowRate )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mDialysateFlowRateActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mTreatmentDuration )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mTreatmentDurationActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mAcidConcentrateType )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mAcidConcentrateTypeActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mBicarbonateCartridgeSize )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mBicarbonateCartridgeSizeActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mPotassiumConcentration )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mPotassiumConcentrationActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mCalciumConcentration )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mCalciumConcentrationActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mBicarbonateConcentration )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mBicarbonateConcentrationActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mSodiumConcentration )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mSodiumConcentrationActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mVitalsInterval )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mVitalsIntervalActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mDialyzerType )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mTreatmentStartEpoch )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mTreatmentEndEpoch )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mFluidBolusVolume )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mFluidBolusVolumeActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mHeparinType )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mHeparinDeliveryDuration )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mHeparinDeliveryDurationActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mTreatmentModality )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mTreatmentModalityActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mHDFOperatingMode )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mHDFOperatingModeActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mHepatitisStatus )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mDialysateTemperature )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mDialysateTemperatureActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mDialysateVolumeUsed )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mHeparinBolusVolume )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mHeparinBolusVolumeActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mHeparinDispenseRate )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mHeparinDispenseRateActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mHeparinDeliveredVolume )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mAverageArterialPressure )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mAverageVenousPressure )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mUFVolume )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mUFVolumeActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mUFVolumeTarget )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mUFRate )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mUFRateActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mUFRateTarget )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mSubstitutionVolume )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mSubstitutionVolumeActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mSubstitutionVolumeTarget )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mSubstitutionRate )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mSubstitutionRateActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mSubstitutionRateTarget )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mIsoUfVolume )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mIsoUfVolumeActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mIsoUfVolumeTarget )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mIsoUfRate )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mIsoUfRateActual )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mIsoUfRateTarget )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mWaterSampleTestResult )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MAdjustTreatmentLogResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustTreatmentLogResponseData MAdjustTreatmentLogResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted .value; + data.mReason = _data.mReason .value; + data.mBloodFlowRate = _data.mBloodFlowRate .value; + data.mBloodFlowRateActual = _data.mBloodFlowRateActual .value; + data.mDialysateFlowRate = _data.mDialysateFlowRate .value; + data.mDialysateFlowRateActual = _data.mDialysateFlowRateActual .value; + data.mTreatmentDuration = _data.mTreatmentDuration .value; + data.mTreatmentDurationActual = _data.mTreatmentDurationActual .value; + data.mAcidConcentrateType = _data.mAcidConcentrateType .value; + data.mAcidConcentrateTypeActual = _data.mAcidConcentrateTypeActual .value; + data.mBicarbonateCartridgeSize = _data.mBicarbonateCartridgeSize .value; + data.mBicarbonateCartridgeSizeActual = _data.mBicarbonateCartridgeSizeActual .value; + data.mPotassiumConcentration = _data.mPotassiumConcentration .value; + data.mPotassiumConcentrationActual = _data.mPotassiumConcentrationActual .value; + data.mCalciumConcentration = _data.mCalciumConcentration .value; + data.mCalciumConcentrationActual = _data.mCalciumConcentrationActual .value; + data.mBicarbonateConcentration = _data.mBicarbonateConcentration .value; + data.mBicarbonateConcentrationActual = _data.mBicarbonateConcentrationActual .value; + data.mSodiumConcentration = _data.mSodiumConcentration .value; + data.mSodiumConcentrationActual = _data.mSodiumConcentrationActual .value; + data.mVitalsInterval = _data.mVitalsInterval .value; + data.mVitalsIntervalActual = _data.mVitalsIntervalActual .value; + data.mDialyzerType = _data.mDialyzerType .value; + data.mTreatmentStartEpoch = _data.mTreatmentStartEpoch .value; + data.mTreatmentEndEpoch = _data.mTreatmentEndEpoch .value; + data.mFluidBolusVolume = _data.mFluidBolusVolume .value; + data.mFluidBolusVolumeActual = _data.mFluidBolusVolumeActual .value; + data.mHeparinType = _data.mHeparinType .value; + data.mHeparinDeliveryDuration = _data.mHeparinDeliveryDuration .value; + data.mHeparinDeliveryDurationActual = _data.mHeparinDeliveryDurationActual .value; + data.mTreatmentModality = _data.mTreatmentModality .value; + data.mTreatmentModalityActual = _data.mTreatmentModalityActual .value; + data.mHDFOperatingMode = _data.mHDFOperatingMode .value; + data.mHDFOperatingModeActual = _data.mHDFOperatingModeActual .value; + data.mHepatitisStatus = _data.mHepatitisStatus .value; + data.mDialysateTemperature = _data.mDialysateTemperature .value; + data.mDialysateTemperatureActual = _data.mDialysateTemperatureActual .value; + data.mDialysateVolumeUsed = _data.mDialysateVolumeUsed .value; + data.mHeparinBolusVolume = _data.mHeparinBolusVolume .value; + data.mHeparinBolusVolumeActual = _data.mHeparinBolusVolumeActual .value; + data.mHeparinDispenseRate = _data.mHeparinDispenseRate .value; + data.mHeparinDispenseRateActual = _data.mHeparinDispenseRateActual .value; + data.mHeparinDeliveredVolume = _data.mHeparinDeliveredVolume .value; + data.mAverageArterialPressure = _data.mAverageArterialPressure .value; + data.mAverageVenousPressure = _data.mAverageVenousPressure .value; + data.mUFVolume = _data.mUFVolume .value; + data.mUFVolumeActual = _data.mUFVolumeActual .value; + data.mUFVolumeTarget = _data.mUFVolumeTarget .value; + data.mUFRate = _data.mUFRate .value; + data.mUFRateActual = _data.mUFRateActual .value; + data.mUFRateTarget = _data.mUFRateTarget .value; + data.mSubstitutionVolume = _data.mSubstitutionVolume .value; + data.mSubstitutionVolumeActual = _data.mSubstitutionVolumeActual .value; + data.mSubstitutionVolumeTarget = _data.mSubstitutionVolumeTarget .value; + data.mSubstitutionRate = _data.mSubstitutionRate .value; + data.mSubstitutionRateActual = _data.mSubstitutionRateActual .value; + data.mSubstitutionRateTarget = _data.mSubstitutionRateTarget .value; + data.mIsoUfVolume = _data.mIsoUfVolume .value; + data.mIsoUfVolumeActual = _data.mIsoUfVolumeActual .value; + data.mIsoUfVolumeTarget = _data.mIsoUfVolumeTarget .value; + data.mIsoUfRate = _data.mIsoUfRate .value; + data.mIsoUfRateActual = _data.mIsoUfRateActual .value; + data.mIsoUfRateTarget = _data.mIsoUfRateTarget .value; + data.mWaterSampleTestResult = _data.mWaterSampleTestResult .value; + + return data; +} Index: sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.h =================================================================== diff -u --- sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.h (revision 0) +++ sources/model/td/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.h (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,270 @@ +/*! + * + * Copyright (c) 2021-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 MPostTreatmentAdjustTreatmentLogResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 09-Dec-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustTreatmentLogResponse class + * \details The TreatmentLog adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------: | + * |0xAA00| 0x020 | 6 | Rsp | Y | TD | UI | TreatmentLog Response | + * + * | Payload || + * | || + * | 01 - (U32) | \ref Data::mAccepted + * | 02 - (U32) | \ref Data::mReason + * | 03 - (U32) | \ref Data::mBloodFlowRate + * | 04 - (U32) | \ref Data::mBloodFlowRateActual + * | 05 - (U32) | \ref Data::mDialysateFlowRate + * | 06 - (U32) | \ref Data::mDialysateFlowRateActual + * | 07 - (U32) | \ref Data::mTreatmentDuration + * | 08 - (U32) | \ref Data::mTreatmentDurationActual + * | 09 - (U32) | \ref Data::mAcidConcentrateType + * | 10 - (U32) | \ref Data::mAcidConcentrateTypeActual + * | 11 - (U32) | \ref Data::mBicarbonateCartridgeSize + * | 12 - (U32) | \ref Data::mBicarbonateCartridgeSizeActual + * | 13 - (U32) | \ref Data::mPotassiumConcentration + * | 14 - (U32) | \ref Data::mPotassiumConcentrationActual + * | 15 - (U32) | \ref Data::mCalciumConcentration + * | 16 - (U32) | \ref Data::mCalciumConcentrationActual + * | 17 - (U32) | \ref Data::mBicarbonateConcentration + * | 18 - (U32) | \ref Data::mBicarbonateConcentrationActual + * | 19 - (U32) | \ref Data::mSodiumConcentration + * | 20 - (U32) | \ref Data::mSodiumConcentrationActual + * | 21 - (U32) | \ref Data::mVitalsInterval + * | 22 - (U32) | \ref Data::mVitalsIntervalActual + * | 23 - (U32) | \ref Data::mDialyzerType + * | 24 - (U32) | \ref Data::mTreatmentStartEpoch + * | 25 - (U32) | \ref Data::mTreatmentEndEpoch + * | 26 - (U32) | \ref Data::mFluidBolusVolume + * | 27 - (U32) | \ref Data::mFluidBolusVolumeActual + * | 28 - (U32) | \ref Data::mHeparinType + * | 29 - (U32) | \ref Data::mHeparinDeliveryDuration + * | 30 - (U32) | \ref Data::mHeparinDeliveryDurationActual + * | 31 - (U32) | \ref Data::mTreatmentModality + * | 32 - (U32) | \ref Data::mTreatmentModalityActual + * | 33 - (U32) | \ref Data::mHDFOperatingMode + * | 34 - (U32) | \ref Data::mHDFOperatingModeActual + * | 35 - (U32) | \ref Data::mHepatitisStatus + * | 36 - (F32) | \ref Data::mDialysateTemperature + * | 37 - (F32) | \ref Data::mDialysateTemperatureActual + * | 38 - (F32) | \ref Data::mDialysateVolumeUsed + * | 39 - (F32) | \ref Data::mHeparinBolusVolume + * | 40 - (F32) | \ref Data::mHeparinBolusVolumeActual + * | 41 - (F32) | \ref Data::mHeparinDispenseRate + * | 42 - (F32) | \ref Data::mHeparinDispenseRateActual + * | 43 - (F32) | \ref Data::mHeparinDeliveredVolume + * | 44 - (F32) | \ref Data::mAverageArterialPressure + * | 45 - (F32) | \ref Data::mAverageVenousPressure + * | 46 - (F32) | \ref Data::mUFVolume + * | 47 - (F32) | \ref Data::mUFVolumeActual + * | 48 - (F32) | \ref Data::mUFVolumeTarget + * | 49 - (F32) | \ref Data::mUFRate + * | 50 - (F32) | \ref Data::mUFRateActual + * | 51 - (F32) | \ref Data::mUFRateTarget + * | 52 - (F32) | \ref Data::mSubstitutionVolume + * | 53 - (F32) | \ref Data::mSubstitutionVolumeActual + * | 54 - (F32) | \ref Data::mSubstitutionVolumeTarget + * | 55 - (F32) | \ref Data::mSubstitutionRate + * | 56 - (F32) | \ref Data::mSubstitutionRateActual + * | 57 - (F32) | \ref Data::mSubstitutionRateTarget + * | 58 - (F32) | \ref Data::mIsoUfVolume + * | 59 - (F32) | \ref Data::mIsoUfVolumeActual + * | 60 - (F32) | \ref Data::mIsoUfVolumeTarget + * | 61 - (F32) | \ref Data::mIsoUfRate + * | 62 - (F32) | \ref Data::mIsoUfRateActual + * | 63 - (F32) | \ref Data::mIsoUfRateTarget + * | 64 - (F32) | \ref Data::mWaterSampleTestResult + + * \sa Data + * \sa MAdjustTreatmentLogReq : TreatmentLog Request + * \sa MTreatmentTreatmentLog : TreatmentLog Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustTreatmentLog | + * + */ +class MAdjustTreatmentLogResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted ; + Types::U32 mReason ; + Types::U32 mBloodFlowRate ; + Types::U32 mBloodFlowRateActual ; + Types::U32 mDialysateFlowRate ; + Types::U32 mDialysateFlowRateActual ; + Types::U32 mTreatmentDuration ; + Types::U32 mTreatmentDurationActual ; + Types::U32 mAcidConcentrateType ; + Types::U32 mAcidConcentrateTypeActual ; + Types::U32 mBicarbonateCartridgeSize ; + Types::U32 mBicarbonateCartridgeSizeActual ; + Types::U32 mPotassiumConcentration ; + Types::U32 mPotassiumConcentrationActual ; + Types::U32 mCalciumConcentration ; + Types::U32 mCalciumConcentrationActual ; + Types::U32 mBicarbonateConcentration ; + Types::U32 mBicarbonateConcentrationActual ; + Types::U32 mSodiumConcentration ; + Types::U32 mSodiumConcentrationActual ; + Types::U32 mVitalsInterval ; + Types::U32 mVitalsIntervalActual ; + Types::U32 mDialyzerType ; + Types::U32 mTreatmentStartEpoch ; + Types::U32 mTreatmentEndEpoch ; + Types::U32 mFluidBolusVolume ; + Types::U32 mFluidBolusVolumeActual ; + Types::U32 mHeparinType ; + Types::U32 mHeparinDeliveryDuration ; + Types::U32 mHeparinDeliveryDurationActual ; + Types::U32 mTreatmentModality ; + Types::U32 mTreatmentModalityActual ; + Types::U32 mHDFOperatingMode ; + Types::U32 mHDFOperatingModeActual ; + Types::U32 mHepatitisStatus ; + Types::F32 mDialysateTemperature ; + Types::F32 mDialysateTemperatureActual ; + Types::F32 mDialysateVolumeUsed ; + Types::F32 mHeparinBolusVolume ; + Types::F32 mHeparinBolusVolumeActual ; + Types::F32 mHeparinDispenseRate ; + Types::F32 mHeparinDispenseRateActual ; + Types::F32 mHeparinDeliveredVolume ; + Types::F32 mAverageArterialPressure ; + Types::F32 mAverageVenousPressure ; + Types::F32 mUFVolume ; + Types::F32 mUFVolumeActual ; + Types::F32 mUFVolumeTarget ; + Types::F32 mUFRate ; + Types::F32 mUFRateActual ; + Types::F32 mUFRateTarget ; + Types::F32 mSubstitutionVolume ; + Types::F32 mSubstitutionVolumeActual ; + Types::F32 mSubstitutionVolumeTarget ; + Types::F32 mSubstitutionRate ; + Types::F32 mSubstitutionRateActual ; + Types::F32 mSubstitutionRateTarget ; + Types::F32 mIsoUfVolume ; + Types::F32 mIsoUfVolumeActual ; + Types::F32 mIsoUfVolumeTarget ; + Types::F32 mIsoUfRate ; + Types::F32 mIsoUfRateActual ; + Types::F32 mIsoUfRateTarget ; + Types::F32 mWaterSampleTestResult ; + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eTD ; } + QString infoText () const override { return QString("AdjustTreatmentLog") ; } + + struct Data { + quint32 mAccepted = 0; + quint32 mReason = 0; + quint32 mBloodFlowRate = 0; + quint32 mBloodFlowRateActual = 0; + quint32 mDialysateFlowRate = 0; + quint32 mDialysateFlowRateActual = 0; + quint32 mTreatmentDuration = 0; + quint32 mTreatmentDurationActual = 0; + quint32 mAcidConcentrateType = 0; + quint32 mAcidConcentrateTypeActual = 0; + quint32 mBicarbonateCartridgeSize = 0; + quint32 mBicarbonateCartridgeSizeActual = 0; + quint32 mPotassiumConcentration = 0; + quint32 mPotassiumConcentrationActual = 0; + quint32 mCalciumConcentration = 0; + quint32 mCalciumConcentrationActual = 0; + quint32 mBicarbonateConcentration = 0; + quint32 mBicarbonateConcentrationActual = 0; + quint32 mSodiumConcentration = 0; + quint32 mSodiumConcentrationActual = 0; + quint32 mVitalsInterval = 0; + quint32 mVitalsIntervalActual = 0; + quint32 mDialyzerType = 0; + quint32 mTreatmentStartEpoch = 0; + quint32 mTreatmentEndEpoch = 0; + quint32 mFluidBolusVolume = 0; + quint32 mFluidBolusVolumeActual = 0; + quint32 mHeparinType = 0; + quint32 mHeparinDeliveryDuration = 0; + quint32 mHeparinDeliveryDurationActual = 0; + quint32 mTreatmentModality = 0; + quint32 mTreatmentModalityActual = 0; + quint32 mHDFOperatingMode = 0; + quint32 mHDFOperatingModeActual = 0; + quint32 mHepatitisStatus = 0; + float mDialysateTemperature = 0; + float mDialysateTemperatureActual = 0; + float mDialysateVolumeUsed = 0; + float mHeparinBolusVolume = 0; + float mHeparinBolusVolumeActual = 0; + float mHeparinDispenseRate = 0; + float mHeparinDispenseRateActual = 0; + float mHeparinDeliveredVolume = 0; + float mAverageArterialPressure = 0; + float mAverageVenousPressure = 0; + float mUFVolume = 0; + float mUFVolumeActual = 0; + float mUFVolumeTarget = 0; + float mUFRate = 0; + float mUFRateActual = 0; + float mUFRateTarget = 0; + float mSubstitutionVolume = 0; + float mSubstitutionVolumeActual = 0; + float mSubstitutionVolumeTarget = 0; + float mSubstitutionRate = 0; + float mSubstitutionRateActual = 0; + float mSubstitutionRateTarget = 0; + float mIsoUfVolume = 0; + float mIsoUfVolumeActual = 0; + float mIsoUfVolumeTarget = 0; + float mIsoUfRate = 0; + float mIsoUfRateActual = 0; + float mIsoUfRateTarget = 0; + float mWaterSampleTestResult = 0; + }; + + MAdjustTreatmentLogResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustTreatmentLogResponse::Data AdjustTreatmentLogResponseData; Index: sources/storage/TreatmentLog.cpp =================================================================== diff -u -r676ec71574416b57c5263b1a4acc66d6904751e7 -rea37bc16ab57586729e332c2a9df3299f91012ca --- sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision 676ec71574416b57c5263b1a4acc66d6904751e7) +++ sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -240,7 +240,7 @@ // - the structure of the settings should become horizontal which vertical now. QString mCategory = Storage::Settings_Category_DataList; QString mAcidConcentrateType = _Settings.key(mCategory, "Acid Concentrate Options" , vData.mAcidConcentrateType ); - QString mBicarbonateConcentrateType = _Settings.key(mCategory, "Bicarbonate Concentrate Options" , vData.mBicarbonateConcentrateType ); + QString mBicarbonateConcentrateType = _Settings.key(mCategory, "Bicarbonate Concentrate Options" , vData.mBicarbonateCartridgeSize ); QString mDialyzerType = _Settings.key(mCategory, "Dialyzer Type Options" , vData.mDialyzerType ); QString mHeparinType = _Settings.key(mCategory, "Heparin Type Options" , vData.mHeparinType ); QString mWaterSampleTestResult = _Settings.key(mCategory, "Water Sample Result" , vData.mWaterSampleTestResult ); Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag ea37bc16ab57586729e332c2a9df3299f91012ca refers to a dead (removed) revision in file `sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.cpp =================================================================== diff -u --- sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.cpp (revision 0) +++ sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.cpp (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,52 @@ +/*! + * + * Copyright (c) 2021-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 VPostTreatmentAdjustDisposablesRemovalConfirm.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "VPostTreatmentAdjustDisposablesRemovalConfirm.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPostTreatmentAdjustmentDisposablesRemovalConfirm) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPostTreatmentAdjustmentDisposablesRemovalConfirm::initConnections() { + ADJUST_VIEW_CONNECTION(AdjustDisposablesRemovalConfirmRequestData); + ACTION_VIEW_CONNECTION(AdjustDisposablesRemovalConfirmResponseData); +} + +/*! + * \brief VPostTreatmentAdjustmentUltrafiltrationInit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VPostTreatmentAdjustmentDisposablesRemovalConfirm::onActionReceive(const AdjustDisposablesRemovalConfirmResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the Previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VPostTreatmentAdjustmentDisposablesRemovalConfirm::doConfirm + * \details the invocable slot to send user's Disposables Removal confirm + */ +void View::VPostTreatmentAdjustmentDisposablesRemovalConfirm::doConfirm() { + AdjustDisposablesRemovalConfirmRequestData data; + emit didAdjustment(data); +} Index: sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.h =================================================================== diff -u --- sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.h (revision 0) +++ sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.h (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,57 @@ +/*! + * + * Copyright (c) 2021-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 VPostTreatmentAdjustDisposablesRemovalConfirm.h + * \author (last) Behrouz NematiPour + * \date (last) 18-Apr-2022 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VAdjustmentResponseBase.h" +#include "MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h" + +namespace View { + +/*! + * \brief The VPostTreatmentAdjustmentDisposablesRemovalConfirm class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustDisposablesRemovalConfirmResponse + * + */ +class VPostTreatmentAdjustmentDisposablesRemovalConfirm : public VAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + TRIGGER( bool , adjustment , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VPostTreatmentAdjustmentDisposablesRemovalConfirm, AdjustDisposablesRemovalConfirmResponseData) + +public slots: + void doConfirm(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's Disposables Removal confirm + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustDisposablesRemovalConfirmRequestData &vData); +}; +} Index: sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.cpp =================================================================== diff -u --- sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.cpp (revision 0) +++ sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.cpp (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,62 @@ +/*! + * + * Copyright (c) 2021-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 VPostTreatmentAdjustPatientDisconnectionConfirm.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Aug-2023 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "VPostTreatmentAdjustPatientDisconnectionConfirm.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPostTreatmentAdjustmentPatientDisconnectionConfirm) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPostTreatmentAdjustmentPatientDisconnectionConfirm::initConnections() { + ADJUST_VIEW_CONNECTION( AdjustPatientDisconnectionNotifyRequestData); + ADJUST_VIEW_CONNECTION( AdjustPatientDisconnectionConfirmRequestData); + ACTION_VIEW_CONNECTION(AdjustPatientDisconnectionConfirmResponseData); +} + +/*! + * \brief View::VPostTreatmentAdjustmentPatientDisconnectionConfirm::doNotify + * \details the invocable slot to send user's Patient Disconnection notify + */ +void View::VPostTreatmentAdjustmentPatientDisconnectionConfirm::doNotify() { + AdjustPatientDisconnectionNotifyRequestData data; + emit didAdjustment(data); +} + +/*! + * \brief View::VPostTreatmentAdjustmentPatientDisconnectionConfirm::doConfirm + * \details the invocable slot to send user's Patient Disconnection confirm + */ +void View::VPostTreatmentAdjustmentPatientDisconnectionConfirm::doConfirm() { + AdjustPatientDisconnectionConfirmRequestData data; + emit didAdjustment(data); +} + +/*! + * \brief VPostTreatmentAdjustmentPatientDisconnectionConfirm::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VPostTreatmentAdjustmentPatientDisconnectionConfirm::onActionReceive(const AdjustPatientDisconnectionConfirmResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the Previous values before being set. *** + adjustment ( true ); +} Index: sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.h =================================================================== diff -u --- sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.h (revision 0) +++ sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.h (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,59 @@ +/*! + * + * Copyright (c) 2021-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 VPostTreatmentAdjustPatientDisconnectionConfirm.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Aug-2023 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "MPostTreatmentAdjustPatientDisconnectionConfirmResponse.h" +#include "VAdjustmentResponseBase.h" + +namespace View { + +/*! + * \brief The VPostTreatmentAdjustmentPatientDisconnectionConfirm class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustDisposablesRemovalConfirmResponse + * + */ +class VPostTreatmentAdjustmentPatientDisconnectionConfirm : public VAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + TRIGGER( bool , adjustment , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VPostTreatmentAdjustmentPatientDisconnectionConfirm, AdjustPatientDisconnectionConfirmResponseData) + +public slots: + void doNotify (); + void doConfirm(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's Patient Disconnection confirm + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustPatientDisconnectionNotifyRequestData &vData); + void didAdjustment(const AdjustPatientDisconnectionConfirmRequestData &vData); +}; +} Index: sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp =================================================================== diff -u --- sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (revision 0) +++ sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,162 @@ +/*! + * + * Copyright (c) 2021-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 VPostTreatmentAdjustTreatmentLog.cpp + * \author (last) Behrouz NematiPour + * \date (last) 21-Nov-2023 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "VPostTreatmentAdjustTreatmentLog.h" + +// Qt +#include +#include + +// Project +#include "GuiController.h" +//#include "FileHandler.h" + +using namespace Storage; + +VIEW_DEF_CLASS_ADJUSTMENT(VPostTreatmentAdjustmentTreatmentLog) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +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::didTxCodeReceive, +// [=](const QString &vTxCode) { txCode( vTxCode ); } ); + + connect(&_TreatmentLog , &TreatmentLog::didTxCodeReceive, + [=](const QString &vTxCode) { txCode( vTxCode ); } ); + + connect(&_TreatmentLog , &TreatmentLog::didNotification, + [=](const QString &vNotification) { notification(vNotification); } ); +} + +/*! + * \brief View::VPostTreatmentAdjustmentTreatmentLog::doRequest + * \details the invocable slot to send user's treatment log request + */ +void View::VPostTreatmentAdjustmentTreatmentLog::doRequest() { + _TreatmentLog.clearModel(); +// parametersText ( {} ); + + AdjustTreatmentLogRequestData data; + emit didAdjustment(data); +} + +/*! + * \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 + */ +void View::VPostTreatmentAdjustmentTreatmentLog::onActionReceive(const AdjustTreatmentLogResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // init the TreatmentLog model + _TreatmentLog.initModel ( vData, _patientID.trimmed(), heparinBolusVolumeOff(), heparinDispensingRateOff()); + + // raw values + bloodFlowRate ( vData.mBloodFlowRate ); + bloodFlowRateActual ( vData.mBloodFlowRateActual ); + dialysateFlowRate ( vData.mDialysateFlowRate ); + dialysateFlowRateActual ( vData.mDialysateFlowRateActual ); + treatmentDuration ( vData.mTreatmentDuration ); + treatmentDurationActual ( vData.mTreatmentDurationActual ); + acidConcentrateType ( vData.mAcidConcentrateType ); + acidConcentrateTypeActual ( vData.mAcidConcentrateTypeActual ); + bicarbonateCartridgeSize ( vData.mBicarbonateCartridgeSize ); + bicarbonateCartridgeSizeActual ( vData.mBicarbonateCartridgeSizeActual ); + potassiumConcentration ( vData.mPotassiumConcentration ); + potassiumConcentrationActual ( vData.mPotassiumConcentrationActual ); + calciumConcentration ( vData.mCalciumConcentration ); + calciumConcentrationActual ( vData.mCalciumConcentrationActual ); + bicarbonateConcentration ( vData.mBicarbonateConcentration ); + bicarbonateConcentrationActual ( vData.mBicarbonateConcentrationActual ); + sodiumConcentration ( vData.mSodiumConcentration ); + sodiumConcentrationActual ( vData.mSodiumConcentrationActual ); + vitalsInterval ( vData.mVitalsInterval ); + vitalsIntervalActual ( vData.mVitalsIntervalActual ); + dialyzerType ( vData.mDialyzerType ); + treatmentStartEpoch ( vData.mTreatmentStartEpoch ); + treatmentEndEpoch ( vData.mTreatmentEndEpoch ); + fluidBolusVolume ( vData.mFluidBolusVolume ); + fluidBolusVolumeActual ( vData.mFluidBolusVolumeActual ); + heparinType ( vData.mHeparinType ); + heparinDeliveryDuration ( vData.mHeparinDeliveryDuration ); + heparinDeliveryDurationActual ( vData.mHeparinDeliveryDurationActual ); + treatmentModality ( vData.mTreatmentModality ); + treatmentModalityActual ( vData.mTreatmentModalityActual ); + hDFOperatingMode ( vData.mHDFOperatingMode ); + hDFOperatingModeActual ( vData.mHDFOperatingModeActual ); + hepatitisStatus ( vData.mHepatitisStatus ); + dialysateTemperature ( vData.mDialysateTemperature ); + dialysateTemperatureActual ( vData.mDialysateTemperatureActual ); + dialysateVolumeUsed ( vData.mDialysateVolumeUsed ); + heparinBolusVolume ( vData.mHeparinBolusVolume ); + heparinBolusVolumeActual ( vData.mHeparinBolusVolumeActual ); + heparinDispenseRate ( vData.mHeparinDispenseRate ); + heparinDispenseRateActual ( vData.mHeparinDispenseRateActual ); + heparinDeliveredVolume ( vData.mHeparinDeliveredVolume ); + averageArterialPressure ( vData.mAverageArterialPressure ); + averageVenousPressure ( vData.mAverageVenousPressure ); + uFVolume ( vData.mUFVolume ); + uFVolumeActual ( vData.mUFVolumeActual ); + uFVolumeTarget ( vData.mUFVolumeTarget ); + uFRate ( vData.mUFRate ); + uFRateActual ( vData.mUFRateActual ); + uFRateTarget ( vData.mUFRateTarget ); + substitutionVolume ( vData.mSubstitutionVolume ); + substitutionVolumeActual ( vData.mSubstitutionVolumeActual ); + substitutionVolumeTarget ( vData.mSubstitutionVolumeTarget ); + substitutionRate ( vData.mSubstitutionRate ); + substitutionRateActual ( vData.mSubstitutionRateActual ); + substitutionRateTarget ( vData.mSubstitutionRateTarget ); + isoUfVolume ( vData.mIsoUfVolume ); + isoUfVolumeActual ( vData.mIsoUfVolumeActual ); + isoUfVolumeTarget ( vData.mIsoUfVolumeTarget ); + isoUfRate ( vData.mIsoUfRate ); + isoUfRateActual ( vData.mIsoUfRateActual ); + isoUfRateTarget ( vData.mIsoUfRateTarget ); + waterSampleTestResult ( vData.mWaterSampleTestResult ); + + if (adjustment_Accepted()) + _TreatmentLog.doSave(); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the Previous values before being set. *** + adjustment ( true ); +} + +/*! + * \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/td/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h =================================================================== diff -u --- sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h (revision 0) +++ sources/view/td/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h (revision ea37bc16ab57586729e332c2a9df3299f91012ca) @@ -0,0 +1,141 @@ +/*! + * + * Copyright (c) 2021-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 VPostTreatmentAdjustTreatmentLog.h + * \author (last) Behrouz NematiPour + * \date (last) 10-Aug-2023 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +#include + +// Qt +#include + +// Project +#include "main.h" // Doxygen : do not 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 { + +/*! + * \brief The VPostTreatmentAdjustmentTreatmentLog class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustTreatmentLogResponse + * + */ +class VPostTreatmentAdjustmentTreatmentLog : public VAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + TRIGGER( bool , adjustment , 0) + + PROPERTY(bool , heparinDispensingRateOff , true) + PROPERTY(bool , heparinBolusVolumeOff , true) + + PROPERTY(QString , patientID , 0 ) + PROPERTY(QString , secondaryPatientID , 0 ) // TODO create rx enhancement - edit pencil on create rxs + + PROPERTY(quint32 , bloodFlowRate , 0 ) + PROPERTY(quint32 , bloodFlowRateActual , 0 ) + PROPERTY(quint32 , dialysateFlowRate , 0 ) + PROPERTY(quint32 , dialysateFlowRateActual , 0 ) + PROPERTY(quint32 , treatmentDuration , 0 ) + PROPERTY(quint32 , treatmentDurationActual , 0 ) + PROPERTY(quint32 , acidConcentrateType , 0 ) + PROPERTY(quint32 , acidConcentrateTypeActual , 0 ) + PROPERTY(quint32 , bicarbonateCartridgeSize , 0 ) + PROPERTY(quint32 , bicarbonateCartridgeSizeActual , 0 ) + PROPERTY(quint32 , potassiumConcentration , 0 ) + PROPERTY(quint32 , potassiumConcentrationActual , 0 ) + PROPERTY(quint32 , calciumConcentration , 0 ) + PROPERTY(quint32 , calciumConcentrationActual , 0 ) + PROPERTY(quint32 , bicarbonateConcentration , 0 ) + PROPERTY(quint32 , bicarbonateConcentrationActual , 0 ) + PROPERTY(quint32 , sodiumConcentration , 0 ) + PROPERTY(quint32 , sodiumConcentrationActual , 0 ) + PROPERTY(quint32 , vitalsInterval , 0 ) + PROPERTY(quint32 , vitalsIntervalActual , 0 ) + PROPERTY(quint32 , dialyzerType , 0 ) + PROPERTY(quint32 , treatmentStartEpoch , 0 ) + PROPERTY(quint32 , treatmentEndEpoch , 0 ) + PROPERTY(quint32 , fluidBolusVolume , 0 ) + PROPERTY(quint32 , fluidBolusVolumeActual , 0 ) + PROPERTY(quint32 , heparinType , 0 ) + PROPERTY(quint32 , heparinDeliveryDuration , 0 ) + PROPERTY(quint32 , heparinDeliveryDurationActual , 0 ) + PROPERTY(quint32 , treatmentModality , 0 ) + PROPERTY(quint32 , treatmentModalityActual , 0 ) + PROPERTY(quint32 , hDFOperatingMode , 0 ) + PROPERTY(quint32 , hDFOperatingModeActual , 0 ) + PROPERTY(quint32 , hepatitisStatus , 0 ) + PROPERTY(float , dialysateTemperature , 0 ) + PROPERTY(float , dialysateTemperatureActual , 0 ) + PROPERTY(float , dialysateVolumeUsed , 0 ) + PROPERTY(float , heparinBolusVolume , 0 ) + PROPERTY(float , heparinBolusVolumeActual , 0 ) + PROPERTY(float , heparinDispenseRate , 0 ) + PROPERTY(float , heparinDispenseRateActual , 0 ) + PROPERTY(float , heparinDeliveredVolume , 0 ) + PROPERTY(float , averageArterialPressure , 0 ) + PROPERTY(float , averageVenousPressure , 0 ) + PROPERTY(float , uFVolume , 0 ) + PROPERTY(float , uFVolumeActual , 0 ) + PROPERTY(float , uFVolumeTarget , 0 ) + PROPERTY(float , uFRate , 0 ) + PROPERTY(float , uFRateActual , 0 ) + PROPERTY(float , uFRateTarget , 0 ) + PROPERTY(float , substitutionVolume , 0 ) + PROPERTY(float , substitutionVolumeActual , 0 ) + PROPERTY(float , substitutionVolumeTarget , 0 ) + PROPERTY(float , substitutionRate , 0 ) + PROPERTY(float , substitutionRateActual , 0 ) + PROPERTY(float , substitutionRateTarget , 0 ) + PROPERTY(float , isoUfVolume , 0 ) + PROPERTY(float , isoUfVolumeActual , 0 ) + PROPERTY(float , isoUfVolumeTarget , 0 ) + PROPERTY(float , isoUfRate , 0 ) + PROPERTY(float , isoUfRateActual , 0 ) + PROPERTY(float , isoUfRateTarget , 0 ) + PROPERTY(float , waterSampleTestResult , 0 ) + + PROPERTY(QString , txCode , "TEST-1231123212") + PROPERTY(QString , notification , "") + + + VIEW_DEC_CLASS (VPostTreatmentAdjustmentTreatmentLog) + VIEW_DEC_SLOT (AdjustTreatmentLogResponseData) + VIEW_DEC_SLOT (TreatmentLogAvrgeData) + VIEW_DEC_SLOT (TreatmentLogAlarmData) + VIEW_DEC_SLOT (TreatmentLogEventData) + +public slots: + void doRequest (); + void doExport (); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's Disposables Removal confirm + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustTreatmentLogRequestData &vData); +}; +}