/*! * * Copyright (c) 2024-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 VInstitutionalRecord.h * \author (last) Behrouz NematiPour * \date (last) 26-Mar-2024 * \author (original) Dara Navaei * \date (original) 28-Feb-2024 * */ #pragma once // Qt #include // Project #include "main.h" // Doxygen : do not remove #include "VAdjustmentResponseBase.h" #include "MAdjustTDInstitutionalRecordResponse.h" #include "MListModel.h" #include "MSettings.h" #include "MTDInstitutionalRecordResponse.h" namespace View { /*! * \brief The VInstitutionalRecord class * \details View for Model's Data representation. * * \sa Model::VAdjustmentResponseBase * */ class VInstitutionalRecord : public VAdjustmentResponseBase { Q_OBJECT // friends friend class ::tst_views; enum { None = -1, Min = 0 , Max = 1 , Def = 2 , } Range; enum { eRole_Title = Qt::UserRole + 1 , eRole_Units , eRole_Min , eRole_Max , eRole_Step , eRole_Decimal , eRole_MinVal , eRole_MaxVal , eRole_DefVal , eRole_RejectionMin , eRole_RejectionMax , eRole_RejectionDef , eRole_CanOff , } DataRole; enum { eBloodFlowRate , eDialysateFlowRate , eTreatmentDuration , eHeparinBolusVolume , eHeparinDispenseRate , eHeparinStopTime , eDialysateTemperature , eAcidCompositionPotassium , eAcidCompositionCalcium , eBicarbFinalDialysateComposition , eSodiumFinalDialysateComposition , eFluidBolusVolume , eArterialPressureLimit , eVenousPressureLimit , eVenousAsymPressureLimit , eTMPWindowLimit , eUFVolume , eVitalsInterval , eRinsebackVolume , eRinsebackFlowRate , eSubstitutionVolume } Records; // 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) RANGESET( quint32 , bloodFlowRate , 0) RANGESET( quint32 , dialysateFlowRate , 0) RANGESET( quint32 , treatmentDuration , 0) RANGESET( float , heparinBolusVolume , 0) RANGESET( float , heparinDispensingRate , 0) RANGESET( quint32 , heparinStopTime , 0) RANGESET( float , dialysateTemp , 0) RANGESET( float , acidConcentratePotassium , 0) RANGESET( float , acidConcentrateCalcium , 0) RANGESET( quint32 , fluidBolusVolume , 0) RANGESET( quint32 , bicarbFinalDialysateComposition , 0) RANGESET( quint32 , sodiumFinalDialysateComposition , 0) RANGESET( qint32 , arterialPressureLimitWindow , 0) RANGESET( qint32 , venousPressureLimitWindow , 0) RANGESET( qint32 , venousPressureLimitAsymtrc , 0) RANGESET( qint32 , trancembrncPressureLimitWindow , 0) RANGESET( float , ultrafiltrationVolume , 0) RANGESET( quint32 , rinsebackVolume , 0) RANGESET( quint32 , rinsebackFlowRate , 0) RANGESET( float , substitutionVolume , 0) Q_PROPERTY(MListModel* model READ model NOTIFY didModelChange) VIEW_DEC_CLASS_ADJUSTMENT(VInstitutionalRecord, InstitutionalRecordResponseData ) VIEW_DEC_SLOT(SettingsData ) VIEW_DEC_SLOT(AdjustInstitutionalRecordResponseData ) private: MListModel* model () { return &_institutionalList; } MListModel _institutionalList; void initModel(); public slots: void doAdjustment() { InstitutionalRequestData data; emit didAdjustment(data); } void clearRejectionReason(const int &vRow, const int &vRange); signals: void didAdjustment(const InstitutionalRequestData &vData); void didModelChange(); }; }