Bridges-C++  3.2.0
Bridges(C++API)
CancerIncidence.h
Go to the documentation of this file.
1 #ifndef CANCER_INCIDENCE_H
2 
3 #define CANCER_INCIDENCE_H
4 #include <string>
5 
6 using namespace std;
7 
8 namespace bridges {
9  namespace dataset {
27 
28  private:
29 
30  double age_adjusted_rate; // expected cancer rate, adjusted for age
31  double age_adjusted_rate_ci[2]; // confidence interval-lower,upper
32  double crude_rate; // cancer rate adjusted by population
33  double crude_rate_ci[2]; // confidence interval
34 
35  int count; // incidence count
36  int year; // reporting year
37  int population; // population of this area
38 
39  string gender; // gender (male, female, male and female
40  string race;
41  string event_type; // incidence, mortality
42  string affected_area; // location, typically, state
43 
44  double loc[2]; // location (cartesian coords
45 
46 
47  public:
49  loc[0] = loc[1] = 0.0;
50  age_adjusted_rate_ci[0] = age_adjusted_rate_ci[1] = 0.0;
51  crude_rate_ci[0] = crude_rate_ci[1] = 0.0;
52  }
53 
60  double getAgeAdjustedRate() const {
61  return age_adjusted_rate;
62  }
63 
69  void setAgeAdjustedRate(double aar) {
70  age_adjusted_rate = aar;
71  }
72 
80  double getAgeAdjustedCI_Lower() const {
81  return age_adjusted_rate_ci[0];
82  }
83 
90  void setAgeAdjustedCI_Lower(double ci_l) {
91  age_adjusted_rate_ci[0] = ci_l;
92  }
93 
100  double getAgeAdjustedCI_Upper() const {
101  return age_adjusted_rate_ci[1];
102  }
103 
109  void setAgeAdjustedCI_Upper(double ci_u) {
110  age_adjusted_rate_ci[1] = ci_u;
111  }
112 
118  double getCrudeRate() const {
119  return crude_rate;
120  }
126  void setCrudeRate(double cr) {
127  crude_rate = cr;
128  }
129 
136  double getCrudeRate_CI_Lower() const {
137  return crude_rate_ci[0];
138  }
139 
145  void setCrudeRate_CI_Lower(double cr_l) {
146  crude_rate_ci[0] = cr_l;
147  }
155  double getCrudeRate_CI_Upper() const {
156  return crude_rate_ci[1];
157  }
158 
165  void setCrudeRate_CI_Upper(double cr_u) {
166  crude_rate_ci[1] = cr_u;
167  }
168 
174  int getYear() const {
175  return year;
176  }
177 
178  /*
179  * @brief Set the year of this cancer record
180  *
181  * @param[in] y year
182  */
183  void setYear(int y) {
184  year = y;
185  }
191  string getGender() const {
192  return gender;
193  }
199  void setGender(const string& g) {
200  gender = g;
201  }
202 
208  string getRace() const {
209  return race;
210  }
216  void setRace(const string& r) {
217  race = r;
218  }
219 
225  string getEventType() const {
226  return event_type;
227  }
233  void setEventType(const string& et) {
234  event_type = et;
235  }
236 
242  int getPopulation() const {
243  return population;
244  }
245 
251  void setPopulation(int pop) {
252  population = pop;
253  }
254 
260  string getAffectedArea() const {
261  return affected_area;
262  }
263 
269  void setAffectedArea(const string& area) {
270  affected_area = area;
271  }
272 
278  int getCount() const {
279  return count;
280  }
286  void setCount(int c) {
287  count = c;
288  }
289 
295  double getLocationX() const {
296  return loc[0];
297  }
303  void setLocationX (double locX) {
304  loc[0] = locX;
305  }
306 
312  double getLocationY() const {
313  return loc[1];
314  }
315 
321  void setLocationY (double locY) {
322  loc[1] = locY;
323  }
324  };
325  }
326 } // namespace bridges
327 
328 #endif
void setEventType(const string &et)
Set event type.
Definition: CancerIncidence.h:233
void setYear(int y)
Definition: CancerIncidence.h:183
void setAffectedArea(const string &area)
Set cancer incidenc area.
Definition: CancerIncidence.h:269
void setCrudeRate(double cr)
Definition: CancerIncidence.h:126
string getEventType() const
Get the event type (incidence, mortality, etc)
Definition: CancerIncidence.h:225
void setCrudeRate_CI_Lower(double cr_l)
Definition: CancerIncidence.h:145
void setCrudeRate_CI_Upper(double cr_u)
Set crude rate CI (upper)
Definition: CancerIncidence.h:165
STL namespace.
string getAffectedArea() const
Get the cancer incidence area (state, region, etc)
Definition: CancerIncidence.h:260
double getCrudeRate() const
Definition: CancerIncidence.h:118
double getLocationY() const
Get the Y coordinate of location.
Definition: CancerIncidence.h:312
void setLocationX(double locX)
Set location (X coord)
Definition: CancerIncidence.h:303
string getRace() const
Get the race of the group.
Definition: CancerIncidence.h:208
double getAgeAdjustedRate() const
Definition: CancerIncidence.h:60
string getGender() const
Get the gender of the group.
Definition: CancerIncidence.h:191
int getYear() const
Get the year of this cancer record.
Definition: CancerIncidence.h:174
void setAgeAdjustedCI_Lower(double ci_l)
Definition: CancerIncidence.h:90
void setCount(int c)
Set cancer incidence count.
Definition: CancerIncidence.h:286
double getAgeAdjustedCI_Lower() const
Definition: CancerIncidence.h:80
void setLocationY(double locY)
Set location (Y coord)
Definition: CancerIncidence.h:321
these methods convert byte arrays in to base64 codes and are used in BRIDGES to represent the color a...
Definition: alltypes.h:4
void setPopulation(int pop)
Set population size.
Definition: CancerIncidence.h:251
void setGender(const string &g)
Set gender of the record.
Definition: CancerIncidence.h:199
void setAgeAdjustedCI_Upper(double ci_u)
Definition: CancerIncidence.h:109
int getPopulation() const
Get the population size.
Definition: CancerIncidence.h:242
double getLocationX() const
Definition: CancerIncidence.h:295
void setRace(const string &r)
Set race.
Definition: CancerIncidence.h:216
int getCount() const
Get the number of people affected in this group.
Definition: CancerIncidence.h:278
double getAgeAdjustedCI_Upper() const
Definition: CancerIncidence.h:100
void setAgeAdjustedRate(double aar)
Definition: CancerIncidence.h:69
A class representing the attributes for cancer incidence.
Definition: CancerIncidence.h:26
double getCrudeRate_CI_Lower() const
Definition: CancerIncidence.h:136
CancerIncidence()
Definition: CancerIncidence.h:48
double getCrudeRate_CI_Upper() const
Definition: CancerIncidence.h:155