BloodChemistryModel.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5
6#include "engine/common/system/Model.h"
7#include "engine/common/system/Systems.h"
8
14
15namespace pulse
16{
17 class PBPhysiology;
18 class EngineTest;
27 class PULSE_DECL BloodChemistryModel : public BloodChemistrySystem, public Model
28 {
29 friend PBPhysiology;//friend the serialization class
30 friend EngineTest;
31 public:
32 BloodChemistryModel(Data& data);
33 virtual ~BloodChemistryModel();
34
35 void Clear() override;
36
37 // Set members to a stable homeostatic state
38 void Initialize() override;
39 // Set pointers and other member varialbes common to both homeostatic initialization and loading a state
40 void SetUp() override;
41
42 void AtSteadyState() override;
43 void PreProcess() override;
44 void Process(bool solve_and_transport = true) override;
45 void PostProcess(bool solve_and_transport = true) override;
46
47 bool CalculateArterialBloodGasTest(SEArterialBloodGasTest& abg) const;
48 bool CalculateCompleteBloodCount(SECompleteBloodCount& cbc) const;
49 bool CalculateComprehensiveMetabolicPanel(SEComprehensiveMetabolicPanel& cmp) const;
50
51 protected:
52 void ComputeExposedModelParameters() override;
53
54 void CheckBloodSubstanceLevels();
55 // Serializable member variables (Set in Initialize and in schema)
56 SERunningAverage* m_ArterialOxygen_mmHg;
57 SERunningAverage* m_ArterialCarbonDioxide_mmHg;
58
59 // Stateless member variable (Set in SetUp())
60 double m_RedBloodCellVolume_mL;
61 double m_HbPerRedBloodCell_ug_Per_ct;
62 SELiquidCompartment* m_Aorta;
64 SELiquidSubstanceQuantity* m_AortaCO2;
65 SELiquidSubstanceQuantity* m_AortaHCO3;
67 SELiquidSubstanceQuantity* m_MyocardiumO2;
68 SELiquidSubstanceQuantity* m_PulmonaryArteriesO2;
69 SELiquidSubstanceQuantity* m_PulmonaryArteriesCO2;
70 SELiquidSubstanceQuantity* m_PulmonaryVeinsO2;
71 SELiquidSubstanceQuantity* m_PulmonaryVeinsCO2;
72 SELiquidCompartment* m_RightArm;
73 SELiquidSubstanceQuantity* m_RightArmO2;
74 SELiquidSubstanceQuantity* m_RightArmCO;
75 SELiquidCompartment* m_VenaCava;
76 SELiquidSubstanceQuantity* m_VenaCavaO2;
77 SELiquidSubstanceQuantity* m_VenaCavaCO2;
78 };
79END_NAMESPACE
Definition: PBPhysiology.h:24
Definition: SEArterialBloodGasTest.h:8
Definition: SECompleteBloodCount.h:8
Definition: SEComprehensiveMetabolicPanel.h:8
Definition: SELiquidCompartment.h:11
Definition: SELiquidSubstanceQuantity.h:12
Definition: SERunningAverage.h:8
Definition: Logger.h:14

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.