1 #include <iostream>
2 #include <sstream>
3 #ifndef PHARM_H
4 #include "pharm.h"
5 #define PHARM_H
6 #endif
7 #ifndef EXCEPT_H
8 #define EXCEPT_H
9 #include <stdexcept>
10 #endif
11 #ifndef RECEPE_H
12 #define RECEPE_H
13 #endif
14 #ifdef VECTOR_H
15 #include <vector>
16 #define VECTOR_H
17 #endif
18
19 using namespace std;
20
21 class Ingr;
22 class Solution;
23 class Admix;
24
25 class Ingr
26 {
27 public:
28 Ingr();
29 Ingr( const string picklist );
30 Ingr(string const c_name, double const c_concentration);
31 Ingr(string const c_name, double const c_concentration, string const c_mass_units, string const c_vol_units);
32 Ingr(string const c_name, double const c_total_24_wgt, const string c_mass_units);
33 Ingr(Ingr&);
34
35 //getter methods
36
37 inline string name() const { return _name;}
38 inline string picklist() const {return _picklist;}
39 inline double concentration() const{return _concentration;}
40 inline string mass_units() const{return _mass_units;}
41 inline string vol_units() const{return _vol_units;}
42 inline double total_24_wgt() const{return _total_24_wgt;}
43 inline double wgt_kg_day() const{return _wgt_kg_day;}
44 inline double total_wgt_for_bag() const{return _total_wgt_for_bag;}
45
46 //putter methods
47
48 inline string name(string const m_name){ return _name = m_name;}
49 inline string picklist(const string m_picklist){return _picklist = m_picklist;}
50 inline double concentration(const double m_concentration){return _concentration = m_concentration;}
51 inline string mass_units(const string m_mass){return _mass_units=m_mass;}
52 inline string vol_units(const string m_vol_units){return _vol_units=m_vol_units;}
53 inline double total_24_wgt(const double m_total_24_wgt){return _total_24_wgt=m_total_24_wgt;}
54 inline double total_wgt_for_bag(const double m_total_for_bag){return _total_wgt_for_bag=m_total_for_bag;}
55 inline double wgt_kg_day(const double m_wgt_kg_day){return _wgt_kg_day = m_wgt_kg_day;}
56
57
58
59 private:
60 string _name;
61 string _picklist;
62 double _concentration;
63 string _mass_units;
64 string _vol_units;
65 double _total_24_wgt;
66 double _total_wgt_for_bag;
67 double _wgt_kg_day;
68 };
69
70 class Solution
71 {
72 public:
73 Solution();
74 Solution(const string m_name, int m_vol);
75 Solution (const string m_picklist);
76 Solution (const string m_name, const int m_vol, const string m_lyte, const double m_wgt, const string m_units);
77 //getter functions
78 inline string name()const{return _name;}
79 inline string unit()const{return _unit;}
80 inline string lyte()const{return _lyte;}
81 inline string lyte_unit()const{return _lyte_units;}
82 inline string picklist()const{return _picklist;}
83 inline int vol()const{return _vol;}
84 inline double lyte_wgt()const{return _lyte_wgt;}
85
86 //putter functions
87 inline string name(const string m_name){return _name = m_name;}
88 inline string unit(const string m_unit){return _unit = m_unit;}
89 inline string lyte(const string m_lyte){return _lyte=m_lyte;}
90 inline string lyte_wgt(const string m_lyte_wgt){return _lyte_units = m_lyte_wgt;}
91 inline string picklist(const string m_picklist){return _picklist = m_picklist;}
92 inline int vol(const int m_vol){return _vol = m_vol; }
93 inline double lyte_wgt(const double m_lyte_wgt){return _lyte_wgt = m_lyte_wgt;}
94
95
96 private:
97 string _name;
98 string _unit;
99 int _vol;
100 //kcl and mag prestocked solution need lytes data
101 string _lyte;
102 double _lyte_wgt;
103 string _lyte_units;
104 string _picklist;
105 };
106
107
108 class Admix
109 {
110 public:
111 vector <int> ctest;
112 Admix();
113 Admix(const Solution &c_bag);
114 Admix(const string &c_bag, const int &c_vol);
115 Admix(const string &c_bag, const int &c_vol, const vector<Ingr> &c_drugs);
116 Admix(const Solution &c_bag, const vector<Ingr> &c_drugs);
117 Admix(const Solution &c_bag, const Ingr &c_drug1);
118 Admix(const Solution &c_bag, const Ingr &c_drug1, const Ingr &c_drug2);
119 Admix(const Solution &c_bag, const Ingr &c_drug1, const Ingr &c_drug2, const Ingr &c_drug3 );
120 Admix(const Solution &c_bag, const Ingr &c_drug1, const Ingr &c_drug2, const Ingr &c_drug3, const Ingr &c_drug4 );
121
122 //getters
123 inline int number_of_bags() const{ return _number_of_bags;}
124 vector<Ingr> drugs() const{ return _drugs;}
125 inline Solution bag() const{ return _bag; }
126
127 //putters
128 inline int number_of_bags(int m_bags){ return _number_of_bags = m_bags;}
129 inline vector <Ingr> drugs(vector<Ingr> m_drugs){return _drugs = m_drugs; }
130 vector <Ingr>& drugs( Ingr m_drug);
131 inline Solution bag(m_bag) const{ return _bag = m_bag; }
132
133 //utility methods
134 double weight_calc(const string &mgkgperday, Solution &c_bag, const double &rate_ml_hr, const float &c_pt_wgt);
135
136
137
138
139 private:
140 vector <Ingr> _drugs;
141 Solution _bag;
142 int _number_of_bags;
143 };
144
145
146
147
148