Action.h 1.47 KB
Newer Older
1 2 3 4 5 6 7
#ifndef ACTION_H
#define ACTION_H

#include <iostream>
#include <string>
#include <map>
#include "CLA_Logger.h"
8
#include "Pump.h"
fmg005's avatar
fmg005 committed
9
#include "Environment.h"
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
/* pulse stuff */
#include "PulsePhysiologyEngine.h"
#include "patient/actions/SESubstanceCompoundInfusion.h"
#include "patient/actions/SESubstanceInfusion.h"
#include "substance/SESubstanceManager.h"
#include "substance/SESubstanceCompound.h"
#include "properties/SEScalarMassPerVolume.h"
#include "substance/SESubstance.h"
#include "properties/SEScalarVolume.h"
#include "properties/SEScalarVolumePerTime.h"

using namespace std;

namespace CLA {
  class Action {
    private:
      SESubstance* m_bpdrug;
      SESubstanceInfusion* m_bpdrug_infusion;
      SESubstanceCompoundInfusion* m_infusion;
      SESubstanceCompound* m_saline;
30
      std::map<std::string,CLA::Pump*>& m_pumps;
31 32 33 34
      double bpdrug_prev_rate; /* cache the last received rate */
      double saline_prev_rate; /* cache the last received rate */
      double NorepiConcentration;
      double SalineBagVolume;
fmg005's avatar
fmg005 committed
35 36
      double bpdrug_rate;
      double saline_rate;
37
      std::shared_ptr<CLA::LOGGER> m_logger;
fmg005's avatar
fmg005 committed
38
      CLA::Environment m_env;
39
    public:
fmg005's avatar
fmg005 committed
40
      Action(std::shared_ptr<CLA::LOGGER>&, std::map<std::string,CLA::Pump*>&);
41
      ~Action();
42 43
      void infuse_drug(std::unique_ptr<PhysiologyEngine>&);
      void initialize(std::unique_ptr<PhysiologyEngine>&);
fmg005's avatar
fmg005 committed
44 45
      double get_bpdrug_rate() const;
      double get_saline_rate() const;
46 47 48 49 50
      void clear();
  };
}

#endif