Bridges-C++  3.4.1
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 {
33 
34  private:
35 
36  double age_adjusted_rate; // expected cancer rate, adjusted for age
37  double age_adjusted_rate_ci[2]; // confidence interval-lower,upper
38  double crude_rate; // cancer rate adjusted by population
39  double crude_rate_ci[2]; // confidence interval
40 
41  int count; // incidence count
42  int year; // reporting year
43  int population; // population of this area
44 
45  string gender; // gender (male, female, male and female
46  string race;
47  string event_type; // incidence, mortality
48  string affected_area; // location, typically, state
49 
50  double loc[2]; // location (cartesian coords
51 
52 
53  public:
55  loc[0] = loc[1] = 0.0;
56  age_adjusted_rate_ci[0] = age_adjusted_rate_ci[1] = 0.0;
57  crude_rate_ci[0] = crude_rate_ci[1] = 0.0;
58  }
59 
66  double getAgeAdjustedRate() const {
67  return age_adjusted_rate;
68  }
69 
75  void setAgeAdjustedRate(double aar) {
76  age_adjusted_rate = aar;
77  }
78 
86  double getAgeAdjustedCI_Lower() const {
87  return age_adjusted_rate_ci[0];
88  }
89 
96  void setAgeAdjustedCI_Lower(double ci_l) {
97  age_adjusted_rate_ci[0] = ci_l;
98  }
99 
106  double getAgeAdjustedCI_Upper() const {
107  return age_adjusted_rate_ci[1];
108  }
109 
115  void setAgeAdjustedCI_Upper(double ci_u) {
116  age_adjusted_rate_ci[1] = ci_u;
117  }
118 
124  double getCrudeRate() const {
125  return crude_rate;
126  }
132  void setCrudeRate(double cr) {
133  crude_rate = cr;
134  }
135 
142  double getCrudeRate_CI_Lower() const {
143  return crude_rate_ci[0];
144  }
145 
151  void setCrudeRate_CI_Lower(double cr_l) {
152  crude_rate_ci[0] = cr_l;
153  }
161  double getCrudeRate_CI_Upper() const {
162  return crude_rate_ci[1];
163  }
164 
171  void setCrudeRate_CI_Upper(double cr_u) {
172  crude_rate_ci[1] = cr_u;
173  }
174 
180  int getYear() const {
181  return year;
182  }
183 
184  /*
185  * @brief Set the year of this cancer record
186  *
187  * @param[in] y year
188  */
189  void setYear(int y) {
190  year = y;
191  }
197  string getGender() const {
198  return gender;
199  }
205  void setGender(const string& g) {
206  gender = g;
207  }
208 
214  string getRace() const {
215  return race;
216  }
222  void setRace(const string& r) {
223  race = r;
224  }
225 
231  string getEventType() const {
232  return event_type;
233  }
239  void setEventType(const string& et) {
240  event_type = et;
241  }
242 
248  int getPopulation() const {
249  return population;
250  }
251 
257  void setPopulation(int pop) {
258  population = pop;
259  }
260 
266  string getAffectedArea() const {
267  return affected_area;
268  }
269 
275  void setAffectedArea(const string& area) {
276  affected_area = area;
277  }
278 
284  int getCount() const {
285  return count;
286  }
292  void setCount(int c) {
293  count = c;
294  }
295 
301  double getLocationX() const {
302  return loc[0];
303  }
309  void setLocationX (double locX) {
310  loc[0] = locX;
311  }
312 
318  double getLocationY() const {
319  return loc[1];
320  }
321 
327  void setLocationY (double locY) {
328  loc[1] = locY;
329  }
330  };
331  }
332 } // namespace bridges
333 
334 #endif
void setEventType(const string &et)
Set event type.
Definition: CancerIncidence.h:239
void setYear(int y)
Definition: CancerIncidence.h:189
void setAffectedArea(const string &area)
Set cancer incidenc area.
Definition: CancerIncidence.h:275
void setCrudeRate(double cr)
Definition: CancerIncidence.h:132
string getEventType() const
Get the event type (incidence, mortality, etc)
Definition: CancerIncidence.h:231
void setCrudeRate_CI_Lower(double cr_l)
Definition: CancerIncidence.h:151
void setCrudeRate_CI_Upper(double cr_u)
Set crude rate CI (upper)
Definition: CancerIncidence.h:171
string getAffectedArea() const
Get the cancer incidence area (state, region, etc)
Definition: CancerIncidence.h:266
double getCrudeRate() const
Definition: CancerIncidence.h:124
double getLocationY() const
Get the Y coordinate of location.
Definition: CancerIncidence.h:318
void setLocationX(double locX)
Set location (X coord)
Definition: CancerIncidence.h:309
string getRace() const
Get the race of the group.
Definition: CancerIncidence.h:214
double getAgeAdjustedRate() const
Definition: CancerIncidence.h:66
string getGender() const
Get the gender of the group.
Definition: CancerIncidence.h:197
int getYear() const
Get the year of this cancer record.
Definition: CancerIncidence.h:180
void setAgeAdjustedCI_Lower(double ci_l)
Definition: CancerIncidence.h:96
void setCount(int c)
Set cancer incidence count.
Definition: CancerIncidence.h:292
double getAgeAdjustedCI_Lower() const
Definition: CancerIncidence.h:86
void setLocationY(double locY)
Set location (Y coord)
Definition: CancerIncidence.h:327
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:257
void setGender(const string &g)
Set gender of the record.
Definition: CancerIncidence.h:205
void setAgeAdjustedCI_Upper(double ci_u)
Definition: CancerIncidence.h:115
int getPopulation() const
Get the population size.
Definition: CancerIncidence.h:248
double getLocationX() const
Definition: CancerIncidence.h:301
void setRace(const string &r)
Set race.
Definition: CancerIncidence.h:222
int getCount() const
Get the number of people affected in this group.
Definition: CancerIncidence.h:284
double getAgeAdjustedCI_Upper() const
Definition: CancerIncidence.h:106
void setAgeAdjustedRate(double aar)
Definition: CancerIncidence.h:75
A class representing the attributes for cancer incidence.
Definition: CancerIncidence.h:32
double getCrudeRate_CI_Lower() const
Definition: CancerIncidence.h:142
CancerIncidence()
Definition: CancerIncidence.h:54
double getCrudeRate_CI_Upper() const
Definition: CancerIncidence.h:161